From 4426ebbc8505fc848be6a578434a7b739e62e0e3 Mon Sep 17 00:00:00 2001 From: William Killerud Date: Fri, 1 Mar 2024 13:57:39 +0100 Subject: [PATCH] chore: update GHA versions, tap (#285) * chore: update versions in workflows * chore: test update to tap 18 --- .github/workflows/publish.yml | 12 ++++++------ .github/workflows/test.yml | 6 +++--- .gitignore | 3 ++- package.json | 4 ++-- test/helpers/config-store.test.js | 2 +- test/helpers/local-assets.test.js | 2 +- 6 files changed, 15 insertions(+), 14 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 98a2e2fe..80746aaa 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,11 +13,11 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 16.x + node-version: 20 - name: install dependencies run: | npm install @@ -53,11 +53,11 @@ jobs: needs: [test] steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: - node-version: 16.x + node-version: 20 - name: npm install run: | npm install diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ba90e1f9..1603a39c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,11 +8,11 @@ jobs: strategy: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] - node-version: [14.x, 16.x] + node-version: [18, 20] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} - name: install dependencies diff --git a/.gitignore b/.gitignore index 0aa05a83..ee3f6f35 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ tmp/**/* coverage .vscode eik.json -types \ No newline at end of file +types +.tap/ \ No newline at end of file diff --git a/package.json b/package.json index 87b5695d..b9031e63 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "eikjson.d.ts" ], "scripts": { - "test": "tap --no-check-coverage", + "test": "tap --disable-coverage --allow-empty-coverage", "lint:fix": "eslint --fix .", "lint": "eslint .", "schema:types": "json2ts lib/schemas/eikjson.schema.json > eikjson.d.ts", @@ -58,7 +58,7 @@ "prettier": "2.8.8", "semantic-release": "19.0.5", "stoppable": "1.1.0", - "tap": "16.3.9", + "tap": "18.7.0", "typescript": "4.9.5" } } diff --git a/test/helpers/config-store.test.js b/test/helpers/config-store.test.js index 06c54551..94ad0840 100644 --- a/test/helpers/config-store.test.js +++ b/test/helpers/config-store.test.js @@ -156,7 +156,7 @@ test('invalid json error', (t) => { try { configStore.findInDirectory('/pizza dir', jsonReaderStub); } catch (e) { - t.equal(e.message, 'Unexpected token o in JSON at position 1'); + t.match(e.message, /Unexpected token/); } t.end(); }); diff --git a/test/helpers/local-assets.test.js b/test/helpers/local-assets.test.js index a6815a22..750dc83c 100644 --- a/test/helpers/local-assets.test.js +++ b/test/helpers/local-assets.test.js @@ -91,7 +91,7 @@ test('Setup development routes for fastify', async (t) => { }); test('Setup development routes for hapi', async (t) => { - const server = new Hapi.Server(); + const server = Hapi.Server(); await localAssets(server, __dirname); await server.start(); const address = server.info.uri;