Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update uuid package dependency to version 10.0.0 (close #1305) #1357

Merged
merged 2 commits into from
Oct 21, 2024

Conversation

matus-tomlein
Copy link
Contributor

@matus-tomlein matus-tomlein commented Oct 18, 2024

This PR further updates the uuid package used by the tracker from v7 to v9 (edit: v10). The reason for this is the performance improvements that they introduced:

  1. optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) (chore: optimize uuid.v4 by 4.3x (430%) (internal stringify by 33x) uuidjs/uuid#597) (3a033f6)
  2. use native crypto.randomUUID when available (feat: use native crypto.randomUUID when available uuidjs/uuid#600) (c9e076c)

This uuid version drops support for older Node and browser versions:

  • Drop Node.js 10.x support (edit: upgrading to 10 also drops support for Node 14)
  • Drop IE 11 and Safari 10 support. Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015.

There already is version 11 of the uuid package, but that further drops browser and node support (already dropped 14), which I am not sure if we should do.

Edit: On second thought, we basically dropped support for Node <18 by using fetch, so I think it's safe upgrade the uuid library to 10. Also the bug fixes seem important, so seems sensible to do.

Copy link

bundlemon bot commented Oct 18, 2024

BundleMon

Files added (6)
Status Path Size Limits
trackers/javascript-tracker/dist/sp.js
+24.27KB 30KB / +10%
libraries/browser-tracker-core/dist/index.mod
ule.js
+23.45KB 25KB / +10%
libraries/tracker-core/dist/index.module.js
+19.18KB 20KB / +10%
trackers/browser-tracker/dist/index.umd.min.j
s
+17.21KB 20KB / +10%
trackers/javascript-tracker/dist/sp.lite.js
+17.14KB 20KB / +10%
trackers/browser-tracker/dist/index.module.js
+3.49KB 5KB / +10%

Total files change +104.74KB 0%

Final result: ✅

View report in BundleMon website ➡️


Current branch size history

@matus-tomlein matus-tomlein changed the title Update uuid package dependency to version 9.0.1 (close #1305) Update uuid package dependency to version 10.0.0 (close #1305) Oct 18, 2024
Copy link
Contributor

@greg-el greg-el left a comment

Choose a reason for hiding this comment

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

LGTM

@matus-tomlein matus-tomlein merged commit fc5e39f into release/4.0.0 Oct 21, 2024
3 checks passed
@matus-tomlein matus-tomlein deleted the issue/update_uuid_v9 branch October 21, 2024 11:39
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