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

refactor: Remove lockfiles #655

Closed
wants to merge 4 commits into from
Closed

refactor: Remove lockfiles #655

wants to merge 4 commits into from

Conversation

stephenmathieson
Copy link
Member

Keeping package-lock.json files here causing contributor problems and prevents CI from testing with the latest versions of our dependencies. They provide no value, so they're being removed.

Keeping `package-lock.json` files here causing [contributor problems](#652 (comment)) and prevents CI from testing with the latest versions of our dependencies. They provide no value, so they're being removed.
@colinrotherham
Copy link
Contributor

colinrotherham commented Feb 2, 2023

@stephenmathieson Thanks for looking at this

Lerna now recommends using workspaces if that's easier?

useWorkspaces & packages​

Since Lerna was created, all major package managers (npm, yarn, and pnpm) have added the ability to cross-link packages in the same repo and dedupe node modules. If you'd like Lerna to delegate this process to the package manager you use, set useWorkspaces: true in lerna.json.

Lots of benefits such as:

  1. Project level package-lock.json only
  2. Project level npm audit works again
  3. Much faster install (including npm ci)

With lerna bootstrap being deprecated you'll find lerna link isn't needed either (npm does it instead)

Lerna config

Add { "useWorkspaces": true } to let npm install/link/hoist dependencies

npm config

Add { "workspaces": [] } so npm starts managing child dependencies

"workspaces": [
  "packages/*",
  "packages/react/examples/*",
  "packages/webdriverjs/tests/example",
  "axe_core_test"
],

@stephenmathieson
Copy link
Member Author

@colinrotherham Thanks for the information. However, the idea here is to remove the lockfiles entirely. They only make work work for us.

@colinrotherham
Copy link
Contributor

@stephenmathieson Ah so even a single project lockfile is too much?

Don't worry

@straker
Copy link
Contributor

straker commented Sep 11, 2023

Closed via switching to npm workspaces #687. If we still feel the package-lock file presents a problem, we should open an issue to discuss it.

@straker straker closed this Sep 11, 2023
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.

4 participants