Skip to content

Commit 343e031

Browse files
authoredNov 6, 2021
update all dependencies to @latest, drop node@8 CI testing, add node@16 (#585)
update!: update packages to latest, drop node 8 support, add node 16
1 parent 16e9cc9 commit 343e031

16 files changed

+3957
-8295
lines changed
 

‎.babelrc.js

-15
This file was deleted.

‎.eslintrc.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"globals": {
1212
"msCrypto": true
1313
},
14-
"parser": "babel-eslint",
14+
"parser": "@babel/eslint-parser",
1515
"rules": {
1616
"no-var": ["error"]
1717
}

‎.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
node-version: [8.x, 10.x, 12.x, 14.x]
12+
node-version: [10.x, 12.x, 14.x, 16.x]
1313

1414
steps:
1515
- uses: actions/checkout@v1

‎README.md

+3-33
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs
99
- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs
1010
- **Cross-platform** - Support for ...
1111
- CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
12-
- Node 8, 10, 12, 14
12+
- Node 10, 12, 14, 16
1313
- Chrome, Safari, Firefox, Edge, IE 11 browsers
1414
- Webpack and rollup.js module bundlers
1515
- [React Native / Expo](#react-native--expo)
@@ -122,22 +122,7 @@ Example:
122122
import { stringify as uuidStringify } from 'uuid';
123123

124124
const uuidBytes = [
125-
0x6e,
126-
0xc0,
127-
0xbd,
128-
0x7f,
129-
0x11,
130-
0xc0,
131-
0x43,
132-
0xda,
133-
0x97,
134-
0x5e,
135-
0x2a,
136-
0x8a,
137-
0xd9,
138-
0xeb,
139-
0xae,
140-
0x0b,
125+
0x6e, 0xc0, 0xbd, 0x7f, 0x11, 0xc0, 0x43, 0xda, 0x97, 0x5e, 0x2a, 0x8a, 0xd9, 0xeb, 0xae, 0x0b,
141126
];
142127

143128
uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'
@@ -223,22 +208,7 @@ import { v4 as uuidv4 } from 'uuid';
223208

224209
const v4options = {
225210
random: [
226-
0x10,
227-
0x91,
228-
0x56,
229-
0xbe,
230-
0xc4,
231-
0xfb,
232-
0xc1,
233-
0xea,
234-
0x71,
235-
0xb4,
236-
0xef,
237-
0xe1,
238-
0x67,
239-
0x1c,
240-
0x58,
241-
0x36,
211+
0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36,
242212
],
243213
};
244214
uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836'

‎README_js.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs
2121
- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs
2222
- **Cross-platform** - Support for ...
2323
- CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds)
24-
- Node 8, 10, 12, 14
24+
- Node 10, 12, 14, 16
2525
- Chrome, Safari, Firefox, Edge, IE 11 browsers
2626
- Webpack and rollup.js module bundlers
2727
- [React Native / Expo](#react-native--expo)

‎babel.config.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"presets": [],
3+
"plugins": [],
4+
"env": {
5+
"commonjs": {
6+
"presets": [["@babel/preset-env", { "targets": { "node": "8" }, "modules": "commonjs" }]]
7+
},
8+
"esmBrowser": {
9+
"presets": [["@babel/preset-env", { "modules": false }]]
10+
},
11+
"esmNode": {
12+
"presets": [["@babel/preset-env", { "targets": { "node": "8" }, "modules": false }]]
13+
}
14+
}
15+
}

‎examples/benchmark/benchmark.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,7 @@ function testParseAndStringify() {
1919
});
2020

2121
const BYTES = [
22-
0x0f,
23-
0x5a,
24-
0xbc,
25-
0xd1,
26-
0xc1,
27-
0x94,
28-
0x47,
29-
0xf3,
30-
0x90,
31-
0x5b,
32-
0x2d,
33-
0xf7,
34-
0x26,
35-
0x3a,
36-
0x08,
37-
0x4b,
22+
0x0f, 0x5a, 0xbc, 0xd1, 0xc1, 0x94, 0x47, 0xf3, 0x90, 0x5b, 0x2d, 0xf7, 0x26, 0x3a, 0x08, 0x4b,
3823
];
3924

4025
suite

‎package-lock.json

+3,906-8,092
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+20-21
Original file line numberDiff line numberDiff line change
@@ -45,33 +45,32 @@
4545
"wrapper.mjs"
4646
],
4747
"devDependencies": {
48-
"@babel/cli": "7.11.6",
49-
"@babel/core": "7.11.6",
50-
"@babel/preset-env": "7.11.5",
51-
"@commitlint/cli": "11.0.0",
52-
"@commitlint/config-conventional": "11.0.0",
53-
"@rollup/plugin-node-resolve": "9.0.0",
54-
"babel-eslint": "10.1.0",
55-
"bundlewatch": "0.3.1",
56-
"eslint": "7.10.0",
57-
"eslint-config-prettier": "6.12.0",
58-
"eslint-config-standard": "14.1.1",
59-
"eslint-plugin-import": "2.22.1",
48+
"@babel/cli": "7.15.7",
49+
"@babel/core": "7.15.8",
50+
"@babel/eslint-parser": "7.15.8",
51+
"@babel/preset-env": "7.15.8",
52+
"@commitlint/cli": "13.2.1",
53+
"@commitlint/config-conventional": "13.2.0",
54+
"@rollup/plugin-node-resolve": "13.0.6",
55+
"bundlewatch": "0.3.2",
56+
"eslint": "8.1.0",
57+
"eslint-config-prettier": "8.3.0",
58+
"eslint-config-standard": "16.0.3",
59+
"eslint-plugin-import": "2.25.2",
6060
"eslint-plugin-node": "11.1.0",
61-
"eslint-plugin-prettier": "3.1.4",
62-
"eslint-plugin-promise": "4.2.1",
63-
"eslint-plugin-standard": "4.0.1",
64-
"husky": "4.3.0",
65-
"jest": "25.5.4",
66-
"lint-staged": "10.4.0",
61+
"eslint-plugin-prettier": "4.0.0",
62+
"eslint-plugin-promise": "5.1.1",
63+
"husky": "7.0.4",
64+
"jest": "27.3.1",
65+
"lint-staged": "11.2.3",
6766
"npm-run-all": "4.1.5",
6867
"optional-dev-dependency": "2.0.1",
69-
"prettier": "2.1.2",
68+
"prettier": "2.4.1",
7069
"random-seed": "0.3.0",
71-
"rollup": "2.28.2",
70+
"rollup": "2.58.0",
7271
"rollup-plugin-terser": "7.0.2",
7372
"runmd": "1.3.2",
74-
"standard-version": "9.0.0"
73+
"standard-version": "9.3.2"
7574
},
7675
"optionalDevDependencies": {
7776
"@wdio/browserstack-service": "6.4.0",

‎test/browser/browser.spec.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
/* global browser:false, $:false, $$:false */
22

3-
const v1Regex = new RegExp(
4-
/^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i
5-
);
6-
const v4Regex = new RegExp(
7-
/^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i
8-
);
3+
const v1Regex = /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;
4+
const v4Regex = /^[0-9A-F]{8}-[0-9A-F]{4}-4[0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i;
95

106
const v1 = (result) => expect(result).toMatch(v1Regex);
117
const v4 = (result) => expect(result).toMatch(v4Regex);

‎test/unit/parse.test.js

+1-15
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,7 @@ describe('parse', () => {
1818
assert.deepStrictEqual(
1919
parse('0f5abcd1-c194-47f3-905b-2df7263a084b'),
2020
Uint8Array.from([
21-
0x0f,
22-
0x5a,
23-
0xbc,
24-
0xd1,
25-
0xc1,
26-
0x94,
27-
0x47,
28-
0xf3,
29-
0x90,
30-
0x5b,
31-
0x2d,
32-
0xf7,
33-
0x26,
34-
0x3a,
35-
0x08,
21+
0x0f, 0x5a, 0xbc, 0xd1, 0xc1, 0x94, 0x47, 0xf3, 0x90, 0x5b, 0x2d, 0xf7, 0x26, 0x3a, 0x08,
3622
0x4b,
3723
])
3824
);

‎test/unit/stringify.test.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,7 @@ import assert from 'assert';
22
import stringify from '../../src/stringify.js';
33

44
const BYTES = [
5-
0x0f,
6-
0x5a,
7-
0xbc,
8-
0xd1,
9-
0xc1,
10-
0x94,
11-
0x47,
12-
0xf3,
13-
0x90,
14-
0x5b,
15-
0x2d,
16-
0xf7,
17-
0x26,
18-
0x3a,
19-
0x08,
20-
0x4b,
5+
0x0f, 0x5a, 0xbc, 0xd1, 0xc1, 0x94, 0x47, 0xf3, 0x90, 0x5b, 0x2d, 0xf7, 0x26, 0x3a, 0x08, 0x4b,
216
];
227

238
describe('stringify', () => {

‎test/unit/v1-random.test.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,7 @@ import v1 from '../../src/v1.js';
55
// initialize the v1 clockseq with controlled random data.
66
describe('v1', () => {
77
const randomBytesFixture = [
8-
0x10,
9-
0x91,
10-
0x56,
11-
0xbe,
12-
0xc4,
13-
0xfb,
14-
0xc1,
15-
0xea,
16-
0x71,
17-
0xb4,
18-
0xef,
19-
0xe1,
20-
0x67,
21-
0x1c,
22-
0x58,
23-
0x36,
8+
0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36,
249
];
2510

2611
test('explicit options.random produces expected id', () => {

‎test/unit/v1-rng.test.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,7 @@ import v1 from '../../src/v1.js';
55
// initialize the v1 clockseq with controlled random data.
66
describe('v1', () => {
77
const randomBytesFixture = [
8-
0x10,
9-
0x91,
10-
0x56,
11-
0xbe,
12-
0xc4,
13-
0xfb,
14-
0xc1,
15-
0xea,
16-
0x71,
17-
0xb4,
18-
0xef,
19-
0xe1,
20-
0x67,
21-
0x1c,
22-
0x58,
23-
0x36,
8+
0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36,
249
];
2510

2611
test('explicit options.random produces expected id', () => {

‎test/unit/v35.test.js

+2-30
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,7 @@ describe('v35', () => {
127127
let buf = new Array(16);
128128

129129
const testBuf = [
130-
0x91,
131-
0x25,
132-
0xa8,
133-
0xdc,
134-
0x52,
135-
0xee,
136-
0x36,
137-
0x5b,
138-
0xa5,
139-
0xaa,
140-
0x81,
141-
0xb0,
142-
0xb3,
143-
0x68,
144-
0x1c,
130+
0x91, 0x25, 0xa8, 0xdc, 0x52, 0xee, 0x36, 0x5b, 0xa5, 0xaa, 0x81, 0xb0, 0xb3, 0x68, 0x1c,
145131
0xf6,
146132
];
147133

@@ -223,21 +209,7 @@ describe('v35', () => {
223209
let buf = new Array(16);
224210

225211
const testBuf = [
226-
0xfd,
227-
0xda,
228-
0x76,
229-
0x5f,
230-
0xfc,
231-
0x57,
232-
0x56,
233-
0x04,
234-
0xa2,
235-
0x69,
236-
0x52,
237-
0xa7,
238-
0xdf,
239-
0x81,
240-
0x64,
212+
0xfd, 0xda, 0x76, 0x5f, 0xfc, 0x57, 0x56, 0x04, 0xa2, 0x69, 0x52, 0xa7, 0xdf, 0x81, 0x64,
241213
0xec,
242214
];
243215

‎test/unit/v4.test.js

+1-16
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,7 @@ import v4 from '../../src/v4.js';
33

44
describe('v4', () => {
55
const randomBytesFixture = [
6-
0x10,
7-
0x91,
8-
0x56,
9-
0xbe,
10-
0xc4,
11-
0xfb,
12-
0xc1,
13-
0xea,
14-
0x71,
15-
0xb4,
16-
0xef,
17-
0xe1,
18-
0x67,
19-
0x1c,
20-
0x58,
21-
0x36,
6+
0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36,
227
];
238

249
const expectedBytes = [16, 145, 86, 190, 196, 251, 65, 234, 177, 180, 239, 225, 103, 28, 88, 54];

0 commit comments

Comments
 (0)
Please sign in to comment.