Skip to content

Commit 10b7014

Browse files
authored
Merge pull request #648 from pact-foundation/chore/update-everything
chore(deps): update everything - BREAKING CHANGE (node >=20)
2 parents 529a424 + f95b954 commit 10b7014

31 files changed

+5600
-3674
lines changed

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 72 deletions
This file was deleted.

.github/workflows/build-and-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
strategy:
113113
fail-fast: false
114114
matrix:
115-
node-version: [16, 18, 20, 22]
115+
node-version: [20, 22, 24]
116116
os: [macos-14, macos-13, ubuntu-latest, windows-latest, ubuntu-24.04-arm]
117117
docker: [false]
118118
include:
@@ -140,12 +140,12 @@ jobs:
140140
docker: true
141141
alpine: true
142142
arch: arm64
143-
node-version: 18
143+
node-version: 24
144144
- os: ubuntu-latest
145145
docker: true
146146
alpine: true
147147
arch: amd64
148-
node-version: 18
148+
node-version: 24
149149

150150
name: Test ${{ matrix.docker == true && matrix.alpine == true && 'linux-musl' || matrix.docker == true && matrix.alpine == false && 'linux' || matrix.os }}-${{ matrix.arch }}-node-${{ matrix.node-version }}
151151

@@ -181,11 +181,11 @@ jobs:
181181

182182
- if: ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'amd64' && matrix.os == 'ubuntu-latest' }}
183183
name: test linux amd64 musl
184-
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add jq gettext-envsubst bash curl gcompat file && cd /home && /home/script/ci/unpack-and-test.sh'
184+
run: docker run -v $PWD:/home -e NODE_VERSION=${{ matrix.node-version }} --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add jq gettext-envsubst bash curl gcompat file && cd /home && /home/script/ci/unpack-and-test.sh'
185185

186186
- if: ${{ matrix.docker == true && matrix.alpine == true && matrix.arch == 'arm64' && matrix.os == 'ubuntu-24.04-arm' }}
187187
name: test linux arm64 musl
188-
run: docker run -v $PWD:/home --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add jq gettext-envsubst bash curl file protoc protobuf-dev && cd /home && /home/script/ci/unpack-and-test.sh'
188+
run: docker run -v $PWD:/home -e NODE_VERSION=${{ matrix.node-version }} --platform linux/${{ matrix.arch }} --rm node:${{ matrix.node-version }}-alpine bin/sh -c 'apk add jq gettext-envsubst bash curl file protoc protobuf-dev && cd /home && /home/script/ci/unpack-and-test.sh'
189189

190190
release_dry_run:
191191
runs-on: ubuntu-latest

.mocharc.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1+
process.env.TS_NODE_PROJECT = 'tsconfig.test.json';
2+
13
module.exports = {
24
exclude: '**/*.jest.spec.ts',
3-
require: 'ts-node/register',
5+
require: ['ts-node/register'],
46
timeout: '30000',
57
slow: '5000',
68
exit: true,
7-
require: 'ts-node.js',
89
'check-leaks': true,
910
};

eslint.config.mjs

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import eslint from '@eslint/js';
2+
import tsPlugin from '@typescript-eslint/eslint-plugin';
3+
import tsParser from '@typescript-eslint/parser';
4+
5+
export default [
6+
eslint.configs.recommended,
7+
{
8+
files: ['**/*.ts'],
9+
ignores: ['**/*.d.ts'],
10+
languageOptions: {
11+
parser: tsParser,
12+
globals: {
13+
// Node.js globals
14+
Buffer: 'readonly',
15+
require: 'readonly',
16+
module: 'writable',
17+
exports: 'writable',
18+
process: 'readonly',
19+
console: 'readonly',
20+
__dirname: 'readonly',
21+
__filename: 'readonly',
22+
// Test globals
23+
describe: 'readonly',
24+
context: 'readonly',
25+
it: 'readonly',
26+
before: 'readonly',
27+
after: 'readonly',
28+
beforeEach: 'readonly',
29+
afterEach: 'readonly',
30+
},
31+
},
32+
plugins: {
33+
'@typescript-eslint': tsPlugin,
34+
},
35+
rules: {
36+
'no-unused-vars': 'off',
37+
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
38+
'@typescript-eslint/no-explicit-any': 'warn',
39+
'no-redeclare': 'off',
40+
},
41+
},
42+
{
43+
files: ['**/*.js'],
44+
languageOptions: {
45+
sourceType: 'commonjs',
46+
globals: {
47+
module: 'writable',
48+
exports: 'writable',
49+
require: 'readonly',
50+
Buffer: 'readonly',
51+
console: 'readonly',
52+
process: 'readonly',
53+
__dirname: 'readonly',
54+
__filename: 'readonly',
55+
describe: 'readonly',
56+
context: 'readonly',
57+
it: 'readonly',
58+
before: 'readonly',
59+
after: 'readonly',
60+
beforeEach: 'readonly',
61+
afterEach: 'readonly',
62+
},
63+
},
64+
rules: {
65+
'no-unused-vars': ['error', { varsIgnorePattern: '^(VERIFY_PROVIDER_RESPONSE|FfiFunctionResult|FfiLogLevelFilter|FnValidationStatus)$' }],
66+
},
67+
},
68+
];

0 commit comments

Comments
 (0)