Skip to content

Commit

Permalink
Add support for Node.js 17.x
Browse files Browse the repository at this point in the history
  • Loading branch information
bkimminich committed Jan 9, 2022
1 parent ac418f6 commit cfff3d4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -55,7 +55,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [12, 14, 16]
node-version: [12, 14, 16, 17]
steps:
- name: "Check out Git repository"
if: github.repository == 'juice-shop/juice-shop' || github.repository != 'juice-shop/juice-shop' && matrix.os == 'ubuntu-latest' && matrix.node-version == '14'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [12, 14, 16]
node-version: [12, 14, 16, 17]
steps:
- name: "Check out Git repository"
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f #v2: v2.3.4 available
Expand Down
7 changes: 4 additions & 3 deletions README.md
Expand Up @@ -204,12 +204,13 @@ offered accordingly.

| node.js | Supported | Tested | [Packaged Distributions](#packaged-distributions) | [Docker images](#docker-container) from `master` | [Docker images](#docker-container) from `develop` |
|:--------|:---------------------|:-------------------|:--------------------------------------------------|:--------------------------------------------------------|:----------------------------------------------------------|
| 17.x | :x: | :x: | | | |
| 18.x | :x: | :x: | | | |
| 17.x | (:heavy_check_mark:) | :x: | | | |
| 16.x | :heavy_check_mark: | :heavy_check_mark: | Windows (`x64`), MacOS (`x64`), Linux (`x64`) | | |
| 15.x | (:heavy_check_mark:) | :x: | | | |
| 14.x | :heavy_check_mark: | :heavy_check_mark: | Windows (`x64`), MacOS (`x64`), Linux (`x64`) | | |
| 14.x | :heavy_check_mark: | :heavy_check_mark: | Windows (`x64`), MacOS (`x64`), Linux (`x64`) | `latest` (`linux/amd64`, `linux/arm/v7`, `linux/arm64`) | `snapshot` (`linux/amd64`, `linux/arm/v7`, `linux/arm64`) |
| 13.x | (:heavy_check_mark:) | :x: | | | |
| 12.x | :heavy_check_mark: | :heavy_check_mark: | Windows (`x64`), MacOS (`x64`), Linux (`x64`) | `latest` (`linux/amd64`, `linux/arm/v7`, `linux/arm64`) | `snapshot` (`linux/amd64`, `linux/arm/v7`, `linux/arm64`) |
| 12.x | :heavy_check_mark: | :heavy_check_mark: | Windows (`x64`), MacOS (`x64`), Linux (`x64`) | | |
| <12.x | :x: | :x: | | | |

Juice Shop is automatically tested _only on the latest `.x` minor version_ of each node.js version mentioned above!
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -253,7 +253,7 @@
"webdriver-manager": "^13.0.0"
},
"engines": {
"node": "12 - 16"
"node": "12 - 17"
},
"os": [
"win32",
Expand Down
7 changes: 4 additions & 3 deletions test/server/preconditionValidationSpec.ts
Expand Up @@ -16,12 +16,13 @@ describe('preconditionValidation', () => {
describe('checkIfRunningOnSupportedNodeVersion', () => {
const supportedVersion = require('./../../package.json').engines.node

it('should define the supported semver range as 12 - 16', () => {
expect(supportedVersion).to.equal('12 - 16')
it('should define the supported semver range as 12 - 17', () => {
expect(supportedVersion).to.equal('12 - 17')
expect(semver.validRange(supportedVersion)).to.not.equal(null)
})

it('should accept a supported version', () => {
expect(checkIfRunningOnSupportedNodeVersion('17.3.0')).to.equal(true)
expect(checkIfRunningOnSupportedNodeVersion('16.10.0')).to.equal(true)
expect(checkIfRunningOnSupportedNodeVersion('15.9.0')).to.equal(true)
expect(checkIfRunningOnSupportedNodeVersion('14.0.0')).to.equal(true)
Expand All @@ -30,7 +31,7 @@ describe('preconditionValidation', () => {
})

it('should fail for an unsupported version', () => {
expect(checkIfRunningOnSupportedNodeVersion('17.0.0')).to.equal(false)
expect(checkIfRunningOnSupportedNodeVersion('18.0.0')).to.equal(false)
expect(checkIfRunningOnSupportedNodeVersion('11.14.0')).to.equal(false)
expect(checkIfRunningOnSupportedNodeVersion('10.20.0')).to.equal(false)
expect(checkIfRunningOnSupportedNodeVersion('9.11.2')).to.equal(false)
Expand Down

0 comments on commit cfff3d4

Please sign in to comment.