Commit 3c023bb
committed
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
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | 50 | | |
55 | | - | |
56 | 51 | | |
57 | 52 | | |
58 | 53 | | |
| |||
67 | 62 | | |
68 | 63 | | |
69 | 64 | | |
70 | | - | |
71 | 65 | | |
72 | 66 | | |
73 | 67 | | |
| |||
0 commit comments