snowplow / snowplow-javascript-tracker

Snowplow event tracker for client-side and server-side JavaScript. Add analytics to your websites, web apps and servers.
http://snowplowanalytics.com
BSD 3-Clause "New" or "Revised" License
555 stars 222 forks source link

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

Closed matus-tomlein closed 1 month ago

matus-tomlein commented 1 month ago

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%) (https://github.com/uuidjs/uuid/issues/597) (3a033f6)
  2. use native crypto.randomUUID when available (https://github.com/uuidjs/uuid/issues/600) (c9e076c)

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

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.

bundlemon[bot] commented 1 month ago

BundleMon

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

Total files change +104.74KB 0%

Final result: :white_check_mark:

View report in BundleMon website ➡️


Current branch size history