Skip to content

Bump uuid from v11 -> v14 with test env fixes for CJS#284

Merged
Dananji merged 1 commit into
mainfrom
bump-uuid
Jun 9, 2026
Merged

Bump uuid from v11 -> v14 with test env fixes for CJS#284
Dananji merged 1 commit into
mainfrom
bump-uuid

Conversation

@Dananji

@Dananji Dananji commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Related issue: #277

Changes in this PR:

  • upgrade uuid from v11 -> v14
  • add a CJS shim for uuid for the Jest test environment so that the tests work. This mocks the v4() (this is the only function used from uuid library in the SME code at the moment) using crypto.randomUUID() instead of re-implementing it.

Other considerations: I looked into replacing uuid entirely with crypto.randomUUID() which would solve this issue, but it could face security context requirements and legacy environment compatibility issues.

@cjcolvar cjcolvar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a nice workaround for now. I do wonder if finding a different UUID implementation might be needed but we could probably wait until it we're forced.

@Dananji Dananji merged commit d61fcb4 into main Jun 9, 2026
3 checks passed
@Dananji Dananji deleted the bump-uuid branch June 9, 2026 15:43
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.

2 participants