Skip to content

chore(deps): migrate uuid to 14#96

Merged
pmigueld merged 2 commits into
developfrom
chore/uuid-14-migration
Jul 24, 2026
Merged

chore(deps): migrate uuid to 14#96
pmigueld merged 2 commits into
developfrom
chore/uuid-14-migration

Conversation

@pmigueld

Copy link
Copy Markdown
Contributor

Migrates uuid 10→14 across all 7 packages (supersedes dependabot #91). uuid 10 is deprecated.

uuid 14 is ESM-only

uuid@14.0.1 ships no CJS build ("type":"module", no require export condition). Consequences handled:

  • Jest packages (datacollect/backend/adapters, ts-jest/CJS): added a scoped babel-jest transform for .js + pnpm-aware transformIgnorePatterns: ['/node_modules/\\.pnpm/(?!uuid@)'] so uuid's ESM is transpiled for the CJS test runtime (ts-jest still handles all real .ts test code). Vitest packages (web/mobile) need nothing — native ESM.
  • CJS build: datacollect's published CJS output does require('uuid') (ESM), which Node supports unflagged only on ≥22.12 / ≥20.19. Bumped engines.node >=22.0.0>=22.12.0 accordingly (CI's setup-node 22.x/20.x resolve to safe patches). Verified: node -e "require('packages/datacollect/dist/cjs/index.js')" loads OK.
  • Removed @types/uuid (uuid 14 bundles its own types).

Verification

All suites pass, counts preserved: datacollect 857, backend 421 (Postgres), adapters 140/27/53, web 74, mobile 193. CJS + ESM builds clean.

Note: uuid 11 (dual CJS/ESM) was the alternative that avoids the babel transform + engines floor; 14 chosen to stay on latest.

🤖 Generated with Claude Code

@pmigueld
pmigueld merged commit b59701c into develop Jul 24, 2026
9 checks passed
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