Skip to content

Commit 477559c

Browse files
authored
chore: use Node.js 16.x for building package and tests (#601)
Also upgrade `@wdio@6` -> `@wdio@7` since `@wdio@6` doesn't work with Node.js 16.
1 parent c9e076c commit 477559c

38 files changed

+19227
-6147
lines changed

.eslintignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
!.babelrc.js
2-
node_modules/
2+
.local/
33
dist/
4+
node_modules/

.github/workflows/browser.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
- uses: actions/checkout@v1
1313
with:
1414
fetch-depth: 10
15-
- name: Use Node.js 12.x
15+
- name: Use Node.js 16.x
1616
uses: actions/setup-node@v1
1717
with:
18-
node-version: 12.x
18+
node-version: 16.x
1919
- run: npm install
2020
- name: Test Browser
2121
run: npm run test:browser

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ jobs:
1515
- uses: actions/checkout@v1
1616
with:
1717
fetch-depth: 10
18-
- name: Use Node.js 12.x to build
18+
- name: Use Node.js 16.x to build
1919
uses: actions/setup-node@v1
2020
with:
21-
node-version: 12.x
21+
node-version: 16.x
2222
- run: npm install
2323
- run: npm run build
2424
- run: rm -rf node_modules
@@ -31,14 +31,14 @@ jobs:
3131
env:
3232
CI: true
3333
- run: npm run lint
34-
if: matrix.node-version == '12.x'
34+
if: matrix.node-version == '16.x'
3535
- run: npm run docs:diff
36-
if: matrix.node-version == '12.x'
36+
if: matrix.node-version == '16.x'
3737
- run: npm run bundlewatch
38-
if: matrix.node-version == '12.x'
38+
if: matrix.node-version == '16.x'
3939
env:
4040
BUNDLEWATCH_GITHUB_TOKEN: ${{ secrets.BUNDLEWATCH_GITHUB_TOKEN }}
4141
- run: npm run test:node
42-
if: matrix.node-version == '12.x' || matrix.node-version == '14.x'
42+
if: matrix.node-version >= '12.x'
4343
- run: npm run test:pack
44-
if: matrix.node-version == '14.x'
44+
if: matrix.node-version >= '12.x'

.local/dist

Lines changed: 0 additions & 1 deletion
This file was deleted.

.local/package.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

.local/uuid/dist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../dist

.local/uuid/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../package.json

.local/uuid/v1.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../v1.js

.local/uuid/v3.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../v3.js

.local/uuid/v4.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../v4.js

.local/uuid/v5.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../v5.js

.local/uuid/wrapper.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../wrapper.mjs

.local/v1.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

.local/v3.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

.local/v4.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

.local/v5.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

.local/wrapper.mjs

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
.local/
12
dist/
23
node_modules/
34
README.md

README_js.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ require('crypto').randomFillSync = function (a) {
1212
for (let i = 0; i < 16; i++) a[i] = (seed = (seed * 0x41a7) & 0x7fffffff) & 0xff;
1313
return a;
1414
};
15+
16+
// Prevent usage of native randomUUID implementation to ensure deterministic UUIDs
17+
require('crypto').randomUUID = undefined;
1518
```
1619

1720
# uuid [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)

examples/benchmark/package-lock.json

Lines changed: 109 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/benchmark/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"test": "node benchmark.js"
77
},
88
"dependencies": {
9-
"uuid": "file:../../.local"
9+
"uuid": "file:../../.local/uuid"
1010
},
1111
"devDependencies": {
1212
"benchmark": "^2.1.4"

examples/browser-esmodules/package-lock.json

Lines changed: 78 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/browser-esmodules/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"start": "npm run build && npx http-server . -o"
88
},
99
"dependencies": {
10-
"uuid": "file:../../.local"
10+
"uuid": "file:../../.local/uuid"
1111
}
1212
}

0 commit comments

Comments
 (0)