Skip to content

chore: remove unused @babel/runtime-corejs3 devDependency - #5305

Open
Garbee wants to merge 1 commit into
developfrom
chore/remove-unused-babel-runtime-corejs3
Open

chore: remove unused @babel/runtime-corejs3 devDependency#5305
Garbee wants to merge 1 commit into
developfrom
chore/remove-unused-babel-runtime-corejs3

Conversation

@Garbee

@Garbee Garbee commented Aug 12, 2026

Copy link
Copy Markdown
Member

What

Removes the @babel/runtime-corejs3 entry from devDependencies in package.json, along with its three corresponding entries in pnpm-lock.yaml (the root importer record plus the package and snapshot blocks).

Nothing else changes. core-js, core-js-pure, and their allowBuilds: false entries in pnpm-workspace.yaml are unrelated and stay put.

Why

This resolves Dependabot PR #5194, which proposed bumping @babel/runtime-corejs3 from 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:

  • The only occurrence outside the lockfile was its own declaration in package.json.
  • @babel/runtime-corejs3 is 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, via build/run-build/babel-transform.mjsfull-build.mjs — uses @babel/preset-env with no useBuiltIns or corejs options, plus @babel/plugin-transform-object-rest-spread. Nothing pulls the runtime helpers in.
  • Runtime polyfills come from core-js-pure directly in lib/core/imports/polyfills.js and lib/core/imports/index.js, which are untouched.
  • doc/examples/jest_react/ has its own isolated package.json and never referenced it.
  • pnpm-lock.yaml listed 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 install regeneration.

package.json pins "chromedriver": "latest". Because that is a floating spec, any manifest edit causes pnpm install to re-resolve it — a full regeneration here also bumped chromedriver 151.0.2 → 151.0.5 and dragged along axios, adm-zip, and form-data, burying a 12-line removal in ~57 lines of unrelated churn. The scoped lockfile is verified consistent: pnpm install --frozen-lockfile accepts 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-corejs3 absent from package.json devDependencies
  • All three pnpm-lock.yaml blocks (importer, packages:, snapshots:) removed, with no residual reference
  • pnpm install --frozen-lockfile succeeds and proposes no lockfile drift
  • Built axe.js / axe.min.js byte-identical to a develop build
  • pnpm test, pnpm run fmt:check, and pnpm run eslint all clean

Related

Supersedes Dependabot PR #5194.

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.
@Garbee Garbee self-assigned this Aug 12, 2026
@Garbee
Garbee requested a lite review from Copilot August 12, 2026 17:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-corejs3 from devDependencies in package.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.

@Garbee
Garbee marked this pull request as ready for review August 12, 2026 17:25
@Garbee
Garbee requested a review from a team as a code owner August 12, 2026 17:25
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.

2 participants