chore: remove unused @babel/runtime-corejs3 devDependency - #5305
Open
Garbee wants to merge 1 commit into
Open
Conversation
Drops the `@babel/runtime-corejs3` entry from devDependencies in package.json and its three corresponding entries in pnpm-lock.yaml (the root importer record plus the package and snapshot blocks). The package is only ever consumed via @babel/plugin-transform-runtime, which is not installed and appears nowhere in the repository. The Babel config in .babelrc — the only config the build reads, via build/run-build/babel-transform.mjs — uses @babel/preset-env with no `useBuiltIns` or `corejs` options plus the object-rest-spread transform, so nothing ever pulls the runtime helpers in. Runtime polyfills come from core-js-pure directly in lib/core/imports/, which is unaffected. The dependency arrived in a bulk update in d01532c (#3539) and has never been imported. This resolves Dependabot PR #5194, which proposed bumping the package to 8.0.0 — a major whose headline breaking change removes the corejs exports. Removing dead weight is preferable to absorbing a major bump for a package nothing uses. The lockfile edit is deliberately scoped to the three affected blocks rather than a full `pnpm install` regeneration. Because `chromedriver` is pinned to `latest`, any regeneration also re-resolves chromedriver, axios, adm-zip, and form-data, which would bury this change in unrelated churn. `pnpm install --frozen-lockfile` accepts the scoped lockfile. ## QA Notes Run `pnpm install --frozen-lockfile` and confirm it succeeds without proposing lockfile changes, then `pnpm run build` and confirm axe.js and axe.min.js are byte-identical to a build from develop (verified: sha1 e3d946750bfa00cd433eb0df81a6985019ea5cbb and e4295b3a13ca0e8f2b227199ea5c134a944dfac3). Niche cases to exercise manually: - `grep -rn "runtime-corejs3" --exclude-dir=node_modules .` returns no hits. - A cold install (`rm -rf node_modules && pnpm install --frozen-lockfile`) still resolves, confirming no transitive consumer relied on the removed entry. - `pnpm test` passes; core-js-pure imports in lib/core/imports/ still resolve.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the unused @babel/runtime-corejs3 devDependency from the root package manifest and prunes the corresponding entries from the pnpm lockfile, avoiding an unnecessary major-version upgrade path and keeping the dependency graph minimal.
Changes:
- Removed
@babel/runtime-corejs3fromdevDependenciesinpackage.json. - Removed the corresponding root importer, package, and snapshot records from
pnpm-lock.yaml.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| package.json | Drops unused @babel/runtime-corejs3 from root devDependencies. |
| pnpm-lock.yaml | Prunes the associated lockfile entries to match the manifest removal. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
What
Removes the
@babel/runtime-corejs3entry fromdevDependenciesinpackage.json, along with its three corresponding entries inpnpm-lock.yaml(the root importer record plus the package and snapshot blocks).Nothing else changes.
core-js,core-js-pure, and theirallowBuilds: falseentries inpnpm-workspace.yamlare unrelated and stay put.Why
This resolves Dependabot PR #5194, which proposed bumping
@babel/runtime-corejs3from 7.29.7 to 8.0.0 — a major release whose headline breaking change is "Remove corejs exports for@babel/runtime-corejs3". Rather than absorb a major bump, investigation showed the package is entirely unused:package.json.@babel/runtime-corejs3is only ever consumed via@babel/plugin-transform-runtime. That plugin is not installed and appears nowhere in the repository..babelrc— the only Babel config the build reads, viabuild/run-build/babel-transform.mjs→full-build.mjs— uses@babel/preset-envwith nouseBuiltInsorcorejsoptions, plus@babel/plugin-transform-object-rest-spread. Nothing pulls the runtime helpers in.core-js-puredirectly inlib/core/imports/polyfills.jsandlib/core/imports/index.js, which are untouched.doc/examples/jest_react/has its own isolatedpackage.jsonand never referenced it.pnpm-lock.yamllisted it only as a root importer devDependency; no other package depended on it.It arrived in a bulk dependency update in d01532c (#3539, 2022) and has never been imported.
Note on the lockfile diff
The lockfile edit is deliberately scoped to the three affected blocks rather than produced by a full
pnpm installregeneration.package.jsonpins"chromedriver": "latest". Because that is a floating spec, any manifest edit causespnpm installto re-resolve it — a full regeneration here also bumpedchromedriver151.0.2 → 151.0.5 and dragged alongaxios,adm-zip, andform-data, burying a 12-line removal in ~57 lines of unrelated churn. The scoped lockfile is verified consistent:pnpm install --frozen-lockfileaccepts it and correctly prunes the package.That floating pin will keep polluting the diff of every future dependency change; worth addressing separately.
Acceptance criteria
@babel/runtime-corejs3absent frompackage.jsondevDependenciespnpm-lock.yamlblocks (importer,packages:,snapshots:) removed, with no residual referencepnpm install --frozen-lockfilesucceeds and proposes no lockfile driftaxe.js/axe.min.jsbyte-identical to adevelopbuildpnpm test,pnpm run fmt:check, andpnpm run eslintall cleanRelated
Supersedes Dependabot PR #5194.