uuid 9.0.0-beta.0 → 9.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +9 -5
- package/dist/commonjs-browser/stringify.js +1 -1
- package/dist/esm-browser/stringify.js +1 -1
- package/dist/esm-node/stringify.js +1 -1
- package/dist/stringify.js +1 -1
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,51 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [9.0.1](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1) (2023-09-12)
|
|
6
|
+
|
|
7
|
+
### build
|
|
8
|
+
|
|
9
|
+
- Fix CI to work with Node.js 20.x
|
|
10
|
+
|
|
11
|
+
## [9.0.0](https://github.com/uuidjs/uuid/compare/v8.3.2...v9.0.0) (2022-09-05)
|
|
12
|
+
|
|
13
|
+
### ⚠ BREAKING CHANGES
|
|
14
|
+
|
|
15
|
+
- Drop Node.js 10.x support. This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022.
|
|
16
|
+
|
|
17
|
+
- Remove the minified UMD build from the package.
|
|
18
|
+
|
|
19
|
+
Minified code is hard to audit and since this is a widely used library it seems more appropriate nowadays to optimize for auditability than to ship a legacy module format that, at best, serves educational purposes nowadays.
|
|
20
|
+
|
|
21
|
+
For production browser use cases, users should be using a bundler. For educational purposes, today's online sandboxes like replit.com offer convenient ways to load npm modules, so the use case for UMD through repos like UNPKG or jsDelivr has largely vanished.
|
|
22
|
+
|
|
23
|
+
- 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.
|
|
24
|
+
|
|
25
|
+
This also removes the fallback on msCrypto instead of the crypto API.
|
|
26
|
+
|
|
27
|
+
Browser tests are run in the first supported version of each supported browser and in the latest (as of this commit) version available on Browserstack.
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
- optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#597](https://github.com/uuidjs/uuid/issues/597)) ([3a033f6](https://github.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc))
|
|
32
|
+
- remove UMD build ([#645](https://github.com/uuidjs/uuid/issues/645)) ([e948a0f](https://github.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#620](https://github.com/uuidjs/uuid/issues/620)
|
|
33
|
+
- use native crypto.randomUUID when available ([#600](https://github.com/uuidjs/uuid/issues/600)) ([c9e076c](https://github.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4))
|
|
34
|
+
|
|
35
|
+
### Bug Fixes
|
|
36
|
+
|
|
37
|
+
- add Jest/jsdom compatibility ([#642](https://github.com/uuidjs/uuid/issues/642)) ([16f9c46](https://github.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd))
|
|
38
|
+
- change default export to named function ([#545](https://github.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://github.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a))
|
|
39
|
+
- handle error when parameter is not set in v3 and v5 ([#622](https://github.com/uuidjs/uuid/issues/622)) ([fcd7388](https://github.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091))
|
|
40
|
+
- run npm audit fix ([#644](https://github.com/uuidjs/uuid/issues/644)) ([04686f5](https://github.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353))
|
|
41
|
+
- upgrading from uuid3 broken link ([#568](https://github.com/uuidjs/uuid/issues/568)) ([1c849da](https://github.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6))
|
|
42
|
+
|
|
43
|
+
### build
|
|
44
|
+
|
|
45
|
+
- drop Node.js 8.x from babel transpile target ([#603](https://github.com/uuidjs/uuid/issues/603)) ([aa11485](https://github.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5))
|
|
46
|
+
- drop support for legacy browsers (IE11, Safari 10) ([#604](https://github.com/uuidjs/uuid/issues/604)) ([0f433e5](https://github.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148))
|
|
47
|
+
|
|
48
|
+
- drop node 10.x to upgrade dev dependencies ([#653](https://github.com/uuidjs/uuid/issues/653)) ([28a5712](https://github.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)), closes [#643](https://github.com/uuidjs/uuid/issues/643)
|
|
49
|
+
|
|
5
50
|
### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08)
|
|
6
51
|
|
|
7
52
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
-- This file is auto-generated from README_js.md. Changes should be made there.
|
|
3
3
|
-->
|
|
4
4
|
|
|
5
|
+
|
|
5
6
|
# uuid [](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)
|
|
6
7
|
|
|
7
8
|
For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
|
|
@@ -9,7 +10,7 @@ For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
|
|
|
9
10
|
- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs
|
|
10
11
|
- **Cross-platform** - Support for ...
|
|
11
12
|
- CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
|
|
12
|
-
-
|
|
13
|
+
- NodeJS 12+ ([LTS releases](https://github.com/nodejs/Release))
|
|
13
14
|
- Chrome, Safari, Firefox, Edge browsers
|
|
14
15
|
- Webpack and rollup.js module bundlers
|
|
15
16
|
- [React Native / Expo](#react-native--expo)
|
|
@@ -17,7 +18,9 @@ For the creation of [RFC4122](https://www.ietf.org/rfc/rfc4122.txt) UUIDs
|
|
|
17
18
|
- **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers
|
|
18
19
|
- **CLI** - Includes the [`uuid` command line](#command-line) utility
|
|
19
20
|
|
|
20
|
-
**Upgrading from `uuid@3
|
|
21
|
+
> **Note** Upgrading from `uuid@3`? Your code is probably okay, but check out [Upgrading From `uuid@3`](#upgrading-from-uuid3) for details.
|
|
22
|
+
|
|
23
|
+
> **Note** Only interested in creating a version 4 UUID? You might be able to use [`crypto.randomUUID()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID), eliminating the need to install this library.
|
|
21
24
|
|
|
22
25
|
## Quickstart
|
|
23
26
|
|
|
@@ -138,7 +141,7 @@ Create an RFC version 1 (timestamp) UUID
|
|
|
138
141
|
| [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) |
|
|
139
142
|
| [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff |
|
|
140
143
|
| [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) |
|
|
141
|
-
| [`options.nsecs`] | RFC "timestamp" field (`Number` of
|
|
144
|
+
| [`options.nsecs`] | RFC "timestamp" field (`Number` of nanoseconds to add to `msecs`, should be 0-10,000) |
|
|
142
145
|
| [`options.random`] | `Array` of 16 random bytes (0-255) |
|
|
143
146
|
| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) |
|
|
144
147
|
| [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |
|
|
@@ -458,5 +461,6 @@ const uuid = require('uuid'); // <== REMOVED!
|
|
|
458
461
|
|
|
459
462
|
This usage pattern was already discouraged in `uuid@3` and has been removed in `uuid@7`.
|
|
460
463
|
|
|
461
|
-
|
|
462
|
-
|
|
464
|
+
---
|
|
465
|
+
|
|
466
|
+
Markdown generated from [README_js.md](README_js.md) by <a href="https://github.com/broofa/runmd"><image height="12px" src="https://camo.githubusercontent.com/5c7c603cd1e6a43370b0a5063d457e0dabb74cf317adc7baba183acb686ee8d0/687474703a2f2f692e696d6775722e636f6d2f634a4b6f3662552e706e67" /></a>
|
|
@@ -23,7 +23,7 @@ for (let i = 0; i < 256; ++i) {
|
|
|
23
23
|
function unsafeStringify(arr, offset = 0) {
|
|
24
24
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
25
25
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
26
|
-
return
|
|
26
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function stringify(arr, offset = 0) {
|
|
@@ -13,7 +13,7 @@ for (let i = 0; i < 256; ++i) {
|
|
|
13
13
|
export function unsafeStringify(arr, offset = 0) {
|
|
14
14
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
15
15
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
16
|
-
return
|
|
16
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function stringify(arr, offset = 0) {
|
|
@@ -13,7 +13,7 @@ for (let i = 0; i < 256; ++i) {
|
|
|
13
13
|
export function unsafeStringify(arr, offset = 0) {
|
|
14
14
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
15
15
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
16
|
-
return
|
|
16
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
function stringify(arr, offset = 0) {
|
package/dist/stringify.js
CHANGED
|
@@ -23,7 +23,7 @@ for (let i = 0; i < 256; ++i) {
|
|
|
23
23
|
function unsafeStringify(arr, offset = 0) {
|
|
24
24
|
// Note: Be careful editing this code! It's been tuned for performance
|
|
25
25
|
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
26
|
-
return
|
|
26
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
function stringify(arr, offset = 0) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "uuid",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.1",
|
|
4
4
|
"description": "RFC4122 (v1, v4, and v5) UUIDs",
|
|
5
|
+
"funding": [
|
|
6
|
+
"https://github.com/sponsors/broofa",
|
|
7
|
+
"https://github.com/sponsors/ctavan"
|
|
8
|
+
],
|
|
5
9
|
"commitlint": {
|
|
6
10
|
"extends": [
|
|
7
11
|
"@commitlint/config-conventional"
|
|
@@ -71,7 +75,7 @@
|
|
|
71
75
|
"optional-dev-dependency": "2.0.1",
|
|
72
76
|
"prettier": "2.7.1",
|
|
73
77
|
"random-seed": "0.3.0",
|
|
74
|
-
"runmd": "1.3.
|
|
78
|
+
"runmd": "1.3.9",
|
|
75
79
|
"standard-version": "9.5.0"
|
|
76
80
|
},
|
|
77
81
|
"optionalDevDependencies": {
|
|
@@ -105,7 +109,7 @@
|
|
|
105
109
|
"prettier:fix": "prettier --write '**/*.{js,jsx,json,md}'",
|
|
106
110
|
"bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json",
|
|
107
111
|
"md": "runmd --watch --output=README.md README_js.md",
|
|
108
|
-
"docs": "( node --version | grep -q '
|
|
112
|
+
"docs": "( node --version | grep -q 'v18' ) && ( npm run build && npx runmd --output=README.md README_js.md )",
|
|
109
113
|
"docs:diff": "npm run docs && git diff --quiet README.md",
|
|
110
114
|
"build": "./scripts/build.sh",
|
|
111
115
|
"prepack": "npm run build",
|