Skip to content

Commit 3c023bb

Browse files
committed
chore(FR-2851): drop deprecated/dead babel deps and dead babel.config.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`.
1 parent a14943a commit 3c023bb

4 files changed

Lines changed: 3716 additions & 10809 deletions

File tree

babel.config.js

Lines changed: 0 additions & 7 deletions
This file was deleted.

package.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,7 @@
4747
},
4848
"devDependencies": {
4949
"@babel/core": "catalog:",
50-
"@babel/parser": "^7.29.0",
51-
"@babel/plugin-proposal-class-properties": "^7.18.6",
52-
"@babel/plugin-proposal-decorators": "^7.29.0",
53-
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
5450
"@babel/preset-typescript": "catalog:",
55-
"@babel/types": "^7.29.0",
5651
"@electron/packager": "^18.4.4",
5752
"@eslint/js": "catalog:",
5853
"@jest/expect": "catalog:",
@@ -67,7 +62,6 @@
6762
"@typescript-eslint/eslint-plugin": "^7.18.0",
6863
"@typescript-eslint/parser": "^7.18.0",
6964
"@yao-pkg/pkg": "^6.14.1",
70-
"babel-eslint": "^10.1.0",
7165
"buffer": "^6.0.3",
7266
"cli-color": "^2.0.4",
7367
"concurrently": "^8.2.2",

0 commit comments

Comments
 (0)