Skip to content

Commit

Permalink
feat: Support Node v20
Browse files Browse the repository at this point in the history
  • Loading branch information
buffcode committed Jan 25, 2024
1 parent 046b5ac commit d84e5d6
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['14', '16', '18']
node-version: ['14', '16', '18', '20']
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -27,7 +27,7 @@ jobs:
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.node-version }}
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: yarn install
- name: Build
run: yarn build
- name: Run examples
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile
- run: yarn install
- run: yarn build
- run: npm publish
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['16']
node-version: ['20']
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
Expand All @@ -27,6 +27,6 @@ jobs:
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.node-version }}
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile
run: yarn install
- name: Check code style
run: yarn prettier:lint
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
"description": "Fetches the current time from NTP servers and returns offset information",
"main": "dist/index.js",
"dependencies": {
"ntp-packet-parser": "^0.3.0"
"ntp-packet-parser": "^0.4.0"
},
"devDependencies": {
"@types/node": "^15.3.0",
"@types/node": "^14 || ^16 || ^18 || ^20",
"prettier": "^3.0.2",
"ts-node": "^10.4.0",
"typescript": "^5.0.2"
Expand Down Expand Up @@ -43,6 +43,6 @@
"trailingComma": "es5"
},
"engines": {
"node": "^14 || ^16 || ^18"
"node": "^14 || ^16 || ^18 || ^20"
}
}
23 changes: 15 additions & 8 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,12 @@
resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e"
integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA==

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

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

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

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

undici-types@~5.26.4:
version "5.26.5"
resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617"
integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==

v8-compile-cache-lib@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf"
Expand Down

0 comments on commit d84e5d6

Please sign in to comment.