mirror of
https://github.com/ThatGuySam/doesitarm.git
synced 2026-05-15 06:35:20 -07:00
chore(node): move repo tooling to node 24
Align local version markers and GitHub Actions with Node 24, switch the default test entrypoint to the maintained Vitest runner, and replace pnpm-incompatible npm helpers in repo scripts. This also removes the obsolete AVA plus esm path and excludes disabled test fixtures from generic Vitest discovery so CI reflects the supported test surface.
This commit is contained in:
parent
747e564e17
commit
fcda9f0a02
9 changed files with 43 additions and 641 deletions
11
.github/workflows/deploy-cloudflare-workers.yml
vendored
11
.github/workflows/deploy-cloudflare-workers.yml
vendored
|
|
@ -14,11 +14,18 @@ jobs:
|
||||||
name: Deploy
|
name: Deploy
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Use Node.js 24
|
||||||
|
uses: actions/setup-node@v6
|
||||||
|
with:
|
||||||
|
node-version-file: .nvmrc
|
||||||
|
cache: pnpm
|
||||||
|
|
||||||
- name: Setup PNPM
|
- name: Setup PNPM
|
||||||
uses: pnpm/action-setup@v2
|
uses: pnpm/action-setup@v4
|
||||||
with:
|
with:
|
||||||
|
version: 10.12.1
|
||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
- name: Write Wrangler configs
|
- name: Write Wrangler configs
|
||||||
|
|
|
||||||
25
.github/workflows/run-ava-tests.js.yml
vendored
25
.github/workflows/run-ava-tests.js.yml
vendored
|
|
@ -1,9 +1,8 @@
|
||||||
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
# This workflow validates the Node 24 toolchain on GitHub-hosted runners.
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
name: Run Node 24 Checks
|
||||||
|
|
||||||
name: Run Ava Tests
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ master ]
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
@ -16,18 +15,24 @@ jobs:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
node-version: [14.x, 15.x]
|
node-version: [24.x]
|
||||||
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v6
|
||||||
|
- name: Setup PNPM
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 10.12.1
|
||||||
|
run_install: false
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Use Node.js ${{ matrix.node-version }}
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v6
|
||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
|
cache: pnpm
|
||||||
- run: |
|
- run: |
|
||||||
touch .env
|
touch .env
|
||||||
echo ${{ secrets.GH_ENV }} >> .env
|
echo ${{ secrets.GH_ENV }} >> .env
|
||||||
- run: npm ci
|
- run: pnpm install --frozen-lockfile
|
||||||
- run: npm run generate
|
- run: pnpm build
|
||||||
- run: npm test
|
- run: pnpm test
|
||||||
|
|
|
||||||
2
.nvmrc
2
.nvmrc
|
|
@ -1 +1 @@
|
||||||
v22
|
v24
|
||||||
|
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
/**
|
|
||||||
* @type {import('ava').AVAConfig}
|
|
||||||
*/
|
|
||||||
export default () => {
|
|
||||||
return {
|
|
||||||
require: [
|
|
||||||
'dotenv/config',
|
|
||||||
'esm',
|
|
||||||
'tsconfig-paths/register'
|
|
||||||
],
|
|
||||||
// https://github.com/avajs/ava/blob/main/docs/recipes/watch-mode.md
|
|
||||||
watchMode: {
|
|
||||||
ignoreChanges: [
|
|
||||||
'!**/*.{js,vue}',
|
|
||||||
'./build',
|
|
||||||
'./dist',
|
|
||||||
'./.output',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
// tap: true,
|
|
||||||
// verbose: true,
|
|
||||||
color: true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import 'dotenv/config'
|
import 'dotenv/config.js'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
// storkVersion,
|
// storkVersion,
|
||||||
|
|
|
||||||
22
package.json
22
package.json
|
|
@ -7,7 +7,7 @@
|
||||||
"packageManager": "pnpm@10.12.1",
|
"packageManager": "pnpm@10.12.1",
|
||||||
"engines": {
|
"engines": {
|
||||||
"pnpm": "^10.*",
|
"pnpm": "^10.*",
|
||||||
"node": ">=22",
|
"node": ">=24",
|
||||||
"yarn": "forbidden, this project uses pnpm",
|
"yarn": "forbidden, this project uses pnpm",
|
||||||
"npm": "forbidden, this project uses pnpm"
|
"npm": "forbidden, this project uses pnpm"
|
||||||
},
|
},
|
||||||
|
|
@ -29,17 +29,17 @@
|
||||||
"test-listings": "pnpm run with-env vitest ./test/listings",
|
"test-listings": "pnpm run with-env vitest ./test/listings",
|
||||||
"test-postbuild-api": "pnpm test-listings",
|
"test-postbuild-api": "pnpm test-listings",
|
||||||
"test-vitest": "vitest",
|
"test-vitest": "vitest",
|
||||||
"test": "ava --timeout=1m --verbose",
|
"test": "vitest run",
|
||||||
"dev": "pnpm run dev-astro",
|
"dev": "pnpm run dev-astro",
|
||||||
"build": "pnpm run generate-astro",
|
"build": "pnpm run generate-astro",
|
||||||
"build-api": "pnpm run clone-readme && npx vite-node build-lists.js -- --with-api --no-lists",
|
"build-api": "pnpm run clone-readme && pnpm exec vite-node build-lists.js -- --with-api --no-lists",
|
||||||
"build-lists-and-api": "pnpm run clone-readme && npx vite-node build-lists.js -- --with-api",
|
"build-lists-and-api": "pnpm run clone-readme && pnpm exec vite-node build-lists.js -- --with-api",
|
||||||
"generate-dev": "pnpm run generate && npm test",
|
"generate-dev": "pnpm build && pnpm test",
|
||||||
"download-stork:toml": "npx vite-node scripts/download-stork-toml.js",
|
"download-stork:toml": "pnpm exec vite-node scripts/download-stork-toml.js",
|
||||||
"download-stork:executable": "npx vite-node scripts/download-stork-executable.js",
|
"download-stork:executable": "pnpm exec vite-node scripts/download-stork-executable.js",
|
||||||
"setup-stork": "pnpm run \"/^download-stork:.*/\" --parallel",
|
"setup-stork": "pnpm run \"/^download-stork:.*/\" --parallel",
|
||||||
"build-stork-index": "./$npm_package_config_stork_executable build --input $npm_package_config_stork_toml --output $npm_package_config_stork_index",
|
"build-stork-index": "./$npm_package_config_stork_executable build --input $npm_package_config_stork_toml --output $npm_package_config_stork_index",
|
||||||
"build-stork-index-js": "npx vite-node scripts/build-stork-index.js",
|
"build-stork-index-js": "pnpm exec vite-node scripts/build-stork-index.js",
|
||||||
"stork-search": "./$npm_package_config_stork_executable search --index $npm_package_config_stork_index --query $1",
|
"stork-search": "./$npm_package_config_stork_executable search --index $npm_package_config_stork_index --query $1",
|
||||||
"stork-index": "pnpm setup-stork && pnpm build-stork-index",
|
"stork-index": "pnpm setup-stork && pnpm build-stork-index",
|
||||||
"stork-netlify": "chmod +x scripts/stork-netlify.sh && ./scripts/stork-netlify.sh",
|
"stork-netlify": "chmod +x scripts/stork-netlify.sh && ./scripts/stork-netlify.sh",
|
||||||
|
|
@ -54,8 +54,8 @@
|
||||||
"scan-new-apps": "pnpm exec vite-node scripts/scan-new-apps.js",
|
"scan-new-apps": "pnpm exec vite-node scripts/scan-new-apps.js",
|
||||||
"with-env": "dotenv -e .env -- ",
|
"with-env": "dotenv -e .env -- ",
|
||||||
"cloudflare-deploy": "pnpm run build-api",
|
"cloudflare-deploy": "pnpm run build-api",
|
||||||
"vercel-build": "npx vite-node scripts/vercel-build.js",
|
"vercel-build": "pnpm exec vite-node scripts/vercel-build.js",
|
||||||
"netlify-prebuild:download-sitemaps": "npx vite-node scripts/download-sitemaps.js",
|
"netlify-prebuild:download-sitemaps": "pnpm exec vite-node scripts/download-sitemaps.js",
|
||||||
"netlify-prebuild:test-prebuild-functions": "pnpm test-prebuild && pnpm test-api-client && pnpm test-listings",
|
"netlify-prebuild:test-prebuild-functions": "pnpm test-prebuild && pnpm test-api-client && pnpm test-listings",
|
||||||
"netlify-prebuild": "pnpm run \"/^netlify-prebuild:.*/\" && pnpm stork-index",
|
"netlify-prebuild": "pnpm run \"/^netlify-prebuild:.*/\" && pnpm stork-index",
|
||||||
"netlify-postbuild:test-postbuild-functions": "vitest test/main.test.ts",
|
"netlify-postbuild:test-postbuild-functions": "vitest test/main.test.ts",
|
||||||
|
|
@ -127,14 +127,12 @@
|
||||||
"@astrojs/tailwind": "^6.0.2",
|
"@astrojs/tailwind": "^6.0.2",
|
||||||
"@vitest/web-worker": "^4.1.0",
|
"@vitest/web-worker": "^4.1.0",
|
||||||
"autoprefixer": "^10.0.2",
|
"autoprefixer": "^10.0.2",
|
||||||
"ava": "^6.2.0",
|
|
||||||
"babel-eslint": "^8.2.1",
|
"babel-eslint": "^8.2.1",
|
||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"dotenv": "^8.2.0",
|
"dotenv": "^8.2.0",
|
||||||
"dotenv-cli": "^8.0.0",
|
"dotenv-cli": "^8.0.0",
|
||||||
"eslint": "^8.14.0",
|
"eslint": "^8.14.0",
|
||||||
"eslint-plugin-vue": "^8.7.1",
|
"eslint-plugin-vue": "^8.7.1",
|
||||||
"esm": "^3.2.25",
|
|
||||||
"fast-xml-parser": "^3.19.0",
|
"fast-xml-parser": "^3.19.0",
|
||||||
"madge": "^5.0.1",
|
"madge": "^5.0.1",
|
||||||
"msw": "^1.2.3",
|
"msw": "^1.2.3",
|
||||||
|
|
|
||||||
588
pnpm-lock.yaml
generated
588
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,5 @@
|
||||||
import fs from 'fs-extra'
|
import fs from 'fs-extra'
|
||||||
import 'dotenv/config'
|
import 'dotenv/config.js'
|
||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
|
|
||||||
import {
|
import {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { defineConfig } from 'vitest/config'
|
import { configDefaults, defineConfig } from 'vitest/config'
|
||||||
|
|
||||||
import astroConfig from './astro.config.mjs'
|
import astroConfig from './astro.config.mjs'
|
||||||
|
|
||||||
|
|
@ -12,7 +12,11 @@ const vitestConfig = {
|
||||||
|
|
||||||
test: {
|
test: {
|
||||||
// testTimeout: 60 * 1000,
|
// testTimeout: 60 * 1000,
|
||||||
setupFiles: 'tsconfig-paths/register'
|
setupFiles: 'tsconfig-paths/register',
|
||||||
|
exclude: [
|
||||||
|
...configDefaults.exclude,
|
||||||
|
'test/_disabled/**'
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue