Skip to content

Commit d84e5d6

Browse files
committed
feat: Support Node v20
1 parent 046b5ac commit d84e5d6

File tree

5 files changed

+24
-17
lines changed

5 files changed

+24
-17
lines changed

.github/workflows/nodejs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: ['14', '16', '18']
14+
node-version: ['14', '16', '18', '20']
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Use Node.js ${{ matrix.node-version }}
@@ -27,7 +27,7 @@ jobs:
2727
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.node-version }}
2828
- name: Install dependencies
2929
if: steps.yarn-cache.outputs.cache-hit != 'true'
30-
run: yarn install --frozen-lockfile
30+
run: yarn install
3131
- name: Build
3232
run: yarn build
3333
- name: Run examples

.github/workflows/npm-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
- uses: actions/checkout@v2
1313
- uses: actions/setup-node@v2
1414
with:
15-
node-version: '14'
15+
node-version: '20'
1616
registry-url: 'https://registry.npmjs.org'
17-
- run: yarn install --frozen-lockfile
17+
- run: yarn install
1818
- run: yarn build
1919
- run: npm publish
2020
env:

.github/workflows/prettier.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
node-version: ['16']
14+
node-version: ['20']
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Use Node.js ${{ matrix.node-version }}
@@ -27,6 +27,6 @@ jobs:
2727
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.node-version }}
2828
- name: Install dependencies
2929
if: steps.yarn-cache.outputs.cache-hit != 'true'
30-
run: yarn install --frozen-lockfile
30+
run: yarn install
3131
- name: Check code style
3232
run: yarn prettier:lint

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"description": "Fetches the current time from NTP servers and returns offset information",
55
"main": "dist/index.js",
66
"dependencies": {
7-
"ntp-packet-parser": "^0.3.0"
7+
"ntp-packet-parser": "^0.4.0"
88
},
99
"devDependencies": {
10-
"@types/node": "^15.3.0",
10+
"@types/node": "^14 || ^16 || ^18 || ^20",
1111
"prettier": "^3.0.2",
1212
"ts-node": "^10.4.0",
1313
"typescript": "^5.0.2"
@@ -43,6 +43,6 @@
4343
"trailingComma": "es5"
4444
},
4545
"engines": {
46-
"node": "^14 || ^16 || ^18"
46+
"node": "^14 || ^16 || ^18 || ^20"
4747
}
4848
}

yarn.lock

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,12 @@
4747
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e"
4848
integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==
4949

50-
"@types/node@^15.3.0":
51-
version "15.3.0"
52-
resolved "https://registry.yarnpkg.com/@types/node/-/node-15.3.0.tgz#d6fed7d6bc6854306da3dea1af9f874b00783e26"
53-
integrity sha512-8/bnjSZD86ZfpBsDlCIkNXIvm+h6wi9g7IqL+kmFkQ+Wvu3JrasgLElfiPgoo8V8vVfnEi0QVS12gbl94h9YsQ==
50+
"@types/node@^14 || ^16 || ^18 || ^20":
51+
version "20.11.6"
52+
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.6.tgz#6adf4241460e28be53836529c033a41985f85b6e"
53+
integrity sha512-+EOokTnksGVgip2PbYbr3xnR7kZigh4LbybAfBAw5BpnQ+FqBYUsvCEjYd70IXKlbohQ64mzEYmMtlWUY8q//Q==
54+
dependencies:
55+
undici-types "~5.26.4"
5456

5557
acorn-walk@^8.1.1:
5658
version "8.2.0"
@@ -82,10 +84,10 @@ make-error@^1.1.1:
8284
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
8385
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
8486

85-
ntp-packet-parser@^0.3.0:
86-
version "0.3.1"
87-
resolved "https://registry.yarnpkg.com/ntp-packet-parser/-/ntp-packet-parser-0.3.1.tgz#202c7e255bbef87d8fa98d71ba90a5d4f9cafd6d"
88-
integrity sha512-bzg5oAy4zNrsyFkGPBNCG2EY63mTFOVdndWpakePs37oSZgaKe+l9HuVGn9oR4IfYcp0d9vYXVPDY36rW8CwTQ==
87+
ntp-packet-parser@^0.4.0:
88+
version "0.4.1"
89+
resolved "https://registry.yarnpkg.com/ntp-packet-parser/-/ntp-packet-parser-0.4.1.tgz#5fe25943ce771375ca07980b3f895002ac965b7b"
90+
integrity sha512-RT1bKDr0VMg+BmyTo/aKctSHGPyLRa0ITIwMabJiatZQydkcwjYPO13OqUDeyyAWV4khwjxZ4WC1XdaQD7Zpxg==
8991

9092
prettier@^3.0.2:
9193
version "3.2.4"
@@ -116,6 +118,11 @@ typescript@^5.0.2:
116118
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
117119
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
118120

121+
undici-types@~5.26.4:
122+
version "5.26.5"
123+
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
124+
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==
125+
119126
v8-compile-cache-lib@^3.0.1:
120127
version "3.0.1"
121128
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"

0 commit comments

Comments
 (0)