Skip to content

Commit

Permalink
add support for node 18 (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
regevbr authored Oct 13, 2022
1 parent c2be90b commit 196a100
Show file tree
Hide file tree
Showing 4 changed files with 2,127 additions and 25 deletions.
42 changes: 21 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest ]
node-version: [ 6.x, 8.x, 10.x, 12.x, 14.x, 16.x, 17.x ]
node-version: [ 6.x, 8.x, 10.x, 12.x, 14.x, 16.x, 18.x ]

steps:

Expand All @@ -45,23 +45,23 @@ jobs:
with:
node-version: ${{ matrix.node-version }}

- name: Get npm cache directory
id: npm-cache-dir
- name: Get yarn cache directory
id: yarn-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: npm-cache
id: yarn-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ matrix.os }}-${{ matrix.node-version }}-node
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ matrix.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.node-version }}-node
${{ matrix.os }}-${{ matrix.node-version }}-yarn-
- name: Install dependencies and build
run: |
npm install
npm run build
yarn install --frozen-lockfile
yarn build
- name: Snyk security check
if: matrix.node-version == env.PRIMARY_NODE_VERSION && matrix.os == env.PRIMARY_OS
Expand All @@ -75,11 +75,11 @@ jobs:
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: npm run cover
coverageCommand: yarn cover

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

publish_version:
name: Publish
Expand All @@ -105,23 +105,23 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: ${{ env.REGISTRY }}

- name: Get npm cache directory
id: npm-cache-dir
- name: Get yarn cache directory
id: yarn-cache-dir
run: |
echo "::set-output name=dir::$(npm config get cache)"
echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: npm-cache
id: yarn-cache
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ matrix.os }}-${{ matrix.node-version }}-node
path: ${{ steps.yarn-cache-dir.outputs.dir }}
key: ${{ matrix.os }}-${{ matrix.node-version }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.node-version }}-node
${{ matrix.os }}-${{ matrix.node-version }}-yarn-
- name: Install dependencies and build
run: |
npm install
npm run build
yarn install --frozen-lockfile
yarn build
- name: Publish
uses: JS-DevTools/npm-publish@v1
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
## Development
- nothing yet

## [v3.1.3](https://github.com/regevbr/busywait.js/compare/v3.1.2...v3.1.3)
### Fixed
- Support for node 18

## [v3.1.2](https://github.com/regevbr/busywait.js/compare/v3.1.1...v3.1.2)
### Fixed
- Support for node 17
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "busywait",
"version": "3.1.2",
"version": "3.1.3",
"description": "Async busy wait",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -38,7 +38,7 @@
"backoff-strategy"
],
"engines": {
"node": "^6 || ^8 || ^10 || ^12 || ^14 || ^16 || ^17"
"node": "^6 || ^8 || ^10 || ^12 || ^14 || ^16 || ^18"
},
"files": [
"/dist/*.d.ts",
Expand Down Expand Up @@ -67,8 +67,8 @@
"mocha-param": "^2.0.1",
"sinon": "^7.3.2",
"sinon-chai": "^3.6.0",
"ts-node": "^9.1.1",
"ts-node": "^8.10.2",
"tslint": "^6.1.3",
"typescript": "^4.2.4"
"typescript": "^4.8.4"
}
}
Loading

0 comments on commit 196a100

Please sign in to comment.