Repository navigation
chore: migrate from yarn to npm - #1712
Merged
Merged
Conversation
- replace yarn.lock with package-lock.json, generated by `npm install` against the old yarn.lock so resolved versions are unchanged - resolve babel-loader@7's stale webpack peer range with an override rather than legacy-peer-deps, which mis-hoists ajv-keywords - convert execution-test pack lockfiles the same way (versions verified to match their yarn.lock) and install them with npm - CI: cache npm, `npm ci`, `npm install -D` for the matrix - update Dockerfile, devcontainer and docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Benchmark (Ubuntu)
PR branch = |
Benchmark (macOS)
PR branch = |
Benchmark (Windows)
PR branch = |
johnnyreilly
added a commit
that referenced
this pull request
Oct 16, 2026
Brings in the yarn → npm migration (#1712). Conflicts resolved by keeping this branch's content and applying the same yarn → npm conversion: - package-lock.json regenerated from this branch's yarn.lock (exact version match), not main's; same for the 4.7.0_5.0.0_node16-file-suffix pack, whose yarn.lock differs here - drop main's new lockfiles for 2.8.1_option-context and basic-happypack, which this branch deletes - convert the branch-only format/knip workflows, the re-enabled macOS execution job and the .claude permissions allowlist to npm Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
johnnyreilly
added a commit
that referenced
this pull request
Oct 21, 2026
Brings in the yarn → npm migration (#1712). Conflicts resolved by keeping this branch's content and applying the same yarn → npm conversion: - package-lock.json regenerated from this branch's yarn.lock (exact version match), not main's; same for the 4.7.0_5.0.0_node16-file-suffix pack, whose yarn.lock differs here - drop main's new lockfiles for 2.8.1_option-context and basic-happypack, which this branch deletes - convert the branch-only format/knip workflows, the re-enabled macOS execution job and the .claude permissions allowlist to npm Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Moves ts-loader's development tooling from yarn to npm. This is an alternative to #1711 (pnpm), for comparison.
yarn.lockis replaced bypackage-lock.json. It was generated by runningnpm installwith the oldyarn.lockpresent, so every resolved version matches yarn's.babel-loader@7'swebpack@2 || 3peer. That is fixed with"overrides": { "babel-loader": { "webpack": "$webpack" } }.legacy-peer-depswas tried first, but it hoistedajv-keywords@5next to eslint'sajv@6and broke every webpack build.yarn.lockfiles are converted the same way, from emptynode_modules. A script confirmed eachpackage-lock.jsonresolves exactly the versions in itsyarn.lock. The pnpm migration'spnpm importand npm's--package-lock-onlyboth drifted.run-tests.jsinstalls packs withnpm install --install-links --legacy-peer-deps.--install-linkscopiesfile:deps instead of symlinking them, which keeps the git-tracked copies in some packs'node_modulesintact. Thepnpmpack still installs with pnpm, as before.npm link ./test/comparison-tests/testLibis kept. It is now native to the package manager and leaves the lockfile unchanged (checked).cache: npm,npm ci,npm run …, andnpm install -D …for the TS/webpack matrix. A dry run of both matrix installs resolves cleanly.package-lock.jsonwithnpx yarn@1, because npm can't install main as it stands (thebabel-loaderpeer conflict).Dockerfile, devcontainer,.vscode/settings.json,AGENTS.md,CONTRIBUTING.mdand the test-pack READMEs are updated.Not changed: the README's install instructions for ts-loader users (including Yarn PnP),
REFERENCES.md,examples/,CHANGELOG.md, and the yarn hint insrc/compilerSetup.ts.Testing
Run locally on macOS with Node 24 and npm 11:
npm run buildandnpm run lintpass.npm run comparison-tests: 89/89 suites pass.npm run execution-tests: 28/29 suites pass.3.6.0_projectReferencesToBeBuiltalso fails locally onmainwith yarn (karma temp-path issue on macOS), and it passes in CI.main, and the benchmark ran end to end.🤖 Generated with Claude Code