Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import yarn.lock #2836

Closed
wants to merge 3 commits into from
Closed

import yarn.lock #2836

wants to merge 3 commits into from

Conversation

milahu
Copy link
Contributor

@milahu milahu commented Sep 8, 2020

start fixing issue #2707

code passes eslint, compiles, runs with success on project jsdom
which is using yarn.lock to force versions, otherwise jsdom fails to compile
jsdom compile is passing, so my patch cant be too bad : ]
but maybe other projects fail to compile with this pnpm import

TODO allow to set lockfile like pnpm import [lockfile]

TODO dont run scripts after pnpm import, only after pnpm install
import only creates the pnpm-lock.yaml file
maybe run install after import?

TODO why does pnpm import say 'Already up-to-date'?

TODO tell the user what lockfile is imported

getAllVersionsByPackageNames(npmPackageLock.dependencies[packageName], versionsByPackageNames)

.... why make the deps-tree flat?
= pass versionsByPackageNames on recursion
not versionsByPackageNames[packageName].dependencies
npm lockfiles allow locking of top-level AND sub dependency versions
i also dont understand the manpage on limitations

npm can install the same name@version multiple times and with different sets of dependencies. npm's shrinkwrap file is designed to reflect the node_modules layout created by npm. pnpm cannot create a similar layout, so it cannot respect npm's lockfile format. However, see pnpm import.

my understanding was that pnpm can install different versions
in pnpm's nested (non-flat) node_modules tree

import * as pnpmConst from '@pnpm/constants'
const WANTED_LOCKFILE: string = pnpmConst.WANTED_LOCKFILE

.... is needed to make eslint happy
see eslint rule @typescript-eslint/restrict-template-expressions

using 'foreign lockfile' as shortname for a non-pnpm lockfile
could use a better name. 'external lockfile'?

@milahu milahu requested a review from zkochan as a code owner September 8, 2020 20:38
@zkochan
Copy link
Member

zkochan commented Sep 8, 2020

Great to see a new contributor! Let us know when it is ready for review.
And don't hesitate to ask questions

@zkochan zkochan closed this Jan 15, 2021
@zkochan zkochan deleted the branch pnpm:main January 15, 2021 21:29
@ExE-Boss ExE-Boss reopened this Jan 15, 2021
@ExE-Boss ExE-Boss changed the base branch from master to main January 15, 2021 21:45
@zkochan zkochan added this to the v6.14 milestone Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants