Skip to content

Commit 196a100

Browse files
authored
add support for node 18 (#21)
1 parent c2be90b commit 196a100

File tree

4 files changed

+2127
-25
lines changed

4 files changed

+2127
-25
lines changed

.github/workflows/ci.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
strategy:
2323
matrix:
2424
os: [ ubuntu-latest ]
25-
node-version: [ 6.x, 8.x, 10.x, 12.x, 14.x, 16.x, 17.x ]
25+
node-version: [ 6.x, 8.x, 10.x, 12.x, 14.x, 16.x, 18.x ]
2626

2727
steps:
2828

@@ -45,23 +45,23 @@ jobs:
4545
with:
4646
node-version: ${{ matrix.node-version }}
4747

48-
- name: Get npm cache directory
49-
id: npm-cache-dir
48+
- name: Get yarn cache directory
49+
id: yarn-cache-dir
5050
run: |
51-
echo "::set-output name=dir::$(npm config get cache)"
51+
echo "::set-output name=dir::$(yarn cache dir)"
5252
5353
- uses: actions/cache@v2
54-
id: npm-cache
54+
id: yarn-cache
5555
with:
56-
path: ${{ steps.npm-cache-dir.outputs.dir }}
57-
key: ${{ matrix.os }}-${{ matrix.node-version }}-node
56+
path: ${{ steps.yarn-cache-dir.outputs.dir }}
57+
key: ${{ matrix.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
5858
restore-keys: |
59-
${{ matrix.os }}-${{ matrix.node-version }}-node
59+
${{ matrix.os }}-${{ matrix.node-version }}-yarn-
6060
6161
- name: Install dependencies and build
6262
run: |
63-
npm install
64-
npm run build
63+
yarn install --frozen-lockfile
64+
yarn build
6565
6666
- name: Snyk security check
6767
if: matrix.node-version == env.PRIMARY_NODE_VERSION && matrix.os == env.PRIMARY_OS
@@ -75,11 +75,11 @@ jobs:
7575
env:
7676
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
7777
with:
78-
coverageCommand: npm run cover
78+
coverageCommand: yarn cover
7979

8080
- name: Run unit tests
8181
if: "!(matrix.node-version == env.PRIMARY_NODE_VERSION && matrix.os == env.PRIMARY_OS)"
82-
run: npm run mocha
82+
run: yarn mocha
8383

8484
publish_version:
8585
name: Publish
@@ -105,23 +105,23 @@ jobs:
105105
node-version: ${{ matrix.node-version }}
106106
registry-url: ${{ env.REGISTRY }}
107107

108-
- name: Get npm cache directory
109-
id: npm-cache-dir
108+
- name: Get yarn cache directory
109+
id: yarn-cache-dir
110110
run: |
111-
echo "::set-output name=dir::$(npm config get cache)"
111+
echo "::set-output name=dir::$(yarn cache dir)"
112112
113113
- uses: actions/cache@v2
114-
id: npm-cache
114+
id: yarn-cache
115115
with:
116-
path: ${{ steps.npm-cache-dir.outputs.dir }}
117-
key: ${{ matrix.os }}-${{ matrix.node-version }}-node
116+
path: ${{ steps.yarn-cache-dir.outputs.dir }}
117+
key: ${{ matrix.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
118118
restore-keys: |
119-
${{ matrix.os }}-${{ matrix.node-version }}-node
119+
${{ matrix.os }}-${{ matrix.node-version }}-yarn-
120120
121121
- name: Install dependencies and build
122122
run: |
123-
npm install
124-
npm run build
123+
yarn install --frozen-lockfile
124+
yarn build
125125
126126
- name: Publish
127127
uses: JS-DevTools/npm-publish@v1

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44
## Development
55
- nothing yet
66

7+
## [v3.1.3](https://github.com/regevbr/busywait.js/compare/v3.1.2...v3.1.3)
8+
### Fixed
9+
- Support for node 18
10+
711
## [v3.1.2](https://github.com/regevbr/busywait.js/compare/v3.1.1...v3.1.2)
812
### Fixed
913
- Support for node 17

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "busywait",
3-
"version": "3.1.2",
3+
"version": "3.1.3",
44
"description": "Async busy wait",
55
"main": "dist/index.js",
66
"types": "dist/index.d.ts",
@@ -38,7 +38,7 @@
3838
"backoff-strategy"
3939
],
4040
"engines": {
41-
"node": "^6 || ^8 || ^10 || ^12 || ^14 || ^16 || ^17"
41+
"node": "^6 || ^8 || ^10 || ^12 || ^14 || ^16 || ^18"
4242
},
4343
"files": [
4444
"/dist/*.d.ts",
@@ -67,8 +67,8 @@
6767
"mocha-param": "^2.0.1",
6868
"sinon": "^7.3.2",
6969
"sinon-chai": "^3.6.0",
70-
"ts-node": "^9.1.1",
70+
"ts-node": "^8.10.2",
7171
"tslint": "^6.1.3",
72-
"typescript": "^4.2.4"
72+
"typescript": "^4.8.4"
7373
}
7474
}

0 commit comments

Comments
 (0)