Skip to content

Commit

Permalink
chore: add node 18 to ci and benchmark (#3843)
Browse files Browse the repository at this point in the history
* chore: add node 18 to ci and benchmark

* chore: remove v17 from ci

* fix: pass constraints to FindMyWay

* fix: bump eslint-config-n to v15

* test: adjust test to v18

* doc: update node v18

* update: remove constraints to fourOhFour

* update: add constraints until its not solved in find-my-way

* update: reset constraints fourOhFour
  • Loading branch information
RafaelGSS committed Apr 23, 2022
1 parent 031ef2e commit da8fafd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
outputs:
PR-BENCH-14: ${{ steps.benchmark-pr.outputs.BENCH_RESULT14 }}
PR-BENCH-16: ${{ steps.benchmark-pr.outputs.BENCH_RESULT16 }}
PR-BENCH-17: ${{ steps.benchmark-pr.outputs.BENCH_RESULT17 }}
PR-BENCH-18: ${{ steps.benchmark-pr.outputs.BENCH_RESULT18 }}
MAIN-BENCH-14: ${{ steps.benchmark-main.outputs.BENCH_RESULT14 }}
MAIN-BENCH-16: ${{ steps.benchmark-main.outputs.BENCH_RESULT16 }}
MAIN-BENCH-17: ${{ steps.benchmark-main.outputs.BENCH_RESULT17 }}
MAIN-BENCH-18: ${{ steps.benchmark-main.outputs.BENCH_RESULT18 }}
strategy:
matrix:
node-version: [14, 16, 17]
node-version: [14, 16, 18]
steps:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -81,9 +81,9 @@ jobs:
---
**Node**: 17
**PR**: ${{ needs.benchmark.outputs.PR-BENCH-17 }}
**MAIN**: ${{ needs.benchmark.outputs.MAIN-BENCH-17 }}
**Node**: 18
**PR**: ${{ needs.benchmark.outputs.PR-BENCH-18 }}
**MAIN**: ${{ needs.benchmark.outputs.MAIN-BENCH-18 }}
- uses: actions-ecosystem/action-remove-labels@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:

strategy:
matrix:
node-version: [14, 16, 17]
node-version: [14, 16, 18]
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
Expand Down
12 changes: 6 additions & 6 deletions docs/Reference/LTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ A "month" is defined as 30 consecutive days.
| :------ | :----------- | :-------------- | :------------------- |
| 1.0.0 | 2018-03-06 | 2019-09-01 | 6, 8, 9, 10, 11 |
| 2.0.0 | 2019-02-25 | 2021-01-31 | 6, 8, 10, 12, 14 |
| 3.0.0 | 2020-07-07 | TBD | 10, 12, 14, 16 |
| 4.0.0 | TBD | TBD | 14, 16 |
| 3.0.0 | 2020-07-07 | TBD | 10, 12, 14, 16, 18 |
| 4.0.0 | TBD | TBD | 14, 16, 18 |

### CI tested operating systems
<a id="supported-os"></a>
Expand All @@ -61,10 +61,10 @@ YAML workflow labels below:

| OS | YAML Workflow Label | Package Manager | Node.js |
|---------|------------------------|---------------------------|--------------|
| Linux | `ubuntu-latest` | npm | 14,16 |
| Linux | `ubuntu-18.04` | yarn,pnpm | 14,16 |
| Windows | `windows-latest` | npm | 14,16 |
| MacOS | `macos-latest` | npm | 14,16 |
| Linux | `ubuntu-latest` | npm | 14,16,18 |
| Linux | `ubuntu-18.04` | yarn,pnpm | 14,16,18 |
| Windows | `windows-latest` | npm | 14,16,18 |
| MacOS | `macos-latest` | npm | 14,16,18 |

Using [yarn](https://yarnpkg.com/) might require passing the `--ignore-engines`
flag.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
"eslint-config-standard": "^17.0.0-1",
"eslint-import-resolver-node": "^0.3.2",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-n": "^14.0.0",
"eslint-plugin-n": "^15.1.0",
"eslint-plugin-promise": "^6.0.0",
"fast-json-body": "^1.1.0",
"fast-json-stringify": "^3.0.0",
Expand Down
5 changes: 4 additions & 1 deletion test/listen.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const { test, before } = require('tap')
const dns = require('dns').promises
const dnsCb = require('dns')
const sget = require('simple-get').concat
const semver = require('semver')
const Fastify = require('..')

let localhost
Expand Down Expand Up @@ -371,7 +372,9 @@ test('addresses getter', async t => {
const localAddresses = await dns.lookup('localhost', { all: true })
for (const address of localAddresses) {
address.port = port
address.family = 'IPv' + address.family
if (semver.lt(process.versions.node, '18.0.0')) {
address.family = 'IPv' + address.family
}
}
localAddresses.sort((a, b) => a.address.localeCompare(b.address))
t.same(app.addresses().sort((a, b) => a.address.localeCompare(b.address)), localAddresses, 'after listen')
Expand Down

0 comments on commit da8fafd

Please sign in to comment.