Skip to content

chore(deps): bump uuid from 11 to 14#457

Closed
joaquimds wants to merge 1 commit into
mainfrom
chore/uuid-14
Closed

chore(deps): bump uuid from 11 to 14#457
joaquimds wants to merge 1 commit into
mainfrom
chore/uuid-14

Conversation

@joaquimds

Copy link
Copy Markdown
Member

Three major versions in one jump, but the only API this codebase uses is the import { v4 as uuidv4 } from "uuid" named export — unchanged across all three — in 28 files across the map UI, tRPC routers, jobs and tests.

The breaking changes, and why each is safe here

Version Breaking change Why it's fine
12.0.0 Removes CommonJS support Both tsconfigs are module: esnext / moduleResolution: bundler. No require("uuid") anywhere in src, bin, tests or migrations. The published SDK (tsconfig.api.json) doesn't use uuid.
13.0.0 Browser exports become the default Relies on a global crypto, which Node 20+ provides.
14.0.0 Requires Node 20+ for that global crypto All three CI workflows pin node-version: 22; local dev is on 22.

The CommonJS removal was the one worth actually checking rather than assuming — it's the change most likely to break a mixed-module codebase at runtime rather than at build time.

Verification

  • npm run lint (prettier, eslint, tsc --noEmit, madge) — clean
  • npm run build — succeeds
  • npm test -- run tests/unit285 passed, 15 skipped, covering the tRPC routers and refreshWebhooks where uuidv4 is called

Remaining uuid findings after this

npm audit still reports a moderate uuid advisory, but from nested copies under @sanity/uuid (8.3.2) and typeid-js — not our direct dependency. Those need a sanity-side bump.

Note

Stacked on #455 — the base will retarget to main automatically once that merges.

🤖 Generated with Claude Code

Three majors, but the only API used across the codebase is the
`import { v4 as uuidv4 } from "uuid"` named export, which is unchanged
throughout.

The breaking changes and why they are safe here:
- v12 removes CommonJS support. Both tsconfigs are module esnext with
  moduleResolution bundler, there is no require("uuid") anywhere, and the
  published SDK (tsconfig.api.json) does not use uuid.
- v13 makes browser exports the default, which relies on a global crypto.
- v14 requires node@20+ for that global crypto. CI runs node 22 on all
  three workflows and local development is on node 22.

Verified with npm run lint, npm run build and the full unit suite (285
passed), which covers the tRPC routers and the webhook refresh job where
uuidv4 is used.

Stacked on top of the Dependabot batch (#455).
@joaquimds
joaquimds deleted the branch main July 23, 2026 11:24
@joaquimds joaquimds closed this Jul 23, 2026
Base automatically changed from chore/dependabot-batch to main July 23, 2026 11:24
@joaquimds

Copy link
Copy Markdown
Member Author

Superseded by #460 (identical branch, GitHub's mergeability compute got wedged on this PR and it could not be reopened). #460 merged cleanly.

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.

1 participant