Skip to content
This repository was archived by the owner on May 28, 2026. It is now read-only.

chore(deps): bump uuid to 14 + @hey-api/client-fetch to 0.13 - #175

Closed
Almaju wants to merge 1 commit into
mozilla-services:mainfrom
Almaju:fix/jest-uuid-esm-resolution
Closed

Almaju wants to merge 1 commit into
mozilla-services:mainfrom
Almaju:fix/jest-uuid-esm-resolution

Conversation

@Almaju

@Almaju Almaju commented May 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Why the jest change is needed

uuid v12 dropped its CommonJS build. With the old config, ts-jest would only transform .ts/.tsx, and Jest's default transformIgnorePatterns ignores all of node_modules/. So when a test imported uuid, Jest tried to require() ESM and choked on export { … }.

The fix:

  • Add a transform entry for .js files using ts-jest with allowJs: true and module: commonjs.
  • Exempt uuid from transformIgnorePatterns so its ESM gets transformed for the test environment.

The project's own source is .ts/.tsx so the new JS transform only kicks in for the uuid files exempted from transformIgnorePatterns.

Supersedes

Test plan

  • npm test — 20/20 suites pass, 102/102 tests pass, 100% statement coverage
  • npm run lint — clean
  • npm run build — succeeds, validates dist
  • CI: cross-browser e2e

uuid 12+ ships ESM-only, so Jest can no longer require() it directly.
Extend the ts-jest transform to handle .js files and allow uuid's ESM
through transformIgnorePatterns. Supersedes mozilla-services#170 and mozilla-services#157.
@Almaju
Almaju requested a review from a team as a code owner May 25, 2026 22:05
@Almaju

Almaju commented May 25, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #170, which now includes the Jest config fix as a follow-up commit. Closing in favor of that.

@Almaju Almaju closed this May 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant