From 15b39e729bc37f3edc31442f62e516b8390af286 Mon Sep 17 00:00:00 2001 From: electrovir Date: Wed, 11 Sep 2024 12:59:25 +0000 Subject: [PATCH] [patch] fix tests on windows --- .github/workflows/tests.yml | 9 +- package-lock.json | 297 +++++++++++++----- package.json | 3 +- packages/compile/package.json | 6 +- packages/compile/src/compile.test.ts | 2 +- packages/core/package.json | 2 +- packages/deps/package.json | 4 +- packages/docs/package.json | 4 +- packages/docs/src/docs.ts | 12 +- packages/format/package.json | 4 +- packages/frontend/package.json | 4 +- packages/frontend/src/frontend.test.ts | 2 +- packages/frontend/src/frontend.ts | 5 +- packages/help/package.json | 4 +- .../configs/github/workflows/tests-node.yml | 7 +- .../configs/github/workflows/tests-web.yml | 7 +- packages/init/package.json | 4 +- packages/lint/package.json | 4 +- packages/lint/src/lint.test.ts | 17 +- packages/lint/src/lint.test.ts.snapshot | 4 +- packages/plugin-testing/package.json | 4 +- .../src/augments/fs/dir-contents.ts | 2 +- packages/plugin-testing/src/test-plugin.ts | 2 +- packages/publish/package.json | 4 +- packages/scripts/package.json | 4 +- packages/spellcheck/package.json | 6 +- packages/test/package.json | 4 +- packages/test/src/test.test.ts.snapshot | 6 +- packages/test/src/test.ts | 10 +- packages/virmator/package.json | 26 +- 30 files changed, 325 insertions(+), 144 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5b4cfa54..0ec22bf7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -10,12 +10,12 @@ concurrency: cancel-in-progress: true jobs: - build: + tests: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4.1.7 - name: Use Node.js ${{ matrix.node-version }} @@ -23,13 +23,16 @@ jobs: with: node-version-file: '.nvmrc' # handle NPM / Node.js repeatedly bricking their npm setup on Windows + # Note that this won't work if it uses --no-save - if: runner.os == 'Windows' shell: bash run: | - npm install npm + npm i npm + # format package.json is to account for the above `npm i npm` command - name: run test shell: bash run: | npm ci npx playwright install --with-deps + npm run format package.json npm run test:all diff --git a/package-lock.json b/package-lock.json index 3565d72f..ece94044 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@virmator/mono-repo-root", - "version": "13.3.10", + "version": "13.3.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@virmator/mono-repo-root", - "version": "13.3.10", + "version": "13.3.11", "workspaces": [ "packages/*" ], @@ -3852,18 +3852,54 @@ "license": "MIT" }, "node_modules/@shikijs/core": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.16.3.tgz", - "integrity": "sha512-yETIvrETCeC39gSPIiSADmjri9FwKmxz0QvONMtTIUYlKZe90CJkvcjPksayC2VQOtzOJonEiULUa8v8crUQvA==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.17.0.tgz", + "integrity": "sha512-Mkk4Mp4bNnW1kytU8I7S5PK5teNSe0iKlfqxPss4sdwnlcU8a2N62Z3te2gVmZfU9t1HF6L3wyWuM43IvEeEsg==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/vscode-textmate": "^9.2.0", + "@shikijs/engine-javascript": "1.17.0", + "@shikijs/engine-oniguruma": "1.17.0", + "@shikijs/types": "1.17.0", + "@shikijs/vscode-textmate": "^9.2.2", "@types/hast": "^3.0.4", + "hast-util-to-html": "^9.0.2" + } + }, + "node_modules/@shikijs/engine-javascript": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-javascript/-/engine-javascript-1.17.0.tgz", + "integrity": "sha512-EiBVlxmzJZdC2ypzn8k+vxLngbBNgHLS4RilwrFOABGRc72kUZubbD/6Chrq2RcVtD3yq1GtiiIdFMGd9BTX3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "1.17.0", "oniguruma-to-js": "0.3.3", "regex": "4.3.2" } }, + "node_modules/@shikijs/engine-oniguruma": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.17.0.tgz", + "integrity": "sha512-nsXzJGLQ0fhKmA4Gwt1cF7vC8VuZ1HSDrTRuj48h/qDeX/TzmOlTDXQ3uPtyuhyg/2rbZRzNhN8UFU4fSnQfXg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/types": "1.17.0", + "@shikijs/vscode-textmate": "^9.2.2" + } + }, + "node_modules/@shikijs/types": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/@shikijs/types/-/types-1.17.0.tgz", + "integrity": "sha512-Tvu2pA69lbpXB+MmgIaROP1tio8y0uYvKb5Foh3q0TJBTAJuaoa5eDEtS/0LquyveacsiVrYF4uEZILju+7Ybg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@shikijs/vscode-textmate": "^9.2.2", + "@types/hast": "^3.0.4" + } + }, "node_modules/@shikijs/vscode-textmate": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/@shikijs/vscode-textmate/-/vscode-textmate-9.2.2.tgz", @@ -6190,9 +6226,9 @@ } }, "node_modules/bare-os": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.2.tgz", - "integrity": "sha512-HZoJwzC+rZ9lqEemTMiO0luOePoGYNBgsLLgegKR/cljiJvcDNhDZQkzC+NC5Oh0aHbdBNSOHpghwMuB5tqhjg==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/bare-os/-/bare-os-2.4.3.tgz", + "integrity": "sha512-FjkNiU3AwTQNQkcxFOmDcCfoN1LjjtU+ofGJh5DymZZLTqdw2i/CzV7G0h3snvh6G8jrWtdmNSgZPH4L2VOAsQ==", "dev": true, "license": "Apache-2.0", "optional": true @@ -6209,15 +6245,15 @@ } }, "node_modules/bare-stream": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.2.1.tgz", - "integrity": "sha512-YTB47kHwBW9zSG8LD77MIBAAQXjU2WjAkMHeeb7hUplVs6+IoM5I7uEVQNPMB7lj9r8I76UMdoMkGnCodHOLqg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/bare-stream/-/bare-stream-2.3.0.tgz", + "integrity": "sha512-pVRWciewGUeCyKEuRxwv06M079r+fRjAQjBEK2P6OYGrO43O+Z0LrPZZEjlc4mB6C2RpZ9AxJ1s7NLEtOHO6eA==", "dev": true, "license": "Apache-2.0", "optional": true, "dependencies": { "b4a": "^1.6.6", - "streamx": "^2.18.0" + "streamx": "^2.20.0" } }, "node_modules/base64-js": { @@ -6504,6 +6540,17 @@ ], "license": "CC-BY-4.0" }, + "node_modules/ccount": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz", + "integrity": "sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chai-a11y-axe": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/chai-a11y-axe/-/chai-a11y-axe-1.5.0.tgz", @@ -6553,6 +6600,28 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/character-entities-html4": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/character-entities-html4/-/character-entities-html4-2.1.0.tgz", + "integrity": "sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, + "node_modules/character-entities-legacy": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/character-entities-legacy/-/character-entities-legacy-3.0.0.tgz", + "integrity": "sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/chokidar": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", @@ -7854,9 +7923,9 @@ "license": "MIT" }, "node_modules/electron-to-chromium": { - "version": "1.5.18", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.18.tgz", - "integrity": "sha512-1OfuVACu+zKlmjsNdcJuVQuVE61sZOLbNM4JAQ1Rvh6EOj0/EUKhMJjRH73InPlXSh8HIJk1cVZ8pyOV/FMdUQ==", + "version": "1.5.19", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.19.tgz", + "integrity": "sha512-kpLJJi3zxTR1U828P+LIUDZ5ohixyo68/IcYOHLqnbTPr/wdgn4i1ECvmALN9E16JPA6cvCG5UG79gVwVdEK5w==", "dev": true, "license": "ISC" }, @@ -10576,6 +10645,44 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/hast-util-to-html": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/hast-util-to-html/-/hast-util-to-html-9.0.2.tgz", + "integrity": "sha512-RP5wNpj5nm1Z8cloDv4Sl4RS8jH5HYa0v93YB6Wb4poEzgMo/dAAL0KcT4974dCjcNG5pkLqTImeFHHCwwfY3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0", + "@types/unist": "^3.0.0", + "ccount": "^2.0.0", + "comma-separated-tokens": "^2.0.0", + "hast-util-whitespace": "^3.0.0", + "html-void-elements": "^3.0.0", + "mdast-util-to-hast": "^13.0.0", + "property-information": "^6.0.0", + "space-separated-tokens": "^2.0.0", + "stringify-entities": "^4.0.0", + "zwitch": "^2.0.4" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/hast-util-whitespace": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz", + "integrity": "sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/hast": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/hastscript": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/hastscript/-/hastscript-8.0.0.tgz", @@ -10608,6 +10715,17 @@ "dev": true, "license": "MIT" }, + "node_modules/html-void-elements": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/html-void-elements/-/html-void-elements-3.0.0.tgz", + "integrity": "sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/http-assert": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz", @@ -13721,13 +13839,13 @@ } }, "node_modules/playwright": { - "version": "1.47.0", - "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.47.0.tgz", - "integrity": "sha512-jOWiRq2pdNAX/mwLiwFYnPHpEZ4rM+fRSQpRHwEwZlP2PUANvL3+aJOF/bvISMhFD30rqMxUB4RJx9aQbfh4Ww==", + "version": "1.46.1", + "resolved": "https://registry.npmjs.org/playwright/-/playwright-1.46.1.tgz", + "integrity": "sha512-oPcr1yqoXLCkgKtD5eNUPLiN40rYEM39odNpIb6VE6S7/15gJmA1NzVv6zJYusV0e7tzvkU/utBFNa/Kpxmwng==", "dev": true, "license": "Apache-2.0", "dependencies": { - "playwright-core": "1.47.0" + "playwright-core": "1.46.1" }, "bin": { "playwright": "cli.js" @@ -13740,9 +13858,9 @@ } }, "node_modules/playwright-core": { - "version": "1.47.0", - "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.47.0.tgz", - "integrity": "sha512-1DyHT8OqkcfCkYUD9zzUTfg7EfTd+6a8MkD/NWOvjo0u/SCNd5YmY/lJwFvUZOxJbWNds+ei7ic2+R/cRz/PDg==", + "version": "1.46.1", + "resolved": "https://registry.npmjs.org/playwright-core/-/playwright-core-1.46.1.tgz", + "integrity": "sha512-h9LqIQaAv+CYvWzsZ+h3RsrqCStkBHlgo6/TJlFst3cOTlLghBQlJwPOZKQJTKNaD3QIB7aAVQ+gfWbN3NXB7A==", "dev": true, "license": "Apache-2.0", "bin": { @@ -14185,9 +14303,9 @@ "license": "MIT" }, "node_modules/pump": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.1.tgz", - "integrity": "sha512-2ynnAmUu45oUSq51AQbeugLkMSKaz8FqVpZ6ykTqzOVkzXe8u/ezkGsYrFJqKZx+D9cVxoDrSbR7CeAwxFa5cQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.2.tgz", + "integrity": "sha512-tUPXtzlGM8FE3P0ZL6DVs/3P58k9nk8/jZeQCurTJylQA8qFYzHFfhBJkuqyE0FifOsQ0uKWekiZ5g8wtr28cw==", "dev": true, "license": "MIT", "dependencies": { @@ -15145,14 +15263,15 @@ } }, "node_modules/shiki": { - "version": "1.16.3", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.16.3.tgz", - "integrity": "sha512-GypUE+fEd06FqDs63LSAVlmq7WsahhPQU62cgZxGF+TJT5LjD2k7HTxXj4/CKOVuMM3+wWQ1t4Y5oooeJFRRBQ==", + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.17.0.tgz", + "integrity": "sha512-VZf8cPShRwfzPcaswv81+YP7qJEoFwRT+Ehy6bizim7M0zG9bk8Egug550C+xS9g7rKIOPhzAlp2uEyuCxbk/A==", "dev": true, "license": "MIT", "dependencies": { - "@shikijs/core": "1.16.3", - "@shikijs/vscode-textmate": "^9.2.0", + "@shikijs/core": "1.17.0", + "@shikijs/types": "1.17.0", + "@shikijs/vscode-textmate": "^9.2.2", "@types/hast": "^3.0.4" } }, @@ -15619,6 +15738,21 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/stringify-entities": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/stringify-entities/-/stringify-entities-4.0.4.tgz", + "integrity": "sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==", + "dev": true, + "license": "MIT", + "dependencies": { + "character-entities-html4": "^2.0.0", + "character-entities-legacy": "^3.0.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "node_modules/strip-ansi": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", @@ -16849,9 +16983,9 @@ "link": true }, "node_modules/vite": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.3.tgz", - "integrity": "sha512-IH+nl64eq9lJjFqU+/yrRnrHPVTlgy42/+IzbOdaFDVlyLgI/wDlf+FCobXLX1cT0X5+7LMyH1mIy2xJdLfo8Q==", + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.4.tgz", + "integrity": "sha512-RHFCkULitycHVTtelJ6jQLd+KSAAzOgEYorV32R2q++M6COBjKJR6BxqClwp5sf0XaBDjVMuJ9wnNfyAJwjMkA==", "dev": true, "license": "MIT", "dependencies": { @@ -17894,19 +18028,30 @@ "url": "https://github.com/sponsors/colinhacks" } }, + "node_modules/zwitch": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/zwitch/-/zwitch-2.0.4.tgz", + "integrity": "sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==", + "dev": true, + "license": "MIT", + "funding": { + "type": "github", + "url": "https://github.com/sponsors/wooorm" + } + }, "packages/compile": { "name": "@virmator/compile", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "run-time-assertions": "^1.5.2" }, "devDependencies": { "@types/node": "^22.5.4", - "@virmator/plugin-testing": "^13.3.10", + "@virmator/plugin-testing": "^13.3.11", "c8": "^10.1.2", "chalk": "^5.3.0", "concurrently": "^9.0.0", @@ -17996,7 +18141,7 @@ }, "packages/core": { "name": "@virmator/core", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", @@ -18090,12 +18235,12 @@ }, "packages/deps": { "name": "@virmator/deps", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "mri": "^1.2.0" }, "devDependencies": { @@ -18112,12 +18257,12 @@ }, "packages/docs": { "name": "@virmator/docs", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "chalk": "^5.3.0", "mri": "^1.2.0", "run-time-assertions": "^1.5.2" @@ -18136,11 +18281,11 @@ }, "packages/format": { "name": "@virmator/format", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "mri": "^1.2.0" }, "devDependencies": { @@ -18162,12 +18307,12 @@ }, "packages/frontend": { "name": "@virmator/frontend", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "mri": "^1.2.0" }, "devDependencies": { @@ -18182,12 +18327,12 @@ }, "packages/help": { "name": "@virmator/help", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "run-time-assertions": "^1.5.2" }, "devDependencies": { @@ -18201,12 +18346,12 @@ }, "packages/init": { "name": "@virmator/init", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "simple-git": "^3.26.0" }, "devDependencies": { @@ -18222,11 +18367,11 @@ }, "packages/lint": { "name": "@virmator/lint", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "mri": "^1.2.0" }, "devDependencies": { @@ -18255,12 +18400,12 @@ }, "packages/plugin-testing": { "name": "@virmator/plugin-testing", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "cli-args-vir": "^0.0.3", "run-time-assertions": "^1.5.2", "type-fest": "^4.26.1" @@ -18278,12 +18423,12 @@ }, "packages/publish": { "name": "@virmator/publish", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "chalk": "^5.3.0", "mri": "^1.2.0", "run-time-assertions": "^1.5.2", @@ -18304,13 +18449,13 @@ }, "packages/scripts": { "name": "@virmator/scripts", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", "mri": "^1.2.0", - "virmator": "^13.3.10" + "virmator": "^13.3.11" }, "devDependencies": { "@types/node": "^22.5.4" @@ -18321,18 +18466,18 @@ }, "packages/spellcheck": { "name": "@virmator/spellcheck", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "mri": "^1.2.0", "run-time-assertions": "^1.5.2" }, "devDependencies": { "@types/node": "^22.5.4", - "@virmator/plugin-testing": "^13.3.10", + "@virmator/plugin-testing": "^13.3.11", "c8": "^10.1.2", "concurrently": "^9.0.0", "cspell": "^8.14.2", @@ -18417,12 +18562,12 @@ }, "packages/test": { "name": "@virmator/test", - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "glob": "^11.0.0", "mri": "^1.2.0" }, @@ -18444,22 +18589,22 @@ } }, "packages/virmator": { - "version": "13.3.10", + "version": "13.3.11", "license": "(MIT or CC0 1.0)", "dependencies": { "@augment-vir/node-js": "^29.3.0", - "@virmator/compile": "^13.3.10", - "@virmator/core": "^13.3.10", - "@virmator/deps": "^13.3.10", - "@virmator/docs": "^13.3.10", - "@virmator/format": "^13.3.10", - "@virmator/frontend": "^13.3.10", - "@virmator/help": "^13.3.10", - "@virmator/init": "^13.3.10", - "@virmator/lint": "^13.3.10", - "@virmator/publish": "^13.3.10", - "@virmator/spellcheck": "^13.3.10", - "@virmator/test": "^13.3.10", + "@virmator/compile": "^13.3.11", + "@virmator/core": "^13.3.11", + "@virmator/deps": "^13.3.11", + "@virmator/docs": "^13.3.11", + "@virmator/format": "^13.3.11", + "@virmator/frontend": "^13.3.11", + "@virmator/help": "^13.3.11", + "@virmator/init": "^13.3.11", + "@virmator/lint": "^13.3.11", + "@virmator/publish": "^13.3.11", + "@virmator/spellcheck": "^13.3.11", + "@virmator/test": "^13.3.11", "tsx": "^4.19.0" }, "bin": { diff --git a/package.json b/package.json index d2921eda..b1c20514 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/mono-repo-root", - "version": "13.3.10", + "version": "13.3.11", "private": true, "type": "module", "workspaces": [ @@ -58,6 +58,7 @@ "node": ">=22" }, "overrides": { + "playwright": "1.46.1", "virmator": "*" } } diff --git a/packages/compile/package.json b/packages/compile/package.json index d2ce610a..72515cac 100644 --- a/packages/compile/package.json +++ b/packages/compile/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/compile", - "version": "13.3.10", + "version": "13.3.11", "description": "Default TS compile plugin for virmator.", "keywords": [ "virmator", @@ -33,12 +33,12 @@ "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "run-time-assertions": "^1.5.2" }, "devDependencies": { "@types/node": "^22.5.4", - "@virmator/plugin-testing": "^13.3.10", + "@virmator/plugin-testing": "^13.3.11", "c8": "^10.1.2", "chalk": "^5.3.0", "concurrently": "^9.0.0", diff --git a/packages/compile/src/compile.test.ts b/packages/compile/src/compile.test.ts index 81c1f35f..9c4fb970 100644 --- a/packages/compile/src/compile.test.ts +++ b/packages/compile/src/compile.test.ts @@ -18,7 +18,7 @@ describe(virmatorCompilePlugin.name, () => { * are stable. */ if (logType === LogOutputType.standard) { - return arg.replace(/ Version.+/, ''); + return arg; } return arg; }, diff --git a/packages/core/package.json b/packages/core/package.json index ad64e682..83a7c874 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/core", - "version": "13.3.10", + "version": "13.3.11", "description": "Shared core functionality for all virmator plugins and the virmator CLI.", "keywords": [ "automation", diff --git a/packages/deps/package.json b/packages/deps/package.json index e00a4579..65525a9b 100644 --- a/packages/deps/package.json +++ b/packages/deps/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/deps", - "version": "13.3.10", + "version": "13.3.11", "description": "Default TS deps plugin for virmator.", "keywords": [ "virmator", @@ -35,7 +35,7 @@ "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "mri": "^1.2.0" }, "devDependencies": { diff --git a/packages/docs/package.json b/packages/docs/package.json index 4a545e83..a8870a75 100644 --- a/packages/docs/package.json +++ b/packages/docs/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/docs", - "version": "13.3.10", + "version": "13.3.11", "description": "Default TS docs plugin for virmator.", "keywords": [ "virmator", @@ -34,7 +34,7 @@ "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "chalk": "^5.3.0", "mri": "^1.2.0", "run-time-assertions": "^1.5.2" diff --git a/packages/docs/src/docs.ts b/packages/docs/src/docs.ts index a704adb5..46d31a4d 100644 --- a/packages/docs/src/docs.ts +++ b/packages/docs/src/docs.ts @@ -12,6 +12,7 @@ import { import {ChalkInstance} from 'chalk'; import mri from 'mri'; import {basename, join} from 'node:path'; +import {pathToFileURL} from 'node:url'; import type * as Typedoc from 'typedoc'; /** A virmator plugin for checking and generating documentation. */ @@ -160,9 +161,14 @@ export const virmatorDocsPlugin = defineVirmatorPlugin( } // dynamic imports are not branches - /* node:coverage ignore next 2 */ - const config = (await import(join(packageDir, configs.docs.configs.typedoc.copyToPath))) - .typeDocConfig as Typedoc.TypeDocOptions; + /* node:coverage ignore next 7 */ + const config = ( + await import( + pathToFileURL( + join(packageDir, configs.docs.configs.typedoc.copyToPath), + ).toString() + ) + ).typeDocConfig as Typedoc.TypeDocOptions; await runTypedoc({ checkOnly, diff --git a/packages/format/package.json b/packages/format/package.json index 5ba8c620..d779f66b 100644 --- a/packages/format/package.json +++ b/packages/format/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/format", - "version": "13.3.10", + "version": "13.3.11", "description": "Default format plugin for virmator.", "keywords": [ "virmator", @@ -32,7 +32,7 @@ }, "dependencies": { "@augment-vir/common": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "mri": "^1.2.0" }, "devDependencies": { diff --git a/packages/frontend/package.json b/packages/frontend/package.json index 872d4d9f..be864503 100644 --- a/packages/frontend/package.json +++ b/packages/frontend/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/frontend", - "version": "13.3.10", + "version": "13.3.11", "description": "Default frontend plugin for virmator.", "keywords": [ "virmator", @@ -36,7 +36,7 @@ "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "mri": "^1.2.0" }, "devDependencies": { diff --git a/packages/frontend/src/frontend.test.ts b/packages/frontend/src/frontend.test.ts index 7f378292..0bfb5bb8 100644 --- a/packages/frontend/src/frontend.test.ts +++ b/packages/frontend/src/frontend.test.ts @@ -22,7 +22,7 @@ describe(virmatorFrontendPlugin.name, () => { dir, { logTransform(logType, log) { - return log.replace(/built in [\dm]+s/, 'built'); + return log.replace(/built in [\d.m]+s/g, 'built'); }, }, ); diff --git a/packages/frontend/src/frontend.ts b/packages/frontend/src/frontend.ts index 58a9b918..9097c3e2 100644 --- a/packages/frontend/src/frontend.ts +++ b/packages/frontend/src/frontend.ts @@ -4,6 +4,7 @@ import {defineVirmatorPlugin, NpmDepType, PackageType, VirmatorEnv} from '@virma import mri from 'mri'; import {cp, rm} from 'node:fs/promises'; import {join, relative, resolve} from 'node:path'; +import {pathToFileURL} from 'node:url'; import type {UserConfig} from 'vite'; /** A virmator plugin for running and building frontend packages. */ @@ -109,7 +110,9 @@ export const virmatorFrontendPlugin = defineVirmatorPlugin( usedCommands.frontend?.subCommands.build || usedCommands.frontend?.subCommands.preview; const configPath = args.config || configs.frontend.configs.vite.fullCopyToPath; - const viteConfig = await ((await import(configPath)).default as MaybePromise); + const viteConfig = await (( + await import(pathToFileURL(configPath).toString()) + ).default as MaybePromise); const rootDir: string = viteConfig.root ? resolve(cwd, viteConfig.root) : cwd; const outDir: string = resolve(rootDir, viteConfig.build?.outDir || 'dist'); diff --git a/packages/help/package.json b/packages/help/package.json index 97060051..a6156169 100644 --- a/packages/help/package.json +++ b/packages/help/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/help", - "version": "13.3.10", + "version": "13.3.11", "description": "Default help plugin for virmator.", "keywords": [ "virmator", @@ -33,7 +33,7 @@ "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "run-time-assertions": "^1.5.2" }, "devDependencies": { diff --git a/packages/init/configs/github/workflows/tests-node.yml b/packages/init/configs/github/workflows/tests-node.yml index 715c29f9..cf836e48 100644 --- a/packages/init/configs/github/workflows/tests-node.yml +++ b/packages/init/configs/github/workflows/tests-node.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4.1.7 - name: Use Node.js ${{ matrix.node-version }} @@ -23,12 +23,15 @@ jobs: with: node-version-file: '.nvmrc' # handle NPM / Node.js repeatedly bricking their npm setup on Windows + # Note that this won't work if it uses --no-save - if: runner.os == 'Windows' shell: bash run: | - npm install npm + npm i npm + # format package.json is to account for the above `npm i npm` command - name: run test shell: bash run: | npm ci + npm run format package.json npm run test:all diff --git a/packages/init/configs/github/workflows/tests-web.yml b/packages/init/configs/github/workflows/tests-web.yml index c88bd0ff..0ec22bf7 100644 --- a/packages/init/configs/github/workflows/tests-web.yml +++ b/packages/init/configs/github/workflows/tests-web.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest] + os: [macos-latest, ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v4.1.7 - name: Use Node.js ${{ matrix.node-version }} @@ -23,13 +23,16 @@ jobs: with: node-version-file: '.nvmrc' # handle NPM / Node.js repeatedly bricking their npm setup on Windows + # Note that this won't work if it uses --no-save - if: runner.os == 'Windows' shell: bash run: | - npm install npm + npm i npm + # format package.json is to account for the above `npm i npm` command - name: run test shell: bash run: | npm ci npx playwright install --with-deps + npm run format package.json npm run test:all diff --git a/packages/init/package.json b/packages/init/package.json index 1146b334..8c62e130 100644 --- a/packages/init/package.json +++ b/packages/init/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/init", - "version": "13.3.10", + "version": "13.3.11", "description": "Default init plugin for virmator.", "keywords": [ "virmator", @@ -32,7 +32,7 @@ "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "simple-git": "^3.26.0" }, "devDependencies": { diff --git a/packages/lint/package.json b/packages/lint/package.json index d516edf2..4ede9aaf 100644 --- a/packages/lint/package.json +++ b/packages/lint/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/lint", - "version": "13.3.10", + "version": "13.3.11", "description": "Default ESLint linting plugin for virmator.", "keywords": [ "virmator", @@ -32,7 +32,7 @@ }, "dependencies": { "@augment-vir/common": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "mri": "^1.2.0" }, "devDependencies": { diff --git a/packages/lint/src/lint.test.ts b/packages/lint/src/lint.test.ts index 372d6305..0ee8d299 100644 --- a/packages/lint/src/lint.test.ts +++ b/packages/lint/src/lint.test.ts @@ -1,5 +1,6 @@ +import {safeMatch} from '@augment-vir/common'; import {testPlugin} from '@virmator/plugin-testing'; -import {join, resolve} from 'node:path'; +import {basename, join, resolve} from 'node:path'; import {describe, it, TestContext} from 'node:test'; import {virmatorLintPlugin} from './lint.js'; @@ -12,7 +13,19 @@ describe(virmatorLintPlugin.name, () => { cwd: string, extraCommand = '', ) { - await testPlugin(shouldPass, context, virmatorLintPlugin, `lint ${extraCommand}`, cwd); + await testPlugin(shouldPass, context, virmatorLintPlugin, `lint ${extraCommand}`, cwd, { + logTransform(logType, arg) { + const [ + , + fileName, + ] = safeMatch(arg, /\s(\S*packages[/\\].+?\.ts)\s/); + + if (fileName) { + return arg.replace(fileName, basename(fileName)); + } + return arg; + }, + }); } it('lints a valid project', async (context) => { diff --git a/packages/lint/src/lint.test.ts.snapshot b/packages/lint/src/lint.test.ts.snapshot index 9dbf9fe6..9391bade 100644 --- a/packages/lint/src/lint.test.ts.snapshot +++ b/packages/lint/src/lint.test.ts.snapshot @@ -1,7 +1,7 @@ exports[`Lint > fixes an invalid project 1`] = ` { "logs": { - "stdout": "Copied eslint.config.mjs\\nInstalling eslint@9.10.0 eslint-plugin-require-extensions@0.1.3 eslint-plugin-unicorn@55.0.0 @eslint/js@9.10.0 @eslint/eslintrc@3.1.0 @stylistic/eslint-plugin@2.8.0 eslint-plugin-monorepo-cop@1.0.2 @stylistic/eslint-plugin-ts@2.8.0 @typescript-eslint/eslint-plugin@8.5.0 eslint-config-prettier@9.1.0 eslint-plugin-jsdoc@50.2.2 eslint-plugin-playwright@1.6.2 eslint-plugin-prettier@5.2.1 eslint-plugin-sonarjs@2.0.2 typescript-eslint@8.5.0...\\n> npx eslint --fix .\\n\\npackages/lint/test-files/bad-repo/src/a.ts\\n 3:8 error Async function 'doThing' has no 'await' expression @typescript-eslint/require-await\\n 4:12 error Forbidden non-null assertion @typescript-eslint/no-non-null-assertion\\n\\nāœ– 2 problems (2 errors, 0 warnings)\\n", + "stdout": "Copied eslint.config.mjs\\nInstalling eslint@9.10.0 eslint-plugin-require-extensions@0.1.3 eslint-plugin-unicorn@55.0.0 @eslint/js@9.10.0 @eslint/eslintrc@3.1.0 @stylistic/eslint-plugin@2.8.0 eslint-plugin-monorepo-cop@1.0.2 @stylistic/eslint-plugin-ts@2.8.0 @typescript-eslint/eslint-plugin@8.5.0 eslint-config-prettier@9.1.0 eslint-plugin-jsdoc@50.2.2 eslint-plugin-playwright@1.6.2 eslint-plugin-prettier@5.2.1 eslint-plugin-sonarjs@2.0.2 typescript-eslint@8.5.0...\\n> npx eslint --fix .\\n\\na.ts\\n 3:8 error Async function 'doThing' has no 'await' expression @typescript-eslint/require-await\\n 4:12 error Forbidden non-null assertion @typescript-eslint/no-non-null-assertion\\n\\nāœ– 2 problems (2 errors, 0 warnings)\\n", "stderr": "lint failed." }, "cwd": "packages/lint/test-files/bad-repo", @@ -34,7 +34,7 @@ exports[`Lint > lints a valid project 1`] = ` exports[`Lint > lints an invalid project 1`] = ` { "logs": { - "stdout": "Copied eslint.config.mjs\\nInstalling eslint@9.10.0 eslint-plugin-require-extensions@0.1.3 eslint-plugin-unicorn@55.0.0 @eslint/js@9.10.0 @eslint/eslintrc@3.1.0 @stylistic/eslint-plugin@2.8.0 eslint-plugin-monorepo-cop@1.0.2 @stylistic/eslint-plugin-ts@2.8.0 @typescript-eslint/eslint-plugin@8.5.0 eslint-config-prettier@9.1.0 eslint-plugin-jsdoc@50.2.2 eslint-plugin-playwright@1.6.2 eslint-plugin-prettier@5.2.1 eslint-plugin-sonarjs@2.0.2 typescript-eslint@8.5.0...\\n> npx eslint .\\n\\npackages/lint/test-files/bad-repo/src/a.ts\\n 3:8 error Async function 'doThing' has no 'await' expression @typescript-eslint/require-await\\n 4:12 error Forbidden non-null assertion @typescript-eslint/no-non-null-assertion\\n 4:12 error This assertion is unnecessary since it does not change the type of the expression @typescript-eslint/no-unnecessary-type-assertion\\n 4:12 error Forbidden non-null assertion @typescript-eslint/no-non-null-assertion\\n 4:12 error This assertion is unnecessary since it does not change the type of the expression @typescript-eslint/no-unnecessary-type-assertion\\n 4:12 error Forbidden extra non-null assertion @typescript-eslint/no-extra-non-null-assertion\\n 4:12 error Forbidden non-null assertion @typescript-eslint/no-non-null-assertion\\n 4:12 error Forbidden extra non-null assertion @typescript-eslint/no-extra-non-null-assertion\\n\\nāœ– 8 problems (8 errors, 0 warnings)\\n 4 errors and 0 warnings potentially fixable with the \`--fix\` option.\\n", + "stdout": "Copied eslint.config.mjs\\nInstalling eslint@9.10.0 eslint-plugin-require-extensions@0.1.3 eslint-plugin-unicorn@55.0.0 @eslint/js@9.10.0 @eslint/eslintrc@3.1.0 @stylistic/eslint-plugin@2.8.0 eslint-plugin-monorepo-cop@1.0.2 @stylistic/eslint-plugin-ts@2.8.0 @typescript-eslint/eslint-plugin@8.5.0 eslint-config-prettier@9.1.0 eslint-plugin-jsdoc@50.2.2 eslint-plugin-playwright@1.6.2 eslint-plugin-prettier@5.2.1 eslint-plugin-sonarjs@2.0.2 typescript-eslint@8.5.0...\\n> npx eslint .\\n\\na.ts\\n 3:8 error Async function 'doThing' has no 'await' expression @typescript-eslint/require-await\\n 4:12 error Forbidden non-null assertion @typescript-eslint/no-non-null-assertion\\n 4:12 error This assertion is unnecessary since it does not change the type of the expression @typescript-eslint/no-unnecessary-type-assertion\\n 4:12 error Forbidden non-null assertion @typescript-eslint/no-non-null-assertion\\n 4:12 error This assertion is unnecessary since it does not change the type of the expression @typescript-eslint/no-unnecessary-type-assertion\\n 4:12 error Forbidden extra non-null assertion @typescript-eslint/no-extra-non-null-assertion\\n 4:12 error Forbidden non-null assertion @typescript-eslint/no-non-null-assertion\\n 4:12 error Forbidden extra non-null assertion @typescript-eslint/no-extra-non-null-assertion\\n\\nāœ– 8 problems (8 errors, 0 warnings)\\n 4 errors and 0 warnings potentially fixable with the \`--fix\` option.\\n", "stderr": "lint failed." }, "cwd": "packages/lint/test-files/bad-repo", diff --git a/packages/plugin-testing/package.json b/packages/plugin-testing/package.json index 51d75b44..e0b29e71 100644 --- a/packages/plugin-testing/package.json +++ b/packages/plugin-testing/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/plugin-testing", - "version": "13.3.10", + "version": "13.3.11", "description": "Testing for virmator plugins.", "keywords": [ "virmator", @@ -32,7 +32,7 @@ "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "cli-args-vir": "^0.0.3", "run-time-assertions": "^1.5.2", "type-fest": "^4.26.1" diff --git a/packages/plugin-testing/src/augments/fs/dir-contents.ts b/packages/plugin-testing/src/augments/fs/dir-contents.ts index 8f6747cb..15ef2cf2 100644 --- a/packages/plugin-testing/src/augments/fs/dir-contents.ts +++ b/packages/plugin-testing/src/augments/fs/dir-contents.ts @@ -20,7 +20,7 @@ export async function readAllDirContents( excludeList?: ReadonlyArray | undefined; }, ): Promise { - const fileNames = await readdir(dir); + const fileNames = (await readdir(dir)).sort(); const allFileContents = await Promise.all( fileNames.map(async (fileName) => { diff --git a/packages/plugin-testing/src/test-plugin.ts b/packages/plugin-testing/src/test-plugin.ts index 01994e82..58004e93 100644 --- a/packages/plugin-testing/src/test-plugin.ts +++ b/packages/plugin-testing/src/test-plugin.ts @@ -160,7 +160,7 @@ export async function testPlugin( const result: TestPluginResult = { logs: mapObjectValues(logs, (logType, logs) => { - return toPosixPath(logTransform(logType, logs.join('\n'))); + return toPosixPath(logTransform(logType, logs.join('\n'))).replaceAll('\r', ''); }), cwd: toPosixPath(relative(monoRepoDir, cwd)), contentsDiff, diff --git a/packages/publish/package.json b/packages/publish/package.json index 811b72ca..b9ba2ad0 100644 --- a/packages/publish/package.json +++ b/packages/publish/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/publish", - "version": "13.3.10", + "version": "13.3.11", "description": "Default publish plugin for virmator.", "keywords": [ "virmator", @@ -35,7 +35,7 @@ "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "chalk": "^5.3.0", "mri": "^1.2.0", "run-time-assertions": "^1.5.2", diff --git a/packages/scripts/package.json b/packages/scripts/package.json index 808f1488..cf4a2b77 100644 --- a/packages/scripts/package.json +++ b/packages/scripts/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/scripts", - "version": "13.3.10", + "version": "13.3.11", "private": true, "description": "Internal virmator scripts.", "keywords": [ @@ -30,7 +30,7 @@ "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", "mri": "^1.2.0", - "virmator": "^13.3.10" + "virmator": "^13.3.11" }, "devDependencies": { "@types/node": "^22.5.4" diff --git a/packages/spellcheck/package.json b/packages/spellcheck/package.json index d505d4c9..4e844754 100644 --- a/packages/spellcheck/package.json +++ b/packages/spellcheck/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/spellcheck", - "version": "13.3.10", + "version": "13.3.11", "description": "Default spellcheck plugin for virmator", "keywords": [ "virmator", @@ -33,13 +33,13 @@ "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "mri": "^1.2.0", "run-time-assertions": "^1.5.2" }, "devDependencies": { "@types/node": "^22.5.4", - "@virmator/plugin-testing": "^13.3.10", + "@virmator/plugin-testing": "^13.3.11", "c8": "^10.1.2", "concurrently": "^9.0.0", "cspell": "^8.14.2", diff --git a/packages/test/package.json b/packages/test/package.json index c62efad1..edb73237 100644 --- a/packages/test/package.json +++ b/packages/test/package.json @@ -1,6 +1,6 @@ { "name": "@virmator/test", - "version": "13.3.10", + "version": "13.3.11", "description": "Default test plugin for virmator.", "keywords": [ "virmator", @@ -35,7 +35,7 @@ "dependencies": { "@augment-vir/common": "^29.3.0", "@augment-vir/node-js": "^29.3.0", - "@virmator/core": "^13.3.10", + "@virmator/core": "^13.3.11", "glob": "^11.0.0", "mri": "^1.2.0" }, diff --git a/packages/test/src/test.test.ts.snapshot b/packages/test/src/test.test.ts.snapshot index bbcfd92d..8b1201ff 100644 --- a/packages/test/src/test.test.ts.snapshot +++ b/packages/test/src/test.test.ts.snapshot @@ -13,7 +13,7 @@ exports[`Test > rejects missing env 1`] = ` exports[`Test > runs web tests 1`] = ` { "logs": { - "stdout": "Installing @open-wc/testing@4.0.0 @web/dev-server-esbuild@1.0.2 @web/test-runner-commands@0.9.0 @web/test-runner-playwright@0.11.0 @web/test-runner-visual-regression@0.10.0 @web/test-runner@0.19.0 istanbul-smart-text-reporter@1.1.4... > npx web-test-runner --color --config packages/test/test-files/browser-tests/configs/web-test-runner.config.mjs --one-browser Running 2 test files... src/bad.test.ts: fake failing test [Webkit] š„‚ fails a thing āŒ fake failing test > fails a thing AssertionError: expected false to be true + expected - actual -false +true at src/bad.test.ts:5:22 src/good.test.ts: fake test [Webkit] āœ“ tests a thing", + "stdout": "Installing @open-wc/testing@4.0.0 @web/dev-server-esbuild@1.0.2 @web/test-runner-commands@0.9.0 @web/test-runner-playwright@0.11.0 @web/test-runner-visual-regression@0.10.0 @web/test-runner@0.19.0 istanbul-smart-text-reporter@1.1.4... > npx web-test-runner --color --config configs/web-test-runner.config.mjs --one-browser Running 2 test files... src/bad.test.ts: fake failing test [Webkit] š„‚ fails a thing āŒ fake failing test > fails a thing AssertionError: expected false to be true + expected - actual -false +true at src/bad.test.ts:5:22 src/good.test.ts: fake test [Webkit] āœ“ tests a thing", "stderr": "test failed." }, "cwd": "packages/test/test-files/browser-tests", @@ -29,7 +29,7 @@ exports[`Test > runs web tests 1`] = ` exports[`Test > tests a specific web file 1`] = ` { "logs": { - "stdout": "Installing @open-wc/testing@4.0.0 @web/dev-server-esbuild@1.0.2 @web/test-runner-commands@0.9.0 @web/test-runner-playwright@0.11.0 @web/test-runner-visual-regression@0.10.0 @web/test-runner@0.19.0 istanbul-smart-text-reporter@1.1.4... > npx web-test-runner --color --config packages/test/test-files/browser-tests/configs/web-test-runner.config.mjs src/good.test.ts --one-browser Running 1 test files... src/good.test.ts: fake test [Webkit] āœ“ tests a thing test finished." + "stdout": "Installing @open-wc/testing@4.0.0 @web/dev-server-esbuild@1.0.2 @web/test-runner-commands@0.9.0 @web/test-runner-playwright@0.11.0 @web/test-runner-visual-regression@0.10.0 @web/test-runner@0.19.0 istanbul-smart-text-reporter@1.1.4... > npx web-test-runner --color --config configs/web-test-runner.config.mjs src/good.test.ts --one-browser Running 1 test files... src/good.test.ts: fake test [Webkit] āœ“ tests a thing test finished." }, "cwd": "packages/test/test-files/browser-tests", "contentsDiff": { @@ -41,7 +41,7 @@ exports[`Test > tests a specific web file 1`] = ` exports[`Test > tests web coverage 1`] = ` { "logs": { - "stdout": "Copied web-test-runner.config.mjs Installing @open-wc/testing@4.0.0 @web/dev-server-esbuild@1.0.2 @web/test-runner-commands@0.9.0 @web/test-runner-playwright@0.11.0 @web/test-runner-visual-regression@0.10.0 @web/test-runner@0.19.0 istanbul-smart-text-reporter@1.1.4... > npx web-test-runner --color --config packages/test/test-files/coverage-browser-tests/configs/web-test-runner.config.mjs --coverage --one-browser Running 2 test files... src/all-files-for-code-coverage.test.ts: ----------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- All files | 33.33 | 100 | 0 | 33.33 | good.ts | 33.33 | 100 | 0 | 33.33 | 2-3 ----------|---------|----------|---------|---------|------------------- src/good.test.ts: fake test [Chromium] āœ“ tests a thing", + "stdout": "Copied web-test-runner.config.mjs Installing @open-wc/testing@4.0.0 @web/dev-server-esbuild@1.0.2 @web/test-runner-commands@0.9.0 @web/test-runner-playwright@0.11.0 @web/test-runner-visual-regression@0.10.0 @web/test-runner@0.19.0 istanbul-smart-text-reporter@1.1.4... > npx web-test-runner --color --config configs/web-test-runner.config.mjs --coverage --one-browser Running 2 test files... src/all-files-for-code-coverage.test.ts: ----------|---------|----------|---------|---------|------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------|---------|----------|---------|---------|------------------- All files | 33.33 | 100 | 0 | 33.33 | good.ts | 33.33 | 100 | 0 | 33.33 | 2-3 ----------|---------|----------|---------|---------|------------------- src/good.test.ts: fake test [Chromium] āœ“ tests a thing", "stderr": "test failed." }, "cwd": "packages/test/test-files/coverage-browser-tests", diff --git a/packages/test/src/test.ts b/packages/test/src/test.ts index 32a13478..02eb7d95 100644 --- a/packages/test/src/test.ts +++ b/packages/test/src/test.ts @@ -12,6 +12,7 @@ import {glob} from 'glob'; import mri from 'mri'; import {rm, writeFile} from 'node:fs/promises'; import {join, relative} from 'node:path'; +import {pathToFileURL} from 'node:url'; /** A virmator plugin for running tests. */ export const virmatorTestPlugin = defineVirmatorPlugin( @@ -274,15 +275,18 @@ export const virmatorTestPlugin = defineVirmatorPlugin( try { const configPath = args.config || - configs.test.subCommands.web.configs.webTestRunner.fullCopyToPath; + relative( + cwd, + configs.test.subCommands.web.configs.webTestRunner.fullCopyToPath, + ); const configArgs = args.config ? [] : [ '--config', - configPath, + interpolationSafeWindowsPath(configPath), ]; - const webTestRunnerConfig = (await import(configPath)) + const webTestRunnerConfig = (await import(pathToFileURL(configPath).toString())) .default as Partial; const includeCoverage = usedCommands.test.subCommands.web.subCommands.coverage; diff --git a/packages/virmator/package.json b/packages/virmator/package.json index 678612b6..156d2218 100644 --- a/packages/virmator/package.json +++ b/packages/virmator/package.json @@ -1,6 +1,6 @@ { "name": "virmator", - "version": "13.3.10", + "version": "13.3.11", "description": "Handle common package configs, commands, and dependencies.", "keywords": [ "automation", @@ -38,18 +38,18 @@ }, "dependencies": { "@augment-vir/node-js": "^29.3.0", - "@virmator/compile": "^13.3.10", - "@virmator/core": "^13.3.10", - "@virmator/deps": "^13.3.10", - "@virmator/docs": "^13.3.10", - "@virmator/format": "^13.3.10", - "@virmator/frontend": "^13.3.10", - "@virmator/help": "^13.3.10", - "@virmator/init": "^13.3.10", - "@virmator/lint": "^13.3.10", - "@virmator/publish": "^13.3.10", - "@virmator/spellcheck": "^13.3.10", - "@virmator/test": "^13.3.10", + "@virmator/compile": "^13.3.11", + "@virmator/core": "^13.3.11", + "@virmator/deps": "^13.3.11", + "@virmator/docs": "^13.3.11", + "@virmator/format": "^13.3.11", + "@virmator/frontend": "^13.3.11", + "@virmator/help": "^13.3.11", + "@virmator/init": "^13.3.11", + "@virmator/lint": "^13.3.11", + "@virmator/publish": "^13.3.11", + "@virmator/spellcheck": "^13.3.11", + "@virmator/test": "^13.3.11", "tsx": "^4.19.0" }, "devDependencies": {