diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6313b56 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +* text=auto eol=lf diff --git a/.github/release-please/config.json b/.github/release-please/config.json index 64e1873..4a0a7f8 100644 --- a/.github/release-please/config.json +++ b/.github/release-please/config.json @@ -1,14 +1,13 @@ { - "packages": { - ".": { - "include-component-in-tag": false, - "release-type": "node", - "changelog-sections": [ - { "type": "feat", "section": "Features", "hidden": false }, - { "type": "fix", "section": "Bug Fixes", "hidden": false }, - { "type": "chore", "section": "Chores", "hidden": false } - ] - } + "packages": { + ".": { + "include-component-in-tag": false, + "release-type": "node", + "changelog-sections": [ + { "type": "feat", "section": "Features", "hidden": false }, + { "type": "fix", "section": "Bug Fixes", "hidden": false }, + { "type": "chore", "section": "Chores", "hidden": false } + ] } + } } - \ No newline at end of file diff --git a/.github/release-please/manifest.json b/.github/release-please/manifest.json index c430287..0451499 100644 --- a/.github/release-please/manifest.json +++ b/.github/release-please/manifest.json @@ -1,3 +1,3 @@ { - ".": "0.2.3" + ".": "0.2.3" } diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 414ef35..5fda9a3 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -28,8 +28,8 @@ jobs: - uses: actions/setup-node@v6.3.0 if: ${{ steps.release.outputs.release_created }} with: - node-version: '24' - registry-url: 'https://registry.npmjs.org' + node-version: "24" + registry-url: "https://registry.npmjs.org" - run: npm install -g npm@latest if: ${{ steps.release.outputs.release_created }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d217483..4c8a2e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: ci +name: Node.js CI on: pull_request: @@ -18,26 +18,55 @@ jobs: strategy: matrix: os: - - macos-15 + - macos-26 + - macos-26-intel - ubuntu-24.04 + - ubuntu-24.04-arm - windows-2025 + - windows-11-arm + include: + - os: macos-26 + display: MacOS 26 ARM + - os: macos-26-intel + display: MacOS 26 Intel + - os: ubuntu-24.04 + display: Ubuntu 24.04 Intel + - os: ubuntu-24.04-arm + display: Ubuntu 24.04 ARM + - os: windows-2025 + display: Windows 11 Intel + - os: windows-11-arm + display: Windows 11 (ARM) fail-fast: false + name: ${{ matrix.display }} + runs-on: ${{ matrix.os }} steps: - name: Checkout repository - uses: actions/checkout@v6.0.2 + uses: actions/checkout@v7.0.1 - - name: Setup Volta - uses: volta-cli/action@v4.2.1 + - name: Setup Node + uses: actions/setup-node@v7.0.0 + with: + node-version: 26 - - name: Install dependencies + - name: Install third party dependencies run: npm ci + - name: Check for third party vulnerabilities + run: npm audit + + - name: Check for formatting errors + run: npm run format + - name: Check for linting errors run: npm run lint + - name: Check for type errors + run: npm run type + - name: Run tests with coverage id: coverage shell: bash @@ -77,7 +106,7 @@ jobs: echo "EOF" >> $GITHUB_OUTPUT - name: Comment on PR - uses: marocchino/sticky-pull-request-comment@v2 + uses: marocchino/sticky-pull-request-comment@v3 with: key: coverage-${{ matrix.os }} header: "Coverage Report – ${{ matrix.os }}" diff --git a/.gitignore b/.gitignore index 510c533..2608fa2 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ node_modules #package cache +types diff --git a/CHANGELOG.md b/CHANGELOG.md index 56ceb67..ca2ae7d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,122 +2,105 @@ ## [0.2.3](https://github.com/nwutils/runner/compare/v0.2.2...v0.2.3) (2026-03-26) - ### Bug Fixes -* **types:** point to correct path ([3c71472](https://github.com/nwutils/runner/commit/3c7147273923f69e1f84cddcf831b0024fab054d)) +- **types:** point to correct path ([3c71472](https://github.com/nwutils/runner/commit/3c7147273923f69e1f84cddcf831b0024fab054d)) ## [0.2.2](https://github.com/nwutils/runner/compare/v0.2.1...v0.2.2) (2026-03-26) - ### Bug Fixes -* **deps:** upgrade flatted ([dc9014b](https://github.com/nwutils/runner/commit/dc9014bfa343fbced4ca69a460dc1bfd6fc8a276)) -* export types ([d2bc8bd](https://github.com/nwutils/runner/commit/d2bc8bd03784af17ebe4ebf762ff3502ea609712)) -* export types ([6ecd02f](https://github.com/nwutils/runner/commit/6ecd02f8a2e4d927c24ae0483bcf8743dc885b09)) +- **deps:** upgrade flatted ([dc9014b](https://github.com/nwutils/runner/commit/dc9014bfa343fbced4ca69a460dc1bfd6fc8a276)) +- export types ([d2bc8bd](https://github.com/nwutils/runner/commit/d2bc8bd03784af17ebe4ebf762ff3502ea609712)) +- export types ([6ecd02f](https://github.com/nwutils/runner/commit/6ecd02f8a2e4d927c24ae0483bcf8743dc885b09)) ## [0.2.1](https://github.com/nwutils/runner/compare/v0.2.0...v0.2.1) (2026-03-04) - ### Chores -* **deps:** remove unused packages ([fcd0ed6](https://github.com/nwutils/runner/commit/fcd0ed610d445549e7b32e12b7b320377aac6e15)) +- **deps:** remove unused packages ([fcd0ed6](https://github.com/nwutils/runner/commit/fcd0ed610d445549e7b32e12b7b320377aac6e15)) ## [0.2.0](https://github.com/nwutils/runner/compare/v0.1.0...v0.2.0) (2026-03-04) - ### Features -* publish to npm ([f80a64d](https://github.com/nwutils/runner/commit/f80a64db3daf26f9265945b75d34f0d59149f992)) - +- publish to npm ([f80a64d](https://github.com/nwutils/runner/commit/f80a64db3daf26f9265945b75d34f0d59149f992)) ### Chores -* add README ([e4e252b](https://github.com/nwutils/runner/commit/e4e252b2b12c084fff80fda7c76e79b1894a0d05)) -* **deps:** bump the gha group in /.github/workflows with 2 updates ([#3](https://github.com/nwutils/runner/issues/3)) ([9c51be9](https://github.com/nwutils/runner/commit/9c51be936a360b5091e0e9cc0e3ef1f7290a512d)) -* **deps:** bump the npm group with 5 updates ([#4](https://github.com/nwutils/runner/issues/4)) ([31e0c4d](https://github.com/nwutils/runner/commit/31e0c4d85cc8838c46f5ec45a19d7844b248eed6)) -* initial cut ([#1](https://github.com/nwutils/runner/issues/1)) ([ec40d49](https://github.com/nwutils/runner/commit/ec40d49c5daa066499913dfe4cf33c6becf7c7dc)) +- add README ([e4e252b](https://github.com/nwutils/runner/commit/e4e252b2b12c084fff80fda7c76e79b1894a0d05)) +- **deps:** bump the gha group in /.github/workflows with 2 updates ([#3](https://github.com/nwutils/runner/issues/3)) ([9c51be9](https://github.com/nwutils/runner/commit/9c51be936a360b5091e0e9cc0e3ef1f7290a512d)) +- **deps:** bump the npm group with 5 updates ([#4](https://github.com/nwutils/runner/issues/4)) ([31e0c4d](https://github.com/nwutils/runner/commit/31e0c4d85cc8838c46f5ec45a19d7844b248eed6)) +- initial cut ([#1](https://github.com/nwutils/runner/issues/1)) ([ec40d49](https://github.com/nwutils/runner/commit/ec40d49c5daa066499913dfe4cf33c6becf7c7dc)) ## [0.2.0](https://github.com/nwutils/getter/compare/v0.1.6...v0.2.0) (2026-01-18) - ### Features -* support file protocol for options.manifestUrl ([#14](https://github.com/nwutils/getter/issues/14)) ([76b00d4](https://github.com/nwutils/getter/commit/76b00d4379f38644329c81ef264d5e67ce427425)) - +- support file protocol for options.manifestUrl ([#14](https://github.com/nwutils/getter/issues/14)) ([76b00d4](https://github.com/nwutils/getter/commit/76b00d4379f38644329c81ef264d5e67ce427425)) ### Bug Fixes -* **deps:** security update for node-tar ([#12](https://github.com/nwutils/getter/issues/12)) ([28f991f](https://github.com/nwutils/getter/commit/28f991f89b51ffc98ab1d0fcc82298ac9496b322)) - +- **deps:** security update for node-tar ([#12](https://github.com/nwutils/getter/issues/12)) ([28f991f](https://github.com/nwutils/getter/commit/28f991f89b51ffc98ab1d0fcc82298ac9496b322)) ### Chores -* lint jsdoc comments ([96d71c2](https://github.com/nwutils/getter/commit/96d71c2fcb9da06bd616b71c5b5d97d62550c888)) +- lint jsdoc comments ([96d71c2](https://github.com/nwutils/getter/commit/96d71c2fcb9da06bd616b71c5b5d97d62550c888)) ## [0.1.6](https://github.com/nwutils/getter/compare/v0.1.5...v0.1.6) (2026-01-17) - ### Bug Fixes -* return NW.js file path ([#9](https://github.com/nwutils/getter/issues/9)) ([3589c17](https://github.com/nwutils/getter/commit/3589c173df07b49698c7ef2899608920f5b37771)) - +- return NW.js file path ([#9](https://github.com/nwutils/getter/issues/9)) ([3589c17](https://github.com/nwutils/getter/commit/3589c173df07b49698c7ef2899608920f5b37771)) ### Chores -* **dependabot:** daily -> monthly ([97deb87](https://github.com/nwutils/getter/commit/97deb8756dc1733dcba43f4830a5a9b1c2f337ab)) -* **test:** cover http request logic ([#11](https://github.com/nwutils/getter/issues/11)) ([97674b1](https://github.com/nwutils/getter/commit/97674b1243d26e44c151cc259a1375d44d3d677f)) +- **dependabot:** daily -> monthly ([97deb87](https://github.com/nwutils/getter/commit/97deb8756dc1733dcba43f4830a5a9b1c2f337ab)) +- **test:** cover http request logic ([#11](https://github.com/nwutils/getter/issues/11)) ([97674b1](https://github.com/nwutils/getter/commit/97674b1243d26e44c151cc259a1375d44d3d677f)) ## [0.1.5](https://github.com/nwutils/getter/compare/v0.1.4...v0.1.5) (2025-11-30) - ### Chores -* enable OIDC ([a8aa7df](https://github.com/nwutils/getter/commit/a8aa7dfbafff961f9b5f3f95d6592e207f039739)) +- enable OIDC ([a8aa7df](https://github.com/nwutils/getter/commit/a8aa7dfbafff961f9b5f3f95d6592e207f039739)) ## [0.1.4](https://github.com/nwutils/getter/compare/v0.1.3...v0.1.4) (2025-11-30) - ### Chores -* **ci:** update npm to latest before publishing ([81eaad3](https://github.com/nwutils/getter/commit/81eaad34a778b2d6fdb6df241d6329ec9a953d98)) +- **ci:** update npm to latest before publishing ([81eaad3](https://github.com/nwutils/getter/commit/81eaad34a778b2d6fdb6df241d6329ec9a953d98)) ## [0.1.3](https://github.com/nwutils/getter/compare/v0.1.2...v0.1.3) (2025-11-30) - ### Chores -* **ci:** add id: release ([c7d9c1c](https://github.com/nwutils/getter/commit/c7d9c1c1182682ee547cda1e3a3da729193b1904)) +- **ci:** add id: release ([c7d9c1c](https://github.com/nwutils/getter/commit/c7d9c1c1182682ee547cda1e3a3da729193b1904)) ## [0.1.2](https://github.com/nwutils/getter/compare/v0.1.1...v0.1.2) (2025-11-30) - ### Bug Fixes -* adopt inversion of control ([#2](https://github.com/nwutils/getter/issues/2)) ([8f87b29](https://github.com/nwutils/getter/commit/8f87b2955e9b939274d2bf0ad8f9f6e25164ae7f)) - +- adopt inversion of control ([#2](https://github.com/nwutils/getter/issues/2)) ([8f87b29](https://github.com/nwutils/getter/commit/8f87b2955e9b939274d2bf0ad8f9f6e25164ae7f)) ### Chores -* **ci:** merge publish into release ([de9dc94](https://github.com/nwutils/getter/commit/de9dc94bb13b3dc061db8b9909ad80650fba307f)) -* **ci:** set fetch-depth to 0 ([9aa6690](https://github.com/nwutils/getter/commit/9aa66909fe30fa22abe6a5c69bddf1515f17b7c1)) -* **ci:** trigger publish job on release event ([a90974e](https://github.com/nwutils/getter/commit/a90974eecc9fa8aad4b1d083d6b0b0746bd53762)) -* **ci:** try trigger npm publish on release.types == published event ([d427207](https://github.com/nwutils/getter/commit/d42720747f47659e84f31762487512efc767ecca)) -* **deps:** configure Dependabot ([0e0a0bf](https://github.com/nwutils/getter/commit/0e0a0bf838e9f9078c1749cb012cfd0142d75de8)) -* **main:** release 0.1.1 ([#4](https://github.com/nwutils/getter/issues/4)) ([fa46f38](https://github.com/nwutils/getter/commit/fa46f38f00aff479e1e6138f6c9b89153ccd1225)) -* migrate from nw-builder ([f78b3d9](https://github.com/nwutils/getter/commit/f78b3d9aa075c740197cbe1f832a8a4b5eb9d8eb)) -* **release-please:** remove last-release-sha ([b7cdf68](https://github.com/nwutils/getter/commit/b7cdf68639251504e719f4cdd4a9a2a2f04e1ae2)) +- **ci:** merge publish into release ([de9dc94](https://github.com/nwutils/getter/commit/de9dc94bb13b3dc061db8b9909ad80650fba307f)) +- **ci:** set fetch-depth to 0 ([9aa6690](https://github.com/nwutils/getter/commit/9aa66909fe30fa22abe6a5c69bddf1515f17b7c1)) +- **ci:** trigger publish job on release event ([a90974e](https://github.com/nwutils/getter/commit/a90974eecc9fa8aad4b1d083d6b0b0746bd53762)) +- **ci:** try trigger npm publish on release.types == published event ([d427207](https://github.com/nwutils/getter/commit/d42720747f47659e84f31762487512efc767ecca)) +- **deps:** configure Dependabot ([0e0a0bf](https://github.com/nwutils/getter/commit/0e0a0bf838e9f9078c1749cb012cfd0142d75de8)) +- **main:** release 0.1.1 ([#4](https://github.com/nwutils/getter/issues/4)) ([fa46f38](https://github.com/nwutils/getter/commit/fa46f38f00aff479e1e6138f6c9b89153ccd1225)) +- migrate from nw-builder ([f78b3d9](https://github.com/nwutils/getter/commit/f78b3d9aa075c740197cbe1f832a8a4b5eb9d8eb)) +- **release-please:** remove last-release-sha ([b7cdf68](https://github.com/nwutils/getter/commit/b7cdf68639251504e719f4cdd4a9a2a2f04e1ae2)) ## [0.1.1](https://github.com/nwutils/getter/compare/v0.1.0...v0.1.1) (2025-11-30) - ### Bug Fixes -* adopt inversion of control ([#2](https://github.com/nwutils/getter/issues/2)) ([8f87b29](https://github.com/nwutils/getter/commit/8f87b2955e9b939274d2bf0ad8f9f6e25164ae7f)) - +- adopt inversion of control ([#2](https://github.com/nwutils/getter/issues/2)) ([8f87b29](https://github.com/nwutils/getter/commit/8f87b2955e9b939274d2bf0ad8f9f6e25164ae7f)) ### Chores -* **ci:** trigger publish job on release event ([a90974e](https://github.com/nwutils/getter/commit/a90974eecc9fa8aad4b1d083d6b0b0746bd53762)) -* **deps:** configure Dependabot ([0e0a0bf](https://github.com/nwutils/getter/commit/0e0a0bf838e9f9078c1749cb012cfd0142d75de8)) -* migrate from nw-builder ([f78b3d9](https://github.com/nwutils/getter/commit/f78b3d9aa075c740197cbe1f832a8a4b5eb9d8eb)) +- **ci:** trigger publish job on release event ([a90974e](https://github.com/nwutils/getter/commit/a90974eecc9fa8aad4b1d083d6b0b0746bd53762)) +- **deps:** configure Dependabot ([0e0a0bf](https://github.com/nwutils/getter/commit/0e0a0bf838e9f9078c1749cb012cfd0142d75de8)) +- migrate from nw-builder ([f78b3d9](https://github.com/nwutils/getter/commit/f78b3d9aa075c740197cbe1f832a8a4b5eb9d8eb)) diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..d607742 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @ayushmanchhabra diff --git a/README.md b/README.md index 08998d2..2143d18 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,13 @@ Run NW.js on Linux, MacOS and Windows hosts. import run from "@nwutils/runner"; const nwProcess = await run({ - version: "latest", - flavor: "normal", - platform: "linux", - arch: "x64", - srcDir: "./src", - cacheDir: "./cache", - argv: [], + version: "latest", + flavor: "normal", + platform: "linux", + arch: "x64", + srcDir: "./src", + cacheDir: "./cache", + argv: [], }); nwProcess.kill(); @@ -31,14 +31,14 @@ nwProcess.kill(); Options -| Name | Type | Description | -| ---- | ---- | ----------- | -| version | `string` | Runtime version | -| flavor | `"normal" \| "sdk"` | Runtime flavor | -| platform | `"linux" \| "osx" \| "win"` | Host platform | -| arch | `"ia32" \| "x64" \| "arm64"` | Host architecture | -| cacheDir | `string` | Directory to cache NW binaries | -| argv | `string[]` | List of CLI arguments to be passed to NW.js. | +| Name | Type | Description | +| -------- | ---------------------------- | -------------------------------------------- | +| version | `string` | Runtime version | +| flavor | `"normal" \| "sdk"` | Runtime flavor | +| platform | `"linux" \| "osx" \| "win"` | Host platform | +| arch | `"ia32" \| "x64" \| "arm64"` | Host architecture | +| cacheDir | `string` | Directory to cache NW binaries | +| argv | `string[]` | List of CLI arguments to be passed to NW.js. | ## Contributing diff --git a/eslint.config.js b/eslint.config.js index ee033dd..214cf44 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,6 +1,7 @@ import js from "@eslint/js"; import { defineConfig } from "eslint/config"; import jsdoc from "eslint-plugin-jsdoc"; +import simpleImportSort from "eslint-plugin-simple-import-sort"; import globals from "globals"; export default defineConfig([ @@ -8,6 +9,7 @@ export default defineConfig([ files: ["**/*.{js,mjs,cjs}"], plugins: { jsdoc, + "simple-import-sort": simpleImportSort, }, languageOptions: { globals: globals.node, diff --git a/package-lock.json b/package-lock.json index 7c1d6a6..473186a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,12 +10,14 @@ "license": "MIT", "devDependencies": { "@eslint/js": "^10.0.1", - "@nwutils/getter": "^0.2.3", - "@types/node": "^25.3.3", - "eslint": "^10.0.2", - "eslint-plugin-jsdoc": "^62.7.1", - "globals": "^17.4.0", - "typescript": "^5.9.3" + "@nwutils/getter": "^0.2.6", + "@types/node": "^26.4.0", + "eslint": "^10.9.1", + "eslint-plugin-jsdoc": "^64.2.1", + "eslint-plugin-simple-import-sort": "^14.0.0", + "globals": "^17.11.0", + "prettier": "^3.9.6", + "typescript": "^7.0.2" } }, "node_modules/@emnapi/core": { @@ -53,20 +55,20 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.84.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.84.0.tgz", - "integrity": "sha512-0xew1CxOam0gV5OMjh2KjFQZsKL2bByX1+q4j3E73MpYIdyUxcZb/xQct9ccUb+ve5KGUYbCUxyPnYB7RbuP+w==", + "version": "0.95.1", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.95.1.tgz", + "integrity": "sha512-LO/RI08Fo9bhXwB7Od9G+1j3eSNq63+ZS5CQO8YLXHbDg6kx6S/DhTeY0+Fc9uZrjK1zZSyTx8Sg5gv5DIoCnA==", "dev": true, "license": "MIT", "dependencies": { - "@types/estree": "^1.0.8", - "@typescript-eslint/types": "^8.54.0", - "comment-parser": "1.4.5", + "@types/estree": "^1.0.9", + "@typescript-eslint/types": "^8.67.0", + "comment-parser": "1.4.8", "esquery": "^1.7.0", - "jsdoc-type-pratt-parser": "~7.1.1" + "jsdoc-type-pratt-parser": "~9.1.2" }, "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" + "node": "^22.22.2 || >=24.15.0" } }, "node_modules/@es-joy/resolve.exports": { @@ -122,37 +124,37 @@ } }, "node_modules/@eslint/config-array": { - "version": "0.23.2", - "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.2.tgz", - "integrity": "sha512-YF+fE6LV4v5MGWRGj7G404/OZzGNepVF8fxk7jqmqo3lrza7a0uUcDnROGRBG1WFC1omYUS/Wp1f42i0M+3Q3A==", + "version": "0.23.5", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.5.tgz", + "integrity": "sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/object-schema": "^3.0.2", + "@eslint/object-schema": "^3.0.5", "debug": "^4.3.1", - "minimatch": "^10.2.1" + "minimatch": "^10.2.4" }, "engines": { "node": "^20.19.0 || ^22.13.0 || >=24" } }, "node_modules/@eslint/config-helpers": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.5.2.tgz", - "integrity": "sha512-a5MxrdDXEvqnIq+LisyCX6tQMPF/dSJpCfBgBauY+pNZ28yCtSsTvyTYrMhaI+LK26bVyCJfJkT0u8KIj2i1dQ==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.7.0.tgz", + "integrity": "sha512-DObd/KKUsU+FaFv4PLxSRenpXfQWmPXXP3pPZ6/K1PCrMu2vQpMDMuQe/BqYeoLcz8ro0bVDF1RxOJgfVEdhUw==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^1.1.0" + "@eslint/core": "^1.2.1" }, "engines": { "node": "^20.19.0 || ^22.13.0 || >=24" } }, "node_modules/@eslint/core": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.1.0.tgz", - "integrity": "sha512-/nr9K9wkr3P1EzFTdFdMoLuo1PmIxjmwvPozwoSodjNBdefGujXQUF93u1DDZpEaTuDvMsIQddsd35BwtrW9Xw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@eslint/core/-/core-1.2.1.tgz", + "integrity": "sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -184,9 +186,9 @@ } }, "node_modules/@eslint/object-schema": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.2.tgz", - "integrity": "sha512-HOy56KJt48Bx8KmJ+XGQNSUMT/6dZee/M54XyUyuvTvPXJmsERRvBchsUVx1UMe1WwIH49XLAczNC7V2INsuUw==", + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-3.0.5.tgz", + "integrity": "sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==", "dev": true, "license": "Apache-2.0", "engines": { @@ -194,13 +196,13 @@ } }, "node_modules/@eslint/plugin-kit": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.6.0.tgz", - "integrity": "sha512-bIZEUzOI1jkhviX2cp5vNyXQc6olzb2ohewQubuYlMXZ2Q/XjBO0x0XhGPvc9fjSIiUN0vw+0hq53BJ4eQSJKQ==", + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.2.tgz", + "integrity": "sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==", "dev": true, "license": "Apache-2.0", "dependencies": { - "@eslint/core": "^1.1.0", + "@eslint/core": "^1.2.1", "levn": "^0.4.1" }, "engines": { @@ -554,14 +556,14 @@ } }, "node_modules/@nwutils/getter": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@nwutils/getter/-/getter-0.2.3.tgz", - "integrity": "sha512-5m9uaWdarN3hzM/ulPcYSGqsN6mM9irPlaBgutDzqXwpUbKtF7INTO7mg+hhvPI7vKwgKZGSOoXYuhJPahOEoA==", + "version": "0.2.6", + "resolved": "https://registry.npmjs.org/@nwutils/getter/-/getter-0.2.6.tgz", + "integrity": "sha512-A2kV0G98eLegx2HR7gGeSmQyGlwX4yBau5bxh2fjkN6kOA3yiMZqM1+j5KUvnaMLQfUABlp3JaQMUMtXsc5XMw==", "dev": true, "license": "MIT", "dependencies": { - "semver": "^7.7.4", - "tar": "^7.5.11", + "semver": "^7.8.5", + "tar": "^7.5.22", "yauzl-promise": "^4.0.0" } }, @@ -597,9 +599,9 @@ "license": "MIT" }, "node_modules/@types/estree": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", - "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", "dev": true, "license": "MIT" }, @@ -611,19 +613,19 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "25.3.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-25.3.3.tgz", - "integrity": "sha512-DpzbrH7wIcBaJibpKo9nnSQL0MTRdnWttGyE5haGwK86xgMOkFLp7vEyfQPGLOJh5wNYiJ3V9PmUMDhV9u8kkQ==", + "version": "26.4.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.4.0.tgz", + "integrity": "sha512-faiGnoIrLH/V8cibOMEAZ8pMw6oXqSukl29ra4mN8GdaB2ZewzeaLj+INpV5N+Z1eKWzY+IzaIZH2EIR6YZRNQ==", "dev": true, "license": "MIT", "dependencies": { - "undici-types": "~7.18.0" + "undici-types": "~8.3.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.56.1", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.56.1.tgz", - "integrity": "sha512-dbMkdIUkIkchgGDIv7KLUpa0Mda4IYjo4IAMJUZ+3xNoUXxMsk9YtKpTHSChRS85o+H9ftm51gsK1dZReY9CVw==", + "version": "8.68.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.68.0.tgz", + "integrity": "sha512-9RnpsGJjrAllCMefGVVsImJM24YurhC0Q1h4UbvivtvOqXmR/vEJge2OoE++z9m6hyg8T1Q8t5SNT6tHSbrxcg==", "dev": true, "license": "MIT", "engines": { @@ -634,10 +636,350 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@typescript/typescript-aix-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-aix-ppc64/-/typescript-aix-ppc64-7.0.2.tgz", + "integrity": "sha512-MTKKkWB7p/0E9xi1d1tHtZ5PiLkGEMIq88pK2CubZjOsLtYTLqhgIgi6zepFa+9GHZ6h05NMCkQxGKiPXMxXtQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-arm64/-/typescript-darwin-arm64-7.0.2.tgz", + "integrity": "sha512-gowzar9MwS/aRWp6f3a4KUqzRjAZjOsmGNCM6LcTgXum+dBfgsBVMN+AgvOCCbguXyick6LJhpBszxMebJ8syA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-darwin-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-darwin-x64/-/typescript-darwin-x64-7.0.2.tgz", + "integrity": "sha512-SZ9xZInqApNlNGc9s0W1VSsktYSOe9cFqNOIqmN1Gs8SmkjKZYFt017G4VwPxASInODuAdbTW7sXiFUf893RgA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-arm64/-/typescript-freebsd-arm64-7.0.2.tgz", + "integrity": "sha512-W5NH4y/J0plIIS5b2xvTEkU7JFxyqdMAOgf+Ilhl0vHQXKO5dZoxd+C/jEtq56c4F3wk71RB4BMRQ2XdI+bwYQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-freebsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-freebsd-x64/-/typescript-freebsd-x64-7.0.2.tgz", + "integrity": "sha512-UMGDx5sTpzNw3WiPebH7l90IWfJggEd+egHt/q6p7/Cm3zqoV7VxkGXt+3DxPIw8CcmvAB0j3sVVfbhX+M4Tpw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm/-/typescript-linux-arm-7.0.2.tgz", + "integrity": "sha512-gffT3xPz9sR7j/YJExkyPntrI0P2EP9XbOyWzth2/Gs0RstK+90RBcO0ncXoXy/beYll1SXw846Nf2zdnEz0QQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-arm64/-/typescript-linux-arm64-7.0.2.tgz", + "integrity": "sha512-Qh4eU4/y3yDjnfjjyPYihMj5/ODIlmt+Bzu17OI+fiSRDW57QmU5SiN63exPRNJPKUzcc1INa1NXdrJ+MqHjUQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-loong64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-loong64/-/typescript-linux-loong64-7.0.2.tgz", + "integrity": "sha512-uEHck9i8hoAzXPiYRib1O7miOnz23SxIeVl6F4LXox+qov1K35jHcEW6VHKvZI+pyvl7fZEP4MCU5LYvIq1GuQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-mips64el": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-mips64el/-/typescript-linux-mips64el-7.0.2.tgz", + "integrity": "sha512-R4KvAMnE43W5Qeqb0Ly56O3mWMWIAgsMyz36DCaycd5nbg/9kzm0liw3JocfRqyJY0KPmzFjbswozXyW0DnIYA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-ppc64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-ppc64/-/typescript-linux-ppc64-7.0.2.tgz", + "integrity": "sha512-DORx5b3sd/4S7eayxm4FQv+A7CrkUIGRaHiwI8oiHTAI1fAPWhF4J0vAlkC8biAlHSVVwxMQ3tjZ2/DVbnQiiA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-riscv64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-riscv64/-/typescript-linux-riscv64-7.0.2.tgz", + "integrity": "sha512-wf0jqEDOjrPRnKwYRyyJDRo11KMbvMFrU+q4zqKyChODBzvlkbhNQfKvLxQCcwTpdDaXSHZTVuh0JoCrKCUMHQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-s390x": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-s390x/-/typescript-linux-s390x-7.0.2.tgz", + "integrity": "sha512-IkwJc3L7yhytWd/ewjyxNDfOmswCm9GWMJT/ue/dU4aZNbwZeYAetq42VyLmsmSjvoX7z74X6ZaYCtzAr0EuGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-linux-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-linux-x64/-/typescript-linux-x64-7.0.2.tgz", + "integrity": "sha512-EYdf2cNg7rgCWJnxCdJ+F3V39O8ihb37eHAu1LK8oAFizgTQbPOK7zHHXbPt8rX24COqODXeI3sIf0fCXG7H/A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-arm64/-/typescript-netbsd-arm64-7.0.2.tgz", + "integrity": "sha512-+polYF4MF04aPpO5FTkHran9yUQDSXqy5GiSDKpsll5jy3l3+g9QLhpf39T+ePtefhXLOGrLl0QIjkQP6VnelA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-netbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-netbsd-x64/-/typescript-netbsd-x64-7.0.2.tgz", + "integrity": "sha512-8YIT0EHM/3dq10ZOVF/A7pc/YSMtbcecct4rWtexrnSCHOPcpC2KTLXfTCR6vDpnSiY12heNb1GiN/wu+T/FyA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-arm64/-/typescript-openbsd-arm64-7.0.2.tgz", + "integrity": "sha512-APT8+ClYnuYm1u9+kgGXoMj2VzWzcymwh2gNSQVySHfkRDGOTVkoWLjCmOQSaO+PoqQ57B0flRp9SA+7GnnkzQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-openbsd-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-openbsd-x64/-/typescript-openbsd-x64-7.0.2.tgz", + "integrity": "sha512-yX7s+Q0Dln0Dt9tEzZsAjXXR/+ytBM7AlglaqyeMPxQszJ1JhlJdZ6jLA+IzldHtflX81em7lDao1xXu+aRRkg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-sunos-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-sunos-x64/-/typescript-sunos-x64-7.0.2.tgz", + "integrity": "sha512-dLJDGaLZ1D4HPQn62u1n8mBDkJREwMsAkCdkwd4Ieqw+x3TUyTsqY0YiBCtE6H6OzzgGk3iuZ3vFWRS+E8/d1g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-arm64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-arm64/-/typescript-win32-arm64-7.0.2.tgz", + "integrity": "sha512-Gyl1Vy6OsWesLzmq+EP0Fb7b4Nid5232AvcA2SFcdYreldpNtYFFofPjnt62y9hQy7VTaZp65ICJjuAQRaVcIQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, + "node_modules/@typescript/typescript-win32-x64": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/@typescript/typescript-win32-x64/-/typescript-win32-x64-7.0.2.tgz", + "integrity": "sha512-0BQ3HkAHHlKLSp1qRvf3SUhGpGsDuhB/jgFw75guyqbxJqEaS0Cw/VFO8i2nHglJUzQCRtMMR/IBAKE3ETMC4g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16.20.0" + } + }, "node_modules/acorn": { - "version": "8.16.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.16.0.tgz", - "integrity": "sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.18.0.tgz", + "integrity": "sha512-lGq+9yr1/GuAWaVYIHRjvvySG5/4VfKIvC8EWxStPdcDh/Ka7FG3twP6v4d5BkravUilhIAsG4Qj83t02LWUPQ==", "dev": true, "license": "MIT", "bin": { @@ -675,13 +1017,13 @@ } }, "node_modules/are-docs-informative": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", - "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.1.1.tgz", + "integrity": "sha512-sqRsNQBwbKLRX0jV5Cu5uzmtflf892n4Vukz7T659ebL4pz3mpOqCMU7lxMoBTFwnp10E3YB5ZcyHM41W5bcDA==", "dev": true, "license": "MIT", "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/balanced-match": { @@ -695,16 +1037,16 @@ } }, "node_modules/brace-expansion": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", - "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", + "version": "5.0.9", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.9.tgz", + "integrity": "sha512-ScQ4IuvIEF1TMlP7Zt+vjJ//9zlPb2SDcxWxM3bk8s6t6GGdJ7KO1dCcTidOPJKePW30LE/2cT7wCyPho9/Wxg==", "dev": true, "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" }, "engines": { - "node": "18 || 20 || >=22" + "node": "20 || >=22" } }, "node_modules/chownr": { @@ -718,9 +1060,9 @@ } }, "node_modules/comment-parser": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.5.tgz", - "integrity": "sha512-aRDkn3uyIlCFfk5NUA+VdwMmMsh8JGhc4hapfV4yxymHGQ3BVskMQfoXGpCo5IoBuQ9tS5iiVKhCpTcB4pW4qw==", + "version": "1.4.8", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.8.tgz", + "integrity": "sha512-rKZTGo4fzKYna8UcL0isTg5wkBNla7bxTypLwZQXjIdi++IdP1OJ41rI5Mti3/jltkPujbu4i9LIARYA+zpotQ==", "dev": true, "license": "MIT", "engines": { @@ -837,18 +1179,21 @@ } }, "node_modules/eslint": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.0.2.tgz", - "integrity": "sha512-uYixubwmqJZH+KLVYIVKY1JQt7tysXhtj21WSvjcSmU5SVNzMus1bgLe+pAt816yQ8opKfheVVoPLqvVMGejYw==", + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.9.1.tgz", + "integrity": "sha512-9VaAkDURekixUQJy0oJYl2DcN6oKMfxay7XzaGYAWQwsb6qfKf+x76R2k1L8kb1boc+FyCAaTA9GmiKaaiaF+A==", "dev": true, "license": "MIT", + "workspaces": [ + "packages/*" + ], "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.2", - "@eslint/config-array": "^0.23.2", - "@eslint/config-helpers": "^0.5.2", - "@eslint/core": "^1.1.0", - "@eslint/plugin-kit": "^0.6.0", + "@eslint/config-array": "^0.23.5", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.2", "@humanfs/node": "^0.16.6", "@humanwhocodes/module-importer": "^1.0.1", "@humanwhocodes/retry": "^0.4.2", @@ -857,9 +1202,9 @@ "cross-spawn": "^7.0.6", "debug": "^4.3.2", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^9.1.1", + "eslint-scope": "^9.1.2", "eslint-visitor-keys": "^5.0.1", - "espree": "^11.1.1", + "espree": "^11.2.0", "esquery": "^1.7.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -870,7 +1215,7 @@ "imurmurhash": "^0.1.4", "is-glob": "^4.0.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "minimatch": "^10.2.1", + "minimatch": "^10.2.5", "natural-compare": "^1.4.0", "optionator": "^0.9.3" }, @@ -893,38 +1238,61 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "62.7.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-62.7.1.tgz", - "integrity": "sha512-4Zvx99Q7d1uggYBUX/AIjvoyqXhluGbbKrRmG8SQTLprPFg6fa293tVJH1o1GQwNe3lUydd8ZHzn37OaSncgSQ==", + "version": "64.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-64.2.1.tgz", + "integrity": "sha512-6GpSYxLPcbMw38S94Cngrgs1Zv8yLinQS1O17OxJVZ6deLbrMRCERUYQKceweSqEuG2kx5Amn4l3aKPkCp4geQ==", "dev": true, "license": "BSD-3-Clause", "dependencies": { - "@es-joy/jsdoccomment": "~0.84.0", + "@es-joy/jsdoccomment": "~0.95.1", "@es-joy/resolve.exports": "1.2.0", - "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.5", + "are-docs-informative": "^0.1.1", + "comment-parser": "1.4.8", "debug": "^4.4.3", - "escape-string-regexp": "^4.0.0", - "espree": "^11.1.0", + "escape-string-regexp": "^5.0.0", + "espree": "^11.2.0", "esquery": "^1.7.0", "html-entities": "^2.6.0", - "object-deep-merge": "^2.0.0", + "object-deep-merge": "^2.0.1", "parse-imports-exports": "^0.2.4", - "semver": "^7.7.4", - "spdx-expression-parse": "^4.0.0", + "semver": "^7.8.5", + "spdx-expression-parse": "^5.0.0", "to-valid-identifier": "^1.0.0" }, "engines": { - "node": "^20.19.0 || ^22.13.0 || >=24" + "node": "^22.22.2 || >=24.15.0" }, "peerDependencies": { "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0" } }, + "node_modules/eslint-plugin-jsdoc/node_modules/escape-string-regexp": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-5.0.0.tgz", + "integrity": "sha512-/veY75JbMK4j1yjvuUxuVsiS/hr/4iHs9FTT6cgTexxdE0Ly/glccBAkloH/DofkjRbZU3bnoj38mOmhkZ0lHw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-plugin-simple-import-sort": { + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-simple-import-sort/-/eslint-plugin-simple-import-sort-14.0.0.tgz", + "integrity": "sha512-NUJO0+XFCkk+o5EsAJruTgnfMEpeWrPWeJS15UVF60GgXmqz1BJ9/3hzlvG7lkL8Bubzos5cCLptThbFfPnSMQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "eslint": ">=5.0.0" + } + }, "node_modules/eslint-scope": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.1.tgz", - "integrity": "sha512-GaUN0sWim5qc8KVErfPBWmc31LEsOkrUJbvJZV+xuL3u2phMUK4HIvXlWAakfC8W4nzlK+chPEAkYOYb5ZScIw==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-9.1.2.tgz", + "integrity": "sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -954,9 +1322,9 @@ } }, "node_modules/espree": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/espree/-/espree-11.1.1.tgz", - "integrity": "sha512-AVHPqQoZYc+RUM4/3Ly5udlZY/U4LS8pIG05jEjWM2lQMU/oaZ7qshzAl2YP1tfNmXfftH3ohurfwNAug+MnsQ==", + "version": "11.2.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-11.2.0.tgz", + "integrity": "sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -1103,9 +1471,9 @@ } }, "node_modules/globals": { - "version": "17.4.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-17.4.0.tgz", - "integrity": "sha512-hjrNztw/VajQwOLsMNT1cbJiH2muO3OROCHnbehc8eY5JyD2gqz4AcMHPqgaOR59DjgUjYAYLeH699g/eWi2jw==", + "version": "17.11.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-17.11.0.tgz", + "integrity": "sha512-Z2I8hM+PbJDXQDq3Icgpzv+mPdwr68iZUU9d5WW4FuXfDUQfkZaZuvjMv42/5crNyw154+9+VWXbYrUgDXbxNw==", "dev": true, "license": "MIT", "engines": { @@ -1239,13 +1607,16 @@ "license": "ISC" }, "node_modules/jsdoc-type-pratt-parser": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-7.1.1.tgz", - "integrity": "sha512-/2uqY7x6bsrpi3i9LVU6J89352C0rpMk0as8trXxCtvd4kPk1ke/Eyif6wqfSLvoNJqcDG9Vk4UsXgygzCt2xA==", + "version": "9.1.2", + "resolved": "https://registry.npmjs.org/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-9.1.2.tgz", + "integrity": "sha512-9EXymowgk1mb9RY1VxuwKc+AhaxfBk2CV0dWxgGM+l5RURTtiUoAx7MlKwcsiVcEXK5HEPa7FeH/tsRpqjEPRg==", "dev": true, "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.9" + }, "engines": { - "node": ">=20.0.0" + "node": "^22.22.2 || >=24.15.0" } }, "node_modules/json-buffer": { @@ -1310,13 +1681,13 @@ } }, "node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "version": "10.2.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.6.tgz", + "integrity": "sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.2" + "brace-expansion": "^5.0.8" }, "engines": { "node": "18 || 20 || >=22" @@ -1363,9 +1734,9 @@ "license": "MIT" }, "node_modules/object-deep-merge": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/object-deep-merge/-/object-deep-merge-2.0.0.tgz", - "integrity": "sha512-3DC3UMpeffLTHiuXSy/UG4NOIYTLlY9u3V82+djSCLYClWobZiS4ivYzpIUWrRY/nfsJ8cWsKyG3QfyLePmhvg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/object-deep-merge/-/object-deep-merge-2.0.1.tgz", + "integrity": "sha512-aKttDKcU3pyZqKcCkDhsMn70WmZFG2JGDQLP9EcLyTSIFQRCPWLAmBZRLJnrVUrhPG1jETEEbfdgbNtJf1LyMg==", "dev": true, "license": "MIT" }, @@ -1476,6 +1847,22 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.9.6", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.9.6.tgz", + "integrity": "sha512-OpN0zzVdiaiAhxpuuj5efpIS4sY9j7bY6uR5mnj5yPzGkdkjNKSJeUThPb60Jw29QuAZgA4o+/iB49kFiaBX6g==", + "dev": true, + "license": "MIT", + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, "node_modules/punycode": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", @@ -1500,9 +1887,9 @@ } }, "node_modules/semver": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.4.tgz", - "integrity": "sha512-vFKC2IEtQnVhpT78h1Yp8wzwrf8CM+MzKMHGJZfBtzhZNycRFnXsHk6E5TxIkkMsgNS7mdX3AGB7x2QM2di4lA==", + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", "dev": true, "license": "ISC", "bin": { @@ -1553,9 +1940,9 @@ "license": "CC-BY-3.0" }, "node_modules/spdx-expression-parse": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", - "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-5.0.0.tgz", + "integrity": "sha512-vngmw3Rgn+o2arXNbnZaj5UtOEBuWBfvaI+Wc8GFfykIhA5/vdK9/Sp/XkLv63dykz2rxKDvKEHupF5P0FORcQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1564,16 +1951,16 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.22", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.22.tgz", - "integrity": "sha512-4PRT4nh1EImPbt2jASOKHX7PB7I+e4IWNLvkKFDxNhJlfjbYlleYQh285Z/3mPTHSAK/AvdMmw5BNNuYH8ShgQ==", + "version": "3.0.23", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.23.tgz", + "integrity": "sha512-CWLcCCH7VLu13TgOH+r8p1O/Znwhqv/dbb6lqWy67G+pT1kHmeD/+V36AVb/vq8QMIQwVShJ6Ssl5FPh0fuSdw==", "dev": true, "license": "CC0-1.0" }, "node_modules/tar": { - "version": "7.5.13", - "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.13.tgz", - "integrity": "sha512-tOG/7GyXpFevhXVh8jOPJrmtRpOTsYqUIkVdVooZYJS/z8WhfQUX8RJILmeuJNinGAMSu1veBr4asSHFt5/hng==", + "version": "7.5.22", + "resolved": "https://registry.npmjs.org/tar/-/tar-7.5.22.tgz", + "integrity": "sha512-MFO/QzvtAOmJbkhOaCTvbGcFN9L9b+JunIsDwaKljSOdcLMea3NJ1k9Usz/rjdfSXTq4dfzfeS7W4p4YOAAHeA==", "dev": true, "license": "BlueOak-1.0.0", "dependencies": { @@ -1626,23 +2013,44 @@ } }, "node_modules/typescript": { - "version": "5.9.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", - "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-7.0.2.tgz", + "integrity": "sha512-8FYau96o3NKOhbjKi/qNvG/W5jhzxkbdm5sj9AbZ/5T5sWqn3hJgLfGx27sRKZWTvyzCP8dLRBTf5tBTSRVUNA==", "dev": true, "license": "Apache-2.0", "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "tsc": "bin/tsc" }, "engines": { - "node": ">=14.17" + "node": ">=16.20.0" + }, + "optionalDependencies": { + "@typescript/typescript-aix-ppc64": "7.0.2", + "@typescript/typescript-darwin-arm64": "7.0.2", + "@typescript/typescript-darwin-x64": "7.0.2", + "@typescript/typescript-freebsd-arm64": "7.0.2", + "@typescript/typescript-freebsd-x64": "7.0.2", + "@typescript/typescript-linux-arm": "7.0.2", + "@typescript/typescript-linux-arm64": "7.0.2", + "@typescript/typescript-linux-loong64": "7.0.2", + "@typescript/typescript-linux-mips64el": "7.0.2", + "@typescript/typescript-linux-ppc64": "7.0.2", + "@typescript/typescript-linux-riscv64": "7.0.2", + "@typescript/typescript-linux-s390x": "7.0.2", + "@typescript/typescript-linux-x64": "7.0.2", + "@typescript/typescript-netbsd-arm64": "7.0.2", + "@typescript/typescript-netbsd-x64": "7.0.2", + "@typescript/typescript-openbsd-arm64": "7.0.2", + "@typescript/typescript-openbsd-x64": "7.0.2", + "@typescript/typescript-sunos-x64": "7.0.2", + "@typescript/typescript-win32-arm64": "7.0.2", + "@typescript/typescript-win32-x64": "7.0.2" } }, "node_modules/undici-types": { - "version": "7.18.2", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-7.18.2.tgz", - "integrity": "sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz", + "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==", "dev": true, "license": "MIT" }, diff --git a/package.json b/package.json index 95bf407..8df2bba 100644 --- a/package.json +++ b/package.json @@ -39,21 +39,37 @@ "url": "git+https://github.com/nwutils/runner.git" }, "scripts": { + "format": "prettier --check .", + "format:fix": "prettier --write .", "lint": "eslint .", + "lint:fix": "eslint . --fix", "type": "tsc", "test": "node --test --experimental-test-coverage --test-coverage-exclude=\"tests/**/*\" \"tests/specs/*.test.js\"" }, - "volta": { - "node": "25.2.1", - "npm": "11.11.0" - }, "devDependencies": { "@eslint/js": "^10.0.1", - "@nwutils/getter": "^0.2.3", - "@types/node": "^25.3.3", - "eslint": "^10.0.2", - "eslint-plugin-jsdoc": "^62.7.1", - "globals": "^17.4.0", - "typescript": "^5.9.3" + "@nwutils/getter": "^0.2.6", + "@types/node": "^26.4.0", + "eslint": "^10.9.1", + "eslint-plugin-jsdoc": "^64.2.1", + "eslint-plugin-simple-import-sort": "^14.0.0", + "globals": "^17.11.0", + "prettier": "^3.9.6", + "typescript": "^7.0.2" + }, + "devEngines": { + "runtime": { + "name": "node", + "version": "26.1.0", + "onFail": "warn" + }, + "packageManager": { + "name": "npm", + "version": "12.0.1", + "onFail": "warn" + } + }, + "prettier": { + "endOfLine": "lf" } } diff --git a/src/main.js b/src/main.js index e47908f..cd0d964 100644 --- a/src/main.js +++ b/src/main.js @@ -1,5 +1,5 @@ -import child_process from 'node:child_process'; -import path from 'node:path'; +import child_process from "node:child_process"; +import path from "node:path"; /** * @typedef {object} Options @@ -12,6 +12,18 @@ import path from 'node:path'; * @property {string[]} argv CLI arguments */ +const EXE_NAME = { + win: "nw.exe", + osx: "nwjs.app/Contents/MacOS/nwjs", + linux: "nw", +}; + +const VALID_ARCHES = ["ia32", "x64", "arm64"]; + +const VALID_FLAVORS = ["normal", "sdk"]; + +const VALID_VERSION = /^(latest|stable|lts|[\w.+-]+)$/; + /** * Run NW.js application. * @async @@ -28,33 +40,54 @@ async function run({ cacheDir, argv, }) { + if (!Object.prototype.hasOwnProperty.call(EXE_NAME, platform)) { + throw new Error(`Invalid platform: ${platform}`); + } + + if (!VALID_ARCHES.includes(arch)) { + throw new Error(`Invalid arch: ${arch}`); + } + + if (!VALID_FLAVORS.includes(flavor)) { + throw new Error(`Invalid flavor: ${flavor}`); + } + + if ( + typeof version !== "string" || + !VALID_VERSION.test(version) || + version.includes("..") + ) { + throw new Error(`Invalid version: ${version}`); + } + + const resolvedCacheDir = path.resolve(cacheDir); + const nwDir = path.resolve( - cacheDir, - `nwjs${flavor === 'sdk' ? '-sdk' : ''}-v${version}-${platform}-${arch}`, + resolvedCacheDir, + `nwjs${flavor === "sdk" ? "-sdk" : ""}-v${version}-${platform}-${arch}`, ); - const EXE_NAME = { - win: 'nw.exe', - osx: 'nwjs.app/Contents/MacOS/nwjs', - linux: 'nw', - }; - const nwExe = path.resolve(nwDir, EXE_NAME[platform]); + if ( + nwExe !== resolvedCacheDir && + !nwExe.startsWith(resolvedCacheDir + path.sep) + ) { + throw new Error("Resolved executable path escapes cacheDir"); + } + /** * @type {child_process.ChildProcess | null} */ - let nwProcess = child_process.spawn( - nwExe, - [...[srcDir], ...argv], - { stdio: 'inherit' }, - ); + let nwProcess = child_process.spawn(nwExe, [...[srcDir], ...argv], { + stdio: "inherit", + }); - nwProcess.on('close', () => { + nwProcess.on("close", () => { // define callback on close }); - nwProcess.on('error', () => { + nwProcess.on("error", () => { // define callback on error }); diff --git a/tests/fixtures/app/index.html b/tests/fixtures/app/index.html index 142d38e..d728733 100644 --- a/tests/fixtures/app/index.html +++ b/tests/fixtures/app/index.html @@ -1,11 +1,11 @@ - + -
- - + + +