chore(FR-2851): drop deprecated/dead babel deps and dead babel.config.js#7321
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has required the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Coverage Report for react-coverage (./react)
File CoverageNo changed files found. |
ff069a2 to
fdfe95b
Compare
There was a problem hiding this comment.
Pull request overview
This PR reduces workspace maintenance noise by removing deprecated/unused Babel dependencies and deleting an orphaned root Babel config that is no longer part of the build toolchain after the CRA→Vite migration.
Changes:
- Replaces deprecated
@babel/plugin-proposal-private-property-in-objectwith@babel/plugin-transform-private-property-in-objectinreact/. - Removes unused root devDependencies (
babel-eslint, several Babel proposal/syntax plugins, and@babel/parser/@babel/types). - Deletes the unused root
babel.config.js.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| react/package.json | Swaps the deprecated private-property plugin to the non-deprecated transform variant. |
| package.json | Drops unused/deprecated Babel-related devDependencies (including babel-eslint). |
| babel.config.js | Removes an unused Babel configuration file that no longer has an active consumer. |
Merge activity
|
….js (#7321) Resolves #7320(FR-2851) ## Summary Three direct dependencies print `deprecated` warnings on every `pnpm install`. This PR retires them, and while we're in the file, deletes the dead `babel.config.js` they were tied to plus the four root babel plugins it was the sole consumer of. ### Direct dep changes - `react/package.json`: `@babel/plugin-proposal-private-property-in-object` → `@babel/plugin-transform-private-property-in-object` (Babel 7.13+ rename, drop-in re-export). - Root `package.json`: removed - `babel-eslint` — dead. ESLint 9 flat configs (`eslint.config.mjs`, `react/eslint.config.js`, `e2e/eslint.config.mjs`, `packages/backend.ai-ui/eslint.config.js`) all use `@typescript-eslint/parser` + `@eslint/js`; `grep -rn babel-eslint` returns zero hits. - `@babel/plugin-proposal-class-properties` — only ever referenced from `babel.config.js`, which is dead (see below). - `@babel/plugin-proposal-decorators` — same. - `@babel/plugin-syntax-dynamic-import` — same. - `@babel/parser`, `@babel/types` — no consumer in `src/`, `scripts/`, `electron-app/`, `packages/`. - Root `babel.config.js`: deleted. After the CRA→Vite migration, no build path reads it: `@vitejs/plugin-react` defaults to `configFile: false`/`babelrc: false` and both `react/vite.config.ts` and `packages/backend.ai-ui/vite.config.ts` configure `babel.plugins` inline (`babel-plugin-react-compiler` + `babel-plugin-relay`). `tsup` (used by `backend.ai-client`) uses esbuild, not babel. There is no `babel-loader`, `@babel/register`, or `babel-node` consumer in the repo. ### Why now Every contributor sees these three warnings on `pnpm install` and has no way to silence them without editing a direct dependency. The `babel.config.js` next to them was orphaned and pinning four real packages for nothing. ## Lockfile diff The lockfile shrinks ~10K lines. The shrink is mostly from `babel-eslint`'s 2019-era transitive chain dropping out, but it also drops a few entries that were already orphaned in `main`'s lockfile from the CRA→Vite migration (`react-scripts` patch chain, `@craco/craco`, etc.). These had no live consumer; `pnpm install` simply re-resolves them out. No behavior change. The legacy `plugin-proposal-class-properties@7.18.6` and `plugin-proposal-private-property-in-object@7.21.11` entries that remain in the lockfile are pulled in transitively by `babel-preset-react-app@10.1.0` (still a `react/` devDep). Removing that preset is out of scope for this PR but a reasonable follow-up — it would also let the renamed `transform-*` direct dep in `react/package.json` go away. ## Verification - `pnpm install` no longer prints `deprecated` warnings for `babel-eslint`, `@babel/plugin-proposal-class-properties`, or `@babel/plugin-proposal-private-property-in-object`. - `bash scripts/verify.sh` — Relay / Lint / Format pass. The TypeScript failures shown (`packages/backend.ai-client/src/client.ts` implicit-any, `DeleteForeverVFolderModalV2.tsx` `BulkPurgeVFoldersV2Input.options`) are **pre-existing on main** (verified by re-running with my changes stashed), unrelated to babel deps. ## Test plan - [ ] `pnpm install` shows no deprecation warnings for the three packages above. - [ ] `pnpm run dev` starts the dev server without runtime errors related to babel transforms. - [ ] CI passes the same set of checks that pass on `main`.
fdfe95b to
3c023bb
Compare

Resolves #7320(FR-2851)
Summary
Three direct dependencies print
deprecatedwarnings on everypnpm install. This PR retires them, and while we're in the file, deletes the deadbabel.config.jsthey were tied to plus the four root babel plugins it was the sole consumer of.Direct dep changes
react/package.json:@babel/plugin-proposal-private-property-in-object→@babel/plugin-transform-private-property-in-object(Babel 7.13+ rename, drop-in re-export).package.json: removedbabel-eslint— dead. ESLint 9 flat configs (eslint.config.mjs,react/eslint.config.js,e2e/eslint.config.mjs,packages/backend.ai-ui/eslint.config.js) all use@typescript-eslint/parser+@eslint/js;grep -rn babel-eslintreturns zero hits.@babel/plugin-proposal-class-properties— only ever referenced frombabel.config.js, which is dead (see below).@babel/plugin-proposal-decorators— same.@babel/plugin-syntax-dynamic-import— same.@babel/parser,@babel/types— no consumer insrc/,scripts/,electron-app/,packages/.babel.config.js: deleted. After the CRA→Vite migration, no build path reads it:@vitejs/plugin-reactdefaults toconfigFile: false/babelrc: falseand bothreact/vite.config.tsandpackages/backend.ai-ui/vite.config.tsconfigurebabel.pluginsinline (babel-plugin-react-compiler+babel-plugin-relay).tsup(used bybackend.ai-client) uses esbuild, not babel. There is nobabel-loader,@babel/register, orbabel-nodeconsumer in the repo.Why now
Every contributor sees these three warnings on
pnpm installand has no way to silence them without editing a direct dependency. Thebabel.config.jsnext to them was orphaned and pinning four real packages for nothing.Lockfile diff
The lockfile shrinks ~10K lines. The shrink is mostly from
babel-eslint's 2019-era transitive chain dropping out, but it also drops a few entries that were already orphaned inmain's lockfile from the CRA→Vite migration (react-scriptspatch chain,@craco/craco, etc.). These had no live consumer;pnpm installsimply re-resolves them out. No behavior change.The legacy
plugin-proposal-class-properties@7.18.6andplugin-proposal-private-property-in-object@7.21.11entries that remain in the lockfile are pulled in transitively bybabel-preset-react-app@10.1.0(still areact/devDep). Removing that preset is out of scope for this PR but a reasonable follow-up — it would also let the renamedtransform-*direct dep inreact/package.jsongo away.Verification
pnpm installno longer printsdeprecatedwarnings forbabel-eslint,@babel/plugin-proposal-class-properties, or@babel/plugin-proposal-private-property-in-object.bash scripts/verify.sh— Relay / Lint / Format pass. The TypeScript failures shown (packages/backend.ai-client/src/client.tsimplicit-any,DeleteForeverVFolderModalV2.tsxBulkPurgeVFoldersV2Input.options) are pre-existing on main (verified by re-running with my changes stashed), unrelated to babel deps.Test plan
pnpm installshows no deprecation warnings for the three packages above.pnpm run devstarts the dev server without runtime errors related to babel transforms.main.