From fd4410a0f292ff58c97767bb7d199494df10bea8 Mon Sep 17 00:00:00 2001 From: David Dal Busco Date: Thu, 5 Dec 2024 10:50:14 +0100 Subject: [PATCH] build: bump Node LTS and actions --- .github/actions/prepare/action.yml | 14 ++++++++++++ .github/workflows/publish.yml | 14 ++++++------ .github/workflows/tsdoc.yml | 6 +++--- package-lock.json | 34 ++++++++++++++++-------------- package.json | 2 +- 5 files changed, 43 insertions(+), 27 deletions(-) create mode 100644 .github/actions/prepare/action.yml diff --git a/.github/actions/prepare/action.yml b/.github/actions/prepare/action.yml new file mode 100644 index 0000000..381bab0 --- /dev/null +++ b/.github/actions/prepare/action.yml @@ -0,0 +1,14 @@ +name: Prepare + +description: Checkout and install dependencies + +runs: + using: composite + steps: + - uses: actions/setup-node@v4 + with: + node-version: 20 + registry-url: "https://registry.npmjs.org" + - name: Install dependencies + shell: bash + run: npm ci diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 124934e..5ac28a5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,14 +13,14 @@ jobs: id-token: write steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: '18.x' - registry-url: 'https://registry.npmjs.org' - - run: npm install -g npm - - run: npm ci + - name: Checkout + uses: actions/checkout@v4 + + - name: Prepare + uses: ./.github/actions/prepare + - run: npm run build + - run: npm publish --provenance --access public env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/tsdoc.yml b/.github/workflows/tsdoc.yml index 922e9ef..b5b2d8c 100644 --- a/.github/workflows/tsdoc.yml +++ b/.github/workflows/tsdoc.yml @@ -11,10 +11,10 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - - name: Install dependencies - run: npm ci + - name: Prepare + uses: ./.github/actions/prepare - name: Generate docs run: npm run docs diff --git a/package-lock.json b/package-lock.json index 3bb69c4..4cb409a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,7 @@ "@eslint/eslintrc": "^3.2.0", "@eslint/js": "^9.16.0", "@types/jest": "^29.5.14", - "@types/node": "^20.11.18", + "@types/node": "^22.10.1", "@typescript-eslint/eslint-plugin": "^8.17.0", "all-contributors-cli": "^6.26.1", "esbuild": "^0.24.0", @@ -1829,12 +1829,13 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "20.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.18.tgz", - "integrity": "sha512-ABT5VWnnYneSBcNWYSCuR05M826RoMyMSGiFivXGx6ZUIsXb9vn4643IEwkg2zbEOSgAiSogtapN2fgc4mAPlw==", + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "dev": true, + "license": "MIT", "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.20.0" } }, "node_modules/@types/stack-utils": { @@ -7288,10 +7289,11 @@ } }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", + "dev": true, + "license": "MIT" }, "node_modules/update-browserslist-db": { "version": "1.0.11", @@ -8825,12 +8827,12 @@ "dev": true }, "@types/node": { - "version": "20.11.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.18.tgz", - "integrity": "sha512-ABT5VWnnYneSBcNWYSCuR05M826RoMyMSGiFivXGx6ZUIsXb9vn4643IEwkg2zbEOSgAiSogtapN2fgc4mAPlw==", + "version": "22.10.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.10.1.tgz", + "integrity": "sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==", "dev": true, "requires": { - "undici-types": "~5.26.4" + "undici-types": "~6.20.0" } }, "@types/stack-utils": { @@ -12579,9 +12581,9 @@ } }, "undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.20.0.tgz", + "integrity": "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==", "dev": true }, "update-browserslist-db": { diff --git a/package.json b/package.json index 3c27c07..374315c 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "@eslint/eslintrc": "^3.2.0", "@eslint/js": "^9.16.0", "@types/jest": "^29.5.14", - "@types/node": "^20.11.18", + "@types/node": "^22.10.1", "@typescript-eslint/eslint-plugin": "^8.17.0", "all-contributors-cli": "^6.26.1", "esbuild": "^0.24.0",