chore: migrate from yarn to npm#8249
Merged
Merged
Conversation
- Replace yarn.lock with package-lock.json - Convert `resolutions` to npm `overrides` in package.json - Drop yarn-deduplicate devDependency and remove it from the `prepare` script - Flip .npmrc to package-lock=true so npm maintains the lockfile - Untrack package-lock.json/yarn-error.log in .gitignore - Switch CI workflows (testing, deploy) and the webpack-persistent-cache action to npm - Update CONTRIBUTING.md to instruct contributors to use npm - Update the module-federation example (lerna npmClient, README) to use npm User-facing webpack documentation in src/content/** still mentions yarn because webpack itself supports yarn / Yarn PnP for end users.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
avivkeller
reviewed
May 19, 2026
| @@ -1 +1 @@ | |||
| package-lock=false | |||
Member
There was a problem hiding this comment.
I think true is the default, so this can be removed
Member
Author
There was a problem hiding this comment.
Sometimes AI is stupid 😄
Yarn happened to hoist workbox-*@7.4.x to the top of node_modules because `workbox-window` and `workbox-webpack-plugin` are direct deps; npm's alphabetical hoist resolution instead picks the older 4.3.1 versions that arrive via hyperlink → assetgraph → workbox-build@4.3.1. The 4.x API has no `CacheableResponsePlugin` / `ExpirationPlugin` (they were named `Plugin`), so src/sw.js fails the import/named lint rule. - Declare the workbox-* packages src/sw.js consumes as direct dependencies at ^7.4.0 so npm hoists v7 alongside workbox-window. - Drop the now-unnecessary eslint-disable for import/no-extraneous-dependencies. - Pin eslint-plugin-react-hooks to 7.0.1 via overrides. The yarn.lock on main pinned 7.0.1; regenerating the lockfile with the existing `^7.0.1` range bumped it to 7.1.1, which introduces the new `react-hooks/set-state-in-effect` rule and surfaces unrelated lint failures.
…ches The yarn → npm switch makes the full transitive tree visible to dependency-review for the first time, surfacing a batch of pre-existing advisories. The four direct deps that pull them in (hyperlink, static-site-generator-webpack-plugin, webpack-pwa-manifest, sitemap-static) are already at their latest published versions, so the only available levers are npm overrides on the transitive packages with patched versions. Pinned via overrides: - @tootallnate/once ^3.0.1 (was 1.x — GHSA-vpq2-c234-7xj6) - file-type ^21.3.1 (was 16.x — GHSA-5v7r-6r5c-r473) - form-data ^4.0.4 (was 2.x — GHSA-fjxv-7rqg-78g4) - minimist ^1.2.8 (replaces the older sitemap-static-only 1.2.5 pin — GHSA-xvch-5gv4-984h) - nth-check ^2.0.1 (was 1.x — GHSA-rp65-9cf3-cjxr) - phin ^3.7.1 (was 2.x — GHSA-x565-32qp-m3vf) - qs ^6.13.0 (was 6.5.x — GHSA-6rw7-vpxm-498p) - tough-cookie ^4.1.3 (was 2.5.x — GHSA-72xf-g2v4-qvf3) Drops `npm audit` from 23 advisories to 8. The remaining 8 all come from deprecated packages with no upstream patch — `html-minifier`, `lodash.pick`, `request` — reachable only via `hyperlink` and `static-site-generator-webpack-plugin`, which would need to be replaced to address them.
The file-type 21.x patched version is ESM-only and triggers
ERR_PACKAGE_PATH_NOT_EXPORTED when the old CJS @jimp/core does
`require('file-type')`, breaking the webpack-pwa-manifest plugin used in
webpack.ssg.mjs and failing the E2E build step. @jimp/core is the only
consumer of file-type in the tree and pins it to ^16.5.4, so no
overrideable patched version exists.
The GHSA-5v7r-6r5c-r473 advisory remains; closing it would require
upgrading webpack-pwa-manifest to a version using a maintained image
processor.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
resolutionsto npmoverridesin package.jsonpreparescriptUser-facing webpack documentation in src/content/** still mentions yarn
because webpack itself supports yarn / Yarn PnP for end users.