chore(FR-2698): remove deprecated @types/uuid stub#6961
Conversation
The `@types/uuid@11.0.0` package in `react/package.json` is a deprecated stub with `main: ""` and no bundled `index.d.ts` — `uuid` itself ships its own TypeScript declarations since uuid@10. Because the root `tsconfig.json` has `typeRoots: ["./src/types", "./node_modules/@types"]`, pnpm's hoisted `node_modules/@types/uuid/` directory is picked up as an implicit type library during root `tsc` and fails with: error TS2688: Cannot find type definition file for 'uuid'. The file is in the program because: Entry point for implicit type library 'uuid' Dropping the dev dependency eliminates the stub and lets `tsc` resolve the types straight from the `uuid` package. `useBAINotification.tsx` is the only consumer and works without the stub.
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. |
There was a problem hiding this comment.
Pull request overview
This PR removes the deprecated @types/uuid stub from the React workspace, relying on uuid’s built-in TypeScript types instead.
Changes:
- Dropped
@types/uuidfromreact/package.jsondevDependencies. - Removed
@types/uuidentries frompnpm-lock.yaml(importer/package/snapshot sections).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| react/package.json | Removes deprecated @types/uuid devDependency from the React app workspace. |
| pnpm-lock.yaml | Cleans lockfile entries related to @types/uuid to match dependency removal. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🔴 | Statements | 8.92% | 1831/20519 |
| 🔴 | Branches | 8.07% | 1165/14429 |
| 🔴 | Functions | 5.28% | 294/5567 |
| 🔴 | Lines | 8.65% | 1723/19908 |
Test suite run success
865 tests passing in 40 suites.
Report generated by 🧪jest coverage report action from 182fd29
|
Small factual correction:
The "own declarations" actually landed in
This matched the change here because the repo is already on Not blocking anything — just flagging for anyone who reads this later and wonders why the same fix doesn't port cleanly to repos still on |

Resolves FR-2698
Summary
Running
pnpm run buildat the repo root fails at the roottscstep with:Root cause
react/package.jsonpinned@types/uuid@^11.0.0, which is a deprecated stub:{ "name": "@types/uuid", "version": "11.0.0", "main": "", "deprecated": "This is a stub types definition. uuid provides its own type definitions, so you do not need this installed." }The
uuidpackage itself has shipped its own declarations sinceuuid@10, so the stub has noindex.d.ts. Because the roottsconfig.jsonhastypeRoots: ["./src/types", "./node_modules/@types"], pnpm's hoistednode_modules/@types/uuid/directory is discovered as an implicit type library during the roottscpass — and fails to resolve its entry file.Fix
Drop
@types/uuidfromreact/package.jsondev dependencies and refreshpnpm-lock.yaml. The single consumer —react/src/hooks/useBAINotification.tsx(import { v4 as uuidv4 } from 'uuid') — picks up its types straight from the runtimeuuidpackage.Verification
pnpm installno longer hoists@types/uuidintonode_modules/@types/.tscno longer emitsTS2688foruuid.bash scripts/verify.sh→=== ALL PASS ===(Relay / Lint / Format / TypeScript all green).Not in scope
tscpass has other pre-existing unrelated errors (e.g.@types/d3-dispatch/index.d.tsparse errors) that reproduce onmain. Those belong to a separate cleanup of the roottypeRootsconfiguration and are out of scope here.Checklist:
pnpm installfresh, confirm nonode_modules/@types/uuid/hoisted