From 889d62d295f6e0f02c02c78b4b1a4392f40a6462 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 26 Nov 2026 15:52:46 +0100 Subject: [PATCH 01/48] feat(coverage): support native GitHub Code Quality reports --- .github/workflows/__test-action-test.yml | 9 ++++ ...__test-workflow-continuous-integration.yml | 14 ++++- .github/workflows/continuous-integration.yml | 31 +++++++++++ actions/test/action.yml | 51 ++++++++++++++++--- .../fixtures/vitest.config.mjs | 2 +- tests/continuous-integration/workflow.test.js | 28 ++++++++-- 6 files changed, 123 insertions(+), 12 deletions(-) diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index e9c84ca2..44e48a55 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -20,6 +20,14 @@ jobs: report-file: ".reports/junit.xml,.reports/lcov.info" expected: success artifact: true + - scenario: coverage disabled retains test diagnostics + failure: false + reports: true + report-file: .reports/junit.xml + coverage-disabled: true + expected: success + artifact: true + artifact-files: '["junit.xml"]' - scenario: failed test with reports failure: true reports: true @@ -86,6 +94,7 @@ jobs: comment: "false" command: ${{ matrix.reports && 'test:ci' || 'test:no-reports' }} report-file: ${{ matrix.report-file }} + coverage: ${{ !matrix.coverage-disabled && 'github' || '' }} - name: Assert - Retrieve reports even after a failed test if: steps.test.outputs.report-artifact-id != '' uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index b09ca36b..f6a031c8 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -22,7 +22,7 @@ jobs: code-ql: "" dependency-review: false test: | - {"command":"test:vitest","shards":2,"comment":false,"report-group":"sharded-host","report-file":"coverage/sharding/junit.xml,coverage/sharding/lcov.info"} + {"command":"test:vitest","shards":2,"comment":false,"report-group":"sharded-host","coverage":"github-code-quality","coverage-reports":[{"file":"coverage/sharding/cobertura-coverage.xml","language":"JavaScript","label":"sharded-host"}],"report-file":"coverage/sharding/junit.xml,coverage/sharding/lcov.info"} sharded-container: name: Validate sharded Vitest in the existing fixture image @@ -570,3 +570,15 @@ jobs: - name: Check the build artifacts run: test -f ${{ runner.temp }}/usr/src/app/dist/test.txt # jscpd:ignore-end + + collect-native-coverage: + name: Verify coverage after the complete shard merge + needs: sharded-host + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@71ce8b3ff53d6673617b19fa01d6637c916d4948 # coverage support (PR #683, unreleased) + permissions: + contents: read + pull-requests: write + with: + comment: false + job-results: ${{ toJSON(needs) }} + coverage-reports: '[{"job":"sharded-host","label":"sharded-host"}]' diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 86cb696c..024fc91e 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -130,6 +130,14 @@ on: Set to `null` or empty to disable. Accepts a JSON object for test options. See [test action](../../actions/test/README.md). If coverage is enabled, it should generate test and coverage reports in standard formats. + `coverage: github-code-quality` prepares Cobertura for the common native publication workflow. + Configure the project's Cobertura reporter; the default path is coverage/cobertura-coverage.xml. + Optional `coverage-reports` is an array of {file, language, label} for distinct components. + Builds, tests and shard merges use the PR head in native mode; retain merge-result testing + separately when required. Set report-group to the outer caller job ID and list every + component in the common ci-reports coverage inventory before calling publish-coverage. + Prebuilt containers without Git metadata require coverage-source-sha and coverage-source-prefix. + Shards publish only the final merged reports; never upload individual shards. Optional `arguments` is a JSON array passed to the package script without shell expansion. Set `shards` to an integer from 2 to 256 to enable Vitest blob sharding (default: 1). Only tests are replicated; shards run with fail-fast disabled and concurrency limited to their count. @@ -275,6 +283,9 @@ jobs: test-enabled: ${{ steps.test-options.outputs.enabled }} test-command: ${{ steps.test-options.outputs.command }} test-coverage: ${{ steps.test-options.outputs.coverage }} + test-coverage-reports: ${{ steps.test-options.outputs.coverage-reports }} + test-coverage-source-sha: ${{ steps.test-options.outputs.coverage-source-sha }} + test-coverage-source-prefix: ${{ steps.test-options.outputs.coverage-source-prefix }} test-comment: ${{ steps.test-options.outputs.comment }} test-report-group: ${{ steps.test-options.outputs.report-group }} test-report-file: ${{ steps.test-options.outputs.report-file }} @@ -310,6 +321,14 @@ jobs: if (testOptions.coverage === undefined) { testOptions.coverage = 'github'; } + if (testOptions.coverage === null || testOptions.coverage === 'null') testOptions.coverage = ''; + if (!['', 'github', 'github-code-quality', 'codecov'].includes(testOptions.coverage)) throw new Error('Unsupported test.coverage destination.'); + if (testOptions['coverage-reports'] !== undefined && !Array.isArray(testOptions['coverage-reports'])) throw new Error('test.coverage-reports must be an array.'); + for (const key of ['coverage-source-sha', 'coverage-source-prefix']) { + if (testOptions[key] !== undefined && typeof testOptions[key] !== 'string') throw new Error(`test.${key} must be a string.`); + core.setOutput(key, testOptions[key] || ''); + } + core.setOutput('coverage-reports', testOptions['coverage-reports']?.length ? JSON.stringify(testOptions['coverage-reports']) : ''); if (testOptions.comment !== undefined && typeof testOptions.comment !== 'boolean') { throw new Error('test.comment must be a boolean.'); } @@ -693,6 +712,8 @@ jobs: steps: - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 if: inputs.container == '' + with: + ref: ${{ needs.prepare.outputs.test-coverage == 'github-code-quality' && github.event.pull_request.head.sha || github.sha }} - id: build-artifact if: needs.prepare.outputs.build-artifact @@ -747,6 +768,8 @@ jobs: steps: - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 if: inputs.container == '' + with: + ref: ${{ needs.prepare.outputs.test-coverage == 'github-code-quality' && github.event.pull_request.head.sha || github.sha }} - if: needs.build.outputs.artifact-id && inputs.container == '' uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 @@ -765,6 +788,9 @@ jobs: shard: ${{ needs.prepare.outputs.test-shards != '1' && format('{0}/{1}', matrix.shard, needs.prepare.outputs.test-shards) || '' }} shard-group: ${{ format('ci-test-{0}-{1}-{2}', github.run_id, github.run_attempt, needs.prepare.outputs.test-group) }} coverage: ${{ needs.prepare.outputs.test-coverage }} + coverage-reports: ${{ needs.prepare.outputs.test-coverage-reports }} + coverage-source-sha: ${{ needs.prepare.outputs.test-coverage-source-sha }} + coverage-source-prefix: ${{ needs.prepare.outputs.test-coverage-source-prefix }} comment: ${{ needs.prepare.outputs.test-comment }} report-group: ${{ needs.prepare.outputs.test-report-group }} report-file: ${{ needs.prepare.outputs.test-report-file }} @@ -788,6 +814,8 @@ jobs: steps: - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 if: inputs.container == '' + with: + ref: ${{ needs.prepare.outputs.test-coverage == 'github-code-quality' && github.event.pull_request.head.sha || github.sha }} - if: needs.build.outputs.artifact-id && inputs.container == '' uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 @@ -806,6 +834,9 @@ jobs: merge-shards: ${{ needs.prepare.outputs.test-shards }} shard-group: ${{ format('ci-test-{0}-{1}-{2}', github.run_id, github.run_attempt, needs.prepare.outputs.test-group) }} coverage: ${{ needs.prepare.outputs.test-coverage }} + coverage-reports: ${{ needs.prepare.outputs.test-coverage-reports }} + coverage-source-sha: ${{ needs.prepare.outputs.test-coverage-source-sha }} + coverage-source-prefix: ${{ needs.prepare.outputs.test-coverage-source-prefix }} comment: ${{ needs.prepare.outputs.test-comment }} report-group: ${{ needs.prepare.outputs.test-report-group }} report-file: ${{ needs.prepare.outputs.test-report-file }} diff --git a/actions/test/action.yml b/actions/test/action.yml index 95218141..4b72c7f1 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -13,6 +13,14 @@ description: | id-token: write ``` + Native `coverage: github-code-quality` prepares Cobertura artifacts for the common + [CI reports workflow](https://github.com/hoverkraft-tech/ci-github-common/blob/main/.github/workflows/ci-reports.md) + and its opt-in publication workflow. Set `report-group` to the outer calling job + and list every expected component in the collector. The default label is the + repository-relative working directory, or `root`. Multiple reports need explicit + stable labels. Reports must measure the PR head commit, not the PR merge commit. + Keep merge-result validation separately when required. No upload permission is + needed in this test action; only the publication job needs `code-quality: write`. author: hoverkraft branding: icon: check-square @@ -45,10 +53,24 @@ inputs: Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage` required: false default: "test:ci" + coverage-source-sha: + description: Tested source commit for a prebuilt container without Git metadata. Must equal the PR head or push SHA. + default: "" + coverage-source-prefix: + description: Repository-relative directory represented by the container working-directory. Required with coverage-source-sha when Git metadata is absent; use a dot for the repository root. + default: "" + coverage-reports: + description: | + Native GitHub coverage reports as a JSON array of file, language and optional label. + Empty uses coverage/cobertura-coverage.xml; multiple reports require explicit unique labels. + Every file must be Cobertura XML produced by the test command. Paths are relative + to working-directory. Example: [{"file":"coverage.xml","language":"JavaScript","label":"backend"}]. + default: "" coverage: description: | Code coverage reporter to use. Supported values: - `github`: Parse coverage reports via [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action, with GitHub summaries/PR comments + - `github-code-quality`: Prepare Cobertura for the common native publication workflow - `codecov`: Upload coverage to Codecov - `""` or `null`: No coverage reporting required: false @@ -88,7 +110,7 @@ inputs: Multiple entries can be separated by newlines, commas, or semicolons. Each explicit path or glob must match a file after exclusions; missing reports fail the action. When omitted, `auto:test,auto:coverage` detection may find no reports. - Applies only when coverage is `github`. + Test reports are collected independently of the coverage destination. required: false default: "" path-mapping: @@ -117,6 +139,9 @@ inputs: default: "" outputs: + native-coverage-artifact-id: + description: Cobertura artifact for native GitHub publication, empty unless github-code-quality is selected. + value: ${{ steps.native-coverage.outputs.artifact-id }} report-artifact-id: description: Native test and coverage artifact ID, empty when GitHub reports are unavailable. value: ${{ steps.upload-reports.outputs.artifact-id }} @@ -140,12 +165,15 @@ runs: env: NODE_ACTION_PATH: ${{ github.action_path }} WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }} + COVERAGE_DESTINATION: ${{ inputs.coverage }} + TEST_COMMIT: ${{ inputs.coverage == 'github-code-quality' && (github.event.pull_request.head.sha || github.sha) || github.sha }} TEST_ARGUMENTS: ${{ inputs.arguments }} TEST_SHARD: ${{ inputs.shard }} SHARD_GROUP: ${{ inputs.shard-group }} MERGE_SHARDS: ${{ inputs.merge-shards }} with: script: | + if (!['', 'null', 'github', 'github-code-quality', 'codecov'].includes(process.env.COVERAGE_DESTINATION)) throw new Error('Unsupported coverage destination.'); const { TestShards } = require(`${process.env.NODE_ACTION_PATH}/TestShards.cjs`); const configuration = { workingDirectory: process.env.WORKING_DIRECTORY, @@ -156,7 +184,7 @@ runs: identity: { runId: process.env.GITHUB_RUN_ID, attempt: process.env.GITHUB_RUN_ATTEMPT, - sha: process.env.GITHUB_SHA + sha: process.env.TEST_COMMIT } }; const shards = new TestShards(configuration); @@ -275,14 +303,14 @@ runs: if-no-files-found: error retention-days: 7 - - name: 📊 Parse coverage reports - if: always() && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') && inputs.coverage == 'github' + - name: 📊 Parse test and coverage reports + if: always() && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') id: parse-coverage-reports uses: hoverkraft-tech/ci-github-common/actions/quality/parse-ci-reports@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} - report-name: "Coverage Results" - report-paths: ${{ inputs.report-file || 'auto:test,auto:coverage' }} + report-name: "Test and Coverage Results" + report-paths: ${{ inputs.report-file || ((inputs.coverage == 'github' || inputs.coverage == 'github-code-quality') && 'auto:test,auto:coverage' || 'auto:test') }} path-mapping: ${{ inputs.path-mapping }} output-format: "summary,markdown" @@ -338,3 +366,14 @@ runs: SHARD_DIRECTORY: ${{ steps.prepare-test.outputs.directory }} with: script: await io.rmRF(process.env.SHARD_DIRECTORY); + + - name: Prepare native GitHub coverage + id: native-coverage + if: ${{ !cancelled() && steps.run-test.outcome != 'skipped' && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') && inputs.coverage == 'github-code-quality' }} + uses: hoverkraft-tech/ci-github-common/actions/quality/coverage-reports@71ce8b3ff53d6673617b19fa01d6637c916d4948 # coverage support (PR #683, unreleased) + with: + working-directory: ${{ steps.working-directory.outputs.absolute-path }} + report-group: ${{ inputs.report-group || github.job }} + reports: ${{ inputs.coverage-reports || '[{"file":"coverage/cobertura-coverage.xml","language":"JavaScript"}]' }} + source-sha: ${{ inputs.coverage-source-sha }} + source-prefix: ${{ inputs.coverage-source-prefix }} diff --git a/tests/continuous-integration/fixtures/vitest.config.mjs b/tests/continuous-integration/fixtures/vitest.config.mjs index 19e583ae..4f5d7d84 100644 --- a/tests/continuous-integration/fixtures/vitest.config.mjs +++ b/tests/continuous-integration/fixtures/vitest.config.mjs @@ -9,7 +9,7 @@ export default defineConfig({ enabled: true, provider: "v8", include: ["fixtures/vitest/source.js"], - reporter: ["lcov", "json-summary"], + reporter: ["lcov", "json-summary", "cobertura"], reportsDirectory: "coverage/sharding", reportOnFailure: true, thresholds: process.env.CI_TEST_SHARD diff --git a/tests/continuous-integration/workflow.test.js b/tests/continuous-integration/workflow.test.js index 859f6372..b14dff09 100644 --- a/tests/continuous-integration/workflow.test.js +++ b/tests/continuous-integration/workflow.test.js @@ -25,19 +25,37 @@ test("GitHub reports default to individual comments", async () => { assert.equal(outputs.coverage, "github"); assert.equal(outputs.comment, true); assert.equal(outputs["report-group"], ""); + const disabled = await runScript("prepare", "test-options", { + TEST_INPUT: '{"coverage":null}', + }); + assert.equal(disabled.outputs.coverage, ""); }); test("nested callers can group native reports without individual comments", async () => { + const reports = [ + { file: "coverage/custom.xml", language: "TypeScript", label: "frontend" }, + ]; const { outputs } = await runScript("prepare", "test-options", { - TEST_INPUT: '{"comment":false,"report-group":"action-tests"}', + TEST_INPUT: JSON.stringify({ + comment: false, + "report-group": "action-tests", + coverage: "github-code-quality", + "coverage-reports": reports, + }), }); - assert.equal(outputs.coverage, "github"); + assert.equal(outputs.coverage, "github-code-quality"); + assert.deepEqual(JSON.parse(outputs["coverage-reports"]), reports); assert.equal(outputs.comment, false); assert.equal(outputs["report-group"], "action-tests"); const action = workflow.jobs.test.steps.find( (step) => step.name === "Run tests", ); - for (const name of ["comment", "report-group"]) { + for (const name of [ + "comment", + "report-group", + "coverage", + "coverage-reports", + ]) { assert.equal( evaluate(action.with[name], { needs: { @@ -61,13 +79,15 @@ for (const options of [ { "report-group": "../bad" }, { "report-group": "one,two" }, { "report-group": false }, + { "coverage-reports": {} }, + { "coverage-source-sha": 42 }, ]) { test(`rejects invalid report options ${JSON.stringify(options)}`, async () => { await assert.rejects( runScript("prepare", "test-options", { TEST_INPUT: JSON.stringify(options), }), - /test\.(comment|report-group)/, + /test\.(comment|report-group|coverage-reports|coverage-source-sha)/, ); }); } From df3b623feaf4ad57f4953f4567853ae117c9288f Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 26 Nov 2026 15:57:03 +0100 Subject: [PATCH 02/48] docs(coverage): regenerate action and workflow references --- .github/workflows/continuous-integration.md | 18 ++- actions/test/README.md | 146 ++++++++++++-------- 2 files changed, 105 insertions(+), 59 deletions(-) diff --git a/.github/workflows/continuous-integration.md b/.github/workflows/continuous-integration.md index 9d988eab..cb272d8b 100644 --- a/.github/workflows/continuous-integration.md +++ b/.github/workflows/continuous-integration.md @@ -3,7 +3,7 @@ # GitHub Reusable Workflow: Node.js Continuous Integration
- Node.js Continuous Integration + Node.js Continuous Integration
--- @@ -195,6 +195,14 @@ jobs: # Set to `null` or empty to disable. # Accepts a JSON object for test options. See [test action](../../actions/test/README.md). # If coverage is enabled, it should generate test and coverage reports in standard formats. + # `coverage: github-code-quality` prepares Cobertura for the common native publication workflow. + # Configure the project's Cobertura reporter; the default path is coverage/cobertura-coverage.xml. + # Optional `coverage-reports` is an array of {file, language, label} for distinct components. + # Builds, tests and shard merges use the PR head in native mode; retain merge-result testing + # separately when required. Set report-group to the outer caller job ID and list every + # component in the common ci-reports coverage inventory before calling publish-coverage. + # Prebuilt containers without Git metadata require coverage-source-sha and coverage-source-prefix. + # Shards publish only the final merged reports; never upload individual shards. # Optional `arguments` is a JSON array passed to the package script without shell expansion. # Set `shards` to an integer from 2 to 256 to enable Vitest blob sharding (default: 1). # Only tests are replicated; shards run with fail-fast disabled and concurrency limited to their count. @@ -349,6 +357,14 @@ jobs: | | Set to `null` or empty to disable. | | | | | | Accepts a JSON object for test options. See [test action](../../actions/test/README.md). | | | | | | If coverage is enabled, it should generate test and coverage reports in standard formats. | | | | +| | `coverage: github-code-quality` prepares Cobertura for the common native publication workflow. | | | | +| | Configure the project's Cobertura reporter; the default path is coverage/cobertura-coverage.xml. | | | | +| | Optional `coverage-reports` is an array of {file, language, label} for distinct components. | | | | +| | Builds, tests and shard merges use the PR head in native mode; retain merge-result testing | | | | +| | separately when required. Set report-group to the outer caller job ID and list every | | | | +| | component in the common ci-reports coverage inventory before calling publish-coverage. | | | | +| | Prebuilt containers without Git metadata require coverage-source-sha and coverage-source-prefix. | | | | +| | Shards publish only the final merged reports; never upload individual shards. | | | | | | Optional `arguments` is a JSON array passed to the package script without shell expansion. | | | | | | Set `shards` to an integer from 2 to 256 to enable Vitest blob sharding (default: 1). | | | | | | Only tests are replicated; shards run with fail-fast disabled and concurrency limited to their count. | | | | diff --git a/actions/test/README.md b/actions/test/README.md index 617ee43b..f7a81b2b 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -3,7 +3,7 @@ # ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stc3F1YXJlIiBjb2xvcj0iYmx1ZSI+PHBvbHlsaW5lIHBvaW50cz0iOSAxMSAxMiAxNCAyMiA0Ij48L3BvbHlsaW5lPjxwYXRoIGQ9Ik0yMSAxMnY3YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0yVjVhMiAyIDAgMCAxIDItMmgxMSI+PC9wYXRoPjwvc3ZnPg==) GitHub Action: Test
- Test + Test
--- @@ -40,6 +40,15 @@ permissions: id-token: write ``` +Native `coverage: github-code-quality` prepares Cobertura artifacts for the common +[CI reports workflow](https://github.com/hoverkraft-tech/ci-github-common/blob/main/.github/workflows/ci-reports.md) +and its opt-in publication workflow. Set `report-group` to the outer calling job +and list every expected component in the collector. The default label is the +repository-relative working directory, or `root`. Multiple reports need explicit +stable labels. Reports must measure the PR head commit, not the PR merge commit. +Keep merge-result validation separately when required. No upload permission is +needed in this test action; only the publication job needs `code-quality: write`. + @@ -75,8 +84,21 @@ permissions: # Default: `test:ci` command: test:ci + # Tested source commit for a prebuilt container without Git metadata. Must equal the PR head or push SHA. + coverage-source-sha: "" + + # Repository-relative directory represented by the container working-directory. Required with coverage-source-sha when Git metadata is absent; use a dot for the repository root. + coverage-source-prefix: "" + + # Native GitHub coverage reports as a JSON array of file, language and optional label. + # Empty uses coverage/cobertura-coverage.xml; multiple reports require explicit unique labels. + # Every file must be Cobertura XML produced by the test command. Paths are relative + # to working-directory. Example: [{"file":"coverage.xml","language":"JavaScript","label":"backend"}]. + coverage-reports: "" + # Code coverage reporter to use. Supported values: # - `github`: Parse coverage reports via [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action, with GitHub summaries/PR comments + # - `github-code-quality`: Prepare Cobertura for the common native publication workflow # - `codecov`: Upload coverage to Codecov # - `""` or `null`: No coverage reporting # @@ -114,7 +136,7 @@ permissions: # Multiple entries can be separated by newlines, commas, or semicolons. # Each explicit path or glob must match a file after exclusions; missing reports fail the action. # When omitted, `auto:test,auto:coverage` detection may find no reports. - # Applies only when coverage is `github`. + # Test reports are collected independently of the coverage destination. report-file: "" # Optional path mapping to adjust file paths in test and coverage reports. @@ -144,58 +166,65 @@ permissions: ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | -| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | -| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | -| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | -| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | -| | Can be absolute or relative to the repository root. | | | -| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | -| **`command`** | npm/pnpm/Yarn script command to run for testing. | **false** | `test:ci` | -| | This should be a script defined in your `package.json`. | | | -| | The command should generate coverage report files in a standard format (Cobertura XML, lcov, etc.). | | | -| | | | | -| | Vitest: `vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=lcov --coverage.reporter=text` | | | -| | Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage` | | | -| **`coverage`** | Code coverage reporter to use. Supported values: | **false** | `github` | -| | - `github`: Parse coverage reports via [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action, with GitHub summaries/PR comments | | | -| | - `codecov`: Upload coverage to Codecov | | | -| | - `""` or `null`: No coverage reporting | | | -| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | -| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | -| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | -| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | -| | after tests, including failures. Individual reporting is disabled for shards. | | | -| | Use reporter-specific --outputFile.junit rather than scalar --outputFile in the package script. | | | -| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | -| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | -| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | -| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | -| | All shards and their merge must use the same group and absolute project directory. | | | -| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | -| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | -| | The package script must enable final reporters and original coverage thresholds. | | | -| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | -| **`report-file`** | Optional test and coverage report paths forwarded to the [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action. | **false** | - | -| | Supports multiple formats (Cobertura, OpenCover, lcov, etc.). | | | -| | Provide absolute paths or paths relative to the working directory. | | | -| | Multiple entries can be separated by newlines, commas, or semicolons. | | | -| | Each explicit path or glob must match a file after exclusions; missing reports fail the action. | | | -| | When omitted, `auto:test,auto:coverage` detection may find no reports. | | | -| | Applies only when coverage is `github`. | | | -| **`path-mapping`** | Optional path mapping to adjust file paths in test and coverage reports. | **false** | - | -| | See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. | | | -| **`comment`** | Publish an individual coverage PR comment. Set false when using the common ci-reports workflow; GitHub summaries and report artifacts remain enabled. | **false** | `true` | -| **`report-group`** | Job ID used to associate native reports with the common ci-reports workflow's job-results. | **false** | - | -| | Defaults to the current job ID. Set the outer calling job ID for nested reusable workflows. | | | -| | Matrix runs keep separate artifacts labeled with their working directory. | | | -| **`github-token`** | GitHub token for coverage PR comments. | **false** | - | -| | Required when coverage is `github` and individual comments are enabled. | | | -| | Requires permissions to create and update PR comments: | | | -| | | | | -| | - `issues: write` | | | -| | - `pull-requests: write` | | | +| **Input** | **Description** | **Required** | **Default** | +| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | +| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | +| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | +| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | +| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | +| | Can be absolute or relative to the repository root. | | | +| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | +| **`command`** | npm/pnpm/Yarn script command to run for testing. | **false** | `test:ci` | +| | This should be a script defined in your `package.json`. | | | +| | The command should generate coverage report files in a standard format (Cobertura XML, lcov, etc.). | | | +| | | | | +| | Vitest: `vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=lcov --coverage.reporter=text` | | | +| | Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage` | | | +| **`coverage-source-sha`** | Tested source commit for a prebuilt container without Git metadata. Must equal the PR head or push SHA. | **false** | - | +| **`coverage-source-prefix`** | Repository-relative directory represented by the container working-directory. Required with coverage-source-sha when Git metadata is absent; use a dot for the repository root. | **false** | - | +| **`coverage-reports`** | Native GitHub coverage reports as a JSON array of file, language and optional label. | **false** | - | +| | Empty uses coverage/cobertura-coverage.xml; multiple reports require explicit unique labels. | | | +| | Every file must be Cobertura XML produced by the test command. Paths are relative | | | +| | to working-directory. Example: [{"file":"coverage.xml","language":"JavaScript","label":"backend"}]. | | | +| **`coverage`** | Code coverage reporter to use. Supported values: | **false** | `github` | +| | - `github`: Parse coverage reports via [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action, with GitHub summaries/PR comments | | | +| | - `github-code-quality`: Prepare Cobertura for the common native publication workflow | | | +| | - `codecov`: Upload coverage to Codecov | | | +| | - `""` or `null`: No coverage reporting | | | +| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | +| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | +| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | +| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | +| | after tests, including failures. Individual reporting is disabled for shards. | | | +| | Use reporter-specific --outputFile.junit rather than scalar --outputFile in the package script. | | | +| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | +| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | +| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | +| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | +| | All shards and their merge must use the same group and absolute project directory. | | | +| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | +| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | +| | The package script must enable final reporters and original coverage thresholds. | | | +| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | +| **`report-file`** | Optional test and coverage report paths forwarded to the [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action. | **false** | - | +| | Supports multiple formats (Cobertura, OpenCover, lcov, etc.). | | | +| | Provide absolute paths or paths relative to the working directory. | | | +| | Multiple entries can be separated by newlines, commas, or semicolons. | | | +| | Each explicit path or glob must match a file after exclusions; missing reports fail the action. | | | +| | When omitted, `auto:test,auto:coverage` detection may find no reports. | | | +| | Test reports are collected independently of the coverage destination. | | | +| **`path-mapping`** | Optional path mapping to adjust file paths in test and coverage reports. | **false** | - | +| | See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. | | | +| **`comment`** | Publish an individual coverage PR comment. Set false when using the common ci-reports workflow; GitHub summaries and report artifacts remain enabled. | **false** | `true` | +| **`report-group`** | Job ID used to associate native reports with the common ci-reports workflow's job-results. | **false** | - | +| | Defaults to the current job ID. Set the outer calling job ID for nested reusable workflows. | | | +| | Matrix runs keep separate artifacts labeled with their working directory. | | | +| **`github-token`** | GitHub token for coverage PR comments. | **false** | - | +| | Required when coverage is `github` and individual comments are enabled. | | | +| | Requires permissions to create and update PR comments: | | | +| | | | | +| | - `issues: write` | | | +| | - `pull-requests: write` | | | @@ -204,10 +233,11 @@ permissions: ## Outputs -| **Output** | **Description** | -| ------------------------ | ----------------------------------------------------------------------------------------- | -| **`report-artifact-id`** | Native test and coverage artifact ID, empty when GitHub reports are unavailable. | -| **`shard-artifact-id`** | Blob and manifest artifact ID for an executing shard, including failed tests with a blob. | +| **Output** | **Description** | +| --------------------------------- | ----------------------------------------------------------------------------------------------- | +| **`native-coverage-artifact-id`** | Cobertura artifact for native GitHub publication, empty unless github-code-quality is selected. | +| **`report-artifact-id`** | Native test and coverage artifact ID, empty when GitHub reports are unavailable. | +| **`shard-artifact-id`** | Blob and manifest artifact ID for an executing shard, including failed tests with a blob. | From aeab7d712c734308587b10eb22d14c511f8e846a Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 26 Nov 2026 16:07:49 +0100 Subject: [PATCH 03/48] fix(coverage): consume corrected collection and isolate previews --- .github/workflows/__test-workflow-continuous-integration.yml | 3 ++- actions/test/action.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index f6a031c8..cd279b1b 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -574,11 +574,12 @@ jobs: collect-native-coverage: name: Verify coverage after the complete shard merge needs: sharded-host - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@71ce8b3ff53d6673617b19fa01d6637c916d4948 # coverage support (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@d52648f1645f1318908149af3f35b71b897ca566 # coverage support (PR #683, unreleased) permissions: contents: read pull-requests: write with: comment: false + concurrency-group: test-native-nodejs-${{ github.run_id }}-${{ github.run_attempt }} job-results: ${{ toJSON(needs) }} coverage-reports: '[{"job":"sharded-host","label":"sharded-host"}]' diff --git a/actions/test/action.yml b/actions/test/action.yml index 4b72c7f1..109095b3 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -370,7 +370,7 @@ runs: - name: Prepare native GitHub coverage id: native-coverage if: ${{ !cancelled() && steps.run-test.outcome != 'skipped' && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') && inputs.coverage == 'github-code-quality' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/coverage-reports@71ce8b3ff53d6673617b19fa01d6637c916d4948 # coverage support (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/coverage-reports@d52648f1645f1318908149af3f35b71b897ca566 # coverage support (PR #683, unreleased) with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} report-group: ${{ inputs.report-group || github.job }} From 11636b817040a2a7d61b389c28fa1b401c37a2fa Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 26 Nov 2026 18:58:05 +0100 Subject: [PATCH 04/48] feat(reports)!: adopt shared plans for Node.js CI --- .github/linters/actionlint.yml | 17 ++ .github/workflows/__main-ci.yml | 1 + .github/workflows/__pull-request-ci.yml | 1 + .github/workflows/__release.yml | 1 + .github/workflows/__shared-ci.yml | 9 +- .github/workflows/__test-action-lint.yml | 3 +- .github/workflows/__test-action-test.yml | 23 ++- .github/workflows/__test-release.yml | 35 +++- ...__test-workflow-continuous-integration.yml | 60 ++++--- .github/workflows/continuous-integration.yml | 156 ++++++++++++----- actions/lint/action.yml | 36 +++- actions/test/action.yml | 164 +++++------------- tests/continuous-integration/package.json | 5 +- tests/continuous-integration/workflow.test.js | 130 +++++--------- tests/npm/package-lock.json | 51 ++++++ tests/npm/package.json | 8 +- 16 files changed, 398 insertions(+), 302 deletions(-) diff --git a/.github/linters/actionlint.yml b/.github/linters/actionlint.yml index c7ba559b..abdcd6bf 100644 --- a/.github/linters/actionlint.yml +++ b/.github/linters/actionlint.yml @@ -1,3 +1,5 @@ +# FIXME: Remove only the code-quality exception when Actionlint supports it. +# https://github.com/rhysd/actionlint/pull/674 # FIXME: Temporary ignores to bypass actionlint limitations. See https://github.com/rhysd/actionlint/issues/590. paths: .github/workflows/continuous-integration.yml: @@ -9,3 +11,18 @@ paths: - '"ports" section must be sequence node but got scalar node' - '"volumes" section must be sequence node but got scalar node' - '"runs-on" section is alias node but mapping node is expected' + .github/workflows/__main-ci.yml: + ignore: + - ^unknown permission scope "code-quality"\. + .github/workflows/__pull-request-ci.yml: + ignore: + - ^unknown permission scope "code-quality"\. + .github/workflows/__release.yml: + ignore: + - ^unknown permission scope "code-quality"\. + .github/workflows/__shared-ci.yml: + ignore: + - ^unknown permission scope "code-quality"\. + .github/workflows/__test-workflow-continuous-integration.yml: + ignore: + - ^unknown permission scope "code-quality"\. diff --git a/.github/workflows/__main-ci.yml b/.github/workflows/__main-ci.yml index 25ed4793..87feb160 100644 --- a/.github/workflows/__main-ci.yml +++ b/.github/workflows/__main-ci.yml @@ -30,6 +30,7 @@ jobs: issues: write security-events: write statuses: write + code-quality: write # jscpd:ignore-end release: diff --git a/.github/workflows/__pull-request-ci.yml b/.github/workflows/__pull-request-ci.yml index d378eb57..fa09de1b 100644 --- a/.github/workflows/__pull-request-ci.yml +++ b/.github/workflows/__pull-request-ci.yml @@ -25,4 +25,5 @@ jobs: issues: write security-events: write statuses: write + code-quality: write # jscpd:ignore-end diff --git a/.github/workflows/__release.yml b/.github/workflows/__release.yml index 73f6972e..44956d2f 100644 --- a/.github/workflows/__release.yml +++ b/.github/workflows/__release.yml @@ -33,6 +33,7 @@ jobs: issues: write security-events: write statuses: write + code-quality: write release: name: Create and publish release diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 6614730b..a6d26381 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) permissions: actions: read contents: read @@ -17,8 +17,6 @@ jobs: pull-requests: write security-events: write statuses: write - with: - comment: false test-release: name: Test release preparation and recovery @@ -101,6 +99,7 @@ jobs: id-token: write issues: read security-events: write + code-quality: write test-action-test: needs: lint @@ -117,9 +116,11 @@ jobs: reports: needs: [lint, test-release] if: always() - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) permissions: contents: read pull-requests: write + code-quality: write + id-token: write with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index ba371b92..52f94efe 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -39,12 +39,13 @@ jobs: failure: false reports: false report-file: "" - expected: success + expected: failure steps: - name: Arrange - Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Arrange - Create a dependency-free lint project uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 44e48a55..30b9f02b 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -39,13 +39,15 @@ jobs: reports: true report-file: .reports/missing.xml expected: failure - artifact: false + artifact: true + artifact-files: "[]" - scenario: unmatched glob failure: false reports: true report-file: ".reports/missing-*.xml" expected: failure - artifact: false + artifact: true + artifact-files: "[]" - scenario: partially missing reports failure: false reports: true @@ -57,14 +59,16 @@ jobs: failure: false reports: false report-file: "" - expected: success - artifact: false + expected: failure + artifact: true + artifact-files: "[]" name: Test - ${{ matrix.scenario }} steps: - name: Arrange - Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Arrange - Create a dependency-free native test project uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: @@ -91,10 +95,9 @@ jobs: EXPECT_FAILURE: ${{ matrix.failure }} with: working-directory: report-fixture - comment: "false" command: ${{ matrix.reports && 'test:ci' || 'test:no-reports' }} report-file: ${{ matrix.report-file }} - coverage: ${{ !matrix.coverage-disabled && 'github' || '' }} + coverage: "false" - name: Assert - Retrieve reports even after a failed test if: steps.test.outputs.report-artifact-id != '' uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 @@ -126,11 +129,13 @@ jobs: } assert.match(process.env.ARTIFACT_ID, /^\d+$/); const globber = await glob.create('downloaded-reports/**/*', { matchDirectories: false }); - const files = await globber.glob(); + const files = (await globber.glob()).filter(file => !file.endsWith('/ci-report.json')); const expectedFiles = JSON.parse(process.env.ARTIFACT_FILES); assert.deepEqual(files.map(file => require('node:path').basename(file)).sort(), expectedFiles.sort()); - const junit = fs.readFileSync(files.find(file => file.endsWith('junit.xml')), 'utf8'); - assert.equal(junit.includes(' file.endsWith('junit.xml')), 'utf8'); + assert.equal(junit.includes(' file.endsWith('lcov.info')), 'utf8'), /SF:/); } diff --git a/.github/workflows/__test-release.yml b/.github/workflows/__test-release.yml index 5810dcac..81b1435d 100644 --- a/.github/workflows/__test-release.yml +++ b/.github/workflows/__test-release.yml @@ -2,7 +2,10 @@ name: Internal - Tests for package and release actions on: workflow_call: - + outputs: + report-plan: + description: Complete plan for every package and release action in the matrix. + value: ${{ jobs.configuration.outputs.report-plan }} permissions: {} jobs: @@ -11,8 +14,7 @@ jobs: strategy: fail-fast: false matrix: - action: - [package/restore, release/prepare, release/verify, release/finalize] + include: ${{ fromJSON(needs.configuration.outputs.matrix) }} uses: $/.github/workflows/continuous-integration.yml permissions: contents: read @@ -24,7 +26,9 @@ jobs: working-directory: actions/${{ matrix.action }} build: "" lint: "" - test: '{ "comment": false, "report-group": "test-release" }' + test: '{"coverage":false}' + report-plan: ${{ toJSON(fromJSON(needs.configuration.outputs.selections)[matrix.key]) }} + needs: configuration integration-tests: name: Test release action inputs, outputs and failures @@ -37,6 +41,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false + ref: ${{ github.event.pull_request.head.sha || github.sha }} - uses: $/actions/setup-node with: working-directory: actions/release/prepare @@ -189,6 +194,7 @@ jobs: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false + ref: ${{ github.event.pull_request.head.sha || github.sha }} - name: Arrange - Create a workspace with compiled output and failing hooks id: workspace uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -262,3 +268,24 @@ jobs: assert.equal(parsed.version, '2.3.0'); assert.equal(parsed.dependencies['@example/core'], '^1.4.0'); assert.match(process.env.ARTIFACT_ID, /^[1-9][0-9]*$/); + configuration: + runs-on: ubuntu-latest + permissions: {} + outputs: + matrix: ${{ steps.actions.outputs.matrix }} + report-plan: ${{ steps.plan.outputs.report-plan }} + selections: ${{ steps.plan.outputs.selections }} + steps: + - id: actions + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + with: + script: |- + const actions=['package/restore','release/prepare','release/verify','release/finalize']; + const matrix=actions.map(action=>({action,key:action.replaceAll('/','-')})); + core.setOutput('matrix',matrix); + core.setOutput('producers',matrix.map(item=>({key:item.key,type:'test',directory:'actions/'+item.action,coverage:[]}))); + - id: plan + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + with: + operation: plan + producers: ${{ steps.actions.outputs.producers }} diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index cd279b1b..08a1c775 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -21,8 +21,8 @@ jobs: lint: "" code-ql: "" dependency-review: false - test: | - {"command":"test:vitest","shards":2,"comment":false,"report-group":"sharded-host","coverage":"github-code-quality","coverage-reports":[{"file":"coverage/sharding/cobertura-coverage.xml","language":"JavaScript","label":"sharded-host"}],"report-file":"coverage/sharding/junit.xml,coverage/sharding/lcov.info"} + test: |- + {"command":"test:vitest","shards":2,"coverage":true,"coverage-reports":[{"file":"coverage/sharding/cobertura-coverage.xml","language":"JavaScript","label":"sharded-host"}],"report-file":"coverage/sharding/junit.xml,coverage/sharding/lcov.info"} sharded-container: name: Validate sharded Vitest in the existing fixture image @@ -48,8 +48,8 @@ jobs: lint: "" code-ql: "" dependency-review: false - test: | - {"command":"test:vitest","shards":2,"comment":false,"report-group":"sharded-container","report-file":"coverage/sharding/junit.xml,coverage/sharding/lcov.info"} + test: |- + {"command":"test:vitest","shards":2,"report-file":"coverage/sharding/junit.xml,coverage/sharding/lcov.info","coverage":false} assert-sharded-reports: name: Verify complete merged reports from host and container @@ -57,9 +57,14 @@ jobs: runs-on: ubuntu-latest permissions: {} steps: + - id: discover + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + with: + operation: discover + job-results: ${{ toJSON(needs) }} - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: - pattern: ci-reports-${{ github.run_attempt }}-sharded-* + pattern: ${{ steps.discover.outputs.pattern }} path: merged-reports - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: @@ -69,11 +74,9 @@ jobs: const path = require('node:path'); const reports = fs.readdirSync('merged-reports'); assert.equal(reports.length, 2, 'Publish one final report artifact per caller'); - for (const group of ['sharded-host', 'sharded-container']) { - const directory = reports.find(name => name.includes(`-${group}-`)); - assert.ok(directory, group); + for (const directory of reports) { const files = await (await glob.create(path.join('merged-reports', directory, '**/*'), { matchDirectories: false })).glob(); - assert.equal(files.length, 2); + assert.equal(files.filter(file=>file.endsWith('ci-report.json')).length,1); const junit = fs.readFileSync(files.find(file => file.endsWith('junit.xml')), 'utf8'); assert.equal((junit.match(/ +# permissions: +# contents: read +# pull-requests: write +# code-quality: write +# id-token: write +# with: +# job-results: ${{ toJSON(needs) }} +# coverage: github +# ``` +# +# Select `coverage: none` (default) for summaries, `github` for native GitHub +# coverage, or `codecov`. Both publishers consume validated Cobertura. Native +# GitHub coverage requires repository enablement and a default-branch baseline. +# The reporting workflow owns one CI comment and the `CI reports complete` check. +# Forks retain diagnostics without write operations. Partial reruns require +# rerunning all producers. Producer workflows test the PR head or push revision. +# +# Standalone action jobs forward their `report-plan` output. Custom outer matrices +# must forward a complete plan derived from their configuration; GitHub's last +# successful matrix output does not describe all executions. See the common +# [recording action](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/record-ci-reports) +# for the advanced contract. No collector-side coverage inventory is needed. +# name: Node.js Continuous Integration on: @@ -129,14 +175,13 @@ on: Whether to enable testing. Set to `null` or empty to disable. Accepts a JSON object for test options. See [test action](../../actions/test/README.md). - If coverage is enabled, it should generate test and coverage reports in standard formats. - `coverage: github-code-quality` prepares Cobertura for the common native publication workflow. - Configure the project's Cobertura reporter; the default path is coverage/cobertura-coverage.xml. - Optional `coverage-reports` is an array of {file, language, label} for distinct components. - Builds, tests and shard merges use the PR head in native mode; retain merge-result testing - separately when required. Set report-group to the outer caller job ID and list every - component in the common ci-reports coverage inventory before calling publish-coverage. - Prebuilt containers without Git metadata require coverage-source-sha and coverage-source-prefix. + `coverage` is a boolean, true by default. The project must generate native test results + and Cobertura at coverage/cobertura-coverage.xml, or describe other component files + with `coverage-reports` (file, language and optional label). + Builds and tests use the PR head. Run merge-result validation separately if required. + Prebuilt containers need coverage-source-sha and coverage-source-prefix for coverage. + Set coverage to false for diagnostics without required Cobertura. Provider selection + belongs in the common ci-reports workflow, which reads this workflow's report-plan. Shards publish only the final merged reports; never upload individual shards. Optional `arguments` is a JSON array passed to the package script without shell expansion. Set `shards` to an integer from 2 to 256 to enable Vitest blob sharding (default: 1). @@ -151,18 +196,15 @@ on: CI_TEST_SHARD is index/total during shards and empty during merging. If coverage thresholds are configured, defer them to merging with `thresholds: process.env.CI_TEST_SHARD ? undefined : yourThresholds`. Keep coverage enabled in both commands, and set coverage.reportOnFailure to retain failed-test coverage. - Final reporters and report-file must describe the merged JUnit/LCOV outputs. + Final reporters and report-file must describe the merged JUnit/Cobertura outputs. Blob payloads include coverage; file-based attachments are not transferred by this workflow. - Example: `{"command":"test:ci","shards":2,"report-file":"junit.xml,coverage/lcov.info"}`. - - For consolidated reports, set `comment` to false and `report-group` to the calling job ID - used in the common `ci-reports` workflow's `job-results`. + Example: `{"command":"test:ci","shards":2,"report-file":"junit.xml"}`. Example: ```json:package.json { - "test:ci": "vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=lcov --coverage.reporter=text" + "test:ci": "vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text" } ``` type: string @@ -224,6 +266,10 @@ on: type: string required: false default: "" + report-plan: + description: Expected producer metadata for a custom outer orchestration. Leave empty for automatic planning. + type: string + default: "" secrets: build-secrets: description: | @@ -255,6 +301,9 @@ on: build-artifact-id: description: "ID of the build artifact) uploaded during the build step." value: ${{ jobs.build.outputs.artifact-id }} + report-plan: + description: Complete expected report metadata, consumed automatically by ci-reports. + value: ${{ jobs.prepare.outputs.report-plan }} permissions: {} @@ -286,14 +335,15 @@ jobs: test-coverage-reports: ${{ steps.test-options.outputs.coverage-reports }} test-coverage-source-sha: ${{ steps.test-options.outputs.coverage-source-sha }} test-coverage-source-prefix: ${{ steps.test-options.outputs.coverage-source-prefix }} - test-comment: ${{ steps.test-options.outputs.comment }} - test-report-group: ${{ steps.test-options.outputs.report-group }} test-report-file: ${{ steps.test-options.outputs.report-file }} test-arguments: ${{ steps.test-options.outputs.arguments }} test-shards: ${{ steps.test-options.outputs.shards }} test-matrix: ${{ steps.test-options.outputs.matrix }} test-group: ${{ steps.test-options.outputs.group }} test-merge-command: ${{ steps.test-options.outputs.merge-command }} + report-plan: ${{ steps.report-plan.outputs.report-plan }} + report-selections: ${{ steps.report-plan.outputs.selections }} + lint-enabled: ${{ steps.report-producers.outputs.lint-enabled }} steps: - id: test-options uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -318,24 +368,19 @@ jobs: } } + const allowed = ['coverage','coverage-reports','coverage-source-sha','coverage-source-prefix','command','merge-command','report-file','arguments','shards']; + const unknown = Object.keys(testOptions).filter(key => !allowed.includes(key)); + if (unknown.length) throw new Error('Unknown test options: ' + unknown.join(', ') + '. Configure publication in ci-reports.'); if (testOptions.coverage === undefined) { - testOptions.coverage = 'github'; + testOptions.coverage = true; } - if (testOptions.coverage === null || testOptions.coverage === 'null') testOptions.coverage = ''; - if (!['', 'github', 'github-code-quality', 'codecov'].includes(testOptions.coverage)) throw new Error('Unsupported test.coverage destination.'); + if (typeof testOptions.coverage !== 'boolean') throw new Error('test.coverage must be a boolean.'); if (testOptions['coverage-reports'] !== undefined && !Array.isArray(testOptions['coverage-reports'])) throw new Error('test.coverage-reports must be an array.'); for (const key of ['coverage-source-sha', 'coverage-source-prefix']) { if (testOptions[key] !== undefined && typeof testOptions[key] !== 'string') throw new Error(`test.${key} must be a string.`); core.setOutput(key, testOptions[key] || ''); } core.setOutput('coverage-reports', testOptions['coverage-reports']?.length ? JSON.stringify(testOptions['coverage-reports']) : ''); - if (testOptions.comment !== undefined && typeof testOptions.comment !== 'boolean') { - throw new Error('test.comment must be a boolean.'); - } - if (testOptions['report-group'] !== undefined && - (typeof testOptions['report-group'] !== 'string' || !/^[\w-]+$/.test(testOptions['report-group']))) { - throw new Error('test.report-group must be a job ID containing letters, numbers, underscores or hyphens.'); - } const shards = testOptions.shards === undefined ? 1 : testOptions.shards; if (!Number.isInteger(shards) || shards < 1 || shards > 256) { throw new Error('test.shards must be an integer from 1 to 256.'); @@ -356,8 +401,6 @@ jobs: core.setOutput('arguments', args); core.setOutput('merge-command', testOptions['merge-command'] || testOptions.command || 'test:ci'); core.setOutput('coverage', testOptions.coverage ); - core.setOutput('comment', testOptions.comment ?? true); - core.setOutput('report-group', testOptions['report-group'] || ''); core.setOutput('report-file', testOptions['report-file'] || ''); core.setOutput('command', testOptions.command || 'test:ci'); @@ -591,6 +634,36 @@ jobs: core.setOutput('commands', sanitizedCommands.join('\n')); core.setOutput('env', JSON.stringify(env)); + - id: report-producers + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + env: + CHECKS: ${{ inputs.checks }} + LINT: ${{ inputs.lint }} + TEST_ENABLED: ${{ steps.test-options.outputs.enabled }} + COVERAGE: ${{ steps.test-options.outputs.coverage }} + COVERAGE_REPORTS: ${{ steps.test-options.outputs.coverage-reports }} + DIRECTORY: ${{ inputs.working-directory }} + CONTAINER: ${{ inputs.container }} + SOURCE_PREFIX: ${{ steps.test-options.outputs.coverage-source-prefix }} + with: + script: | + const path = require('node:path'); + let directory = process.env.DIRECTORY || '.'; + if (path.isAbsolute(directory)) directory = process.env.CONTAINER ? process.env.SOURCE_PREFIX || '.' : path.relative(process.env.GITHUB_WORKSPACE,directory); + directory = directory || '.'; + const lint = process.env.CHECKS === 'true' && !['','false','null'].includes(process.env.LINT.trim()); + const producers = []; + if (lint) producers.push({key:'lint',type:'lint',directory,coverage:[]}); + if (process.env.CHECKS === 'true' && process.env.TEST_ENABLED === 'true') producers.push({key:'test',type:'test',directory, + coverage:process.env.COVERAGE === 'true' ? JSON.parse(process.env.COVERAGE_REPORTS || '[{"file":"coverage/cobertura-coverage.xml","language":"JavaScript"}]') : []}); + core.setOutput('producers',producers); + core.setOutput('lint-enabled',lint); + - id: report-plan + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + with: + operation: plan + producers: ${{ steps.report-producers.outputs.producers }} + report-plan: ${{ inputs.report-plan }} code-ql: name: 🛡️ CodeQL Analysis @@ -646,7 +719,7 @@ jobs: - uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0 lint: - if: inputs.checks == true && inputs.lint + if: needs.prepare.outputs.lint-enabled == 'true' name: 👕 Lint runs-on: *ci-runner container: &ci-container @@ -664,6 +737,8 @@ jobs: steps: - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 if: inputs.container == '' + with: + ref: ${{ github.event.pull_request.head.sha || github.sha }} - id: preparel-lint-options uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -696,6 +771,7 @@ jobs: command: ${{ steps.preparel-lint-options.outputs.command }} report-file: ${{ steps.preparel-lint-options.outputs.report-file }} path-mapping: ${{ needs.prepare.outputs.path-mapping || '' }} + report-plan: ${{ toJSON(fromJSON(needs.prepare.outputs.report-selections).lint) }} build: if: inputs.checks == true && needs.prepare.outputs.build-commands != '' @@ -713,7 +789,7 @@ jobs: - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 if: inputs.container == '' with: - ref: ${{ needs.prepare.outputs.test-coverage == 'github-code-quality' && github.event.pull_request.head.sha || github.sha }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - id: build-artifact if: needs.prepare.outputs.build-artifact @@ -758,9 +834,7 @@ jobs: - build permissions: contents: read - id-token: write # Required for Codecov uploads with OIDC authentication packages: read - pull-requests: write strategy: fail-fast: false max-parallel: ${{ fromJSON(needs.prepare.outputs.test-shards) }} @@ -769,7 +843,7 @@ jobs: - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 if: inputs.container == '' with: - ref: ${{ needs.prepare.outputs.test-coverage == 'github-code-quality' && github.event.pull_request.head.sha || github.sha }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - if: needs.build.outputs.artifact-id && inputs.container == '' uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 @@ -787,15 +861,13 @@ jobs: arguments: ${{ needs.prepare.outputs.test-arguments }} shard: ${{ needs.prepare.outputs.test-shards != '1' && format('{0}/{1}', matrix.shard, needs.prepare.outputs.test-shards) || '' }} shard-group: ${{ format('ci-test-{0}-{1}-{2}', github.run_id, github.run_attempt, needs.prepare.outputs.test-group) }} - coverage: ${{ needs.prepare.outputs.test-coverage }} + coverage: ${{ needs.prepare.outputs.test-coverage == 'true' && 'true' || 'false' }} coverage-reports: ${{ needs.prepare.outputs.test-coverage-reports }} coverage-source-sha: ${{ needs.prepare.outputs.test-coverage-source-sha }} coverage-source-prefix: ${{ needs.prepare.outputs.test-coverage-source-prefix }} - comment: ${{ needs.prepare.outputs.test-comment }} - report-group: ${{ needs.prepare.outputs.test-report-group }} report-file: ${{ needs.prepare.outputs.test-report-file }} path-mapping: ${{ needs.prepare.outputs.path-mapping || '' }} - github-token: ${{ secrets.github-token || github.token }} + report-plan: ${{ toJSON(fromJSON(needs.prepare.outputs.report-selections).test) }} test-merge: name: Merge test results @@ -808,14 +880,12 @@ jobs: container: *ci-container permissions: contents: read - id-token: write packages: read - pull-requests: write steps: - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 if: inputs.container == '' with: - ref: ${{ needs.prepare.outputs.test-coverage == 'github-code-quality' && github.event.pull_request.head.sha || github.sha }} + ref: ${{ github.event.pull_request.head.sha || github.sha }} - if: needs.build.outputs.artifact-id && inputs.container == '' uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 @@ -833,15 +903,13 @@ jobs: arguments: ${{ needs.prepare.outputs.test-arguments }} merge-shards: ${{ needs.prepare.outputs.test-shards }} shard-group: ${{ format('ci-test-{0}-{1}-{2}', github.run_id, github.run_attempt, needs.prepare.outputs.test-group) }} - coverage: ${{ needs.prepare.outputs.test-coverage }} + coverage: ${{ needs.prepare.outputs.test-coverage == 'true' && 'true' || 'false' }} coverage-reports: ${{ needs.prepare.outputs.test-coverage-reports }} coverage-source-sha: ${{ needs.prepare.outputs.test-coverage-source-sha }} coverage-source-prefix: ${{ needs.prepare.outputs.test-coverage-source-prefix }} - comment: ${{ needs.prepare.outputs.test-comment }} - report-group: ${{ needs.prepare.outputs.test-report-group }} report-file: ${{ needs.prepare.outputs.test-report-file }} path-mapping: ${{ needs.prepare.outputs.path-mapping || '' }} - github-token: ${{ secrets.github-token || github.token }} + report-plan: ${{ toJSON(fromJSON(needs.prepare.outputs.report-selections).test) }} - name: Require successful shards if: always() diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 5e8bec18..28783ced 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -1,5 +1,12 @@ name: "Lint" -description: "Action to lint Node.js projects with support for pull request reporting and annotations" +description: | + Run project lint commands and retain native reports for consolidated CI feedback. + The common ci-reports workflow owns comments and external coverage publication. + Forward report-plan from standalone jobs; reusable workflows do this automatically. + Required reports remain required after command failures. This action keeps local + diagnostics and never grants publication permissions to project code. + + Generate supported lint reports such as SARIF, ESLint JSON or Checkstyle XML. author: hoverkraft branding: icon: check-circle @@ -48,6 +55,9 @@ inputs: See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. required: false default: "" + report-plan: + description: Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. + default: "" runs: using: "composite" @@ -74,6 +84,12 @@ runs: uses: $/actions/get-package-manager with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} + - id: report-plan + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + with: + operation: plan + report-plan: ${{ inputs.report-plan }} + producers: '[{"key":"lint","type":"lint","directory":${{ toJSON(inputs.container == ''true'' && ''.'' || steps.working-directory.outputs.workspace-relative-path || ''.'') }},"coverage":[]}]' # jscpd:ignore-end - id: run-lint @@ -110,13 +126,19 @@ runs: core.setOutput('lint-exit-code', 1); core.setFailed(`Linting error: ${error.message}`); } - - - name: 📊 Parse lint reports - if: always() - uses: hoverkraft-tech/ci-github-common/actions/quality/parse-ci-reports@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + - id: reports + name: Record lint results + if: ${{ !cancelled() && steps.report-plan.outcome == 'success' }} + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} + report-plan: ${{ steps.report-plan.outputs.report-plan }} report-paths: ${{ inputs.report-file || 'auto:lint' }} path-mapping: ${{ inputs.path-mapping }} - report-name: "Lint Results" - output-format: "annotations,summary" +outputs: + report-plan: + description: Expected report metadata. Forward from standalone jobs. + value: ${{ steps.report-plan.outputs.report-plan }} + report-artifact-id: + description: Native report bundle, including available diagnostics after failures. + value: ${{ steps.reports.outputs.artifact-id }} diff --git a/actions/test/action.yml b/actions/test/action.yml index 109095b3..7397504c 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -1,26 +1,13 @@ name: "Test" description: | - Action to test Node.js projects with support for coverage reporting and pull request annotations + Run project test commands and retain native reports for consolidated CI feedback. + The common ci-reports workflow owns comments and external coverage publication. + Forward report-plan from standalone jobs; reusable workflows do this automatically. + Required reports remain required after command failures. This action keeps local + diagnostics and never grants publication permissions to project code. - GitHub reporting retains native report artifacts for seven days, including after - test failures. Set `comment: false` and call the common `ci-reports` workflow - after test jobs to publish one test comment and one coverage comment. - - Note that this action must have write permission for id-token for this to work when using Codecov coverage reporting: - - ```yml - permissions: - id-token: write - ``` - - Native `coverage: github-code-quality` prepares Cobertura artifacts for the common - [CI reports workflow](https://github.com/hoverkraft-tech/ci-github-common/blob/main/.github/workflows/ci-reports.md) - and its opt-in publication workflow. Set `report-group` to the outer calling job - and list every expected component in the collector. The default label is the - repository-relative working directory, or `root`. Multiple reports need explicit - stable labels. Reports must measure the PR head commit, not the PR merge commit. - Keep merge-result validation separately when required. No upload permission is - needed in this test action; only the publication job needs `code-quality: write`. + Coverage publication requires Cobertura XML generated by the test tool. Configure + JUnit or TAP for test results and merge framework shards before recording coverage. author: hoverkraft branding: icon: check-square @@ -49,8 +36,8 @@ inputs: This should be a script defined in your `package.json`. The command should generate coverage report files in a standard format (Cobertura XML, lcov, etc.). - Vitest: `vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=lcov --coverage.reporter=text` - Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage` + Vitest: `vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text` + Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage --coverageReporters=cobertura` required: false default: "test:ci" coverage-source-sha: @@ -60,21 +47,12 @@ inputs: description: Repository-relative directory represented by the container working-directory. Required with coverage-source-sha when Git metadata is absent; use a dot for the repository root. default: "" coverage-reports: - description: | - Native GitHub coverage reports as a JSON array of file, language and optional label. - Empty uses coverage/cobertura-coverage.xml; multiple reports require explicit unique labels. - Every file must be Cobertura XML produced by the test command. Paths are relative - to working-directory. Example: [{"file":"coverage.xml","language":"JavaScript","label":"backend"}]. + description: |- + Optional JSON array of Cobertura file, language and label. Empty uses the language default; labels default to the project directory. default: "" coverage: - description: | - Code coverage reporter to use. Supported values: - - `github`: Parse coverage reports via [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action, with GitHub summaries/PR comments - - `github-code-quality`: Prepare Cobertura for the common native publication workflow - - `codecov`: Upload coverage to Codecov - - `""` or `null`: No coverage reporting - required: false - default: "github" + description: Require Cobertura coverage for consolidated publication. Set false to retain available diagnostics without requiring Cobertura. Configure instrumentation in the test command. + default: "true" arguments: description: | JSON array of arguments passed to the package script without shell expansion. @@ -109,8 +87,8 @@ inputs: Provide absolute paths or paths relative to the working directory. Multiple entries can be separated by newlines, commas, or semicolons. Each explicit path or glob must match a file after exclusions; missing reports fail the action. - When omitted, `auto:test,auto:coverage` detection may find no reports. - Test reports are collected independently of the coverage destination. + When omitted, test reports are discovered and planned Cobertura paths are required. + At least one executed test must appear in the required native test report. required: false default: "" path-mapping: @@ -119,35 +97,20 @@ inputs: See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. required: false default: "" - comment: - description: Publish an individual coverage PR comment. Set false when using the common ci-reports workflow; GitHub summaries and report artifacts remain enabled. - default: "true" - report-group: - description: | - Job ID used to associate native reports with the common ci-reports workflow's job-results. - Defaults to the current job ID. Set the outer calling job ID for nested reusable workflows. - Matrix runs keep separate artifacts labeled with their working directory. - github-token: - description: | - GitHub token for coverage PR comments. - Required when coverage is `github` and individual comments are enabled. - Requires permissions to create and update PR comments: - - - `issues: write` - - `pull-requests: write` - required: false + report-plan: + description: Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. default: "" outputs: - native-coverage-artifact-id: - description: Cobertura artifact for native GitHub publication, empty unless github-code-quality is selected. - value: ${{ steps.native-coverage.outputs.artifact-id }} report-artifact-id: - description: Native test and coverage artifact ID, empty when GitHub reports are unavailable. - value: ${{ steps.upload-reports.outputs.artifact-id }} + description: Native report bundle, including available diagnostics after failures. + value: ${{ steps.reports.outputs.artifact-id }} shard-artifact-id: description: Blob and manifest artifact ID for an executing shard, including failed tests with a blob. value: ${{ steps.upload-shard.outputs.artifact-id }} + report-plan: + description: Expected report metadata. Forward from standalone jobs. + value: ${{ steps.report-plan.outputs.report-plan }} runs: using: "composite" @@ -166,14 +129,14 @@ runs: NODE_ACTION_PATH: ${{ github.action_path }} WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }} COVERAGE_DESTINATION: ${{ inputs.coverage }} - TEST_COMMIT: ${{ inputs.coverage == 'github-code-quality' && (github.event.pull_request.head.sha || github.sha) || github.sha }} + TEST_COMMIT: ${{ inputs.coverage-source-sha || github.event.pull_request.head.sha || github.sha }} TEST_ARGUMENTS: ${{ inputs.arguments }} TEST_SHARD: ${{ inputs.shard }} SHARD_GROUP: ${{ inputs.shard-group }} MERGE_SHARDS: ${{ inputs.merge-shards }} with: script: | - if (!['', 'null', 'github', 'github-code-quality', 'codecov'].includes(process.env.COVERAGE_DESTINATION)) throw new Error('Unsupported coverage destination.'); + if (!['true','false'].includes(process.env.COVERAGE_DESTINATION)) throw new Error('coverage must be true or false.'); const { TestShards } = require(`${process.env.NODE_ACTION_PATH}/TestShards.cjs`); const configuration = { workingDirectory: process.env.WORKING_DIRECTORY, @@ -230,6 +193,13 @@ runs: const { TestShards } = require(`${process.env.NODE_ACTION_PATH}/TestShards.cjs`); const shards = new TestShards(JSON.parse(process.env.SHARD_CONFIGURATION)); core.setOutput('failed', shards.validate()); + - id: report-plan + if: inputs.shard == '' + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + with: + operation: plan + report-plan: ${{ inputs.report-plan }} + producers: '[{"key":"test","type":"test","directory":${{ toJSON(inputs.container == ''true'' && (inputs.coverage-source-prefix || ''.'') || steps.working-directory.outputs.workspace-relative-path || ''.'') }},"coverage":${{ inputs.coverage == ''true'' && (inputs.coverage-reports || ''[{"file":"coverage/cobertura-coverage.xml","language":"JavaScript"}]'') || ''[]'' }}}]' - id: run-test name: 🧪 Run tests @@ -302,62 +272,17 @@ runs: include-hidden-files: true if-no-files-found: error retention-days: 7 - - - name: 📊 Parse test and coverage reports - if: always() && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') - id: parse-coverage-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/parse-ci-reports@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + - id: reports + name: Record test results + if: ${{ !cancelled() && steps.report-plan.outcome == 'success' && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') }} + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} - report-name: "Test and Coverage Results" - report-paths: ${{ inputs.report-file || ((inputs.coverage == 'github' || inputs.coverage == 'github-code-quality') && 'auto:test,auto:coverage' || 'auto:test') }} + report-plan: ${{ steps.report-plan.outputs.report-plan }} + report-paths: ${{ inputs.report-file || 'auto:test' }} path-mapping: ${{ inputs.path-mapping }} - output-format: "summary,markdown" - - - name: 📊 Add coverage PR comment - if: always() && inputs.shard == '' && inputs.comment == 'true' && inputs.coverage == 'github' && github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && steps.parse-coverage-reports.outputs.markdown - uses: hoverkraft-tech/ci-github-common/actions/create-or-update-comment@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 - with: - title: "Code Coverage Report" - token: ${{ inputs.github-token }} - body: ${{ steps.parse-coverage-reports.outputs.markdown }} - - - name: 📊 Upload coverage to Codecov - if: always() && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') && inputs.coverage == 'codecov' - uses: hoverkraft-tech/ci-github-common/actions/quality/codecov@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 - with: - working-directory: ${{ steps.working-directory.outputs.absolute-path }} - - - name: Prepare native report artifact - id: report-artifact - if: always() && steps.parse-coverage-reports.outputs.parsed-files != '' - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - env: - REPORT_FILES: ${{ steps.parse-coverage-reports.outputs.parsed-files }} - REPORT_GROUP: ${{ inputs.report-group || github.job }} - WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }} - with: - script: | - const group = process.env.REPORT_GROUP; - if (!/^[\w-]+$/.test(group)) { - throw new Error('report-group must be a job ID containing letters, numbers, underscores or hyphens.'); - } - const path = require('node:path'); - const source = path.relative(process.env.GITHUB_WORKSPACE, process.env.WORKING_DIRECTORY) - .replace(/[^\w-]+/g, '-').replace(/^-+|-+$/g, '').slice(0, 120) || 'root'; - core.setOutput('files', JSON.parse(process.env.REPORT_FILES).join('\n')); - core.setOutput('name', `ci-reports-${process.env.GITHUB_RUN_ATTEMPT}-${group}-${source}-${require('node:crypto').randomUUID()}`); - - - name: Upload native test and coverage reports - id: upload-reports - if: always() && steps.report-artifact.outputs.files != '' - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 - with: - name: ${{ steps.report-artifact.outputs.name }} - path: ${{ steps.report-artifact.outputs.files }} - include-hidden-files: true - if-no-files-found: error - retention-days: 7 + source-sha: ${{ inputs.coverage-source-sha }} + source-prefix: ${{ inputs.coverage-source-prefix }} - name: Clean shard workspace if: always() && steps.prepare-test.outputs.directory != '' @@ -366,14 +291,3 @@ runs: SHARD_DIRECTORY: ${{ steps.prepare-test.outputs.directory }} with: script: await io.rmRF(process.env.SHARD_DIRECTORY); - - - name: Prepare native GitHub coverage - id: native-coverage - if: ${{ !cancelled() && steps.run-test.outcome != 'skipped' && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') && inputs.coverage == 'github-code-quality' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/coverage-reports@d52648f1645f1318908149af3f35b71b897ca566 # coverage support (PR #683, unreleased) - with: - working-directory: ${{ steps.working-directory.outputs.absolute-path }} - report-group: ${{ inputs.report-group || github.job }} - reports: ${{ inputs.coverage-reports || '[{"file":"coverage/cobertura-coverage.xml","language":"JavaScript"}]' }} - source-sha: ${{ inputs.coverage-source-sha }} - source-prefix: ${{ inputs.coverage-source-prefix }} diff --git a/tests/continuous-integration/package.json b/tests/continuous-integration/package.json index 4c2b7d43..7a212e0e 100644 --- a/tests/continuous-integration/package.json +++ b/tests/continuous-integration/package.json @@ -4,8 +4,9 @@ "type": "module", "scripts": { "test": "node --test", - "test:ci": "node --test", - "test:vitest": "vitest run --config fixtures/vitest.config.mjs --reporter=default --reporter=junit --outputFile.junit=coverage/sharding/junit.xml" + "test:ci": "node --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=coverage/junit.xml", + "test:vitest": "vitest run --config fixtures/vitest.config.mjs --reporter=default --reporter=junit --outputFile.junit=coverage/sharding/junit.xml", + "pretest:ci": "node -e \"require('node:fs').mkdirSync('coverage', {recursive:true})\"" }, "devDependencies": { "@actions/expressions": "0.3.61", diff --git a/tests/continuous-integration/workflow.test.js b/tests/continuous-integration/workflow.test.js index b14dff09..eee9d45a 100644 --- a/tests/continuous-integration/workflow.test.js +++ b/tests/continuous-integration/workflow.test.js @@ -18,115 +18,77 @@ const defaults = Object.fromEntries( ); const require = createRequire(import.meta.url); -test("GitHub reports default to individual comments", async () => { +test("coverage collection defaults to enabled without selecting a provider", async () => { const { outputs } = await runScript("prepare", "test-options", { TEST_INPUT: "true", }); - assert.equal(outputs.coverage, "github"); - assert.equal(outputs.comment, true); - assert.equal(outputs["report-group"], ""); + assert.equal(outputs.coverage, true); const disabled = await runScript("prepare", "test-options", { - TEST_INPUT: '{"coverage":null}', + TEST_INPUT: '{"coverage":false}', }); - assert.equal(disabled.outputs.coverage, ""); + assert.equal(disabled.outputs.coverage, false); }); -test("nested callers can group native reports without individual comments", async () => { +test("custom components retain their report paths and stable labels", async () => { const reports = [ { file: "coverage/custom.xml", language: "TypeScript", label: "frontend" }, ]; const { outputs } = await runScript("prepare", "test-options", { - TEST_INPUT: JSON.stringify({ - comment: false, - "report-group": "action-tests", - coverage: "github-code-quality", - "coverage-reports": reports, - }), + TEST_INPUT: JSON.stringify({ coverage: true, "coverage-reports": reports }), }); - assert.equal(outputs.coverage, "github-code-quality"); assert.deepEqual(JSON.parse(outputs["coverage-reports"]), reports); - assert.equal(outputs.comment, false); - assert.equal(outputs["report-group"], "action-tests"); - const action = workflow.jobs.test.steps.find( - (step) => step.name === "Run tests", - ); - for (const name of [ - "comment", - "report-group", - "coverage", - "coverage-reports", - ]) { - assert.equal( - evaluate(action.with[name], { - needs: { - prepare: { - outputs: Object.fromEntries( - Object.entries(outputs).map(([key, value]) => [ - `test-${key}`, - value, - ]), - ), - }, - }, - }).value, - outputs[name], - ); - } }); for (const options of [ - { comment: "false" }, - { "report-group": "../bad" }, - { "report-group": "one,two" }, - { "report-group": false }, + { comment: false }, + { "report-group": "tests" }, + { coverage: "github" }, { "coverage-reports": {} }, { "coverage-source-sha": 42 }, ]) { - test(`rejects invalid report options ${JSON.stringify(options)}`, async () => { + test(`rejects retired or invalid report options ${JSON.stringify(options)}`, async () => { await assert.rejects( runScript("prepare", "test-options", { TEST_INPUT: JSON.stringify(options), }), - /test\.(comment|report-group|coverage-reports|coverage-source-sha)/, + /Unknown test options|test\.(coverage|coverage-reports|coverage-source-sha)/, ); }); } -test("report artifacts retain group, package and attempt without matrix collisions", async () => { - const action = readYaml("actions/test/action.yml"); - const step = action.runs.steps.find((item) => item.id === "report-artifact"); - const names = []; - for (const source of ["first", "second", "first"]) { - const outputs = {}; - await runInNewContext(`(async () => { ${step.with.script} })()`, { - require, - core: { - setOutput: (key, value) => { - outputs[key] = value; - }, - }, - process: { - env: { - GITHUB_WORKSPACE: "/workspace", - GITHUB_RUN_ATTEMPT: "2", - WORKING_DIRECTORY: `/workspace/actions/${source}`, - REPORT_GROUP: "action-tests", - REPORT_FILES: - '["/workspace/coverage/lcov.info","/workspace/coverage/junit.xml"]', - }, - }, - }); - assert.match( - outputs.name, - new RegExp(`^ci-reports-2-action-tests-actions-${source}-[a-f0-9-]+$`), - ); - assert.equal( - outputs.files, - "/workspace/coverage/lcov.info\n/workspace/coverage/junit.xml", - ); - names.push(outputs.name); - } - assert.equal(new Set(names).size, 3); +test("producer planning includes lint and merged tests without repeating shard executions", async () => { + const reports = [ + { file: "coverage/custom.xml", language: "TypeScript", label: "frontend" }, + ]; + const { outputs } = await runScript("prepare", "report-producers", { + CHECKS: "true", + LINT: "lint:ci", + TEST_ENABLED: "true", + COVERAGE: "true", + COVERAGE_REPORTS: JSON.stringify(reports), + DIRECTORY: "apps/web", + CONTAINER: "", + SOURCE_PREFIX: "", + }); + assert.equal(outputs.producers.length, 2); + assert.deepEqual( + Array.from(outputs.producers, (producer) => producer.key), + ["lint", "test"], + ); + assert.equal(outputs.producers[1].directory, "apps/web"); + assert.deepEqual( + JSON.parse(JSON.stringify(outputs.producers[1].coverage)), + reports, + ); + const disabled = await runScript("prepare", "report-producers", { + CHECKS: "false", + LINT: "lint:ci", + TEST_ENABLED: "true", + COVERAGE: "true", + DIRECTORY: ".", + CONTAINER: "", + }); + assert.equal(disabled.outputs.producers.length, 0); }); async function runScript(job, stepId, env = {}) { @@ -198,6 +160,7 @@ function canRun( packageResult = "success", testResult = "success", testEnabled = true, + lintEnabled = true, shards = 1, } = {}, ) { @@ -209,6 +172,7 @@ function canRun( "build-commands": commands, "package-enabled": String(packageEnabled), "test-enabled": String(testEnabled), + "lint-enabled": String(lintEnabled), "test-shards": String(shards), }, }, @@ -497,7 +461,7 @@ test("empty builds skip their job and lint stays independent of build failures", assert.equal(canRun("build", { prepare: "failure" }), false); assert.equal(canRun("lint", { build: "failure" }), true); assert.equal(canRun("lint", { prepare: "failure" }), false); - assert.equal(canRun("lint", { inputs: { lint: "" } }), false); + assert.equal(canRun("lint", { lintEnabled: false }), false); }); for (const action of ["build", "lint", "test"]) { diff --git a/tests/npm/package-lock.json b/tests/npm/package-lock.json index d386d669..85f9f7a4 100644 --- a/tests/npm/package-lock.json +++ b/tests/npm/package-lock.json @@ -9,6 +9,7 @@ "version": "0.1.0", "devDependencies": { "jest": "^30.5.2", + "jest-junit": "17.0.0", "nx": "^24.0.6", "prettier": "^3.10.1", "storybook": "^10.6.7" @@ -5552,6 +5553,22 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, + "node_modules/jest-junit": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-17.0.0.tgz", + "integrity": "sha512-RYWCkq4j59gUXj5DsgbIE7xFBZzu1gtibPhyjSjMmGaOTLnqlXhg7x9zuGCwgbCuMAyoyvk0Mi8wSrRR5uOeLA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "mkdirp": "^1.0.4", + "strip-ansi": "^6.0.1", + "uuid": "^14.0.0", + "xml": "^1.0.1" + }, + "engines": { + "node": ">=20.0.0" + } + }, "node_modules/jest-leak-detector": { "version": "30.5.1", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.5.1.tgz", @@ -6069,6 +6086,19 @@ "node": ">=16 || 14 >=14.17" } }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -7604,6 +7634,20 @@ "dev": true, "license": "MIT" }, + "node_modules/uuid": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.3.tgz", + "integrity": "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist-node/bin/uuid" + } + }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -7727,6 +7771,13 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/xml": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", + "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==", + "dev": true, + "license": "MIT" + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/tests/npm/package.json b/tests/npm/package.json index cfdc77b0..c5dd0522 100644 --- a/tests/npm/package.json +++ b/tests/npm/package.json @@ -6,15 +6,19 @@ "lint": "echo \"lint test\"", "lint:ci": "echo \"lint:ci test\"", "build": "mkdir -p dist && echo \"build test\" > dist/test.txt", - "test:ci": "jest --coverage" + "test:ci": "jest --coverage --coverageReporters=lcov --coverageReporters=cobertura --reporters=default --reporters=jest-junit" }, "devDependencies": { "jest": "^30.5.2", "nx": "^24.0.6", "prettier": "^3.10.1", - "storybook": "^10.6.7" + "storybook": "^10.6.7", + "jest-junit": "17.0.0" }, "overrides": { "undici": ">=7.29.1" + }, + "jest-junit": { + "outputDirectory": "coverage" } } From 6bf8b6604f5095e8aaf43258c6be8bfd3594f974 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 26 Nov 2026 19:12:13 +0100 Subject: [PATCH 05/48] fix(reports): align producer integration and generated usage --- .github/workflows/__shared-ci.yml | 4 +- .github/workflows/__test-release.yml | 2 +- ...__test-workflow-continuous-integration.yml | 6 +- .github/workflows/continuous-integration.md | 111 ++++++---- .github/workflows/continuous-integration.yml | 2 +- actions/lint/README.md | 28 ++- actions/lint/action.yml | 4 +- actions/package/restore/package.json | 3 +- actions/release/finalize/package.json | 3 +- actions/release/prepare/package.json | 3 +- actions/release/verify/package.json | 3 +- actions/test/README.md | 189 ++++++------------ actions/test/action.yml | 4 +- 13 files changed, 177 insertions(+), 185 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index a6d26381..8970a189 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) permissions: actions: read contents: read @@ -116,7 +116,7 @@ jobs: reports: needs: [lint, test-release] if: always() - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) permissions: contents: read pull-requests: write diff --git a/.github/workflows/__test-release.yml b/.github/workflows/__test-release.yml index 81b1435d..c93c579c 100644 --- a/.github/workflows/__test-release.yml +++ b/.github/workflows/__test-release.yml @@ -285,7 +285,7 @@ jobs: core.setOutput('matrix',matrix); core.setOutput('producers',matrix.map(item=>({key:item.key,type:'test',directory:'actions/'+item.action,coverage:[]}))); - id: plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) with: operation: plan producers: ${{ steps.actions.outputs.producers }} diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index 08a1c775..0df77d2f 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -58,7 +58,7 @@ jobs: permissions: {} steps: - id: discover - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) with: operation: discover job-results: ${{ toJSON(needs) }} @@ -435,7 +435,7 @@ jobs: PACKAGE_ARTIFACT_ID: ${{ needs.act-without-container-and-github-reports.outputs.package-tarball-artifact-id }} run: test -z "$PACKAGE_ARTIFACT_ID" - id: discover - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) with: operation: discover job-results: ${{ toJSON(needs) }} @@ -592,7 +592,7 @@ jobs: collect-native-coverage: name: Verify coverage after the complete shard merge needs: sharded-host - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) permissions: contents: read pull-requests: write diff --git a/.github/workflows/continuous-integration.md b/.github/workflows/continuous-integration.md index cb272d8b..136f3dcd 100644 --- a/.github/workflows/continuous-integration.md +++ b/.github/workflows/continuous-integration.md @@ -2,12 +2,6 @@ # GitHub Reusable Workflow: Node.js Continuous Integration -
- Node.js Continuous Integration -
- ---- - @@ -35,12 +29,56 @@ Workflow to performs continuous integration steps against a Node.js project: - Build - Test +### Reports and coverage + +Lint and test jobs retain native diagnostics in one artifact per execution. +They post no PR comments and need no publication permissions. Configure native +test reports (JUnit or TAP) and lint reports (for example Checkstyle or SARIF). +Missing required reports fail even when the tool command exits successfully. +Available reports are retained after failures. + +Tests require Cobertura by default. The highest configured runtime contributes +coverage; every runtime retains its test results. Set `test: '{"coverage":false}'` +for tests that deliberately produce no Cobertura. The command still controls +instrumentation. Custom `test.coverage-reports` describes Cobertura file paths, +Linguist languages and stable component labels; it belongs beside the producer. +Separate components stay separate. Merge shards in the framework first. + +Call the common workflow once after producer workflows. It reads their complete +report plans from `needs`, regardless of calling job names: + +```yaml +reports: + needs: [checks] + if: ${{ always() }} + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@ + permissions: + contents: read + pull-requests: write + code-quality: write + id-token: write + with: + job-results: ${{ toJSON(needs) }} + coverage: github +``` + +Select `coverage: none` (default) for summaries, `github` for native GitHub +coverage, or `codecov`. Both publishers consume validated Cobertura. Native +GitHub coverage requires repository enablement and a default-branch baseline. +The reporting workflow owns one CI comment and the `CI reports complete` check. +Forks retain diagnostics without write operations. Partial reruns require +rerunning all producers. Producer workflows test the PR head or push revision. + +Standalone action jobs forward their `report-plan` output. Custom outer matrices +must forward a complete plan derived from their configuration; GitHub's last +successful matrix output does not describe all executions. See the common +[recording action](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/record-ci-reports) +for the advanced contract. No collector-side coverage inventory is needed. + ### Permissions - **`contents`**: `read` -- **`id-token`**: `write` - **`packages`**: `read` -- **`pull-requests`**: `write` - **`security-events`**: `write` @@ -58,12 +96,10 @@ on: permissions: {} jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@191d7230d57982bfc11d57f68b005f386a6d7fbf # 3.1.1 + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@11636b817040a2a7d61b389c28fa1b401c37a2fa # feat/native-github-coverage permissions: contents: read - id-token: write packages: read - pull-requests: write security-events: write secrets: # Secrets to be used during the build step. @@ -194,14 +230,13 @@ jobs: # Whether to enable testing. # Set to `null` or empty to disable. # Accepts a JSON object for test options. See [test action](../../actions/test/README.md). - # If coverage is enabled, it should generate test and coverage reports in standard formats. - # `coverage: github-code-quality` prepares Cobertura for the common native publication workflow. - # Configure the project's Cobertura reporter; the default path is coverage/cobertura-coverage.xml. - # Optional `coverage-reports` is an array of {file, language, label} for distinct components. - # Builds, tests and shard merges use the PR head in native mode; retain merge-result testing - # separately when required. Set report-group to the outer caller job ID and list every - # component in the common ci-reports coverage inventory before calling publish-coverage. - # Prebuilt containers without Git metadata require coverage-source-sha and coverage-source-prefix. + # `coverage` is a boolean, true by default. The project must generate native test results + # and Cobertura at coverage/cobertura-coverage.xml, or describe other component files + # with `coverage-reports` (file, language and optional label). + # Builds and tests use the PR head. Run merge-result validation separately if required. + # Prebuilt containers need coverage-source-sha and coverage-source-prefix for coverage. + # Set coverage to false for diagnostics without required Cobertura. Provider selection + # belongs in the common ci-reports workflow, which reads this workflow's report-plan. # Shards publish only the final merged reports; never upload individual shards. # Optional `arguments` is a JSON array passed to the package script without shell expansion. # Set `shards` to an integer from 2 to 256 to enable Vitest blob sharding (default: 1). @@ -216,18 +251,15 @@ jobs: # CI_TEST_SHARD is index/total during shards and empty during merging. If coverage thresholds are configured, # defer them to merging with `thresholds: process.env.CI_TEST_SHARD ? undefined : yourThresholds`. # Keep coverage enabled in both commands, and set coverage.reportOnFailure to retain failed-test coverage. - # Final reporters and report-file must describe the merged JUnit/LCOV outputs. + # Final reporters and report-file must describe the merged JUnit/Cobertura outputs. # Blob payloads include coverage; file-based attachments are not transferred by this workflow. - # Example: `{"command":"test:ci","shards":2,"report-file":"junit.xml,coverage/lcov.info"}`. - # - # For consolidated reports, set `comment` to false and `report-group` to the calling job ID - # used in the common `ci-reports` workflow's `job-results`. + # Example: `{"command":"test:ci","shards":2,"report-file":"junit.xml"}`. # # Example: # # ```json:package.json # { - # "test:ci": "vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=lcov --coverage.reporter=text" + # "test:ci": "vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text" # } # ``` # @@ -285,6 +317,9 @@ jobs: # When specified, steps will execute inside this container instead of checking out code. # The container should have the project code and dependencies pre-installed. container: "" + + # Expected producer metadata for a custom outer orchestration. Leave empty for automatic planning. + report-plan: "" ```` @@ -356,14 +391,13 @@ jobs: | **`test`** | Whether to enable testing. | **false** | **string** | `true` | | | Set to `null` or empty to disable. | | | | | | Accepts a JSON object for test options. See [test action](../../actions/test/README.md). | | | | -| | If coverage is enabled, it should generate test and coverage reports in standard formats. | | | | -| | `coverage: github-code-quality` prepares Cobertura for the common native publication workflow. | | | | -| | Configure the project's Cobertura reporter; the default path is coverage/cobertura-coverage.xml. | | | | -| | Optional `coverage-reports` is an array of {file, language, label} for distinct components. | | | | -| | Builds, tests and shard merges use the PR head in native mode; retain merge-result testing | | | | -| | separately when required. Set report-group to the outer caller job ID and list every | | | | -| | component in the common ci-reports coverage inventory before calling publish-coverage. | | | | -| | Prebuilt containers without Git metadata require coverage-source-sha and coverage-source-prefix. | | | | +| | `coverage` is a boolean, true by default. The project must generate native test results | | | | +| | and Cobertura at coverage/cobertura-coverage.xml, or describe other component files | | | | +| | with `coverage-reports` (file, language and optional label). | | | | +| | Builds and tests use the PR head. Run merge-result validation separately if required. | | | | +| | Prebuilt containers need coverage-source-sha and coverage-source-prefix for coverage. | | | | +| | Set coverage to false for diagnostics without required Cobertura. Provider selection | | | | +| | belongs in the common ci-reports workflow, which reads this workflow's report-plan. | | | | | | Shards publish only the final merged reports; never upload individual shards. | | | | | | Optional `arguments` is a JSON array passed to the package script without shell expansion. | | | | | | Set `shards` to an integer from 2 to 256 to enable Vitest blob sharding (default: 1). | | | | @@ -378,16 +412,13 @@ jobs: | | CI_TEST_SHARD is index/total during shards and empty during merging. If coverage thresholds are configured, | | | | | | defer them to merging with `thresholds: process.env.CI_TEST_SHARD ? undefined : yourThresholds`. | | | | | | Keep coverage enabled in both commands, and set coverage.reportOnFailure to retain failed-test coverage. | | | | -| | Final reporters and report-file must describe the merged JUnit/LCOV outputs. | | | | +| | Final reporters and report-file must describe the merged JUnit/Cobertura outputs. | | | | | | Blob payloads include coverage; file-based attachments are not transferred by this workflow. | | | | -| | Example: `{"command":"test:ci","shards":2,"report-file":"junit.xml,coverage/lcov.info"}`. | | | | -| | | | | | -| | For consolidated reports, set `comment` to false and `report-group` to the calling job ID | | | | -| | used in the common `ci-reports` workflow's `job-results`. | | | | +| | Example: `{"command":"test:ci","shards":2,"report-file":"junit.xml"}`. | | | | | | | | | | | | Example: | | | | | | | | | | -| |
{
 "test:ci": "vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=lcov --coverage.reporter=text"
}
| | | | +| |
{
 "test:ci": "vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text"
}
| | | | | **`working-directory`** | Working directory where dependencies and application commands run. | **false** | **string** | `.` | | | Relative paths resolve against the workspace of each application job. | | | | | | Directory existence and non-container workspace boundaries are validated in those jobs. | | | | @@ -414,6 +445,7 @@ jobs: | | | | | | | | When specified, steps will execute inside this container instead of checking out code. | | | | | | The container should have the project code and dependencies pre-installed. | | | | +| **`report-plan`** | Expected producer metadata for a custom outer orchestration. Leave empty for automatic planning. | **false** | **string** | - | @@ -507,6 +539,7 @@ When specified, steps will execute inside this container instead of checking out | **`package-tarball-artifact-id`** | Artifact ID of the package validated by the packaging job. Available when package is enabled and validation succeeds. | | **`package-tarball-artifacts`** | JSON object mapping package directories to validated tarball artifact IDs when packaging is enabled. Require successful CI before publication. | | **`build-artifact-id`** | ID of the build artifact) uploaded during the build step. | +| **`report-plan`** | Complete expected report metadata, consumed automatically by ci-reports. | diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7d776c3b..7d93f8a7 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -659,7 +659,7 @@ jobs: core.setOutput('producers',producers); core.setOutput('lint-enabled',lint); - id: report-plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) with: operation: plan producers: ${{ steps.report-producers.outputs.producers }} diff --git a/actions/lint/README.md b/actions/lint/README.md index 20922314..8373b48b 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -2,12 +2,6 @@ # ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stY2lyY2xlIiBjb2xvcj0iYmx1ZSI+PHBhdGggZD0iTTIyIDExLjA4VjEyYTEwIDEwIDAgMSAxLTUuOTMtOS4xNCI+PC9wYXRoPjxwb2x5bGluZSBwb2ludHM9IjIyIDQgMTIgMTQuMDEgOSAxMS4wMSI+PC9wb2x5bGluZT48L3N2Zz4=) GitHub Action: Lint -
- Lint -
- ---- - @@ -27,7 +21,13 @@ ## Overview -Action to lint Node.js projects with support for pull request reporting and annotations +Run project lint commands and retain native reports for consolidated CI feedback. +The common ci-reports workflow owns comments and external coverage publication. +Forward report-plan from standalone jobs; reusable workflows do this automatically. +Required reports remain required after command failures. This action keeps local +diagnostics and never grants publication permissions to project code. + +Generate supported lint reports such as SARIF, ESLint JSON or Checkstyle XML. @@ -35,7 +35,7 @@ Action to lint Node.js projects with support for pull request reporting and anno ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@191d7230d57982bfc11d57f68b005f386a6d7fbf # 3.1.1 +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@11636b817040a2a7d61b389c28fa1b401c37a2fa # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -75,6 +75,9 @@ Action to lint Node.js projects with support for pull request reporting and anno # Optional path mapping to adjust file paths in test and coverage reports. # See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. path-mapping: "" + + # Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. + report-plan: "" ``` @@ -104,11 +107,20 @@ Action to lint Node.js projects with support for pull request reporting and anno | | When omitted, `auto:lint` detection may find no reports. | | | | **`path-mapping`** | Optional path mapping to adjust file paths in test and coverage reports. | **false** | - | | | See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. | | | +| **`report-plan`** | Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. | **false** | - | + +## Outputs + +| **Output** | **Description** | +| ------------------------ | --------------------------------------------------------------------- | +| **`report-plan`** | Expected report metadata. Forward from standalone jobs. | +| **`report-artifact-id`** | Native report bundle, including available diagnostics after failures. | + diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 28783ced..7a5e3af4 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -85,7 +85,7 @@ runs: with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} - id: report-plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) with: operation: plan report-plan: ${{ inputs.report-plan }} @@ -129,7 +129,7 @@ runs: - id: reports name: Record lint results if: ${{ !cancelled() && steps.report-plan.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} report-plan: ${{ steps.report-plan.outputs.report-plan }} diff --git a/actions/package/restore/package.json b/actions/package/restore/package.json index 32d1526c..cc85e667 100644 --- a/actions/package/restore/package.json +++ b/actions/package/restore/package.json @@ -4,7 +4,8 @@ "scripts": { "test": "node --test", "test:watch": "node --test --watch", - "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test" + "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=coverage/junit.xml --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test", + "pretest:ci": "node -e \"require('node:fs').mkdirSync('coverage', { recursive: true })\"" }, "devDependencies": { "@actions/exec": "^3.0.0" diff --git a/actions/release/finalize/package.json b/actions/release/finalize/package.json index 72918d9e..ade56640 100644 --- a/actions/release/finalize/package.json +++ b/actions/release/finalize/package.json @@ -4,7 +4,8 @@ "scripts": { "test": "node --test", "test:watch": "node --test --watch", - "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test" + "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=coverage/junit.xml --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test", + "pretest:ci": "node -e \"require('node:fs').mkdirSync('coverage', { recursive: true })\"" }, "devDependencies": { "@actions/glob": "^0.7.0" diff --git a/actions/release/prepare/package.json b/actions/release/prepare/package.json index 3b66f1ea..657eec94 100644 --- a/actions/release/prepare/package.json +++ b/actions/release/prepare/package.json @@ -4,7 +4,8 @@ "scripts": { "test": "node --test", "test:watch": "node --test --watch", - "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test" + "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=coverage/junit.xml --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test", + "pretest:ci": "node -e \"require('node:fs').mkdirSync('coverage', { recursive: true })\"" }, "devDependencies": { "@actions/exec": "^3.0.0", diff --git a/actions/release/verify/package.json b/actions/release/verify/package.json index 0e26e7f0..69f22bb4 100644 --- a/actions/release/verify/package.json +++ b/actions/release/verify/package.json @@ -4,6 +4,7 @@ "scripts": { "test": "node --test", "test:watch": "node --test --watch", - "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test" + "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=coverage/junit.xml --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test", + "pretest:ci": "node -e \"require('node:fs').mkdirSync('coverage', { recursive: true })\"" } } diff --git a/actions/test/README.md b/actions/test/README.md index f7a81b2b..c3890dcc 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -2,12 +2,6 @@ # ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stc3F1YXJlIiBjb2xvcj0iYmx1ZSI+PHBvbHlsaW5lIHBvaW50cz0iOSAxMSAxMiAxNCAyMiA0Ij48L3BvbHlsaW5lPjxwYXRoIGQ9Ik0yMSAxMnY3YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0yVjVhMiAyIDAgMCAxIDItMmgxMSI+PC9wYXRoPjwvc3ZnPg==) GitHub Action: Test -
- Test -
- ---- - @@ -27,27 +21,14 @@ ## Overview -Action to test Node.js projects with support for coverage reporting and pull request annotations - -GitHub reporting retains native report artifacts for seven days, including after -test failures. Set `comment: false` and call the common `ci-reports` workflow -after test jobs to publish one test comment and one coverage comment. - -Note that this action must have write permission for id-token for this to work when using Codecov coverage reporting: - -```yml -permissions: - id-token: write -``` +Run project test commands and retain native reports for consolidated CI feedback. +The common ci-reports workflow owns comments and external coverage publication. +Forward report-plan from standalone jobs; reusable workflows do this automatically. +Required reports remain required after command failures. This action keeps local +diagnostics and never grants publication permissions to project code. -Native `coverage: github-code-quality` prepares Cobertura artifacts for the common -[CI reports workflow](https://github.com/hoverkraft-tech/ci-github-common/blob/main/.github/workflows/ci-reports.md) -and its opt-in publication workflow. Set `report-group` to the outer calling job -and list every expected component in the collector. The default label is the -repository-relative working directory, or `root`. Multiple reports need explicit -stable labels. Reports must measure the PR head commit, not the PR merge commit. -Keep merge-result validation separately when required. No upload permission is -needed in this test action; only the publication job needs `code-quality: write`. +Coverage publication requires Cobertura XML generated by the test tool. Configure +JUnit or TAP for test results and merge framework shards before recording coverage. @@ -55,7 +36,7 @@ needed in this test action; only the publication job needs `code-quality: write` ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@191d7230d57982bfc11d57f68b005f386a6d7fbf # 3.1.1 +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@11636b817040a2a7d61b389c28fa1b401c37a2fa # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -78,8 +59,8 @@ needed in this test action; only the publication job needs `code-quality: write` # This should be a script defined in your `package.json`. # The command should generate coverage report files in a standard format (Cobertura XML, lcov, etc.). # - # Vitest: `vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=lcov --coverage.reporter=text` - # Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage` + # Vitest: `vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text` + # Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage --coverageReporters=cobertura` # # Default: `test:ci` command: test:ci @@ -90,20 +71,12 @@ needed in this test action; only the publication job needs `code-quality: write` # Repository-relative directory represented by the container working-directory. Required with coverage-source-sha when Git metadata is absent; use a dot for the repository root. coverage-source-prefix: "" - # Native GitHub coverage reports as a JSON array of file, language and optional label. - # Empty uses coverage/cobertura-coverage.xml; multiple reports require explicit unique labels. - # Every file must be Cobertura XML produced by the test command. Paths are relative - # to working-directory. Example: [{"file":"coverage.xml","language":"JavaScript","label":"backend"}]. + # Optional JSON array of Cobertura file, language and label. Empty uses the language default; labels default to the project directory. coverage-reports: "" - # Code coverage reporter to use. Supported values: - # - `github`: Parse coverage reports via [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action, with GitHub summaries/PR comments - # - `github-code-quality`: Prepare Cobertura for the common native publication workflow - # - `codecov`: Upload coverage to Codecov - # - `""` or `null`: No coverage reporting - # - # Default: `github` - coverage: github + # Require Cobertura coverage for consolidated publication. Set false to retain available diagnostics without requiring Cobertura. Configure instrumentation in the test command. + # Default: `true` + coverage: "true" # JSON array of arguments passed to the package script without shell expansion. # npm receives its required `--` separator; pnpm and Yarn receive arguments directly. @@ -135,30 +108,16 @@ needed in this test action; only the publication job needs `code-quality: write` # Provide absolute paths or paths relative to the working directory. # Multiple entries can be separated by newlines, commas, or semicolons. # Each explicit path or glob must match a file after exclusions; missing reports fail the action. - # When omitted, `auto:test,auto:coverage` detection may find no reports. - # Test reports are collected independently of the coverage destination. + # When omitted, test reports are discovered and planned Cobertura paths are required. + # At least one executed test must appear in the required native test report. report-file: "" # Optional path mapping to adjust file paths in test and coverage reports. # See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. path-mapping: "" - # Publish an individual coverage PR comment. Set false when using the common ci-reports workflow; GitHub summaries and report artifacts remain enabled. - # Default: `true` - comment: "true" - - # Job ID used to associate native reports with the common ci-reports workflow's job-results. - # Defaults to the current job ID. Set the outer calling job ID for nested reusable workflows. - # Matrix runs keep separate artifacts labeled with their working directory. - report-group: "" - - # GitHub token for coverage PR comments. - # Required when coverage is `github` and individual comments are enabled. - # Requires permissions to create and update PR comments: - # - # - `issues: write` - # - `pull-requests: write` - github-token: "" + # Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. + report-plan: "" ``` @@ -166,65 +125,49 @@ needed in this test action; only the publication job needs `code-quality: write` ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | -| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | -| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | -| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | -| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | -| | Can be absolute or relative to the repository root. | | | -| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | -| **`command`** | npm/pnpm/Yarn script command to run for testing. | **false** | `test:ci` | -| | This should be a script defined in your `package.json`. | | | -| | The command should generate coverage report files in a standard format (Cobertura XML, lcov, etc.). | | | -| | | | | -| | Vitest: `vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=lcov --coverage.reporter=text` | | | -| | Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage` | | | -| **`coverage-source-sha`** | Tested source commit for a prebuilt container without Git metadata. Must equal the PR head or push SHA. | **false** | - | -| **`coverage-source-prefix`** | Repository-relative directory represented by the container working-directory. Required with coverage-source-sha when Git metadata is absent; use a dot for the repository root. | **false** | - | -| **`coverage-reports`** | Native GitHub coverage reports as a JSON array of file, language and optional label. | **false** | - | -| | Empty uses coverage/cobertura-coverage.xml; multiple reports require explicit unique labels. | | | -| | Every file must be Cobertura XML produced by the test command. Paths are relative | | | -| | to working-directory. Example: [{"file":"coverage.xml","language":"JavaScript","label":"backend"}]. | | | -| **`coverage`** | Code coverage reporter to use. Supported values: | **false** | `github` | -| | - `github`: Parse coverage reports via [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action, with GitHub summaries/PR comments | | | -| | - `github-code-quality`: Prepare Cobertura for the common native publication workflow | | | -| | - `codecov`: Upload coverage to Codecov | | | -| | - `""` or `null`: No coverage reporting | | | -| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | -| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | -| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | -| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | -| | after tests, including failures. Individual reporting is disabled for shards. | | | -| | Use reporter-specific --outputFile.junit rather than scalar --outputFile in the package script. | | | -| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | -| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | -| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | -| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | -| | All shards and their merge must use the same group and absolute project directory. | | | -| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | -| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | -| | The package script must enable final reporters and original coverage thresholds. | | | -| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | -| **`report-file`** | Optional test and coverage report paths forwarded to the [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action. | **false** | - | -| | Supports multiple formats (Cobertura, OpenCover, lcov, etc.). | | | -| | Provide absolute paths or paths relative to the working directory. | | | -| | Multiple entries can be separated by newlines, commas, or semicolons. | | | -| | Each explicit path or glob must match a file after exclusions; missing reports fail the action. | | | -| | When omitted, `auto:test,auto:coverage` detection may find no reports. | | | -| | Test reports are collected independently of the coverage destination. | | | -| **`path-mapping`** | Optional path mapping to adjust file paths in test and coverage reports. | **false** | - | -| | See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. | | | -| **`comment`** | Publish an individual coverage PR comment. Set false when using the common ci-reports workflow; GitHub summaries and report artifacts remain enabled. | **false** | `true` | -| **`report-group`** | Job ID used to associate native reports with the common ci-reports workflow's job-results. | **false** | - | -| | Defaults to the current job ID. Set the outer calling job ID for nested reusable workflows. | | | -| | Matrix runs keep separate artifacts labeled with their working directory. | | | -| **`github-token`** | GitHub token for coverage PR comments. | **false** | - | -| | Required when coverage is `github` and individual comments are enabled. | | | -| | Requires permissions to create and update PR comments: | | | -| | | | | -| | - `issues: write` | | | -| | - `pull-requests: write` | | | +| **Input** | **Description** | **Required** | **Default** | +| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | +| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | +| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | +| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | +| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | +| | Can be absolute or relative to the repository root. | | | +| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | +| **`command`** | npm/pnpm/Yarn script command to run for testing. | **false** | `test:ci` | +| | This should be a script defined in your `package.json`. | | | +| | The command should generate coverage report files in a standard format (Cobertura XML, lcov, etc.). | | | +| | | | | +| | Vitest: `vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text` | | | +| | Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage --coverageReporters=cobertura` | | | +| **`coverage-source-sha`** | Tested source commit for a prebuilt container without Git metadata. Must equal the PR head or push SHA. | **false** | - | +| **`coverage-source-prefix`** | Repository-relative directory represented by the container working-directory. Required with coverage-source-sha when Git metadata is absent; use a dot for the repository root. | **false** | - | +| **`coverage-reports`** | Optional JSON array of Cobertura file, language and label. Empty uses the language default; labels default to the project directory. | **false** | - | +| **`coverage`** | Require Cobertura coverage for consolidated publication. Set false to retain available diagnostics without requiring Cobertura. Configure instrumentation in the test command. | **false** | `true` | +| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | +| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | +| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | +| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | +| | after tests, including failures. Individual reporting is disabled for shards. | | | +| | Use reporter-specific --outputFile.junit rather than scalar --outputFile in the package script. | | | +| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | +| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | +| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | +| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | +| | All shards and their merge must use the same group and absolute project directory. | | | +| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | +| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | +| | The package script must enable final reporters and original coverage thresholds. | | | +| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | +| **`report-file`** | Optional test and coverage report paths forwarded to the [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action. | **false** | - | +| | Supports multiple formats (Cobertura, OpenCover, lcov, etc.). | | | +| | Provide absolute paths or paths relative to the working directory. | | | +| | Multiple entries can be separated by newlines, commas, or semicolons. | | | +| | Each explicit path or glob must match a file after exclusions; missing reports fail the action. | | | +| | When omitted, test reports are discovered and planned Cobertura paths are required. | | | +| | At least one executed test must appear in the required native test report. | | | +| **`path-mapping`** | Optional path mapping to adjust file paths in test and coverage reports. | **false** | - | +| | See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. | | | +| **`report-plan`** | Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. | **false** | - | @@ -233,11 +176,11 @@ needed in this test action; only the publication job needs `code-quality: write` ## Outputs -| **Output** | **Description** | -| --------------------------------- | ----------------------------------------------------------------------------------------------- | -| **`native-coverage-artifact-id`** | Cobertura artifact for native GitHub publication, empty unless github-code-quality is selected. | -| **`report-artifact-id`** | Native test and coverage artifact ID, empty when GitHub reports are unavailable. | -| **`shard-artifact-id`** | Blob and manifest artifact ID for an executing shard, including failed tests with a blob. | +| **Output** | **Description** | +| ------------------------ | ----------------------------------------------------------------------------------------- | +| **`report-artifact-id`** | Native report bundle, including available diagnostics after failures. | +| **`shard-artifact-id`** | Blob and manifest artifact ID for an executing shard, including failed tests with a blob. | +| **`report-plan`** | Expected report metadata. Forward from standalone jobs. | diff --git a/actions/test/action.yml b/actions/test/action.yml index 7397504c..ecfdd6c4 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -195,7 +195,7 @@ runs: core.setOutput('failed', shards.validate()); - id: report-plan if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) with: operation: plan report-plan: ${{ inputs.report-plan }} @@ -275,7 +275,7 @@ runs: - id: reports name: Record test results if: ${{ !cancelled() && steps.report-plan.outcome == 'success' && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@5ea25078a15fe361993382872c03a63fd667c11a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} report-plan: ${{ steps.report-plan.outputs.report-plan }} From 8e6761ba958b8763ec93a23650a441eaf0934ee0 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 26 Nov 2026 19:24:32 +0100 Subject: [PATCH 06/48] test(reports): verify native diagnostics with coverage disabled --- .../__test-workflow-continuous-integration.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index 0df77d2f..a55ec658 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -404,7 +404,7 @@ jobs: act-without-container-and-github-reports: # jscpd:ignore-start - name: Act - Run the continuous integration workflow (without container and GitHub reports) + name: Act - Run CI with test diagnostics and coverage disabled uses: $/.github/workflows/continuous-integration.yml permissions: contents: read @@ -439,19 +439,21 @@ jobs: with: operation: discover job-results: ${{ toJSON(needs) }} - - name: Retrieve coverage by the outer calling job ID + - name: Retrieve native test reports from the workflow plan uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: pattern: ${{ steps.discover.outputs.pattern }} path: native-reports - - name: Check that consolidated reporting can find the native coverage + - name: Verify test diagnostics are retained without coverage uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const assert = require('node:assert/strict'); - const files = await (await glob.create('native-reports/**/lcov.info')).glob(); + const files = await (await glob.create('native-reports/**/junit.xml')).glob(); assert.equal(files.length, 1); - assert.match(require('node:fs').readFileSync(files[0], 'utf8'), /SF:/); + assert.match(require('node:fs').readFileSync(files[0], 'utf8'), / Date: Thu, 26 Nov 2026 21:40:26 +0100 Subject: [PATCH 07/48] fix(ci): use the independently releasable common reporting revision --- .github/workflows/__shared-ci.yml | 4 ++-- .github/workflows/__test-release.yml | 2 +- .../workflows/__test-workflow-continuous-integration.yml | 6 +++--- .github/workflows/continuous-integration.yml | 2 +- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 8970a189..892b6557 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) permissions: actions: read contents: read @@ -116,7 +116,7 @@ jobs: reports: needs: [lint, test-release] if: always() - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) permissions: contents: read pull-requests: write diff --git a/.github/workflows/__test-release.yml b/.github/workflows/__test-release.yml index c93c579c..d8e62570 100644 --- a/.github/workflows/__test-release.yml +++ b/.github/workflows/__test-release.yml @@ -285,7 +285,7 @@ jobs: core.setOutput('matrix',matrix); core.setOutput('producers',matrix.map(item=>({key:item.key,type:'test',directory:'actions/'+item.action,coverage:[]}))); - id: plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) with: operation: plan producers: ${{ steps.actions.outputs.producers }} diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index a55ec658..2318fd8d 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -58,7 +58,7 @@ jobs: permissions: {} steps: - id: discover - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) with: operation: discover job-results: ${{ toJSON(needs) }} @@ -435,7 +435,7 @@ jobs: PACKAGE_ARTIFACT_ID: ${{ needs.act-without-container-and-github-reports.outputs.package-tarball-artifact-id }} run: test -z "$PACKAGE_ARTIFACT_ID" - id: discover - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) with: operation: discover job-results: ${{ toJSON(needs) }} @@ -594,7 +594,7 @@ jobs: collect-native-coverage: name: Verify coverage after the complete shard merge needs: sharded-host - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) permissions: contents: read pull-requests: write diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 7d93f8a7..d4a1d5d6 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -659,7 +659,7 @@ jobs: core.setOutput('producers',producers); core.setOutput('lint-enabled',lint); - id: report-plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) with: operation: plan producers: ${{ steps.report-producers.outputs.producers }} diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 7a5e3af4..15e7e80f 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -85,7 +85,7 @@ runs: with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} - id: report-plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) with: operation: plan report-plan: ${{ inputs.report-plan }} @@ -129,7 +129,7 @@ runs: - id: reports name: Record lint results if: ${{ !cancelled() && steps.report-plan.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} report-plan: ${{ steps.report-plan.outputs.report-plan }} diff --git a/actions/test/action.yml b/actions/test/action.yml index ecfdd6c4..e3a6f669 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -195,7 +195,7 @@ runs: core.setOutput('failed', shards.validate()); - id: report-plan if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) with: operation: plan report-plan: ${{ inputs.report-plan }} @@ -275,7 +275,7 @@ runs: - id: reports name: Record test results if: ${{ !cancelled() && steps.report-plan.outcome == 'success' && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@11c842902d003cc4ee2fa1d42f6d80bc6828461a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} report-plan: ${{ steps.report-plan.outputs.report-plan }} From 07f59549733e5488694d49080c9b4cfea6d4f210 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 26 Nov 2026 22:11:36 +0100 Subject: [PATCH 08/48] fix(ci): follow the common reporting release order --- .github/workflows/__shared-ci.yml | 4 ++-- .github/workflows/__test-release.yml | 2 +- .../workflows/__test-workflow-continuous-integration.yml | 6 +++--- .github/workflows/continuous-integration.yml | 2 +- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 892b6557..58774d15 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) permissions: actions: read contents: read @@ -116,7 +116,7 @@ jobs: reports: needs: [lint, test-release] if: always() - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) permissions: contents: read pull-requests: write diff --git a/.github/workflows/__test-release.yml b/.github/workflows/__test-release.yml index d8e62570..39a45823 100644 --- a/.github/workflows/__test-release.yml +++ b/.github/workflows/__test-release.yml @@ -285,7 +285,7 @@ jobs: core.setOutput('matrix',matrix); core.setOutput('producers',matrix.map(item=>({key:item.key,type:'test',directory:'actions/'+item.action,coverage:[]}))); - id: plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) with: operation: plan producers: ${{ steps.actions.outputs.producers }} diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index 2318fd8d..0146803d 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -58,7 +58,7 @@ jobs: permissions: {} steps: - id: discover - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) with: operation: discover job-results: ${{ toJSON(needs) }} @@ -435,7 +435,7 @@ jobs: PACKAGE_ARTIFACT_ID: ${{ needs.act-without-container-and-github-reports.outputs.package-tarball-artifact-id }} run: test -z "$PACKAGE_ARTIFACT_ID" - id: discover - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) with: operation: discover job-results: ${{ toJSON(needs) }} @@ -594,7 +594,7 @@ jobs: collect-native-coverage: name: Verify coverage after the complete shard merge needs: sharded-host - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) permissions: contents: read pull-requests: write diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index d4a1d5d6..f438dda9 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -659,7 +659,7 @@ jobs: core.setOutput('producers',producers); core.setOutput('lint-enabled',lint); - id: report-plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) with: operation: plan producers: ${{ steps.report-producers.outputs.producers }} diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 15e7e80f..afc6c886 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -85,7 +85,7 @@ runs: with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} - id: report-plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) with: operation: plan report-plan: ${{ inputs.report-plan }} @@ -129,7 +129,7 @@ runs: - id: reports name: Record lint results if: ${{ !cancelled() && steps.report-plan.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} report-plan: ${{ steps.report-plan.outputs.report-plan }} diff --git a/actions/test/action.yml b/actions/test/action.yml index e3a6f669..ade489e4 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -195,7 +195,7 @@ runs: core.setOutput('failed', shards.validate()); - id: report-plan if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) with: operation: plan report-plan: ${{ inputs.report-plan }} @@ -275,7 +275,7 @@ runs: - id: reports name: Record test results if: ${{ !cancelled() && steps.report-plan.outcome == 'success' && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a49432bffa7e7c2fda3a608e242f5e058926c166 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} report-plan: ${{ steps.report-plan.outputs.report-plan }} From 35b4839d14f5abf7ce8426d8a5d718170a971ee6 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Fri, 27 Nov 2026 10:21:03 +0100 Subject: [PATCH 09/48] fix(ci): use common with local reporting workflows --- .github/workflows/__shared-ci.yml | 4 ++-- .github/workflows/__test-release.yml | 2 +- .../workflows/__test-workflow-continuous-integration.yml | 6 +++--- .github/workflows/continuous-integration.yml | 2 +- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 58774d15..4586a99e 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) permissions: actions: read contents: read @@ -116,7 +116,7 @@ jobs: reports: needs: [lint, test-release] if: always() - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) permissions: contents: read pull-requests: write diff --git a/.github/workflows/__test-release.yml b/.github/workflows/__test-release.yml index 39a45823..7c1c3ae7 100644 --- a/.github/workflows/__test-release.yml +++ b/.github/workflows/__test-release.yml @@ -285,7 +285,7 @@ jobs: core.setOutput('matrix',matrix); core.setOutput('producers',matrix.map(item=>({key:item.key,type:'test',directory:'actions/'+item.action,coverage:[]}))); - id: plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) with: operation: plan producers: ${{ steps.actions.outputs.producers }} diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index 0146803d..fa8697bc 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -58,7 +58,7 @@ jobs: permissions: {} steps: - id: discover - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) with: operation: discover job-results: ${{ toJSON(needs) }} @@ -435,7 +435,7 @@ jobs: PACKAGE_ARTIFACT_ID: ${{ needs.act-without-container-and-github-reports.outputs.package-tarball-artifact-id }} run: test -z "$PACKAGE_ARTIFACT_ID" - id: discover - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) with: operation: discover job-results: ${{ toJSON(needs) }} @@ -594,7 +594,7 @@ jobs: collect-native-coverage: name: Verify coverage after the complete shard merge needs: sharded-host - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) permissions: contents: read pull-requests: write diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index f438dda9..25adaa3d 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -659,7 +659,7 @@ jobs: core.setOutput('producers',producers); core.setOutput('lint-enabled',lint); - id: report-plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) with: operation: plan producers: ${{ steps.report-producers.outputs.producers }} diff --git a/actions/lint/action.yml b/actions/lint/action.yml index afc6c886..1485285a 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -85,7 +85,7 @@ runs: with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} - id: report-plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) with: operation: plan report-plan: ${{ inputs.report-plan }} @@ -129,7 +129,7 @@ runs: - id: reports name: Record lint results if: ${{ !cancelled() && steps.report-plan.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} report-plan: ${{ steps.report-plan.outputs.report-plan }} diff --git a/actions/test/action.yml b/actions/test/action.yml index ade489e4..0051bdad 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -195,7 +195,7 @@ runs: core.setOutput('failed', shards.validate()); - id: report-plan if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) with: operation: plan report-plan: ${{ inputs.report-plan }} @@ -275,7 +275,7 @@ runs: - id: reports name: Record test results if: ${{ !cancelled() && steps.report-plan.outcome == 'success' && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f349bccfa78e0c9676af97f002297b857ede2f8a # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} report-plan: ${{ steps.report-plan.outputs.report-plan }} From 76e3c9f80009fc730bdb1c58a8482156af6336d2 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 01:42:50 +0100 Subject: [PATCH 10/48] feat(reports)!: validate native Node.js results in a single reporting boundary --- .github/workflows/__shared-ci.yml | 33 ++- .github/workflows/__test-action-lint.yml | 51 +--- .github/workflows/__test-action-test.yml | 102 ++------ .github/workflows/__test-release.yml | 2 +- ...__test-workflow-continuous-integration.yml | 85 ++----- .github/workflows/continuous-integration.md | 165 ++----------- .github/workflows/continuous-integration.yml | 231 +++++------------- actions/lint/README.md | 81 +++--- actions/lint/action.yml | 91 +++---- actions/reporting/ReportDefinition.cjs | 88 +++++++ actions/test/README.md | 137 +++++------ actions/test/action.yml | 123 +++++----- .../fixtures/vitest.config.mjs | 12 +- tests/continuous-integration/package.json | 5 +- .../continuous-integration/reporting.test.js | 102 ++++++++ tests/continuous-integration/workflow.test.js | 79 +++--- tests/npm/package.json | 5 +- 17 files changed, 599 insertions(+), 793 deletions(-) create mode 100644 actions/reporting/ReportDefinition.cjs create mode 100644 tests/continuous-integration/reporting.test.js diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 4586a99e..caf1e192 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@ea5900049a1704d6d2b479cc6cce37e799f532a3 # PR #683 (unreleased) permissions: actions: read contents: read @@ -35,6 +35,7 @@ jobs: uses: $/.github/workflows/__test-action-dependencies-cache.yml permissions: contents: read + actions: read test-action-get-package-manager: name: Test action "get-package-manager" @@ -42,6 +43,7 @@ jobs: uses: $/.github/workflows/__test-action-get-package-manager.yml permissions: contents: read + actions: read test-action-has-installed-dependencies: name: Test action "has-installed-dependencies" @@ -49,6 +51,7 @@ jobs: uses: $/.github/workflows/__test-action-has-installed-dependencies.yml permissions: contents: read + actions: read test-action-package-create: name: Test action "package/create" @@ -56,6 +59,7 @@ jobs: uses: $/.github/workflows/__test-action-package-create.yml permissions: contents: read + actions: read test-action-package-test: name: Test action "package/test" @@ -63,6 +67,7 @@ jobs: uses: $/.github/workflows/__test-action-package-test.yml permissions: contents: read + actions: read test-action-package-discover: name: Test action "package/discover" @@ -70,6 +75,7 @@ jobs: uses: $/.github/workflows/__test-action-package-discover.yml permissions: contents: read + actions: read test-action-setup-node: name: Test action "setup-node" @@ -77,6 +83,7 @@ jobs: uses: $/.github/workflows/__test-action-setup-node.yml permissions: contents: read + actions: read test-action-package-publish: name: Test action "package/publish" @@ -99,28 +106,44 @@ jobs: id-token: write issues: read security-events: write - code-quality: write test-action-test: needs: lint uses: $/.github/workflows/__test-action-test.yml permissions: contents: read + actions: read test-action-lint: needs: lint uses: $/.github/workflows/__test-action-lint.yml permissions: contents: read + actions: read reports: - needs: [lint, test-release] - if: always() - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) + needs: + - lint + - test-release + - test-action-dependencies-cache + - test-action-get-package-manager + - test-action-has-installed-dependencies + - test-action-package-create + - test-action-package-test + - test-action-package-discover + - test-action-setup-node + - test-action-package-publish + - test-workflow-continuous-integration + - test-action-test + - test-action-lint + if: ${{ !cancelled() }} + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@ea5900049a1704d6d2b479cc6cce37e799f532a3 # PR #683 (unreleased) permissions: contents: read pull-requests: write code-quality: write id-token: write + actions: read + security-events: write with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index 52f94efe..689de014 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -7,39 +7,11 @@ permissions: {} jobs: lint-report: - name: Lint - ${{ matrix.scenario }} + name: Validate native lint outputs runs-on: ubuntu-latest permissions: contents: read - strategy: - fail-fast: false - matrix: - include: - - scenario: explicit report - failure: false - reports: true - report-file: eslint-report.json - expected: success - - scenario: failed command with a clean report - failure: true - reports: true - report-file: eslint-report.json - expected: failure - - scenario: missing explicit report - failure: false - reports: true - report-file: missing.json - expected: failure - - scenario: unmatched glob - failure: false - reports: true - report-file: "missing-*.json" - expected: failure - - scenario: no automatic reports - failure: false - reports: false - report-file: "" - expected: failure + actions: read steps: - name: Arrange - Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -60,7 +32,7 @@ jobs: fs.writeFileSync('lint-fixture/lint.cjs', ` require('node:fs').writeFileSync('command-ran.txt', 'lint ran'); if (process.env.WRITE_REPORT === 'true') { - require('node:fs').writeFileSync('eslint-report.json', JSON.stringify([ + require('node:fs').writeFileSync(process.env.CI_REPORTS_DIR + '/eslint-report.json', JSON.stringify([ { filePath: 'src/index.js', messages: [], errorCount: 0, warningCount: 0 }, ])); } @@ -69,24 +41,19 @@ jobs: await exec.exec('npm', ['install', '--package-lock-only', '--ignore-scripts', '--no-audit', '--no-fund'], { cwd: 'lint-fixture' }); - name: Act - Run lint with report configuration id: lint - continue-on-error: true uses: $/actions/lint env: - EXPECT_FAILURE: ${{ matrix.failure }} - WRITE_REPORT: ${{ matrix.reports }} + WRITE_REPORT: "true" + EXPECT_FAILURE: "false" with: working-directory: lint-fixture - report-file: ${{ matrix.report-file }} + lint-results: eslint-report.json - name: Assert - Verify the action outcome uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: - ACTUAL: ${{ steps.lint.outcome }} - EXPECTED: ${{ matrix.expected }} - EXPECT_REPORTS: ${{ matrix.reports }} + ARTIFACT_ID: ${{ steps.lint.outputs.report-artifact-id }} with: script: | const assert = require('node:assert/strict'); - const fs = require('node:fs'); - assert.equal(fs.readFileSync('lint-fixture/command-ran.txt', 'utf8'), 'lint ran'); - assert.equal(fs.existsSync('lint-fixture/eslint-report.json'), process.env.EXPECT_REPORTS === 'true'); - assert.equal(process.env.ACTUAL, process.env.EXPECTED); + assert.match(process.env.ARTIFACT_ID, /^[1-9][0-9]*$/); + assert.equal(require('node:fs').readFileSync('lint-fixture/command-ran.txt', 'utf8'), 'lint ran'); diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 30b9f02b..4d5f76dd 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -10,59 +10,8 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - strategy: - fail-fast: false - matrix: - include: - - scenario: explicit reports - failure: false - reports: true - report-file: ".reports/junit.xml,.reports/lcov.info" - expected: success - artifact: true - - scenario: coverage disabled retains test diagnostics - failure: false - reports: true - report-file: .reports/junit.xml - coverage-disabled: true - expected: success - artifact: true - artifact-files: '["junit.xml"]' - - scenario: failed test with reports - failure: true - reports: true - report-file: ".reports/junit.xml,.reports/lcov.info" - expected: failure - artifact: true - - scenario: missing explicit report - failure: false - reports: true - report-file: .reports/missing.xml - expected: failure - artifact: true - artifact-files: "[]" - - scenario: unmatched glob - failure: false - reports: true - report-file: ".reports/missing-*.xml" - expected: failure - artifact: true - artifact-files: "[]" - - scenario: partially missing reports - failure: false - reports: true - report-file: ".reports/junit.xml,.reports/missing.xml" - expected: failure - artifact: true - artifact-files: '["junit.xml"]' - - scenario: no automatic reports - failure: false - reports: false - report-file: "" - expected: failure - artifact: true - artifact-files: "[]" - name: Test - ${{ matrix.scenario }} + actions: read + name: Validate native test outputs steps: - name: Arrange - Checkout uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 @@ -79,8 +28,7 @@ jobs: fs.writeFileSync('report-fixture/package.json', JSON.stringify({ name: 'report-fixture', version: '1.0.0', private: true, scripts: { - 'pretest:ci': 'node -e "require(\'node:fs\').mkdirSync(\'.reports\', {recursive:true})"', - 'test:ci': 'node --experimental-test-coverage --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=.reports/junit.xml --test-reporter=lcov --test-reporter-destination=.reports/lcov.info test.cjs', + 'test:ci': 'node --experimental-test-coverage --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination="$CI_REPORTS_DIR/junit.xml" --test-reporter=lcov --test-reporter-destination="$CI_REPORTS_DIR/lcov.info" test.cjs', 'test:no-reports': 'node --test test.cjs', }, })); @@ -89,15 +37,14 @@ jobs: await exec.exec('npm', ['install', '--package-lock-only', '--ignore-scripts', '--no-audit', '--no-fund'], { cwd: 'report-fixture' }); - name: Act - Run tests with comments disabled and no write token id: test - continue-on-error: true uses: $/actions/test env: - EXPECT_FAILURE: ${{ matrix.failure }} + EXPECT_FAILURE: "false" with: working-directory: report-fixture - command: ${{ matrix.reports && 'test:ci' || 'test:no-reports' }} - report-file: ${{ matrix.report-file }} - coverage: "false" + command: test:ci + coverage: "true" + test-coverage: lcov.info - name: Assert - Retrieve reports even after a failed test if: steps.test.outputs.report-artifact-id != '' uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 @@ -107,35 +54,14 @@ jobs: merge-multiple: true - name: Assert - Verify outcome and native report content uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - env: - ACTUAL: ${{ steps.test.outcome }} - EXPECTED: ${{ matrix.expected }} - EXPECT_ARTIFACT: ${{ matrix.artifact }} - EXPECT_REPORTS: ${{ matrix.reports }} - EXPECT_FAILURE: ${{ matrix.failure }} - ARTIFACT_ID: ${{ steps.test.outputs.report-artifact-id }} - ARTIFACT_FILES: ${{ matrix.artifact-files || '["junit.xml","lcov.info"]' }} with: script: | const assert = require('node:assert/strict'); const fs = require('node:fs'); - assert.equal(process.env.ACTUAL, process.env.EXPECTED); - for (const file of ['junit.xml', 'lcov.info']) { - assert.equal(fs.existsSync(`report-fixture/.reports/${file}`), process.env.EXPECT_REPORTS === 'true'); - } - if (process.env.EXPECT_ARTIFACT !== 'true') { - assert.equal(process.env.ARTIFACT_ID, ''); - return; - } - assert.match(process.env.ARTIFACT_ID, /^\d+$/); - const globber = await glob.create('downloaded-reports/**/*', { matchDirectories: false }); - const files = (await globber.glob()).filter(file => !file.endsWith('/ci-report.json')); - const expectedFiles = JSON.parse(process.env.ARTIFACT_FILES); - assert.deepEqual(files.map(file => require('node:path').basename(file)).sort(), expectedFiles.sort()); - if (expectedFiles.includes('junit.xml')) { - const junit = fs.readFileSync(files.find(file => file.endsWith('junit.xml')), 'utf8'); - assert.equal(junit.includes(' file.endsWith('lcov.info')), 'utf8'), /SF:/); - } + const result = JSON.parse(fs.readFileSync('downloaded-reports/result.json', 'utf8')); + assert.equal(result.outcome, 'success'); + assert.deepEqual(result.errors, []); + assert.equal(result.assets.filter(item => item.selector.kind === 'test').length, 1); + assert.equal(result.assets.filter(item => item.selector.kind === 'coverage').length, 1); + assert.match(fs.readFileSync('downloaded-reports/reports/junit.xml', 'utf8'), /({key:item.key,type:'test',directory:'actions/'+item.action,coverage:[]}))); - id: plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@ea5900049a1704d6d2b479cc6cce37e799f532a3 # PR #683 (unreleased) with: operation: plan producers: ${{ steps.actions.outputs.producers }} diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index fa8697bc..c98b0d6f 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -15,6 +15,7 @@ jobs: packages: read pull-requests: write security-events: write + actions: read with: working-directory: tests/continuous-integration build: "" @@ -22,7 +23,7 @@ jobs: code-ql: "" dependency-review: false test: |- - {"command":"test:vitest","shards":2,"coverage":true,"coverage-reports":[{"file":"coverage/sharding/cobertura-coverage.xml","language":"JavaScript","label":"sharded-host"}],"report-file":"coverage/sharding/junit.xml,coverage/sharding/lcov.info"} + {"command":"test:vitest","shards":2,"coverage":true} sharded-container: name: Validate sharded Vitest in the existing fixture image @@ -34,6 +35,7 @@ jobs: packages: read pull-requests: write security-events: write + actions: read with: working-directory: /usr/src/app/workflow-tests container: | @@ -49,46 +51,30 @@ jobs: code-ql: "" dependency-review: false test: |- - {"command":"test:vitest","shards":2,"report-file":"coverage/sharding/junit.xml,coverage/sharding/lcov.info","coverage":false} + {"command":"test:vitest","shards":2,"coverage":false,"source-sha":"${{ github.event.pull_request.head.sha || github.sha }}","source-prefix":"tests/continuous-integration"} assert-sharded-reports: name: Verify complete merged reports from host and container needs: [sharded-host, sharded-container] runs-on: ubuntu-latest - permissions: {} + permissions: { actions: read } steps: - - id: discover - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) - with: - operation: discover - job-results: ${{ toJSON(needs) }} - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: - pattern: ${{ steps.discover.outputs.pattern }} + pattern: ci-report-v2-result-* path: merged-reports - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const assert = require('node:assert/strict'); const fs = require('node:fs'); - const path = require('node:path'); - const reports = fs.readdirSync('merged-reports'); - assert.equal(reports.length, 2, 'Publish one final report artifact per caller'); - for (const directory of reports) { - const files = await (await glob.create(path.join('merged-reports', directory, '**/*'), { matchDirectories: false })).glob(); - assert.equal(files.filter(file=>file.endsWith('ci-report.json')).length,1); - const junit = fs.readFileSync(files.find(file => file.endsWith('junit.xml')), 'utf8'); + const files = await (await glob.create('merged-reports/**/junit.xml', {matchDirectories:false})).glob(); + const merged = files.filter(file => fs.readFileSync(file, 'utf8').includes('enabled answer') && fs.readFileSync(file, 'utf8').includes('disabled answer')); + assert.equal(merged.length, 2, 'Retain one complete merged JUnit from the host and the container'); + for (const file of merged) { + const junit = fs.readFileSync(file, 'utf8'); assert.equal((junit.match(/ file.endsWith('lcov.info')), 'utf8'); - assert.match(lcov, /source\.js/); - const counts = Object.fromEntries([...lcov.matchAll(/^(LF|LH|BRF|BRH|FNF|FNH):(\d+)$/gm)].map(([, key, value]) => [key, Number(value)])); - assert.ok(counts.LF > 0 && counts.BRF > 0 && counts.FNF > 0); - assert.equal(counts.LH, counts.LF); - assert.equal(counts.BRH, counts.BRF); - assert.equal(counts.FNH, counts.FNF); } workspace-packages: @@ -100,6 +86,7 @@ jobs: packages: read pull-requests: write security-events: write + actions: read with: working-directory: tests/workspace-packages build: "" @@ -138,6 +125,7 @@ jobs: packages: read pull-requests: write security-events: write + actions: read with: working-directory: tests/continuous-integration build: "" @@ -155,6 +143,7 @@ jobs: packages: read pull-requests: write security-events: write + actions: read with: checks: false container: invalid.example.invalid/must-not-be-pulled:latest @@ -183,6 +172,7 @@ jobs: packages: read pull-requests: write security-events: write + actions: read with: working-directory: tests/source-package build: "" @@ -293,6 +283,7 @@ jobs: packages: read pull-requests: write security-events: write + actions: read with: working-directory: tests/npm package: | @@ -307,6 +298,7 @@ jobs: "artifact": "dist" } lint: "" + test: "{}" assert-without-container: name: Assert - Ensure build artifact has been uploaded (without container) @@ -412,6 +404,7 @@ jobs: packages: read pull-requests: write security-events: write + actions: read with: working-directory: tests/npm ignore-scripts: false @@ -434,26 +427,6 @@ jobs: - env: PACKAGE_ARTIFACT_ID: ${{ needs.act-without-container-and-github-reports.outputs.package-tarball-artifact-id }} run: test -z "$PACKAGE_ARTIFACT_ID" - - id: discover - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) - with: - operation: discover - job-results: ${{ toJSON(needs) }} - - name: Retrieve native test reports from the workflow plan - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 - with: - pattern: ${{ steps.discover.outputs.pattern }} - path: native-reports - - name: Verify test diagnostics are retained without coverage - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 - with: - script: | - const assert = require('node:assert/strict'); - const files = await (await glob.create('native-reports/**/junit.xml')).glob(); - assert.equal(files.length, 1); - assert.match(require('node:fs').readFileSync(files[0], 'utf8'), / - permissions: - contents: read - pull-requests: write - code-quality: write - id-token: write - with: - job-results: ${{ toJSON(needs) }} - coverage: github -``` - -Select `coverage: none` (default) for summaries, `github` for native GitHub -coverage, or `codecov`. Both publishers consume validated Cobertura. Native -GitHub coverage requires repository enablement and a default-branch baseline. -The reporting workflow owns one CI comment and the `CI reports complete` check. -Forks retain diagnostics without write operations. Partial reruns require -rerunning all producers. Producer workflows test the PR head or push revision. - -Standalone action jobs forward their `report-plan` output. Custom outer matrices -must forward a complete plan derived from their configuration; GitHub's last -successful matrix output does not describe all executions. See the common -[recording action](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/record-ci-reports) -for the advanced contract. No collector-side coverage inventory is needed. +Prebuilt containers require a checkout for report source verification and +test.source-sha plus test.source-prefix identifying the tested source. ### Permissions +- **`actions`**: `read` - **`contents`**: `read` - **`packages`**: `read` - **`security-events`**: `write` @@ -96,8 +65,9 @@ on: permissions: {} jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@11636b817040a2a7d61b389c28fa1b401c37a2fa # feat/native-github-coverage + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@35b4839d14f5abf7ce8426d8a5d718170a971ee6 # feat/native-github-coverage permissions: + actions: read contents: read packages: read security-events: write @@ -185,19 +155,7 @@ jobs: # Default: `true` checks: true - # Whether to enable linting. - # Set to `null` or empty to disable. - # Accepts a JSON object for lint options. See [lint action](../../actions/lint/README.md). - # It should generate lint reports in standard formats. - # - # Example: - # - # ```json:package.json - # { - # "lint:ci": "eslint . --output-file eslint-report.json --format json" - # } - # ``` - # + # Lint options: command (default lint:ci) and lint-results (default lint.sarif). Commands write native results under CI_REPORTS_DIR. Empty disables lint. # Default: `true` lint: "true" @@ -227,42 +185,7 @@ jobs: # Default: `true` dependency-review: true - # Whether to enable testing. - # Set to `null` or empty to disable. - # Accepts a JSON object for test options. See [test action](../../actions/test/README.md). - # `coverage` is a boolean, true by default. The project must generate native test results - # and Cobertura at coverage/cobertura-coverage.xml, or describe other component files - # with `coverage-reports` (file, language and optional label). - # Builds and tests use the PR head. Run merge-result validation separately if required. - # Prebuilt containers need coverage-source-sha and coverage-source-prefix for coverage. - # Set coverage to false for diagnostics without required Cobertura. Provider selection - # belongs in the common ci-reports workflow, which reads this workflow's report-plan. - # Shards publish only the final merged reports; never upload individual shards. - # Optional `arguments` is a JSON array passed to the package script without shell expansion. - # Set `shards` to an integer from 2 to 256 to enable Vitest blob sharding (default: 1). - # Only tests are replicated; shards run with fail-fast disabled and concurrency limited to their count. - # A single merge job validates every payload and publishes final reports, even after test failures. - # `merge-command` defaults to `command`; use a separate package script when reporter settings differ. - # Sharding owns --shard, --merge-reports and --outputFile.blob; do not put these in package scripts or arguments. - # Use reporter-specific output paths such as --outputFile.junit=junit.xml; the scalar --outputFile form conflicts with blob output. - # Keep the same project source, dependencies, Vitest config and absolute project path across jobs. - # Rerun the entire workflow after failure; previous-attempt shard artifacts are never reused. - # - # CI_TEST_SHARD is index/total during shards and empty during merging. If coverage thresholds are configured, - # defer them to merging with `thresholds: process.env.CI_TEST_SHARD ? undefined : yourThresholds`. - # Keep coverage enabled in both commands, and set coverage.reportOnFailure to retain failed-test coverage. - # Final reporters and report-file must describe the merged JUnit/Cobertura outputs. - # Blob payloads include coverage; file-based attachments are not transferred by this workflow. - # Example: `{"command":"test:ci","shards":2,"report-file":"junit.xml"}`. - # - # Example: - # - # ```json:package.json - # { - # "test:ci": "vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text" - # } - # ``` - # + # Test options: command (default test:ci), arguments, coverage (boolean, default true), test-results (default junit.xml), test-coverage (default coverage/lcov.info), shards and merge-command. Paths are relative to CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. # Default: `true` test: "true" @@ -317,9 +240,6 @@ jobs: # When specified, steps will execute inside this container instead of checking out code. # The container should have the project code and dependencies pre-installed. container: "" - - # Expected producer metadata for a custom outer orchestration. Leave empty for automatic planning. - report-plan: "" ```` @@ -367,14 +287,7 @@ jobs: | | | | | | | | Example: `{"tests":"my-cli --help"}` | | | | | **`checks`** | Optional flag to enable check steps. | **false** | **boolean** | `true` | -| **`lint`** | Whether to enable linting. | **false** | **string** | `true` | -| | Set to `null` or empty to disable. | | | | -| | Accepts a JSON object for lint options. See [lint action](../../actions/lint/README.md). | | | | -| | It should generate lint reports in standard formats. | | | | -| | | | | | -| | Example: | | | | -| | | | | | -| |
{
 "lint:ci": "eslint . --output-file eslint-report.json --format json"
}
| | | | +| **`lint`** | Lint options: command (default lint:ci) and lint-results (default lint.sarif). Commands write native results under CI_REPORTS_DIR. Empty disables lint. | **false** | **string** | `true` | | **`code-ql`** | CodeQL analysis language, or a JSON object with `languages` and optional `config-file`. | **false** | **string** | `typescript` | | | Set to an empty string to disable CodeQL. | | | | | | In JSON form, `languages` must be a nonempty string and `config-file` must be a string. | | | | @@ -388,37 +301,7 @@ jobs: | **`dependency-review`** | Enable dependency review scan. | **false** | **boolean** | `true` | | | Works with public repositories and private repositories with a GitHub Advanced Security license. | | | | | | See . | | | | -| **`test`** | Whether to enable testing. | **false** | **string** | `true` | -| | Set to `null` or empty to disable. | | | | -| | Accepts a JSON object for test options. See [test action](../../actions/test/README.md). | | | | -| | `coverage` is a boolean, true by default. The project must generate native test results | | | | -| | and Cobertura at coverage/cobertura-coverage.xml, or describe other component files | | | | -| | with `coverage-reports` (file, language and optional label). | | | | -| | Builds and tests use the PR head. Run merge-result validation separately if required. | | | | -| | Prebuilt containers need coverage-source-sha and coverage-source-prefix for coverage. | | | | -| | Set coverage to false for diagnostics without required Cobertura. Provider selection | | | | -| | belongs in the common ci-reports workflow, which reads this workflow's report-plan. | | | | -| | Shards publish only the final merged reports; never upload individual shards. | | | | -| | Optional `arguments` is a JSON array passed to the package script without shell expansion. | | | | -| | Set `shards` to an integer from 2 to 256 to enable Vitest blob sharding (default: 1). | | | | -| | Only tests are replicated; shards run with fail-fast disabled and concurrency limited to their count. | | | | -| | A single merge job validates every payload and publishes final reports, even after test failures. | | | | -| | `merge-command` defaults to `command`; use a separate package script when reporter settings differ. | | | | -| | Sharding owns --shard, --merge-reports and --outputFile.blob; do not put these in package scripts or arguments. | | | | -| | Use reporter-specific output paths such as --outputFile.junit=junit.xml; the scalar --outputFile form conflicts with blob output. | | | | -| | Keep the same project source, dependencies, Vitest config and absolute project path across jobs. | | | | -| | Rerun the entire workflow after failure; previous-attempt shard artifacts are never reused. | | | | -| | | | | | -| | CI_TEST_SHARD is index/total during shards and empty during merging. If coverage thresholds are configured, | | | | -| | defer them to merging with `thresholds: process.env.CI_TEST_SHARD ? undefined : yourThresholds`. | | | | -| | Keep coverage enabled in both commands, and set coverage.reportOnFailure to retain failed-test coverage. | | | | -| | Final reporters and report-file must describe the merged JUnit/Cobertura outputs. | | | | -| | Blob payloads include coverage; file-based attachments are not transferred by this workflow. | | | | -| | Example: `{"command":"test:ci","shards":2,"report-file":"junit.xml"}`. | | | | -| | | | | | -| | Example: | | | | -| | | | | | -| |
{
 "test:ci": "vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text"
}
| | | | +| **`test`** | Test options: command (default test:ci), arguments, coverage (boolean, default true), test-results (default junit.xml), test-coverage (default coverage/lcov.info), shards and merge-command. Paths are relative to CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. | **false** | **string** | `true` | | **`working-directory`** | Working directory where dependencies and application commands run. | **false** | **string** | `.` | | | Relative paths resolve against the workspace of each application job. | | | | | | Directory existence and non-container workspace boundaries are validated in those jobs. | | | | @@ -445,7 +328,6 @@ jobs: | | | | | | | | When specified, steps will execute inside this container instead of checking out code. | | | | | | The container should have the project code and dependencies pre-installed. | | | | -| **`report-plan`** | Expected producer metadata for a custom outer orchestration. Leave empty for automatic planning. | **false** | **string** | - | @@ -539,7 +421,6 @@ When specified, steps will execute inside this container instead of checking out | **`package-tarball-artifact-id`** | Artifact ID of the package validated by the packaging job. Available when package is enabled and validation succeeds. | | **`package-tarball-artifacts`** | JSON object mapping package directories to validated tarball artifact IDs when packaging is enabled. Require successful CI before publication. | | **`build-artifact-id`** | ID of the build artifact) uploaded during the build step. | -| **`report-plan`** | Complete expected report metadata, consumed automatically by ci-reports. | diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 25adaa3d..e330aa57 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -1,56 +1,24 @@ -# Workflow to performs continuous integration steps against a Node.js project: -# -# - CodeQL analysis -# - Linting -# - Build -# - Test - -# ### Reports and coverage -# -# Lint and test jobs retain native diagnostics in one artifact per execution. -# They post no PR comments and need no publication permissions. Configure native -# test reports (JUnit or TAP) and lint reports (for example Checkstyle or SARIF). -# Missing required reports fail even when the tool command exits successfully. -# Available reports are retained after failures. -# -# Tests require Cobertura by default. The highest configured runtime contributes -# coverage; every runtime retains its test results. Set `test: '{"coverage":false}'` -# for tests that deliberately produce no Cobertura. The command still controls -# instrumentation. Custom `test.coverage-reports` describes Cobertura file paths, -# Linguist languages and stable component labels; it belongs beside the producer. -# Separate components stay separate. Merge shards in the framework first. -# -# Call the common workflow once after producer workflows. It reads their complete -# report plans from `needs`, regardless of calling job names: -# -# ```yaml -# reports: -# needs: [checks] -# if: ${{ always() }} -# uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@ -# permissions: -# contents: read -# pull-requests: write -# code-quality: write -# id-token: write -# with: -# job-results: ${{ toJSON(needs) }} -# coverage: github -# ``` -# -# Select `coverage: none` (default) for summaries, `github` for native GitHub -# coverage, or `codecov`. Both publishers consume validated Cobertura. Native -# GitHub coverage requires repository enablement and a default-branch baseline. -# The reporting workflow owns one CI comment and the `CI reports complete` check. -# Forks retain diagnostics without write operations. Partial reruns require -# rerunning all producers. Producer workflows test the PR head or push revision. -# -# Standalone action jobs forward their `report-plan` output. Custom outer matrices -# must forward a complete plan derived from their configuration; GitHub's last -# successful matrix output does not describe all executions. See the common -# [recording action](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/record-ci-reports) -# for the advanced contract. No collector-side coverage inventory is needed. -# +# Workflow to run Node.js checks, builds and package validation. + +# One CI reporting boundary + +# Commands write their declared native outputs into CI_REPORTS_DIR. +# Test results default to junit.xml, coverage to coverage/lcov.info and lint to +# lint.sarif. Configure test-results, test-coverage or lint-results beside the +# corresponding command when its native output differs. Merge shards natively. + +# Call common ci-reports.yml once after all producer jobs with +# job-results: toJSON(needs). No report plans or artifact IDs need forwarding. +# Producer calls require actions: read and contents: read. The reporting caller +# grants actions: read, contents: read, pull-requests: write, code-quality: write, +# id-token: write and security-events: write; its internal jobs narrow these. +# Lint and tests default to annotations. Coverage defaults to GitHub when +# available, then a PR comment or summary. Select destinations once using +# lint-reporters, test-results-reporters and test-coverage-reporters. + +# Prebuilt containers require a checkout for report source verification and +# test.source-sha plus test.source-prefix identifying the tested source. + name: Node.js Continuous Integration on: @@ -126,19 +94,8 @@ on: required: false default: true lint: - description: | - Whether to enable linting. - Set to `null` or empty to disable. - Accepts a JSON object for lint options. See [lint action](../../actions/lint/README.md). - It should generate lint reports in standard formats. - - Example: - - ```json:package.json - { - "lint:ci": "eslint . --output-file eslint-report.json --format json" - } - ``` + description: |- + Lint options: command (default lint:ci) and lint-results (default lint.sarif). Commands write native results under CI_REPORTS_DIR. Empty disables lint. type: string required: false default: "true" @@ -171,42 +128,8 @@ on: required: false default: true test: - description: | - Whether to enable testing. - Set to `null` or empty to disable. - Accepts a JSON object for test options. See [test action](../../actions/test/README.md). - `coverage` is a boolean, true by default. The project must generate native test results - and Cobertura at coverage/cobertura-coverage.xml, or describe other component files - with `coverage-reports` (file, language and optional label). - Builds and tests use the PR head. Run merge-result validation separately if required. - Prebuilt containers need coverage-source-sha and coverage-source-prefix for coverage. - Set coverage to false for diagnostics without required Cobertura. Provider selection - belongs in the common ci-reports workflow, which reads this workflow's report-plan. - Shards publish only the final merged reports; never upload individual shards. - Optional `arguments` is a JSON array passed to the package script without shell expansion. - Set `shards` to an integer from 2 to 256 to enable Vitest blob sharding (default: 1). - Only tests are replicated; shards run with fail-fast disabled and concurrency limited to their count. - A single merge job validates every payload and publishes final reports, even after test failures. - `merge-command` defaults to `command`; use a separate package script when reporter settings differ. - Sharding owns --shard, --merge-reports and --outputFile.blob; do not put these in package scripts or arguments. - Use reporter-specific output paths such as --outputFile.junit=junit.xml; the scalar --outputFile form conflicts with blob output. - Keep the same project source, dependencies, Vitest config and absolute project path across jobs. - Rerun the entire workflow after failure; previous-attempt shard artifacts are never reused. - - CI_TEST_SHARD is index/total during shards and empty during merging. If coverage thresholds are configured, - defer them to merging with `thresholds: process.env.CI_TEST_SHARD ? undefined : yourThresholds`. - Keep coverage enabled in both commands, and set coverage.reportOnFailure to retain failed-test coverage. - Final reporters and report-file must describe the merged JUnit/Cobertura outputs. - Blob payloads include coverage; file-based attachments are not transferred by this workflow. - Example: `{"command":"test:ci","shards":2,"report-file":"junit.xml"}`. - - Example: - - ```json:package.json - { - "test:ci": "vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text" - } - ``` + description: |- + Test options: command (default test:ci), arguments, coverage (boolean, default true), test-results (default junit.xml), test-coverage (default coverage/lcov.info), shards and merge-command. Paths are relative to CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. type: string required: false default: "true" @@ -266,10 +189,6 @@ on: type: string required: false default: "" - report-plan: - description: Expected producer metadata for a custom outer orchestration. Leave empty for automatic planning. - type: string - default: "" secrets: build-secrets: description: | @@ -301,9 +220,6 @@ on: build-artifact-id: description: "ID of the build artifact) uploaded during the build step." value: ${{ jobs.build.outputs.artifact-id }} - report-plan: - description: Complete expected report metadata, consumed automatically by ci-reports. - value: ${{ jobs.prepare.outputs.report-plan }} permissions: {} @@ -332,18 +248,17 @@ jobs: test-enabled: ${{ steps.test-options.outputs.enabled }} test-command: ${{ steps.test-options.outputs.command }} test-coverage: ${{ steps.test-options.outputs.coverage }} - test-coverage-reports: ${{ steps.test-options.outputs.coverage-reports }} - test-coverage-source-sha: ${{ steps.test-options.outputs.coverage-source-sha }} - test-coverage-source-prefix: ${{ steps.test-options.outputs.coverage-source-prefix }} - test-report-file: ${{ steps.test-options.outputs.report-file }} test-arguments: ${{ steps.test-options.outputs.arguments }} test-shards: ${{ steps.test-options.outputs.shards }} test-matrix: ${{ steps.test-options.outputs.matrix }} test-group: ${{ steps.test-options.outputs.group }} test-merge-command: ${{ steps.test-options.outputs.merge-command }} - report-plan: ${{ steps.report-plan.outputs.report-plan }} - report-selections: ${{ steps.report-plan.outputs.selections }} - lint-enabled: ${{ steps.report-producers.outputs.lint-enabled }} + lint-enabled: ${{ steps.lint-options.outputs.lint-enabled }} + test-test-results: ${{ steps.test-options.outputs.test-results }} + test-test-coverage: ${{ steps.test-options.outputs.test-coverage }} + test-source-sha: ${{ steps.test-options.outputs.source-sha }} + test-source-prefix: ${{ steps.test-options.outputs.source-prefix }} + test-coverage-paths: ${{ steps.test-options.outputs.test-coverage }} steps: - id: test-options uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -368,19 +283,19 @@ jobs: } } - const allowed = ['coverage','coverage-reports','coverage-source-sha','coverage-source-prefix','command','merge-command','report-file','arguments','shards']; + for (const field of ['test-results','test-coverage']) { if (testOptions[field] !== undefined && (typeof testOptions[field] !== 'string' || !testOptions[field].trim())) throw new Error('test.' + field + ' must be nonempty native report paths.'); } + const allowed = ['coverage','test-coverage','source-sha','source-prefix','command','merge-command','test-results','arguments','shards']; const unknown = Object.keys(testOptions).filter(key => !allowed.includes(key)); if (unknown.length) throw new Error('Unknown test options: ' + unknown.join(', ') + '. Configure publication in ci-reports.'); if (testOptions.coverage === undefined) { testOptions.coverage = true; } if (typeof testOptions.coverage !== 'boolean') throw new Error('test.coverage must be a boolean.'); - if (testOptions['coverage-reports'] !== undefined && !Array.isArray(testOptions['coverage-reports'])) throw new Error('test.coverage-reports must be an array.'); - for (const key of ['coverage-source-sha', 'coverage-source-prefix']) { + for (const key of ['source-sha', 'source-prefix']) { if (testOptions[key] !== undefined && typeof testOptions[key] !== 'string') throw new Error(`test.${key} must be a string.`); core.setOutput(key, testOptions[key] || ''); } - core.setOutput('coverage-reports', testOptions['coverage-reports']?.length ? JSON.stringify(testOptions['coverage-reports']) : ''); + core.setOutput('test-coverage', testOptions['test-coverage'] || 'coverage/lcov.info'); const shards = testOptions.shards === undefined ? 1 : testOptions.shards; if (!Number.isInteger(shards) || shards < 1 || shards > 256) { throw new Error('test.shards must be an integer from 1 to 256.'); @@ -401,7 +316,7 @@ jobs: core.setOutput('arguments', args); core.setOutput('merge-command', testOptions['merge-command'] || testOptions.command || 'test:ci'); core.setOutput('coverage', testOptions.coverage ); - core.setOutput('report-file', testOptions['report-file'] || ''); + core.setOutput('test-results', testOptions['test-results'] || 'junit.xml'); core.setOutput('command', testOptions.command || 'test:ci'); - id: package-config @@ -533,10 +448,7 @@ jobs: return core.setFailed('At least one path mapping must be specified in the container configuration.'); } - core.setOutput('path-mapping', Object.entries(pathMapping).reduce((acc, [containerPath, repoPath]) => { - acc += `${acc?',' : ''}${containerPath}:${repoPath}`; - return acc; - }, "")); + core.setOutput('path-mapping', JSON.stringify(Object.fromEntries(Object.entries(pathMapping).map(([key,value]) => [key.replace(/\/$/, ''), value.replace(/\/$/, '') || '.'])))); - id: build-variables uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -634,36 +546,21 @@ jobs: core.setOutput('commands', sanitizedCommands.join('\n')); core.setOutput('env', JSON.stringify(env)); - - id: report-producers + - id: lint-options uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: + LINT_INPUT: ${{ inputs.lint }} CHECKS: ${{ inputs.checks }} - LINT: ${{ inputs.lint }} - TEST_ENABLED: ${{ steps.test-options.outputs.enabled }} - COVERAGE: ${{ steps.test-options.outputs.coverage }} - COVERAGE_REPORTS: ${{ steps.test-options.outputs.coverage-reports }} - DIRECTORY: ${{ inputs.working-directory }} - CONTAINER: ${{ inputs.container }} - SOURCE_PREFIX: ${{ steps.test-options.outputs.coverage-source-prefix }} with: script: | - const path = require('node:path'); - let directory = process.env.DIRECTORY || '.'; - if (path.isAbsolute(directory)) directory = process.env.CONTAINER ? process.env.SOURCE_PREFIX || '.' : path.relative(process.env.GITHUB_WORKSPACE,directory); - directory = directory || '.'; - const lint = process.env.CHECKS === 'true' && !['','false','null'].includes(process.env.LINT.trim()); - const producers = []; - if (lint) producers.push({key:'lint',type:'lint',directory,coverage:[]}); - if (process.env.CHECKS === 'true' && process.env.TEST_ENABLED === 'true') producers.push({key:'test',type:'test',directory, - coverage:process.env.COVERAGE === 'true' ? JSON.parse(process.env.COVERAGE_REPORTS || '[{"file":"coverage/cobertura-coverage.xml","language":"JavaScript"}]') : []}); - core.setOutput('producers',producers); - core.setOutput('lint-enabled',lint); - - id: report-plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) - with: - operation: plan - producers: ${{ steps.report-producers.outputs.producers }} - report-plan: ${{ inputs.report-plan }} + const raw = process.env.LINT_INPUT.trim(); + const enabled = process.env.CHECKS === 'true' && !['','false','null'].includes(raw); + if (enabled && raw !== 'true') { + const options = JSON.parse(raw); + if (!options || typeof options !== 'object' || Array.isArray(options) || Object.keys(options).some(key => !['command','lint-results','source-sha','source-prefix'].includes(key))) throw new Error('Unknown lint options.'); + for (const value of Object.values(options)) if (typeof value !== 'string' || !value.trim()) throw new Error('Lint options must be nonempty strings.'); + } + core.setOutput('lint-enabled', enabled); code-ql: name: 🛡️ CodeQL Analysis @@ -734,9 +631,9 @@ jobs: permissions: contents: read packages: read + actions: read steps: - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 - if: inputs.container == '' with: ref: ${{ github.event.pull_request.head.sha || github.sha }} @@ -760,7 +657,10 @@ jobs: } core.setOutput('command', lintOptions.command || 'lint:ci'); - core.setOutput('report-file', lintOptions['report-file'] || ''); + core.setOutput('lint-results', lintOptions['lint-results'] || 'lint.sarif'); + + core.setOutput('source-sha', lintOptions['source-sha'] || ''); + core.setOutput('source-prefix', lintOptions['source-prefix'] || ''); - name: Run lint uses: $/actions/lint @@ -769,9 +669,10 @@ jobs: working-directory: ${{ needs.prepare.outputs.working-directory }} container: ${{ inputs.container != '' && 'true' || 'false' }} command: ${{ steps.preparel-lint-options.outputs.command }} - report-file: ${{ steps.preparel-lint-options.outputs.report-file }} path-mapping: ${{ needs.prepare.outputs.path-mapping || '' }} - report-plan: ${{ toJSON(fromJSON(needs.prepare.outputs.report-selections).lint) }} + lint-results: ${{ steps.preparel-lint-options.outputs.lint-results }} + source-sha: ${{ steps.preparel-lint-options.outputs.source-sha }} + source-prefix: ${{ steps.preparel-lint-options.outputs.source-prefix }} build: if: inputs.checks == true && needs.prepare.outputs.build-commands != '' @@ -835,13 +736,13 @@ jobs: permissions: contents: read packages: read + actions: read strategy: fail-fast: false max-parallel: ${{ fromJSON(needs.prepare.outputs.test-shards) }} matrix: ${{ fromJSON(needs.prepare.outputs.test-matrix) }} steps: - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 - if: inputs.container == '' with: ref: ${{ github.event.pull_request.head.sha || github.sha }} @@ -862,12 +763,11 @@ jobs: shard: ${{ needs.prepare.outputs.test-shards != '1' && format('{0}/{1}', matrix.shard, needs.prepare.outputs.test-shards) || '' }} shard-group: ${{ format('ci-test-{0}-{1}-{2}', github.run_id, github.run_attempt, needs.prepare.outputs.test-group) }} coverage: ${{ needs.prepare.outputs.test-coverage == 'true' && 'true' || 'false' }} - coverage-reports: ${{ needs.prepare.outputs.test-coverage-reports }} - coverage-source-sha: ${{ needs.prepare.outputs.test-coverage-source-sha }} - coverage-source-prefix: ${{ needs.prepare.outputs.test-coverage-source-prefix }} - report-file: ${{ needs.prepare.outputs.test-report-file }} path-mapping: ${{ needs.prepare.outputs.path-mapping || '' }} - report-plan: ${{ toJSON(fromJSON(needs.prepare.outputs.report-selections).test) }} + test-results: ${{ needs.prepare.outputs.test-test-results }} + source-sha: ${{ needs.prepare.outputs.test-source-sha }} + source-prefix: ${{ needs.prepare.outputs.test-source-prefix }} + test-coverage: ${{ needs.prepare.outputs.test-coverage-paths }} test-merge: name: Merge test results @@ -881,9 +781,9 @@ jobs: permissions: contents: read packages: read + actions: read steps: - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 - if: inputs.container == '' with: ref: ${{ github.event.pull_request.head.sha || github.sha }} @@ -904,12 +804,11 @@ jobs: merge-shards: ${{ needs.prepare.outputs.test-shards }} shard-group: ${{ format('ci-test-{0}-{1}-{2}', github.run_id, github.run_attempt, needs.prepare.outputs.test-group) }} coverage: ${{ needs.prepare.outputs.test-coverage == 'true' && 'true' || 'false' }} - coverage-reports: ${{ needs.prepare.outputs.test-coverage-reports }} - coverage-source-sha: ${{ needs.prepare.outputs.test-coverage-source-sha }} - coverage-source-prefix: ${{ needs.prepare.outputs.test-coverage-source-prefix }} - report-file: ${{ needs.prepare.outputs.test-report-file }} path-mapping: ${{ needs.prepare.outputs.path-mapping || '' }} - report-plan: ${{ toJSON(fromJSON(needs.prepare.outputs.report-selections).test) }} + test-results: ${{ needs.prepare.outputs.test-test-results }} + source-sha: ${{ needs.prepare.outputs.test-source-sha }} + source-prefix: ${{ needs.prepare.outputs.test-source-prefix }} + test-coverage: ${{ needs.prepare.outputs.test-coverage-paths }} - name: Require successful shards if: always() diff --git a/actions/lint/README.md b/actions/lint/README.md index 8373b48b..48809f94 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -21,13 +21,13 @@ ## Overview -Run project lint commands and retain native reports for consolidated CI feedback. -The common ci-reports workflow owns comments and external coverage publication. -Forward report-plan from standalone jobs; reusable workflows do this automatically. -Required reports remain required after command failures. This action keeps local -diagnostics and never grants publication permissions to project code. +Run project lint commands and validate their native reports before publication. -Generate supported lint reports such as SARIF, ESLint JSON or Checkstyle XML. +Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write +required reports there; stale files in the project cannot satisfy the contract. +Missing or malformed reports fail even after a successful command. Available +diagnostics are retained after failures. Call common ci-reports once after all checks. +Producer jobs require actions: read and contents: read, with source checked out. @@ -35,7 +35,7 @@ Generate supported lint reports such as SARIF, ESLint JSON or Checkstyle XML. ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@11636b817040a2a7d61b389c28fa1b401c37a2fa # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@35b4839d14f5abf7ce8426d8a5d718170a971ee6 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -54,30 +54,22 @@ Generate supported lint reports such as SARIF, ESLint JSON or Checkstyle XML. # Default: `false` container: "false" - # npm/pnpm/Yarn script command to run for linting. - # This should be a script defined in your `package.json`. - # The command should generate lint report files in a standard format. - # - # ESLint: `eslint --format json -o eslint-report.json .` - # Prettier: `prettier --check . | tee prettier-report.txt` - # Biome: `biome check --assist-enabled=false . --reporter=sarif --reporter-file=biome-report.sarif --reporter=default` - # Astro: `astro check | tee astro-report.txt` - # + # npm/pnpm/Yarn script to run. Generate the declared native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". # Default: `lint:ci` command: lint:ci - # Optional lint report path forwarded to the [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action. - # Provide an absolute path or one relative to the working directory. - # Each explicit path or glob must match a file after exclusions; missing reports fail the action. - # When omitted, `auto:lint` detection may find no reports. - report-file: "" - - # Optional path mapping to adjust file paths in test and coverage reports. - # See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. + # Optional JSON object mapping native report source path prefixes to repository-relative directories. path-mapping: "" - # Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. - report-plan: "" + # Source commit tested by a prebuilt container; must equal the checked-out revision. + source-sha: "" + + # Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. + source-prefix: "" + + # Required native report paths relative to CI_REPORTS_DIR, one per line. + # Default: `lint.sarif` + lint-results: lint.sarif ``` @@ -85,29 +77,19 @@ Generate supported lint reports such as SARIF, ESLint JSON or Checkstyle XML. ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | -| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | -| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | -| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | -| **`working-directory`** | Working directory where lint commands are executed. | **false** | `.` | -| | Can be absolute or relative to the repository root. | | | -| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | -| **`command`** | npm/pnpm/Yarn script command to run for linting. | **false** | `lint:ci` | -| | This should be a script defined in your `package.json`. | | | -| | The command should generate lint report files in a standard format. | | | -| | | | | -| | ESLint: `eslint --format json -o eslint-report.json .` | | | -| | Prettier: `prettier --check . \| tee prettier-report.txt` | | | -| | Biome: `biome check --assist-enabled=false . --reporter=sarif --reporter-file=biome-report.sarif --reporter=default` | | | -| | Astro: `astro check \| tee astro-report.txt` | | | -| **`report-file`** | Optional lint report path forwarded to the [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action. | **false** | - | -| | Provide an absolute path or one relative to the working directory. | | | -| | Each explicit path or glob must match a file after exclusions; missing reports fail the action. | | | -| | When omitted, `auto:lint` detection may find no reports. | | | -| **`path-mapping`** | Optional path mapping to adjust file paths in test and coverage reports. | **false** | - | -| | See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. | | | -| **`report-plan`** | Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. | **false** | - | +| **Input** | **Description** | **Required** | **Default** | +| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------ | +| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | +| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | +| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | +| **`working-directory`** | Working directory where lint commands are executed. | **false** | `.` | +| | Can be absolute or relative to the repository root. | | | +| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | +| **`command`** | npm/pnpm/Yarn script to run. Generate the declared native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". | **false** | `lint:ci` | +| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | +| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | +| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | +| **`lint-results`** | Required native report paths relative to CI_REPORTS_DIR, one per line. | **false** | `lint.sarif` | @@ -118,7 +100,6 @@ Generate supported lint reports such as SARIF, ESLint JSON or Checkstyle XML. | **Output** | **Description** | | ------------------------ | --------------------------------------------------------------------- | -| **`report-plan`** | Expected report metadata. Forward from standalone jobs. | | **`report-artifact-id`** | Native report bundle, including available diagnostics after failures. | diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 1485285a..30dd4a15 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -1,12 +1,12 @@ name: "Lint" description: | - Run project lint commands and retain native reports for consolidated CI feedback. - The common ci-reports workflow owns comments and external coverage publication. - Forward report-plan from standalone jobs; reusable workflows do this automatically. - Required reports remain required after command failures. This action keeps local - diagnostics and never grants publication permissions to project code. + Run project lint commands and validate their native reports before publication. - Generate supported lint reports such as SARIF, ESLint JSON or Checkstyle XML. + Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write + required reports there; stale files in the project cannot satisfy the contract. + Missing or malformed reports fail even after a successful command. Available + diagnostics are retained after failures. Call common ci-reports once after all checks. + Producer jobs require actions: read and contents: read, with source checked out. author: hoverkraft branding: icon: check-circle @@ -30,34 +30,24 @@ inputs: required: false default: "false" command: - description: | - npm/pnpm/Yarn script command to run for linting. - This should be a script defined in your `package.json`. - The command should generate lint report files in a standard format. - - ESLint: `eslint --format json -o eslint-report.json .` - Prettier: `prettier --check . | tee prettier-report.txt` - Biome: `biome check --assist-enabled=false . --reporter=sarif --reporter-file=biome-report.sarif --reporter=default` - Astro: `astro check | tee astro-report.txt` + description: |- + npm/pnpm/Yarn script to run. Generate the declared native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". required: false default: "lint:ci" - report-file: - description: | - Optional lint report path forwarded to the [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action. - Provide an absolute path or one relative to the working directory. - Each explicit path or glob must match a file after exclusions; missing reports fail the action. - When omitted, `auto:lint` detection may find no reports. - required: false - default: "" path-mapping: - description: | - Optional path mapping to adjust file paths in test and coverage reports. - See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. + description: |- + Optional JSON object mapping native report source path prefixes to repository-relative directories. required: false default: "" - report-plan: - description: Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. + source-sha: + description: Source commit tested by a prebuilt container; must equal the checked-out revision. + default: "" + source-prefix: + description: Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. default: "" + lint-results: + description: Required native report paths relative to CI_REPORTS_DIR, one per line. + default: lint.sarif runs: using: "composite" @@ -84,12 +74,30 @@ runs: uses: $/actions/get-package-manager with: working-directory: ${{ steps.working-directory.outputs.absolute-path }} - - id: report-plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) + - id: definition + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + env: + NODE_ACTION_PATH: ${{ github.action_path }} + WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }} + SOURCE_SHA: ${{ inputs.source-sha }} + SOURCE_PREFIX: ${{ inputs.source-prefix }} + PATH_MAPPING: ${{ inputs.path-mapping }} + RESULTS: ${{ inputs.lint-results }} with: - operation: plan - report-plan: ${{ inputs.report-plan }} - producers: '[{"key":"lint","type":"lint","directory":${{ toJSON(inputs.container == ''true'' && ''.'' || steps.working-directory.outputs.workspace-relative-path || ''.'') }},"coverage":[]}]' + script: | + const { ReportDefinition } = require(process.env.NODE_ACTION_PATH + '/../reporting/ReportDefinition.cjs'); + const runtime = await exec.getExecOutput('node', ['--version'], {silent: true}); + core.setOutput('definition', ReportDefinition.create({ + kind: 'lint', workspace: process.env.GITHUB_WORKSPACE, directory: process.env.WORKING_DIRECTORY, + runtime: runtime.stdout.trim(), sourceSha: process.env.SOURCE_SHA, sourcePrefix: process.env.SOURCE_PREFIX, + mapping: process.env.PATH_MAPPING, results: process.env.RESULTS, coverage: process.env.COVERAGE, + coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS + })); + - id: prepare-reports + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@ea5900049a1704d6d2b479cc6cce37e799f532a3 # PR #683 (unreleased) + with: + operation: prepare + definition: ${{ steps.definition.outputs.definition }} # jscpd:ignore-end - id: run-lint @@ -99,6 +107,7 @@ runs: RUN_LINT_COMMAND: ${{ inputs.container == 'true' && steps.get-package-manager.outputs.run-script-command || steps.setup-node.outputs.run-script-command }} WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }} LINT_COMMAND: ${{ inputs.command }} + CI_REPORTS_DIR: ${{ steps.prepare-reports.outputs.report-directory }} # jscpd:ignore-end with: script: | @@ -127,18 +136,14 @@ runs: core.setFailed(`Linting error: ${error.message}`); } - id: reports - name: Record lint results - if: ${{ !cancelled() && steps.report-plan.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) + name: Validate and retain native reports + if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@ea5900049a1704d6d2b479cc6cce37e799f532a3 # unified reports (PR #683, unreleased) with: - working-directory: ${{ steps.working-directory.outputs.absolute-path }} - report-plan: ${{ steps.report-plan.outputs.report-plan }} - report-paths: ${{ inputs.report-file || 'auto:lint' }} - path-mapping: ${{ inputs.path-mapping }} + operation: finalize + recording: ${{ steps.prepare-reports.outputs.recording }} + outcome: ${{ steps.run-lint.outcome }} outputs: - report-plan: - description: Expected report metadata. Forward from standalone jobs. - value: ${{ steps.report-plan.outputs.report-plan }} report-artifact-id: description: Native report bundle, including available diagnostics after failures. value: ${{ steps.reports.outputs.artifact-id }} diff --git a/actions/reporting/ReportDefinition.cjs b/actions/reporting/ReportDefinition.cjs new file mode 100644 index 00000000..57ca5f8c --- /dev/null +++ b/actions/reporting/ReportDefinition.cjs @@ -0,0 +1,88 @@ +const fs = require("node:fs"); +const path = require("node:path"); + +/** Build the producer contract before any project check executes. */ +const ReportDefinition = { + paths(value) { + const paths = value + .split(/\r?\n/) + .map((item) => item.trim()) + .filter(Boolean); + if (!paths.length) + throw new Error("Required report paths must not be empty."); + return paths; + }, + + create({ + kind, + workspace, + directory, + runtime, + sourceSha, + sourcePrefix, + mapping, + results, + coverage, + coveragePaths, + shards, + }) { + const relative = path + .relative(workspace, directory) + .split(path.sep) + .join("/"); + const outside = + relative === ".." || + relative.startsWith("../") || + path.isAbsolute(relative); + if (outside && (!sourceSha || !sourcePrefix)) { + throw new Error( + "A prebuilt container requires source-sha and source-prefix, and a checkout of that source in GITHUB_WORKSPACE.", + ); + } + const project = outside ? sourcePrefix : relative || "."; + const mappings = mapping ? JSON.parse(mapping) : {}; + if (!mappings || typeof mappings !== "object" || Array.isArray(mappings)) + throw new Error("path-mapping must be a JSON object."); + if (outside) mappings[directory.replace(/\/$/, "")] = project; + const reports = ReportDefinition.paths(results).map((pattern) => ({ + kind, + pattern, + })); + if (kind === "test" && coverage === "true") { + const language = fs.existsSync(path.join(directory, "tsconfig.json")) + ? "TypeScript" + : "JavaScript"; + const count = shards ? Number(shards) : 0; + if (count && (!Number.isSafeInteger(count) || count < 2 || count > 256)) + throw new Error("Invalid merged shard count."); + reports.push( + ...ReportDefinition.paths(coveragePaths).map((pattern) => ({ + kind: "coverage", + pattern, + language, + ...(count + ? { + shards: { + expected: Array.from({ length: count }, (_, index) => + String(index + 1), + ), + included: Array.from({ length: count }, (_, index) => + String(index + 1), + ), + }, + } + : {}), + })), + ); + } + return { + name: kind === "test" ? "Node.js tests" : "Node.js lint", + project, + variant: { runtime }, + reports, + "path-mapping": mappings, + ...(sourceSha ? { source: { sha: sourceSha } } : {}), + }; + }, +}; +module.exports = { ReportDefinition }; diff --git a/actions/test/README.md b/actions/test/README.md index c3890dcc..0692d280 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -21,14 +21,15 @@ ## Overview -Run project test commands and retain native reports for consolidated CI feedback. -The common ci-reports workflow owns comments and external coverage publication. -Forward report-plan from standalone jobs; reusable workflows do this automatically. -Required reports remain required after command failures. This action keeps local -diagnostics and never grants publication permissions to project code. +Run project test commands and validate their native reports before publication. -Coverage publication requires Cobertura XML generated by the test tool. Configure -JUnit or TAP for test results and merge framework shards before recording coverage. +Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write +required reports there; stale files in the project cannot satisfy the contract. +Missing or malformed reports fail even after a successful command. Available +diagnostics are retained after failures. Call common ci-reports once after all checks. +Producer jobs require actions: read and contents: read, with source checked out. +CI_TEST_COVERAGE indicates whether to instrument tests. Default reports are JUnit +and LCOV; configure different native paths with test-results and test-coverage. @@ -36,7 +37,7 @@ JUnit or TAP for test results and merge framework shards before recording covera ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@11636b817040a2a7d61b389c28fa1b401c37a2fa # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@35b4839d14f5abf7ce8426d8a5d718170a971ee6 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -55,26 +56,11 @@ JUnit or TAP for test results and merge framework shards before recording covera # Default: `false` container: "false" - # npm/pnpm/Yarn script command to run for testing. - # This should be a script defined in your `package.json`. - # The command should generate coverage report files in a standard format (Cobertura XML, lcov, etc.). - # - # Vitest: `vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text` - # Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage --coverageReporters=cobertura` - # + # npm/pnpm/Yarn script to run. Write JUnit or TAP into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. For Vitest, use --outputFile.junit="$CI_REPORTS_DIR/junit.xml" and --coverage.reportsDirectory="$CI_REPORTS_DIR/coverage". # Default: `test:ci` command: test:ci - # Tested source commit for a prebuilt container without Git metadata. Must equal the PR head or push SHA. - coverage-source-sha: "" - - # Repository-relative directory represented by the container working-directory. Required with coverage-source-sha when Git metadata is absent; use a dot for the repository root. - coverage-source-prefix: "" - - # Optional JSON array of Cobertura file, language and label. Empty uses the language default; labels default to the project directory. - coverage-reports: "" - - # Require Cobertura coverage for consolidated publication. Set false to retain available diagnostics without requiring Cobertura. Configure instrumentation in the test command. + # Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. # Default: `true` coverage: "true" @@ -103,21 +89,22 @@ JUnit or TAP for test results and merge framework shards before recording covera # A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. merge-shards: "" - # Optional test and coverage report paths forwarded to the [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action. - # Supports multiple formats (Cobertura, OpenCover, lcov, etc.). - # Provide absolute paths or paths relative to the working directory. - # Multiple entries can be separated by newlines, commas, or semicolons. - # Each explicit path or glob must match a file after exclusions; missing reports fail the action. - # When omitted, test reports are discovered and planned Cobertura paths are required. - # At least one executed test must appear in the required native test report. - report-file: "" - - # Optional path mapping to adjust file paths in test and coverage reports. - # See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. + # Optional JSON object mapping native report source path prefixes to repository-relative directories. path-mapping: "" - # Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. - report-plan: "" + # Source commit tested by a prebuilt container; must equal the checked-out revision. + source-sha: "" + + # Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. + source-prefix: "" + + # Required native report paths relative to CI_REPORTS_DIR, one per line. + # Default: `junit.xml` + test-results: junit.xml + + # Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Merge coverage shards in the framework first. + # Default: `coverage/lcov.info` + test-coverage: coverage/lcov.info ``` @@ -125,49 +112,36 @@ JUnit or TAP for test results and merge framework shards before recording covera ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| ---------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | -| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | -| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | -| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | -| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | -| | Can be absolute or relative to the repository root. | | | -| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | -| **`command`** | npm/pnpm/Yarn script command to run for testing. | **false** | `test:ci` | -| | This should be a script defined in your `package.json`. | | | -| | The command should generate coverage report files in a standard format (Cobertura XML, lcov, etc.). | | | -| | | | | -| | Vitest: `vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text` | | | -| | Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage --coverageReporters=cobertura` | | | -| **`coverage-source-sha`** | Tested source commit for a prebuilt container without Git metadata. Must equal the PR head or push SHA. | **false** | - | -| **`coverage-source-prefix`** | Repository-relative directory represented by the container working-directory. Required with coverage-source-sha when Git metadata is absent; use a dot for the repository root. | **false** | - | -| **`coverage-reports`** | Optional JSON array of Cobertura file, language and label. Empty uses the language default; labels default to the project directory. | **false** | - | -| **`coverage`** | Require Cobertura coverage for consolidated publication. Set false to retain available diagnostics without requiring Cobertura. Configure instrumentation in the test command. | **false** | `true` | -| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | -| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | -| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | -| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | -| | after tests, including failures. Individual reporting is disabled for shards. | | | -| | Use reporter-specific --outputFile.junit rather than scalar --outputFile in the package script. | | | -| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | -| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | -| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | -| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | -| | All shards and their merge must use the same group and absolute project directory. | | | -| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | -| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | -| | The package script must enable final reporters and original coverage thresholds. | | | -| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | -| **`report-file`** | Optional test and coverage report paths forwarded to the [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action. | **false** | - | -| | Supports multiple formats (Cobertura, OpenCover, lcov, etc.). | | | -| | Provide absolute paths or paths relative to the working directory. | | | -| | Multiple entries can be separated by newlines, commas, or semicolons. | | | -| | Each explicit path or glob must match a file after exclusions; missing reports fail the action. | | | -| | When omitted, test reports are discovered and planned Cobertura paths are required. | | | -| | At least one executed test must appear in the required native test report. | | | -| **`path-mapping`** | Optional path mapping to adjust file paths in test and coverage reports. | **false** | - | -| | See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. | | | -| **`report-plan`** | Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. | **false** | - | +| **Input** | **Description** | **Required** | **Default** | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------- | +| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | +| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | +| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | +| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | +| | Can be absolute or relative to the repository root. | | | +| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | +| **`command`** | npm/pnpm/Yarn script to run. Write JUnit or TAP into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. For Vitest, use --outputFile.junit="$CI_REPORTS_DIR/junit.xml" and --coverage.reportsDirectory="$CI_REPORTS_DIR/coverage". | **false** | `test:ci` | +| **`coverage`** | Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. | **false** | `true` | +| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | +| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | +| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | +| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | +| | after tests, including failures. Individual reporting is disabled for shards. | | | +| | Use reporter-specific --outputFile.junit rather than scalar --outputFile in the package script. | | | +| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | +| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | +| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | +| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | +| | All shards and their merge must use the same group and absolute project directory. | | | +| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | +| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | +| | The package script must enable final reporters and original coverage thresholds. | | | +| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | +| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | +| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | +| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | +| **`test-results`** | Required native report paths relative to CI_REPORTS_DIR, one per line. | **false** | `junit.xml` | +| **`test-coverage`** | Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Merge coverage shards in the framework first. | **false** | `coverage/lcov.info` | @@ -180,7 +154,6 @@ JUnit or TAP for test results and merge framework shards before recording covera | ------------------------ | ----------------------------------------------------------------------------------------- | | **`report-artifact-id`** | Native report bundle, including available diagnostics after failures. | | **`shard-artifact-id`** | Blob and manifest artifact ID for an executing shard, including failed tests with a blob. | -| **`report-plan`** | Expected report metadata. Forward from standalone jobs. | diff --git a/actions/test/action.yml b/actions/test/action.yml index 0051bdad..b8878985 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -1,13 +1,14 @@ name: "Test" description: | - Run project test commands and retain native reports for consolidated CI feedback. - The common ci-reports workflow owns comments and external coverage publication. - Forward report-plan from standalone jobs; reusable workflows do this automatically. - Required reports remain required after command failures. This action keeps local - diagnostics and never grants publication permissions to project code. + Run project test commands and validate their native reports before publication. - Coverage publication requires Cobertura XML generated by the test tool. Configure - JUnit or TAP for test results and merge framework shards before recording coverage. + Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write + required reports there; stale files in the project cannot satisfy the contract. + Missing or malformed reports fail even after a successful command. Available + diagnostics are retained after failures. Call common ci-reports once after all checks. + Producer jobs require actions: read and contents: read, with source checked out. + CI_TEST_COVERAGE indicates whether to instrument tests. Default reports are JUnit + and LCOV; configure different native paths with test-results and test-coverage. author: hoverkraft branding: icon: check-square @@ -31,27 +32,12 @@ inputs: required: false default: "false" command: - description: | - npm/pnpm/Yarn script command to run for testing. - This should be a script defined in your `package.json`. - The command should generate coverage report files in a standard format (Cobertura XML, lcov, etc.). - - Vitest: `vitest run --reporter=default --reporter=junit --outputFile.junit=junit.xml --coverage.enabled --coverage.reporter=cobertura --coverage.reporter=text` - Jest: `jest --ci --reporters=default --reporters=jest-junit --coverage --coverageReporters=cobertura` + description: |- + npm/pnpm/Yarn script to run. Write JUnit or TAP into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. For Vitest, use --outputFile.junit="$CI_REPORTS_DIR/junit.xml" and --coverage.reportsDirectory="$CI_REPORTS_DIR/coverage". required: false default: "test:ci" - coverage-source-sha: - description: Tested source commit for a prebuilt container without Git metadata. Must equal the PR head or push SHA. - default: "" - coverage-source-prefix: - description: Repository-relative directory represented by the container working-directory. Required with coverage-source-sha when Git metadata is absent; use a dot for the repository root. - default: "" - coverage-reports: - description: |- - Optional JSON array of Cobertura file, language and label. Empty uses the language default; labels default to the project directory. - default: "" coverage: - description: Require Cobertura coverage for consolidated publication. Set false to retain available diagnostics without requiring Cobertura. Configure instrumentation in the test command. + description: Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. default: "true" arguments: description: | @@ -80,26 +66,23 @@ inputs: The package script must enable final reporters and original coverage thresholds. A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. default: "" - report-file: - description: | - Optional test and coverage report paths forwarded to the [parse-ci-reports](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) action. - Supports multiple formats (Cobertura, OpenCover, lcov, etc.). - Provide absolute paths or paths relative to the working directory. - Multiple entries can be separated by newlines, commas, or semicolons. - Each explicit path or glob must match a file after exclusions; missing reports fail the action. - When omitted, test reports are discovered and planned Cobertura paths are required. - At least one executed test must appear in the required native test report. - required: false - default: "" path-mapping: - description: | - Optional path mapping to adjust file paths in test and coverage reports. - See the [parse-ci-reports documentation](https://github.com/hoverkraft-tech/ci-github-common/tree/main/actions/quality/parse-ci-reports) for details. + description: |- + Optional JSON object mapping native report source path prefixes to repository-relative directories. required: false default: "" - report-plan: - description: Expected producer metadata supplied by reusable workflows. Leave empty for standalone use. + source-sha: + description: Source commit tested by a prebuilt container; must equal the checked-out revision. + default: "" + source-prefix: + description: Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. default: "" + test-results: + description: Required native report paths relative to CI_REPORTS_DIR, one per line. + default: junit.xml + test-coverage: + description: Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Merge coverage shards in the framework first. + default: coverage/lcov.info outputs: report-artifact-id: @@ -108,9 +91,6 @@ outputs: shard-artifact-id: description: Blob and manifest artifact ID for an executing shard, including failed tests with a blob. value: ${{ steps.upload-shard.outputs.artifact-id }} - report-plan: - description: Expected report metadata. Forward from standalone jobs. - value: ${{ steps.report-plan.outputs.report-plan }} runs: using: "composite" @@ -129,7 +109,7 @@ runs: NODE_ACTION_PATH: ${{ github.action_path }} WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }} COVERAGE_DESTINATION: ${{ inputs.coverage }} - TEST_COMMIT: ${{ inputs.coverage-source-sha || github.event.pull_request.head.sha || github.sha }} + TEST_COMMIT: ${{ inputs.source-sha || github.event.pull_request.head.sha || github.sha }} TEST_ARGUMENTS: ${{ inputs.arguments }} TEST_SHARD: ${{ inputs.shard }} SHARD_GROUP: ${{ inputs.shard-group }} @@ -181,6 +161,35 @@ runs: with: pattern: ${{ steps.prepare-test.outputs.group }}-* path: ${{ steps.prepare-test.outputs.incoming }} + - id: definition + if: inputs.shard == '' + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + env: + NODE_ACTION_PATH: ${{ github.action_path }} + WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }} + SOURCE_SHA: ${{ inputs.source-sha }} + SOURCE_PREFIX: ${{ inputs.source-prefix }} + PATH_MAPPING: ${{ inputs.path-mapping }} + RESULTS: ${{ inputs.test-results }} + COVERAGE: ${{ inputs.coverage }} + COVERAGE_PATHS: ${{ inputs.test-coverage }} + MERGE_SHARDS: ${{ inputs.merge-shards }} + with: + script: | + const { ReportDefinition } = require(process.env.NODE_ACTION_PATH + '/../reporting/ReportDefinition.cjs'); + const runtime = await exec.getExecOutput('node', ['--version'], {silent: true}); + core.setOutput('definition', ReportDefinition.create({ + kind: 'test', workspace: process.env.GITHUB_WORKSPACE, directory: process.env.WORKING_DIRECTORY, + runtime: runtime.stdout.trim(), sourceSha: process.env.SOURCE_SHA, sourcePrefix: process.env.SOURCE_PREFIX, + mapping: process.env.PATH_MAPPING, results: process.env.RESULTS, coverage: process.env.COVERAGE, + coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS + })); + - id: prepare-reports + if: inputs.shard == '' + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@ea5900049a1704d6d2b479cc6cce37e799f532a3 # PR #683 (unreleased) + with: + operation: prepare + definition: ${{ steps.definition.outputs.definition }} - id: validate-shards if: inputs.merge-shards != '' @@ -193,13 +202,6 @@ runs: const { TestShards } = require(`${process.env.NODE_ACTION_PATH}/TestShards.cjs`); const shards = new TestShards(JSON.parse(process.env.SHARD_CONFIGURATION)); core.setOutput('failed', shards.validate()); - - id: report-plan - if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) - with: - operation: plan - report-plan: ${{ inputs.report-plan }} - producers: '[{"key":"test","type":"test","directory":${{ toJSON(inputs.container == ''true'' && (inputs.coverage-source-prefix || ''.'') || steps.working-directory.outputs.workspace-relative-path || ''.'') }},"coverage":${{ inputs.coverage == ''true'' && (inputs.coverage-reports || ''[{"file":"coverage/cobertura-coverage.xml","language":"JavaScript"}]'') || ''[]'' }}}]' - id: run-test name: 🧪 Run tests @@ -212,6 +214,8 @@ runs: TEST_ARGUMENTS: ${{ steps.prepare-test.outputs.arguments }} TEST_SHARD: ${{ inputs.shard }} SHARDS_FAILED: ${{ steps.validate-shards.outputs.failed }} + CI_REPORTS_DIR: ${{ steps.prepare-reports.outputs.report-directory || steps.prepare-test.outputs.directory }} + CI_TEST_COVERAGE: ${{ inputs.coverage }} with: script: | const workingDirectory = process.env.WORKING_DIRECTORY; @@ -273,16 +277,13 @@ runs: if-no-files-found: error retention-days: 7 - id: reports - name: Record test results - if: ${{ !cancelled() && steps.report-plan.outcome == 'success' && inputs.shard == '' && (inputs.merge-shards == '' || steps.validate-shards.outcome == 'success') }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@f76a768d78723ec0ba0b1442eeeb2c1619dc7525 # unified reports (PR #683, unreleased) + name: Validate and retain native reports + if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@ea5900049a1704d6d2b479cc6cce37e799f532a3 # unified reports (PR #683, unreleased) with: - working-directory: ${{ steps.working-directory.outputs.absolute-path }} - report-plan: ${{ steps.report-plan.outputs.report-plan }} - report-paths: ${{ inputs.report-file || 'auto:test' }} - path-mapping: ${{ inputs.path-mapping }} - source-sha: ${{ inputs.coverage-source-sha }} - source-prefix: ${{ inputs.coverage-source-prefix }} + operation: finalize + recording: ${{ steps.prepare-reports.outputs.recording }} + outcome: ${{ steps.run-test.outcome }} - name: Clean shard workspace if: always() && steps.prepare-test.outputs.directory != '' diff --git a/tests/continuous-integration/fixtures/vitest.config.mjs b/tests/continuous-integration/fixtures/vitest.config.mjs index 4f5d7d84..2db8d2c9 100644 --- a/tests/continuous-integration/fixtures/vitest.config.mjs +++ b/tests/continuous-integration/fixtures/vitest.config.mjs @@ -4,13 +4,17 @@ export default defineConfig({ test: { include: ["fixtures/vitest/*.fixture.js"], reporters: ["default", "junit"], - outputFile: { junit: "coverage/sharding/junit.xml" }, + outputFile: { + junit: `${process.env.CI_REPORTS_DIR || "coverage/sharding"}/junit.xml`, + }, coverage: { - enabled: true, + enabled: process.env.CI_TEST_COVERAGE !== "false", provider: "v8", include: ["fixtures/vitest/source.js"], - reporter: ["lcov", "json-summary", "cobertura"], - reportsDirectory: "coverage/sharding", + reporter: ["lcov", "json-summary"], + reportsDirectory: process.env.CI_REPORTS_DIR + ? `${process.env.CI_REPORTS_DIR}/coverage` + : "coverage/sharding", reportOnFailure: true, thresholds: process.env.CI_TEST_SHARD ? undefined diff --git a/tests/continuous-integration/package.json b/tests/continuous-integration/package.json index 7a212e0e..4b11258f 100644 --- a/tests/continuous-integration/package.json +++ b/tests/continuous-integration/package.json @@ -4,9 +4,8 @@ "type": "module", "scripts": { "test": "node --test", - "test:ci": "node --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=coverage/junit.xml", - "test:vitest": "vitest run --config fixtures/vitest.config.mjs --reporter=default --reporter=junit --outputFile.junit=coverage/sharding/junit.xml", - "pretest:ci": "node -e \"require('node:fs').mkdirSync('coverage', {recursive:true})\"" + "test:ci": "node --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=\"$CI_REPORTS_DIR/junit.xml\"", + "test:vitest": "vitest run --config fixtures/vitest.config.mjs" }, "devDependencies": { "@actions/expressions": "0.3.61", diff --git a/tests/continuous-integration/reporting.test.js b/tests/continuous-integration/reporting.test.js new file mode 100644 index 00000000..d7fbd3d5 --- /dev/null +++ b/tests/continuous-integration/reporting.test.js @@ -0,0 +1,102 @@ +import assert from "node:assert/strict"; +import { createRequire } from "node:module"; +import test from "node:test"; +import { readFileSync } from "node:fs"; +import { parse } from "yaml"; +const require = createRequire(import.meta.url); +const { + ReportDefinition, +} = require("../../actions/reporting/ReportDefinition.cjs"); +const base = { + kind: "test", + workspace: "/repository", + directory: "/repository/app", + runtime: "v26.0.0", + results: "junit.xml", + coverage: "false", +}; + +test("container reports require an explicit source and map back to the checkout", () => { + assert.throws( + () => ReportDefinition.create({ ...base, directory: "/image/app" }), + /requires source-sha and source-prefix/, + ); + const definition = ReportDefinition.create({ + ...base, + directory: "/image/app", + sourceSha: "a".repeat(40), + sourcePrefix: "app", + }); + assert.equal(definition.project, "app"); + assert.deepEqual(definition["path-mapping"], { "/image/app": "app" }); + assert.equal(definition.source.sha, "a".repeat(40)); +}); + +test("secondary runs retain tests without coverage promises; merged coverage identifies every shard", () => { + const tests = ReportDefinition.create(base); + assert.deepEqual(tests.reports, [{ kind: "test", pattern: "junit.xml" }]); + const merged = ReportDefinition.create({ + ...base, + coverage: "true", + coveragePaths: "coverage/lcov.info", + shards: "2", + }); + assert.deepEqual(merged.reports[1].shards, { + expected: ["1", "2"], + included: ["1", "2"], + }); + assert.throws( + () => ReportDefinition.create({ ...base, results: " " }), + /must not be empty/, + ); + assert.throws( + () => ReportDefinition.create({ ...base, mapping: "[]" }), + /JSON object/, + ); +}); + +test("a failed project command preserves its exit status and receives the fresh report directory", async () => { + const action = parse( + readFileSync( + new URL("../../actions/test/action.yml", import.meta.url), + "utf8", + ), + ); + const script = action.runs.steps.find((step) => step.id === "run-test").with + .script; + const AsyncFunction = Object.getPrototypeOf(async () => {}).constructor; + const outputs = {}, + failures = []; + const env = { + WORKING_DIRECTORY: "/repository/app", + NODE_ACTION_PATH: new URL("../../actions/test", import.meta.url).pathname, + RUN_TEST_COMMAND: "npm run", + TEST_COMMAND: "test:ci", + TEST_ARGUMENTS: "[]", + CI_REPORTS_DIR: "/fresh/reports", + CI_TEST_COVERAGE: "false", + }; + await new AsyncFunction("process", "core", "exec", "require", script)( + { env, chdir() {} }, + { + debug() {}, + info() {}, + setOutput(name, value) { + outputs[name] = value; + }, + setFailed(message) { + failures.push(message); + }, + }, + { + async exec(_command, _args, options) { + assert.equal(options.env.CI_REPORTS_DIR, "/fresh/reports"); + assert.equal(options.env.CI_TEST_COVERAGE, "false"); + return 17; + }, + }, + require, + ); + assert.equal(outputs["test-exit-code"], 17); + assert.match(failures[0], /exit code 17/); +}); diff --git a/tests/continuous-integration/workflow.test.js b/tests/continuous-integration/workflow.test.js index eee9d45a..bca98e1c 100644 --- a/tests/continuous-integration/workflow.test.js +++ b/tests/continuous-integration/workflow.test.js @@ -29,66 +29,63 @@ test("coverage collection defaults to enabled without selecting a provider", asy assert.equal(disabled.outputs.coverage, false); }); -test("custom components retain their report paths and stable labels", async () => { - const reports = [ - { file: "coverage/custom.xml", language: "TypeScript", label: "frontend" }, - ]; +test("custom components retain native report paths", async () => { const { outputs } = await runScript("prepare", "test-options", { - TEST_INPUT: JSON.stringify({ coverage: true, "coverage-reports": reports }), + TEST_INPUT: JSON.stringify({ + coverage: true, + "test-coverage": "native/coverage.xml", + "test-results": "native/junit.xml", + }), }); - assert.deepEqual(JSON.parse(outputs["coverage-reports"]), reports); + assert.equal(outputs["test-coverage"], "native/coverage.xml"); + assert.equal(outputs["test-results"], "native/junit.xml"); }); for (const options of [ { comment: false }, { "report-group": "tests" }, { coverage: "github" }, - { "coverage-reports": {} }, - { "coverage-source-sha": 42 }, + { "test-coverage": {} }, + { "source-sha": 42 }, ]) { test(`rejects retired or invalid report options ${JSON.stringify(options)}`, async () => { await assert.rejects( runScript("prepare", "test-options", { TEST_INPUT: JSON.stringify(options), }), - /Unknown test options|test\.(coverage|coverage-reports|coverage-source-sha)/, + /Unknown test options|test\.(coverage|test-coverage|source-sha)/, ); }); } -test("producer planning includes lint and merged tests without repeating shard executions", async () => { - const reports = [ - { file: "coverage/custom.xml", language: "TypeScript", label: "frontend" }, - ]; - const { outputs } = await runScript("prepare", "report-producers", { - CHECKS: "true", - LINT: "lint:ci", - TEST_ENABLED: "true", - COVERAGE: "true", - COVERAGE_REPORTS: JSON.stringify(reports), - DIRECTORY: "apps/web", - CONTAINER: "", - SOURCE_PREFIX: "", - }); - assert.equal(outputs.producers.length, 2); - assert.deepEqual( - Array.from(outputs.producers, (producer) => producer.key), - ["lint", "test"], +test("lint configuration rejects ambiguous options and respects disabled checks", async () => { + for (const input of ["", "false", "null"]) { + assert.equal( + ( + await runScript("prepare", "lint-options", { + CHECKS: "true", + LINT_INPUT: input, + }) + ).outputs["lint-enabled"], + false, + ); + } + assert.equal( + ( + await runScript("prepare", "lint-options", { + CHECKS: "true", + LINT_INPUT: '{"lint-results":"lint.sarif"}', + }) + ).outputs["lint-enabled"], + true, ); - assert.equal(outputs.producers[1].directory, "apps/web"); - assert.deepEqual( - JSON.parse(JSON.stringify(outputs.producers[1].coverage)), - reports, + await assert.rejects( + runScript("prepare", "lint-options", { + CHECKS: "true", + LINT_INPUT: '{"report-plan":"obsolete"}', + }), + /Unknown lint options/, ); - const disabled = await runScript("prepare", "report-producers", { - CHECKS: "false", - LINT: "lint:ci", - TEST_ENABLED: "true", - COVERAGE: "true", - DIRECTORY: ".", - CONTAINER: "", - }); - assert.equal(disabled.outputs.producers.length, 0); }); async function runScript(job, stepId, env = {}) { @@ -329,7 +326,7 @@ test("preserves container options, credentials and report path mappings", async assert.equal(result.outputs["container-username"], "user"); assert.equal( result.outputs["path-mapping"], - "/usr/src/app:application/frontend", + '{"/usr/src/app":"application/frontend"}', ); assert.equal(JSON.stringify(result.outputs).includes("test-password"), false); }); diff --git a/tests/npm/package.json b/tests/npm/package.json index c5dd0522..623f4c87 100644 --- a/tests/npm/package.json +++ b/tests/npm/package.json @@ -6,7 +6,7 @@ "lint": "echo \"lint test\"", "lint:ci": "echo \"lint:ci test\"", "build": "mkdir -p dist && echo \"build test\" > dist/test.txt", - "test:ci": "jest --coverage --coverageReporters=lcov --coverageReporters=cobertura --reporters=default --reporters=jest-junit" + "test:ci": "JEST_JUNIT_OUTPUT_DIR=\"$CI_REPORTS_DIR\" jest --coverage=\"$CI_TEST_COVERAGE\" --coverageDirectory=\"$CI_REPORTS_DIR/coverage\" --coverageReporters=lcov --reporters=default --reporters=jest-junit" }, "devDependencies": { "jest": "^30.5.2", @@ -17,8 +17,5 @@ }, "overrides": { "undici": ">=7.29.1" - }, - "jest-junit": { - "outputDirectory": "coverage" } } From 05981e2c0d4b82bd09d6154082ecdb004dd7d9f9 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 01:54:43 +0100 Subject: [PATCH 11/48] fix(reports): migrate internal release checks to the new producer contract --- .github/workflows/__test-release.yml | 16 ++--------- actions/package/restore/package.json | 4 +-- actions/release/finalize/package.json | 4 +-- actions/release/prepare/package.json | 4 +-- actions/release/verify/package.json | 4 +-- tests/continuous-integration/workflow.test.js | 28 +++++++++++++++++++ 6 files changed, 38 insertions(+), 22 deletions(-) diff --git a/.github/workflows/__test-release.yml b/.github/workflows/__test-release.yml index aba9c0f5..80e0bc3d 100644 --- a/.github/workflows/__test-release.yml +++ b/.github/workflows/__test-release.yml @@ -1,11 +1,7 @@ name: Internal - Tests for package and release actions on: - workflow_call: - outputs: - report-plan: - description: Complete plan for every package and release action in the matrix. - value: ${{ jobs.configuration.outputs.report-plan }} + workflow_call: {} permissions: {} jobs: @@ -22,12 +18,12 @@ jobs: packages: read pull-requests: write security-events: write + actions: read with: working-directory: actions/${{ matrix.action }} build: "" lint: "" test: '{"coverage":false}' - report-plan: ${{ toJSON(fromJSON(needs.configuration.outputs.selections)[matrix.key]) }} needs: configuration integration-tests: @@ -273,8 +269,6 @@ jobs: permissions: {} outputs: matrix: ${{ steps.actions.outputs.matrix }} - report-plan: ${{ steps.plan.outputs.report-plan }} - selections: ${{ steps.plan.outputs.selections }} steps: - id: actions uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -283,9 +277,3 @@ jobs: const actions=['package/restore','release/prepare','release/verify','release/finalize']; const matrix=actions.map(action=>({action,key:action.replaceAll('/','-')})); core.setOutput('matrix',matrix); - core.setOutput('producers',matrix.map(item=>({key:item.key,type:'test',directory:'actions/'+item.action,coverage:[]}))); - - id: plan - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@ea5900049a1704d6d2b479cc6cce37e799f532a3 # PR #683 (unreleased) - with: - operation: plan - producers: ${{ steps.actions.outputs.producers }} diff --git a/actions/package/restore/package.json b/actions/package/restore/package.json index cc85e667..6ef90454 100644 --- a/actions/package/restore/package.json +++ b/actions/package/restore/package.json @@ -4,8 +4,8 @@ "scripts": { "test": "node --test", "test:watch": "node --test --watch", - "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=coverage/junit.xml --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test", - "pretest:ci": "node -e \"require('node:fs').mkdirSync('coverage', { recursive: true })\"" + "test:ci": "coverage_flag=--experimental-test-coverage; if [ \"${CI_TEST_COVERAGE:-true}\" = false ]; then coverage_flag=--no-experimental-test-coverage; fi; node \"$coverage_flag\" --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=\"${CI_REPORTS_DIR:-coverage}/junit.xml\" --test-reporter=lcov --test-reporter-destination=\"${CI_REPORTS_DIR:-coverage}/coverage/lcov.info\" --test", + "pretest:ci": "node -e \"require('node:fs').mkdirSync((process.env.CI_REPORTS_DIR || 'coverage') + '/coverage', {recursive:true})\"" }, "devDependencies": { "@actions/exec": "^3.0.0" diff --git a/actions/release/finalize/package.json b/actions/release/finalize/package.json index ade56640..b7a5e8e5 100644 --- a/actions/release/finalize/package.json +++ b/actions/release/finalize/package.json @@ -4,8 +4,8 @@ "scripts": { "test": "node --test", "test:watch": "node --test --watch", - "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=coverage/junit.xml --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test", - "pretest:ci": "node -e \"require('node:fs').mkdirSync('coverage', { recursive: true })\"" + "test:ci": "coverage_flag=--experimental-test-coverage; if [ \"${CI_TEST_COVERAGE:-true}\" = false ]; then coverage_flag=--no-experimental-test-coverage; fi; node \"$coverage_flag\" --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=\"${CI_REPORTS_DIR:-coverage}/junit.xml\" --test-reporter=lcov --test-reporter-destination=\"${CI_REPORTS_DIR:-coverage}/coverage/lcov.info\" --test", + "pretest:ci": "node -e \"require('node:fs').mkdirSync((process.env.CI_REPORTS_DIR || 'coverage') + '/coverage', {recursive:true})\"" }, "devDependencies": { "@actions/glob": "^0.7.0" diff --git a/actions/release/prepare/package.json b/actions/release/prepare/package.json index 657eec94..93fca2c0 100644 --- a/actions/release/prepare/package.json +++ b/actions/release/prepare/package.json @@ -4,8 +4,8 @@ "scripts": { "test": "node --test", "test:watch": "node --test --watch", - "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=coverage/junit.xml --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test", - "pretest:ci": "node -e \"require('node:fs').mkdirSync('coverage', { recursive: true })\"" + "test:ci": "coverage_flag=--experimental-test-coverage; if [ \"${CI_TEST_COVERAGE:-true}\" = false ]; then coverage_flag=--no-experimental-test-coverage; fi; node \"$coverage_flag\" --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=\"${CI_REPORTS_DIR:-coverage}/junit.xml\" --test-reporter=lcov --test-reporter-destination=\"${CI_REPORTS_DIR:-coverage}/coverage/lcov.info\" --test", + "pretest:ci": "node -e \"require('node:fs').mkdirSync((process.env.CI_REPORTS_DIR || 'coverage') + '/coverage', {recursive:true})\"" }, "devDependencies": { "@actions/exec": "^3.0.0", diff --git a/actions/release/verify/package.json b/actions/release/verify/package.json index 69f22bb4..e953ac1d 100644 --- a/actions/release/verify/package.json +++ b/actions/release/verify/package.json @@ -4,7 +4,7 @@ "scripts": { "test": "node --test", "test:watch": "node --test --watch", - "test:ci": "node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=coverage/junit.xml --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test", - "pretest:ci": "node -e \"require('node:fs').mkdirSync('coverage', { recursive: true })\"" + "test:ci": "coverage_flag=--experimental-test-coverage; if [ \"${CI_TEST_COVERAGE:-true}\" = false ]; then coverage_flag=--no-experimental-test-coverage; fi; node \"$coverage_flag\" --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination=\"${CI_REPORTS_DIR:-coverage}/junit.xml\" --test-reporter=lcov --test-reporter-destination=\"${CI_REPORTS_DIR:-coverage}/coverage/lcov.info\" --test", + "pretest:ci": "node -e \"require('node:fs').mkdirSync((process.env.CI_REPORTS_DIR || 'coverage') + '/coverage', {recursive:true})\"" } } diff --git a/tests/continuous-integration/workflow.test.js b/tests/continuous-integration/workflow.test.js index bca98e1c..97582d94 100644 --- a/tests/continuous-integration/workflow.test.js +++ b/tests/continuous-integration/workflow.test.js @@ -557,3 +557,31 @@ test("merging runs after successful or failed shards but not cancellation or ski assert.equal(canRun("test-merge", { shards: 2, cancelled: true }), false); assert.equal(canRun("test-merge", { shards: 2, prepare: "failure" }), false); }); + +test("local reusable workflow callers only supply supported inputs and sufficient permissions", async () => { + const { readdirSync } = await import("node:fs"); + const ranks = { none: 0, read: 1, write: 2 }; + for (const file of readdirSync( + new URL(".github/workflows/", repository), + ).filter((file) => file.endsWith(".yml"))) { + const caller = readYaml(`.github/workflows/${file}`); + for (const [name, job] of Object.entries(caller.jobs || {})) { + if (!job.uses?.startsWith("$/.github/workflows/")) continue; + const callee = readYaml(job.uses.slice(2)); + const inputs = callee.on.workflow_call?.inputs || {}; + for (const input of Object.keys(job.with || {})) + assert.ok( + input in inputs, + `${file}:${name} supplies retired input ${input}`, + ); + for (const child of Object.values(callee.jobs)) { + for (const [scope, level] of Object.entries(child.permissions || {})) { + assert.ok( + (ranks[job.permissions?.[scope]] || 0) >= ranks[level], + `${file}:${name} must grant ${scope}: ${level} to ${job.uses}`, + ); + } + } + } + } +}); From 02010a44c2029aff6e6f0a22b3cf0eaadaca12e9 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 02:11:21 +0100 Subject: [PATCH 12/48] fix(reports): prepare container fixtures for verified source reporting --- .github/workflows/continuous-integration.md | 4 ++-- .github/workflows/continuous-integration.yml | 2 +- actions/test/README.md | 4 ++-- actions/test/action.yml | 2 +- tests/continuous-integration/sharding.test.js | 9 ++++++++- tests/npm/Dockerfile | 3 ++- 6 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/continuous-integration.md b/.github/workflows/continuous-integration.md index 8baeae72..6317dcc8 100644 --- a/.github/workflows/continuous-integration.md +++ b/.github/workflows/continuous-integration.md @@ -40,7 +40,7 @@ Lint and tests default to annotations. Coverage defaults to GitHub when available, then a PR comment or summary. Select destinations once using lint-reporters, test-results-reporters and test-coverage-reporters. -Prebuilt containers require a checkout for report source verification and +Prebuilt CI containers must include Git. They require a checkout for source verification and test.source-sha plus test.source-prefix identifying the tested source. ### Permissions @@ -65,7 +65,7 @@ on: permissions: {} jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@35b4839d14f5abf7ce8426d8a5d718170a971ee6 # feat/native-github-coverage + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@05981e2c0d4b82bd09d6154082ecdb004dd7d9f9 # feat/native-github-coverage permissions: actions: read contents: read diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index e330aa57..aeb322de 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -16,7 +16,7 @@ # available, then a PR comment or summary. Select destinations once using # lint-reporters, test-results-reporters and test-coverage-reporters. -# Prebuilt containers require a checkout for report source verification and +# Prebuilt CI containers must include Git. They require a checkout for source verification and # test.source-sha plus test.source-prefix identifying the tested source. name: Node.js Continuous Integration diff --git a/actions/test/README.md b/actions/test/README.md index 0692d280..06d3c9cf 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -27,7 +27,7 @@ Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write required reports there; stale files in the project cannot satisfy the contract. Missing or malformed reports fail even after a successful command. Available diagnostics are retained after failures. Call common ci-reports once after all checks. -Producer jobs require actions: read and contents: read, with source checked out. +Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). CI_TEST_COVERAGE indicates whether to instrument tests. Default reports are JUnit and LCOV; configure different native paths with test-results and test-coverage. @@ -37,7 +37,7 @@ and LCOV; configure different native paths with test-results and test-coverage. ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@35b4839d14f5abf7ce8426d8a5d718170a971ee6 # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@05981e2c0d4b82bd09d6154082ecdb004dd7d9f9 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/test/action.yml b/actions/test/action.yml index b8878985..088c0d48 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -6,7 +6,7 @@ description: | required reports there; stale files in the project cannot satisfy the contract. Missing or malformed reports fail even after a successful command. Available diagnostics are retained after failures. Call common ci-reports once after all checks. - Producer jobs require actions: read and contents: read, with source checked out. + Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). CI_TEST_COVERAGE indicates whether to instrument tests. Default reports are JUnit and LCOV; configure different native paths with test-results and test-coverage. author: hoverkraft diff --git a/tests/continuous-integration/sharding.test.js b/tests/continuous-integration/sharding.test.js index 25a68bce..0b97ca26 100644 --- a/tests/continuous-integration/sharding.test.js +++ b/tests/continuous-integration/sharding.test.js @@ -197,7 +197,14 @@ test("real Vitest merging preserves inventory, coverage, thresholds and failed t ], { cwd: project, - env: { ...process.env, CI: "true", CI_TEST_SHARD: "", ...env }, + env: { + ...process.env, + CI: "true", + CI_TEST_SHARD: "", + CI_REPORTS_DIR: "", + CI_TEST_COVERAGE: "true", + ...env, + }, encoding: "utf8", timeout: 30_000, }, diff --git a/tests/npm/Dockerfile b/tests/npm/Dockerfile index 87e4ad52..48afb7fa 100644 --- a/tests/npm/Dockerfile +++ b/tests/npm/Dockerfile @@ -1,4 +1,5 @@ -FROM node:24.14-bookworm-slim AS base +# CI needs Git to verify the checked-out revision used by native reports. +FROM node:24.14-bookworm AS base USER 1000:1000 WORKDIR /usr/src/app From 277d184953d7a515fe4271eb0532eebc53d6e214 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 02:12:21 +0100 Subject: [PATCH 13/48] docs(reports): clarify Git prerequisite for container lint jobs --- actions/lint/README.md | 4 ++-- actions/lint/action.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actions/lint/README.md b/actions/lint/README.md index 48809f94..312bb8c3 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -27,7 +27,7 @@ Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write required reports there; stale files in the project cannot satisfy the contract. Missing or malformed reports fail even after a successful command. Available diagnostics are retained after failures. Call common ci-reports once after all checks. -Producer jobs require actions: read and contents: read, with source checked out. +Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). @@ -35,7 +35,7 @@ Producer jobs require actions: read and contents: read, with source checked out. ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@35b4839d14f5abf7ce8426d8a5d718170a971ee6 # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@05981e2c0d4b82bd09d6154082ecdb004dd7d9f9 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 30dd4a15..1b0adb9f 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -6,7 +6,7 @@ description: | required reports there; stale files in the project cannot satisfy the contract. Missing or malformed reports fail even after a successful command. Available diagnostics are retained after failures. Call common ci-reports once after all checks. - Producer jobs require actions: read and contents: read, with source checked out. + Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). author: hoverkraft branding: icon: check-circle From 53228ab72adc313cdd16dda836048bc87d27de90 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 02:25:52 +0100 Subject: [PATCH 14/48] fix(reports): consume container-safe source verification --- .github/workflows/__shared-ci.yml | 4 ++-- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index caf1e192..3de20f52 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@ea5900049a1704d6d2b479cc6cce37e799f532a3 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-action-test - test-action-lint if: ${{ !cancelled() }} - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@ea5900049a1704d6d2b479cc6cce37e799f532a3 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # PR #683 (unreleased) permissions: contents: read pull-requests: write diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 1b0adb9f..65fcab61 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@ea5900049a1704d6d2b479cc6cce37e799f532a3 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@ea5900049a1704d6d2b479cc6cce37e799f532a3 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # unified reports (PR #683, unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index 088c0d48..7b440a59 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -186,7 +186,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@ea5900049a1704d6d2b479cc6cce37e799f532a3 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -279,7 +279,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@ea5900049a1704d6d2b479cc6cce37e799f532a3 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # unified reports (PR #683, unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} From f3dbc0a49f10ca459112808a1cc31b8f4d1fbe8c Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 15:55:30 +0100 Subject: [PATCH 15/48] feat(test): use combined native Vitest and Jest reports --- .github/workflows/__shared-ci.yml | 4 +- .github/workflows/__test-action-test.yml | 1 + ...__test-workflow-continuous-integration.yml | 12 +-- .github/workflows/continuous-integration.yml | 11 +-- actions/lint/action.yml | 4 +- actions/test/action.yml | 25 ++++--- docs/README.md | 2 + docs/usage/test-reports.md | 75 +++++++++++++++++++ .../fixtures/vitest.config.mjs | 7 +- tests/continuous-integration/sharding.test.js | 70 ++++++++++++++--- tests/continuous-integration/workflow.test.js | 8 +- tests/npm/package-lock.json | 51 ------------- tests/npm/package.json | 5 +- 13 files changed, 181 insertions(+), 94 deletions(-) create mode 100644 docs/usage/test-reports.md diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 3de20f52..32147fc3 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@4e18f19c4e4de697daa47d2551bb255e85ba7558 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-action-test - test-action-lint if: ${{ !cancelled() }} - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@4e18f19c4e4de697daa47d2551bb255e85ba7558 # PR #683 (unreleased) permissions: contents: read pull-requests: write diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 4d5f76dd..9a153dc1 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -44,6 +44,7 @@ jobs: working-directory: report-fixture command: test:ci coverage: "true" + test-results: junit.xml test-coverage: lcov.info - name: Assert - Retrieve reports even after a failed test if: steps.test.outputs.report-artifact-id != '' diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index c98b0d6f..6ae1363b 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -68,13 +68,13 @@ jobs: script: | const assert = require('node:assert/strict'); const fs = require('node:fs'); - const files = await (await glob.create('merged-reports/**/junit.xml', {matchDirectories:false})).glob(); + const files = await (await glob.create('merged-reports/**/results.json', {matchDirectories:false})).glob(); const merged = files.filter(file => fs.readFileSync(file, 'utf8').includes('enabled answer') && fs.readFileSync(file, 'utf8').includes('disabled answer')); - assert.equal(merged.length, 2, 'Retain one complete merged JUnit from the host and the container'); + assert.equal(merged.length, 2, 'Retain one complete merged JSON report from the host and the container'); for (const file of merged) { - const junit = fs.readFileSync(file, 'utf8'); - assert.equal((junit.match(/ 256) { throw new Error('test.shards must be an integer from 1 to 256.'); } + core.setOutput('test-coverage', testOptions['test-coverage'] || (shards > 1 ? 'coverage/lcov.info' : testOptions['test-results'] || 'results.json')); const args = testOptions.arguments === undefined ? [] : testOptions.arguments; if (!Array.isArray(args) || args.some(arg => typeof arg !== 'string' || arg.includes('\0'))) { throw new Error('test.arguments must be an array of strings without null bytes.'); @@ -316,7 +317,7 @@ jobs: core.setOutput('arguments', args); core.setOutput('merge-command', testOptions['merge-command'] || testOptions.command || 'test:ci'); core.setOutput('coverage', testOptions.coverage ); - core.setOutput('test-results', testOptions['test-results'] || 'junit.xml'); + core.setOutput('test-results', testOptions['test-results'] || 'results.json'); core.setOutput('command', testOptions.command || 'test:ci'); - id: package-config diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 65fcab61..48f4a994 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4e18f19c4e4de697daa47d2551bb255e85ba7558 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4e18f19c4e4de697daa47d2551bb255e85ba7558 # unified reports (PR #683, unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index 7b440a59..a6849fa6 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -7,8 +7,10 @@ description: | Missing or malformed reports fail even after a successful command. Available diagnostics are retained after failures. Call common ci-reports once after all checks. Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). - CI_TEST_COVERAGE indicates whether to instrument tests. Default reports are JUnit - and LCOV; configure different native paths with test-results and test-coverage. + CI_TEST_COVERAGE indicates whether to instrument tests. By default, results.json + supplies both test results and coverage using native Vitest or Jest JSON. Set + test-results and test-coverage to separate paths for runners such as node:test. + See the [native test report guide](../../docs/usage/test-reports.md) for runner and shard configuration. author: hoverkraft branding: icon: check-square @@ -33,7 +35,7 @@ inputs: default: "false" command: description: |- - npm/pnpm/Yarn script to run. Write JUnit or TAP into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. For Vitest, use --outputFile.junit="$CI_REPORTS_DIR/junit.xml" and --coverage.reportsDirectory="$CI_REPORTS_DIR/coverage". + npm/pnpm/Yarn script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. Vitest uses --reporter=json --outputFile.json="$CI_REPORTS_DIR/results.json"; Jest uses --json --outputFile="$CI_REPORTS_DIR/results.json". Both include coverageMap when instrumented. Preserve Vitest coverage on failure with coverage.reportOnFailure. JUnit and TAP remain supported for other runners. required: false default: "test:ci" coverage: @@ -49,7 +51,7 @@ inputs: Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload after tests, including failures. Individual reporting is disabled for shards. - Use reporter-specific --outputFile.junit rather than scalar --outputFile in the package script. + Use reporter-specific --outputFile.json rather than scalar --outputFile in the package script. Keep coverage collection enabled; defer configured coverage thresholds to the merge when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. default: "" @@ -78,11 +80,11 @@ inputs: description: Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. default: "" test-results: - description: Required native report paths relative to CI_REPORTS_DIR, one per line. - default: junit.xml + description: Required native test report paths relative to CI_REPORTS_DIR, one per line. A combined JSON report can also supply coverage. + default: results.json test-coverage: - description: Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Merge coverage shards in the framework first. - default: coverage/lcov.info + description: Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Defaults to test-results for combined JSON, or coverage/lcov.info when merging Vitest shards. Vitest shard merging emits coverage separately; enable lcovonly when CI_TEST_MERGE is true. + default: "" outputs: report-artifact-id: @@ -172,7 +174,7 @@ runs: PATH_MAPPING: ${{ inputs.path-mapping }} RESULTS: ${{ inputs.test-results }} COVERAGE: ${{ inputs.coverage }} - COVERAGE_PATHS: ${{ inputs.test-coverage }} + COVERAGE_PATHS: ${{ inputs.test-coverage || (inputs.merge-shards != '' && 'coverage/lcov.info' || inputs.test-results) }} MERGE_SHARDS: ${{ inputs.merge-shards }} with: script: | @@ -186,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4e18f19c4e4de697daa47d2551bb255e85ba7558 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -216,6 +218,7 @@ runs: SHARDS_FAILED: ${{ steps.validate-shards.outputs.failed }} CI_REPORTS_DIR: ${{ steps.prepare-reports.outputs.report-directory || steps.prepare-test.outputs.directory }} CI_TEST_COVERAGE: ${{ inputs.coverage }} + CI_TEST_MERGE: ${{ inputs.merge-shards != '' && 'true' || 'false' }} with: script: | const workingDirectory = process.env.WORKING_DIRECTORY; @@ -279,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@aa3aca87ac5b96b6de18991b8fdc6b1da85ba136 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4e18f19c4e4de697daa47d2551bb255e85ba7558 # unified reports (PR #683, unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/docs/README.md b/docs/README.md index fc9199da..c0c620a7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,5 +1,7 @@ # Documentation +- [Native test reports](usage/test-reports.md) + - [Maintain dependency updates](development/dependency-updates.md) - [Release orchestration decision](adr/0001-release-orchestration.md) - [Lightweight CI preparation decision](adr/0002-lightweight-ci-preparation.md) diff --git a/docs/usage/test-reports.md b/docs/usage/test-reports.md new file mode 100644 index 00000000..4ff50620 --- /dev/null +++ b/docs/usage/test-reports.md @@ -0,0 +1,75 @@ +# Native test reports + +The test action provides a fresh `CI_REPORTS_DIR` and sets `CI_TEST_COVERAGE`. +Write reports during that invocation. By default, native Vitest or Jest +`results.json` supplies both detailed test outcomes and coverage. Missing +requested coverage fails validation; tests remain available for diagnosis. +The final common `ci-reports` workflow publishes the collected results once. + +## Vitest + +Use the built-in JSON reporter and the coverage provider already configured by +the project. For example, a `test:ci` package script can run: + +```sh +vitest run --reporter=default --reporter=json \ + --outputFile.json="${CI_REPORTS_DIR:-.reports}/results.json" \ + --coverage.enabled="${CI_TEST_COVERAGE:-true}" \ + --coverage.reporter=text --coverage.reportOnFailure=true +``` + +The JSON contains assertion results and the final Istanbul coverage map. +Keep coverage inclusion, exclusions and thresholds in the project's Vitest +configuration. Other runtimes run with `CI_TEST_COVERAGE=false` while retaining +their detailed tests in the same JSON format. + +## Jest + +Use Jest's built-in JSON output. No extra test reporter package is required: + +```sh +jest --json --outputFile="${CI_REPORTS_DIR:-.reports}/results.json" \ + --coverage="${CI_TEST_COVERAGE:-true}" --coverageReporters=text +``` + +The test action validates the assertions and final coverage map independently +and retains the native file once. Coverage publication generates only the +destination's required representation. + +## Vitest shards + +The action sets `CI_TEST_SHARD` during shard execution and `CI_TEST_MERGE=true` +during native merging. Vitest's merge lifecycle emits JSON before merging +coverage. Enable a separate coverage reporter for that final invocation: + +```js +coverage: { + enabled: process.env.CI_TEST_COVERAGE !== "false", + reporter: process.env.CI_TEST_MERGE === "true" + ? ["text", "lcovonly"] + : ["text"], + reportsDirectory: `${process.env.CI_REPORTS_DIR || ".reports"}/coverage`, + reportOnFailure: true, +} +``` + +Merged test results default to `results.json` and coverage to `coverage/lcov.info`. +Keep reporter-specific `outputFile.json` configuration, since the action adds +`outputFile.blob` for shards. Defer coverage thresholds during shard execution +and enforce the original thresholds during merging. The action checks the +complete shard set and retains failed shard outcomes. + +## Other runners + +Keep separate native reports when the runner needs them. For `node:test`, use +JUnit and LCOV and configure the existing inputs: + +```yaml +test-results: junit.xml +test-coverage: coverage/lcov.info +``` + +For the reusable continuous-integration workflow, supply those paths inside +its `test` JSON object. Coverage can be disabled without removing detailed test +results. Test and coverage publication destinations remain independent of the +number of native files. diff --git a/tests/continuous-integration/fixtures/vitest.config.mjs b/tests/continuous-integration/fixtures/vitest.config.mjs index 2db8d2c9..13836696 100644 --- a/tests/continuous-integration/fixtures/vitest.config.mjs +++ b/tests/continuous-integration/fixtures/vitest.config.mjs @@ -3,15 +3,16 @@ import { defineConfig } from "vitest/config"; export default defineConfig({ test: { include: ["fixtures/vitest/*.fixture.js"], - reporters: ["default", "junit"], + reporters: ["default", "json"], outputFile: { - junit: `${process.env.CI_REPORTS_DIR || "coverage/sharding"}/junit.xml`, + json: `${process.env.CI_REPORTS_DIR || "coverage/sharding"}/results.json`, }, coverage: { enabled: process.env.CI_TEST_COVERAGE !== "false", provider: "v8", include: ["fixtures/vitest/source.js"], - reporter: ["lcov", "json-summary"], + reporter: + process.env.CI_TEST_MERGE === "true" ? ["text", "lcovonly"] : ["text"], reportsDirectory: process.env.CI_REPORTS_DIR ? `${process.env.CI_REPORTS_DIR}/coverage` : "coverage/sharding", diff --git a/tests/continuous-integration/sharding.test.js b/tests/continuous-integration/sharding.test.js index 0b97ca26..6c991ab3 100644 --- a/tests/continuous-integration/sharding.test.js +++ b/tests/continuous-integration/sharding.test.js @@ -191,8 +191,8 @@ test("real Vitest merging preserves inventory, coverage, thresholds and failed t "--config", "fixtures/vitest.config.mjs", "--reporter=default", - "--reporter=junit", - "--outputFile.junit=coverage/sharding/junit.xml", + "--reporter=json", + "--outputFile.json=coverage/sharding/results.json", ...args, ], { @@ -201,6 +201,9 @@ test("real Vitest merging preserves inventory, coverage, thresholds and failed t ...process.env, CI: "true", CI_TEST_SHARD: "", + CI_TEST_MERGE: args.some((arg) => arg.startsWith("--merge-reports=")) + ? "true" + : "false", CI_REPORTS_DIR: "", CI_TEST_COVERAGE: "true", ...env, @@ -212,16 +215,63 @@ test("real Vitest merging preserves inventory, coverage, thresholds and failed t const assertSuccess = (result) => assert.equal(result.status, 0, `${result.stdout}\n${result.stderr}`); const report = () => - fs.readFileSync(path.join(project, "coverage/sharding/junit.xml"), "utf8"); - const coverage = () => JSON.parse( fs.readFileSync( - path.join(project, "coverage/sharding/coverage-summary.json"), + path.join(project, "coverage/sharding/results.json"), + "utf8", ), - ).total; + ); + const coverage = () => { + const combined = report().coverageMap; + const count = (hits) => ({ + total: hits.length, + covered: hits.filter((hit) => hit > 0).length, + }); + if (combined) { + const lines = new Map(); + for (const [source, file] of Object.entries(combined)) + for (const [id, location] of Object.entries(file.statementMap)) { + const key = `${source}:${location.start.line}`; + lines.set(key, lines.get(key) || file.s[id] > 0); + } + return { + lines: [...lines].sort(), + functions: count( + Object.values(combined).flatMap((file) => Object.values(file.f)), + ), + branches: count( + Object.values(combined).flatMap((file) => + Object.values(file.b).flat(), + ), + ), + }; + } + const lcov = fs.readFileSync( + path.join(project, "coverage/sharding/lcov.info"), + "utf8", + ); + const lines = [...lcov.matchAll(/^DA:(\d+),(\d+)$/gm)]; + const source = lcov.match(/^SF:(.+)$/m)[1]; + return { + lines: lines + .map((line) => [ + `${path.resolve(project, source)}:${line[1]}`, + Number(line[2]) > 0, + ]) + .sort(), + functions: count( + [...lcov.matchAll(/^FNDA:(\d+),/gm)].map((match) => Number(match[1])), + ), + branches: count( + [...lcov.matchAll(/^BRDA:[^,]+,[^,]+,[^,]+,([^\r\n]+)/gm)].map( + (match) => Number(match[1]) || 0, + ), + ), + }; + }; assertSuccess(run([])); const baselineCoverage = coverage(); - assert.equal((report().match(/ { const shard = new TestShards({ ...configuration, shard: `${index}/2` }); assertSuccess(run(shard.prepare([]), { CI_TEST_SHARD: `${index}/2` })); @@ -235,7 +285,7 @@ test("real Vitest merging preserves inventory, coverage, thresholds and failed t }); assert.equal(merger.validate(), false); assertSuccess(run([`--merge-reports=${merger.blobs}`])); - assert.equal((report().match(/ shard: [1, 2], }); assert.equal(first.outputs.shards, 2); + assert.equal(first.outputs["test-coverage"], "coverage/lcov.info"); assert.equal(first.outputs["merge-command"], "test:merge"); assert.notEqual(first.outputs.group, second.outputs.group); assert.deepEqual(Array.from(first.outputs.arguments), [ "--config", "config with spaces.js", ]); - const defaults = await runScript("prepare", "test-options"); + const defaults = await runScript("prepare", "test-options", { + TEST_INPUT: '{"shards":1,"test-results":"custom.json"}', + }); assert.equal(defaults.outputs.shards, 1); + assert.equal(defaults.outputs["test-coverage"], "custom.json"); assert.equal(defaults.outputs.group, ""); assert.equal(defaults.outputs["merge-command"], defaults.outputs.command); }); diff --git a/tests/npm/package-lock.json b/tests/npm/package-lock.json index 85f9f7a4..d386d669 100644 --- a/tests/npm/package-lock.json +++ b/tests/npm/package-lock.json @@ -9,7 +9,6 @@ "version": "0.1.0", "devDependencies": { "jest": "^30.5.2", - "jest-junit": "17.0.0", "nx": "^24.0.6", "prettier": "^3.10.1", "storybook": "^10.6.7" @@ -5553,22 +5552,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/jest-junit": { - "version": "17.0.0", - "resolved": "https://registry.npmjs.org/jest-junit/-/jest-junit-17.0.0.tgz", - "integrity": "sha512-RYWCkq4j59gUXj5DsgbIE7xFBZzu1gtibPhyjSjMmGaOTLnqlXhg7x9zuGCwgbCuMAyoyvk0Mi8wSrRR5uOeLA==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "mkdirp": "^1.0.4", - "strip-ansi": "^6.0.1", - "uuid": "^14.0.0", - "xml": "^1.0.1" - }, - "engines": { - "node": ">=20.0.0" - } - }, "node_modules/jest-leak-detector": { "version": "30.5.1", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.5.1.tgz", @@ -6086,19 +6069,6 @@ "node": ">=16 || 14 >=14.17" } }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "license": "MIT", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", @@ -7634,20 +7604,6 @@ "dev": true, "license": "MIT" }, - "node_modules/uuid": { - "version": "14.0.3", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-14.0.3.tgz", - "integrity": "sha512-Sc5u1VVln93y1Xnz4R+CunOZc7R9LUcTmhj7Rc7Eg3HVcf7rVn2FOoa812fe0W8p3jD7xeoGSYbfqCGGH2B6xw==", - "dev": true, - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist-node/bin/uuid" - } - }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -7771,13 +7727,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/xml": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", - "integrity": "sha512-huCv9IH9Tcf95zuYCsQraZtWnJvBtLVE0QHMOs8bWyZAFZNDcYjsPq1nEx8jKA9y+Beo9v+7OBPRisQTjinQMw==", - "dev": true, - "license": "MIT" - }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/tests/npm/package.json b/tests/npm/package.json index 623f4c87..9be9a0b5 100644 --- a/tests/npm/package.json +++ b/tests/npm/package.json @@ -6,14 +6,13 @@ "lint": "echo \"lint test\"", "lint:ci": "echo \"lint:ci test\"", "build": "mkdir -p dist && echo \"build test\" > dist/test.txt", - "test:ci": "JEST_JUNIT_OUTPUT_DIR=\"$CI_REPORTS_DIR\" jest --coverage=\"$CI_TEST_COVERAGE\" --coverageDirectory=\"$CI_REPORTS_DIR/coverage\" --coverageReporters=lcov --reporters=default --reporters=jest-junit" + "test:ci": "jest --coverage=\"${CI_TEST_COVERAGE:-true}\" --coverageReporters=text --reporters=default --json --outputFile=\"${CI_REPORTS_DIR:-.reports}/results.json\"" }, "devDependencies": { "jest": "^30.5.2", "nx": "^24.0.6", "prettier": "^3.10.1", - "storybook": "^10.6.7", - "jest-junit": "17.0.0" + "storybook": "^10.6.7" }, "overrides": { "undici": ">=7.29.1" From 585a4ac8e9eecc51af86ebff0b554e100209c108 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 15:56:27 +0100 Subject: [PATCH 16/48] docs(test): regenerate combined report defaults --- .github/workflows/continuous-integration.md | 11 +-- actions/test/README.md | 83 +++++++++++---------- 2 files changed, 48 insertions(+), 46 deletions(-) diff --git a/.github/workflows/continuous-integration.md b/.github/workflows/continuous-integration.md index 6317dcc8..c90189f8 100644 --- a/.github/workflows/continuous-integration.md +++ b/.github/workflows/continuous-integration.md @@ -27,9 +27,10 @@ Workflow to run Node.js checks, builds and package validation. One CI reporting boundary Commands write their declared native outputs into CI_REPORTS_DIR. -Test results default to junit.xml, coverage to coverage/lcov.info and lint to +Test results and coverage default to the same native results.json; lint defaults to lint.sarif. Configure test-results, test-coverage or lint-results beside the -corresponding command when its native output differs. Merge shards natively. +command when a runner needs separate files. See [native test reports](../../docs/usage/test-reports.md). +Merge shards natively; their coverage output remains separate. Call common ci-reports.yml once after all producer jobs with job-results: toJSON(needs). No report plans or artifact IDs need forwarding. @@ -65,7 +66,7 @@ on: permissions: {} jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@05981e2c0d4b82bd09d6154082ecdb004dd7d9f9 # feat/native-github-coverage + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@f3dbc0a49f10ca459112808a1cc31b8f4d1fbe8c # feat/native-github-coverage permissions: actions: read contents: read @@ -185,7 +186,7 @@ jobs: # Default: `true` dependency-review: true - # Test options: command (default test:ci), arguments, coverage (boolean, default true), test-results (default junit.xml), test-coverage (default coverage/lcov.info), shards and merge-command. Paths are relative to CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. + # Test options: command (default test:ci), arguments, coverage (boolean, default true), test-results (default results.json), test-coverage (defaults to test-results, or coverage/lcov.info for Vitest shard merging), shards and merge-command. Paths are relative to CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. # Default: `true` test: "true" @@ -301,7 +302,7 @@ jobs: | **`dependency-review`** | Enable dependency review scan. | **false** | **boolean** | `true` | | | Works with public repositories and private repositories with a GitHub Advanced Security license. | | | | | | See . | | | | -| **`test`** | Test options: command (default test:ci), arguments, coverage (boolean, default true), test-results (default junit.xml), test-coverage (default coverage/lcov.info), shards and merge-command. Paths are relative to CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. | **false** | **string** | `true` | +| **`test`** | Test options: command (default test:ci), arguments, coverage (boolean, default true), test-results (default results.json), test-coverage (defaults to test-results, or coverage/lcov.info for Vitest shard merging), shards and merge-command. Paths are relative to CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. | **false** | **string** | `true` | | **`working-directory`** | Working directory where dependencies and application commands run. | **false** | **string** | `.` | | | Relative paths resolve against the workspace of each application job. | | | | | | Directory existence and non-container workspace boundaries are validated in those jobs. | | | | diff --git a/actions/test/README.md b/actions/test/README.md index 06d3c9cf..5fd063cd 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -28,8 +28,10 @@ required reports there; stale files in the project cannot satisfy the contract. Missing or malformed reports fail even after a successful command. Available diagnostics are retained after failures. Call common ci-reports once after all checks. Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). -CI_TEST_COVERAGE indicates whether to instrument tests. Default reports are JUnit -and LCOV; configure different native paths with test-results and test-coverage. +CI_TEST_COVERAGE indicates whether to instrument tests. By default, results.json +supplies both test results and coverage using native Vitest or Jest JSON. Set +test-results and test-coverage to separate paths for runners such as node:test. +See the [native test report guide](../../docs/usage/test-reports.md) for runner and shard configuration. @@ -37,7 +39,7 @@ and LCOV; configure different native paths with test-results and test-coverage. ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@05981e2c0d4b82bd09d6154082ecdb004dd7d9f9 # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@f3dbc0a49f10ca459112808a1cc31b8f4d1fbe8c # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -56,7 +58,7 @@ and LCOV; configure different native paths with test-results and test-coverage. # Default: `false` container: "false" - # npm/pnpm/Yarn script to run. Write JUnit or TAP into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. For Vitest, use --outputFile.junit="$CI_REPORTS_DIR/junit.xml" and --coverage.reportsDirectory="$CI_REPORTS_DIR/coverage". + # npm/pnpm/Yarn script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. Vitest uses --reporter=json --outputFile.json="$CI_REPORTS_DIR/results.json"; Jest uses --json --outputFile="$CI_REPORTS_DIR/results.json". Both include coverageMap when instrumented. Preserve Vitest coverage on failure with coverage.reportOnFailure. JUnit and TAP remain supported for other runners. # Default: `test:ci` command: test:ci @@ -73,7 +75,7 @@ and LCOV; configure different native paths with test-results and test-coverage. # Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. # Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload # after tests, including failures. Individual reporting is disabled for shards. - # Use reporter-specific --outputFile.junit rather than scalar --outputFile in the package script. + # Use reporter-specific --outputFile.json rather than scalar --outputFile in the package script. # Keep coverage collection enabled; defer configured coverage thresholds to the merge # when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. shard: "" @@ -98,13 +100,12 @@ and LCOV; configure different native paths with test-results and test-coverage. # Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. source-prefix: "" - # Required native report paths relative to CI_REPORTS_DIR, one per line. - # Default: `junit.xml` - test-results: junit.xml + # Required native test report paths relative to CI_REPORTS_DIR, one per line. A combined JSON report can also supply coverage. + # Default: `results.json` + test-results: results.json - # Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Merge coverage shards in the framework first. - # Default: `coverage/lcov.info` - test-coverage: coverage/lcov.info + # Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Defaults to test-results for combined JSON, or coverage/lcov.info when merging Vitest shards. Vitest shard merging emits coverage separately; enable lcovonly when CI_TEST_MERGE is true. + test-coverage: "" ``` @@ -112,36 +113,36 @@ and LCOV; configure different native paths with test-results and test-coverage. ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------------- | -| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | -| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | -| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | -| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | -| | Can be absolute or relative to the repository root. | | | -| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | -| **`command`** | npm/pnpm/Yarn script to run. Write JUnit or TAP into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. For Vitest, use --outputFile.junit="$CI_REPORTS_DIR/junit.xml" and --coverage.reportsDirectory="$CI_REPORTS_DIR/coverage". | **false** | `test:ci` | -| **`coverage`** | Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. | **false** | `true` | -| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | -| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | -| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | -| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | -| | after tests, including failures. Individual reporting is disabled for shards. | | | -| | Use reporter-specific --outputFile.junit rather than scalar --outputFile in the package script. | | | -| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | -| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | -| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | -| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | -| | All shards and their merge must use the same group and absolute project directory. | | | -| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | -| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | -| | The package script must enable final reporters and original coverage thresholds. | | | -| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | -| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | -| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | -| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | -| **`test-results`** | Required native report paths relative to CI_REPORTS_DIR, one per line. | **false** | `junit.xml` | -| **`test-coverage`** | Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Merge coverage shards in the framework first. | **false** | `coverage/lcov.info` | +| **Input** | **Description** | **Required** | **Default** | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------- | +| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | +| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | +| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | +| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | +| | Can be absolute or relative to the repository root. | | | +| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | +| **`command`** | npm/pnpm/Yarn script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. Vitest uses --reporter=json --outputFile.json="$CI_REPORTS_DIR/results.json"; Jest uses --json --outputFile="$CI_REPORTS_DIR/results.json". Both include coverageMap when instrumented. Preserve Vitest coverage on failure with coverage.reportOnFailure. JUnit and TAP remain supported for other runners. | **false** | `test:ci` | +| **`coverage`** | Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. | **false** | `true` | +| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | +| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | +| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | +| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | +| | after tests, including failures. Individual reporting is disabled for shards. | | | +| | Use reporter-specific --outputFile.json rather than scalar --outputFile in the package script. | | | +| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | +| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | +| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | +| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | +| | All shards and their merge must use the same group and absolute project directory. | | | +| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | +| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | +| | The package script must enable final reporters and original coverage thresholds. | | | +| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | +| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | +| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | +| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | +| **`test-results`** | Required native test report paths relative to CI_REPORTS_DIR, one per line. A combined JSON report can also supply coverage. | **false** | `results.json` | +| **`test-coverage`** | Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Defaults to test-results for combined JSON, or coverage/lcov.info when merging Vitest shards. Vitest shard merging emits coverage separately; enable lcovonly when CI_TEST_MERGE is true. | **false** | - | From c87829fa8b0658a28473f8499ed4234b4a2c7cee Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 15:58:43 +0100 Subject: [PATCH 17/48] fix(test): preserve node test release reports and concise usage --- .github/workflows/__shared-ci.yml | 4 ++-- .github/workflows/__test-release.yml | 2 +- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 32147fc3..459b30d6 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@4e18f19c4e4de697daa47d2551bb255e85ba7558 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@26c25ffc7f5d804a40c446cdd6977a789806cddd # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-action-test - test-action-lint if: ${{ !cancelled() }} - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@4e18f19c4e4de697daa47d2551bb255e85ba7558 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@26c25ffc7f5d804a40c446cdd6977a789806cddd # PR #683 (unreleased) permissions: contents: read pull-requests: write diff --git a/.github/workflows/__test-release.yml b/.github/workflows/__test-release.yml index 80e0bc3d..ad71b2fa 100644 --- a/.github/workflows/__test-release.yml +++ b/.github/workflows/__test-release.yml @@ -23,7 +23,7 @@ jobs: working-directory: actions/${{ matrix.action }} build: "" lint: "" - test: '{"coverage":false}' + test: '{"coverage":false,"test-results":"junit.xml"}' needs: configuration integration-tests: diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 48f4a994..308de12e 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4e18f19c4e4de697daa47d2551bb255e85ba7558 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@26c25ffc7f5d804a40c446cdd6977a789806cddd # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4e18f19c4e4de697daa47d2551bb255e85ba7558 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@26c25ffc7f5d804a40c446cdd6977a789806cddd # unified reports (PR #683, unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index a6849fa6..30e80ddc 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -35,7 +35,7 @@ inputs: default: "false" command: description: |- - npm/pnpm/Yarn script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. Vitest uses --reporter=json --outputFile.json="$CI_REPORTS_DIR/results.json"; Jest uses --json --outputFile="$CI_REPORTS_DIR/results.json". Both include coverageMap when instrumented. Preserve Vitest coverage on failure with coverage.reportOnFailure. JUnit and TAP remain supported for other runners. + Package script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. See the native test report guide for Vitest, Jest, node:test and sharding configuration. required: false default: "test:ci" coverage: @@ -51,7 +51,7 @@ inputs: Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload after tests, including failures. Individual reporting is disabled for shards. - Use reporter-specific --outputFile.json rather than scalar --outputFile in the package script. + Use reporter-specific `--outputFile.json` rather than scalar `--outputFile` in the package script. Keep coverage collection enabled; defer configured coverage thresholds to the merge when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. default: "" @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4e18f19c4e4de697daa47d2551bb255e85ba7558 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@26c25ffc7f5d804a40c446cdd6977a789806cddd # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4e18f19c4e4de697daa47d2551bb255e85ba7558 # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@26c25ffc7f5d804a40c446cdd6977a789806cddd # unified reports (PR #683, unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} From d580938064613e6d666f79320109f94dc98875b7 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 16:00:23 +0100 Subject: [PATCH 18/48] docs(test): regenerate concise native report usage --- actions/test/README.md | 66 +++++++++++++++++++++--------------------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/actions/test/README.md b/actions/test/README.md index 5fd063cd..9bf04592 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -39,7 +39,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@f3dbc0a49f10ca459112808a1cc31b8f4d1fbe8c # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@c87829fa8b0658a28473f8499ed4234b4a2c7cee # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -58,7 +58,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner # Default: `false` container: "false" - # npm/pnpm/Yarn script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. Vitest uses --reporter=json --outputFile.json="$CI_REPORTS_DIR/results.json"; Jest uses --json --outputFile="$CI_REPORTS_DIR/results.json". Both include coverageMap when instrumented. Preserve Vitest coverage on failure with coverage.reportOnFailure. JUnit and TAP remain supported for other runners. + # Package script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. See the native test report guide for Vitest, Jest, node:test and sharding configuration. # Default: `test:ci` command: test:ci @@ -75,7 +75,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner # Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. # Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload # after tests, including failures. Individual reporting is disabled for shards. - # Use reporter-specific --outputFile.json rather than scalar --outputFile in the package script. + # Use reporter-specific `--outputFile.json` rather than scalar `--outputFile` in the package script. # Keep coverage collection enabled; defer configured coverage thresholds to the merge # when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. shard: "" @@ -113,36 +113,36 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------- | -| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | -| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | -| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | -| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | -| | Can be absolute or relative to the repository root. | | | -| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | -| **`command`** | npm/pnpm/Yarn script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. Vitest uses --reporter=json --outputFile.json="$CI_REPORTS_DIR/results.json"; Jest uses --json --outputFile="$CI_REPORTS_DIR/results.json". Both include coverageMap when instrumented. Preserve Vitest coverage on failure with coverage.reportOnFailure. JUnit and TAP remain supported for other runners. | **false** | `test:ci` | -| **`coverage`** | Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. | **false** | `true` | -| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | -| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | -| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | -| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | -| | after tests, including failures. Individual reporting is disabled for shards. | | | -| | Use reporter-specific --outputFile.json rather than scalar --outputFile in the package script. | | | -| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | -| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | -| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | -| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | -| | All shards and their merge must use the same group and absolute project directory. | | | -| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | -| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | -| | The package script must enable final reporters and original coverage thresholds. | | | -| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | -| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | -| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | -| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | -| **`test-results`** | Required native test report paths relative to CI_REPORTS_DIR, one per line. A combined JSON report can also supply coverage. | **false** | `results.json` | -| **`test-coverage`** | Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Defaults to test-results for combined JSON, or coverage/lcov.info when merging Vitest shards. Vitest shard merging emits coverage separately; enable lcovonly when CI_TEST_MERGE is true. | **false** | - | +| **Input** | **Description** | **Required** | **Default** | +| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------- | +| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | +| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | +| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | +| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | +| | Can be absolute or relative to the repository root. | | | +| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | +| **`command`** | Package script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. See the native test report guide for Vitest, Jest, node:test and sharding configuration. | **false** | `test:ci` | +| **`coverage`** | Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. | **false** | `true` | +| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | +| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | +| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | +| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | +| | after tests, including failures. Individual reporting is disabled for shards. | | | +| | Use reporter-specific `--outputFile.json` rather than scalar `--outputFile` in the package script. | | | +| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | +| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | +| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | +| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | +| | All shards and their merge must use the same group and absolute project directory. | | | +| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | +| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | +| | The package script must enable final reporters and original coverage thresholds. | | | +| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | +| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | +| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | +| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | +| **`test-results`** | Required native test report paths relative to CI_REPORTS_DIR, one per line. A combined JSON report can also supply coverage. | **false** | `results.json` | +| **`test-coverage`** | Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Defaults to test-results for combined JSON, or coverage/lcov.info when merging Vitest shards. Vitest shard merging emits coverage separately; enable lcovonly when CI_TEST_MERGE is true. | **false** | - | From 64899fdf0e6164bf96c679ed574b5c9cd13f2a99 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 16:58:07 +0100 Subject: [PATCH 19/48] refactor: require a separate CI gate after report publication --- .github/workflows/__shared-ci.yml | 51 +++++++++++++++----- .github/workflows/continuous-integration.md | 4 +- .github/workflows/continuous-integration.yml | 2 + actions/lint/README.md | 2 +- actions/lint/action.yml | 4 +- actions/test/README.md | 2 +- actions/test/action.yml | 4 +- docs/usage/test-reports.md | 10 ++++ 8 files changed, 59 insertions(+), 20 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 459b30d6..59a36552 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@26c25ffc7f5d804a40c446cdd6977a789806cddd # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) permissions: actions: read contents: read @@ -34,56 +34,56 @@ jobs: needs: lint uses: $/.github/workflows/__test-action-dependencies-cache.yml permissions: - contents: read actions: read + contents: read test-action-get-package-manager: name: Test action "get-package-manager" needs: lint uses: $/.github/workflows/__test-action-get-package-manager.yml permissions: - contents: read actions: read + contents: read test-action-has-installed-dependencies: name: Test action "has-installed-dependencies" needs: lint uses: $/.github/workflows/__test-action-has-installed-dependencies.yml permissions: - contents: read actions: read + contents: read test-action-package-create: name: Test action "package/create" needs: lint uses: $/.github/workflows/__test-action-package-create.yml permissions: - contents: read actions: read + contents: read test-action-package-test: name: Test action "package/test" needs: lint uses: $/.github/workflows/__test-action-package-test.yml permissions: - contents: read actions: read + contents: read test-action-package-discover: name: Test action "package/discover" needs: lint uses: $/.github/workflows/__test-action-package-discover.yml permissions: - contents: read actions: read + contents: read test-action-setup-node: name: Test action "setup-node" needs: lint uses: $/.github/workflows/__test-action-setup-node.yml permissions: - contents: read actions: read + contents: read test-action-package-publish: name: Test action "package/publish" @@ -111,17 +111,18 @@ jobs: needs: lint uses: $/.github/workflows/__test-action-test.yml permissions: - contents: read actions: read + contents: read test-action-lint: needs: lint uses: $/.github/workflows/__test-action-lint.yml permissions: - contents: read actions: read + contents: read reports: + if: always() needs: - lint - test-release @@ -136,14 +137,38 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - if: ${{ !cancelled() }} - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@26c25ffc7f5d804a40c446cdd6977a789806cddd # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) permissions: + actions: read contents: read pull-requests: write code-quality: write id-token: write - actions: read security-events: write with: job-results: ${{ toJSON(needs) }} + + complete: + name: CI complete + if: always() + needs: + - lint + - test-release + - test-action-dependencies-cache + - test-action-get-package-manager + - test-action-has-installed-dependencies + - test-action-package-create + - test-action-package-test + - test-action-package-discover + - test-action-setup-node + - test-action-package-publish + - test-workflow-continuous-integration + - test-action-test + - test-action-lint + - reports + runs-on: ubuntu-latest + permissions: {} + steps: + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) + with: + job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/continuous-integration.md b/.github/workflows/continuous-integration.md index c90189f8..a43d1041 100644 --- a/.github/workflows/continuous-integration.md +++ b/.github/workflows/continuous-integration.md @@ -34,6 +34,8 @@ Merge shards natively; their coverage output remains separate. Call common ci-reports.yml once after all producer jobs with job-results: toJSON(needs). No report plans or artifact IDs need forwarding. +Add a separate CI complete job using common actions/check-jobs, with direct +needs on all required producers and reporting, and if: always(). Producer calls require actions: read and contents: read. The reporting caller grants actions: read, contents: read, pull-requests: write, code-quality: write, id-token: write and security-events: write; its internal jobs narrow these. @@ -66,7 +68,7 @@ on: permissions: {} jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@f3dbc0a49f10ca459112808a1cc31b8f4d1fbe8c # feat/native-github-coverage + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@d580938064613e6d666f79320109f94dc98875b7 # feat/native-github-coverage permissions: actions: read contents: read diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 13a8ced9..946dbaba 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -10,6 +10,8 @@ # Call common ci-reports.yml once after all producer jobs with # job-results: toJSON(needs). No report plans or artifact IDs need forwarding. +# Add a separate CI complete job using common actions/check-jobs, with direct +# needs on all required producers and reporting, and if: always(). # Producer calls require actions: read and contents: read. The reporting caller # grants actions: read, contents: read, pull-requests: write, code-quality: write, # id-token: write and security-events: write; its internal jobs narrow these. diff --git a/actions/lint/README.md b/actions/lint/README.md index 312bb8c3..044a75e1 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -35,7 +35,7 @@ Producer jobs require actions: read and contents: read, with source checked out ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@05981e2c0d4b82bd09d6154082ecdb004dd7d9f9 # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@d580938064613e6d666f79320109f94dc98875b7 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 308de12e..e691c327 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@26c25ffc7f5d804a40c446cdd6977a789806cddd # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@26c25ffc7f5d804a40c446cdd6977a789806cddd # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/README.md b/actions/test/README.md index 9bf04592..dc5397c9 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -39,7 +39,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@c87829fa8b0658a28473f8499ed4234b4a2c7cee # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@d580938064613e6d666f79320109f94dc98875b7 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/test/action.yml b/actions/test/action.yml index 30e80ddc..c44be48a 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@26c25ffc7f5d804a40c446cdd6977a789806cddd # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@26c25ffc7f5d804a40c446cdd6977a789806cddd # unified reports (PR #683, unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/docs/usage/test-reports.md b/docs/usage/test-reports.md index 4ff50620..ec018966 100644 --- a/docs/usage/test-reports.md +++ b/docs/usage/test-reports.md @@ -73,3 +73,13 @@ For the reusable continuous-integration workflow, supply those paths inside its `test` JSON object. Coverage can be disabled without removing detailed test results. Test and coverage publication destinations remain independent of the number of native files. + +## Overall CI status + +Call `ci-reports` once after all producers. It validates evidence and publication; +it can succeed while displaying failed tests. Add one required `CI complete` job +with `if: always()`, direct `needs` on every required producer and `reports`, and +`ci-github-common/actions/check-jobs` with `job-results: toJSON(needs)`. +Unexpected skipped jobs fail the gate. Allow only intentionally conditional job +IDs through `allow-skipped`. See the +[common CI gate contract](https://github.com/hoverkraft-tech/ci-github-common/blob/85351002dc2303c4a70233197edcadb20b1cb90e/docs/usage/ci-reports.md#required-ci-verdict). From be526fc1367b1e06482052d80e449c063fb7507c Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 17:25:38 +0100 Subject: [PATCH 20/48] fix: use validated common reporting contracts --- .github/workflows/__shared-ci.yml | 7 ++++--- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 59a36552..fb880a65 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) permissions: actions: read contents: read @@ -167,8 +167,9 @@ jobs: - test-action-lint - reports runs-on: ubuntu-latest + timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/actions/lint/action.yml b/actions/lint/action.yml index e691c327..f91e82ec 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index c44be48a..04b63fb9 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@85351002dc2303c4a70233197edcadb20b1cb90e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} From 570c8389e95924c64933ea1e95f555ad7739a46f Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sat, 28 Nov 2026 18:06:22 +0100 Subject: [PATCH 21/48] ci: validate the final shared reporting contract --- .github/workflows/__shared-ci.yml | 6 +++--- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index fb880a65..d1ab01a4 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/actions/lint/action.yml b/actions/lint/action.yml index f91e82ec..e88af73c 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index 04b63fb9..fb61ee33 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c0b651dd3d5f9ce5eff49c3c675c1f5c7f2ca581 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} From b3b2b5f952e3862228ec2a1e294ec291608a4d39 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sun, 29 Nov 2026 09:46:17 +0100 Subject: [PATCH 22/48] fix(ci): adopt external coverage comment ownership --- .github/workflows/__shared-ci.yml | 6 +++--- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index d1ab01a4..1ed44806 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/actions/lint/action.yml b/actions/lint/action.yml index e88af73c..06e81d5f 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index fb61ee33..4b4d0c54 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a0bdfab27afed208f3c105e4b543818b8388b80b # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} From 549a2c5d04eb01c7456bbde0bc8fef54e0aa58f0 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sun, 29 Nov 2026 11:11:50 +0100 Subject: [PATCH 23/48] ci: adopt actionable reports and stable coverage project flags --- .github/workflows/__shared-ci.yml | 6 +++--- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 1ed44806..49ba06ab 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 06e81d5f..d3a2e54c 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index 4b4d0c54..1422ca14 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@4043eb6a440b21812c3d92d78bd6d019713326b2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} From fde31b08945ee815cfd70d5de9429869d7436983 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sun, 29 Nov 2026 11:21:33 +0100 Subject: [PATCH 24/48] ci: update validated reporting implementation --- .github/workflows/__shared-ci.yml | 6 +++--- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 49ba06ab..8f9be97e 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/actions/lint/action.yml b/actions/lint/action.yml index d3a2e54c..bf335e84 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index 1422ca14..d5763c34 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2a3dd6d8dd3627bd074c5dfe3228500be6b08892 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} From 2411222f9b088748fd50d0456ee00e9c77ed4e4d Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sun, 29 Nov 2026 19:13:32 +0100 Subject: [PATCH 25/48] ci: use the corrected Common reporting actions --- .github/workflows/__shared-ci.yml | 6 +++--- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 8f9be97e..821254c1 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/actions/lint/action.yml b/actions/lint/action.yml index bf335e84..e0f5354f 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index d5763c34..146295a5 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@c8399518df2fa64a6e163169a747765b9271e6c8 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} From 08ae42573170b2fe9702a919dc468eb212884cc0 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sun, 29 Nov 2026 19:21:05 +0100 Subject: [PATCH 26/48] docs: refresh reporting action references --- actions/lint/README.md | 8 +++++++- actions/test/README.md | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/actions/lint/README.md b/actions/lint/README.md index 044a75e1..a50c742b 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -2,6 +2,12 @@ # ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stY2lyY2xlIiBjb2xvcj0iYmx1ZSI+PHBhdGggZD0iTTIyIDExLjA4VjEyYTEwIDEwIDAgMSAxLTUuOTMtOS4xNCI+PC9wYXRoPjxwb2x5bGluZSBwb2ludHM9IjIyIDQgMTIgMTQuMDEgOSAxMS4wMSI+PC9wb2x5bGluZT48L3N2Zz4=) GitHub Action: Lint +
+ Lint +
+ +--- + @@ -35,7 +41,7 @@ Producer jobs require actions: read and contents: read, with source checked out ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@d580938064613e6d666f79320109f94dc98875b7 # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@2411222f9b088748fd50d0456ee00e9c77ed4e4d # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/test/README.md b/actions/test/README.md index dc5397c9..4ca7fe6c 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -2,6 +2,12 @@ # ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stc3F1YXJlIiBjb2xvcj0iYmx1ZSI+PHBvbHlsaW5lIHBvaW50cz0iOSAxMSAxMiAxNCAyMiA0Ij48L3BvbHlsaW5lPjxwYXRoIGQ9Ik0yMSAxMnY3YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0yVjVhMiAyIDAgMCAxIDItMmgxMSI+PC9wYXRoPjwvc3ZnPg==) GitHub Action: Test +
+ Test +
+ +--- + @@ -39,7 +45,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@d580938064613e6d666f79320109f94dc98875b7 # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@191d7230d57982bfc11d57f68b005f386a6d7fbf # 3.1.1 with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. From 2b34883880180c8e457caf083dc12ecdc76415ab Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sun, 29 Nov 2026 19:34:33 +0100 Subject: [PATCH 27/48] docs: pin generated examples to the reporting preview --- actions/lint/README.md | 2 +- actions/test/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/actions/lint/README.md b/actions/lint/README.md index a50c742b..3f4fa261 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -41,7 +41,7 @@ Producer jobs require actions: read and contents: read, with source checked out ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@2411222f9b088748fd50d0456ee00e9c77ed4e4d # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@08ae42573170b2fe9702a919dc468eb212884cc0 with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/test/README.md b/actions/test/README.md index 4ca7fe6c..b0289e88 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -45,7 +45,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@191d7230d57982bfc11d57f68b005f386a6d7fbf # 3.1.1 +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@08ae42573170b2fe9702a919dc468eb212884cc0 with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. From afcf7743dc91b01156909d640418bcf4d8e9e458 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Sun, 29 Nov 2026 20:47:10 +0100 Subject: [PATCH 28/48] ci: use bundled Node.js coverage conversion --- .github/workflows/__shared-ci.yml | 6 +++--- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 821254c1..347cf991 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/actions/lint/action.yml b/actions/lint/action.yml index e0f5354f..3a2e0696 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index 146295a5..b4e3af1f 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0ac3dea66244dd619d6c80643958d60b886c4c02 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} From 5464ea3d3a1101ce19cb28287bbec9af3bca7ebb Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Mon, 30 Nov 2026 11:54:28 +0100 Subject: [PATCH 29/48] refactor: give Node.js check actions independent report bundles --- .../__commit-action-distributions.yml | 22 +++ .../__rebuild-action-distributions.yml | 18 ++ .github/workflows/__shared-ci.yml | 6 +- .github/workflows/__test-action-lint.yml | 11 ++ .github/workflows/__test-action-test.yml | 11 ++ actions/lint/.npmrc | 1 + actions/lint/action.yml | 6 +- actions/lint/dist/index.js | 168 ++++++++++++++++++ actions/lint/dist/licenses.txt | 2 + actions/lint/package-lock.json | 40 +++++ actions/lint/package.json | 22 +++ actions/lint/src/contracts.test.cjs | 2 + actions/lint/src/index.js | 1 + actions/test/.npmrc | 1 + actions/test/action.yml | 6 +- actions/test/dist/index.js | 168 ++++++++++++++++++ actions/test/dist/licenses.txt | 2 + actions/test/package-lock.json | 40 +++++ actions/test/package.json | 22 +++ actions/test/src/contracts.test.cjs | 2 + actions/test/src/index.js | 1 + biome.json | 6 +- docs/development/reporting-actions.md | 27 +++ packages/reporting/package-lock.json | 16 ++ packages/reporting/package.json | 21 +++ .../reporting/src}/ReportDefinition.cjs | 2 +- .../reporting/src/ReportDefinition.test.cjs | 57 ++++++ scripts/test-packages.sh | 8 +- 28 files changed, 674 insertions(+), 15 deletions(-) create mode 100644 .github/workflows/__commit-action-distributions.yml create mode 100644 .github/workflows/__rebuild-action-distributions.yml create mode 100644 actions/lint/.npmrc create mode 100644 actions/lint/dist/index.js create mode 100644 actions/lint/dist/licenses.txt create mode 100644 actions/lint/package-lock.json create mode 100644 actions/lint/package.json create mode 100644 actions/lint/src/contracts.test.cjs create mode 100644 actions/lint/src/index.js create mode 100644 actions/test/.npmrc create mode 100644 actions/test/dist/index.js create mode 100644 actions/test/dist/licenses.txt create mode 100644 actions/test/package-lock.json create mode 100644 actions/test/package.json create mode 100644 actions/test/src/contracts.test.cjs create mode 100644 actions/test/src/index.js create mode 100644 docs/development/reporting-actions.md create mode 100644 packages/reporting/package-lock.json create mode 100644 packages/reporting/package.json rename {actions/reporting => packages/reporting/src}/ReportDefinition.cjs (96%) create mode 100644 packages/reporting/src/ReportDefinition.test.cjs diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml new file mode 100644 index 00000000..33cb4018 --- /dev/null +++ b/.github/workflows/__commit-action-distributions.yml @@ -0,0 +1,22 @@ +name: Internal - Commit action distributions + +on: # zizmor: ignore[dangerous-triggers] Trusted writer validates origin, actor, PR head and paths; it never executes PR code. + workflow_run: + workflows: [Internal - Rebuild action distributions] + types: [completed] + +permissions: {} + +jobs: + distributions: + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + permissions: + actions: read + contents: read + pull-requests: read + with: + pull-request-authors: | + ["dependabot", "renovate", {"login":"hoverkraft-bot[bot]","id":128996893,"branch-prefix":"renovate/"}] + github-app-client-id: ${{ vars.CI_BOT_APP_CLIENT_ID }} + secrets: + github-app-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }} diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml new file mode 100644 index 00000000..7ded4680 --- /dev/null +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -0,0 +1,18 @@ +name: Internal - Rebuild action distributions + +on: + pull_request: + branches: [main] + +permissions: {} + +jobs: + distributions: + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + permissions: + actions: read + contents: read + pull-requests: read + with: + pull-request-authors: | + ["dependabot", "renovate", {"login":"hoverkraft-bot[bot]","id":128996893,"branch-prefix":"renovate/"}] diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 347cf991..c44c8fd7 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index 689de014..4465e97a 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -18,6 +18,17 @@ jobs: with: persist-credentials: false ref: ${{ github.event.pull_request.head.sha || github.sha }} + - name: Arrange - Install action build dependencies + uses: $/actions/setup-node + with: + working-directory: actions/lint + - name: Assert - Verify the checked-in action distribution + working-directory: actions/lint + run: npm run check:dist + - name: Assert - Verify the isolated action contracts + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + with: + working-directory: actions/lint - name: Arrange - Create a dependency-free lint project uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 9a153dc1..3c3f62ff 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -18,6 +18,17 @@ jobs: with: persist-credentials: false ref: ${{ github.event.pull_request.head.sha || github.sha }} + - name: Arrange - Install action build dependencies + uses: $/actions/setup-node + with: + working-directory: actions/test + - name: Assert - Verify the checked-in action distribution + working-directory: actions/test + run: npm run check:dist + - name: Assert - Verify the isolated action contracts + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + with: + working-directory: actions/test - name: Arrange - Create a dependency-free native test project uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: diff --git a/actions/lint/.npmrc b/actions/lint/.npmrc new file mode 100644 index 00000000..c7d35173 --- /dev/null +++ b/actions/lint/.npmrc @@ -0,0 +1 @@ +install-links=true diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 3a2e0696..77746dfd 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -85,7 +85,7 @@ runs: RESULTS: ${{ inputs.lint-results }} with: script: | - const { ReportDefinition } = require(process.env.NODE_ACTION_PATH + '/../reporting/ReportDefinition.cjs'); + const { ReportDefinition } = require(process.env.NODE_ACTION_PATH + '/dist/index.js'); const runtime = await exec.getExecOutput('node', ['--version'], {silent: true}); core.setOutput('definition', ReportDefinition.create({ kind: 'lint', workspace: process.env.GITHUB_WORKSPACE, directory: process.env.WORKING_DIRECTORY, @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/lint/dist/index.js b/actions/lint/dist/index.js new file mode 100644 index 00000000..d899f1b7 --- /dev/null +++ b/actions/lint/dist/index.js @@ -0,0 +1,168 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 105: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(845); + + +/***/ }), + +/***/ 24: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:fs"); + +/***/ }), + +/***/ 760: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:path"); + +/***/ }), + +/***/ 845: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const fs = __nccwpck_require__(24); +const path = __nccwpck_require__(760); + +/** Build the producer contract before any project check executes. */ +const ReportDefinition = { + paths(value) { + const paths = value + .split(/\r?\n/) + .map((item) => item.trim()) + .filter(Boolean); + if (!paths.length) + throw new Error("Required report paths must not be empty."); + return paths; + }, + + create({ + kind, + workspace, + directory, + runtime, + sourceSha, + sourcePrefix, + mapping, + results, + coverage, + coveragePaths, + shards, + }) { + const relative = path + .relative(workspace, directory) + .split(path.sep) + .join("/"); + const outside = + relative === ".." || + relative.startsWith("../") || + path.isAbsolute(relative); + if (outside && (!sourceSha || !sourcePrefix)) { + throw new Error( + "A prebuilt container requires source-sha and source-prefix, and a checkout of that source in GITHUB_WORKSPACE.", + ); + } + const project = outside ? sourcePrefix : relative || "."; + const mappings = mapping ? JSON.parse(mapping) : {}; + if (!mappings || typeof mappings !== "object" || Array.isArray(mappings)) + throw new Error("path-mapping must be a JSON object."); + if (outside) mappings[directory.replace(/\/$/, "")] = project; + const reports = ReportDefinition.paths(results).map((pattern) => ({ + kind, + pattern, + })); + if (kind === "test" && coverage === "true") { + const language = fs.existsSync(path.join(directory, "tsconfig.json")) + ? "TypeScript" + : "JavaScript"; + const count = shards ? Number(shards) : 0; + if (shards && (!Number.isSafeInteger(count) || count < 2 || count > 256)) + throw new Error("Invalid merged shard count."); + reports.push( + ...ReportDefinition.paths(coveragePaths).map((pattern) => ({ + kind: "coverage", + pattern, + language, + ...(count + ? { + shards: { + expected: Array.from({ length: count }, (_, index) => + String(index + 1), + ), + included: Array.from({ length: count }, (_, index) => + String(index + 1), + ), + }, + } + : {}), + })), + ); + } + return { + name: kind === "test" ? "Node.js tests" : "Node.js lint", + project, + variant: { runtime }, + reports, + "path-mapping": mappings, + ...(sourceSha ? { source: { sha: sourceSha } } : {}), + }; + }, +}; +module.exports = { ReportDefinition }; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/asset-relocator-loader */ +/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module used 'module' so it can't be inlined +/******/ var __webpack_exports__ = __nccwpck_require__(105); +/******/ module.exports = __webpack_exports__; +/******/ +/******/ })() +; \ No newline at end of file diff --git a/actions/lint/dist/licenses.txt b/actions/lint/dist/licenses.txt new file mode 100644 index 00000000..87492513 --- /dev/null +++ b/actions/lint/dist/licenses.txt @@ -0,0 +1,2 @@ +@hoverkraft-tech/nodejs-reporting +MIT diff --git a/actions/lint/package-lock.json b/actions/lint/package-lock.json new file mode 100644 index 00000000..1e1e81b4 --- /dev/null +++ b/actions/lint/package-lock.json @@ -0,0 +1,40 @@ +{ + "name": "lint-report-definition", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "lint-report-definition", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@hoverkraft-tech/nodejs-reporting": "file:../../packages/reporting" + }, + "devDependencies": { + "@vercel/ncc": "0.45.0" + }, + "engines": { + "node": ">=24.0.0" + } + }, + "node_modules/@hoverkraft-tech/nodejs-reporting": { + "version": "0.0.0", + "resolved": "file:../../packages/reporting", + "license": "MIT", + "engines": { + "node": ">=24.0.0" + } + }, + "node_modules/@vercel/ncc": { + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.45.0.tgz", + "integrity": "sha512-8zPi1yO2mHpoKTD+e+Bf0ZT3e+sWHSOyGapm9s7b5R0gxJi3CiFTqmeQiMEyu6ejrz2s09M8JkEoUaTWjBJPQQ==", + "dev": true, + "license": "MIT", + "bin": { + "ncc": "dist/ncc/cli.js" + } + } + } +} diff --git a/actions/lint/package.json b/actions/lint/package.json new file mode 100644 index 00000000..17074297 --- /dev/null +++ b/actions/lint/package.json @@ -0,0 +1,22 @@ +{ + "name": "lint-report-definition", + "version": "1.0.0", + "private": true, + "description": "Report definition bundled for the lint action", + "scripts": { + "test": "node --test src/*.test.cjs", + "build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && ncc build src/index.js --out dist --target es2022 --no-cache --license licenses.txt", + "check:dist": "npm run build && git diff --exit-code -- dist && test -z \"$(git ls-files --others --exclude-standard -- dist)\"", + "test:distribution": "node --test src/*.test.cjs" + }, + "engines": { + "node": ">=24.0.0" + }, + "dependencies": { + "@hoverkraft-tech/nodejs-reporting": "file:../../packages/reporting" + }, + "devDependencies": { + "@vercel/ncc": "0.45.0" + }, + "license": "MIT" +} diff --git a/actions/lint/src/contracts.test.cjs b/actions/lint/src/contracts.test.cjs new file mode 100644 index 00000000..2f6c780f --- /dev/null +++ b/actions/lint/src/contracts.test.cjs @@ -0,0 +1,2 @@ +// Reuse producer contracts against source or the isolated action bundle. +require("@hoverkraft-tech/nodejs-reporting/contracts"); diff --git a/actions/lint/src/index.js b/actions/lint/src/index.js new file mode 100644 index 00000000..58ba16be --- /dev/null +++ b/actions/lint/src/index.js @@ -0,0 +1 @@ +module.exports = require("@hoverkraft-tech/nodejs-reporting"); diff --git a/actions/test/.npmrc b/actions/test/.npmrc new file mode 100644 index 00000000..c7d35173 --- /dev/null +++ b/actions/test/.npmrc @@ -0,0 +1 @@ +install-links=true diff --git a/actions/test/action.yml b/actions/test/action.yml index b4e3af1f..aefed7fb 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -178,7 +178,7 @@ runs: MERGE_SHARDS: ${{ inputs.merge-shards }} with: script: | - const { ReportDefinition } = require(process.env.NODE_ACTION_PATH + '/../reporting/ReportDefinition.cjs'); + const { ReportDefinition } = require(process.env.NODE_ACTION_PATH + '/dist/index.js'); const runtime = await exec.getExecOutput('node', ['--version'], {silent: true}); core.setOutput('definition', ReportDefinition.create({ kind: 'test', workspace: process.env.GITHUB_WORKSPACE, directory: process.env.WORKING_DIRECTORY, @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@a34ef0cefdef3b1e68a61cea52aae223f06f35e7 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/dist/index.js b/actions/test/dist/index.js new file mode 100644 index 00000000..d899f1b7 --- /dev/null +++ b/actions/test/dist/index.js @@ -0,0 +1,168 @@ +/******/ (() => { // webpackBootstrap +/******/ var __webpack_modules__ = ({ + +/***/ 105: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +module.exports = __nccwpck_require__(845); + + +/***/ }), + +/***/ 24: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:fs"); + +/***/ }), + +/***/ 760: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:path"); + +/***/ }), + +/***/ 845: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const fs = __nccwpck_require__(24); +const path = __nccwpck_require__(760); + +/** Build the producer contract before any project check executes. */ +const ReportDefinition = { + paths(value) { + const paths = value + .split(/\r?\n/) + .map((item) => item.trim()) + .filter(Boolean); + if (!paths.length) + throw new Error("Required report paths must not be empty."); + return paths; + }, + + create({ + kind, + workspace, + directory, + runtime, + sourceSha, + sourcePrefix, + mapping, + results, + coverage, + coveragePaths, + shards, + }) { + const relative = path + .relative(workspace, directory) + .split(path.sep) + .join("/"); + const outside = + relative === ".." || + relative.startsWith("../") || + path.isAbsolute(relative); + if (outside && (!sourceSha || !sourcePrefix)) { + throw new Error( + "A prebuilt container requires source-sha and source-prefix, and a checkout of that source in GITHUB_WORKSPACE.", + ); + } + const project = outside ? sourcePrefix : relative || "."; + const mappings = mapping ? JSON.parse(mapping) : {}; + if (!mappings || typeof mappings !== "object" || Array.isArray(mappings)) + throw new Error("path-mapping must be a JSON object."); + if (outside) mappings[directory.replace(/\/$/, "")] = project; + const reports = ReportDefinition.paths(results).map((pattern) => ({ + kind, + pattern, + })); + if (kind === "test" && coverage === "true") { + const language = fs.existsSync(path.join(directory, "tsconfig.json")) + ? "TypeScript" + : "JavaScript"; + const count = shards ? Number(shards) : 0; + if (shards && (!Number.isSafeInteger(count) || count < 2 || count > 256)) + throw new Error("Invalid merged shard count."); + reports.push( + ...ReportDefinition.paths(coveragePaths).map((pattern) => ({ + kind: "coverage", + pattern, + language, + ...(count + ? { + shards: { + expected: Array.from({ length: count }, (_, index) => + String(index + 1), + ), + included: Array.from({ length: count }, (_, index) => + String(index + 1), + ), + }, + } + : {}), + })), + ); + } + return { + name: kind === "test" ? "Node.js tests" : "Node.js lint", + project, + variant: { runtime }, + reports, + "path-mapping": mappings, + ...(sourceSha ? { source: { sha: sourceSha } } : {}), + }; + }, +}; +module.exports = { ReportDefinition }; + + +/***/ }) + +/******/ }); +/************************************************************************/ +/******/ // The module cache +/******/ var __webpack_module_cache__ = {}; +/******/ +/******/ // The require function +/******/ function __nccwpck_require__(moduleId) { +/******/ // Check if module is in cache +/******/ var cachedModule = __webpack_module_cache__[moduleId]; +/******/ if (cachedModule !== undefined) { +/******/ return cachedModule.exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = __webpack_module_cache__[moduleId] = { +/******/ // no module.id needed +/******/ // no module.loaded needed +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ var threw = true; +/******/ try { +/******/ __webpack_modules__[moduleId](module, module.exports, __nccwpck_require__); +/******/ threw = false; +/******/ } finally { +/******/ if(threw) delete __webpack_module_cache__[moduleId]; +/******/ } +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/************************************************************************/ +/******/ /* webpack/runtime/asset-relocator-loader */ +/******/ if (typeof __nccwpck_require__ !== 'undefined') __nccwpck_require__.ab = __dirname + "/"; +/******/ +/************************************************************************/ +/******/ +/******/ // startup +/******/ // Load entry module and return exports +/******/ // This entry module used 'module' so it can't be inlined +/******/ var __webpack_exports__ = __nccwpck_require__(105); +/******/ module.exports = __webpack_exports__; +/******/ +/******/ })() +; \ No newline at end of file diff --git a/actions/test/dist/licenses.txt b/actions/test/dist/licenses.txt new file mode 100644 index 00000000..87492513 --- /dev/null +++ b/actions/test/dist/licenses.txt @@ -0,0 +1,2 @@ +@hoverkraft-tech/nodejs-reporting +MIT diff --git a/actions/test/package-lock.json b/actions/test/package-lock.json new file mode 100644 index 00000000..a1897244 --- /dev/null +++ b/actions/test/package-lock.json @@ -0,0 +1,40 @@ +{ + "name": "test-report-definition", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "test-report-definition", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "@hoverkraft-tech/nodejs-reporting": "file:../../packages/reporting" + }, + "devDependencies": { + "@vercel/ncc": "0.45.0" + }, + "engines": { + "node": ">=24.0.0" + } + }, + "node_modules/@hoverkraft-tech/nodejs-reporting": { + "version": "0.0.0", + "resolved": "file:../../packages/reporting", + "license": "MIT", + "engines": { + "node": ">=24.0.0" + } + }, + "node_modules/@vercel/ncc": { + "version": "0.45.0", + "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.45.0.tgz", + "integrity": "sha512-8zPi1yO2mHpoKTD+e+Bf0ZT3e+sWHSOyGapm9s7b5R0gxJi3CiFTqmeQiMEyu6ejrz2s09M8JkEoUaTWjBJPQQ==", + "dev": true, + "license": "MIT", + "bin": { + "ncc": "dist/ncc/cli.js" + } + } + } +} diff --git a/actions/test/package.json b/actions/test/package.json new file mode 100644 index 00000000..0434eb3e --- /dev/null +++ b/actions/test/package.json @@ -0,0 +1,22 @@ +{ + "name": "test-report-definition", + "version": "1.0.0", + "private": true, + "description": "Report definition bundled for the test action", + "scripts": { + "test": "node --test src/*.test.cjs", + "build": "node -e \"require('node:fs').rmSync('dist', { recursive: true, force: true })\" && ncc build src/index.js --out dist --target es2022 --no-cache --license licenses.txt", + "check:dist": "npm run build && git diff --exit-code -- dist && test -z \"$(git ls-files --others --exclude-standard -- dist)\"", + "test:distribution": "node --test src/*.test.cjs" + }, + "engines": { + "node": ">=24.0.0" + }, + "dependencies": { + "@hoverkraft-tech/nodejs-reporting": "file:../../packages/reporting" + }, + "devDependencies": { + "@vercel/ncc": "0.45.0" + }, + "license": "MIT" +} diff --git a/actions/test/src/contracts.test.cjs b/actions/test/src/contracts.test.cjs new file mode 100644 index 00000000..2f6c780f --- /dev/null +++ b/actions/test/src/contracts.test.cjs @@ -0,0 +1,2 @@ +// Reuse producer contracts against source or the isolated action bundle. +require("@hoverkraft-tech/nodejs-reporting/contracts"); diff --git a/actions/test/src/index.js b/actions/test/src/index.js new file mode 100644 index 00000000..58ba16be --- /dev/null +++ b/actions/test/src/index.js @@ -0,0 +1 @@ +module.exports = require("@hoverkraft-tech/nodejs-reporting"); diff --git a/biome.json b/biome.json index 825a8d6d..84cc478e 100644 --- a/biome.json +++ b/biome.json @@ -5,7 +5,11 @@ "useIgnoreFile": true }, "files": { - "includes": ["**", "!!.devcontainer/devcontainer-lock.json"] + "includes": [ + "**", + "!!.devcontainer/devcontainer-lock.json", + "!actions/**/dist" + ] }, "formatter": { "indentStyle": "space" diff --git a/docs/development/reporting-actions.md b/docs/development/reporting-actions.md new file mode 100644 index 00000000..100dcb86 --- /dev/null +++ b/docs/development/reporting-actions.md @@ -0,0 +1,27 @@ +# Maintaining reporting actions + +The lint and test actions compose Common's public recorder through `uses:`. +Neither action imports another action's source. Their shared definition builder +lives in the private `packages/reporting` package. Each action declares that local +dependency and bundles it in its own distribution, without runtime installation. + +After changing the library, reinstall dependencies and rebuild both actions: + +```bash +npm ci --ignore-scripts --prefix packages/reporting +npm test --prefix packages/reporting +for action in lint test; do + npm ci --ignore-scripts --prefix "actions/$action" + npm test --prefix "actions/$action" + npm run build --prefix "actions/$action" +done +``` + +Commit both distributions. The dedicated lint and test workflows verify +reproducibility, isolated distribution contracts, and actual native report +recording. The shared distribution automation follows trusted local dependencies +when updating bot pull requests; it cannot widen the writer's output allowlist. + +Keep report policy in Common. This package only describes the checked project, +runtime, source mapping, requested native reports and completed shard merge. +See the [consumer guide](../usage/test-reports.md) for report generation. diff --git a/packages/reporting/package-lock.json b/packages/reporting/package-lock.json new file mode 100644 index 00000000..0c723c04 --- /dev/null +++ b/packages/reporting/package-lock.json @@ -0,0 +1,16 @@ +{ + "name": "@hoverkraft-tech/nodejs-reporting", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@hoverkraft-tech/nodejs-reporting", + "version": "0.0.0", + "license": "MIT", + "engines": { + "node": ">=24.0.0" + } + } + } +} diff --git a/packages/reporting/package.json b/packages/reporting/package.json new file mode 100644 index 00000000..e37ae4c5 --- /dev/null +++ b/packages/reporting/package.json @@ -0,0 +1,21 @@ +{ + "name": "@hoverkraft-tech/nodejs-reporting", + "version": "0.0.0", + "private": true, + "description": "Shared Node.js producer report definitions", + "main": "src/ReportDefinition.cjs", + "exports": { + ".": "./src/ReportDefinition.cjs", + "./contracts": "./src/ReportDefinition.test.cjs" + }, + "files": [ + "src" + ], + "scripts": { + "test": "node --test" + }, + "engines": { + "node": ">=24.0.0" + }, + "license": "MIT" +} diff --git a/actions/reporting/ReportDefinition.cjs b/packages/reporting/src/ReportDefinition.cjs similarity index 96% rename from actions/reporting/ReportDefinition.cjs rename to packages/reporting/src/ReportDefinition.cjs index 57ca5f8c..bb0b86fa 100644 --- a/actions/reporting/ReportDefinition.cjs +++ b/packages/reporting/src/ReportDefinition.cjs @@ -53,7 +53,7 @@ const ReportDefinition = { ? "TypeScript" : "JavaScript"; const count = shards ? Number(shards) : 0; - if (count && (!Number.isSafeInteger(count) || count < 2 || count > 256)) + if (shards && (!Number.isSafeInteger(count) || count < 2 || count > 256)) throw new Error("Invalid merged shard count."); reports.push( ...ReportDefinition.paths(coveragePaths).map((pattern) => ({ diff --git a/packages/reporting/src/ReportDefinition.test.cjs b/packages/reporting/src/ReportDefinition.test.cjs new file mode 100644 index 00000000..19a4ece0 --- /dev/null +++ b/packages/reporting/src/ReportDefinition.test.cjs @@ -0,0 +1,57 @@ +const assert = require("node:assert/strict"); +const test = require("node:test"); +const { ReportDefinition } = require( + process.env.ACTION_ENTRYPOINT || "./ReportDefinition.cjs", +); + +test("prebuilt checks require explicit source identity and map paths to the checkout", () => { + const input = { + kind: "test", + workspace: "/checkout", + directory: "/image/app", + runtime: "v24", + results: "results.json", + coverage: "true", + coveragePaths: "results.json", + }; + assert.throws( + () => ReportDefinition.create(input), + /source-sha and source-prefix/, + ); + const definition = ReportDefinition.create({ + ...input, + sourceSha: "a".repeat(40), + sourcePrefix: "apps/api", + }); + assert.equal(definition.project, "apps/api"); + assert.deepEqual(definition["path-mapping"], { "/image/app": "apps/api" }); + assert.deepEqual( + definition.reports.map(({ kind, pattern }) => ({ kind, pattern })), + [ + { kind: "test", pattern: "results.json" }, + { kind: "coverage", pattern: "results.json" }, + ], + ); +}); + +test("invalid merged shard counts cannot silently become an unsharded report", () => { + const input = { + kind: "test", + workspace: "/checkout", + directory: "/checkout", + runtime: "v24", + results: "junit.xml", + coverage: "true", + coveragePaths: "lcov.info", + }; + for (const shards of ["invalid", "0", "1", "257"]) + assert.throws( + () => ReportDefinition.create({ ...input, shards }), + /Invalid merged shard count/, + ); + const definition = ReportDefinition.create({ ...input, shards: "2" }); + assert.deepEqual(definition.reports[1].shards, { + expected: ["1", "2"], + included: ["1", "2"], + }); +}); diff --git a/scripts/test-packages.sh b/scripts/test-packages.sh index baa7e98a..e9fa6582 100755 --- a/scripts/test-packages.sh +++ b/scripts/test-packages.sh @@ -151,7 +151,7 @@ run_audit_fix_for_pm() { } run_for_each_test_package() { - packages="$(find tests actions -type f -name package.json -not -path '*/node_modules/*' -print | sort)" + packages="$(find tests actions packages -type f -name package.json -not -path '*/node_modules/*' -print | sort)" for pkg in $packages; do pkg_dir="$(dirname "$pkg")" @@ -186,13 +186,13 @@ run_for_each_test_package() { case "$action" in install) - echo "Installing dependencies for package.json files under tests/ and actions/ ..." + echo "Installing dependencies for package.json files under tests/, actions/ and packages/ ..." ;; update-interactive) - echo "Running interactive dependency updates for package.json files under tests/ and actions/ ..." + echo "Running interactive dependency updates for package.json files under tests/, actions/ and packages/ ..." ;; audit-fix) - echo "Running dependency audit/fix for package.json files under tests/ and actions/ ..." + echo "Running dependency audit/fix for package.json files under tests/, actions/ and packages/ ..." ;; *) echo "Unsupported action: $action" >&2 From 7da271bac658d21bb41f11c262410c0f8d2b239b Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Mon, 30 Nov 2026 12:11:28 +0100 Subject: [PATCH 30/48] test: keep report definition contracts with their library --- .../__commit-action-distributions.yml | 2 +- .../__rebuild-action-distributions.yml | 2 +- .github/workflows/__shared-ci.yml | 6 +-- .github/workflows/__test-action-lint.yml | 2 +- .github/workflows/__test-action-test.yml | 2 +- actions/lint/action.yml | 4 +- actions/test/action.yml | 4 +- .../reporting/src/ReportDefinition.test.cjs | 23 ++++++++ .../continuous-integration/reporting.test.js | 53 +------------------ 9 files changed, 36 insertions(+), 62 deletions(-) diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml index 33cb4018..da4a350e 100644 --- a/.github/workflows/__commit-action-distributions.yml +++ b/.github/workflows/__commit-action-distributions.yml @@ -9,7 +9,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml index 7ded4680..33a183bd 100644 --- a/.github/workflows/__rebuild-action-distributions.yml +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -8,7 +8,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index c44c8fd7..20d104db 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index 4465e97a..daa1aab6 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/lint run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) with: working-directory: actions/lint - name: Arrange - Create a dependency-free lint project diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 3c3f62ff..ff17a435 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/test run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) with: working-directory: actions/test - name: Arrange - Create a dependency-free native test project diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 77746dfd..ddf227c8 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -94,7 +94,7 @@ runs: coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +138,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index aefed7fb..311e6a64 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@dc29a8bc52f1e7e5b17c9d891a90cde2bfcd7f45 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/packages/reporting/src/ReportDefinition.test.cjs b/packages/reporting/src/ReportDefinition.test.cjs index 19a4ece0..dd87f480 100644 --- a/packages/reporting/src/ReportDefinition.test.cjs +++ b/packages/reporting/src/ReportDefinition.test.cjs @@ -24,6 +24,7 @@ test("prebuilt checks require explicit source identity and map paths to the chec sourcePrefix: "apps/api", }); assert.equal(definition.project, "apps/api"); + assert.equal(definition.source.sha, "a".repeat(40)); assert.deepEqual(definition["path-mapping"], { "/image/app": "apps/api" }); assert.deepEqual( definition.reports.map(({ kind, pattern }) => ({ kind, pattern })), @@ -55,3 +56,25 @@ test("invalid merged shard counts cannot silently become an unsharded report", ( included: ["1", "2"], }); }); + +test("secondary runs retain tests without coverage promises and reject invalid report inputs", () => { + const input = { + kind: "test", + workspace: "/repository", + directory: "/repository/app", + runtime: "v24", + results: "junit.xml", + coverage: "false", + }; + assert.deepEqual(ReportDefinition.create(input).reports, [ + { kind: "test", pattern: "junit.xml" }, + ]); + assert.throws( + () => ReportDefinition.create({ ...input, results: " " }), + /must not be empty/, + ); + assert.throws( + () => ReportDefinition.create({ ...input, mapping: "[]" }), + /JSON object/, + ); +}); diff --git a/tests/continuous-integration/reporting.test.js b/tests/continuous-integration/reporting.test.js index d7fbd3d5..0dd9d926 100644 --- a/tests/continuous-integration/reporting.test.js +++ b/tests/continuous-integration/reporting.test.js @@ -1,59 +1,10 @@ import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; import { createRequire } from "node:module"; import test from "node:test"; -import { readFileSync } from "node:fs"; import { parse } from "yaml"; -const require = createRequire(import.meta.url); -const { - ReportDefinition, -} = require("../../actions/reporting/ReportDefinition.cjs"); -const base = { - kind: "test", - workspace: "/repository", - directory: "/repository/app", - runtime: "v26.0.0", - results: "junit.xml", - coverage: "false", -}; - -test("container reports require an explicit source and map back to the checkout", () => { - assert.throws( - () => ReportDefinition.create({ ...base, directory: "/image/app" }), - /requires source-sha and source-prefix/, - ); - const definition = ReportDefinition.create({ - ...base, - directory: "/image/app", - sourceSha: "a".repeat(40), - sourcePrefix: "app", - }); - assert.equal(definition.project, "app"); - assert.deepEqual(definition["path-mapping"], { "/image/app": "app" }); - assert.equal(definition.source.sha, "a".repeat(40)); -}); -test("secondary runs retain tests without coverage promises; merged coverage identifies every shard", () => { - const tests = ReportDefinition.create(base); - assert.deepEqual(tests.reports, [{ kind: "test", pattern: "junit.xml" }]); - const merged = ReportDefinition.create({ - ...base, - coverage: "true", - coveragePaths: "coverage/lcov.info", - shards: "2", - }); - assert.deepEqual(merged.reports[1].shards, { - expected: ["1", "2"], - included: ["1", "2"], - }); - assert.throws( - () => ReportDefinition.create({ ...base, results: " " }), - /must not be empty/, - ); - assert.throws( - () => ReportDefinition.create({ ...base, mapping: "[]" }), - /JSON object/, - ); -}); +const require = createRequire(import.meta.url); test("a failed project command preserves its exit status and receives the fresh report directory", async () => { const action = parse( From e83767d00d66b692aafa5a5d697fbf8aaba3b444 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Mon, 30 Nov 2026 13:40:38 +0100 Subject: [PATCH 31/48] refactor!: own lint and test report definitions per action --- .../__commit-action-distributions.yml | 2 +- .../__rebuild-action-distributions.yml | 2 +- .github/workflows/__shared-ci.yml | 6 +- .github/workflows/__test-action-lint.yml | 2 +- .github/workflows/__test-action-test.yml | 2 +- .github/workflows/continuous-integration.md | 10 ++- .github/workflows/continuous-integration.yml | 2 +- actions/lint/.npmrc | 1 - actions/lint/README.md | 2 +- actions/lint/action.yml | 9 +-- actions/lint/dist/index.js | 49 ++---------- actions/lint/dist/licenses.txt | 2 - actions/lint/package-lock.json | 11 --- actions/lint/package.json | 3 - actions/lint/src/ReportDefinition.cjs | 57 +++++++++++++ actions/lint/src/contracts.test.cjs | 37 ++++++++- actions/lint/src/index.js | 2 +- actions/test/.npmrc | 1 - actions/test/README.md | 2 +- actions/test/action.yml | 6 +- actions/test/dist/index.js | 11 ++- actions/test/dist/licenses.txt | 2 - actions/test/package-lock.json | 11 --- actions/test/package.json | 3 - .../test}/src/ReportDefinition.cjs | 7 +- actions/test/src/contracts.test.cjs | 79 +++++++++++++++++- actions/test/src/index.js | 2 +- docs/development/reporting-actions.md | 34 ++++---- packages/reporting/package-lock.json | 16 ---- packages/reporting/package.json | 21 ----- .../reporting/src/ReportDefinition.test.cjs | 80 ------------------- scripts/test-packages.sh | 8 +- 32 files changed, 228 insertions(+), 254 deletions(-) delete mode 100644 actions/lint/.npmrc delete mode 100644 actions/lint/dist/licenses.txt create mode 100644 actions/lint/src/ReportDefinition.cjs delete mode 100644 actions/test/.npmrc delete mode 100644 actions/test/dist/licenses.txt rename {packages/reporting => actions/test}/src/ReportDefinition.cjs (94%) delete mode 100644 packages/reporting/package-lock.json delete mode 100644 packages/reporting/package.json delete mode 100644 packages/reporting/src/ReportDefinition.test.cjs diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml index da4a350e..342de33f 100644 --- a/.github/workflows/__commit-action-distributions.yml +++ b/.github/workflows/__commit-action-distributions.yml @@ -9,7 +9,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml index 33a183bd..ae4cdd3d 100644 --- a/.github/workflows/__rebuild-action-distributions.yml +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -8,7 +8,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 20d104db..7174784d 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index daa1aab6..a9abfe27 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/lint run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) with: working-directory: actions/lint - name: Arrange - Create a dependency-free lint project diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index ff17a435..982c40ae 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/test run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) with: working-directory: actions/test - name: Arrange - Create a dependency-free native test project diff --git a/.github/workflows/continuous-integration.md b/.github/workflows/continuous-integration.md index a43d1041..1af25655 100644 --- a/.github/workflows/continuous-integration.md +++ b/.github/workflows/continuous-integration.md @@ -2,6 +2,12 @@ # GitHub Reusable Workflow: Node.js Continuous Integration +
+ Node.js Continuous Integration +
+ +--- + @@ -32,7 +38,7 @@ lint.sarif. Configure test-results, test-coverage or lint-results beside the command when a runner needs separate files. See [native test reports](../../docs/usage/test-reports.md). Merge shards natively; their coverage output remains separate. -Call common ci-reports.yml once after all producer jobs with +Call common publish-ci-reports.yml once after all producer jobs with job-results: toJSON(needs). No report plans or artifact IDs need forwarding. Add a separate CI complete job using common actions/check-jobs, with direct needs on all required producers and reporting, and if: always(). @@ -68,7 +74,7 @@ on: permissions: {} jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@d580938064613e6d666f79320109f94dc98875b7 # feat/native-github-coverage + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@191d7230d57982bfc11d57f68b005f386a6d7fbf # 3.1.1 permissions: actions: read contents: read diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 946dbaba..ef334f44 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -8,7 +8,7 @@ # command when a runner needs separate files. See [native test reports](../../docs/usage/test-reports.md). # Merge shards natively; their coverage output remains separate. -# Call common ci-reports.yml once after all producer jobs with +# Call common publish-ci-reports.yml once after all producer jobs with # job-results: toJSON(needs). No report plans or artifact IDs need forwarding. # Add a separate CI complete job using common actions/check-jobs, with direct # needs on all required producers and reporting, and if: always(). diff --git a/actions/lint/.npmrc b/actions/lint/.npmrc deleted file mode 100644 index c7d35173..00000000 --- a/actions/lint/.npmrc +++ /dev/null @@ -1 +0,0 @@ -install-links=true diff --git a/actions/lint/README.md b/actions/lint/README.md index 3f4fa261..33a214e6 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -41,7 +41,7 @@ Producer jobs require actions: read and contents: read, with source checked out ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@08ae42573170b2fe9702a919dc468eb212884cc0 +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@191d7230d57982bfc11d57f68b005f386a6d7fbf # 3.1.1 with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/lint/action.yml b/actions/lint/action.yml index ddf227c8..f3503260 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -88,13 +88,12 @@ runs: const { ReportDefinition } = require(process.env.NODE_ACTION_PATH + '/dist/index.js'); const runtime = await exec.getExecOutput('node', ['--version'], {silent: true}); core.setOutput('definition', ReportDefinition.create({ - kind: 'lint', workspace: process.env.GITHUB_WORKSPACE, directory: process.env.WORKING_DIRECTORY, + workspace: process.env.GITHUB_WORKSPACE, directory: process.env.WORKING_DIRECTORY, runtime: runtime.stdout.trim(), sourceSha: process.env.SOURCE_SHA, sourcePrefix: process.env.SOURCE_PREFIX, - mapping: process.env.PATH_MAPPING, results: process.env.RESULTS, coverage: process.env.COVERAGE, - coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS + mapping: process.env.PATH_MAPPING, results: process.env.RESULTS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -138,7 +137,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/lint/dist/index.js b/actions/lint/dist/index.js index d899f1b7..5806f0b6 100644 --- a/actions/lint/dist/index.js +++ b/actions/lint/dist/index.js @@ -4,17 +4,9 @@ /***/ 105: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(845); +module.exports = __nccwpck_require__(41); -/***/ }), - -/***/ 24: -/***/ ((module) => { - -"use strict"; -module.exports = require("node:fs"); - /***/ }), /***/ 760: @@ -25,10 +17,9 @@ module.exports = require("node:path"); /***/ }), -/***/ 845: +/***/ 41: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -const fs = __nccwpck_require__(24); const path = __nccwpck_require__(760); /** Build the producer contract before any project check executes. */ @@ -44,7 +35,6 @@ const ReportDefinition = { }, create({ - kind, workspace, directory, runtime, @@ -52,9 +42,6 @@ const ReportDefinition = { sourcePrefix, mapping, results, - coverage, - coveragePaths, - shards, }) { const relative = path .relative(workspace, directory) @@ -75,38 +62,12 @@ const ReportDefinition = { throw new Error("path-mapping must be a JSON object."); if (outside) mappings[directory.replace(/\/$/, "")] = project; const reports = ReportDefinition.paths(results).map((pattern) => ({ - kind, + kind: "lint", pattern, })); - if (kind === "test" && coverage === "true") { - const language = fs.existsSync(path.join(directory, "tsconfig.json")) - ? "TypeScript" - : "JavaScript"; - const count = shards ? Number(shards) : 0; - if (shards && (!Number.isSafeInteger(count) || count < 2 || count > 256)) - throw new Error("Invalid merged shard count."); - reports.push( - ...ReportDefinition.paths(coveragePaths).map((pattern) => ({ - kind: "coverage", - pattern, - language, - ...(count - ? { - shards: { - expected: Array.from({ length: count }, (_, index) => - String(index + 1), - ), - included: Array.from({ length: count }, (_, index) => - String(index + 1), - ), - }, - } - : {}), - })), - ); - } + return { - name: kind === "test" ? "Node.js tests" : "Node.js lint", + name: "Node.js lint", project, variant: { runtime }, reports, diff --git a/actions/lint/dist/licenses.txt b/actions/lint/dist/licenses.txt deleted file mode 100644 index 87492513..00000000 --- a/actions/lint/dist/licenses.txt +++ /dev/null @@ -1,2 +0,0 @@ -@hoverkraft-tech/nodejs-reporting -MIT diff --git a/actions/lint/package-lock.json b/actions/lint/package-lock.json index 1e1e81b4..ac570854 100644 --- a/actions/lint/package-lock.json +++ b/actions/lint/package-lock.json @@ -8,9 +8,6 @@ "name": "lint-report-definition", "version": "1.0.0", "license": "MIT", - "dependencies": { - "@hoverkraft-tech/nodejs-reporting": "file:../../packages/reporting" - }, "devDependencies": { "@vercel/ncc": "0.45.0" }, @@ -18,14 +15,6 @@ "node": ">=24.0.0" } }, - "node_modules/@hoverkraft-tech/nodejs-reporting": { - "version": "0.0.0", - "resolved": "file:../../packages/reporting", - "license": "MIT", - "engines": { - "node": ">=24.0.0" - } - }, "node_modules/@vercel/ncc": { "version": "0.45.0", "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.45.0.tgz", diff --git a/actions/lint/package.json b/actions/lint/package.json index 17074297..f1fc8832 100644 --- a/actions/lint/package.json +++ b/actions/lint/package.json @@ -12,9 +12,6 @@ "engines": { "node": ">=24.0.0" }, - "dependencies": { - "@hoverkraft-tech/nodejs-reporting": "file:../../packages/reporting" - }, "devDependencies": { "@vercel/ncc": "0.45.0" }, diff --git a/actions/lint/src/ReportDefinition.cjs b/actions/lint/src/ReportDefinition.cjs new file mode 100644 index 00000000..aa272678 --- /dev/null +++ b/actions/lint/src/ReportDefinition.cjs @@ -0,0 +1,57 @@ +const path = require("node:path"); + +/** Build the producer contract before any project check executes. */ +const ReportDefinition = { + paths(value) { + const paths = value + .split(/\r?\n/) + .map((item) => item.trim()) + .filter(Boolean); + if (!paths.length) + throw new Error("Required report paths must not be empty."); + return paths; + }, + + create({ + workspace, + directory, + runtime, + sourceSha, + sourcePrefix, + mapping, + results, + }) { + const relative = path + .relative(workspace, directory) + .split(path.sep) + .join("/"); + const outside = + relative === ".." || + relative.startsWith("../") || + path.isAbsolute(relative); + if (outside && (!sourceSha || !sourcePrefix)) { + throw new Error( + "A prebuilt container requires source-sha and source-prefix, and a checkout of that source in GITHUB_WORKSPACE.", + ); + } + const project = outside ? sourcePrefix : relative || "."; + const mappings = mapping ? JSON.parse(mapping) : {}; + if (!mappings || typeof mappings !== "object" || Array.isArray(mappings)) + throw new Error("path-mapping must be a JSON object."); + if (outside) mappings[directory.replace(/\/$/, "")] = project; + const reports = ReportDefinition.paths(results).map((pattern) => ({ + kind: "lint", + pattern, + })); + + return { + name: "Node.js lint", + project, + variant: { runtime }, + reports, + "path-mapping": mappings, + ...(sourceSha ? { source: { sha: sourceSha } } : {}), + }; + }, +}; +module.exports = { ReportDefinition }; diff --git a/actions/lint/src/contracts.test.cjs b/actions/lint/src/contracts.test.cjs index 2f6c780f..4d4c3fde 100644 --- a/actions/lint/src/contracts.test.cjs +++ b/actions/lint/src/contracts.test.cjs @@ -1,2 +1,35 @@ -// Reuse producer contracts against source or the isolated action bundle. -require("@hoverkraft-tech/nodejs-reporting/contracts"); +const assert = require("node:assert/strict"); +const test = require("node:test"); +const { ReportDefinition } = require( + process.env.ACTION_ENTRYPOINT || "./ReportDefinition.cjs", +); +test("lint definitions retain lint-only selectors and map the measured project", () => { + const input = { + workspace: "/checkout", + directory: "/checkout/api", + runtime: "v24", + results: "eslint.json\nlint.sarif", + }; + const definition = ReportDefinition.create(input); + assert.equal(definition.project, "api"); + assert.deepEqual(definition.reports, [ + { kind: "lint", pattern: "eslint.json" }, + { kind: "lint", pattern: "lint.sarif" }, + ]); + assert.throws( + () => ReportDefinition.create({ ...input, results: " " }), + /must not be empty/, + ); + assert.throws( + () => ReportDefinition.create({ ...input, directory: "/image/app" }), + /source-sha and source-prefix/, + ); + const image = ReportDefinition.create({ + ...input, + directory: "/image/app", + sourceSha: "a".repeat(40), + sourcePrefix: "api", + }); + assert.deepEqual(image["path-mapping"], { "/image/app": "api" }); + assert.equal(image.source.sha, "a".repeat(40)); +}); diff --git a/actions/lint/src/index.js b/actions/lint/src/index.js index 58ba16be..4de2db9d 100644 --- a/actions/lint/src/index.js +++ b/actions/lint/src/index.js @@ -1 +1 @@ -module.exports = require("@hoverkraft-tech/nodejs-reporting"); +module.exports = require("./ReportDefinition.cjs"); diff --git a/actions/test/.npmrc b/actions/test/.npmrc deleted file mode 100644 index c7d35173..00000000 --- a/actions/test/.npmrc +++ /dev/null @@ -1 +0,0 @@ -install-links=true diff --git a/actions/test/README.md b/actions/test/README.md index b0289e88..4ca7fe6c 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -45,7 +45,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@08ae42573170b2fe9702a919dc468eb212884cc0 +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@191d7230d57982bfc11d57f68b005f386a6d7fbf # 3.1.1 with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/test/action.yml b/actions/test/action.yml index 311e6a64..d60db326 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -181,14 +181,14 @@ runs: const { ReportDefinition } = require(process.env.NODE_ACTION_PATH + '/dist/index.js'); const runtime = await exec.getExecOutput('node', ['--version'], {silent: true}); core.setOutput('definition', ReportDefinition.create({ - kind: 'test', workspace: process.env.GITHUB_WORKSPACE, directory: process.env.WORKING_DIRECTORY, + workspace: process.env.GITHUB_WORKSPACE, directory: process.env.WORKING_DIRECTORY, runtime: runtime.stdout.trim(), sourceSha: process.env.SOURCE_SHA, sourcePrefix: process.env.SOURCE_PREFIX, mapping: process.env.PATH_MAPPING, results: process.env.RESULTS, coverage: process.env.COVERAGE, coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@95dfb5620ba01b459bcca619eccd0acbad871a8a # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/dist/index.js b/actions/test/dist/index.js index d899f1b7..76640890 100644 --- a/actions/test/dist/index.js +++ b/actions/test/dist/index.js @@ -4,7 +4,7 @@ /***/ 105: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(845); +module.exports = __nccwpck_require__(41); /***/ }), @@ -25,7 +25,7 @@ module.exports = require("node:path"); /***/ }), -/***/ 845: +/***/ 41: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { const fs = __nccwpck_require__(24); @@ -44,7 +44,6 @@ const ReportDefinition = { }, create({ - kind, workspace, directory, runtime, @@ -75,10 +74,10 @@ const ReportDefinition = { throw new Error("path-mapping must be a JSON object."); if (outside) mappings[directory.replace(/\/$/, "")] = project; const reports = ReportDefinition.paths(results).map((pattern) => ({ - kind, + kind: "test", pattern, })); - if (kind === "test" && coverage === "true") { + if (coverage === "true") { const language = fs.existsSync(path.join(directory, "tsconfig.json")) ? "TypeScript" : "JavaScript"; @@ -106,7 +105,7 @@ const ReportDefinition = { ); } return { - name: kind === "test" ? "Node.js tests" : "Node.js lint", + name: "Node.js tests", project, variant: { runtime }, reports, diff --git a/actions/test/dist/licenses.txt b/actions/test/dist/licenses.txt deleted file mode 100644 index 87492513..00000000 --- a/actions/test/dist/licenses.txt +++ /dev/null @@ -1,2 +0,0 @@ -@hoverkraft-tech/nodejs-reporting -MIT diff --git a/actions/test/package-lock.json b/actions/test/package-lock.json index a1897244..00914c52 100644 --- a/actions/test/package-lock.json +++ b/actions/test/package-lock.json @@ -8,9 +8,6 @@ "name": "test-report-definition", "version": "1.0.0", "license": "MIT", - "dependencies": { - "@hoverkraft-tech/nodejs-reporting": "file:../../packages/reporting" - }, "devDependencies": { "@vercel/ncc": "0.45.0" }, @@ -18,14 +15,6 @@ "node": ">=24.0.0" } }, - "node_modules/@hoverkraft-tech/nodejs-reporting": { - "version": "0.0.0", - "resolved": "file:../../packages/reporting", - "license": "MIT", - "engines": { - "node": ">=24.0.0" - } - }, "node_modules/@vercel/ncc": { "version": "0.45.0", "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.45.0.tgz", diff --git a/actions/test/package.json b/actions/test/package.json index 0434eb3e..ff3818fc 100644 --- a/actions/test/package.json +++ b/actions/test/package.json @@ -12,9 +12,6 @@ "engines": { "node": ">=24.0.0" }, - "dependencies": { - "@hoverkraft-tech/nodejs-reporting": "file:../../packages/reporting" - }, "devDependencies": { "@vercel/ncc": "0.45.0" }, diff --git a/packages/reporting/src/ReportDefinition.cjs b/actions/test/src/ReportDefinition.cjs similarity index 94% rename from packages/reporting/src/ReportDefinition.cjs rename to actions/test/src/ReportDefinition.cjs index bb0b86fa..f32307fd 100644 --- a/packages/reporting/src/ReportDefinition.cjs +++ b/actions/test/src/ReportDefinition.cjs @@ -14,7 +14,6 @@ const ReportDefinition = { }, create({ - kind, workspace, directory, runtime, @@ -45,10 +44,10 @@ const ReportDefinition = { throw new Error("path-mapping must be a JSON object."); if (outside) mappings[directory.replace(/\/$/, "")] = project; const reports = ReportDefinition.paths(results).map((pattern) => ({ - kind, + kind: "test", pattern, })); - if (kind === "test" && coverage === "true") { + if (coverage === "true") { const language = fs.existsSync(path.join(directory, "tsconfig.json")) ? "TypeScript" : "JavaScript"; @@ -76,7 +75,7 @@ const ReportDefinition = { ); } return { - name: kind === "test" ? "Node.js tests" : "Node.js lint", + name: "Node.js tests", project, variant: { runtime }, reports, diff --git a/actions/test/src/contracts.test.cjs b/actions/test/src/contracts.test.cjs index 2f6c780f..b84dd71f 100644 --- a/actions/test/src/contracts.test.cjs +++ b/actions/test/src/contracts.test.cjs @@ -1,2 +1,77 @@ -// Reuse producer contracts against source or the isolated action bundle. -require("@hoverkraft-tech/nodejs-reporting/contracts"); +const assert = require("node:assert/strict"); +const test = require("node:test"); +const { ReportDefinition } = require( + process.env.ACTION_ENTRYPOINT || "./ReportDefinition.cjs", +); + +test("prebuilt checks require explicit source identity and map paths to the checkout", () => { + const input = { + workspace: "/checkout", + directory: "/image/app", + runtime: "v24", + results: "results.json", + coverage: "true", + coveragePaths: "results.json", + }; + assert.throws( + () => ReportDefinition.create(input), + /source-sha and source-prefix/, + ); + const definition = ReportDefinition.create({ + ...input, + sourceSha: "a".repeat(40), + sourcePrefix: "apps/api", + }); + assert.equal(definition.project, "apps/api"); + assert.equal(definition.source.sha, "a".repeat(40)); + assert.deepEqual(definition["path-mapping"], { "/image/app": "apps/api" }); + assert.deepEqual( + definition.reports.map(({ kind, pattern }) => ({ kind, pattern })), + [ + { kind: "test", pattern: "results.json" }, + { kind: "coverage", pattern: "results.json" }, + ], + ); +}); + +test("invalid merged shard counts cannot silently become an unsharded report", () => { + const input = { + workspace: "/checkout", + directory: "/checkout", + runtime: "v24", + results: "junit.xml", + coverage: "true", + coveragePaths: "lcov.info", + }; + for (const shards of ["invalid", "0", "1", "257"]) + assert.throws( + () => ReportDefinition.create({ ...input, shards }), + /Invalid merged shard count/, + ); + const definition = ReportDefinition.create({ ...input, shards: "2" }); + assert.deepEqual(definition.reports[1].shards, { + expected: ["1", "2"], + included: ["1", "2"], + }); +}); + +test("secondary runs retain tests without coverage promises and reject invalid report inputs", () => { + const input = { + workspace: "/repository", + directory: "/repository/app", + runtime: "v24", + results: "junit.xml", + coverage: "false", + }; + assert.deepEqual(ReportDefinition.create(input).reports, [ + { kind: "test", pattern: "junit.xml" }, + ]); + assert.throws( + () => ReportDefinition.create({ ...input, results: " " }), + /must not be empty/, + ); + assert.throws( + () => ReportDefinition.create({ ...input, mapping: "[]" }), + /JSON object/, + ); +}); diff --git a/actions/test/src/index.js b/actions/test/src/index.js index 58ba16be..4de2db9d 100644 --- a/actions/test/src/index.js +++ b/actions/test/src/index.js @@ -1 +1 @@ -module.exports = require("@hoverkraft-tech/nodejs-reporting"); +module.exports = require("./ReportDefinition.cjs"); diff --git a/docs/development/reporting-actions.md b/docs/development/reporting-actions.md index 100dcb86..08041913 100644 --- a/docs/development/reporting-actions.md +++ b/docs/development/reporting-actions.md @@ -1,27 +1,23 @@ # Maintaining reporting actions -The lint and test actions compose Common's public recorder through `uses:`. -Neither action imports another action's source. Their shared definition builder -lives in the private `packages/reporting` package. Each action declares that local -dependency and bundles it in its own distribution, without runtime installation. +The lint and test actions each own their report definition builder, tests, +lockfile and bundle. They compose Common's public recorder through `uses:`. +Neither action imports another action's source or depends on a shared local package. -After changing the library, reinstall dependencies and rebuild both actions: +The lint builder describes lint selectors and the measured project. The test +builder describes native test results, optional coverage, and completed shard +merges. Both retain source mapping; Common's public validator owns native report +validation and reporting policy. + +After editing an action, test and rebuild that action: ```bash -npm ci --ignore-scripts --prefix packages/reporting -npm test --prefix packages/reporting -for action in lint test; do - npm ci --ignore-scripts --prefix "actions/$action" - npm test --prefix "actions/$action" - npm run build --prefix "actions/$action" -done +npm ci --ignore-scripts --prefix actions/test +npm test --prefix actions/test +npm run build --prefix actions/test ``` -Commit both distributions. The dedicated lint and test workflows verify -reproducibility, isolated distribution contracts, and actual native report -recording. The shared distribution automation follows trusted local dependencies -when updating bot pull requests; it cannot widen the writer's output allowlist. - -Keep report policy in Common. This package only describes the checked project, -runtime, source mapping, requested native reports and completed shard merge. +Commit the updated distribution. Dedicated lint and test workflows verify +reproducibility, isolated distribution contracts and actual native report +recording. The outer `publish-ci-reports.yml` workflow handles publication. See the [consumer guide](../usage/test-reports.md) for report generation. diff --git a/packages/reporting/package-lock.json b/packages/reporting/package-lock.json deleted file mode 100644 index 0c723c04..00000000 --- a/packages/reporting/package-lock.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "name": "@hoverkraft-tech/nodejs-reporting", - "version": "0.0.0", - "lockfileVersion": 3, - "requires": true, - "packages": { - "": { - "name": "@hoverkraft-tech/nodejs-reporting", - "version": "0.0.0", - "license": "MIT", - "engines": { - "node": ">=24.0.0" - } - } - } -} diff --git a/packages/reporting/package.json b/packages/reporting/package.json deleted file mode 100644 index e37ae4c5..00000000 --- a/packages/reporting/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "@hoverkraft-tech/nodejs-reporting", - "version": "0.0.0", - "private": true, - "description": "Shared Node.js producer report definitions", - "main": "src/ReportDefinition.cjs", - "exports": { - ".": "./src/ReportDefinition.cjs", - "./contracts": "./src/ReportDefinition.test.cjs" - }, - "files": [ - "src" - ], - "scripts": { - "test": "node --test" - }, - "engines": { - "node": ">=24.0.0" - }, - "license": "MIT" -} diff --git a/packages/reporting/src/ReportDefinition.test.cjs b/packages/reporting/src/ReportDefinition.test.cjs deleted file mode 100644 index dd87f480..00000000 --- a/packages/reporting/src/ReportDefinition.test.cjs +++ /dev/null @@ -1,80 +0,0 @@ -const assert = require("node:assert/strict"); -const test = require("node:test"); -const { ReportDefinition } = require( - process.env.ACTION_ENTRYPOINT || "./ReportDefinition.cjs", -); - -test("prebuilt checks require explicit source identity and map paths to the checkout", () => { - const input = { - kind: "test", - workspace: "/checkout", - directory: "/image/app", - runtime: "v24", - results: "results.json", - coverage: "true", - coveragePaths: "results.json", - }; - assert.throws( - () => ReportDefinition.create(input), - /source-sha and source-prefix/, - ); - const definition = ReportDefinition.create({ - ...input, - sourceSha: "a".repeat(40), - sourcePrefix: "apps/api", - }); - assert.equal(definition.project, "apps/api"); - assert.equal(definition.source.sha, "a".repeat(40)); - assert.deepEqual(definition["path-mapping"], { "/image/app": "apps/api" }); - assert.deepEqual( - definition.reports.map(({ kind, pattern }) => ({ kind, pattern })), - [ - { kind: "test", pattern: "results.json" }, - { kind: "coverage", pattern: "results.json" }, - ], - ); -}); - -test("invalid merged shard counts cannot silently become an unsharded report", () => { - const input = { - kind: "test", - workspace: "/checkout", - directory: "/checkout", - runtime: "v24", - results: "junit.xml", - coverage: "true", - coveragePaths: "lcov.info", - }; - for (const shards of ["invalid", "0", "1", "257"]) - assert.throws( - () => ReportDefinition.create({ ...input, shards }), - /Invalid merged shard count/, - ); - const definition = ReportDefinition.create({ ...input, shards: "2" }); - assert.deepEqual(definition.reports[1].shards, { - expected: ["1", "2"], - included: ["1", "2"], - }); -}); - -test("secondary runs retain tests without coverage promises and reject invalid report inputs", () => { - const input = { - kind: "test", - workspace: "/repository", - directory: "/repository/app", - runtime: "v24", - results: "junit.xml", - coverage: "false", - }; - assert.deepEqual(ReportDefinition.create(input).reports, [ - { kind: "test", pattern: "junit.xml" }, - ]); - assert.throws( - () => ReportDefinition.create({ ...input, results: " " }), - /must not be empty/, - ); - assert.throws( - () => ReportDefinition.create({ ...input, mapping: "[]" }), - /JSON object/, - ); -}); diff --git a/scripts/test-packages.sh b/scripts/test-packages.sh index e9fa6582..e5929df4 100755 --- a/scripts/test-packages.sh +++ b/scripts/test-packages.sh @@ -151,7 +151,7 @@ run_audit_fix_for_pm() { } run_for_each_test_package() { - packages="$(find tests actions packages -type f -name package.json -not -path '*/node_modules/*' -print | sort)" + packages="$(find tests actions -type f -name package.json -not -path '*/node_modules/*' -not -path '*/dist/*' -print | sort)" for pkg in $packages; do pkg_dir="$(dirname "$pkg")" @@ -186,13 +186,13 @@ run_for_each_test_package() { case "$action" in install) - echo "Installing dependencies for package.json files under tests/, actions/ and packages/ ..." + echo "Installing dependencies for package.json files under tests/ and actions/ ..." ;; update-interactive) - echo "Running interactive dependency updates for package.json files under tests/, actions/ and packages/ ..." + echo "Running interactive dependency updates for package.json files under tests/ and actions/ ..." ;; audit-fix) - echo "Running dependency audit/fix for package.json files under tests/, actions/ and packages/ ..." + echo "Running dependency audit/fix for package.json files under tests/ and actions/ ..." ;; *) echo "Unsupported action: $action" >&2 From 3f3820f46c01e8782de7166ae3fff5a67341ba44 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Mon, 30 Nov 2026 14:00:45 +0100 Subject: [PATCH 32/48] fix(ci): use bounded coverage evidence validation --- .github/workflows/__commit-action-distributions.yml | 2 +- .github/workflows/__rebuild-action-distributions.yml | 2 +- .github/workflows/__shared-ci.yml | 6 +++--- .github/workflows/__test-action-lint.yml | 2 +- .github/workflows/__test-action-test.yml | 2 +- actions/lint/action.yml | 4 ++-- actions/test/action.yml | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml index 342de33f..242d5675 100644 --- a/.github/workflows/__commit-action-distributions.yml +++ b/.github/workflows/__commit-action-distributions.yml @@ -9,7 +9,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml index ae4cdd3d..a68a5647 100644 --- a/.github/workflows/__rebuild-action-distributions.yml +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -8,7 +8,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 7174784d..10ebb530 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index a9abfe27..f4c6e9b7 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/lint run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) with: working-directory: actions/lint - name: Arrange - Create a dependency-free lint project diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 982c40ae..78e77bce 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/test run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) with: working-directory: actions/test - name: Arrange - Create a dependency-free native test project diff --git a/actions/lint/action.yml b/actions/lint/action.yml index f3503260..db510c54 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -93,7 +93,7 @@ runs: mapping: process.env.PATH_MAPPING, results: process.env.RESULTS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -137,7 +137,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} diff --git a/actions/test/action.yml b/actions/test/action.yml index d60db326..46708d59 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -188,7 +188,7 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) with: operation: prepare definition: ${{ steps.definition.outputs.definition }} @@ -282,7 +282,7 @@ runs: - id: reports name: Validate and retain native reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@0dbf8c312048a8d354e1b0bab3e90627114c6faa # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) with: operation: finalize recording: ${{ steps.prepare-reports.outputs.recording }} From ad95c2d3354cf5c0755a0325ba55f7615ff0d955 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Mon, 30 Nov 2026 17:11:27 +0100 Subject: [PATCH 33/48] refactor(reports)!: compose common report preparation --- .../__commit-action-distributions.yml | 2 +- .../__rebuild-action-distributions.yml | 2 +- .github/workflows/__shared-ci.yml | 6 +- .github/workflows/__test-action-lint.yml | 2 +- .github/workflows/__test-action-test.yml | 12 ++-- actions/lint/README.md | 29 +-------- actions/lint/action.yml | 32 ++++++---- actions/test/README.md | 29 +-------- actions/test/action.yml | 59 +++++++++++++------ docs/development/reporting-actions.md | 7 +-- 10 files changed, 81 insertions(+), 99 deletions(-) diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml index 242d5675..5b4f505e 100644 --- a/.github/workflows/__commit-action-distributions.yml +++ b/.github/workflows/__commit-action-distributions.yml @@ -9,7 +9,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml index a68a5647..3cc22e24 100644 --- a/.github/workflows/__rebuild-action-distributions.yml +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -8,7 +8,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 10ebb530..4c1ab07d 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index f4c6e9b7..8bccccb8 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/lint run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) with: working-directory: actions/lint - name: Arrange - Create a dependency-free lint project diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 78e77bce..693ca6a0 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/test run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) with: working-directory: actions/test - name: Arrange - Create a dependency-free native test project @@ -70,10 +70,10 @@ jobs: script: | const assert = require('node:assert/strict'); const fs = require('node:fs'); - const result = JSON.parse(fs.readFileSync('downloaded-reports/result.json', 'utf8')); + const result = JSON.parse(fs.readFileSync('downloaded-reports/report.json', 'utf8')); assert.equal(result.outcome, 'success'); assert.deepEqual(result.errors, []); - assert.equal(result.assets.filter(item => item.selector.kind === 'test').length, 1); - assert.equal(result.assets.filter(item => item.selector.kind === 'coverage').length, 1); - assert.match(fs.readFileSync('downloaded-reports/reports/junit.xml', 'utf8'), / item.kind === 'test').length, 1); + assert.equal(result.reports.filter(item => item.kind === 'coverage').length, 1); + assert.match(fs.readFileSync('downloaded-reports/native/1-junit.xml', 'utf8'), / - Lint - - ---- - [![Marketplace](https://img.shields.io/badge/Marketplace-lint-blue?logo=github-actions)](https://github.com/marketplace/actions/lint) [![Release](https://img.shields.io/github/v/release/hoverkraft-tech/ci-github-nodejs)](https://github.com/hoverkraft-tech/ci-github-nodejs/releases) -[![License](https://img.shields.io/github/license/hoverkraft-tech/ci-github-nodejs)](http://choosealicense.com/licenses/mit/) [![Stars](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-nodejs?style=social)](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-nodejs?style=social) -[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/hoverkraft-tech/ci-github-nodejs/blob/main/CONTRIBUTING.md) -![GitHub Verified Creator](https://img.shields.io/badge/GitHub-Verified%20Creator-4493F8?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJyZ2IoNjgsIDE0NywgMjQ4KSI+CiAgPHBhdGggZD0ibTkuNTg1LjUyLjkyOS42OGMuMTUzLjExMi4zMzEuMTg2LjUxOC4yMTVsMS4xMzguMTc1YTIuNjc4IDIuNjc4IDAgMCAxIDIuMjQgMi4yNGwuMTc0IDEuMTM5Yy4wMjkuMTg3LjEwMy4zNjUuMjE1LjUxOGwuNjguOTI4YTIuNjc3IDIuNjc3IDAgMCAxIDAgMy4xN2wtLjY4LjkyOGExLjE3NCAxLjE3NCAwIDAgMC0uMjE1LjUxOGwtLjE3NSAxLjEzOGEyLjY3OCAyLjY3OCAwIDAgMS0yLjI0MSAyLjI0MWwtMS4xMzguMTc1YTEuMTcgMS4xNyAwIDAgMC0uNTE4LjIxNWwtLjkyOC42OGEyLjY3NyAyLjY3NyAwIDAgMS0zLjE3IDBsLS45MjgtLjY4YTEuMTc0IDEuMTc0IDAgMCAwLS41MTgtLjIxNUwzLjgzIDE0LjQxYTIuNjc4IDIuNjc4IDAgMCAxLTIuMjQtMi4yNGwtLjE3NS0xLjEzOGExLjE3IDEuMTcgMCAwIDAtLjIxNS0uNTE4bC0uNjgtLjkyOGEyLjY3NyAyLjY3NyAwIDAgMSAwLTMuMTdsLjY4LS45MjhjLjExMi0uMTUzLjE4Ni0uMzMxLjIxNS0uNTE4bC4xNzUtMS4xNGEyLjY3OCAyLjY3OCAwIDAgMSAyLjI0LTIuMjRsMS4xMzktLjE3NWMuMTg3LS4wMjkuMzY1LS4xMDMuNTE4LS4yMTVsLjkyOC0uNjhhMi42NzcgMi42NzcgMCAwIDEgMy4xNyAwWk03LjMwMyAxLjcyOGwtLjkyNy42OGEyLjY3IDIuNjcgMCAwIDEtMS4xOC40ODlsLTEuMTM3LjE3NGExLjE3OSAxLjE3OSAwIDAgMC0uOTg3Ljk4N2wtLjE3NCAxLjEzNmEyLjY3NyAyLjY3NyAwIDAgMS0uNDg5IDEuMThsLS42OC45MjhhMS4xOCAxLjE4IDAgMCAwIDAgMS4zOTRsLjY4LjkyN2MuMjU2LjM0OC40MjQuNzUzLjQ4OSAxLjE4bC4xNzQgMS4xMzdjLjA3OC41MDkuNDc4LjkwOS45ODcuOTg3bDEuMTM2LjE3NGEyLjY3IDIuNjcgMCAwIDEgMS4xOC40ODlsLjkyOC42OGMuNDE0LjMwNS45NzkuMzA1IDEuMzk0IDBsLjkyNy0uNjhhMi42NyAyLjY3IDAgMCAxIDEuMTgtLjQ4OWwxLjEzNy0uMTc0YTEuMTggMS4xOCAwIDAgMCAuOTg3LS45ODdsLjE3NC0xLjEzNmEyLjY3IDIuNjcgMCAwIDEgLjQ4OS0xLjE4bC42OC0uOTI4YTEuMTc2IDEuMTc2IDAgMCAwIDAtMS4zOTRsLS42OC0uOTI3YTIuNjg2IDIuNjg2IDAgMCAxLS40ODktMS4xOGwtLjE3NC0xLjEzN2ExLjE3OSAxLjE3OSAwIDAgMC0uOTg3LS45ODdsLTEuMTM2LS4xNzRhMi42NzcgMi42NzcgMCAwIDEtMS4xOC0uNDg5bC0uOTI4LS42OGExLjE3NiAxLjE3NiAwIDAgMC0xLjM5NCAwWk0xMS4yOCA2Ljc4bC0zLjc1IDMuNzVhLjc1Ljc1IDAgMCAxLTEuMDYgMEw0LjcyIDguNzhhLjc1MS43NTEgMCAwIDEgLjAxOC0xLjA0Mi43NTEuNzUxIDAgMCAxIDEuMDQyLS4wMThMNyA4Ljk0bDMuMjItMy4yMmEuNzUxLjc1MSAwIDAgMSAxLjA0Mi4wMTguNzUxLjc1MSAwIDAgMSAuMDE4IDEuMDQyWiI+PC9wYXRoPgo8L3N2Zz4K) @@ -32,7 +23,7 @@ Run project lint commands and validate their native reports before publication. Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write required reports there; stale files in the project cannot satisfy the contract. Missing or malformed reports fail even after a successful command. Available -diagnostics are retained after failures. Call common ci-reports once after all checks. +diagnostics are retained after failures. Call common publish-ci-reports once after all checks. Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). @@ -41,7 +32,7 @@ Producer jobs require actions: read and contents: read, with source checked out ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@191d7230d57982bfc11d57f68b005f386a6d7fbf # 3.1.1 +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@3f3820f46c01e8782de7166ae3fff5a67341ba44 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -121,26 +112,10 @@ Producer jobs require actions: read and contents: read, with source checked out --> - -## Contributing - -Contributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/ci-github-nodejs/blob/main/CONTRIBUTING.md) for more details. - - -## License - -This project is licensed under the MIT License. - -SPDX-License-Identifier: MIT - -Copyright © 2026 hoverkraft - -For more details, see the [license](http://choosealicense.com/licenses/mit/). - diff --git a/actions/lint/action.yml b/actions/lint/action.yml index db510c54..2dd62765 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -5,7 +5,7 @@ description: | Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write required reports there; stale files in the project cannot satisfy the contract. Missing or malformed reports fail even after a successful command. Available - diagnostics are retained after failures. Call common ci-reports once after all checks. + diagnostics are retained after failures. Call common publish-ci-reports once after all checks. Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). author: hoverkraft branding: @@ -40,10 +40,13 @@ inputs: required: false default: "" source-sha: - description: Source commit tested by a prebuilt container; must equal the checked-out revision. + description: Source commit tested by a prebuilt container; must equal the + checked-out revision. default: "" source-prefix: - description: Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. + description: Repository-relative directory represented by a prebuilt + working-directory. Required with source-sha outside GITHUB_WORKSPACE; use + a dot for the repository root. default: "" lint-results: description: Required native report paths relative to CI_REPORTS_DIR, one per line. @@ -93,17 +96,24 @@ runs: mapping: process.env.PATH_MAPPING, results: process.env.RESULTS })); - id: prepare-reports - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: - operation: prepare - definition: ${{ steps.definition.outputs.definition }} + script: | + const fs = require('node:fs'); + const path = require('node:path'); + core.setOutput('report-directory', fs.mkdtempSync(path.join(process.env.RUNNER_TEMP, 'ci-reports-'))); + core.setOutput('definition', process.env.REPORT_DEFINITION); + env: + REPORT_DEFINITION: ${{ steps.definition.outputs.definition }} # jscpd:ignore-end - id: run-lint uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 # jscpd:ignore-start env: - RUN_LINT_COMMAND: ${{ inputs.container == 'true' && steps.get-package-manager.outputs.run-script-command || steps.setup-node.outputs.run-script-command }} + RUN_LINT_COMMAND: ${{ inputs.container == 'true' && + steps.get-package-manager.outputs.run-script-command || + steps.setup-node.outputs.run-script-command }} WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }} LINT_COMMAND: ${{ inputs.command }} CI_REPORTS_DIR: ${{ steps.prepare-reports.outputs.report-directory }} @@ -135,12 +145,12 @@ runs: core.setFailed(`Linting error: ${error.message}`); } - id: reports - name: Validate and retain native reports + name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) with: - operation: finalize - recording: ${{ steps.prepare-reports.outputs.recording }} + definition: ${{ steps.prepare-reports.outputs.definition }} + directory: ${{ steps.prepare-reports.outputs.report-directory }} outcome: ${{ steps.run-lint.outcome }} outputs: report-artifact-id: diff --git a/actions/test/README.md b/actions/test/README.md index 4ca7fe6c..e798cefd 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -2,21 +2,12 @@ # ![Icon](data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0IiBmaWxsPSJub25lIiBzdHJva2U9ImN1cnJlbnRDb2xvciIgc3Ryb2tlLXdpZHRoPSIyIiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiIGNsYXNzPSJmZWF0aGVyIGZlYXRoZXItY2hlY2stc3F1YXJlIiBjb2xvcj0iYmx1ZSI+PHBvbHlsaW5lIHBvaW50cz0iOSAxMSAxMiAxNCAyMiA0Ij48L3BvbHlsaW5lPjxwYXRoIGQ9Ik0yMSAxMnY3YTIgMiAwIDAgMS0yIDJINWEyIDIgMCAwIDEtMi0yVjVhMiAyIDAgMCAxIDItMmgxMSI+PC9wYXRoPjwvc3ZnPg==) GitHub Action: Test -
- Test -
- ---- - [![Marketplace](https://img.shields.io/badge/Marketplace-test-blue?logo=github-actions)](https://github.com/marketplace/actions/test) [![Release](https://img.shields.io/github/v/release/hoverkraft-tech/ci-github-nodejs)](https://github.com/hoverkraft-tech/ci-github-nodejs/releases) -[![License](https://img.shields.io/github/license/hoverkraft-tech/ci-github-nodejs)](http://choosealicense.com/licenses/mit/) [![Stars](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-nodejs?style=social)](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-nodejs?style=social) -[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/hoverkraft-tech/ci-github-nodejs/blob/main/CONTRIBUTING.md) -![GitHub Verified Creator](https://img.shields.io/badge/GitHub-Verified%20Creator-4493F8?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJyZ2IoNjgsIDE0NywgMjQ4KSI+CiAgPHBhdGggZD0ibTkuNTg1LjUyLjkyOS42OGMuMTUzLjExMi4zMzEuMTg2LjUxOC4yMTVsMS4xMzguMTc1YTIuNjc4IDIuNjc4IDAgMCAxIDIuMjQgMi4yNGwuMTc0IDEuMTM5Yy4wMjkuMTg3LjEwMy4zNjUuMjE1LjUxOGwuNjguOTI4YTIuNjc3IDIuNjc3IDAgMCAxIDAgMy4xN2wtLjY4LjkyOGExLjE3NCAxLjE3NCAwIDAgMC0uMjE1LjUxOGwtLjE3NSAxLjEzOGEyLjY3OCAyLjY3OCAwIDAgMS0yLjI0MSAyLjI0MWwtMS4xMzguMTc1YTEuMTcgMS4xNyAwIDAgMC0uNTE4LjIxNWwtLjkyOC42OGEyLjY3NyAyLjY3NyAwIDAgMS0zLjE3IDBsLS45MjgtLjY4YTEuMTc0IDEuMTc0IDAgMCAwLS41MTgtLjIxNUwzLjgzIDE0LjQxYTIuNjc4IDIuNjc4IDAgMCAxLTIuMjQtMi4yNGwtLjE3NS0xLjEzOGExLjE3IDEuMTcgMCAwIDAtLjIxNS0uNTE4bC0uNjgtLjkyOGEyLjY3NyAyLjY3NyAwIDAgMSAwLTMuMTdsLjY4LS45MjhjLjExMi0uMTUzLjE4Ni0uMzMxLjIxNS0uNTE4bC4xNzUtMS4xNGEyLjY3OCAyLjY3OCAwIDAgMSAyLjI0LTIuMjRsMS4xMzktLjE3NWMuMTg3LS4wMjkuMzY1LS4xMDMuNTE4LS4yMTVsLjkyOC0uNjhhMi42NzcgMi42NzcgMCAwIDEgMy4xNyAwWk03LjMwMyAxLjcyOGwtLjkyNy42OGEyLjY3IDIuNjcgMCAwIDEtMS4xOC40ODlsLTEuMTM3LjE3NGExLjE3OSAxLjE3OSAwIDAgMC0uOTg3Ljk4N2wtLjE3NCAxLjEzNmEyLjY3NyAyLjY3NyAwIDAgMS0uNDg5IDEuMThsLS42OC45MjhhMS4xOCAxLjE4IDAgMCAwIDAgMS4zOTRsLjY4LjkyN2MuMjU2LjM0OC40MjQuNzUzLjQ4OSAxLjE4bC4xNzQgMS4xMzdjLjA3OC41MDkuNDc4LjkwOS45ODcuOTg3bDEuMTM2LjE3NGEyLjY3IDIuNjcgMCAwIDEgMS4xOC40ODlsLjkyOC42OGMuNDE0LjMwNS45NzkuMzA1IDEuMzk0IDBsLjkyNy0uNjhhMi42NyAyLjY3IDAgMCAxIDEuMTgtLjQ4OWwxLjEzNy0uMTc0YTEuMTggMS4xOCAwIDAgMCAuOTg3LS45ODdsLjE3NC0xLjEzNmEyLjY3IDIuNjcgMCAwIDEgLjQ4OS0xLjE4bC42OC0uOTI4YTEuMTc2IDEuMTc2IDAgMCAwIDAtMS4zOTRsLS42OC0uOTI3YTIuNjg2IDIuNjg2IDAgMCAxLS40ODktMS4xOGwtLjE3NC0xLjEzN2ExLjE3OSAxLjE3OSAwIDAgMC0uOTg3LS45ODdsLTEuMTM2LS4xNzRhMi42NzcgMi42NzcgMCAwIDEtMS4xOC0uNDg5bC0uOTI4LS42OGExLjE3NiAxLjE3NiAwIDAgMC0xLjM5NCAwWk0xMS4yOCA2Ljc4bC0zLjc1IDMuNzVhLjc1Ljc1IDAgMCAxLTEuMDYgMEw0LjcyIDguNzhhLjc1MS43NTEgMCAwIDEgLjAxOC0xLjA0Mi43NTEuNzUxIDAgMCAxIDEuMDQyLS4wMThMNyA4Ljk0bDMuMjItMy4yMmEuNzUxLjc1MSAwIDAgMSAxLjA0Mi4wMTguNzUxLjc1MSAwIDAgMSAuMDE4IDEuMDQyWiI+PC9wYXRoPgo8L3N2Zz4K) @@ -32,7 +23,7 @@ Run project test commands and validate their native reports before publication. Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write required reports there; stale files in the project cannot satisfy the contract. Missing or malformed reports fail even after a successful command. Available -diagnostics are retained after failures. Call common ci-reports once after all checks. +diagnostics are retained after failures. Call common publish-ci-reports once after all checks. Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). CI_TEST_COVERAGE indicates whether to instrument tests. By default, results.json supplies both test results and coverage using native Vitest or Jest JSON. Set @@ -45,7 +36,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@191d7230d57982bfc11d57f68b005f386a6d7fbf # 3.1.1 +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@3f3820f46c01e8782de7166ae3fff5a67341ba44 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -175,26 +166,10 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner --> - -## Contributing - -Contributions are welcome! Please see the [contributing guidelines](https://github.com/hoverkraft-tech/ci-github-nodejs/blob/main/CONTRIBUTING.md) for more details. - - -## License - -This project is licensed under the MIT License. - -SPDX-License-Identifier: MIT - -Copyright © 2026 hoverkraft - -For more details, see the [license](http://choosealicense.com/licenses/mit/). - diff --git a/actions/test/action.yml b/actions/test/action.yml index 46708d59..5fe24466 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -5,7 +5,7 @@ description: | Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write required reports there; stale files in the project cannot satisfy the contract. Missing or malformed reports fail even after a successful command. Available - diagnostics are retained after failures. Call common ci-reports once after all checks. + diagnostics are retained after failures. Call common publish-ci-reports once after all checks. Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). CI_TEST_COVERAGE indicates whether to instrument tests. By default, results.json supplies both test results and coverage using native Vitest or Jest JSON. Set @@ -39,7 +39,8 @@ inputs: required: false default: "test:ci" coverage: - description: Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. + description: Collect and require coverage. The project command must honor + CI_TEST_COVERAGE when selecting instrumentation. default: "true" arguments: description: | @@ -74,16 +75,25 @@ inputs: required: false default: "" source-sha: - description: Source commit tested by a prebuilt container; must equal the checked-out revision. + description: Source commit tested by a prebuilt container; must equal the + checked-out revision. default: "" source-prefix: - description: Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. + description: Repository-relative directory represented by a prebuilt + working-directory. Required with source-sha outside GITHUB_WORKSPACE; use + a dot for the repository root. default: "" test-results: - description: Required native test report paths relative to CI_REPORTS_DIR, one per line. A combined JSON report can also supply coverage. + description: + Required native test report paths relative to CI_REPORTS_DIR, one + per line. A combined JSON report can also supply coverage. default: results.json test-coverage: - description: Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Defaults to test-results for combined JSON, or coverage/lcov.info when merging Vitest shards. Vitest shard merging emits coverage separately; enable lcovonly when CI_TEST_MERGE is true. + description: Required native coverage paths relative to CI_REPORTS_DIR when + coverage is enabled, one per line. Defaults to test-results for combined + JSON, or coverage/lcov.info when merging Vitest shards. Vitest shard + merging emits coverage separately; enable lcovonly when CI_TEST_MERGE is + true. default: "" outputs: @@ -91,7 +101,8 @@ outputs: description: Native report bundle, including available diagnostics after failures. value: ${{ steps.reports.outputs.artifact-id }} shard-artifact-id: - description: Blob and manifest artifact ID for an executing shard, including failed tests with a blob. + description: Blob and manifest artifact ID for an executing shard, including + failed tests with a blob. value: ${{ steps.upload-shard.outputs.artifact-id }} runs: @@ -111,7 +122,9 @@ runs: NODE_ACTION_PATH: ${{ github.action_path }} WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }} COVERAGE_DESTINATION: ${{ inputs.coverage }} - TEST_COMMIT: ${{ inputs.source-sha || github.event.pull_request.head.sha || github.sha }} + TEST_COMMIT: + ${{ inputs.source-sha || github.event.pull_request.head.sha || + github.sha }} TEST_ARGUMENTS: ${{ inputs.arguments }} TEST_SHARD: ${{ inputs.shard }} SHARD_GROUP: ${{ inputs.shard-group }} @@ -174,7 +187,9 @@ runs: PATH_MAPPING: ${{ inputs.path-mapping }} RESULTS: ${{ inputs.test-results }} COVERAGE: ${{ inputs.coverage }} - COVERAGE_PATHS: ${{ inputs.test-coverage || (inputs.merge-shards != '' && 'coverage/lcov.info' || inputs.test-results) }} + COVERAGE_PATHS: + ${{ inputs.test-coverage || (inputs.merge-shards != '' && + 'coverage/lcov.info' || inputs.test-results) }} MERGE_SHARDS: ${{ inputs.merge-shards }} with: script: | @@ -188,10 +203,15 @@ runs: })); - id: prepare-reports if: inputs.shard == '' - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: - operation: prepare - definition: ${{ steps.definition.outputs.definition }} + script: | + const fs = require('node:fs'); + const path = require('node:path'); + core.setOutput('report-directory', fs.mkdtempSync(path.join(process.env.RUNNER_TEMP, 'ci-reports-'))); + core.setOutput('definition', process.env.REPORT_DEFINITION); + env: + REPORT_DEFINITION: ${{ steps.definition.outputs.definition }} - id: validate-shards if: inputs.merge-shards != '' @@ -210,13 +230,16 @@ runs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: NODE_ACTION_PATH: ${{ github.action_path }} - RUN_TEST_COMMAND: ${{ inputs.container == 'true' && steps.get-package-manager.outputs.run-script-command || steps.setup-node.outputs.run-script-command }} + RUN_TEST_COMMAND: ${{ inputs.container == 'true' && + steps.get-package-manager.outputs.run-script-command || + steps.setup-node.outputs.run-script-command }} WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }} TEST_COMMAND: ${{ inputs.command }} TEST_ARGUMENTS: ${{ steps.prepare-test.outputs.arguments }} TEST_SHARD: ${{ inputs.shard }} SHARDS_FAILED: ${{ steps.validate-shards.outputs.failed }} - CI_REPORTS_DIR: ${{ steps.prepare-reports.outputs.report-directory || steps.prepare-test.outputs.directory }} + CI_REPORTS_DIR: ${{ steps.prepare-reports.outputs.report-directory || + steps.prepare-test.outputs.directory }} CI_TEST_COVERAGE: ${{ inputs.coverage }} CI_TEST_MERGE: ${{ inputs.merge-shards != '' && 'true' || 'false' }} with: @@ -280,12 +303,12 @@ runs: if-no-files-found: error retention-days: 7 - id: reports - name: Validate and retain native reports + name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/record-ci-reports@2d27a658505a68fba050c44cb6a6d4d08a45e8f2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) with: - operation: finalize - recording: ${{ steps.prepare-reports.outputs.recording }} + definition: ${{ steps.prepare-reports.outputs.definition }} + directory: ${{ steps.prepare-reports.outputs.report-directory }} outcome: ${{ steps.run-test.outcome }} - name: Clean shard workspace diff --git a/docs/development/reporting-actions.md b/docs/development/reporting-actions.md index 08041913..2951dd37 100644 --- a/docs/development/reporting-actions.md +++ b/docs/development/reporting-actions.md @@ -1,13 +1,12 @@ # Maintaining reporting actions The lint and test actions each own their report definition builder, tests, -lockfile and bundle. They compose Common's public recorder through `uses:`. +lockfile and bundle. They compose Common's public preparation action through `uses:`. Neither action imports another action's source or depends on a shared local package. The lint builder describes lint selectors and the measured project. The test builder describes native test results, optional coverage, and completed shard -merges. Both retain source mapping; Common's public validator owns native report -validation and reporting policy. +merges. Both retain source mapping; Common's preparation action validates and normalizes reports using upstream libraries. After editing an action, test and rebuild that action: @@ -19,5 +18,5 @@ npm run build --prefix actions/test Commit the updated distribution. Dedicated lint and test workflows verify reproducibility, isolated distribution contracts and actual native report -recording. The outer `publish-ci-reports.yml` workflow handles publication. +retention. The outer `publish-ci-reports.yml` workflow handles publication. See the [consumer guide](../usage/test-reports.md) for report generation. From fad361333873e1a2c66b90a4ded5d8b6b7c4f23d Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Mon, 30 Nov 2026 17:40:17 +0100 Subject: [PATCH 34/48] fix(reports): align merged fixtures and final common publication --- .github/workflows/__commit-action-distributions.yml | 2 +- .github/workflows/__rebuild-action-distributions.yml | 2 +- .github/workflows/__shared-ci.yml | 6 +++--- .github/workflows/__test-action-lint.yml | 2 +- .github/workflows/__test-action-test.yml | 2 +- .../workflows/__test-workflow-continuous-integration.yml | 4 ++-- actions/lint/README.md | 2 +- actions/lint/action.yml | 2 +- actions/test/README.md | 2 +- actions/test/action.yml | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml index 5b4f505e..0f75a604 100644 --- a/.github/workflows/__commit-action-distributions.yml +++ b/.github/workflows/__commit-action-distributions.yml @@ -9,7 +9,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml index 3cc22e24..f209d47e 100644 --- a/.github/workflows/__rebuild-action-distributions.yml +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -8,7 +8,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 4c1ab07d..afeff684 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index 8bccccb8..4841b06d 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/lint run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) with: working-directory: actions/lint - name: Arrange - Create a dependency-free lint project diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 693ca6a0..9ebcae9f 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/test run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) with: working-directory: actions/test - name: Arrange - Create a dependency-free native test project diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index 6ae1363b..5afe9722 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -61,14 +61,14 @@ jobs: steps: - uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2 with: - pattern: ci-report-v2-result-* + pattern: ci-report-* path: merged-reports - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: script: | const assert = require('node:assert/strict'); const fs = require('node:fs'); - const files = await (await glob.create('merged-reports/**/results.json', {matchDirectories:false})).glob(); + const files = await (await glob.create('merged-reports/**/native/*-results.json', {matchDirectories:false})).glob(); const merged = files.filter(file => fs.readFileSync(file, 'utf8').includes('enabled answer') && fs.readFileSync(file, 'utf8').includes('disabled answer')); assert.equal(merged.length, 2, 'Retain one complete merged JSON report from the host and the container'); for (const file of merged) { diff --git a/actions/lint/README.md b/actions/lint/README.md index e14116b2..b980a412 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -32,7 +32,7 @@ Producer jobs require actions: read and contents: read, with source checked out ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@3f3820f46c01e8782de7166ae3fff5a67341ba44 # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@ad95c2d3354cf5c0755a0325ba55f7615ff0d955 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 2dd62765..006b26e3 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -147,7 +147,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} diff --git a/actions/test/README.md b/actions/test/README.md index e798cefd..9362a35b 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -36,7 +36,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@3f3820f46c01e8782de7166ae3fff5a67341ba44 # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@ad95c2d3354cf5c0755a0325ba55f7615ff0d955 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/test/action.yml b/actions/test/action.yml index 5fe24466..992e3284 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -305,7 +305,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@2654703ceb0e0e04f240e8582f4b810bd1738f8d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} From c1103859a3e760969aad47921da2174d19b68c92 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Mon, 30 Nov 2026 18:57:23 +0100 Subject: [PATCH 35/48] fix(reports): adopt file-safe coverage and bounded publication --- .github/workflows/__commit-action-distributions.yml | 2 +- .github/workflows/__rebuild-action-distributions.yml | 2 +- .github/workflows/__shared-ci.yml | 6 +++--- .github/workflows/__test-action-lint.yml | 2 +- .github/workflows/__test-action-test.yml | 2 +- actions/lint/README.md | 2 +- actions/lint/action.yml | 2 +- actions/test/README.md | 2 +- actions/test/action.yml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml index 0f75a604..fcda89a2 100644 --- a/.github/workflows/__commit-action-distributions.yml +++ b/.github/workflows/__commit-action-distributions.yml @@ -9,7 +9,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml index f209d47e..d8e0b27e 100644 --- a/.github/workflows/__rebuild-action-distributions.yml +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -8,7 +8,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index afeff684..1884085f 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index 4841b06d..cbabfbaf 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/lint run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) with: working-directory: actions/lint - name: Arrange - Create a dependency-free lint project diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 9ebcae9f..df83fbed 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/test run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) with: working-directory: actions/test - name: Arrange - Create a dependency-free native test project diff --git a/actions/lint/README.md b/actions/lint/README.md index b980a412..bdf72f19 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -32,7 +32,7 @@ Producer jobs require actions: read and contents: read, with source checked out ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@ad95c2d3354cf5c0755a0325ba55f7615ff0d955 # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@fad361333873e1a2c66b90a4ded5d8b6b7c4f23d # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 006b26e3..b643cad9 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -147,7 +147,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} diff --git a/actions/test/README.md b/actions/test/README.md index 9362a35b..3def8b49 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -36,7 +36,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@ad95c2d3354cf5c0755a0325ba55f7615ff0d955 # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@fad361333873e1a2c66b90a4ded5d8b6b7c4f23d # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/test/action.yml b/actions/test/action.yml index 992e3284..a63fb479 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -305,7 +305,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@ae467050dbd6e92f8072b2dc9e898bc78d093e7d # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} From 3ba26a82aae406c87bb99c80dfe46299fc808cbb Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Mon, 30 Nov 2026 19:27:13 +0100 Subject: [PATCH 36/48] fix(reports): update common reporting dependency --- .github/workflows/__commit-action-distributions.yml | 2 +- .github/workflows/__rebuild-action-distributions.yml | 2 +- .github/workflows/__shared-ci.yml | 6 +++--- .github/workflows/__test-action-lint.yml | 2 +- .github/workflows/__test-action-test.yml | 2 +- actions/lint/README.md | 2 +- actions/lint/action.yml | 2 +- actions/test/README.md | 2 +- actions/test/action.yml | 2 +- 9 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml index fcda89a2..c1b0269d 100644 --- a/.github/workflows/__commit-action-distributions.yml +++ b/.github/workflows/__commit-action-distributions.yml @@ -9,7 +9,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml index d8e0b27e..d5373e29 100644 --- a/.github/workflows/__rebuild-action-distributions.yml +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -8,7 +8,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 1884085f..698f1609 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) permissions: actions: read contents: read @@ -170,6 +170,6 @@ jobs: timeout-minutes: 5 permissions: {} steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) + - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index cbabfbaf..0bc5caf0 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/lint run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) with: working-directory: actions/lint - name: Arrange - Create a dependency-free lint project diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index df83fbed..0b4045fe 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/test run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) with: working-directory: actions/test - name: Arrange - Create a dependency-free native test project diff --git a/actions/lint/README.md b/actions/lint/README.md index bdf72f19..43eaffcd 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -32,7 +32,7 @@ Producer jobs require actions: read and contents: read, with source checked out ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@fad361333873e1a2c66b90a4ded5d8b6b7c4f23d # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@c1103859a3e760969aad47921da2174d19b68c92 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/lint/action.yml b/actions/lint/action.yml index b643cad9..4bf29132 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -147,7 +147,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} diff --git a/actions/test/README.md b/actions/test/README.md index 3def8b49..7d4933fa 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -36,7 +36,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@fad361333873e1a2c66b90a4ded5d8b6b7c4f23d # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@c1103859a3e760969aad47921da2174d19b68c92 # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. diff --git a/actions/test/action.yml b/actions/test/action.yml index a63fb479..9a29033b 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -305,7 +305,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@58e2dc7aef918536d5c801d9ec2032694ce586d1 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} From acb28eba0e986af57d3cbbb94d114d4c4ac2b682 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Tue, 1 Dec 2026 09:26:31 +0100 Subject: [PATCH 37/48] refactor(ci): call shared completion workflow --- .github/workflows/__shared-ci.yml | 9 +++------ .github/workflows/continuous-integration.md | 4 ++-- .github/workflows/continuous-integration.yml | 2 +- docs/usage/test-reports.md | 6 +++--- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 698f1609..f11de8a7 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -166,10 +166,7 @@ jobs: - test-action-test - test-action-lint - reports - runs-on: ubuntu-latest - timeout-minutes: 5 + uses: hoverkraft-tech/ci-github-common/.github/workflows/check-jobs.yml@cb86863a77462f8837b38ad542b49ab36a825a85 # PR #683 (unreleased) permissions: {} - steps: - - uses: hoverkraft-tech/ci-github-common/actions/check-jobs@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) - with: - job-results: ${{ toJSON(needs) }} + with: + job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/continuous-integration.md b/.github/workflows/continuous-integration.md index 1af25655..716cf1df 100644 --- a/.github/workflows/continuous-integration.md +++ b/.github/workflows/continuous-integration.md @@ -40,7 +40,7 @@ Merge shards natively; their coverage output remains separate. Call common publish-ci-reports.yml once after all producer jobs with job-results: toJSON(needs). No report plans or artifact IDs need forwarding. -Add a separate CI complete job using common actions/check-jobs, with direct +Add a separate CI complete job using common check-jobs.yml, with direct needs on all required producers and reporting, and if: always(). Producer calls require actions: read and contents: read. The reporting caller grants actions: read, contents: read, pull-requests: write, code-quality: write, @@ -74,7 +74,7 @@ on: permissions: {} jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@191d7230d57982bfc11d57f68b005f386a6d7fbf # 3.1.1 + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@64632ba90b771d20337b737d8b0ccee0cb7bae58 # 3.1.2 permissions: actions: read contents: read diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index ef334f44..13db9271 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -10,7 +10,7 @@ # Call common publish-ci-reports.yml once after all producer jobs with # job-results: toJSON(needs). No report plans or artifact IDs need forwarding. -# Add a separate CI complete job using common actions/check-jobs, with direct +# Add a separate CI complete job using common check-jobs.yml, with direct # needs on all required producers and reporting, and if: always(). # Producer calls require actions: read and contents: read. The reporting caller # grants actions: read, contents: read, pull-requests: write, code-quality: write, diff --git a/docs/usage/test-reports.md b/docs/usage/test-reports.md index ec018966..2992b2d7 100644 --- a/docs/usage/test-reports.md +++ b/docs/usage/test-reports.md @@ -76,10 +76,10 @@ number of native files. ## Overall CI status -Call `ci-reports` once after all producers. It validates evidence and publication; +Call `publish-ci-reports.yml` once after all producers. It validates evidence and publication; it can succeed while displaying failed tests. Add one required `CI complete` job with `if: always()`, direct `needs` on every required producer and `reports`, and -`ci-github-common/actions/check-jobs` with `job-results: toJSON(needs)`. +`ci-github-common/.github/workflows/check-jobs.yml` with `job-results: toJSON(needs)`. Unexpected skipped jobs fail the gate. Allow only intentionally conditional job IDs through `allow-skipped`. See the -[common CI gate contract](https://github.com/hoverkraft-tech/ci-github-common/blob/85351002dc2303c4a70233197edcadb20b1cb90e/docs/usage/ci-reports.md#required-ci-verdict). +[common CI gate contract](https://github.com/hoverkraft-tech/ci-github-common/blob/cb86863a77462f8837b38ad542b49ab36a825a85/docs/usage/ci-reports.md#consumer-workflow). From 38b1a93ae12faf6b8482f10bd002b306e105ec27 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Tue, 1 Dec 2026 10:17:31 +0100 Subject: [PATCH 38/48] refactor(ci): clarify artifact-only language workflows --- .github/workflows/continuous-integration.md | 20 ++++++---------- .github/workflows/continuous-integration.yml | 24 ++++++++------------ docs/usage/test-reports.md | 15 +++++------- 3 files changed, 22 insertions(+), 37 deletions(-) diff --git a/.github/workflows/continuous-integration.md b/.github/workflows/continuous-integration.md index 89bf6ecf..e59c3d28 100644 --- a/.github/workflows/continuous-integration.md +++ b/.github/workflows/continuous-integration.md @@ -30,24 +30,18 @@ Workflow to run Node.js checks, builds and package validation. -One CI reporting boundary +Report artifacts Commands write their declared native outputs into CI_REPORTS_DIR. Test results and coverage default to the same native results.json; lint defaults to lint.sarif. Configure test-results, test-coverage or lint-results beside the command when a runner needs separate files. See [native test reports](../../docs/usage/test-reports.md). -Merge shards natively; their coverage output remains separate. - -Call common publish-ci-reports.yml once after all producer jobs with -job-results: toJSON(needs). No report plans or artifact IDs need forwarding. -Add a separate CI complete job using common check-jobs.yml, with direct -needs on all required producers and reporting, and if: always(). -Producer calls require actions: read and contents: read. The reporting caller -grants actions: read, contents: read, pull-requests: write, code-quality: write, -id-token: write and security-events: write; its internal jobs narrow these. -Lint and tests default to annotations. Coverage defaults to GitHub when -available, then a PR comment or summary. Select destinations once using -lint-reporters, test-results-reporters and test-coverage-reporters. +The lint and test actions validate these outputs and upload report artifacts. +Test actions merge shards natively; their coverage output remains separate. +Producer calls require actions: read and contents: read. + +The caller publishes those artifacts once with `publish-ci-reports.yml`. +See the [common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/44d42ca06b9f722d8ab79af4f588f30ad1e16bc5/docs/usage/ci-reports.md#consumer-workflow). Prebuilt CI containers must include Git. They require a checkout for source verification and test.source-sha plus test.source-prefix identifying the tested source. diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index c432725e..957d4c11 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -1,23 +1,17 @@ # Workflow to run Node.js checks, builds and package validation. -# One CI reporting boundary +# Report artifacts # Commands write their declared native outputs into CI_REPORTS_DIR. # Test results and coverage default to the same native results.json; lint defaults to # lint.sarif. Configure test-results, test-coverage or lint-results beside the # command when a runner needs separate files. See [native test reports](../../docs/usage/test-reports.md). -# Merge shards natively; their coverage output remains separate. - -# Call common publish-ci-reports.yml once after all producer jobs with -# job-results: toJSON(needs). No report plans or artifact IDs need forwarding. -# Add a separate CI complete job using common check-jobs.yml, with direct -# needs on all required producers and reporting, and if: always(). -# Producer calls require actions: read and contents: read. The reporting caller -# grants actions: read, contents: read, pull-requests: write, code-quality: write, -# id-token: write and security-events: write; its internal jobs narrow these. -# Lint and tests default to annotations. Coverage defaults to GitHub when -# available, then a PR comment or summary. Select destinations once using -# lint-reporters, test-results-reporters and test-coverage-reporters. +# The lint and test actions validate these outputs and upload report artifacts. +# Test actions merge shards natively; their coverage output remains separate. +# Producer calls require actions: read and contents: read. + +# The caller publishes those artifacts once with `publish-ci-reports.yml`. +# See the [common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/44d42ca06b9f722d8ab79af4f588f30ad1e16bc5/docs/usage/ci-reports.md#consumer-workflow). # Prebuilt CI containers must include Git. They require a checkout for source verification and # test.source-sha plus test.source-prefix identifying the tested source. @@ -289,7 +283,7 @@ jobs: for (const field of ['test-results','test-coverage']) { if (testOptions[field] !== undefined && (typeof testOptions[field] !== 'string' || !testOptions[field].trim())) throw new Error('test.' + field + ' must be nonempty native report paths.'); } const allowed = ['coverage','test-coverage','source-sha','source-prefix','command','merge-command','test-results','arguments','shards']; const unknown = Object.keys(testOptions).filter(key => !allowed.includes(key)); - if (unknown.length) throw new Error('Unknown test options: ' + unknown.join(', ') + '. Configure publication in ci-reports.'); + if (unknown.length) throw new Error('Unknown test options: ' + unknown.join(', ') + '.'); if (testOptions.coverage === undefined) { testOptions.coverage = true; } @@ -796,7 +790,7 @@ jobs: artifact-ids: ${{ needs.build.outputs.artifact-id }} path: "/" - - name: Merge tests and publish reports + - name: Merge test shards uses: $/actions/test with: ignore-scripts: ${{ inputs.ignore-scripts }} diff --git a/docs/usage/test-reports.md b/docs/usage/test-reports.md index 2992b2d7..4913986b 100644 --- a/docs/usage/test-reports.md +++ b/docs/usage/test-reports.md @@ -4,7 +4,7 @@ The test action provides a fresh `CI_REPORTS_DIR` and sets `CI_TEST_COVERAGE`. Write reports during that invocation. By default, native Vitest or Jest `results.json` supplies both detailed test outcomes and coverage. Missing requested coverage fails validation; tests remain available for diagnosis. -The final common `ci-reports` workflow publishes the collected results once. +The caller's `publish-ci-reports.yml` workflow publishes the collected artifacts once. ## Vitest @@ -74,12 +74,9 @@ its `test` JSON object. Coverage can be disabled without removing detailed test results. Test and coverage publication destinations remain independent of the number of native files. -## Overall CI status +## Report publication -Call `publish-ci-reports.yml` once after all producers. It validates evidence and publication; -it can succeed while displaying failed tests. Add one required `CI complete` job -with `if: always()`, direct `needs` on every required producer and `reports`, and -`ci-github-common/.github/workflows/check-jobs.yml` with `job-results: toJSON(needs)`. -Unexpected skipped jobs fail the gate. Allow only intentionally conditional job -IDs through `allow-skipped`. See the -[common CI gate contract](https://github.com/hoverkraft-tech/ci-github-common/blob/cb86863a77462f8837b38ad542b49ab36a825a85/docs/usage/ci-reports.md#consumer-workflow). +Configure publication destinations and credentials on the outer +`publish-ci-reports.yml` call. Follow the +[common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/44d42ca06b9f722d8ab79af4f588f30ad1e16bc5/docs/usage/ci-reports.md#consumer-workflow) +for the caller workflow, permissions and separate completion gate. From 7357a32ac2222654f1de2e28432f96d8e0a7670a Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Tue, 1 Dec 2026 15:42:31 +0100 Subject: [PATCH 39/48] feat(reports): discover native test and lint outputs automatically --- .github/workflows/__test-action-lint.yml | 3 +- .github/workflows/__test-action-test.yml | 4 +- .github/workflows/__test-release.yml | 2 +- ...__test-workflow-continuous-integration.yml | 2 +- .github/workflows/continuous-integration.yml | 27 +++------- actions/lint/action.yml | 10 ++-- actions/lint/dist/index.js | 18 +------ actions/lint/src/ReportDefinition.cjs | 18 +------ actions/lint/src/contracts.test.cjs | 10 +--- actions/test/action.yml | 29 +++-------- actions/test/dist/index.js | 52 ++++++------------- actions/test/src/ReportDefinition.cjs | 52 ++++++------------- actions/test/src/contracts.test.cjs | 22 ++------ docs/usage/test-reports.md | 34 +++++++----- tests/continuous-integration/workflow.test.js | 32 +++--------- 15 files changed, 90 insertions(+), 225 deletions(-) diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index 0bc5caf0..3350f52b 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -50,7 +50,7 @@ jobs: process.exit(process.env.EXPECT_FAILURE === 'true' ? 1 : 0); `); await exec.exec('npm', ['install', '--package-lock-only', '--ignore-scripts', '--no-audit', '--no-fund'], { cwd: 'lint-fixture' }); - - name: Act - Run lint with report configuration + - name: Act - Discover native lint reports id: lint uses: $/actions/lint env: @@ -58,7 +58,6 @@ jobs: EXPECT_FAILURE: "false" with: working-directory: lint-fixture - lint-results: eslint-report.json - name: Assert - Verify the action outcome uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 0b4045fe..8ef29dd0 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -46,7 +46,7 @@ jobs: fs.writeFileSync('report-fixture/source.cjs', 'module.exports = value => value;\n'); fs.writeFileSync('report-fixture/test.cjs', "require('node:test').test('report fixture', () => require('node:assert/strict').equal(require('./source.cjs')(process.env.EXPECT_FAILURE), 'false'));\n"); await exec.exec('npm', ['install', '--package-lock-only', '--ignore-scripts', '--no-audit', '--no-fund'], { cwd: 'report-fixture' }); - - name: Act - Run tests with comments disabled and no write token + - name: Act - Discover native reports without filename configuration id: test uses: $/actions/test env: @@ -55,8 +55,6 @@ jobs: working-directory: report-fixture command: test:ci coverage: "true" - test-results: junit.xml - test-coverage: lcov.info - name: Assert - Retrieve reports even after a failed test if: steps.test.outputs.report-artifact-id != '' uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 diff --git a/.github/workflows/__test-release.yml b/.github/workflows/__test-release.yml index ad71b2fa..80e0bc3d 100644 --- a/.github/workflows/__test-release.yml +++ b/.github/workflows/__test-release.yml @@ -23,7 +23,7 @@ jobs: working-directory: actions/${{ matrix.action }} build: "" lint: "" - test: '{"coverage":false,"test-results":"junit.xml"}' + test: '{"coverage":false}' needs: configuration integration-tests: diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index e7fbf6c8..701e043d 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -132,7 +132,7 @@ jobs: lint: "" code-ql: "" dependency-review: false - test: '{"coverage":false,"test-results":"junit.xml"}' + test: '{"coverage":false}' act-with-checks-disabled: name: Act - Disable all application checks without starting a container diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 957d4c11..ae0a0384 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -2,10 +2,9 @@ # Report artifacts -# Commands write their declared native outputs into CI_REPORTS_DIR. -# Test results and coverage default to the same native results.json; lint defaults to -# lint.sarif. Configure test-results, test-coverage or lint-results beside the -# command when a runner needs separate files. See [native test reports](../../docs/usage/test-reports.md). +# Commands write supported native outputs into CI_REPORTS_DIR. +# The language actions discover report files automatically. Callers configure +# commands, not filenames. See [native test reports](../../docs/usage/test-reports.md). # The lint and test actions validate these outputs and upload report artifacts. # Test actions merge shards natively; their coverage output remains separate. # Producer calls require actions: read and contents: read. @@ -92,7 +91,7 @@ on: default: true lint: description: |- - Lint options: command (default lint:ci) and lint-results (default lint.sarif). Commands write native results under CI_REPORTS_DIR. Empty disables lint. + Lint options: command (default lint:ci). The action discovers supported native results under CI_REPORTS_DIR. Empty disables lint. type: string required: false default: "true" @@ -126,7 +125,7 @@ on: default: true test: description: |- - Test options: command (default test:ci), arguments, coverage (boolean, default true), test-results (default results.json), test-coverage (defaults to test-results, or coverage/lcov.info for Vitest shard merging), shards and merge-command. Paths are relative to CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. + Test options: command (default test:ci), arguments, coverage (boolean, default true), shards and merge-command. The action discovers supported native results under CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. type: string required: false default: "true" @@ -251,11 +250,8 @@ jobs: test-group: ${{ steps.test-options.outputs.group }} test-merge-command: ${{ steps.test-options.outputs.merge-command }} lint-enabled: ${{ steps.lint-options.outputs.lint-enabled }} - test-test-results: ${{ steps.test-options.outputs.test-results }} - test-test-coverage: ${{ steps.test-options.outputs.test-coverage }} test-source-sha: ${{ steps.test-options.outputs.source-sha }} test-source-prefix: ${{ steps.test-options.outputs.source-prefix }} - test-coverage-paths: ${{ steps.test-options.outputs.test-coverage }} steps: - id: test-options uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -280,8 +276,7 @@ jobs: } } - for (const field of ['test-results','test-coverage']) { if (testOptions[field] !== undefined && (typeof testOptions[field] !== 'string' || !testOptions[field].trim())) throw new Error('test.' + field + ' must be nonempty native report paths.'); } - const allowed = ['coverage','test-coverage','source-sha','source-prefix','command','merge-command','test-results','arguments','shards']; + const allowed = ['coverage','source-sha','source-prefix','command','merge-command','arguments','shards']; const unknown = Object.keys(testOptions).filter(key => !allowed.includes(key)); if (unknown.length) throw new Error('Unknown test options: ' + unknown.join(', ') + '.'); if (testOptions.coverage === undefined) { @@ -296,7 +291,6 @@ jobs: if (!Number.isInteger(shards) || shards < 1 || shards > 256) { throw new Error('test.shards must be an integer from 1 to 256.'); } - core.setOutput('test-coverage', testOptions['test-coverage'] || (shards > 1 ? 'coverage/lcov.info' : testOptions['test-results'] || 'results.json')); const args = testOptions.arguments === undefined ? [] : testOptions.arguments; if (!Array.isArray(args) || args.some(arg => typeof arg !== 'string' || arg.includes('\0'))) { throw new Error('test.arguments must be an array of strings without null bytes.'); @@ -313,7 +307,6 @@ jobs: core.setOutput('arguments', args); core.setOutput('merge-command', testOptions['merge-command'] || testOptions.command || 'test:ci'); core.setOutput('coverage', testOptions.coverage ); - core.setOutput('test-results', testOptions['test-results'] || 'results.json'); core.setOutput('command', testOptions.command || 'test:ci'); - id: package-config @@ -554,7 +547,7 @@ jobs: const enabled = process.env.CHECKS === 'true' && !['','false','null'].includes(raw); if (enabled && raw !== 'true') { const options = JSON.parse(raw); - if (!options || typeof options !== 'object' || Array.isArray(options) || Object.keys(options).some(key => !['command','lint-results','source-sha','source-prefix'].includes(key))) throw new Error('Unknown lint options.'); + if (!options || typeof options !== 'object' || Array.isArray(options) || Object.keys(options).some(key => !['command','source-sha','source-prefix'].includes(key))) throw new Error('Unknown lint options.'); for (const value of Object.values(options)) if (typeof value !== 'string' || !value.trim()) throw new Error('Lint options must be nonempty strings.'); } core.setOutput('lint-enabled', enabled); @@ -654,7 +647,6 @@ jobs: } core.setOutput('command', lintOptions.command || 'lint:ci'); - core.setOutput('lint-results', lintOptions['lint-results'] || 'lint.sarif'); core.setOutput('source-sha', lintOptions['source-sha'] || ''); core.setOutput('source-prefix', lintOptions['source-prefix'] || ''); @@ -667,7 +659,6 @@ jobs: container: ${{ inputs.container != '' && 'true' || 'false' }} command: ${{ steps.preparel-lint-options.outputs.command }} path-mapping: ${{ needs.prepare.outputs.path-mapping || '' }} - lint-results: ${{ steps.preparel-lint-options.outputs.lint-results }} source-sha: ${{ steps.preparel-lint-options.outputs.source-sha }} source-prefix: ${{ steps.preparel-lint-options.outputs.source-prefix }} @@ -761,10 +752,8 @@ jobs: shard-group: ${{ format('ci-test-{0}-{1}-{2}', github.run_id, github.run_attempt, needs.prepare.outputs.test-group) }} coverage: ${{ needs.prepare.outputs.test-coverage == 'true' && 'true' || 'false' }} path-mapping: ${{ needs.prepare.outputs.path-mapping || '' }} - test-results: ${{ needs.prepare.outputs.test-test-results }} source-sha: ${{ needs.prepare.outputs.test-source-sha }} source-prefix: ${{ needs.prepare.outputs.test-source-prefix }} - test-coverage: ${{ needs.prepare.outputs.test-coverage-paths }} test-merge: name: Merge test results @@ -802,10 +791,8 @@ jobs: shard-group: ${{ format('ci-test-{0}-{1}-{2}', github.run_id, github.run_attempt, needs.prepare.outputs.test-group) }} coverage: ${{ needs.prepare.outputs.test-coverage == 'true' && 'true' || 'false' }} path-mapping: ${{ needs.prepare.outputs.path-mapping || '' }} - test-results: ${{ needs.prepare.outputs.test-test-results }} source-sha: ${{ needs.prepare.outputs.test-source-sha }} source-prefix: ${{ needs.prepare.outputs.test-source-prefix }} - test-coverage: ${{ needs.prepare.outputs.test-coverage-paths }} - name: Require successful shards if: always() diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 4bf29132..38fea688 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -31,7 +31,7 @@ inputs: default: "false" command: description: |- - npm/pnpm/Yarn script to run. Generate the declared native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". + npm/pnpm/Yarn script to run. Generate the supported native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". required: false default: "lint:ci" path-mapping: @@ -48,9 +48,6 @@ inputs: working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. default: "" - lint-results: - description: Required native report paths relative to CI_REPORTS_DIR, one per line. - default: lint.sarif runs: using: "composite" @@ -85,7 +82,6 @@ runs: SOURCE_SHA: ${{ inputs.source-sha }} SOURCE_PREFIX: ${{ inputs.source-prefix }} PATH_MAPPING: ${{ inputs.path-mapping }} - RESULTS: ${{ inputs.lint-results }} with: script: | const { ReportDefinition } = require(process.env.NODE_ACTION_PATH + '/dist/index.js'); @@ -93,7 +89,7 @@ runs: core.setOutput('definition', ReportDefinition.create({ workspace: process.env.GITHUB_WORKSPACE, directory: process.env.WORKING_DIRECTORY, runtime: runtime.stdout.trim(), sourceSha: process.env.SOURCE_SHA, sourcePrefix: process.env.SOURCE_PREFIX, - mapping: process.env.PATH_MAPPING, results: process.env.RESULTS + mapping: process.env.PATH_MAPPING })); - id: prepare-reports uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -147,7 +143,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@d22d9532441a353f54431721affbf3ec7874034b # PR #683 with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} diff --git a/actions/lint/dist/index.js b/actions/lint/dist/index.js index 5806f0b6..1b8a01a9 100644 --- a/actions/lint/dist/index.js +++ b/actions/lint/dist/index.js @@ -24,16 +24,6 @@ const path = __nccwpck_require__(760); /** Build the producer contract before any project check executes. */ const ReportDefinition = { - paths(value) { - const paths = value - .split(/\r?\n/) - .map((item) => item.trim()) - .filter(Boolean); - if (!paths.length) - throw new Error("Required report paths must not be empty."); - return paths; - }, - create({ workspace, directory, @@ -41,7 +31,6 @@ const ReportDefinition = { sourceSha, sourcePrefix, mapping, - results, }) { const relative = path .relative(workspace, directory) @@ -61,16 +50,11 @@ const ReportDefinition = { if (!mappings || typeof mappings !== "object" || Array.isArray(mappings)) throw new Error("path-mapping must be a JSON object."); if (outside) mappings[directory.replace(/\/$/, "")] = project; - const reports = ReportDefinition.paths(results).map((pattern) => ({ - kind: "lint", - pattern, - })); - return { name: "Node.js lint", project, variant: { runtime }, - reports, + reports: [{ kind: "lint" }], "path-mapping": mappings, ...(sourceSha ? { source: { sha: sourceSha } } : {}), }; diff --git a/actions/lint/src/ReportDefinition.cjs b/actions/lint/src/ReportDefinition.cjs index aa272678..f1b4edaa 100644 --- a/actions/lint/src/ReportDefinition.cjs +++ b/actions/lint/src/ReportDefinition.cjs @@ -2,16 +2,6 @@ const path = require("node:path"); /** Build the producer contract before any project check executes. */ const ReportDefinition = { - paths(value) { - const paths = value - .split(/\r?\n/) - .map((item) => item.trim()) - .filter(Boolean); - if (!paths.length) - throw new Error("Required report paths must not be empty."); - return paths; - }, - create({ workspace, directory, @@ -19,7 +9,6 @@ const ReportDefinition = { sourceSha, sourcePrefix, mapping, - results, }) { const relative = path .relative(workspace, directory) @@ -39,16 +28,11 @@ const ReportDefinition = { if (!mappings || typeof mappings !== "object" || Array.isArray(mappings)) throw new Error("path-mapping must be a JSON object."); if (outside) mappings[directory.replace(/\/$/, "")] = project; - const reports = ReportDefinition.paths(results).map((pattern) => ({ - kind: "lint", - pattern, - })); - return { name: "Node.js lint", project, variant: { runtime }, - reports, + reports: [{ kind: "lint" }], "path-mapping": mappings, ...(sourceSha ? { source: { sha: sourceSha } } : {}), }; diff --git a/actions/lint/src/contracts.test.cjs b/actions/lint/src/contracts.test.cjs index 4d4c3fde..2617bc43 100644 --- a/actions/lint/src/contracts.test.cjs +++ b/actions/lint/src/contracts.test.cjs @@ -8,18 +8,10 @@ test("lint definitions retain lint-only selectors and map the measured project", workspace: "/checkout", directory: "/checkout/api", runtime: "v24", - results: "eslint.json\nlint.sarif", }; const definition = ReportDefinition.create(input); assert.equal(definition.project, "api"); - assert.deepEqual(definition.reports, [ - { kind: "lint", pattern: "eslint.json" }, - { kind: "lint", pattern: "lint.sarif" }, - ]); - assert.throws( - () => ReportDefinition.create({ ...input, results: " " }), - /must not be empty/, - ); + assert.deepEqual(definition.reports, [{ kind: "lint" }]); assert.throws( () => ReportDefinition.create({ ...input, directory: "/image/app" }), /source-sha and source-prefix/, diff --git a/actions/test/action.yml b/actions/test/action.yml index 9a29033b..66600cbd 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -7,9 +7,9 @@ description: | Missing or malformed reports fail even after a successful command. Available diagnostics are retained after failures. Call common publish-ci-reports once after all checks. Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). - CI_TEST_COVERAGE indicates whether to instrument tests. By default, results.json - supplies both test results and coverage using native Vitest or Jest JSON. Set - test-results and test-coverage to separate paths for runners such as node:test. + CI_TEST_COVERAGE indicates whether to instrument tests. Supported native outputs + are discovered automatically, including combined Vitest/Jest JSON and separate + JUnit and LCOV reports. No report filenames need declaring. See the [native test report guide](../../docs/usage/test-reports.md) for runner and shard configuration. author: hoverkraft branding: @@ -83,19 +83,6 @@ inputs: working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. default: "" - test-results: - description: - Required native test report paths relative to CI_REPORTS_DIR, one - per line. A combined JSON report can also supply coverage. - default: results.json - test-coverage: - description: Required native coverage paths relative to CI_REPORTS_DIR when - coverage is enabled, one per line. Defaults to test-results for combined - JSON, or coverage/lcov.info when merging Vitest shards. Vitest shard - merging emits coverage separately; enable lcovonly when CI_TEST_MERGE is - true. - default: "" - outputs: report-artifact-id: description: Native report bundle, including available diagnostics after failures. @@ -185,11 +172,7 @@ runs: SOURCE_SHA: ${{ inputs.source-sha }} SOURCE_PREFIX: ${{ inputs.source-prefix }} PATH_MAPPING: ${{ inputs.path-mapping }} - RESULTS: ${{ inputs.test-results }} COVERAGE: ${{ inputs.coverage }} - COVERAGE_PATHS: - ${{ inputs.test-coverage || (inputs.merge-shards != '' && - 'coverage/lcov.info' || inputs.test-results) }} MERGE_SHARDS: ${{ inputs.merge-shards }} with: script: | @@ -198,8 +181,8 @@ runs: core.setOutput('definition', ReportDefinition.create({ workspace: process.env.GITHUB_WORKSPACE, directory: process.env.WORKING_DIRECTORY, runtime: runtime.stdout.trim(), sourceSha: process.env.SOURCE_SHA, sourcePrefix: process.env.SOURCE_PREFIX, - mapping: process.env.PATH_MAPPING, results: process.env.RESULTS, coverage: process.env.COVERAGE, - coveragePaths: process.env.COVERAGE_PATHS, shards: process.env.MERGE_SHARDS + mapping: process.env.PATH_MAPPING, coverage: process.env.COVERAGE, + shards: process.env.MERGE_SHARDS })); - id: prepare-reports if: inputs.shard == '' @@ -305,7 +288,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@d22d9532441a353f54431721affbf3ec7874034b # PR #683 with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} diff --git a/actions/test/dist/index.js b/actions/test/dist/index.js index 76640890..fdd358f7 100644 --- a/actions/test/dist/index.js +++ b/actions/test/dist/index.js @@ -33,16 +33,6 @@ const path = __nccwpck_require__(760); /** Build the producer contract before any project check executes. */ const ReportDefinition = { - paths(value) { - const paths = value - .split(/\r?\n/) - .map((item) => item.trim()) - .filter(Boolean); - if (!paths.length) - throw new Error("Required report paths must not be empty."); - return paths; - }, - create({ workspace, directory, @@ -50,9 +40,7 @@ const ReportDefinition = { sourceSha, sourcePrefix, mapping, - results, coverage, - coveragePaths, shards, }) { const relative = path @@ -73,10 +61,7 @@ const ReportDefinition = { if (!mappings || typeof mappings !== "object" || Array.isArray(mappings)) throw new Error("path-mapping must be a JSON object."); if (outside) mappings[directory.replace(/\/$/, "")] = project; - const reports = ReportDefinition.paths(results).map((pattern) => ({ - kind: "test", - pattern, - })); + const reports = [{ kind: "test" }]; if (coverage === "true") { const language = fs.existsSync(path.join(directory, "tsconfig.json")) ? "TypeScript" @@ -84,25 +69,22 @@ const ReportDefinition = { const count = shards ? Number(shards) : 0; if (shards && (!Number.isSafeInteger(count) || count < 2 || count > 256)) throw new Error("Invalid merged shard count."); - reports.push( - ...ReportDefinition.paths(coveragePaths).map((pattern) => ({ - kind: "coverage", - pattern, - language, - ...(count - ? { - shards: { - expected: Array.from({ length: count }, (_, index) => - String(index + 1), - ), - included: Array.from({ length: count }, (_, index) => - String(index + 1), - ), - }, - } - : {}), - })), - ); + reports.push({ + kind: "coverage", + language, + ...(count + ? { + shards: { + expected: Array.from({ length: count }, (_, index) => + String(index + 1), + ), + included: Array.from({ length: count }, (_, index) => + String(index + 1), + ), + }, + } + : {}), + }); } return { name: "Node.js tests", diff --git a/actions/test/src/ReportDefinition.cjs b/actions/test/src/ReportDefinition.cjs index f32307fd..13ef8dbc 100644 --- a/actions/test/src/ReportDefinition.cjs +++ b/actions/test/src/ReportDefinition.cjs @@ -3,16 +3,6 @@ const path = require("node:path"); /** Build the producer contract before any project check executes. */ const ReportDefinition = { - paths(value) { - const paths = value - .split(/\r?\n/) - .map((item) => item.trim()) - .filter(Boolean); - if (!paths.length) - throw new Error("Required report paths must not be empty."); - return paths; - }, - create({ workspace, directory, @@ -20,9 +10,7 @@ const ReportDefinition = { sourceSha, sourcePrefix, mapping, - results, coverage, - coveragePaths, shards, }) { const relative = path @@ -43,10 +31,7 @@ const ReportDefinition = { if (!mappings || typeof mappings !== "object" || Array.isArray(mappings)) throw new Error("path-mapping must be a JSON object."); if (outside) mappings[directory.replace(/\/$/, "")] = project; - const reports = ReportDefinition.paths(results).map((pattern) => ({ - kind: "test", - pattern, - })); + const reports = [{ kind: "test" }]; if (coverage === "true") { const language = fs.existsSync(path.join(directory, "tsconfig.json")) ? "TypeScript" @@ -54,25 +39,22 @@ const ReportDefinition = { const count = shards ? Number(shards) : 0; if (shards && (!Number.isSafeInteger(count) || count < 2 || count > 256)) throw new Error("Invalid merged shard count."); - reports.push( - ...ReportDefinition.paths(coveragePaths).map((pattern) => ({ - kind: "coverage", - pattern, - language, - ...(count - ? { - shards: { - expected: Array.from({ length: count }, (_, index) => - String(index + 1), - ), - included: Array.from({ length: count }, (_, index) => - String(index + 1), - ), - }, - } - : {}), - })), - ); + reports.push({ + kind: "coverage", + language, + ...(count + ? { + shards: { + expected: Array.from({ length: count }, (_, index) => + String(index + 1), + ), + included: Array.from({ length: count }, (_, index) => + String(index + 1), + ), + }, + } + : {}), + }); } return { name: "Node.js tests", diff --git a/actions/test/src/contracts.test.cjs b/actions/test/src/contracts.test.cjs index b84dd71f..f751eba5 100644 --- a/actions/test/src/contracts.test.cjs +++ b/actions/test/src/contracts.test.cjs @@ -9,9 +9,7 @@ test("prebuilt checks require explicit source identity and map paths to the chec workspace: "/checkout", directory: "/image/app", runtime: "v24", - results: "results.json", coverage: "true", - coveragePaths: "results.json", }; assert.throws( () => ReportDefinition.create(input), @@ -26,11 +24,8 @@ test("prebuilt checks require explicit source identity and map paths to the chec assert.equal(definition.source.sha, "a".repeat(40)); assert.deepEqual(definition["path-mapping"], { "/image/app": "apps/api" }); assert.deepEqual( - definition.reports.map(({ kind, pattern }) => ({ kind, pattern })), - [ - { kind: "test", pattern: "results.json" }, - { kind: "coverage", pattern: "results.json" }, - ], + definition.reports.map(({ kind }) => ({ kind })), + [{ kind: "test" }, { kind: "coverage" }], ); }); @@ -39,9 +34,7 @@ test("invalid merged shard counts cannot silently become an unsharded report", ( workspace: "/checkout", directory: "/checkout", runtime: "v24", - results: "junit.xml", coverage: "true", - coveragePaths: "lcov.info", }; for (const shards of ["invalid", "0", "1", "257"]) assert.throws( @@ -55,21 +48,14 @@ test("invalid merged shard counts cannot silently become an unsharded report", ( }); }); -test("secondary runs retain tests without coverage promises and reject invalid report inputs", () => { +test("secondary runs retain tests without coverage promises and reject invalid path mappings", () => { const input = { workspace: "/repository", directory: "/repository/app", runtime: "v24", - results: "junit.xml", coverage: "false", }; - assert.deepEqual(ReportDefinition.create(input).reports, [ - { kind: "test", pattern: "junit.xml" }, - ]); - assert.throws( - () => ReportDefinition.create({ ...input, results: " " }), - /must not be empty/, - ); + assert.deepEqual(ReportDefinition.create(input).reports, [{ kind: "test" }]); assert.throws( () => ReportDefinition.create({ ...input, mapping: "[]" }), /JSON object/, diff --git a/docs/usage/test-reports.md b/docs/usage/test-reports.md index 4913986b..90d9606d 100644 --- a/docs/usage/test-reports.md +++ b/docs/usage/test-reports.md @@ -1,8 +1,9 @@ # Native test reports The test action provides a fresh `CI_REPORTS_DIR` and sets `CI_TEST_COVERAGE`. -Write reports during that invocation. By default, native Vitest or Jest -`results.json` supplies both detailed test outcomes and coverage. Missing +Write supported native reports during that invocation. The action discovers +them automatically, including files in subdirectories. Native Vitest or Jest +JSON can supply both detailed test outcomes and coverage. Missing requested coverage fails validation; tests remain available for diagnosis. The caller's `publish-ci-reports.yml` workflow publishes the collected artifacts once. @@ -53,7 +54,7 @@ coverage: { } ``` -Merged test results default to `results.json` and coverage to `coverage/lcov.info`. +Merged test results and coverage are discovered independently. Keep reporter-specific `outputFile.json` configuration, since the action adds `outputFile.blob` for shards. Defer coverage thresholds during shard execution and enforce the original thresholds during merging. The action checks the @@ -61,18 +62,27 @@ complete shard set and retains failed shard outcomes. ## Other runners -Keep separate native reports when the runner needs them. For `node:test`, use -JUnit and LCOV and configure the existing inputs: +Keep separate native reports when the runner needs them. For `node:test`, a +`test:ci` script can emit JUnit and LCOV: -```yaml -test-results: junit.xml -test-coverage: coverage/lcov.info +```sh +node $(test "${CI_TEST_COVERAGE:-true}" = true && printf %s --experimental-test-coverage) \ + --test --test-reporter=spec --test-reporter-destination=stdout \ + --test-reporter=junit --test-reporter-destination="$CI_REPORTS_DIR/junit.xml" \ + --test-reporter=lcov --test-reporter-destination="$CI_REPORTS_DIR/lcov.info" ``` -For the reusable continuous-integration workflow, supply those paths inside -its `test` JSON object. Coverage can be disabled without removing detailed test -results. Test and coverage publication destinations remain independent of the -number of native files. +Keep calling `continuous-integration.yml` with its default `test:ci` command. +No filename settings are required. Coverage can be disabled without removing +detailed test results. Missing required report kinds and malformed reports fail +the action; other valid results remain available for diagnosis. + +## Lint commands + +The lint action discovers supported diagnostics in its fresh `CI_REPORTS_DIR`. +For example, `lint:ci` can emit ESLint JSON, SARIF or Checkstyle. Configure the +native reporter in the command, without repeating its output path in the +workflow. Common owns validation and conversion for all these formats. ## Report publication diff --git a/tests/continuous-integration/workflow.test.js b/tests/continuous-integration/workflow.test.js index 23ec2fc9..cbfe887e 100644 --- a/tests/continuous-integration/workflow.test.js +++ b/tests/continuous-integration/workflow.test.js @@ -23,39 +23,23 @@ test("coverage collection defaults to enabled without selecting a provider", asy TEST_INPUT: "true", }); assert.equal(outputs.coverage, true); - assert.equal(outputs["test-results"], "results.json"); - assert.equal(outputs["test-coverage"], "results.json"); const disabled = await runScript("prepare", "test-options", { TEST_INPUT: '{"coverage":false}', }); assert.equal(disabled.outputs.coverage, false); }); -test("custom components retain native report paths", async () => { - const { outputs } = await runScript("prepare", "test-options", { - TEST_INPUT: JSON.stringify({ - coverage: true, - "test-coverage": "native/coverage.xml", - "test-results": "native/junit.xml", - }), - }); - assert.equal(outputs["test-coverage"], "native/coverage.xml"); - assert.equal(outputs["test-results"], "native/junit.xml"); -}); - for (const options of [ - { comment: false }, - { "report-group": "tests" }, - { coverage: "github" }, - { "test-coverage": {} }, + { unknown: true }, + { coverage: "yes" }, { "source-sha": 42 }, ]) { - test(`rejects retired or invalid report options ${JSON.stringify(options)}`, async () => { + test(`rejects invalid test options ${JSON.stringify(options)}`, async () => { await assert.rejects( runScript("prepare", "test-options", { TEST_INPUT: JSON.stringify(options), }), - /Unknown test options|test\.(coverage|test-coverage|source-sha)/, + /Unknown test options|test\.(coverage|source-sha)/, ); }); } @@ -76,7 +60,7 @@ test("lint configuration rejects ambiguous options and respects disabled checks" ( await runScript("prepare", "lint-options", { CHECKS: "true", - LINT_INPUT: '{"lint-results":"lint.sarif"}', + LINT_INPUT: '{"command":"lint:custom"}', }) ).outputs["lint-enabled"], true, @@ -84,7 +68,7 @@ test("lint configuration rejects ambiguous options and respects disabled checks" await assert.rejects( runScript("prepare", "lint-options", { CHECKS: "true", - LINT_INPUT: '{"report-plan":"obsolete"}', + LINT_INPUT: '{"unknown":true}', }), /Unknown lint options/, ); @@ -501,7 +485,6 @@ test("prepares isolated shard groups and forwards script arguments", async () => shard: [1, 2], }); assert.equal(first.outputs.shards, 2); - assert.equal(first.outputs["test-coverage"], "coverage/lcov.info"); assert.equal(first.outputs["merge-command"], "test:merge"); assert.notEqual(first.outputs.group, second.outputs.group); assert.deepEqual(Array.from(first.outputs.arguments), [ @@ -509,10 +492,9 @@ test("prepares isolated shard groups and forwards script arguments", async () => "config with spaces.js", ]); const defaults = await runScript("prepare", "test-options", { - TEST_INPUT: '{"shards":1,"test-results":"custom.json"}', + TEST_INPUT: '{"shards":1}', }); assert.equal(defaults.outputs.shards, 1); - assert.equal(defaults.outputs["test-coverage"], "custom.json"); assert.equal(defaults.outputs.group, ""); assert.equal(defaults.outputs["merge-command"], defaults.outputs.command); }); From c2a01a0ebfb4101a6d87d68b50aecc149f572138 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Tue, 1 Dec 2026 15:46:41 +0100 Subject: [PATCH 40/48] docs(reports): regenerate automatic discovery references --- .github/workflows/continuous-integration.md | 25 ++++--- actions/lint/README.md | 33 ++++------ actions/lint/dist/index.js | 9 +-- actions/lint/src/ReportDefinition.cjs | 9 +-- actions/test/README.md | 73 +++++++++------------ 5 files changed, 60 insertions(+), 89 deletions(-) diff --git a/.github/workflows/continuous-integration.md b/.github/workflows/continuous-integration.md index e59c3d28..e036673a 100644 --- a/.github/workflows/continuous-integration.md +++ b/.github/workflows/continuous-integration.md @@ -32,10 +32,9 @@ Workflow to run Node.js checks, builds and package validation. Report artifacts -Commands write their declared native outputs into CI_REPORTS_DIR. -Test results and coverage default to the same native results.json; lint defaults to -lint.sarif. Configure test-results, test-coverage or lint-results beside the -command when a runner needs separate files. See [native test reports](../../docs/usage/test-reports.md). +Commands write supported native outputs into CI_REPORTS_DIR. +The language actions discover report files automatically. Callers configure +commands, not filenames. See [native test reports](../../docs/usage/test-reports.md). The lint and test actions validate these outputs and upload report artifacts. Test actions merge shards natively; their coverage output remains separate. Producer calls require actions: read and contents: read. @@ -68,7 +67,7 @@ on: permissions: {} jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@64632ba90b771d20337b737d8b0ccee0cb7bae58 # 3.1.2 + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage permissions: actions: read contents: read @@ -158,7 +157,7 @@ jobs: # Default: `true` checks: true - # Lint options: command (default lint:ci) and lint-results (default lint.sarif). Commands write native results under CI_REPORTS_DIR. Empty disables lint. + # Lint options: command (default lint:ci). The action discovers supported native results under CI_REPORTS_DIR. Empty disables lint. # Default: `true` lint: "true" @@ -188,7 +187,7 @@ jobs: # Default: `true` dependency-review: true - # Test options: command (default test:ci), arguments, coverage (boolean, default true), test-results (default results.json), test-coverage (defaults to test-results, or coverage/lcov.info for Vitest shard merging), shards and merge-command. Paths are relative to CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. + # Test options: command (default test:ci), arguments, coverage (boolean, default true), shards and merge-command. The action discovers supported native results under CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. # Default: `true` test: "true" @@ -290,7 +289,7 @@ jobs: | | | | | | | | Example: `{"tests":"my-cli --help"}` | | | | | **`checks`** | Optional flag to enable check steps. | **false** | **boolean** | `true` | -| **`lint`** | Lint options: command (default lint:ci) and lint-results (default lint.sarif). Commands write native results under CI_REPORTS_DIR. Empty disables lint. | **false** | **string** | `true` | +| **`lint`** | Lint options: command (default lint:ci). The action discovers supported native results under CI_REPORTS_DIR. Empty disables lint. | **false** | **string** | `true` | | **`code-ql`** | CodeQL analysis language, or a JSON object with `languages` and optional `config-file`. | **false** | **string** | `typescript` | | | Set to an empty string to disable CodeQL. | | | | | | In JSON form, `languages` must be a nonempty string and `config-file` must be a string. | | | | @@ -304,7 +303,7 @@ jobs: | **`dependency-review`** | Enable dependency review scan. | **false** | **boolean** | `true` | | | Works with public repositories and private repositories with a GitHub Advanced Security license. | | | | | | See . | | | | -| **`test`** | Test options: command (default test:ci), arguments, coverage (boolean, default true), test-results (default results.json), test-coverage (defaults to test-results, or coverage/lcov.info for Vitest shard merging), shards and merge-command. Paths are relative to CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. | **false** | **string** | `true` | +| **`test`** | Test options: command (default test:ci), arguments, coverage (boolean, default true), shards and merge-command. The action discovers supported native results under CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. | **false** | **string** | `true` | | **`working-directory`** | Working directory where dependencies and application commands run. | **false** | **string** | `.` | | | Relative paths resolve against the workspace of each application job. | | | | | | Directory existence and non-container workspace boundaries are validated in those jobs. | | | | @@ -444,7 +443,7 @@ on: jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@64632ba90b771d20337b737d8b0ccee0cb7bae58 # 3.1.2 + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage permissions: id-token: write security-events: write @@ -510,7 +509,7 @@ jobs: # Run CI checks inside the Docker container continuous-integration: needs: build-image - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@64632ba90b771d20337b737d8b0ccee0cb7bae58 # 3.1.2 + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage permissions: id-token: write security-events: write @@ -534,7 +533,7 @@ on: branches: [main] jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@64632ba90b771d20337b737d8b0ccee0cb7bae58 # 3.1.2 + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage permissions: id-token: write security-events: write @@ -562,7 +561,7 @@ on: jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@64632ba90b771d20337b737d8b0ccee0cb7bae58 # 3.1.2 + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage permissions: id-token: write security-events: write diff --git a/actions/lint/README.md b/actions/lint/README.md index 118389d4..b1e88ec8 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -38,7 +38,7 @@ Producer jobs require actions: read and contents: read, with source checked out ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@64632ba90b771d20337b737d8b0ccee0cb7bae58 # 3.1.2 +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -57,7 +57,7 @@ Producer jobs require actions: read and contents: read, with source checked out # Default: `false` container: "false" - # npm/pnpm/Yarn script to run. Generate the declared native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". + # npm/pnpm/Yarn script to run. Generate the supported native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". # Default: `lint:ci` command: lint:ci @@ -69,10 +69,6 @@ Producer jobs require actions: read and contents: read, with source checked out # Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. source-prefix: "" - - # Required native report paths relative to CI_REPORTS_DIR, one per line. - # Default: `lint.sarif` - lint-results: lint.sarif ``` @@ -80,19 +76,18 @@ Producer jobs require actions: read and contents: read, with source checked out ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------ | -| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | -| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | -| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | -| **`working-directory`** | Working directory where lint commands are executed. | **false** | `.` | -| | Can be absolute or relative to the repository root. | | | -| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | -| **`command`** | npm/pnpm/Yarn script to run. Generate the declared native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". | **false** | `lint:ci` | -| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | -| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | -| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | -| **`lint-results`** | Required native report paths relative to CI_REPORTS_DIR, one per line. | **false** | `lint.sarif` | +| **Input** | **Description** | **Required** | **Default** | +| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | +| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | +| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | +| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | +| **`working-directory`** | Working directory where lint commands are executed. | **false** | `.` | +| | Can be absolute or relative to the repository root. | | | +| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | +| **`command`** | npm/pnpm/Yarn script to run. Generate the supported native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". | **false** | `lint:ci` | +| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | +| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | +| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | diff --git a/actions/lint/dist/index.js b/actions/lint/dist/index.js index 1b8a01a9..49949fc4 100644 --- a/actions/lint/dist/index.js +++ b/actions/lint/dist/index.js @@ -24,14 +24,7 @@ const path = __nccwpck_require__(760); /** Build the producer contract before any project check executes. */ const ReportDefinition = { - create({ - workspace, - directory, - runtime, - sourceSha, - sourcePrefix, - mapping, - }) { + create({ workspace, directory, runtime, sourceSha, sourcePrefix, mapping }) { const relative = path .relative(workspace, directory) .split(path.sep) diff --git a/actions/lint/src/ReportDefinition.cjs b/actions/lint/src/ReportDefinition.cjs index f1b4edaa..a628f32b 100644 --- a/actions/lint/src/ReportDefinition.cjs +++ b/actions/lint/src/ReportDefinition.cjs @@ -2,14 +2,7 @@ const path = require("node:path"); /** Build the producer contract before any project check executes. */ const ReportDefinition = { - create({ - workspace, - directory, - runtime, - sourceSha, - sourcePrefix, - mapping, - }) { + create({ workspace, directory, runtime, sourceSha, sourcePrefix, mapping }) { const relative = path .relative(workspace, directory) .split(path.sep) diff --git a/actions/test/README.md b/actions/test/README.md index b41bc8da..00b54c0a 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -31,9 +31,9 @@ required reports there; stale files in the project cannot satisfy the contract. Missing or malformed reports fail even after a successful command. Available diagnostics are retained after failures. Call common publish-ci-reports once after all checks. Producer jobs require actions: read and contents: read, with source checked out and Git available (including in CI containers). -CI_TEST_COVERAGE indicates whether to instrument tests. By default, results.json -supplies both test results and coverage using native Vitest or Jest JSON. Set -test-results and test-coverage to separate paths for runners such as node:test. +CI_TEST_COVERAGE indicates whether to instrument tests. Supported native outputs +are discovered automatically, including combined Vitest/Jest JSON and separate +JUnit and LCOV reports. No report filenames need declaring. See the [native test report guide](../../docs/usage/test-reports.md) for runner and shard configuration. @@ -42,7 +42,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@64632ba90b771d20337b737d8b0ccee0cb7bae58 # 3.1.2 +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -102,13 +102,6 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner # Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. source-prefix: "" - - # Required native test report paths relative to CI_REPORTS_DIR, one per line. A combined JSON report can also supply coverage. - # Default: `results.json` - test-results: results.json - - # Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Defaults to test-results for combined JSON, or coverage/lcov.info when merging Vitest shards. Vitest shard merging emits coverage separately; enable lcovonly when CI_TEST_MERGE is true. - test-coverage: "" ``` @@ -116,36 +109,34 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | -------------- | -| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | -| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | -| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | -| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | -| | Can be absolute or relative to the repository root. | | | -| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | -| **`command`** | Package script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. See the native test report guide for Vitest, Jest, node:test and sharding configuration. | **false** | `test:ci` | -| **`coverage`** | Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. | **false** | `true` | -| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | -| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | -| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | -| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | -| | after tests, including failures. Individual reporting is disabled for shards. | | | -| | Use reporter-specific `--outputFile.json` rather than scalar `--outputFile` in the package script. | | | -| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | -| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | -| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | -| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | -| | All shards and their merge must use the same group and absolute project directory. | | | -| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | -| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | -| | The package script must enable final reporters and original coverage thresholds. | | | -| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | -| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | -| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | -| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | -| **`test-results`** | Required native test report paths relative to CI_REPORTS_DIR, one per line. A combined JSON report can also supply coverage. | **false** | `results.json` | -| **`test-coverage`** | Required native coverage paths relative to CI_REPORTS_DIR when coverage is enabled, one per line. Defaults to test-results for combined JSON, or coverage/lcov.info when merging Vitest shards. Vitest shard merging emits coverage separately; enable lcovonly when CI_TEST_MERGE is true. | **false** | - | +| **Input** | **Description** | **Required** | **Default** | +| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | +| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | +| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | +| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | +| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | +| | Can be absolute or relative to the repository root. | | | +| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | +| **`command`** | Package script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. See the native test report guide for Vitest, Jest, node:test and sharding configuration. | **false** | `test:ci` | +| **`coverage`** | Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. | **false** | `true` | +| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | +| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | +| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | +| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | +| | after tests, including failures. Individual reporting is disabled for shards. | | | +| | Use reporter-specific `--outputFile.json` rather than scalar `--outputFile` in the package script. | | | +| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | +| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | +| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | +| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | +| | All shards and their merge must use the same group and absolute project directory. | | | +| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | +| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | +| | The package script must enable final reporters and original coverage thresholds. | | | +| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | +| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | +| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | +| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | From 2d41d1305877ae123c0287d950731e1a89da3905 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Wed, 2 Dec 2026 17:32:13 +0100 Subject: [PATCH 41/48] fix(reports): adopt reviewed Common reporting candidate --- .github/workflows/__commit-action-distributions.yml | 2 +- .github/workflows/__rebuild-action-distributions.yml | 2 +- .github/workflows/__shared-ci.yml | 6 +++--- .github/workflows/__test-action-lint.yml | 2 +- .github/workflows/__test-action-test.yml | 2 +- actions/lint/action.yml | 2 +- actions/test/action.yml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml index c1b0269d..96898672 100644 --- a/.github/workflows/__commit-action-distributions.yml +++ b/.github/workflows/__commit-action-distributions.yml @@ -9,7 +9,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml index d5373e29..34235cec 100644 --- a/.github/workflows/__rebuild-action-distributions.yml +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -8,7 +8,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index f11de8a7..7d8b70f3 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) permissions: actions: read contents: read @@ -166,7 +166,7 @@ jobs: - test-action-test - test-action-lint - reports - uses: hoverkraft-tech/ci-github-common/.github/workflows/check-jobs.yml@cb86863a77462f8837b38ad542b49ab36a825a85 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/check-jobs.yml@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) permissions: {} with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index 3350f52b..b3a0156d 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/lint run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) with: working-directory: actions/lint - name: Arrange - Create a dependency-free lint project diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 8ef29dd0..a2ba6a65 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/test run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@23aa1846c8c6d829f321984b6d0252ebc36b01ee # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) with: working-directory: actions/test - name: Arrange - Create a dependency-free native test project diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 38fea688..132e7a38 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -143,7 +143,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@d22d9532441a353f54431721affbf3ec7874034b # PR #683 + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} diff --git a/actions/test/action.yml b/actions/test/action.yml index 66600cbd..2985caeb 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -288,7 +288,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@d22d9532441a353f54431721affbf3ec7874034b # PR #683 + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} From 36be3d131d95b6a0987a8819b7846f52369b8aac Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Wed, 2 Dec 2026 23:33:13 +0100 Subject: [PATCH 42/48] fix(reports): consume Common XML discovery fix --- .github/workflows/__commit-action-distributions.yml | 2 +- .github/workflows/__rebuild-action-distributions.yml | 2 +- .github/workflows/__shared-ci.yml | 6 +++--- .github/workflows/__test-action-lint.yml | 2 +- .github/workflows/__test-action-test.yml | 2 +- actions/lint/action.yml | 2 +- actions/test/action.yml | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml index 96898672..1e3d098f 100644 --- a/.github/workflows/__commit-action-distributions.yml +++ b/.github/workflows/__commit-action-distributions.yml @@ -9,7 +9,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml index 34235cec..0007bddd 100644 --- a/.github/workflows/__rebuild-action-distributions.yml +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -8,7 +8,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 7d8b70f3..993e2e38 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -8,7 +8,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) permissions: actions: read contents: read @@ -137,7 +137,7 @@ jobs: - test-workflow-continuous-integration - test-action-test - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) permissions: actions: read contents: read @@ -166,7 +166,7 @@ jobs: - test-action-test - test-action-lint - reports - uses: hoverkraft-tech/ci-github-common/.github/workflows/check-jobs.yml@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/check-jobs.yml@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) permissions: {} with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index b3a0156d..ecb69cb3 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/lint run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) with: working-directory: actions/lint - name: Arrange - Create a dependency-free lint project diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index a2ba6a65..915b8dd2 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/test run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) with: working-directory: actions/test - name: Arrange - Create a dependency-free native test project diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 132e7a38..3738153b 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -143,7 +143,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} diff --git a/actions/test/action.yml b/actions/test/action.yml index 2985caeb..2c23b55b 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -288,7 +288,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@438cd28e5a79d5f7c49a54675f34df175b96f5c2 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} From 814c071e3bbd7a44c24cd331502e0dca585607c3 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 3 Dec 2026 10:10:51 +0100 Subject: [PATCH 43/48] feat: add native lint and test command presets --- .github/workflows/__checks.yml | 126 + .../__commit-action-distributions.yml | 2 +- .../__rebuild-action-distributions.yml | 2 +- .github/workflows/__shared-ci.yml | 145 +- .github/workflows/__test-action-lint.yml | 2 +- .../workflows/__test-action-setup-node.yml | 14 + .github/workflows/__test-action-test.yml | 5 +- .github/workflows/continuous-integration.md | 20 +- .github/workflows/continuous-integration.yml | 33 +- actions/get-package-manager/README.md | 3 +- actions/get-package-manager/action.yml | 7 + actions/lint/README.md | 49 +- actions/lint/action.yml | 38 +- actions/lint/dist/index.js | 156 +- actions/lint/src/LintCommand.cjs | 92 + actions/lint/src/LintCommand.test.cjs | 59 + actions/lint/src/index.js | 5 +- actions/lint/src/presets/Biome.cjs | 15 + actions/lint/src/presets/ESLint.cjs | 13 + actions/setup-node/README.md | 11 +- actions/setup-node/action.yml | 3 + actions/test/README.md | 79 +- actions/test/TestShards.cjs | 8 - actions/test/action.yml | 36 +- actions/test/dist/index.js | 186 +- actions/test/src/TestCommand.cjs | 90 + actions/test/src/TestCommand.test.cjs | 124 + actions/test/src/index.js | 5 +- actions/test/src/presets/Jest.cjs | 16 + actions/test/src/presets/NodeTest.cjs | 22 + actions/test/src/presets/Vitest.cjs | 23 + docs/adr/0004-optional-vitest-sharding.md | 20 + docs/usage/test-reports.md | 114 +- .../continuous-integration/package-lock.json | 6884 +++++++++++++++-- tests/continuous-integration/package.json | 7 +- tests/continuous-integration/presets.test.js | 158 + tests/continuous-integration/sharding.test.js | 72 +- 37 files changed, 7541 insertions(+), 1103 deletions(-) create mode 100644 .github/workflows/__checks.yml create mode 100644 actions/lint/src/LintCommand.cjs create mode 100644 actions/lint/src/LintCommand.test.cjs create mode 100644 actions/lint/src/presets/Biome.cjs create mode 100644 actions/lint/src/presets/ESLint.cjs create mode 100644 actions/test/src/TestCommand.cjs create mode 100644 actions/test/src/TestCommand.test.cjs create mode 100644 actions/test/src/presets/Jest.cjs create mode 100644 actions/test/src/presets/NodeTest.cjs create mode 100644 actions/test/src/presets/Vitest.cjs create mode 100644 tests/continuous-integration/presets.test.js diff --git a/.github/workflows/__checks.yml b/.github/workflows/__checks.yml new file mode 100644 index 00000000..51304701 --- /dev/null +++ b/.github/workflows/__checks.yml @@ -0,0 +1,126 @@ +name: Internal - CI checks + +on: + workflow_call: + outputs: + job-results: + description: Every check result, supplied automatically by GitHub. + value: ${{ toJSON(jobs) }} + +permissions: {} + +jobs: + lint: + name: linter + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) + permissions: + actions: read + contents: read + issues: write + packages: read + pull-requests: write + security-events: write + statuses: write + + test-release: + name: Test release preparation and recovery + uses: $/.github/workflows/__test-release.yml + permissions: + actions: read + contents: read + id-token: write + packages: read + pull-requests: write + security-events: write + + test-action-dependencies-cache: + name: Test action "dependencies-cache" + needs: lint + uses: $/.github/workflows/__test-action-dependencies-cache.yml + permissions: + actions: read + contents: read + + test-action-get-package-manager: + name: Test action "get-package-manager" + needs: lint + uses: $/.github/workflows/__test-action-get-package-manager.yml + permissions: + actions: read + contents: read + + test-action-has-installed-dependencies: + name: Test action "has-installed-dependencies" + needs: lint + uses: $/.github/workflows/__test-action-has-installed-dependencies.yml + permissions: + actions: read + contents: read + + test-action-package-create: + name: Test action "package/create" + needs: lint + uses: $/.github/workflows/__test-action-package-create.yml + permissions: + actions: read + contents: read + + test-action-package-test: + name: Test action "package/test" + needs: lint + uses: $/.github/workflows/__test-action-package-test.yml + permissions: + actions: read + contents: read + + test-action-package-discover: + name: Test action "package/discover" + needs: lint + uses: $/.github/workflows/__test-action-package-discover.yml + permissions: + actions: read + contents: read + + test-action-setup-node: + name: Test action "setup-node" + needs: lint + uses: $/.github/workflows/__test-action-setup-node.yml + permissions: + actions: read + contents: read + + test-action-package-publish: + name: Test action "package/publish" + needs: lint + uses: $/.github/workflows/__test-action-package-publish.yml + permissions: + actions: read + contents: read + + test-workflow-continuous-integration: + name: Test workflow "continuous-integration" + needs: lint + uses: $/.github/workflows/__test-workflow-continuous-integration.yml + permissions: + actions: read + attestations: write + contents: read + packages: write + pull-requests: write + id-token: write + issues: read + security-events: write + + test-action-test: + needs: lint + uses: $/.github/workflows/__test-action-test.yml + permissions: + actions: read + contents: read + + test-action-lint: + needs: lint + uses: $/.github/workflows/__test-action-lint.yml + permissions: + actions: read + contents: read diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml index 1e3d098f..d8a83697 100644 --- a/.github/workflows/__commit-action-distributions.yml +++ b/.github/workflows/__commit-action-distributions.yml @@ -9,7 +9,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml index 0007bddd..9800892b 100644 --- a/.github/workflows/__rebuild-action-distributions.yml +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -8,7 +8,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) permissions: actions: read contents: read diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 993e2e38..19d4c7b7 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -6,138 +6,22 @@ on: permissions: {} jobs: - lint: - name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) + checks: + uses: $/.github/workflows/__checks.yml permissions: actions: read contents: read issues: write - packages: read + packages: write pull-requests: write security-events: write statuses: write - - test-release: - name: Test release preparation and recovery - uses: $/.github/workflows/__test-release.yml - permissions: - actions: read - contents: read id-token: write - packages: read - pull-requests: write - security-events: write - - test-action-dependencies-cache: - name: Test action "dependencies-cache" - needs: lint - uses: $/.github/workflows/__test-action-dependencies-cache.yml - permissions: - actions: read - contents: read - - test-action-get-package-manager: - name: Test action "get-package-manager" - needs: lint - uses: $/.github/workflows/__test-action-get-package-manager.yml - permissions: - actions: read - contents: read - - test-action-has-installed-dependencies: - name: Test action "has-installed-dependencies" - needs: lint - uses: $/.github/workflows/__test-action-has-installed-dependencies.yml - permissions: - actions: read - contents: read - - test-action-package-create: - name: Test action "package/create" - needs: lint - uses: $/.github/workflows/__test-action-package-create.yml - permissions: - actions: read - contents: read - - test-action-package-test: - name: Test action "package/test" - needs: lint - uses: $/.github/workflows/__test-action-package-test.yml - permissions: - actions: read - contents: read - - test-action-package-discover: - name: Test action "package/discover" - needs: lint - uses: $/.github/workflows/__test-action-package-discover.yml - permissions: - actions: read - contents: read - - test-action-setup-node: - name: Test action "setup-node" - needs: lint - uses: $/.github/workflows/__test-action-setup-node.yml - permissions: - actions: read - contents: read - - test-action-package-publish: - name: Test action "package/publish" - needs: lint - uses: $/.github/workflows/__test-action-package-publish.yml - permissions: - actions: read - contents: read - - test-workflow-continuous-integration: - name: Test workflow "continuous-integration" - needs: lint - uses: $/.github/workflows/__test-workflow-continuous-integration.yml - permissions: - actions: read attestations: write - contents: read - packages: write - pull-requests: write - id-token: write - issues: read - security-events: write - - test-action-test: - needs: lint - uses: $/.github/workflows/__test-action-test.yml - permissions: - actions: read - contents: read - - test-action-lint: - needs: lint - uses: $/.github/workflows/__test-action-lint.yml - permissions: - actions: read - contents: read - reports: if: always() - needs: - - lint - - test-release - - test-action-dependencies-cache - - test-action-get-package-manager - - test-action-has-installed-dependencies - - test-action-package-create - - test-action-package-test - - test-action-package-discover - - test-action-setup-node - - test-action-package-publish - - test-workflow-continuous-integration - - test-action-test - - test-action-lint - uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) + needs: checks + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) permissions: actions: read contents: read @@ -146,27 +30,14 @@ jobs: id-token: write security-events: write with: - job-results: ${{ toJSON(needs) }} - + job-results: ${{ needs.checks.outputs.job-results || toJSON(needs) }} complete: name: CI complete if: always() needs: - - lint - - test-release - - test-action-dependencies-cache - - test-action-get-package-manager - - test-action-has-installed-dependencies - - test-action-package-create - - test-action-package-test - - test-action-package-discover - - test-action-setup-node - - test-action-package-publish - - test-workflow-continuous-integration - - test-action-test - - test-action-lint + - checks - reports - uses: hoverkraft-tech/ci-github-common/.github/workflows/check-jobs.yml@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/check-jobs.yml@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) permissions: {} with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index ecb69cb3..f71aecfc 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/lint run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) with: working-directory: actions/lint - name: Arrange - Create a dependency-free lint project diff --git a/.github/workflows/__test-action-setup-node.yml b/.github/workflows/__test-action-setup-node.yml index 68cf3e73..d85d729d 100644 --- a/.github/workflows/__test-action-setup-node.yml +++ b/.github/workflows/__test-action-setup-node.yml @@ -69,7 +69,9 @@ jobs: const hook = `node -e "require('node:fs').writeFileSync('install-hook-ran', '')"`; fs.writeFileSync(path.join(dependency, 'package.json'), JSON.stringify({ name: 'lifecycle-dependency', version: '1.0.0', scripts: { postinstall: hook }, + bin: { 'lifecycle-binary': 'bin.cjs' }, })); + fs.writeFileSync(path.join(dependency, 'bin.cjs'), '#!/usr/bin/env node\nrequire("node:fs").writeFileSync("binary-arguments.json", JSON.stringify(process.argv.slice(2)));\n', {mode: 0o755}); await exec.exec('npm', ['pack', '--ignore-scripts', '--pack-destination', directory], { cwd: dependency }); const source = JSON.parse(fs.readFileSync(path.join(process.env.SOURCE_DIRECTORY, 'package.json'), 'utf8')); fs.writeFileSync(path.join(directory, 'package.json'), JSON.stringify({ @@ -97,6 +99,18 @@ jobs: with: working-directory: ${{ steps.lifecycle-fixture.outputs.directory }} + - name: Assert - Installed binaries retain arguments through the package manager + uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 + env: + EXEC_COMMAND: ${{ steps.default-install.outputs.exec-command }} + DIRECTORY: ${{ steps.lifecycle-fixture.outputs.directory }} + with: + script: | + const args = ['config with spaces', '$(not-a-command)']; + await exec.exec(process.env.EXEC_COMMAND, ['lifecycle-binary', ...args], {cwd: process.env.DIRECTORY}); + const actual = JSON.parse(require('node:fs').readFileSync(require('node:path').join(process.env.DIRECTORY, 'binary-arguments.json'), 'utf8')); + require('node:assert/strict').deepEqual(actual, args); + - name: Assert - Installation hooks are disabled and explicit builds still run working-directory: ${{ steps.lifecycle-fixture.outputs.directory }} env: diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 915b8dd2..7fdc35d6 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/test run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) with: working-directory: actions/test - name: Arrange - Create a dependency-free native test project @@ -39,7 +39,7 @@ jobs: fs.writeFileSync('report-fixture/package.json', JSON.stringify({ name: 'report-fixture', version: '1.0.0', private: true, scripts: { - 'test:ci': 'node --experimental-test-coverage --test --test-reporter=spec --test-reporter-destination=stdout --test-reporter=junit --test-reporter-destination="$CI_REPORTS_DIR/junit.xml" --test-reporter=lcov --test-reporter-destination="$CI_REPORTS_DIR/lcov.info" test.cjs', + test: 'node --test', 'test:no-reports': 'node --test test.cjs', }, })); @@ -53,7 +53,6 @@ jobs: EXPECT_FAILURE: "false" with: working-directory: report-fixture - command: test:ci coverage: "true" - name: Assert - Retrieve reports even after a failed test if: steps.test.outputs.report-artifact-id != '' diff --git a/.github/workflows/continuous-integration.md b/.github/workflows/continuous-integration.md index e036673a..1a6f07c6 100644 --- a/.github/workflows/continuous-integration.md +++ b/.github/workflows/continuous-integration.md @@ -40,7 +40,7 @@ Test actions merge shards natively; their coverage output remains separate. Producer calls require actions: read and contents: read. The caller publishes those artifacts once with `publish-ci-reports.yml`. -See the [common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/44d42ca06b9f722d8ab79af4f588f30ad1e16bc5/docs/usage/ci-reports.md#consumer-workflow). +See the [common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/feat/native-github-coverage/.github/workflows/publish-ci-reports.md#consumer-workflow). Prebuilt CI containers must include Git. They require a checkout for source verification and test.source-sha plus test.source-prefix identifying the tested source. @@ -67,7 +67,7 @@ on: permissions: {} jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@36be3d131d95b6a0987a8819b7846f52369b8aac # feat/native-github-coverage permissions: actions: read contents: read @@ -157,7 +157,7 @@ jobs: # Default: `true` checks: true - # Lint options: command (default lint:ci). The action discovers supported native results under CI_REPORTS_DIR. Empty disables lint. + # Lint options: engine (`auto`, `biome` or `eslint`), optional custom command and arguments. Auto prefers lint:ci, otherwise selects one declared engine. Presets own native report options; custom commands write into CI_REPORTS_DIR. Empty disables lint. # Default: `true` lint: "true" @@ -187,7 +187,7 @@ jobs: # Default: `true` dependency-review: true - # Test options: command (default test:ci), arguments, coverage (boolean, default true), shards and merge-command. The action discovers supported native results under CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. + # Test options: engine (`auto`, `vitest`, `jest` or `node:test`), optional custom command, arguments, coverage (boolean, default true), shards and merge-command. Auto prefers test:ci, otherwise selects one declared engine. Presets own native report options; custom commands write into CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. # Default: `true` test: "true" @@ -289,7 +289,7 @@ jobs: | | | | | | | | Example: `{"tests":"my-cli --help"}` | | | | | **`checks`** | Optional flag to enable check steps. | **false** | **boolean** | `true` | -| **`lint`** | Lint options: command (default lint:ci). The action discovers supported native results under CI_REPORTS_DIR. Empty disables lint. | **false** | **string** | `true` | +| **`lint`** | Lint options: engine (`auto`, `biome` or `eslint`), optional custom command and arguments. Auto prefers lint:ci, otherwise selects one declared engine. Presets own native report options; custom commands write into CI_REPORTS_DIR. Empty disables lint. | **false** | **string** | `true` | | **`code-ql`** | CodeQL analysis language, or a JSON object with `languages` and optional `config-file`. | **false** | **string** | `typescript` | | | Set to an empty string to disable CodeQL. | | | | | | In JSON form, `languages` must be a nonempty string and `config-file` must be a string. | | | | @@ -303,7 +303,7 @@ jobs: | **`dependency-review`** | Enable dependency review scan. | **false** | **boolean** | `true` | | | Works with public repositories and private repositories with a GitHub Advanced Security license. | | | | | | See . | | | | -| **`test`** | Test options: command (default test:ci), arguments, coverage (boolean, default true), shards and merge-command. The action discovers supported native results under CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. | **false** | **string** | `true` | +| **`test`** | Test options: engine (`auto`, `vitest`, `jest` or `node:test`), optional custom command, arguments, coverage (boolean, default true), shards and merge-command. Auto prefers test:ci, otherwise selects one declared engine. Presets own native report options; custom commands write into CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. | **false** | **string** | `true` | | **`working-directory`** | Working directory where dependencies and application commands run. | **false** | **string** | `.` | | | Relative paths resolve against the workspace of each application job. | | | | | | Directory existence and non-container workspace boundaries are validated in those jobs. | | | | @@ -443,7 +443,7 @@ on: jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@36be3d131d95b6a0987a8819b7846f52369b8aac # feat/native-github-coverage permissions: id-token: write security-events: write @@ -509,7 +509,7 @@ jobs: # Run CI checks inside the Docker container continuous-integration: needs: build-image - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@36be3d131d95b6a0987a8819b7846f52369b8aac # feat/native-github-coverage permissions: id-token: write security-events: write @@ -533,7 +533,7 @@ on: branches: [main] jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@36be3d131d95b6a0987a8819b7846f52369b8aac # feat/native-github-coverage permissions: id-token: write security-events: write @@ -561,7 +561,7 @@ on: jobs: continuous-integration: - uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage + uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@36be3d131d95b6a0987a8819b7846f52369b8aac # feat/native-github-coverage permissions: id-token: write security-events: write diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index ae0a0384..857a8b7b 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -10,7 +10,7 @@ # Producer calls require actions: read and contents: read. # The caller publishes those artifacts once with `publish-ci-reports.yml`. -# See the [common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/44d42ca06b9f722d8ab79af4f588f30ad1e16bc5/docs/usage/ci-reports.md#consumer-workflow). +# See the [common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/feat/native-github-coverage/.github/workflows/publish-ci-reports.md#consumer-workflow). # Prebuilt CI containers must include Git. They require a checkout for source verification and # test.source-sha plus test.source-prefix identifying the tested source. @@ -91,7 +91,7 @@ on: default: true lint: description: |- - Lint options: command (default lint:ci). The action discovers supported native results under CI_REPORTS_DIR. Empty disables lint. + Lint options: engine (`auto`, `biome` or `eslint`), optional custom command and arguments. Auto prefers lint:ci, otherwise selects one declared engine. Presets own native report options; custom commands write into CI_REPORTS_DIR. Empty disables lint. type: string required: false default: "true" @@ -125,7 +125,7 @@ on: default: true test: description: |- - Test options: command (default test:ci), arguments, coverage (boolean, default true), shards and merge-command. The action discovers supported native results under CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. + Test options: engine (`auto`, `vitest`, `jest` or `node:test`), optional custom command, arguments, coverage (boolean, default true), shards and merge-command. Auto prefers test:ci, otherwise selects one declared engine. Presets own native report options; custom commands write into CI_REPORTS_DIR. Prebuilt containers also require source-sha and source-prefix. Empty disables tests. type: string required: false default: "true" @@ -243,6 +243,7 @@ jobs: build-artifact: ${{ steps.build-variables.outputs.artifact }} test-enabled: ${{ steps.test-options.outputs.enabled }} test-command: ${{ steps.test-options.outputs.command }} + test-engine: ${{ steps.test-options.outputs.engine }} test-coverage: ${{ steps.test-options.outputs.coverage }} test-arguments: ${{ steps.test-options.outputs.arguments }} test-shards: ${{ steps.test-options.outputs.shards }} @@ -276,9 +277,12 @@ jobs: } } - const allowed = ['coverage','source-sha','source-prefix','command','merge-command','arguments','shards']; + const allowed = ['engine','coverage','source-sha','source-prefix','command','merge-command','arguments','shards']; const unknown = Object.keys(testOptions).filter(key => !allowed.includes(key)); if (unknown.length) throw new Error('Unknown test options: ' + unknown.join(', ') + '.'); + const engine = testOptions.engine ?? 'auto'; + if (!['auto','vitest','jest','node:test'].includes(engine)) throw new Error('Unknown test engine.'); + if (engine !== 'auto' && (testOptions.command || testOptions['merge-command'])) throw new Error('Use either a test engine or custom commands.'); if (testOptions.coverage === undefined) { testOptions.coverage = true; } @@ -305,9 +309,10 @@ jobs: core.setOutput('matrix', { shard: Array.from({ length: shards }, (_, i) => i + 1) }); core.setOutput('group', shards > 1 ? require('node:crypto').randomUUID() : ''); core.setOutput('arguments', args); - core.setOutput('merge-command', testOptions['merge-command'] || testOptions.command || 'test:ci'); + core.setOutput('engine', engine); + core.setOutput('merge-command', testOptions['merge-command'] || testOptions.command || ''); core.setOutput('coverage', testOptions.coverage ); - core.setOutput('command', testOptions.command || 'test:ci'); + core.setOutput('command', testOptions.command || ''); - id: package-config uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 @@ -547,8 +552,12 @@ jobs: const enabled = process.env.CHECKS === 'true' && !['','false','null'].includes(raw); if (enabled && raw !== 'true') { const options = JSON.parse(raw); - if (!options || typeof options !== 'object' || Array.isArray(options) || Object.keys(options).some(key => !['command','source-sha','source-prefix'].includes(key))) throw new Error('Unknown lint options.'); - for (const value of Object.values(options)) if (typeof value !== 'string' || !value.trim()) throw new Error('Lint options must be nonempty strings.'); + if (!options || typeof options !== 'object' || Array.isArray(options) || Object.keys(options).some(key => !['engine','command','arguments','source-sha','source-prefix'].includes(key))) throw new Error('Unknown lint options.'); + const {arguments: args = [], ...strings} = options; + for (const value of Object.values(strings)) if (typeof value !== 'string' || !value.trim()) throw new Error('Lint options must be nonempty strings.'); + if (!Array.isArray(args) || args.some(arg => typeof arg !== 'string' || arg.includes('\0'))) throw new Error('lint.arguments must be an array of strings without null bytes.'); + if (!['auto','biome','eslint'].includes(options.engine ?? 'auto')) throw new Error('Unknown lint engine.'); + if (options.engine && options.engine !== 'auto' && options.command) throw new Error('Use either a lint engine or a custom command.'); } core.setOutput('lint-enabled', enabled); @@ -646,7 +655,9 @@ jobs: } } - core.setOutput('command', lintOptions.command || 'lint:ci'); + core.setOutput('engine', lintOptions.engine || 'auto'); + core.setOutput('command', lintOptions.command || ''); + core.setOutput('arguments', lintOptions.arguments || []); core.setOutput('source-sha', lintOptions['source-sha'] || ''); core.setOutput('source-prefix', lintOptions['source-prefix'] || ''); @@ -658,6 +669,8 @@ jobs: working-directory: ${{ needs.prepare.outputs.working-directory }} container: ${{ inputs.container != '' && 'true' || 'false' }} command: ${{ steps.preparel-lint-options.outputs.command }} + engine: ${{ steps.preparel-lint-options.outputs.engine }} + arguments: ${{ steps.preparel-lint-options.outputs.arguments }} path-mapping: ${{ needs.prepare.outputs.path-mapping || '' }} source-sha: ${{ steps.preparel-lint-options.outputs.source-sha }} source-prefix: ${{ steps.preparel-lint-options.outputs.source-prefix }} @@ -747,6 +760,7 @@ jobs: working-directory: ${{ needs.prepare.outputs.working-directory }} container: ${{ inputs.container != '' && 'true' || 'false' }} command: ${{ needs.prepare.outputs.test-command }} + engine: ${{ needs.prepare.outputs.test-engine }} arguments: ${{ needs.prepare.outputs.test-arguments }} shard: ${{ needs.prepare.outputs.test-shards != '1' && format('{0}/{1}', matrix.shard, needs.prepare.outputs.test-shards) || '' }} shard-group: ${{ format('ci-test-{0}-{1}-{2}', github.run_id, github.run_attempt, needs.prepare.outputs.test-group) }} @@ -786,6 +800,7 @@ jobs: working-directory: ${{ needs.prepare.outputs.working-directory }} container: ${{ inputs.container != '' && 'true' || 'false' }} command: ${{ needs.prepare.outputs.test-merge-command }} + engine: ${{ needs.prepare.outputs.test-engine }} arguments: ${{ needs.prepare.outputs.test-arguments }} merge-shards: ${{ needs.prepare.outputs.test-shards }} shard-group: ${{ format('ci-test-{0}-{1}-{2}', github.run_id, github.run_attempt, needs.prepare.outputs.test-group) }} diff --git a/actions/get-package-manager/README.md b/actions/get-package-manager/README.md index c8ad5156..e31d2413 100644 --- a/actions/get-package-manager/README.md +++ b/actions/get-package-manager/README.md @@ -34,7 +34,7 @@ Action to detect the package manager used. Supports Yarn, pnpm, and npm ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/get-package-manager@64632ba90b771d20337b737d8b0ccee0cb7bae58 # 3.1.2 +- uses: hoverkraft-tech/ci-github-nodejs/actions/get-package-manager@36be3d131d95b6a0987a8819b7846f52369b8aac # feat/native-github-coverage with: # Working directory where the dependencies are installed. # Can be absolute or relative to the repository root. @@ -69,6 +69,7 @@ Action to detect the package manager used. Supports Yarn, pnpm, and npm | **`cache-dependency-path`** | The path to the dependency file for cache management. | | **`install-command`** | The command to install dependencies. | | **`run-script-command`** | The command to run a script in the package.json file. | +| **`exec-command`** | Command to run a locally installed binary without downloading a missing package. | | **`pack-command`** | Bash command to pack prepared files without lifecycle scripts using npm, pnpm or Yarn Classic. | | | Set PACK_DESTINATION to an existing absolute output directory before executing the command. | | | Configure the project's package manager first; this command does not install dependencies or build. | diff --git a/actions/get-package-manager/action.yml b/actions/get-package-manager/action.yml index 278241f2..d558b6d7 100644 --- a/actions/get-package-manager/action.yml +++ b/actions/get-package-manager/action.yml @@ -26,6 +26,9 @@ outputs: run-script-command: description: "The command to run a script in the package.json file." value: ${{ steps.get-package-manager.outputs.run-script-command }} + exec-command: + description: Command to run a locally installed binary without downloading a missing package. + value: ${{ steps.get-package-manager.outputs.exec-command }} pack-command: description: | Bash command to pack prepared files without lifecycle scripts using npm, pnpm or Yarn Classic. @@ -155,18 +158,21 @@ runs: cacheDependencyPath: cacheDependencyPathPrefix ? `${cacheDependencyPathPrefix}/**/yarn.lock` : '', installCommand: 'yarn install --frozen-lockfile', runScriptCommand: 'yarn', + execCommand: 'yarn exec', packCommand: 'yarn pack --ignore-scripts --filename "${PACK_DESTINATION:?PACK_DESTINATION is required}/package.tgz"', }, pnpm: { cacheDependencyPath: cacheDependencyPathPrefix ? `${cacheDependencyPathPrefix}/**/pnpm-lock.yaml` : '', installCommand: 'pnpm install --frozen-lockfile', runScriptCommand: 'pnpm', + execCommand: 'pnpm exec', packCommand: 'pnpm pack --config.ignore-scripts=true --pack-destination "${PACK_DESTINATION:?PACK_DESTINATION is required}"', }, npm: { cacheDependencyPath: cacheDependencyPathPrefix ? `${cacheDependencyPathPrefix}/**/package-lock.json` : '', installCommand: 'npm ci', runScriptCommand: 'npm run', + execCommand: 'npm exec --offline --no --', packCommand: 'npm pack --ignore-scripts --pack-destination "${PACK_DESTINATION:?PACK_DESTINATION is required}"', }, }; @@ -182,5 +188,6 @@ runs: core.setOutput('cache-dependency-path', managerConfig.cacheDependencyPath); core.setOutput('install-command', managerConfig.installCommand); core.setOutput('run-script-command', managerConfig.runScriptCommand); + core.setOutput('exec-command', managerConfig.execCommand); core.setOutput('pack-command', managerConfig.packCommand); # jscpd:ignore-end diff --git a/actions/lint/README.md b/actions/lint/README.md index b1e88ec8..3fabed26 100644 --- a/actions/lint/README.md +++ b/actions/lint/README.md @@ -24,7 +24,13 @@ ## Overview -Run project lint commands and validate their native reports before publication. +Run a native lint preset or a project command and validate its reports before publication. + +engine: auto uses lint:ci when present, otherwise selects one declared Biome or +ESLint dependency. Ambiguous projects and project-specific lint scripts or hooks +require an explicit engine or command. +Presets run the installed tool with native reporting and fail on warnings. +Project configuration owns linter rules. Use command for multiple tools or setup hooks. Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write required reports there; stale files in the project cannot satisfy the contract. @@ -38,7 +44,7 @@ Producer jobs require actions: read and contents: read, with source checked out ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/lint@36be3d131d95b6a0987a8819b7846f52369b8aac # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -57,9 +63,16 @@ Producer jobs require actions: read and contents: read, with source checked out # Default: `false` container: "false" - # npm/pnpm/Yarn script to run. Generate the supported native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". - # Default: `lint:ci` - command: lint:ci + # Lint preset, `auto`, `biome` or `eslint`. Presets configure reports without a lint:ci script. An explicit command requires auto. + # Default: `auto` + engine: auto + + # Optional npm/pnpm/Yarn script replacing preset execution. The script writes supported native diagnostics under CI_REPORTS_DIR. Automatic selection prefers an existing lint:ci script, preserving project checks and package-manager lifecycle behavior. + command: "" + + # JSON array of native preset arguments or custom package-script arguments. Presets check the current directory when omitted. + # Default: `[]` + arguments: "[]" # Optional JSON object mapping native report source path prefixes to repository-relative directories. path-mapping: "" @@ -76,18 +89,20 @@ Producer jobs require actions: read and contents: read, with source checked out ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | -| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | -| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | -| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | -| **`working-directory`** | Working directory where lint commands are executed. | **false** | `.` | -| | Can be absolute or relative to the repository root. | | | -| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | -| **`command`** | npm/pnpm/Yarn script to run. Generate the supported native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". | **false** | `lint:ci` | -| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | -| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | -| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | +| **Input** | **Description** | **Required** | **Default** | +| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | +| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | +| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | +| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | +| **`working-directory`** | Working directory where lint commands are executed. | **false** | `.` | +| | Can be absolute or relative to the repository root. | | | +| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | +| **`engine`** | Lint preset, `auto`, `biome` or `eslint`. Presets configure reports without a lint:ci script. An explicit command requires auto. | **false** | `auto` | +| **`command`** | Optional npm/pnpm/Yarn script replacing preset execution. The script writes supported native diagnostics under CI_REPORTS_DIR. Automatic selection prefers an existing lint:ci script, preserving project checks and package-manager lifecycle behavior. | **false** | - | +| **`arguments`** | JSON array of native preset arguments or custom package-script arguments. Presets check the current directory when omitted. | **false** | `[]` | +| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | +| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | +| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 3738153b..3d0433d8 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -1,6 +1,12 @@ name: "Lint" description: | - Run project lint commands and validate their native reports before publication. + Run a native lint preset or a project command and validate its reports before publication. + + engine: auto uses lint:ci when present, otherwise selects one declared Biome or + ESLint dependency. Ambiguous projects and project-specific lint scripts or hooks + require an explicit engine or command. + Presets run the installed tool with native reporting and fail on warnings. + Project configuration owns linter rules. Use command for multiple tools or setup hooks. Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write required reports there; stale files in the project cannot satisfy the contract. @@ -29,11 +35,17 @@ inputs: description: "Whether running in container mode (skips checkout and node setup)" required: false default: "false" + engine: + description: Lint preset, `auto`, `biome` or `eslint`. Presets configure reports without a lint:ci script. An explicit command requires auto. + default: "auto" command: description: |- - npm/pnpm/Yarn script to run. Generate the supported native diagnostics under CI_REPORTS_DIR, for example Biome with --reporter=sarif --reporter-file="$CI_REPORTS_DIR/lint.sarif". + Optional npm/pnpm/Yarn script replacing preset execution. The script writes supported native diagnostics under CI_REPORTS_DIR. Automatic selection prefers an existing lint:ci script, preserving project checks and package-manager lifecycle behavior. required: false - default: "lint:ci" + default: "" + arguments: + description: JSON array of native preset arguments or custom package-script arguments. Presets check the current directory when omitted. + default: "[]" path-mapping: description: |- Optional JSON object mapping native report source path prefixes to repository-relative directories. @@ -107,6 +119,10 @@ runs: uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 # jscpd:ignore-start env: + NODE_ACTION_PATH: ${{ github.action_path }} + LINT_ENGINE: ${{ inputs.engine }} + LINT_ARGUMENTS: ${{ inputs.arguments }} + EXEC_COMMAND: ${{ inputs.container == 'true' && steps.get-package-manager.outputs.exec-command || steps.setup-node.outputs.exec-command }} RUN_LINT_COMMAND: ${{ inputs.container == 'true' && steps.get-package-manager.outputs.run-script-command || steps.setup-node.outputs.run-script-command }} @@ -121,12 +137,20 @@ runs: process.chdir(workingDirectory); const runScriptCommand = process.env.RUN_LINT_COMMAND; - const lintCommand = process.env.LINT_COMMAND || 'lint:ci'; - - core.info(`👕 Running lint command: ${lintCommand}...`); + const { LintCommand } = require(`${process.env.NODE_ACTION_PATH}/dist/index.js`); + const args = JSON.parse(process.env.LINT_ARGUMENTS || '[]'); + if (!Array.isArray(args) || args.some(arg => typeof arg !== 'string' || arg.includes('\0'))) { + throw new Error('arguments must be a JSON array of strings without null bytes.'); + } + const invocation = LintCommand.create({ + engine: process.env.LINT_ENGINE, command: process.env.LINT_COMMAND, + project: workingDirectory, runScriptCommand, execCommand: process.env.EXEC_COMMAND, + directory: process.env.CI_REPORTS_DIR, args + }); + core.info(`👕 Running lint: ${invocation.command} ${invocation.args.join(' ')}`); try { - const exitCode = await exec.exec(runScriptCommand, [lintCommand], { + const exitCode = await exec.exec(invocation.command, invocation.args, { cwd: workingDirectory, ignoreReturnCode: true }); diff --git a/actions/lint/dist/index.js b/actions/lint/dist/index.js index 49949fc4..f4f08e52 100644 --- a/actions/lint/dist/index.js +++ b/actions/lint/dist/index.js @@ -4,8 +4,19 @@ /***/ 105: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(41); +module.exports = { + ...__nccwpck_require__(41), + ...__nccwpck_require__(862), +}; + + +/***/ }), +/***/ 24: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:fs"); /***/ }), @@ -15,6 +26,105 @@ module.exports = __nccwpck_require__(41); "use strict"; module.exports = require("node:path"); +/***/ }), + +/***/ 862: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const fs = __nccwpck_require__(24); +const path = __nccwpck_require__(760); +const { Biome } = __nccwpck_require__(701); +const { ESLint } = __nccwpck_require__(756); + +const LintCommand = { + create({ + engine = "auto", + command = "", + project, + runScriptCommand, + execCommand, + directory, + args = [], + }) { + if (!["auto", "biome", "eslint"].includes(engine)) + throw new Error(`Unknown lint engine: ${engine}.`); + if (command && (!command.trim() || engine !== "auto")) { + throw new Error( + "Use either an engine preset or a nonempty custom command.", + ); + } + if (engine === "auto" && !command) { + const manifest = JSON.parse( + fs.readFileSync(path.join(project, "package.json"), "utf8"), + ); + command = manifest.scripts?.["lint:ci"] ? "lint:ci" : ""; + if (!command) engine = LintCommand.detect(manifest); + } + if (command) + return { + command: runScriptCommand, + args: [ + command, + ...(runScriptCommand === "npm run" && args.length ? ["--"] : []), + ...args, + ], + }; + const preset = engine === "biome" ? Biome : ESLint; + return { + command: execCommand, + args: [ + engine, + ...preset.arguments(directory), + ...(args.length ? args : ["."]), + ], + }; + }, + + detect(manifest) { + const dependencies = { + ...manifest.dependencies, + ...manifest.devDependencies, + }; + const engines = Object.entries({ + biome: "@biomejs/biome", + eslint: "eslint", + }) + .filter(([, name]) => Object.hasOwn(dependencies, name)) + .map(([engine]) => engine); + if (engines.length !== 1) { + throw new Error( + "Cannot select one lint engine. Set engine explicitly or provide a custom command that writes reports to CI_REPORTS_DIR.", + ); + } + const scripts = manifest.scripts || {}; + const defaults = { + biome: [ + "biome lint .", + "biome lint --error-on-warnings .", + "biome lint . --error-on-warnings", + ], + eslint: [ + "eslint .", + "eslint --max-warnings=0 .", + "eslint . --max-warnings=0", + ], + }; + if ( + scripts.prelint || + scripts.postlint || + (scripts.lint && !defaults[engines[0]].includes(scripts.lint.trim())) + ) { + throw new Error( + "Project-specific lint scripts or hooks require an explicit engine choice or a custom command; automatic selection cannot replace them.", + ); + } + return engines[0]; + }, +}; + +module.exports = { LintCommand }; + + /***/ }), /***/ 41: @@ -56,6 +166,48 @@ const ReportDefinition = { module.exports = { ReportDefinition }; +/***/ }), + +/***/ 701: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const path = __nccwpck_require__(760); + +const Biome = { + arguments(directory) { + return [ + "lint", + "--error-on-warnings", + "--reporter=default", + "--reporter=sarif", + `--reporter-file=${path.join(directory, "lint.sarif")}`, + ]; + }, +}; + +module.exports = { Biome }; + + +/***/ }), + +/***/ 756: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const path = __nccwpck_require__(760); + +const ESLint = { + arguments(directory) { + return [ + "--max-warnings=0", + "--format=json", + `--output-file=${path.join(directory, "lint.json")}`, + ]; + }, +}; + +module.exports = { ESLint }; + + /***/ }) /******/ }); @@ -98,7 +250,7 @@ module.exports = { ReportDefinition }; /******/ /******/ // startup /******/ // Load entry module and return exports -/******/ // This entry module used 'module' so it can't be inlined +/******/ // This entry module is referenced by other modules so it can't be inlined /******/ var __webpack_exports__ = __nccwpck_require__(105); /******/ module.exports = __webpack_exports__; /******/ diff --git a/actions/lint/src/LintCommand.cjs b/actions/lint/src/LintCommand.cjs new file mode 100644 index 00000000..5354ab0a --- /dev/null +++ b/actions/lint/src/LintCommand.cjs @@ -0,0 +1,92 @@ +const fs = require("node:fs"); +const path = require("node:path"); +const { Biome } = require("./presets/Biome.cjs"); +const { ESLint } = require("./presets/ESLint.cjs"); + +const LintCommand = { + create({ + engine = "auto", + command = "", + project, + runScriptCommand, + execCommand, + directory, + args = [], + }) { + if (!["auto", "biome", "eslint"].includes(engine)) + throw new Error(`Unknown lint engine: ${engine}.`); + if (command && (!command.trim() || engine !== "auto")) { + throw new Error( + "Use either an engine preset or a nonempty custom command.", + ); + } + if (engine === "auto" && !command) { + const manifest = JSON.parse( + fs.readFileSync(path.join(project, "package.json"), "utf8"), + ); + command = manifest.scripts?.["lint:ci"] ? "lint:ci" : ""; + if (!command) engine = LintCommand.detect(manifest); + } + if (command) + return { + command: runScriptCommand, + args: [ + command, + ...(runScriptCommand === "npm run" && args.length ? ["--"] : []), + ...args, + ], + }; + const preset = engine === "biome" ? Biome : ESLint; + return { + command: execCommand, + args: [ + engine, + ...preset.arguments(directory), + ...(args.length ? args : ["."]), + ], + }; + }, + + detect(manifest) { + const dependencies = { + ...manifest.dependencies, + ...manifest.devDependencies, + }; + const engines = Object.entries({ + biome: "@biomejs/biome", + eslint: "eslint", + }) + .filter(([, name]) => Object.hasOwn(dependencies, name)) + .map(([engine]) => engine); + if (engines.length !== 1) { + throw new Error( + "Cannot select one lint engine. Set engine explicitly or provide a custom command that writes reports to CI_REPORTS_DIR.", + ); + } + const scripts = manifest.scripts || {}; + const defaults = { + biome: [ + "biome lint .", + "biome lint --error-on-warnings .", + "biome lint . --error-on-warnings", + ], + eslint: [ + "eslint .", + "eslint --max-warnings=0 .", + "eslint . --max-warnings=0", + ], + }; + if ( + scripts.prelint || + scripts.postlint || + (scripts.lint && !defaults[engines[0]].includes(scripts.lint.trim())) + ) { + throw new Error( + "Project-specific lint scripts or hooks require an explicit engine choice or a custom command; automatic selection cannot replace them.", + ); + } + return engines[0]; + }, +}; + +module.exports = { LintCommand }; diff --git a/actions/lint/src/LintCommand.test.cjs b/actions/lint/src/LintCommand.test.cjs new file mode 100644 index 00000000..97b57a04 --- /dev/null +++ b/actions/lint/src/LintCommand.test.cjs @@ -0,0 +1,59 @@ +const assert = require("node:assert/strict"); +const fs = require("node:fs"); +const os = require("node:os"); +const path = require("node:path"); +const { describe, it } = require("node:test"); +const { LintCommand } = require(process.env.ACTION_ENTRYPOINT || "./index.js"); + +describe("LintCommand", () => { + it("preserves mixed project checks and forwards custom script arguments", (t) => { + // Arrange + const project = fs.mkdtempSync(path.join(os.tmpdir(), "lint-command-")); + t.after(() => fs.rmSync(project, { recursive: true, force: true })); + fs.writeFileSync( + path.join(project, "package.json"), + JSON.stringify({ + scripts: { "lint:ci": "run-s lint:*" }, + devDependencies: { "@biomejs/biome": "*", eslint: "*" }, + }), + ); + // Act + const invocation = LintCommand.create({ + project, + runScriptCommand: "npm run", + args: ["--strict"], + }); + // Assert + assert.deepEqual(invocation, { + command: "npm run", + args: ["lint:ci", "--", "--strict"], + }); + }); + + it("rejects conflicting execution choices", () => { + // Act / Assert + assert.throws( + () => LintCommand.create({ engine: "unknown" }), + /Unknown lint engine/, + ); + assert.throws( + () => LintCommand.create({ engine: "biome", command: "lint:custom" }), + /either an engine/, + ); + assert.throws( + () => + LintCommand.detect({ + devDependencies: { "@biomejs/biome": "*", eslint: "*" }, + }), + /select one lint engine/, + ); + assert.throws( + () => + LintCommand.detect({ + scripts: { lint: "biome lint . && astro check" }, + devDependencies: { "@biomejs/biome": "*" }, + }), + /scripts or hooks/, + ); + }); +}); diff --git a/actions/lint/src/index.js b/actions/lint/src/index.js index 4de2db9d..60015471 100644 --- a/actions/lint/src/index.js +++ b/actions/lint/src/index.js @@ -1 +1,4 @@ -module.exports = require("./ReportDefinition.cjs"); +module.exports = { + ...require("./ReportDefinition.cjs"), + ...require("./LintCommand.cjs"), +}; diff --git a/actions/lint/src/presets/Biome.cjs b/actions/lint/src/presets/Biome.cjs new file mode 100644 index 00000000..c3dbc71a --- /dev/null +++ b/actions/lint/src/presets/Biome.cjs @@ -0,0 +1,15 @@ +const path = require("node:path"); + +const Biome = { + arguments(directory) { + return [ + "lint", + "--error-on-warnings", + "--reporter=default", + "--reporter=sarif", + `--reporter-file=${path.join(directory, "lint.sarif")}`, + ]; + }, +}; + +module.exports = { Biome }; diff --git a/actions/lint/src/presets/ESLint.cjs b/actions/lint/src/presets/ESLint.cjs new file mode 100644 index 00000000..bc0d336a --- /dev/null +++ b/actions/lint/src/presets/ESLint.cjs @@ -0,0 +1,13 @@ +const path = require("node:path"); + +const ESLint = { + arguments(directory) { + return [ + "--max-warnings=0", + "--format=json", + `--output-file=${path.join(directory, "lint.json")}`, + ]; + }, +}; + +module.exports = { ESLint }; diff --git a/actions/setup-node/README.md b/actions/setup-node/README.md index 16c899cd..ab4bab66 100644 --- a/actions/setup-node/README.md +++ b/actions/setup-node/README.md @@ -34,7 +34,7 @@ Action to setup Node.js and install dependencies according to the package manage ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/setup-node@64632ba90b771d20337b737d8b0ccee0cb7bae58 # 3.1.2 +- uses: hoverkraft-tech/ci-github-nodejs/actions/setup-node@36be3d131d95b6a0987a8819b7846f52369b8aac # feat/native-github-coverage with: # Install project dependencies after configuring Node.js and the package manager. # Set false when only tooling is needed, such as packaging prepared build files, @@ -93,10 +93,11 @@ Action to setup Node.js and install dependencies according to the package manage ## Outputs -| **Output** | **Description** | -| ------------------------ | ---------------------------------------------------- | -| **`package-manager`** | Detected package manager (`npm`, `pnpm` or `yarn`). | -| **`run-script-command`** | The command to run a script in the package.json file | +| **Output** | **Description** | +| ------------------------ | -------------------------------------------------------------------------------- | +| **`package-manager`** | Detected package manager (`npm`, `pnpm` or `yarn`). | +| **`run-script-command`** | The command to run a script in the package.json file | +| **`exec-command`** | Command to run a locally installed binary without downloading a missing package. | diff --git a/actions/setup-node/action.yml b/actions/setup-node/action.yml index 586deef7..7c7de627 100644 --- a/actions/setup-node/action.yml +++ b/actions/setup-node/action.yml @@ -42,6 +42,9 @@ outputs: run-script-command: description: "The command to run a script in the package.json file" value: ${{ steps.get-package-manager.outputs.run-script-command }} + exec-command: + description: Command to run a locally installed binary without downloading a missing package. + value: ${{ steps.get-package-manager.outputs.exec-command }} runs: using: "composite" steps: diff --git a/actions/test/README.md b/actions/test/README.md index 00b54c0a..b58e8324 100644 --- a/actions/test/README.md +++ b/actions/test/README.md @@ -24,7 +24,14 @@ ## Overview -Run project test commands and validate their native reports before publication. +Run a native test preset or a project command and validate its reports before publication. + +engine: auto uses test:ci when present, otherwise selects one declared Vitest or +Jest dependency, or an exact node --test script. Ambiguous projects require an +explicit engine or command. Project-specific test scripts or hooks also require +an explicit choice. Presets run the installed tool with native reporting; +project configuration still owns test selection and coverage thresholds. +Use command for package scripts with setup hooks or other project-specific behavior. Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write required reports there; stale files in the project cannot satisfy the contract. @@ -42,7 +49,7 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Usage ```yaml -- uses: hoverkraft-tech/ci-github-nodejs/actions/test@7357a32ac2222654f1de2e28432f96d8e0a7670a # feat/native-github-coverage +- uses: hoverkraft-tech/ci-github-nodejs/actions/test@36be3d131d95b6a0987a8819b7846f52369b8aac # feat/native-github-coverage with: # Disable project and dependency lifecycle scripts during installation. # Set false to allow installation hooks, subject to the package manager's script approval settings. @@ -61,15 +68,18 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner # Default: `false` container: "false" - # Package script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. See the native test report guide for Vitest, Jest, node:test and sharding configuration. - # Default: `test:ci` - command: test:ci + # Test preset, `auto`, `vitest`, `jest` or `node:test`. Presets configure reports and coverage without a test:ci script. An explicit command requires auto. + # Default: `auto` + engine: auto + + # Optional package script replacing preset execution. The script owns its native reporters, writes into CI_REPORTS_DIR and honors CI_TEST_COVERAGE. Automatic selection prefers an existing test:ci script, preserving package-manager lifecycle behavior. + command: "" # Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. # Default: `true` coverage: "true" - # JSON array of arguments passed to the package script without shell expansion. + # JSON array of native preset arguments or custom package-script arguments, without shell expansion. # npm receives its required `--` separator; pnpm and Yarn receive arguments directly. # # Default: `[]` @@ -109,34 +119,35 @@ See the [native test report guide](../../docs/usage/test-reports.md) for runner ## Inputs -| **Input** | **Description** | **Required** | **Default** | -| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | -| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | -| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | -| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | -| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | -| | Can be absolute or relative to the repository root. | | | -| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | -| **`command`** | Package script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. See the native test report guide for Vitest, Jest, node:test and sharding configuration. | **false** | `test:ci` | -| **`coverage`** | Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. | **false** | `true` | -| **`arguments`** | JSON array of arguments passed to the package script without shell expansion. | **false** | `[]` | -| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | -| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | -| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | -| | after tests, including failures. Individual reporting is disabled for shards. | | | -| | Use reporter-specific `--outputFile.json` rather than scalar `--outputFile` in the package script. | | | -| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | -| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | -| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | -| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | -| | All shards and their merge must use the same group and absolute project directory. | | | -| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | -| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | -| | The package script must enable final reporters and original coverage thresholds. | | | -| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | -| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | -| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | -| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | +| **Input** | **Description** | **Required** | **Default** | +| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ----------- | +| **`ignore-scripts`** | Disable project and dependency lifecycle scripts during installation. | **false** | `true` | +| | Set false to allow installation hooks, subject to the package manager's script approval settings. | | | +| | Explicit commands are unaffected. Does not apply in container mode, which skips installation. | | | +| **`working-directory`** | Working directory where test commands are executed. | **false** | `.` | +| | Can be absolute or relative to the repository root. | | | +| **`container`** | Whether running in container mode (skips checkout and node setup) | **false** | `false` | +| **`engine`** | Test preset, `auto`, `vitest`, `jest` or `node:test`. Presets configure reports and coverage without a test:ci script. An explicit command requires auto. | **false** | `auto` | +| **`command`** | Optional package script replacing preset execution. The script owns its native reporters, writes into CI_REPORTS_DIR and honors CI_TEST_COVERAGE. Automatic selection prefers an existing test:ci script, preserving package-manager lifecycle behavior. | **false** | - | +| **`coverage`** | Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. | **false** | `true` | +| **`arguments`** | JSON array of native preset arguments or custom package-script arguments, without shell expansion. | **false** | `[]` | +| | npm receives its required `--` separator; pnpm and Yarn receive arguments directly. | | | +| **`shard`** | Optional Vitest shard as index/total, for example `1/2`. Requires shard-group. | **false** | - | +| | Adds native shard/blob arguments, sets CI_TEST_SHARD, and uploads a checked blob payload | | | +| | after tests, including failures. Individual reporting is disabled for shards. | | | +| | Use reporter-specific `--outputFile.json` rather than scalar `--outputFile` in the package script. | | | +| | Keep coverage collection enabled; defer configured coverage thresholds to the merge | | | +| | when CI_TEST_SHARD is nonempty. The workflow normally supplies these orchestration inputs. | | | +| **`shard-group`** | Unique artifact group for this project, workflow invocation, run and attempt. | **false** | - | +| | Use only letters, numbers, underscores and hyphens. Never reuse across attempts. | | | +| | All shards and their merge must use the same group and absolute project directory. | | | +| **`merge-shards`** | Optional expected Vitest shard count (2-256). Requires shard-group and excludes shard. | **false** | - | +| | Downloads this run's matching payloads, validates the complete set and adds --merge-reports. | | | +| | The package script must enable final reporters and original coverage thresholds. | | | +| | A failed shard remains fatal even if merging succeeds. Partial reruns require a full workflow rerun. | | | +| **`path-mapping`** | Optional JSON object mapping native report source path prefixes to repository-relative directories. | **false** | - | +| **`source-sha`** | Source commit tested by a prebuilt container; must equal the checked-out revision. | **false** | - | +| **`source-prefix`** | Repository-relative directory represented by a prebuilt working-directory. Required with source-sha outside GITHUB_WORKSPACE; use a dot for the repository root. | **false** | - | diff --git a/actions/test/TestShards.cjs b/actions/test/TestShards.cjs index 5b37defd..b1d2cf67 100644 --- a/actions/test/TestShards.cjs +++ b/actions/test/TestShards.cjs @@ -56,14 +56,6 @@ class TestShards { return args; } - static scriptArguments(runCommand, script, args) { - return [ - script, - ...(runCommand === "npm run" && args.length ? ["--"] : []), - ...args, - ]; - } - prepare(args) { if (!this.total) return args; if ( diff --git a/actions/test/action.yml b/actions/test/action.yml index 2c23b55b..8dd9e282 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -1,6 +1,13 @@ name: "Test" description: | - Run project test commands and validate their native reports before publication. + Run a native test preset or a project command and validate its reports before publication. + + engine: auto uses test:ci when present, otherwise selects one declared Vitest or + Jest dependency, or an exact node --test script. Ambiguous projects require an + explicit engine or command. Project-specific test scripts or hooks also require + an explicit choice. Presets run the installed tool with native reporting; + project configuration still owns test selection and coverage thresholds. + Use command for package scripts with setup hooks or other project-specific behavior. Commands receive CI_REPORTS_DIR, a fresh directory for this execution. Write required reports there; stale files in the project cannot satisfy the contract. @@ -33,18 +40,21 @@ inputs: description: "Whether running in container mode (skips checkout and node setup)" required: false default: "false" + engine: + description: Test preset, `auto`, `vitest`, `jest` or `node:test`. Presets configure reports and coverage without a test:ci script. An explicit command requires auto. + default: "auto" command: description: |- - Package script to run. Write native reports into CI_REPORTS_DIR and enable coverage when CI_TEST_COVERAGE is true. See the native test report guide for Vitest, Jest, node:test and sharding configuration. + Optional package script replacing preset execution. The script owns its native reporters, writes into CI_REPORTS_DIR and honors CI_TEST_COVERAGE. Automatic selection prefers an existing test:ci script, preserving package-manager lifecycle behavior. required: false - default: "test:ci" + default: "" coverage: description: Collect and require coverage. The project command must honor CI_TEST_COVERAGE when selecting instrumentation. default: "true" arguments: description: | - JSON array of arguments passed to the package script without shell expansion. + JSON array of native preset arguments or custom package-script arguments, without shell expansion. npm receives its required `--` separator; pnpm and Yarn receive arguments directly. default: "[]" shard: @@ -216,10 +226,13 @@ runs: RUN_TEST_COMMAND: ${{ inputs.container == 'true' && steps.get-package-manager.outputs.run-script-command || steps.setup-node.outputs.run-script-command }} + EXEC_COMMAND: ${{ inputs.container == 'true' && steps.get-package-manager.outputs.exec-command || steps.setup-node.outputs.exec-command }} + TEST_ENGINE: ${{ inputs.engine }} WORKING_DIRECTORY: ${{ steps.working-directory.outputs.absolute-path }} TEST_COMMAND: ${{ inputs.command }} TEST_ARGUMENTS: ${{ steps.prepare-test.outputs.arguments }} TEST_SHARD: ${{ inputs.shard }} + TEST_MERGE: ${{ inputs.merge-shards }} SHARDS_FAILED: ${{ steps.validate-shards.outputs.failed }} CI_REPORTS_DIR: ${{ steps.prepare-reports.outputs.report-directory || steps.prepare-test.outputs.directory }} @@ -232,14 +245,19 @@ runs: process.chdir(workingDirectory); const runScriptCommand = process.env.RUN_TEST_COMMAND; - const testCommand = process.env.TEST_COMMAND || 'test:ci'; const { TestShards } = require(`${process.env.NODE_ACTION_PATH}/TestShards.cjs`); - const args = TestShards.scriptArguments(runScriptCommand, testCommand, TestShards.arguments(process.env.TEST_ARGUMENTS)); - - core.info(`🧪 Running test command: ${testCommand}...`); + const { TestCommand } = require(`${process.env.NODE_ACTION_PATH}/dist/index.js`); + const invocation = TestCommand.create({ + engine: process.env.TEST_ENGINE, command: process.env.TEST_COMMAND, + project: workingDirectory, runScriptCommand, execCommand: process.env.EXEC_COMMAND, + args: TestShards.arguments(process.env.TEST_ARGUMENTS), + directory: process.env.CI_REPORTS_DIR, coverage: process.env.CI_TEST_COVERAGE === 'true', + shard: Boolean(process.env.TEST_SHARD), merge: Boolean(process.env.TEST_MERGE) + }); + core.info(`🧪 Running tests: ${invocation.command} ${invocation.args.join(' ')}`); try { - const exitCode = await exec.exec(runScriptCommand, args, { + const exitCode = await exec.exec(invocation.command, invocation.args, { cwd: workingDirectory, env: { ...process.env, CI: 'true', CI_TEST_SHARD: process.env.TEST_SHARD || '' }, ignoreReturnCode: true diff --git a/actions/test/dist/index.js b/actions/test/dist/index.js index fdd358f7..ec36c516 100644 --- a/actions/test/dist/index.js +++ b/actions/test/dist/index.js @@ -4,7 +4,10 @@ /***/ 105: /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { -module.exports = __nccwpck_require__(41); +module.exports = { + ...__nccwpck_require__(41), + ...__nccwpck_require__(695), +}; /***/ }), @@ -99,6 +102,185 @@ const ReportDefinition = { module.exports = { ReportDefinition }; +/***/ }), + +/***/ 695: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const fs = __nccwpck_require__(24); +const path = __nccwpck_require__(760); +const { Vitest } = __nccwpck_require__(584); +const { Jest } = __nccwpck_require__(569); +const { NodeTest } = __nccwpck_require__(251); + +const TestCommand = { + create({ + engine = "auto", + command = "", + project, + runScriptCommand, + execCommand, + args = [], + ...report + }) { + if (!["auto", "vitest", "jest", "node:test"].includes(engine)) { + throw new Error(`Unknown test engine: ${engine}.`); + } + if (command && (!command.trim() || engine !== "auto")) { + throw new Error( + "Use either an engine preset or a nonempty custom command.", + ); + } + if (engine === "auto" && !command) { + const manifest = JSON.parse( + fs.readFileSync(path.join(project, "package.json"), "utf8"), + ); + command = manifest.scripts?.["test:ci"] ? "test:ci" : ""; + if (!command) engine = TestCommand.detect(manifest); + } + if (command) { + return { + command: runScriptCommand, + args: [ + command, + ...(runScriptCommand === "npm run" && args.length ? ["--"] : []), + ...args, + ], + }; + } + if ((report.shard || report.merge) && engine !== "vitest") { + throw new Error( + "Native shard orchestration requires the Vitest preset or a custom command.", + ); + } + const preset = { vitest: Vitest, jest: Jest, "node:test": NodeTest }[ + engine + ]; + const options = preset.arguments(report); + return engine === "node:test" + ? { command: "node", args: [...options, ...args] } + : { command: execCommand, args: [engine, ...options, ...args] }; + }, + + detect(manifest) { + const dependencies = { + ...manifest.dependencies, + ...manifest.devDependencies, + }; + const engines = ["vitest", "jest"].filter((name) => + Object.hasOwn(dependencies, name), + ); + if (manifest.scripts?.test?.trim() === "node --test") + engines.push("node:test"); + if (engines.length !== 1) { + throw new Error( + "Cannot select one test engine. Set engine explicitly or provide a custom command that writes reports to CI_REPORTS_DIR.", + ); + } + const scripts = manifest.scripts || {}; + const defaults = { + vitest: ["vitest", "vitest run"], + jest: ["jest"], + "node:test": ["node --test"], + }; + if ( + scripts.pretest || + scripts.posttest || + (scripts.test && !defaults[engines[0]].includes(scripts.test.trim())) + ) { + throw new Error( + "Project-specific test scripts or hooks require an explicit engine choice or a custom command; automatic selection cannot replace them.", + ); + } + return engines[0]; + }, +}; + +module.exports = { TestCommand }; + + +/***/ }), + +/***/ 569: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const path = __nccwpck_require__(760); + +const Jest = { + arguments({ directory, coverage }) { + return [ + "--ci", + "--json", + `--outputFile=${path.join(directory, "results.json")}`, + `--coverage=${coverage}`, + "--coverageReporters=text", + `--coverageDirectory=${path.join(directory, "coverage")}`, + ]; + }, +}; + +module.exports = { Jest }; + + +/***/ }), + +/***/ 251: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const path = __nccwpck_require__(760); + +const NodeTest = { + arguments({ directory, coverage }) { + return [ + "--test", + "--test-reporter=spec", + "--test-reporter-destination=stdout", + "--test-reporter=junit", + `--test-reporter-destination=${path.join(directory, "junit.xml")}`, + ...(coverage + ? [ + "--experimental-test-coverage", + "--test-reporter=lcov", + `--test-reporter-destination=${path.join(directory, "lcov.info")}`, + ] + : []), + ]; + }, +}; + +module.exports = { NodeTest }; + + +/***/ }), + +/***/ 584: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +const path = __nccwpck_require__(760); + +const Vitest = { + arguments({ directory, coverage, shard, merge }) { + return [ + "run", + "--reporter=default", + ...(!shard + ? [ + "--reporter=json", + `--outputFile.json=${path.join(directory, "results.json")}`, + ] + : []), + `--coverage.enabled=${coverage}`, + "--coverage.reporter=text", + ...(merge ? ["--coverage.reporter=lcovonly"] : []), + `--coverage.reportsDirectory=${path.join(directory, "coverage")}`, + "--coverage.reportOnFailure=true", + ]; + }, +}; + +module.exports = { Vitest }; + + /***/ }) /******/ }); @@ -141,7 +323,7 @@ module.exports = { ReportDefinition }; /******/ /******/ // startup /******/ // Load entry module and return exports -/******/ // This entry module used 'module' so it can't be inlined +/******/ // This entry module is referenced by other modules so it can't be inlined /******/ var __webpack_exports__ = __nccwpck_require__(105); /******/ module.exports = __webpack_exports__; /******/ diff --git a/actions/test/src/TestCommand.cjs b/actions/test/src/TestCommand.cjs new file mode 100644 index 00000000..00ba51db --- /dev/null +++ b/actions/test/src/TestCommand.cjs @@ -0,0 +1,90 @@ +const fs = require("node:fs"); +const path = require("node:path"); +const { Vitest } = require("./presets/Vitest.cjs"); +const { Jest } = require("./presets/Jest.cjs"); +const { NodeTest } = require("./presets/NodeTest.cjs"); + +const TestCommand = { + create({ + engine = "auto", + command = "", + project, + runScriptCommand, + execCommand, + args = [], + ...report + }) { + if (!["auto", "vitest", "jest", "node:test"].includes(engine)) { + throw new Error(`Unknown test engine: ${engine}.`); + } + if (command && (!command.trim() || engine !== "auto")) { + throw new Error( + "Use either an engine preset or a nonempty custom command.", + ); + } + if (engine === "auto" && !command) { + const manifest = JSON.parse( + fs.readFileSync(path.join(project, "package.json"), "utf8"), + ); + command = manifest.scripts?.["test:ci"] ? "test:ci" : ""; + if (!command) engine = TestCommand.detect(manifest); + } + if (command) { + return { + command: runScriptCommand, + args: [ + command, + ...(runScriptCommand === "npm run" && args.length ? ["--"] : []), + ...args, + ], + }; + } + if ((report.shard || report.merge) && engine !== "vitest") { + throw new Error( + "Native shard orchestration requires the Vitest preset or a custom command.", + ); + } + const preset = { vitest: Vitest, jest: Jest, "node:test": NodeTest }[ + engine + ]; + const options = preset.arguments(report); + return engine === "node:test" + ? { command: "node", args: [...options, ...args] } + : { command: execCommand, args: [engine, ...options, ...args] }; + }, + + detect(manifest) { + const dependencies = { + ...manifest.dependencies, + ...manifest.devDependencies, + }; + const engines = ["vitest", "jest"].filter((name) => + Object.hasOwn(dependencies, name), + ); + if (manifest.scripts?.test?.trim() === "node --test") + engines.push("node:test"); + if (engines.length !== 1) { + throw new Error( + "Cannot select one test engine. Set engine explicitly or provide a custom command that writes reports to CI_REPORTS_DIR.", + ); + } + const scripts = manifest.scripts || {}; + const defaults = { + vitest: ["vitest", "vitest run"], + jest: ["jest"], + "node:test": ["node --test"], + }; + if ( + scripts.pretest || + scripts.posttest || + (scripts.test && !defaults[engines[0]].includes(scripts.test.trim())) + ) { + throw new Error( + "Project-specific test scripts or hooks require an explicit engine choice or a custom command; automatic selection cannot replace them.", + ); + } + return engines[0]; + }, +}; + +module.exports = { TestCommand }; diff --git a/actions/test/src/TestCommand.test.cjs b/actions/test/src/TestCommand.test.cjs new file mode 100644 index 00000000..cd21c6af --- /dev/null +++ b/actions/test/src/TestCommand.test.cjs @@ -0,0 +1,124 @@ +const assert = require("node:assert/strict"); +const fs = require("node:fs"); +const os = require("node:os"); +const path = require("node:path"); +const { spawnSync } = require("node:child_process"); +const { describe, it } = require("node:test"); +const { TestCommand } = require(process.env.ACTION_ENTRYPOINT || "./index.js"); + +const project = (t, manifest = {}) => { + const directory = fs.mkdtempSync(path.join(os.tmpdir(), "test-command-")); + t.after(() => fs.rmSync(directory, { recursive: true, force: true })); + fs.writeFileSync( + path.join(directory, "package.json"), + JSON.stringify(manifest), + ); + return directory; +}; + +describe("TestCommand", () => { + it("keeps a custom CI script and its arguments when multiple tools are installed", (t) => { + // Arrange + const directory = project(t, { + scripts: { "test:ci": "npm run prepare-tests && vitest run" }, + devDependencies: { vitest: "*", jest: "*" }, + }); + // Act + const invocation = TestCommand.create({ + project: directory, + runScriptCommand: "npm run", + args: ["--config", "config with spaces.js"], + }); + // Assert + assert.deepEqual(invocation, { + command: "npm run", + args: ["test:ci", "--", "--config", "config with spaces.js"], + }); + }); + + it("requires a choice for ambiguous engines and does not rewrite a project script", (t) => { + // Arrange + const ambiguous = project(t, { + devDependencies: { vitest: "*", jest: "*" }, + }); + const specific = project(t, { + scripts: { test: "node --test selected.spec.cjs" }, + }); + // Act / Assert + for (const directory of [ambiguous, specific]) { + assert.throws( + () => TestCommand.create({ project: directory }), + /select one test engine/, + ); + } + assert.throws( + () => TestCommand.create({ engine: "vitest", command: "test:custom" }), + /either an engine/, + ); + assert.throws( + () => TestCommand.create({ engine: "unknown" }), + /Unknown test engine/, + ); + assert.throws( + () => TestCommand.create({ engine: "jest", shard: true }), + /requires the Vitest/, + ); + assert.throws( + () => + TestCommand.detect({ + scripts: { pretest: "node prepare.js" }, + devDependencies: { vitest: "*" }, + }), + /scripts or hooks/, + ); + }); + + for (const [coverage, fails] of [ + [true, false], + [false, true], + [true, true], + ]) { + it(`runs native Node reports with coverage=${coverage} and failure=${fails}`, (t) => { + // Arrange + const directory = project(t, { scripts: { test: "node --test" } }); + const reports = path.join(directory, "reports with spaces"); + fs.mkdirSync(reports); + fs.writeFileSync( + path.join(directory, "source.cjs"), + "module.exports = value => value + 1;\n", + ); + fs.writeFileSync( + path.join(directory, "selected.spec.cjs"), + `require('node:test').test('selected test', () => require('node:assert/strict').equal(require('./source.cjs')(1), ${fails ? 3 : 2}));\n`, + ); + const invocation = TestCommand.create({ + project: directory, + directory: reports, + coverage, + args: ["selected.spec.cjs"], + }); + const env = { ...process.env }; + // Start an independent runner rather than inheriting the parent test worker. + delete env.NODE_TEST_CONTEXT; + delete env.NODE_V8_COVERAGE; + // Act + const result = spawnSync(invocation.command, invocation.args, { + cwd: directory, + encoding: "utf8", + env, + }); + // Assert + assert.equal(result.status, fails ? 1 : 0, result.stderr + result.stdout); + assert.match( + fs.readFileSync(path.join(reports, "junit.xml"), "utf8"), + /selected test/, + ); + assert.equal(fs.existsSync(path.join(reports, "lcov.info")), coverage); + if (coverage) + assert.match( + fs.readFileSync(path.join(reports, "lcov.info"), "utf8"), + /source.cjs/, + ); + }); + } +}); diff --git a/actions/test/src/index.js b/actions/test/src/index.js index 4de2db9d..4628862f 100644 --- a/actions/test/src/index.js +++ b/actions/test/src/index.js @@ -1 +1,4 @@ -module.exports = require("./ReportDefinition.cjs"); +module.exports = { + ...require("./ReportDefinition.cjs"), + ...require("./TestCommand.cjs"), +}; diff --git a/actions/test/src/presets/Jest.cjs b/actions/test/src/presets/Jest.cjs new file mode 100644 index 00000000..514f781a --- /dev/null +++ b/actions/test/src/presets/Jest.cjs @@ -0,0 +1,16 @@ +const path = require("node:path"); + +const Jest = { + arguments({ directory, coverage }) { + return [ + "--ci", + "--json", + `--outputFile=${path.join(directory, "results.json")}`, + `--coverage=${coverage}`, + "--coverageReporters=text", + `--coverageDirectory=${path.join(directory, "coverage")}`, + ]; + }, +}; + +module.exports = { Jest }; diff --git a/actions/test/src/presets/NodeTest.cjs b/actions/test/src/presets/NodeTest.cjs new file mode 100644 index 00000000..ff5f9a2a --- /dev/null +++ b/actions/test/src/presets/NodeTest.cjs @@ -0,0 +1,22 @@ +const path = require("node:path"); + +const NodeTest = { + arguments({ directory, coverage }) { + return [ + "--test", + "--test-reporter=spec", + "--test-reporter-destination=stdout", + "--test-reporter=junit", + `--test-reporter-destination=${path.join(directory, "junit.xml")}`, + ...(coverage + ? [ + "--experimental-test-coverage", + "--test-reporter=lcov", + `--test-reporter-destination=${path.join(directory, "lcov.info")}`, + ] + : []), + ]; + }, +}; + +module.exports = { NodeTest }; diff --git a/actions/test/src/presets/Vitest.cjs b/actions/test/src/presets/Vitest.cjs new file mode 100644 index 00000000..5aa1da22 --- /dev/null +++ b/actions/test/src/presets/Vitest.cjs @@ -0,0 +1,23 @@ +const path = require("node:path"); + +const Vitest = { + arguments({ directory, coverage, shard, merge }) { + return [ + "run", + "--reporter=default", + ...(!shard + ? [ + "--reporter=json", + `--outputFile.json=${path.join(directory, "results.json")}`, + ] + : []), + `--coverage.enabled=${coverage}`, + "--coverage.reporter=text", + ...(merge ? ["--coverage.reporter=lcovonly"] : []), + `--coverage.reportsDirectory=${path.join(directory, "coverage")}`, + "--coverage.reportOnFailure=true", + ]; + }, +}; + +module.exports = { Vitest }; diff --git a/docs/adr/0004-optional-vitest-sharding.md b/docs/adr/0004-optional-vitest-sharding.md index 118966c4..273e418b 100644 --- a/docs/adr/0004-optional-vitest-sharding.md +++ b/docs/adr/0004-optional-vitest-sharding.md @@ -70,6 +70,26 @@ experiment must compare elapsed time and summed job time, including artifact transfer and merging. This API implementation does not establish a performance gain; retain unsharded execution if overhead outweighs the benefit. +## Native command presets, 2026-12-03 + +The test and lint actions now offer native engine presets with a custom package +command option. Automatic selection preserves existing CI scripts, then chooses +one declared supported engine. Ambiguous projects require an explicit choice. +Presets configure native reporting and use the project's installed tools and +configuration; Common continues to own report normalization and publication. + +Vitest's preset handles shard and merge reporting without changing the existing +project-owned coverage thresholds. Projects still defer thresholds during shard +execution and enforce them after merging. Custom commands retain their existing +package-manager lifecycle behavior. Presets invoke tools directly rather than +rewriting shell scripts, which can silently lose arguments or setup hooks. + +The native Node preset places reporting options before test paths. Reporter +arguments appended after paths were ignored in a local Node 26.13.1 check, even +though the command exited successfully. Coverage collection could not be enabled +through `NODE_OPTIONS`. The preset therefore supplies the runner's CLI arguments +directly, retaining a custom command for project-specific orchestration. + ## References - [Vitest sharding](https://vitest.dev/guide/improving-performance.html#sharding) diff --git a/docs/usage/test-reports.md b/docs/usage/test-reports.md index 90d9606d..3011bdd4 100644 --- a/docs/usage/test-reports.md +++ b/docs/usage/test-reports.md @@ -7,35 +7,79 @@ JSON can supply both detailed test outcomes and coverage. Missing requested coverage fails validation; tests remain available for diagnosis. The caller's `publish-ci-reports.yml` workflow publishes the collected artifacts once. -## Vitest - -Use the built-in JSON reporter and the coverage provider already configured by -the project. For example, a `test:ci` package script can run: - -```sh -vitest run --reporter=default --reporter=json \ - --outputFile.json="${CI_REPORTS_DIR:-.reports}/results.json" \ - --coverage.enabled="${CI_TEST_COVERAGE:-true}" \ - --coverage.reporter=text --coverage.reportOnFailure=true +## Engine presets + +The default `engine: auto` uses an existing `test:ci` or `lint:ci` script first. +Otherwise, it selects exactly one declared supported tool. Node's built-in runner +is recognized from an exact `test: node --test` script. Ambiguous projects fail +with a request to choose an engine; failed runs never switch engines. Automatic +selection also rejects project-specific main scripts or hooks instead of silently +replacing them. Choose an engine explicitly to use native execution, or a custom +command to retain the project's orchestration. + +| Action | Presets | Native reports | +| ------ | ---------------- | ----------------------------------------- | +| Test | `vitest`, `jest` | JSON containing test results and coverage | +| Test | `node:test` | JUnit and optional LCOV | +| Lint | `biome` | SARIF | +| Lint | `eslint` | ESLint JSON | + +Presets use the project's installed tools and configuration. They select native +reporters and output directories, without adding CI scripts, reporter packages or +report filenames to the consumer workflow. Lint presets fail on warnings. Test +presets collect coverage only when requested. Project configuration continues to +own test selection, coverage scope and thresholds, and linter rules. + +Call `continuous-integration.yml` with its defaults for automatic selection. +Select an engine explicitly when needed: + +```yaml +with: + test: '{"engine":"vitest"}' + lint: '{"engine":"biome"}' ``` -The JSON contains assertion results and the final Istanbul coverage map. -Keep coverage inclusion, exclusions and thresholds in the project's Vitest -configuration. Other runtimes run with `CI_TEST_COVERAGE=false` while retaining -their detailed tests in the same JSON format. +Both actions also accept `engine` directly. Native execution arguments are a JSON +array, for example `test: '{"engine":"node:test","arguments":["src/*.test.cjs"]}'`. +The Node preset inserts reporting flags before test file arguments. Presets run +the tool directly; use a custom package script when package-manager setup hooks, +multiple tools or other orchestration are required. + +## Custom commands -## Jest +An explicit `command` selects a package script and requires `engine: auto`. +The action does not rewrite it or inject tool-specific flags. It supplies +`CI_REPORTS_DIR` and `CI_TEST_COVERAGE`, then validates the generated reports. +For example, `test: '{"command":"test:integration"}'` keeps the project's +package-manager lifecycle behavior. -Use Jest's built-in JSON output. No extra test reporter package is required: +Keep reporter configuration in the tool's existing configuration where possible. +A custom Vitest script can be as short as `vitest run --mode ci`, with reporting +configured in `vitest.config`: -```sh -jest --json --outputFile="${CI_REPORTS_DIR:-.reports}/results.json" \ - --coverage="${CI_TEST_COVERAGE:-true}" --coverageReporters=text +```js +import { defineConfig } from "vitest/config"; + +export default defineConfig(({ mode }) => ({ + test: { + reporters: mode === "ci" ? ["default", "json"] : ["default"], + outputFile: { + json: `${process.env.CI_REPORTS_DIR || ".reports"}/results.json`, + }, + coverage: { + enabled: mode === "ci" && process.env.CI_TEST_COVERAGE !== "false", + reporter: ["text"], + reportsDirectory: `${process.env.CI_REPORTS_DIR || ".reports"}/coverage`, + reportOnFailure: true, + // Keep the project's provider, inclusion rules and thresholds here. + }, + }, +})); ``` -The test action validates the assertions and final coverage map independently -and retains the native file once. Coverage publication generates only the -destination's required representation. +The native JSON includes both assertions and the final coverage map. Commands for +other runners can emit separate JUnit and LCOV reports. Custom lint commands can +emit ESLint JSON, SARIF or Checkstyle. Common validates and converts these formats. ## Vitest shards @@ -60,33 +104,9 @@ Keep reporter-specific `outputFile.json` configuration, since the action adds and enforce the original thresholds during merging. The action checks the complete shard set and retains failed shard outcomes. -## Other runners - -Keep separate native reports when the runner needs them. For `node:test`, a -`test:ci` script can emit JUnit and LCOV: - -```sh -node $(test "${CI_TEST_COVERAGE:-true}" = true && printf %s --experimental-test-coverage) \ - --test --test-reporter=spec --test-reporter-destination=stdout \ - --test-reporter=junit --test-reporter-destination="$CI_REPORTS_DIR/junit.xml" \ - --test-reporter=lcov --test-reporter-destination="$CI_REPORTS_DIR/lcov.info" -``` - -Keep calling `continuous-integration.yml` with its default `test:ci` command. -No filename settings are required. Coverage can be disabled without removing -detailed test results. Missing required report kinds and malformed reports fail -the action; other valid results remain available for diagnosis. - -## Lint commands - -The lint action discovers supported diagnostics in its fresh `CI_REPORTS_DIR`. -For example, `lint:ci` can emit ESLint JSON, SARIF or Checkstyle. Configure the -native reporter in the command, without repeating its output path in the -workflow. Common owns validation and conversion for all these formats. - ## Report publication Configure publication destinations and credentials on the outer `publish-ci-reports.yml` call. Follow the -[common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/44d42ca06b9f722d8ab79af4f588f30ad1e16bc5/docs/usage/ci-reports.md#consumer-workflow) +[common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/feat/native-github-coverage/.github/workflows/publish-ci-reports.md#consumer-workflow) for the caller workflow, permissions and separate completion gate. diff --git a/tests/continuous-integration/package-lock.json b/tests/continuous-integration/package-lock.json index 437cd70a..320b7595 100644 --- a/tests/continuous-integration/package-lock.json +++ b/tests/continuous-integration/package-lock.json @@ -7,7 +7,10 @@ "name": "continuous-integration-contract-tests", "devDependencies": { "@actions/expressions": "0.3.61", + "@biomejs/biome": "2.6.9", "@vitest/coverage-v8": "5.1.1", + "eslint": "10.16.0", + "jest": "30.5.2", "vitest": "5.1.1", "yaml": "2.9.1" } @@ -22,1163 +25,6238 @@ "node": ">= 20" } }, - "node_modules/@babel/helper-string-parser": { - "version": "7.29.14", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.14.tgz", - "integrity": "sha512-CXvKMFvM80ihI7Vox9jb+kQjnyjESQNPM+vB7U0Zz6TWuZA+Z/FL0QPMH300h33qJtIx+REeBhXqWOPW48TcAQ==", + "node_modules/@babel/code-frame": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.17.tgz", + "integrity": "sha512-IdlVpcDeoDATtN2cfmnVk0A4XJKhu7SlpGuSaiOFdko09YC1MD07WokWUSEdw5R2o4o8VObX2LzViQW6VXnzkA==", "dev": true, "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.17", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.29.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", - "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "node_modules/@babel/code-frame/node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/compat-data": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.17.tgz", + "integrity": "sha512-pC/HCNB1loXYCLB9S7FDieWKJiXH8LJTUGFvVAm+7hWUKBjL07EcvVITNH9KlXdS/TTSbChZHZCYx/yag6LbRw==", "dev": true, "license": "MIT", "engines": { "node": ">=6.9.0" } }, - "node_modules/@babel/parser": { - "version": "7.29.14", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.14.tgz", - "integrity": "sha512-VL220vXuyO2z3rNIQwY7ftj9UwpqOt+33sH+sBWkOekbsSR2g7EEMnOx24ZlCH0xOA3DM/33SifVFGbnJD8r/w==", + "node_modules/@babel/core": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.17.tgz", + "integrity": "sha512-dP4g0UpATLviwEEb46bBaeL5MyW3q7LwqGoaQJvjXGS8tdpxckLtDTI9FBwA5ioVHnYoR2nRqCf1BmlMwbZV5A==", "dev": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.29.14" + "@babel/code-frame": "^7.29.17", + "@babel/generator": "^7.29.17", + "@babel/helper-compilation-targets": "^7.29.17", + "@babel/helper-module-transforms": "^7.29.17", + "@babel/helpers": "^7.29.17", + "@babel/parser": "^7.29.17", + "@babel/template": "^7.29.17", + "@babel/traverse": "^7.29.17", + "@babel/types": "^7.29.17", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" }, - "bin": { - "parser": "bin/babel-parser.js" + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.17.tgz", + "integrity": "sha512-xjNUVINWex7s4U0vESYwa8ChCBnmvhCQ6nkAdnhM8WYPlhXvU9D9fPurOSYQLV4FwcNXacDkN/MWIPNHsTI2OA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.17", + "@babel/types": "^7.29.17", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" }, "engines": { - "node": ">=6.0.0" + "node": ">=6.9.0" } }, - "node_modules/@babel/types": { - "version": "7.29.14", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.14.tgz", - "integrity": "sha512-UjI/dKmwJwT9pOszJitq2G6EObZPnsZUfdCr92z2TlF3EZK9J3EdfOKUrCzHl6wFthbzwhzl1Soc/UIwxRiq6w==", + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.17.tgz", + "integrity": "sha512-6uFqkZstBw0lSRaEr/7HNuqURHubX4BvnN0FbbIBNFa5/nUcKLp5AFubCcUlbik9mI/Ztsz3mdjjpqoF3dVqrA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/helper-string-parser": "^7.29.14", - "@babel/helper-validator-identifier": "^7.29.7" + "@babel/compat-data": "^7.29.17", + "@babel/helper-validator-option": "^7.29.17", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" }, "engines": { "node": ">=6.9.0" } }, - "node_modules/@bcoe/v8-coverage": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", - "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", + "node_modules/@babel/helper-globals": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.17.tgz", + "integrity": "sha512-SeQUwFlH8hH1vjUmBFeqwxt6Nsjp01MKEZOtZPJ86lpA4GBdb/o0dShjC+Awf7v74/+84KIL1RiJ4TOJj6gU+A==", "dev": true, "license": "MIT", "engines": { - "node": ">=18" + "node": ">=6.9.0" } }, - "node_modules/@emnapi/core": { - "version": "2.0.0-beta.2", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-2.0.0-beta.2.tgz", - "integrity": "sha512-MzCVoWtcg4Pm2B3je5mMvYMvj3MmBKw+fU7vbsJc9/iT8ip6/eYIHo/Dsm/mr+wsHB6SEyJDuxB09Yy6r/8+4A==", + "node_modules/@babel/helper-module-imports": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.17.tgz", + "integrity": "sha512-bLxkfvUEHeWShbadKTm7EfDCkosXZh6PjWEa9bYiCuob24c0nm388ara2Hz6KisGaXe+XCsi6VyfJNSJjeUUwg==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "@emnapi/wasi-threads": "2.2.0", - "tslib": "^2.4.0" + "@babel/traverse": "^7.29.17", + "@babel/types": "^7.29.17" + }, + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@emnapi/runtime": { - "version": "2.0.0-beta.2", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-2.0.0-beta.2.tgz", - "integrity": "sha512-JcrSPzPvZuNZvJqPTF9Fw25LbOJ8avzFVlaf2grmH4Cku0oGP47tRgqPZadcfj3YoZMHkFVnCYFbQM8I+i5QEw==", + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.17.tgz", + "integrity": "sha512-eY/pAYlV7pC5biPmW0M7fDqv1D+opqI0Ioa6OQeg0AV3465b8K8g9I9fvZIV11u35f7jU6q5RXYlUD6k4QLC3w==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "tslib": "^2.4.0" + "@babel/helper-module-imports": "^7.29.17", + "@babel/helper-validator-identifier": "^7.29.17", + "@babel/traverse": "^7.29.17" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "node_modules/@emnapi/wasi-threads": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-2.2.0.tgz", - "integrity": "sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw==", + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.17.tgz", + "integrity": "sha512-pdztM6tDPJu52CYy07frAD1XpDAvndtxPhPyehcarNv5Pyq5hutWmTVXd0XIPaI749vUIJ+vxG6KYWoVExn+lg==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, - "dependencies": { - "tslib": "^2.4.0" + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz", - "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==", + "node_modules/@babel/helper-string-parser": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.17.tgz", + "integrity": "sha512-iY5lvqFhfgMXp4o4zWads4NvQZXizBxzCoADPOgFMcMwk1XefAdBJbc9i1y94aflY57lokjOjRTa3AOOW9R7BQ==", "dev": true, "license": "MIT", "engines": { - "node": ">=6.0.0" + "node": ">=6.9.0" } }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", - "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.17.tgz", + "integrity": "sha512-AG+olLB+teKhkQ2WYJeaZqJwNLjtWTz1waQIP/tEYITzVzpdHLP7IXx2c/bH2JTsNCgvWlkqdCv91xcb8lul8Q==", "dev": true, - "license": "MIT" + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.31", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", - "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "node_modules/@babel/helper-validator-option": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.17.tgz", + "integrity": "sha512-Pr+bjfbd4TYVax16KyHVyElTnid5nbWQWQvA/dPlESoKVZ8B4eTAUhoqug/mtD9hWAEgIQIOyvjUBMI9HjdrGw==", "dev": true, "license": "MIT", - "dependencies": { - "@jridgewell/resolve-uri": "^3.1.0", - "@jridgewell/sourcemap-codec": "^1.4.14" + "engines": { + "node": ">=6.9.0" } }, - "node_modules/@napi-rs/wasm-runtime": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.6.tgz", - "integrity": "sha512-mRyDmEw9/fCDXCGfL1sbgIw/GUK0PVxRW4YwgPN61F3LQ+fSyoBFarJVzgGyhF6kRzEQZ0FejDqm4WLXSeqQmw==", + "node_modules/@babel/helpers": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.17.tgz", + "integrity": "sha512-Q7LRJjIiFAiOtfkVBzXe4op1tQ8dXYsRsdojKzLfERndnXcmyyn9RZIBlSJzFo0O3CouXV3Tvb8AGolaDr1M7A==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "@tybys/wasm-util": "^0.10.3" + "@babel/template": "^7.29.17", + "@babel/types": "^7.29.17" }, "engines": { - "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.17.tgz", + "integrity": "sha512-I+0olVqWMm9bimQJc/5B3jn1nivNDXtnMtDVs07XdHzZLcWa2N/mlCTPmAsQg95QcKoXSuFD2Yz4fwdtoyk7DQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.17" }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/Brooooooklyn" + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-syntax-async-generators": { + "version": "7.8.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", + "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" }, "peerDependencies": { - "@emnapi/core": "^1.7.1 || 2.0.0-beta.2", - "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2" + "@babel/core": "^7.0.0-0" } }, - "node_modules/@oxc-project/types": { - "version": "0.156.0", - "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz", - "integrity": "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==", + "node_modules/@babel/plugin-syntax-bigint": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-bigint/-/plugin-syntax-bigint-7.8.3.tgz", + "integrity": "sha512-wnTnFlG+YxQm3vDxpGE57Pj0srRU4sHE/mDkt1qv2YJJSeUAec2ma4WLUnUPeKjyrfntVwe/N6dCXpU+zL3Npg==", "dev": true, "license": "MIT", - "peer": true, - "funding": { - "url": "https://github.com/sponsors/oxc-project" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@rolldown/binding-android-arm-eabi": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.19.tgz", - "integrity": "sha512-e+Ebe0WT+9tbXmNKPIiC8YrWAHYwug3m6i4p3rZGGulfZri1jtI4HslT+OZnFf/OIHowWF71DTlHwXBP2SiA7A==", - "cpu": [ - "arm" - ], + "node_modules/@babel/plugin-syntax-class-properties": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", + "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true, - "engines": { - "node": "^20.19.0 || >=22.12.0" + "dependencies": { + "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@rolldown/binding-android-arm64": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.19.tgz", - "integrity": "sha512-hOombrTJ+szt2ciEzS7oCA78lMPBgF5UMQWCJIyNfnrI7GLl8HYoFqCnpL2gcPOaXMqryGCU5ExdQKyDDcC+yA==", - "cpu": [ - "arm64" - ], + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "android" - ], - "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@rolldown/binding-darwin-arm64": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.19.tgz", - "integrity": "sha512-XoMA2pwCKGTQzUjPgtRwkedH4WmXhdIPKT6l6oOxd1PUbNodGI6DcBekgN7EC//+x3pfBYX/qL1gNmZAqivw5g==", - "cpu": [ - "arm64" - ], + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.29.7.tgz", + "integrity": "sha512-zGYcYfq/WmZ4V+kBIXQon9dSSc8ircGZqw9ZaNhhGj9nZkeBu1jHLBDQqYYi5WA9uawvA2sIMbry2nCFhf5Djg==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@rolldown/binding-darwin-x64": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.19.tgz", - "integrity": "sha512-zo8EsSSwMZCY/e+fRnGaX02YGgvJD0yvhNi/9hpGPA2MJ9ZF8dPCw75UGfpI6OpQ/myR/dIYmogRvqiZD0TrXg==", - "cpu": [ - "x64" - ], + "node_modules/@babel/plugin-syntax-import-meta": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", + "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": "^20.19.0 || >=22.12.0" + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@rolldown/binding-freebsd-x64": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.19.tgz", - "integrity": "sha512-O8ISAOfI1nj7AuBPd30FSF47z7f7lzlk5poQVGgiikvQuGEBFYvW8ki+UEnT+YJPnNGjQzn304klt4O9FUE7mA==", - "cpu": [ - "x64" - ], + "node_modules/@babel/plugin-syntax-json-strings": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", + "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "freebsd" - ], - "peer": true, - "engines": { - "node": "^20.19.0 || >=22.12.0" + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@rolldown/binding-linux-arm-gnueabihf": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.19.tgz", - "integrity": "sha512-/lYCba5NO0yq4S0jGMH8QTBtkvQxoXjoQWzF5BcWp9MjB9jxVRD1GQDNofkVjcOj30DWyhLIN/4Oe60JKzaONw==", - "cpu": [ - "arm" - ], + "node_modules/@babel/plugin-syntax-jsx": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.29.17.tgz", + "integrity": "sha512-HfwdKDLVNg6KjRb2z1QSkQC1EP0YIYQhg83vps+JyqOIrX9ZoVhcTYt9yeFkTy5U/iSRXRvW4S59sl/0eej5VA==", "dev": true, "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.17" + }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@rolldown/binding-linux-arm64-gnu": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.19.tgz", - "integrity": "sha512-pm/apFMBnSbFb3O6nG5pHO1iqHhZrjGDFEjSm+ot9J17XXPvH9L90y5h+jgfHCE+Qdlsvy8qKEcU4VKxgjD+vA==", - "cpu": [ - "arm64" - ], + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", + "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": "^20.19.0 || >=22.12.0" + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "node_modules/@rolldown/binding-linux-arm64-musl": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.19.tgz", - "integrity": "sha512-K1SmQp3FFichn8oqrNIwvFoZ5wcvjC7goBzpaMNvLf9FZc+QB/QvLmnpJZgAAGHiD980tP8FZZnXk2K94rvlxg==", + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", + "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-numeric-separator": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", + "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-catch-binding": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", + "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-optional-chaining": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", + "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-top-level-await": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", + "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-typescript": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.29.17.tgz", + "integrity": "sha512-C1v4jKWUnV9aoCTbc7YSmxKflPzi0Geuh+mc7xuLSpNiRr3mO4i4elL8u97Ij9XKj9Iqy2aFnc1l1AMWL4DhbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.17" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.17.tgz", + "integrity": "sha512-D4nOLKOzIBwn7/Z78h3UPEwzFObmPVTukBJ9+63BijgMVeLj6mQ77FJb6YCZ4QBo6VjAk/yj4QnpKusTcBy6vA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.17", + "@babel/parser": "^7.29.17", + "@babel/types": "^7.29.17" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.17.tgz", + "integrity": "sha512-q+CnfQcmNfDdOUARkt9FWtdR0HPOCcyQBj1Z7l2SOpFIfUB/XI3dXS0B5UOlZWwQCun80xVhgcv4ip6w128u9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.17", + "@babel/generator": "^7.29.17", + "@babel/helper-globals": "^7.29.17", + "@babel/parser": "^7.29.17", + "@babel/template": "^7.29.17", + "@babel/types": "^7.29.17", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.17", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.17.tgz", + "integrity": "sha512-kzo3lZUbI0gARA4QvhmOTH/aws2SrZ880ECQRIjPPSrdfBM0bZCkj1U7UN2fB0GNeXayqCiLVXa2+1jAhn377Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.17", + "@babel/helper-validator-identifier": "^7.29.17" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-1.0.2.tgz", + "integrity": "sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@biomejs/biome": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.6.9.tgz", + "integrity": "sha512-RelCBDzTXu4DBU8c35P4iMrDO80SUjW0OgjDA7CT1z3UcCU5IclWTZ2XnMelI4frQL//xg2K2BQxAhcOKxdPQA==", + "dev": true, + "license": "MIT OR Apache-2.0", + "bin": { + "biome": "bin/biome" + }, + "engines": { + "node": ">=14.21.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/biome" + }, + "optionalDependencies": { + "@biomejs/cli-android-arm64": "2.6.9", + "@biomejs/cli-android-x64": "2.6.9", + "@biomejs/cli-darwin-arm64": "2.6.9", + "@biomejs/cli-darwin-x64": "2.6.9", + "@biomejs/cli-linux-arm64": "2.6.9", + "@biomejs/cli-linux-arm64-musl": "2.6.9", + "@biomejs/cli-linux-x64": "2.6.9", + "@biomejs/cli-linux-x64-musl": "2.6.9", + "@biomejs/cli-win32-arm64": "2.6.9", + "@biomejs/cli-win32-x64": "2.6.9" + } + }, + "node_modules/@biomejs/cli-android-arm64": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@biomejs/cli-android-arm64/-/cli-android-arm64-2.6.9.tgz", + "integrity": "sha512-/3Aj5aiG+Iz8yDBJJb/GFDsptr9ONk3n1wZUIERuU+pVXMIslBaOnrTYJI5QVVXZ9jE494myQHiIvFrjQCBYeQ==", "cpu": [ "arm64" ], "dev": true, - "libc": [ - "musl" - ], - "license": "MIT", + "license": "MIT OR Apache-2.0", "optional": true, "os": [ - "linux" + "android" ], - "peer": true, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=14.21.3" } }, - "node_modules/@rolldown/binding-linux-ppc64-gnu": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.19.tgz", - "integrity": "sha512-I0xwD57jP/3A7+5UPZin2w8Y7XHEmEM5zqpYZOcQ45MlNW6tUJUziymV3yRr7rL4vwyfEcRsRksC4a7Kc08p5Q==", + "node_modules/@biomejs/cli-android-x64": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@biomejs/cli-android-x64/-/cli-android-x64-2.6.9.tgz", + "integrity": "sha512-erjbUpD9KJhzTsGHY9oStJ1bSiUJ1ikUXgdr0iOFoIAMiKqW+GdVdEqAlEyqiZA6CBiFqf2fV+g0AVl3hYOuYg==", "cpu": [ - "ppc64" + "x64" ], "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", + "license": "MIT OR Apache-2.0", "optional": true, "os": [ - "linux" + "android" ], - "peer": true, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=14.21.3" } }, - "node_modules/@rolldown/binding-linux-s390x-gnu": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.19.tgz", - "integrity": "sha512-BrtEHT24SNXj9HiXqy+s/kXiSiQGt6EKCPUlRirAoIioVxKGnbXBUEkbZASAei7iZJB0/Ynm+0JP00Ipx7AnSw==", + "node_modules/@biomejs/cli-darwin-arm64": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.6.9.tgz", + "integrity": "sha512-fO67s0SF+lKGhNPQ7jUXiz0yXGl/1Qm3XTIn/4Hd2Z2z3ewQMrotWIMVdIPxZAgLJdQtRLBOzgsTRzTl981yWA==", "cpu": [ - "s390x" + "arm64" ], "dev": true, - "libc": [ - "glibc" - ], - "license": "MIT", + "license": "MIT OR Apache-2.0", "optional": true, "os": [ - "linux" + "darwin" ], - "peer": true, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=14.21.3" } }, - "node_modules/@rolldown/binding-linux-x64-gnu": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.19.tgz", - "integrity": "sha512-rm75/9DkHKeU2WnA8w4X94WGYgLlDCFCfkQC+4bguVJmC/jvDRv2B+2wLOYhyE0fVuv7//Ckk39OoOufyCu76Q==", + "node_modules/@biomejs/cli-darwin-x64": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.6.9.tgz", + "integrity": "sha512-RdjT3Z6dLlii0x6EroncTp9jg38FMx2R1aeaaU4BbZ4//3TJ2mA2R39KMIrZYxHdHXcfv9X2V5hwKkXhg08w/g==", "cpu": [ "x64" ], "dev": true, + "license": "MIT OR Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=14.21.3" + } + }, + "node_modules/@biomejs/cli-linux-arm64": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.6.9.tgz", + "integrity": "sha512-x73OpQSuQLuvNfzXWEjf0mK95NxlJQX4eG/jmuSrGWOz+/jcLUE4N/21yBu3n0X+wa8bJ3NsWNvmNacLnyc2CQ==", + "cpu": [ + "arm64" + ], + "dev": true, "libc": [ "glibc" ], - "license": "MIT", + "license": "MIT OR Apache-2.0", "optional": true, "os": [ "linux" ], - "peer": true, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=14.21.3" } }, - "node_modules/@rolldown/binding-linux-x64-musl": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.19.tgz", - "integrity": "sha512-irh/4+iYFM4GAzpluDErgjz89bj6NDtqqMAG/6O1LG38Ed3NpyebzCpcVNkFW8uhy+/3/BocUvnXDR33CXWe9A==", + "node_modules/@biomejs/cli-linux-arm64-musl": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.6.9.tgz", + "integrity": "sha512-qoG0R5MhJ8VFozVFZQC42V3qCI1TInDhL/YcPPg0oTzfv3vuh0ZDXj+2nNahq8gboHUMv7MWpGjRDLhpQatJ+A==", "cpu": [ - "x64" + "arm64" ], "dev": true, "libc": [ "musl" ], - "license": "MIT", + "license": "MIT OR Apache-2.0", "optional": true, "os": [ "linux" ], - "peer": true, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=14.21.3" } }, - "node_modules/@rolldown/binding-openharmony-arm64": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.19.tgz", - "integrity": "sha512-+KWTWNoPt+CfSq94CiceWu3yPE+QzkaG+phPyz9G60tmZLwfQkcA4AeksafzvJAw4pvg1mcd5a1TkUqVv0s4JA==", + "node_modules/@biomejs/cli-linux-x64": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.6.9.tgz", + "integrity": "sha512-uVrqS0HDjRzFlx88ZpfmlZvJ+xIwTU+110vunzrYvZQ5OqXl/1ugMTNvAs61hejH7jh7iequKJwagRVarrYcSQ==", "cpu": [ - "arm64" + "x64" ], "dev": true, - "license": "MIT", + "libc": [ + "glibc" + ], + "license": "MIT OR Apache-2.0", "optional": true, "os": [ - "openharmony" + "linux" ], - "peer": true, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=14.21.3" } }, - "node_modules/@rolldown/binding-wasm32-wasi": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.2.19.tgz", - "integrity": "sha512-7EH+skOsl5qpWnK0vzamgJFhOv1cwxQpsxm8tI883K9fur5c27p8q87fzEO6BbBPabA2/+s/zR63/pLc137iOg==", + "node_modules/@biomejs/cli-linux-x64-musl": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.6.9.tgz", + "integrity": "sha512-o73Sk1hCbGOFOrDlxtpHGIubnLwMXscT32+ujMwUyq9o0f4onxO7OznzkFgcZGbwKy1R3ohroOkqZDXqj1u29g==", "cpu": [ - "wasm32" + "x64" ], "dev": true, - "license": "MIT", + "libc": [ + "musl" + ], + "license": "MIT OR Apache-2.0", "optional": true, - "peer": true, - "dependencies": { - "@emnapi/core": "2.0.0-beta.2", - "@emnapi/runtime": "2.0.0-beta.2", - "@napi-rs/wasm-runtime": "1.2.6" - }, + "os": [ + "linux" + ], "engines": { - "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + "node": ">=14.21.3" } }, - "node_modules/@rolldown/binding-win32-arm64-msvc": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.19.tgz", - "integrity": "sha512-3Q1Yg1Q7tEvBWoZf5rFvG/GKZQPgwfru+p4wBajDfJFBs0SHCpL++dfTjW9gyAKd1T7ZpIYvdaUax7Pa/IhFVQ==", + "node_modules/@biomejs/cli-win32-arm64": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.6.9.tgz", + "integrity": "sha512-4yvNG4nQGJsJA/PTVAt8IBFXvY6hXk4UdjtPlTf4QTMIjH7ysOwBew78bKThkRv1eyRwH2mGLIk4lAZp8tfAdw==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", + "license": "MIT OR Apache-2.0", "optional": true, "os": [ "win32" ], - "peer": true, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=14.21.3" } }, - "node_modules/@rolldown/binding-win32-x64-msvc": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.19.tgz", - "integrity": "sha512-y/sqRRc6d7hECzOFc5n3LSeqctmIp9mMjY1Kq4s14uLPd/LZ4z7i1zrW6fMtp2mPeuQIC4e6ULMcwQzMomqQag==", + "node_modules/@biomejs/cli-win32-x64": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.6.9.tgz", + "integrity": "sha512-mwarNc4GEg5JknsRaJDyJDFr4kICD7snsGM8yYFOoIHimSU1ekWNbcZ44QDa6/30fUZC9077wbBpXE8fp03aug==", "cpu": [ "x64" ], "dev": true, - "license": "MIT", + "license": "MIT OR Apache-2.0", "optional": true, "os": [ "win32" ], - "peer": true, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=14.21.3" } }, - "node_modules/@rolldown/pluginutils": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.1.1.tgz", - "integrity": "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==", + "node_modules/@cacheable/memory": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@cacheable/memory/-/memory-2.2.0.tgz", + "integrity": "sha512-CTLKqLItRCEixEAewD3/j9DB3/o96gpTPD4eJ1v+DGOlxZRZncRQkGYqqnAGCscYd6RNeXfGeiuCphsPtqyIfQ==", "dev": true, "license": "MIT", - "peer": true + "dependencies": { + "@cacheable/utils": "^2.5.0", + "@keyv/bigmap": "^1.3.1", + "hookified": "^1.15.1", + "keyv": "^5.6.0" + } }, - "node_modules/@tybys/wasm-util": { - "version": "0.10.5", - "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.5.tgz", - "integrity": "sha512-dOGOPxlaNV+G046mZzN+9C0dAcQZeSKcXiVaM0TYy/LM4ttTmgSBDxYfovcYI8Em3+eAbiAYpvWLOv8+ZVRJKA==", + "node_modules/@cacheable/utils": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/@cacheable/utils/-/utils-2.5.0.tgz", + "integrity": "sha512-buipgOVDkkPXNR5+xBpDw7Zk2n1EvU7qBJCNUcL7rhQ//kfpOXPAvQ511Os0vpLYJ1pZnvudNytkQt2hst3wqA==", "dev": true, "license": "MIT", - "optional": true, - "peer": true, "dependencies": { - "tslib": "^2.4.0" + "hashery": "^1.5.1", + "keyv": "^5.6.0" } }, - "node_modules/@types/chai": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", - "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "node_modules/@emnapi/core": { + "version": "2.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-2.0.0-beta.2.tgz", + "integrity": "sha512-MzCVoWtcg4Pm2B3je5mMvYMvj3MmBKw+fU7vbsJc9/iT8ip6/eYIHo/Dsm/mr+wsHB6SEyJDuxB09Yy6r/8+4A==", "dev": true, "license": "MIT", + "optional": true, + "peer": true, "dependencies": { - "@types/deep-eql": "*", - "assertion-error": "^2.0.1" + "@emnapi/wasi-threads": "2.2.0", + "tslib": "^2.4.0" } }, - "node_modules/@types/deep-eql": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", - "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "node_modules/@emnapi/runtime": { + "version": "2.0.0-beta.2", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-2.0.0-beta.2.tgz", + "integrity": "sha512-JcrSPzPvZuNZvJqPTF9Fw25LbOJ8avzFVlaf2grmH4Cku0oGP47tRgqPZadcfj3YoZMHkFVnCYFbQM8I+i5QEw==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.4.0" + } }, - "node_modules/@types/estree": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", - "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "node_modules/@emnapi/wasi-threads": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-2.2.0.tgz", + "integrity": "sha512-JP7OYH38Q7+pyTAe14raZHLQIK7BDKbdwji+Xi3pcd/6QkJYQH3SX4wu6EplGrGJWRepoNzedfm0G3B9Z4e9Rw==", "dev": true, - "license": "MIT" + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.4.0" + } }, - "node_modules/@vitest/coverage-v8": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-5.1.1.tgz", - "integrity": "sha512-xL4NkbVx/UqqDHaXSOyvB8qsSoLQ+dVNGR9H2Bh/4ggQtmaPFNPUC9gZQwKZePLOQ6WDcgwXVnPulFW9eCHt0w==", + "node_modules/@eslint-community/eslint-utils": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.10.1.tgz", + "integrity": "sha512-cuadcxVFE8sDK6iWJbs8Sn0av2Nrh2QSGQhVlBW9AaAHqHwjWsZHT8LJ4hFGPh7ASBV2deFdM7H/DPjulmh8rg==", "dev": true, "license": "MIT", "dependencies": { - "@bcoe/v8-coverage": "^1.0.2", - "@vitest/istanbul-lib-coverage": "^2.1.0", - "@vitest/istanbul-lib-report": "^2.1.0", - "ast-v8-to-istanbul": "^1.0.7", - "magicast": "^0.5.5", - "obug": "^3.0.0", - "std-env": "^4.3.0", - "tinyrainbow": "^3.2.0" + "eslint-visitor-keys": "^3.4.3" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, "funding": { - "url": "https://opencollective.com/vitest" + "url": "https://opencollective.com/eslint" }, "peerDependencies": { - "@vitest/browser": "5.1.1", - "vitest": "5.1.1" + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, - "peerDependenciesMeta": { - "@vitest/browser": { - "optional": true - } + "funding": { + "url": "https://opencollective.com/eslint" } }, - "node_modules/@vitest/istanbul-lib-coverage": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-coverage/-/istanbul-lib-coverage-2.1.0.tgz", - "integrity": "sha512-WOjuS+xcjSIy7ruYBQ+9BUcV7XZQ0FyVcbWbWxW9TRx/kLGx5SQaeFRIFDJxjNplb6YsT7SpKo2zuXXUo91OIQ==", + "node_modules/@eslint-community/regexpp": { + "version": "4.12.4", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.4.tgz", + "integrity": "sha512-1qH3WeISXHFS8P3QI0lntHlMrlfTh1OarxlRbPNDEkSCqoyXC3apBE7MDyRKOL8HpuW48aQtff30wvEFww/4ww==", "dev": true, "license": "MIT", "engines": { - "node": ">=22" + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, - "node_modules/@vitest/istanbul-lib-report": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-report/-/istanbul-lib-report-2.1.0.tgz", - "integrity": "sha512-+ZFta25nWtGCOBG9/IET8w1RO5Oawsd6H8Uf6AJ9EA/StFuKVtKAEJEJ6uRt84OH+T4YkI0ASmIHAhRA+0KVxw==", + "node_modules/@eslint/config-array": { + "version": "0.23.7", + "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.23.7.tgz", + "integrity": "sha512-Ix1tmZjA7/OmE7ROAfORe83hVnqlDzLpZVHFjHQt5mvLm1U03qMexpaxKqFIL362QV32SoPaZqmKQr3tdqFY2w==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@vitest/istanbul-lib-coverage": "2.1.0" + "@eslint/object-schema": "^3.0.5", + "debug": "^4.3.1", + "minimatch": "^11.0.5" }, "engines": { - "node": ">=22" + "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/@vitest/mocker": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.1.1.tgz", - "integrity": "sha512-b2OgTB4+3ImWIVafXKazJXwLKwQxUNnix6b3xUvUTMh7RyXlrtzoxfZr8aEz9zkHOMAS4K5lu3TvFWoiVeVTQg==", + "node_modules/@eslint/config-helpers": { + "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": "MIT", + "license": "Apache-2.0", "dependencies": { - "@jridgewell/trace-mapping": "0.3.31", - "@vitest/spy": "5.1.1", - "estree-walker": "^3.0.3", - "magic-string": "^1.4.5" - }, - "funding": { - "url": "https://opencollective.com/vitest" - }, - "peerDependencies": { - "msw": "^2.4.9 || ^3.0.0", - "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@eslint/core": "^1.2.1" }, - "peerDependenciesMeta": { - "msw": { - "optional": true - }, - "vite": { - "optional": true - } + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/@vitest/spy": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.1.1.tgz", - "integrity": "sha512-6K8C6alQG1/Yc8/ZI22iJS7JEsxPdVzqtqDq+/xM4Z0mGVykemMVjLhqMy/q6/IHYG3kKD8hKSwRen/ZdyI9vQ==", + "node_modules/@eslint/core": { + "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": "MIT", - "funding": { - "url": "https://opencollective.com/vitest" + "license": "Apache-2.0", + "dependencies": { + "@types/json-schema": "^7.0.15" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/assertion-error": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", - "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "node_modules/@eslint/object-schema": { + "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": "MIT", + "license": "Apache-2.0", "engines": { - "node": ">=12" + "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/ast-v8-to-istanbul": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.8.tgz", - "integrity": "sha512-lPdpagk13ANXV+HClJEpCZM7kUsl5XcvgqKzZhaj6Ve1ZFICcY2sGhAN1n1vT0tML6EclT7bfVgTxqL57Gkpow==", + "node_modules/@eslint/plugin-kit": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.7.3.tgz", + "integrity": "sha512-IkO+/KEUvwbVpiURZg+P7zF74z5Jxe0UgJxVni+RtoHQ6IZieXaO02kmadomap/q+l6bc/jdPGGqTjhuZnuz1Q==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.31", - "estree-walker": "^3.0.3", - "js-tokens": "^10.0.0" + "@eslint/core": "^1.2.1", + "levn": "^0.4.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" } }, - "node_modules/chai": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz", - "integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==", + "node_modules/@humanfs/core": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.2.tgz", + "integrity": "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==", "dev": true, - "license": "MIT", + "license": "Apache-2.0", + "dependencies": { + "@humanfs/types": "^0.15.0" + }, "engines": { - "node": ">=18" + "node": ">=18.18.0" } }, - "node_modules/detect-libc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", - "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "node_modules/@humanfs/node": { + "version": "0.16.8", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.8.tgz", + "integrity": "sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==", "dev": true, "license": "Apache-2.0", - "peer": true, + "dependencies": { + "@humanfs/core": "^0.19.2", + "@humanfs/types": "^0.15.0", + "@humanwhocodes/retry": "^0.4.0" + }, "engines": { - "node": ">=8" + "node": ">=18.18.0" } }, - "node_modules/es-module-lexer": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", - "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", + "node_modules/@humanfs/types": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@humanfs/types/-/types-0.15.0.tgz", + "integrity": "sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==", "dev": true, - "license": "MIT" + "license": "Apache-2.0", + "engines": { + "node": ">=18.18.0" + } }, - "node_modules/estree-walker": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", - "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, - "license": "MIT", - "dependencies": { - "@types/estree": "^1.0.0" + "license": "Apache-2.0", + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/expect-type": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", - "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "node_modules/@humanwhocodes/retry": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, "license": "Apache-2.0", "engines": { - "node": ">=12.0.0" + "node": ">=18.18" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" } }, - "node_modules/fdir": { - "version": "6.5.0", - "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", - "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.6.0.tgz", + "integrity": "sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==", "dev": true, "license": "MIT", "engines": { - "node": ">=12.0.0" - }, - "peerDependencies": { - "picomatch": "^3 || ^4" + "node": ">=12" }, - "peerDependenciesMeta": { - "picomatch": { - "optional": true - } + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, - "hasInstallScript": true, "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/js-tokens": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz", - "integrity": "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==", + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", "dev": true, "license": "MIT" }, - "node_modules/lightningcss": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", - "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "dev": true, - "license": "MPL-2.0", - "peer": true, + "license": "MIT", "dependencies": { - "detect-libc": "^2.0.3" + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" }, "engines": { - "node": ">= 12.0.0" + "node": ">=12" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" - }, - "optionalDependencies": { - "lightningcss-android-arm64": "1.33.0", - "lightningcss-darwin-arm64": "1.33.0", - "lightningcss-darwin-x64": "1.33.0", - "lightningcss-freebsd-x64": "1.33.0", - "lightningcss-linux-arm-gnueabihf": "1.33.0", - "lightningcss-linux-arm64-gnu": "1.33.0", - "lightningcss-linux-arm64-musl": "1.33.0", - "lightningcss-linux-x64-gnu": "1.33.0", - "lightningcss-linux-x64-musl": "1.33.0", - "lightningcss-win32-arm64-msvc": "1.33.0", - "lightningcss-win32-x64-msvc": "1.33.0" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lightningcss-android-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", - "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", - "cpu": [ - "arm64" - ], + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.2.0.tgz", + "integrity": "sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==", "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "android" - ], - "peer": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^6.2.2" + }, "engines": { - "node": ">= 12.0.0" + "node": ">=12" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "url": "https://github.com/chalk/strip-ansi?sponsor=1" } }, - "node_modules/lightningcss-darwin-arm64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", - "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", - "cpu": [ - "arm64" - ], + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, "engines": { - "node": ">= 12.0.0" + "node": ">=12" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" } }, - "node_modules/lightningcss-darwin-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", - "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", - "cpu": [ - "x64" - ], + "node_modules/@isaacs/nonrecursive-glob-match": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.1.0.tgz", + "integrity": "sha512-GPm/Dbvk5RLmhRnxXIa7nTpK0xtl4E0wj0MslsuNiJ1FIROU+2+9lgUC/dgF7Ey4QCWhfEsgxilMRMCdHPfDfw==", "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "darwin" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" + "license": "BlueOak-1.0.0" + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "engines": { + "node": ">=8" } }, - "node_modules/lightningcss-freebsd-x64": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", - "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", - "cpu": [ - "x64" - ], + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "engines": { + "node": ">=8" } }, - "node_modules/lightningcss-linux-arm-gnueabihf": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", - "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", - "cpu": [ - "arm" - ], + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "engines": { + "node": ">=8" } }, - "node_modules/lightningcss-linux-arm64-gnu": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", - "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", - "cpu": [ - "arm64" - ], + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", "dev": true, - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "peer": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, "engines": { - "node": ">= 12.0.0" + "node": ">=6" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lightningcss-linux-arm64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", - "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", - "cpu": [ - "arm64" - ], + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", "dev": true, - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "engines": { + "node": ">=8" } }, - "node_modules/lightningcss-linux-x64-gnu": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", - "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", - "cpu": [ - "x64" - ], + "node_modules/@istanbuljs/schema": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.6.tgz", + "integrity": "sha512-+Sg6GCR/wy1oSmQDFq4LQDAhm3ETKnorxN+y5nbLULOR3P0c14f2Wurzj3/xqPXtasLFfHd5iRFQ7AJt4KH2cw==", "dev": true, - "libc": [ - "glibc" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "peer": true, + "license": "MIT", "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "node": ">=8" } }, - "node_modules/lightningcss-linux-x64-musl": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", - "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", - "cpu": [ - "x64" - ], + "node_modules/@jest/console": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-30.5.2.tgz", + "integrity": "sha512-e8sQC4pCMHPBrPX7Hk8TJr+DM5dkUnImSTNag8SEWFAFAF6xIz4AJvCKapnrdHnZxep4bxw4PhG+ZbimYBMyKw==", "dev": true, - "libc": [ - "musl" - ], - "license": "MPL-2.0", - "optional": true, - "os": [ - "linux" - ], - "peer": true, - "engines": { - "node": ">= 12.0.0" + "license": "MIT", + "dependencies": { + "@jest/types": "30.5.1", + "@types/node": "*", + "chalk": "^4.1.2", + "jest-message-util": "30.5.1", + "jest-util": "30.5.1", + "slash": "^3.0.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/lightningcss-win32-arm64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", - "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", - "cpu": [ - "arm64" - ], + "node_modules/@jest/core": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-30.5.2.tgz", + "integrity": "sha512-/jqvFWoJF7LV1a6AUpYMbMm+2yIYsHJfR474H0SCzr9k8tnO/jl9wRg6zSG6lxgf6EozNlCG4amFzWsbZSvvZA==", "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "peer": true, + "license": "MIT", + "dependencies": { + "@jest/console": "30.5.2", + "@jest/pattern": "30.5.0", + "@jest/reporters": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", + "@types/node": "*", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "exit-x": "^0.2.2", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.11", + "jest-changed-files": "30.5.1", + "jest-config": "30.5.2", + "jest-haste-map": "30.5.1", + "jest-message-util": "30.5.1", + "jest-regex-util": "30.5.0", + "jest-resolve": "30.5.1", + "jest-resolve-dependencies": "30.5.2", + "jest-runner": "30.5.2", + "jest-runtime": "30.5.2", + "jest-snapshot": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", + "jest-watcher": "30.5.2", + "pretty-format": "30.5.1", + "slash": "^3.0.0" + }, "engines": { - "node": ">= 12.0.0" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } } }, - "node_modules/lightningcss-win32-x64-msvc": { - "version": "1.33.0", - "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", - "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", - "cpu": [ - "x64" - ], + "node_modules/@jest/diff-sequences": { + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/diff-sequences/-/diff-sequences-30.5.0.tgz", + "integrity": "sha512-OsqBjHXCn8cadasoAZBP6nWYvMsRhpMzGXTpxJ5aO04NlbdhIz+FVe3q49l0AwVhsz/cEmIpBes6gAFl1/dWQg==", "dev": true, - "license": "MPL-2.0", - "optional": true, - "os": [ - "win32" - ], - "peer": true, + "license": "MIT", "engines": { - "node": ">= 12.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/parcel" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/magic-string": { - "version": "1.4.5", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", - "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==", + "node_modules/@jest/environment": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-30.5.2.tgz", + "integrity": "sha512-nwFPOUMbmsjNNRCpnJpB9HbSZu4C07wDDds++5j+j1MezzPLxMPDdbdUVjr2o4RULDOValnDd70taPFI1EtxAg==", "dev": true, "license": "MIT", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.6.0" + "@jest/fake-timers": "30.5.2", + "@jest/types": "30.5.1", + "@types/node": "*", + "jest-mock": "30.5.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/magicast": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.5.tgz", - "integrity": "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==", + "node_modules/@jest/expect": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/expect/-/expect-30.5.2.tgz", + "integrity": "sha512-2E+1Pg6jJxbRjLNLpciC71iri/3qsKJL222/aXJEFwC0VdUSvfS+JZQQLEVjUYYc8t8pQu2MGE3cF2+bNTYRsg==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.29.7", - "@babel/types": "^7.29.7", - "source-map-js": "^1.2.1" + "expect": "30.5.2", + "jest-snapshot": "30.5.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/nanoid": { - "version": "3.3.20", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", - "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "node_modules/@jest/expect-utils": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/expect-utils/-/expect-utils-30.5.2.tgz", + "integrity": "sha512-d/HOLSrJUlBIl6n3LzOa7cjW3xdePm5H5gQw2lixZ/0h157l9sw3mLblzFqnPcTbhDzhRQdBOX3A3KcG73nm5Q==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], "license": "MIT", - "peer": true, - "bin": { - "nanoid": "bin/nanoid.cjs" + "dependencies": { + "@jest/get-type": "30.5.0" }, "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, - "node_modules/obug": { - "version": "3.0.0", + "node_modules/@jest/fake-timers": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/fake-timers/-/fake-timers-30.5.2.tgz", + "integrity": "sha512-GKk0h0tKT5SpDPxDhPg3r9mm5s8/YCBzVNMOGdRiQXwUiMsjU10mVPlMaQstH6/cu50vOb8N9oQUMETHuwwxKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.5.1", + "@sinonjs/fake-timers": "^15.4.0", + "@types/node": "*", + "jest-message-util": "30.5.1", + "jest-mock": "30.5.2", + "jest-util": "30.5.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/get-type": { + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/get-type/-/get-type-30.5.0.tgz", + "integrity": "sha512-9/2VUPitAjmBzbvDvqrxmvB7BzWsBW0WmkkojX1ODuxX1NLGxx9gfaZpHB0z8DtJ9uhGNmZG/VXBhf8uO0OV8Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/globals": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/globals/-/globals-30.5.2.tgz", + "integrity": "sha512-62zfS+dL+M5aTNHXCNLyqD+j4oqxTIzDYrZbpqMP8Yn+gvlAGyzC6BSPNb1ZmFOakV1RtFYX/O3FCQXSWmQdgg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "30.5.2", + "@jest/expect": "30.5.2", + "@jest/types": "30.5.1", + "jest-mock": "30.5.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/pattern": { + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/pattern/-/pattern-30.5.0.tgz", + "integrity": "sha512-HdNQYSdRTEBNrginaqzQtTjG0HRMfrra/z6Ok7uL3S87vSlarIVohEsJsSj5edu3MiHoHjAkvPROz5ZjoKai+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "jest-regex-util": "30.5.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/react-is-18": { + "name": "react-is", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz", + "integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/react-is-19": { + "name": "react-is", + "version": "19.3.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-19.3.1.tgz", + "integrity": "sha512-RRieF6IyxQBkcK6pP8xOHprLTPW6QjRkbGdImtqNme+/hYVwCZkLQLdlZGOhUqXwkS9IEynaGvPJtv6XB/cz0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/reporters": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/reporters/-/reporters-30.5.2.tgz", + "integrity": "sha512-ev6E9iG73twQcfAfoTnviuYkr3yOrYbzAtMFCimv2fxHXPIp9PBt2u1wNMt0aYWgl8FPwIcS8oqRJg6alnht4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@jest/console": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", + "@jridgewell/trace-mapping": "^0.3.31", + "@types/node": "*", + "chalk": "^4.1.2", + "collect-v8-coverage": "^1.0.2", + "exit-x": "^0.2.2", + "glob": "^13.0.6", + "graceful-fs": "^4.2.11", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-instrument": "^6.0.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^5.0.0", + "istanbul-reports": "^3.1.3", + "jest-message-util": "30.5.1", + "jest-util": "30.5.1", + "jest-worker": "30.5.1", + "slash": "^3.0.0", + "string-length": "^4.0.2", + "v8-to-istanbul": "^9.0.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/@jest/reporters/node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jest/schemas": { + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/@jest/schemas/-/schemas-30.5.0.tgz", + "integrity": "sha512-/hunigyNpc4RCjC0VaW3f5RCUZVM2+WQ65qP7z083Gmvac7or2LI50XVNOtE4YPgBpV0yxYiAgorAPGniCoJmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@sinclair/typebox": "^0.34.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/snapshot-utils": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/@jest/snapshot-utils/-/snapshot-utils-30.5.1.tgz", + "integrity": "sha512-V3wnxNtiVmw5PPVg433Cn3VdXnsOeu/ofLw3KC04Bn2y1wIlU5kozXQn48rhrgj/02LrCVtntTEF1yBha0XSUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.5.1", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "natural-compare": "^1.4.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/source-map": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/source-map/-/source-map-30.5.2.tgz", + "integrity": "sha512-c5CehvkbfHX6yyNg7bMn2ylqlp9AHXuZ/3hPH/Lh5bxD/vefd/lV9HBjMqXef9yQNqkdwyZvkLSVSwB38hy8Qw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.31", + "callsites": "^3.1.0", + "convert-source-map": "^2.0.0", + "graceful-fs": "^4.2.11" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/test-result": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/test-result/-/test-result-30.5.2.tgz", + "integrity": "sha512-eO6YU5rsLfs60ne694e0IAmRgeBnoA8mu0nlxXDbl/1j5km0o2vO9/VbbUIKIH+WRKKEI+ELgwraRGn2Lhep8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "30.5.2", + "@jest/types": "30.5.1", + "@types/istanbul-lib-coverage": "^2.0.6", + "collect-v8-coverage": "^1.0.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/test-sequencer": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/test-sequencer/-/test-sequencer-30.5.2.tgz", + "integrity": "sha512-bmij8jZyYAC47ExT2GeP7PcrlwSNS+Bp3KeRuBH88gpcxqDv6fljN8PemS4J/lLZ79xb6mpaennQTTq0zUAVVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "30.5.2", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.5.1", + "slash": "^3.0.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/transform": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/@jest/transform/-/transform-30.5.2.tgz", + "integrity": "sha512-LBGwmaE886C41jDZ65eqR1YbXM7642MK3ZhTowZd5+xDlrDLuf4ePuDdDmVSvcr8NTVJ3MqxLkMbUCzuigUaoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.27.4", + "@jest/types": "30.5.1", + "@jridgewell/trace-mapping": "^0.3.31", + "babel-plugin-istanbul": "^8.0.0", + "chalk": "^4.1.2", + "convert-source-map": "^2.0.0", + "fast-json-stable-stringify": "^2.1.0", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.5.1", + "jest-regex-util": "30.5.0", + "jest-util": "30.5.1", + "pirates": "^4.0.7", + "slash": "^3.0.0", + "write-file-atomic": "^5.0.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jest/types": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/@jest/types/-/types-30.5.1.tgz", + "integrity": "sha512-LvVYn83nnXPl+Rg98nvcFgjx6nRMTArhSn6RAX/w3ELn54S8A42TYZvsCMdGUqTM8S0wyXbtlQdU6Hi6dykj9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/pattern": "30.5.0", + "@jest/schemas": "30.5.0", + "@types/istanbul-lib-coverage": "^2.0.6", + "@types/istanbul-reports": "^3.0.4", + "@types/node": "*", + "@types/yargs": "^17.0.33", + "chalk": "^4.1.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz", + "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@keyv/bigmap": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/@keyv/bigmap/-/bigmap-1.3.1.tgz", + "integrity": "sha512-WbzE9sdmQtKy8vrNPa9BRnwZh5UF4s1KTmSK0KUVLo3eff5BlQNNWDnFOouNpKfPKDnms9xynJjsMYjMaT/aFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hashery": "^1.4.0", + "hookified": "^1.15.0" + }, + "engines": { + "node": ">= 18" + }, + "peerDependencies": { + "keyv": "^5.6.0" + } + }, + "node_modules/@keyv/serialize": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@keyv/serialize/-/serialize-1.1.1.tgz", + "integrity": "sha512-dXn3FZhPv0US+7dtJsIi2R+c7qWYiReoEh5zUntWCf4oSpMNib8FDhSoed6m3QyZdx5hK7iLFkYk3rNxwt8vTA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@napi-rs/wasm-runtime": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.6.tgz", + "integrity": "sha512-mRyDmEw9/fCDXCGfL1sbgIw/GUK0PVxRW4YwgPN61F3LQ+fSyoBFarJVzgGyhF6kRzEQZ0FejDqm4WLXSeqQmw==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@tybys/wasm-util": "^0.10.3" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/Brooooooklyn" + }, + "peerDependencies": { + "@emnapi/core": "^1.7.1 || 2.0.0-beta.2", + "@emnapi/runtime": "^1.7.1 || 2.0.0-beta.2" + } + }, + "node_modules/@oxc-project/types": { + "version": "0.156.0", + "resolved": "https://registry.npmjs.org/@oxc-project/types/-/types-0.156.0.tgz", + "integrity": "sha512-1Duyg48TdJNdyhEB8Xn1L36bT9Pv6GUtlKjHxOys8xkaF/rQq3XJE+bAurSK/AgIz5mGFsb77cn9Pb20+WCScw==", + "dev": true, + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/oxc-project" + } + }, + "node_modules/@parcel/watcher": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher/-/watcher-2.6.0.tgz", + "integrity": "sha512-7FNeNl8NCE7aINx7WXiKQrPYZWC/hvrTsmk6zmxbI7LTXE7hVek/n8AfVgpe2y82zl3w0HvCHN0bVKMBoJcC0w==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.3", + "is-glob": "^4.0.3", + "node-addon-api": "^7.0.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "@parcel/watcher-android-arm64": "2.6.0", + "@parcel/watcher-darwin-arm64": "2.6.0", + "@parcel/watcher-darwin-x64": "2.6.0", + "@parcel/watcher-freebsd-x64": "2.6.0", + "@parcel/watcher-linux-arm-glibc": "2.6.0", + "@parcel/watcher-linux-arm-musl": "2.6.0", + "@parcel/watcher-linux-arm64-glibc": "2.6.0", + "@parcel/watcher-linux-arm64-musl": "2.6.0", + "@parcel/watcher-linux-x64-glibc": "2.6.0", + "@parcel/watcher-linux-x64-musl": "2.6.0", + "@parcel/watcher-win32-arm64": "2.6.0", + "@parcel/watcher-win32-x64": "2.6.0" + } + }, + "node_modules/@parcel/watcher-android-arm64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.6.0.tgz", + "integrity": "sha512-trgpLSCKRC/huFjXX/Smh+0sWe4+YtKfktIToiMl59ghz7z+qkH6kMvNnUbLyRs9N11t8l4svSCs1+5B3rOAhA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-arm64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-arm64/-/watcher-darwin-arm64-2.6.0.tgz", + "integrity": "sha512-Y3QV0gl7Q1zbfueunkWIERICbEojQFCgpyG7YqOGNFLsckXyI1xu9mAIUpKY9QBYzBtSkN8dBPwd3yiAO9ovMw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-darwin-x64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-darwin-x64/-/watcher-darwin-x64-2.6.0.tgz", + "integrity": "sha512-Ohv6OpzhUfKYD7Beb8kDvG0jbIxORCYY1JRdZnaBtnjjkJxgD7ZVL0nw2sCYd0yTMKTvz3nnTnOF3cDifK+kvw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-freebsd-x64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-freebsd-x64/-/watcher-freebsd-x64-2.6.0.tgz", + "integrity": "sha512-5HmXvDgs8VK+74jF9y9/2FE3/OnlcKmc56tjmSrEuZjpSZOGL+fvAu+HKJBdPs9uwoP2hE6TlSUpXZ/C5jUFmQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-glibc": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-glibc/-/watcher-linux-arm-glibc-2.6.0.tgz", + "integrity": "sha512-Ps/hui3A+vMbjdqlqAowK2ZL8+BO8dBjxeWXj6npTBs3jx4wWmbPpaLuqwrQrSqIVMCnpWo238bJ1U37GhQOYg==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm-musl": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm-musl/-/watcher-linux-arm-musl-2.6.0.tgz", + "integrity": "sha512-9c6AUHgHoG+IY88MRIHupztQiQnrbqHYQjkM2btA+Bf/wQnQMuiD0Wfk1EVv3TlNT3x41uU71rn6E4xh/+zvkw==", + "cpu": [ + "arm" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-glibc": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-glibc/-/watcher-linux-arm64-glibc-2.6.0.tgz", + "integrity": "sha512-yHRqS2owEXe6Hic9z6Mh1ECsCd+ODVOGvZDyciqRd21+v+o+DnXMOrw50DSpIG2sb8GPEaPPmfeCAWKPJdq46g==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-arm64-musl": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-arm64-musl/-/watcher-linux-arm64-musl-2.6.0.tgz", + "integrity": "sha512-WhB2e/V7rqdHHWZusBSPuy5Ei8S6lSz6FE5TKKQz5h3a0O+C+mhY7vxU9b/stqvMb8beLnPY82ZrFTLKs+SrKA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-glibc": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-glibc/-/watcher-linux-x64-glibc-2.6.0.tgz", + "integrity": "sha512-ulGE6x6Oz6iAwg75T8YQSoguBWasniIbX+QWpaYPcCnDOpdWX3k+4xbEYPZVLxOuoJI+svJJPD3sEj8G7lrQ3A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-linux-x64-musl": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-linux-x64-musl/-/watcher-linux-x64-musl-2.6.0.tgz", + "integrity": "sha512-tkBYKt7YQrjIJWYDnto2YgO8MRkjlMTSNoRHzsXinBqbLdeOM3L32wPZJvIZxqaLMfSlS/4sUjH/6STVP/XDLw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-arm64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-arm64/-/watcher-win32-arm64-2.6.0.tgz", + "integrity": "sha512-gIZAP23jaHjGWasY/TY6yL7NHFClf0Ga7FN+iINvk+KN94rhm94lYZhFsbYFNcA04/onvGD9kKmiJLJB2HbNwQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@parcel/watcher-win32-x64": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/@parcel/watcher-win32-x64/-/watcher-win32-x64-2.6.0.tgz", + "integrity": "sha512-cA+/pXV2YkfxlIcXOQ5fSWqAzzPyD78/x5qbK/I0vUkrlYHA8TIz+MXjAbGouguKVSI4bOmkTSJ1/poVSsgt+A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 10.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "license": "MIT", + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pkgr/core": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.3.6.tgz", + "integrity": "sha512-SEeaJLb3qBNF/OaXnaR1NmmBbFYk1zC0ZH/52fATcRPLFg/p791YrcyFFy44Bo9sLaGuSuLp5Q6axbb/O+v/RA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/pkgr" + } + }, + "node_modules/@rolldown/binding-android-arm-eabi": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm-eabi/-/binding-android-arm-eabi-1.2.19.tgz", + "integrity": "sha512-e+Ebe0WT+9tbXmNKPIiC8YrWAHYwug3m6i4p3rZGGulfZri1jtI4HslT+OZnFf/OIHowWF71DTlHwXBP2SiA7A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-android-arm64": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-android-arm64/-/binding-android-arm64-1.2.19.tgz", + "integrity": "sha512-hOombrTJ+szt2ciEzS7oCA78lMPBgF5UMQWCJIyNfnrI7GLl8HYoFqCnpL2gcPOaXMqryGCU5ExdQKyDDcC+yA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-arm64": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-arm64/-/binding-darwin-arm64-1.2.19.tgz", + "integrity": "sha512-XoMA2pwCKGTQzUjPgtRwkedH4WmXhdIPKT6l6oOxd1PUbNodGI6DcBekgN7EC//+x3pfBYX/qL1gNmZAqivw5g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-darwin-x64": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-darwin-x64/-/binding-darwin-x64-1.2.19.tgz", + "integrity": "sha512-zo8EsSSwMZCY/e+fRnGaX02YGgvJD0yvhNi/9hpGPA2MJ9ZF8dPCw75UGfpI6OpQ/myR/dIYmogRvqiZD0TrXg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-freebsd-x64": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-freebsd-x64/-/binding-freebsd-x64-1.2.19.tgz", + "integrity": "sha512-O8ISAOfI1nj7AuBPd30FSF47z7f7lzlk5poQVGgiikvQuGEBFYvW8ki+UEnT+YJPnNGjQzn304klt4O9FUE7mA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm-gnueabihf": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm-gnueabihf/-/binding-linux-arm-gnueabihf-1.2.19.tgz", + "integrity": "sha512-/lYCba5NO0yq4S0jGMH8QTBtkvQxoXjoQWzF5BcWp9MjB9jxVRD1GQDNofkVjcOj30DWyhLIN/4Oe60JKzaONw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-gnu": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-gnu/-/binding-linux-arm64-gnu-1.2.19.tgz", + "integrity": "sha512-pm/apFMBnSbFb3O6nG5pHO1iqHhZrjGDFEjSm+ot9J17XXPvH9L90y5h+jgfHCE+Qdlsvy8qKEcU4VKxgjD+vA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-arm64-musl": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-arm64-musl/-/binding-linux-arm64-musl-1.2.19.tgz", + "integrity": "sha512-K1SmQp3FFichn8oqrNIwvFoZ5wcvjC7goBzpaMNvLf9FZc+QB/QvLmnpJZgAAGHiD980tP8FZZnXk2K94rvlxg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-ppc64-gnu": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-ppc64-gnu/-/binding-linux-ppc64-gnu-1.2.19.tgz", + "integrity": "sha512-I0xwD57jP/3A7+5UPZin2w8Y7XHEmEM5zqpYZOcQ45MlNW6tUJUziymV3yRr7rL4vwyfEcRsRksC4a7Kc08p5Q==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-s390x-gnu": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-s390x-gnu/-/binding-linux-s390x-gnu-1.2.19.tgz", + "integrity": "sha512-BrtEHT24SNXj9HiXqy+s/kXiSiQGt6EKCPUlRirAoIioVxKGnbXBUEkbZASAei7iZJB0/Ynm+0JP00Ipx7AnSw==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-gnu": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-gnu/-/binding-linux-x64-gnu-1.2.19.tgz", + "integrity": "sha512-rm75/9DkHKeU2WnA8w4X94WGYgLlDCFCfkQC+4bguVJmC/jvDRv2B+2wLOYhyE0fVuv7//Ckk39OoOufyCu76Q==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-linux-x64-musl": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-linux-x64-musl/-/binding-linux-x64-musl-1.2.19.tgz", + "integrity": "sha512-irh/4+iYFM4GAzpluDErgjz89bj6NDtqqMAG/6O1LG38Ed3NpyebzCpcVNkFW8uhy+/3/BocUvnXDR33CXWe9A==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-openharmony-arm64": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-openharmony-arm64/-/binding-openharmony-arm64-1.2.19.tgz", + "integrity": "sha512-+KWTWNoPt+CfSq94CiceWu3yPE+QzkaG+phPyz9G60tmZLwfQkcA4AeksafzvJAw4pvg1mcd5a1TkUqVv0s4JA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-wasm32-wasi": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-wasm32-wasi/-/binding-wasm32-wasi-1.2.19.tgz", + "integrity": "sha512-7EH+skOsl5qpWnK0vzamgJFhOv1cwxQpsxm8tI883K9fur5c27p8q87fzEO6BbBPabA2/+s/zR63/pLc137iOg==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "@emnapi/core": "2.0.0-beta.2", + "@emnapi/runtime": "2.0.0-beta.2", + "@napi-rs/wasm-runtime": "1.2.6" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=23.5.0" + } + }, + "node_modules/@rolldown/binding-win32-arm64-msvc": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-arm64-msvc/-/binding-win32-arm64-msvc-1.2.19.tgz", + "integrity": "sha512-3Q1Yg1Q7tEvBWoZf5rFvG/GKZQPgwfru+p4wBajDfJFBs0SHCpL++dfTjW9gyAKd1T7ZpIYvdaUax7Pa/IhFVQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/binding-win32-x64-msvc": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/@rolldown/binding-win32-x64-msvc/-/binding-win32-x64-msvc-1.2.19.tgz", + "integrity": "sha512-y/sqRRc6d7hECzOFc5n3LSeqctmIp9mMjY1Kq4s14uLPd/LZ4z7i1zrW6fMtp2mPeuQIC4e6ULMcwQzMomqQag==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": "^20.19.0 || >=22.12.0" + } + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.1.1.tgz", + "integrity": "sha512-glFIJDvLNDtJhT9qrMFWLPbvS+skxgt4L0K8Ei2YtnhPysAJnsI7nyxSJxKj4ADeKX0OLjC4ntRkwpLOoS3rwA==", + "dev": true, + "license": "MIT", + "peer": true + }, + "node_modules/@sinclair/typebox": { + "version": "0.34.52", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.52.tgz", + "integrity": "sha512-XiMQh7qqVlxZzcVD+kkGMNGMzcTrDMLWI7S4x7z1MkCkbDPrekpZXEUK0eZqZFMuHQg2a2DZOcDIh9o5v3Gonw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sinonjs/commons": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz", + "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "15.5.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.5.0.tgz", + "integrity": "sha512-i7HpIYIsUmdSTQbtBjs2b3VqMgDsVDWfzVPV3MuUrXVqJNZmzFB8YJeM9SPms2bGg5zg7HvKH31sPS1WoLLRFg==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^3.0.1" + } + }, + "node_modules/@tybys/wasm-util": { + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@tybys/wasm-util/-/wasm-util-0.10.5.tgz", + "integrity": "sha512-dOGOPxlaNV+G046mZzN+9C0dAcQZeSKcXiVaM0TYy/LM4ttTmgSBDxYfovcYI8Em3+eAbiAYpvWLOv8+ZVRJKA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/esrecurse": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@types/esrecurse/-/esrecurse-4.3.1.tgz", + "integrity": "sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.10.tgz", + "integrity": "sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/istanbul-lib-report": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-coverage": "*" + } + }, + "node_modules/@types/istanbul-reports": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/istanbul-lib-report": "*" + } + }, + "node_modules/@types/json-schema": { + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "26.6.11", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.11.tgz", + "integrity": "sha512-uUyQ2XLEz+EXh34lmS3GhKrkqn/8FU7KUiKRpk347At2bmnMVWss45yz8b4FG/tUtmV1tV/+TVkITItPROyeeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/@types/stack-utils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/yargs": { + "version": "17.0.35", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.35.tgz", + "integrity": "sha512-qUHkeCyQFxMXg79wQfTtfndEC+N9ZZg76HJftDJp+qH2tV7Gj4OJi7l+PiWwJ+pWtW8GwSmqsDj/oymhrTWXjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@ungap/structured-clone": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.4.0.tgz", + "integrity": "sha512-1mEZtMKPM09vDmQt5y7YvmN2+DFTP7Tg0EWXdic8/C6VRnpb33e4ghisCIE3WZjsE2N8mf+QV1Zqh7ZFYLWInQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/@unrs/resolver-binding-android-arm-eabi": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm-eabi/-/resolver-binding-android-arm-eabi-1.13.0.tgz", + "integrity": "sha512-60E5mvmIiW+i1E/HYeSX4iE4A8s9NJSGYPu7UM0DJght1c2tTkWwuyDyAwzsEXhKM/XbbndfnTiXdfrf27d2hw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-android-arm64": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-android-arm64/-/resolver-binding-android-arm64-1.13.0.tgz", + "integrity": "sha512-qlh/JR3Tuy1cJ7xtf5pR4ykvLiK6os7X7EL2+zXZbrVc/s+yB8DoFdQrCAW9/a2TOxPVbR7QVNpkPWh7UWIsEQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-arm64": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-arm64/-/resolver-binding-darwin-arm64-1.13.0.tgz", + "integrity": "sha512-yynnnnJXUC99WeD1GfvuXPKsKNfvgzGYC2eRayFnUfsHVROjqrbFOkFQLZiSx1H8+PLy5BzU8vqyPyLqbRfeBQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-darwin-x64": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-darwin-x64/-/resolver-binding-darwin-x64-1.13.0.tgz", + "integrity": "sha512-t8PXE0Ip9tmGyhRlfVsnEbzGM5iSvJIeNIXciUACjzpg0mmPs13fGv2x7W8sBa0S8zbIiohxKXS9fL/LXW/ERQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@unrs/resolver-binding-freebsd-x64": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-freebsd-x64/-/resolver-binding-freebsd-x64-1.13.0.tgz", + "integrity": "sha512-qdtl9GDWDoDx6rhzF4RU5SJutV3lcLOiTiyqD6nBxYfEO6lAgLNukfrA+HJ2u2OiyWvV8JW5iEWD3LoONw7lYA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-gnueabihf": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-gnueabihf/-/resolver-binding-linux-arm-gnueabihf-1.13.0.tgz", + "integrity": "sha512-VrMUVwdrScTarsh4B6aUhTtziUavSlglo4Hi8XZ6CpAe4+j3nquY+XoP+tYkiSBDsXZ8386ne4pv4YYYBNi02w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm-musleabihf": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm-musleabihf/-/resolver-binding-linux-arm-musleabihf-1.13.0.tgz", + "integrity": "sha512-zSbTVwaxiTC+zYJ9xVNTC6c+BYO/kOV/odcTI3bHuFFXa+XmjLoUkb/8UxsZeU5YF4K000m17wrXoTblNWuzOg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-gnu": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-gnu/-/resolver-binding-linux-arm64-gnu-1.13.0.tgz", + "integrity": "sha512-Z/Rax87moZHsuvJ8awdfP+zrMlsCt3d7mggUPIiPe32KpeagimyzJWnZSMQoV67an9uVQghyh92Pc0VprITnYA==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-arm64-musl": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-arm64-musl/-/resolver-binding-linux-arm64-musl-1.13.0.tgz", + "integrity": "sha512-oUzXz8hNvFLNEAag8lBKJe1euiV2dmGHAR+eQ5fNpsZO0F1K7IMRb4J6pqYsd7uLMRQNPiu5A1WKUJHbFLWbbw==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-loong64-gnu": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-gnu/-/resolver-binding-linux-loong64-gnu-1.13.0.tgz", + "integrity": "sha512-BxhGYvZBg0YrvNOeSEGR3eNklwXYy0mUJk7oeGJvZoQMKM68zYvbbf52+fQI3Le4X0fW276FTKIoTwjpMob80A==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-loong64-musl": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-loong64-musl/-/resolver-binding-linux-loong64-musl-1.13.0.tgz", + "integrity": "sha512-nZcIuup9Ar3gAlqoZfX/KW6x83TMI11tLpCjldZG5M1KeY8qNUPNJJ71+sPvG8HMBpoh+ix1pAm5gkMFvcSAcQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-ppc64-gnu": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-ppc64-gnu/-/resolver-binding-linux-ppc64-gnu-1.13.0.tgz", + "integrity": "sha512-AG6AgdDrkRNjAPwD/cftFJGgZUWCiJX+E8vpYCDEnwFHLTHZ7ppBiU6/vyPPwrfjcPUPQCDbbxE/eZUXsx49jQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-gnu": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-gnu/-/resolver-binding-linux-riscv64-gnu-1.13.0.tgz", + "integrity": "sha512-6vOqYGcAmzpRWpUURWutzvpf1qJ6eOu5cfYObdtPJnzZ0+Kw4cw+ZkZJqIYEh8fPuTBwSYDL/FwlUhma1G/JVQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-riscv64-musl": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-riscv64-musl/-/resolver-binding-linux-riscv64-musl-1.13.0.tgz", + "integrity": "sha512-4HeIn0S2KVUowK0A+EweXrDvZ8CKHEfTtif0kx9vt3ORNsqcXNFFIFnHE0tizma3/Gt5OGrU2ovYNuj+D/bN4g==", + "cpu": [ + "riscv64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-s390x-gnu": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-s390x-gnu/-/resolver-binding-linux-s390x-gnu-1.13.0.tgz", + "integrity": "sha512-JfkvqY7NZbxyhexLE+g6Z8Hsx4utHOGaVazAVghPiBn8Upw2iERZPpKYnW1FBVU4WStv/BiIsoK/Muke0E7asA==", + "cpu": [ + "s390x" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-gnu": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-gnu/-/resolver-binding-linux-x64-gnu-1.13.0.tgz", + "integrity": "sha512-iwjLeVdZo/8v5OKAeRIC+4VQV045t1EPZr5B/AVLgUQ04IdtNthWzg6not2cNjZgH2gHpSf4fOXMmN83aLO1FA==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-linux-x64-musl": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-linux-x64-musl/-/resolver-binding-linux-x64-musl-1.13.0.tgz", + "integrity": "sha512-TOh1fqOjyq1OPoht3BDLd7Y+HeMJRwd5g2VNmCQclknEbjp4py5GFRmT4L/rOybF5Af8q0LT9zHs2WGkwlqtrw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@unrs/resolver-binding-openharmony-arm64": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-openharmony-arm64/-/resolver-binding-openharmony-arm64-1.13.0.tgz", + "integrity": "sha512-3T2MNtF2dd1yjaXCVqrsi+/3VZeksEzU1hygPzqqkBLVVjn+2iJzXEkxxCKIVFrWnpmEbazeHJp/ruYD0RUVWA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@unrs/resolver-binding-win32-arm64-msvc": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-arm64-msvc/-/resolver-binding-win32-arm64-msvc-1.13.0.tgz", + "integrity": "sha512-hKWfSLiN3L4cIxg0jrpyP/66AXLTcyD37jmSn//rGdOUYGlizYxTEFdJ+GZbp2NnaML3YS/A73nCysze8FaJdg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-ia32-msvc": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-ia32-msvc/-/resolver-binding-win32-ia32-msvc-1.13.0.tgz", + "integrity": "sha512-N4gDKkDoiyIQEcn3vTqe2ksRxUAtBvQ8c5TiT+WonSa6FHgCAY5+RggnZ134hXJoRj57JEjv4/m+i/pAKHWrTQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@unrs/resolver-binding-win32-x64-msvc": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/@unrs/resolver-binding-win32-x64-msvc/-/resolver-binding-win32-x64-msvc-1.13.0.tgz", + "integrity": "sha512-DpLMlAqlrk4zBVK3DiDjwKD0oq7pZNy+8BiIBRuByqb6dm5jsdoLMhIiyh/xR7+WejaW/1Ui+XgbgMNa4+zWJg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@vitest/coverage-v8": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-v8/-/coverage-v8-5.1.1.tgz", + "integrity": "sha512-xL4NkbVx/UqqDHaXSOyvB8qsSoLQ+dVNGR9H2Bh/4ggQtmaPFNPUC9gZQwKZePLOQ6WDcgwXVnPulFW9eCHt0w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@bcoe/v8-coverage": "^1.0.2", + "@vitest/istanbul-lib-coverage": "^2.1.0", + "@vitest/istanbul-lib-report": "^2.1.0", + "ast-v8-to-istanbul": "^1.0.7", + "magicast": "^0.5.5", + "obug": "^3.0.0", + "std-env": "^4.3.0", + "tinyrainbow": "^3.2.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@vitest/browser": "5.1.1", + "vitest": "5.1.1" + }, + "peerDependenciesMeta": { + "@vitest/browser": { + "optional": true + } + } + }, + "node_modules/@vitest/istanbul-lib-coverage": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-coverage/-/istanbul-lib-coverage-2.1.0.tgz", + "integrity": "sha512-WOjuS+xcjSIy7ruYBQ+9BUcV7XZQ0FyVcbWbWxW9TRx/kLGx5SQaeFRIFDJxjNplb6YsT7SpKo2zuXXUo91OIQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=22" + } + }, + "node_modules/@vitest/istanbul-lib-report": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@vitest/istanbul-lib-report/-/istanbul-lib-report-2.1.0.tgz", + "integrity": "sha512-+ZFta25nWtGCOBG9/IET8w1RO5Oawsd6H8Uf6AJ9EA/StFuKVtKAEJEJ6uRt84OH+T4YkI0ASmIHAhRA+0KVxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/istanbul-lib-coverage": "2.1.0" + }, + "engines": { + "node": ">=22" + } + }, + "node_modules/@vitest/mocker": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-5.1.1.tgz", + "integrity": "sha512-b2OgTB4+3ImWIVafXKazJXwLKwQxUNnix6b3xUvUTMh7RyXlrtzoxfZr8aEz9zkHOMAS4K5lu3TvFWoiVeVTQg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.31", + "@vitest/spy": "5.1.1", + "estree-walker": "^3.0.3", + "magic-string": "^1.4.5" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9 || ^3.0.0", + "vite": "^6.0.0 || ^7.0.0 || ^8.0.0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/spy": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-5.1.1.tgz", + "integrity": "sha512-6K8C6alQG1/Yc8/ZI22iJS7JEsxPdVzqtqDq+/xM4Z0mGVykemMVjLhqMy/q6/IHYG3kKD8hKSwRen/ZdyI9vQ==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/acorn": { + "version": "8.19.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.19.0.tgz", + "integrity": "sha512-oJlA3XiRm7Cyk6qFD2Jn8ak9B7jSy0qy00ADO3+8dpT0LSjFihQYv4C02LFCSYJV3Q37xYwwRy5m+IpIiUzqWw==", + "dev": true, + "license": "MIT", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/ajv": { + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.15.0.tgz", + "integrity": "sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/anymatch/node_modules/picomatch": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/ast-v8-to-istanbul": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/ast-v8-to-istanbul/-/ast-v8-to-istanbul-1.0.8.tgz", + "integrity": "sha512-lPdpagk13ANXV+HClJEpCZM7kUsl5XcvgqKzZhaj6Ve1ZFICcY2sGhAN1n1vT0tML6EclT7bfVgTxqL57Gkpow==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.31", + "estree-walker": "^3.0.3", + "js-tokens": "^10.0.0" + } + }, + "node_modules/babel-jest": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-30.5.2.tgz", + "integrity": "sha512-ES8WeJ2fNWPEDunyAtUfJ12nHyaWUloCHdkfK2oW5uSoQSUmjNKdWiGaXJITJwvFEWoD/evHEg/QoCXAvLaQqQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/transform": "30.5.2", + "@types/babel__core": "^7.20.5", + "babel-plugin-istanbul": "^8.0.0", + "babel-preset-jest": "30.5.0", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "slash": "^3.0.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.11.0 || ^8.0.0-0" + } + }, + "node_modules/babel-plugin-istanbul": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-8.0.0.tgz", + "integrity": "sha512-18wCskrN3DgbuBmp1gr7LBGT8xdz5xhQQqFvFhVxbkl8VBCrMKQ2YtqBWtUal1Zrc1HTuX0011+Brjw78TCFkg==", + "dev": true, + "license": "BSD-3-Clause", + "workspaces": [ + "test/babel-8" + ], + "dependencies": { + "@babel/helper-plugin-utils": "^7.0.0", + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-instrument": "^6.0.2", + "test-exclude": "^7.0.1" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/babel-plugin-jest-hoist": { + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-30.5.0.tgz", + "integrity": "sha512-gtGo1B+u14jrZQv6TdSWIWkTqclboo7Qn+dFAGUOIuXLFuJKAdg3U5MIWzZnW4vfUb4dX9skmAMiby86e/SF4A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/babel__core": "^7.20.5" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/babel-preset-current-node-syntax": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.2.0.tgz", + "integrity": "sha512-E/VlAEzRrsLEb2+dv8yp3bo4scof3l9nR4lrld+Iy5NyVqgVYUJnDAmunkhPMisRI32Qc4iRiz425d8vM++2fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/plugin-syntax-async-generators": "^7.8.4", + "@babel/plugin-syntax-bigint": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", + "@babel/plugin-syntax-json-strings": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", + "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", + "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" + }, + "peerDependencies": { + "@babel/core": "^7.0.0 || ^8.0.0-0" + } + }, + "node_modules/babel-preset-jest": { + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-30.5.0.tgz", + "integrity": "sha512-ZGPn5ClP4lBDpuOK8W1yQIOy359HmbnZv3suucAlIe+SEE9yDsxV4S2PjSbH2Vc97U+WmzYD7vw3kr8NsQ/i6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "babel-plugin-jest-hoist": "30.5.0", + "babel-preset-current-node-syntax": "^1.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.11.0 || ^8.0.0-beta.1 || ^8.0.0" + } + }, + "node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "dev": true, + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/baseline-browser-mapping": { + "version": "2.11.41", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.41.tgz", + "integrity": "sha512-yjL/sZCpbpL0ocwmrUe1YFUelyMcifcByF4UYCBDyubFXQRs3lUjo9VoPKdjoFFhmzLAAGNJb1GBBCQJ6B4eyg==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/brace-expansion": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.1.2.tgz", + "integrity": "sha512-ELhY3JEerIBbhgW+rh0/8glkZAaMqn1x3BAvp3yTULSEGozMK/5PT6WTdBgsdvJqwwmv7MAQNOydfYbvK1Vgfw==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/browserslist": { + "version": "4.29.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.29.6.tgz", + "integrity": "sha512-CmVVIQ3RVc5HxYEc9X84GvxK/C8C1wH8TlKAiO7uTxF8PDwt7r8t9Qk3J9NkMOVzX5O/HbLv3yzxZg9HPrnI9w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.11.37", + "caniuse-lite": "^1.0.30001826", + "electron-to-chromium": "^1.5.486", + "node-releases": "^2.0.64", + "update-browserslist-db": "^1.4.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/bser": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/bser/-/bser-2.1.2.tgz", + "integrity": "sha512-V2o8YS2EhrKMO9AumnkK0ynynfFlsajpYupwq7S46H5mhcanwxDkNTw3K67wPIcKTH1ffkA4vhMOtAc7gRmPZw==", + "dev": true, + "license": "MIT", + "dependencies": { + "node-int64": "^0.4.0" + } + }, + "node_modules/cacheable": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/cacheable/-/cacheable-2.5.0.tgz", + "integrity": "sha512-60cyAOytib/OzBw1JNSoSV/boK1AtHryDIjvVBk7XbN4ugfkM3+Sry7fEjNgPMGgOjuaZPAp8ruZ0Cxafwyq9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cacheable/memory": "^2.2.0", + "@cacheable/utils": "^2.5.0", + "hookified": "^1.15.0", + "keyv": "^5.6.0", + "qified": "^0.10.1" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001829", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001829.tgz", + "integrity": "sha512-FeVvlaVr3r+cdHIYXyZhtVkqroSYjYaoNxItxQNjusurUE+IqODawDsbzk02HJgi2RdKiaGGFm+EKbXku+yITg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/chai": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-6.3.0.tgz", + "integrity": "sha512-XWAtwJ6OHO+tj0EKCs0Y2UamnyOxseZWltU4x2U2wh8g4AigdjwvtUjvLP2tqkA/avxHEtzxNaqGq/YGNwckKg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/char-regex": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", + "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/ci-info": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.5.0.tgz", + "integrity": "sha512-d1uM8k5UZEyPza1n/MG3ko8nKupKN0KJpFsipgPcgaCCvV+IqIfJ+NzTjetlLM+UcXZx3+cLrNr76+eAO7G1Mw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/cjs-module-lexer": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-2.3.0.tgz", + "integrity": "sha512-lmNyBzi6iYiqyrExTctfmjd8tInx+dHu9PBomTfH5RXS53c27JMFJgzNv5TyAnm3PgGf+MLy0+Ws41/HlVxdKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/co": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", + "integrity": "sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">= 1.0.0", + "node": ">= 0.12.0" + } + }, + "node_modules/collect-v8-coverage": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/collect-v8-coverage/-/collect-v8-coverage-1.0.3.tgz", + "integrity": "sha512-1L5aqIkwPfiodaMgQunkF1zRhNqifHBmtbbbxcr6yVxxBnliw4TDOW6NxpO8DJLgJ16OT+Y4ztZqP6p/FtXnAw==", + "dev": true, + "license": "MIT" + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cross-spawn": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.1.2.tgz", + "integrity": "sha512-8BPK2r+sKWC8sDinRwLwrFMq2lXTBBwzYYEB9LiCznfMurOi4FOvQflq3XOLGG+HPdMSVpe+k/s96+AtDEOgPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/dedent": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.7.2.tgz", + "integrity": "sha512-WzMx3mW98SN+zn3hgemf4OzdmyNhhhKz5Ay0pUfQiMQ3e1g+xmTJWp/pKdwKVXhdSkAEGIIzqeuWrL3mV/AXbA==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/electron-to-chromium": { + "version": "1.5.497", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.497.tgz", + "integrity": "sha512-6AOdatCqk0KqRbYrO2+ZfyE6I4ukT07lGc0uXBPapvIg4vZ00hg+8kdO19nL7PVfS2pQBTb9yzdt1efkz02vvw==", + "dev": true, + "license": "ISC" + }, + "node_modules/emittery": { + "version": "0.13.1", + "resolved": "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz", + "integrity": "sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sindresorhus/emittery?sponsor=1" + } + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-module-lexer": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", + "integrity": "sha512-poHGpORABojJJucnV9KbOavETW8lBVnphkW77ER5/BQ5Fz7oXSoCNek7IH3vR5nRjdsEz926ibFYX8KtLQmdyw==", + "dev": true, + "license": "MIT" + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "10.16.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-10.16.0.tgz", + "integrity": "sha512-Xu3PRLG/wCaZWZ20gkExUcNqL2mWWsXTR+Lln3Sof4Y9WuA678fH9hrlQ8B6UNwbTnsKdDdBYOd2jxtycXVTGQ==", + "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.7", + "@eslint/config-helpers": "^0.7.0", + "@eslint/core": "^1.2.1", + "@eslint/plugin-kit": "^0.7.3", + "@humanfs/node": "^0.16.8", + "@humanwhocodes/module-importer": "^1.0.1", + "@humanwhocodes/retry": "^0.4.2", + "@types/estree": "^1.0.6", + "ajv": "^6.14.0", + "cross-spawn": "^7.0.6", + "debug": "^4.3.2", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^9.1.2", + "eslint-visitor-keys": "^5.0.1", + "espree": "^11.2.0", + "esquery": "^1.7.0", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "11.1.5 || >11.1.6 <12", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "minimatch": "^11.0.5", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://eslint.org/donate" + }, + "peerDependencies": { + "jiti": "*" + }, + "peerDependenciesMeta": { + "jiti": { + "optional": true + } + } + }, + "node_modules/eslint-scope": { + "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": { + "@types/esrecurse": "^4.3.1", + "@types/estree": "^1.0.8", + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-5.0.1.tgz", + "integrity": "sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "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": { + "acorn": "^8.16.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^5.0.1" + }, + "engines": { + "node": "^20.19.0 || ^22.13.0 || >=24" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.7.0.tgz", + "integrity": "sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/exit-x": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/exit-x/-/exit-x-0.2.2.tgz", + "integrity": "sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/expect": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/expect/-/expect-30.5.2.tgz", + "integrity": "sha512-0LNuMvs8/5mRYhnCR4k+lGV7fqPMs6Bnksda4S3zsCUmdxBpAn4zU4NNzXdq1pMKe/H4W5t/zVIDSJ/H3e0vDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "30.5.2", + "@jest/get-type": "30.5.0", + "jest-matcher-utils": "30.5.2", + "jest-message-util": "30.5.1", + "jest-mock": "30.5.2", + "jest-util": "30.5.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fb-watchman": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.4.tgz", + "integrity": "sha512-tGQtaoYisPDriJBN0mT5yZSyNETnJGA1gTYxaVRAE5KUO3LI9kPUc9WIu8JXcxaIci+faIKlzXqXyPgrmubtBQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bser": "2.1.2" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-entry-cache": { + "version": "11.1.5", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-11.1.5.tgz", + "integrity": "sha512-+PFTHITI08JIGhnNpGNI8T8inUpgZfk3GNEqfT9R2zZV2iFXg3CvqzSl/uEhs7TSGujYRELEANyDvS8Fj7+S7Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "flat-cache": "^6.1.23" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/flat-cache": { + "version": "6.1.23", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-6.1.23.tgz", + "integrity": "sha512-f++BY9pTk+983xK1FLzlLpmM0i0z+jHmx3QESGkURMXujQZz1k5wzwX6hjnQ8goaD0B+sYnDK1yZ6MTyZfUaqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "cacheable": "^2.5.0", + "flatted": "^3.4.2", + "hookified": "^1.15.0" + } + }, + "node_modules/flatted": { + "version": "3.5.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.5.1.tgz", + "integrity": "sha512-qzp88St5qssOkS6hnWEvsFqE6SGoQtamMc6ghNo2s2idGn3rvHl/mdmLKQr5egZeVcqHfVCXtPoY+DP0flzPTg==", + "dev": true, + "license": "ISC" + }, + "node_modules/foreground-child": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", + "dev": true, + "license": "ISC", + "dependencies": { + "cross-spawn": "^7.0.6", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/foreground-child/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "13.0.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-13.0.7.tgz", + "integrity": "sha512-wfsFgXQ8A3SEI9XGf7Nl3Y9l7ffSrGh7SUCT7vU/2CzYPep9kjxAn1S40F9OPKxAMGCVl7HtNlJhrCJUeUq83g==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^10.2.2", + "minipass": "^7.1.3", + "path-scurry": "^2.0.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "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.8" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.12.tgz", + "integrity": "sha512-iuyGF2E4oafQfPsRrG2wtY2ILupMhvtdrhzrxB+0VcjsPpSPttpfYdjnGFGsTi5MaJFjI1jOKHPQ6UTbTj9TAw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/hashery": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/hashery/-/hashery-1.5.1.tgz", + "integrity": "sha512-iZyKG96/JwPz1N55vj2Ie2vXbhu440zfUfJvSwEqEbeLluk7NnapfGqa7LH0mOsnDxTF85Mx8/dyR6HfqcbmbQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookified": "^1.15.0" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/hookified": { + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-1.15.1.tgz", + "integrity": "sha512-MvG/clsADq1GPM2KGo2nyfaWVyn9naPiXrqIe4jYjXNZQt238kWyOGrsyc/DmRAQ+Re6yeo6yX/yoNCG5KAEVg==", + "dev": true, + "license": "MIT" + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true, + "license": "MIT" + }, + "node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-local": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + }, + "bin": { + "import-local-fixture": "fixtures/cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-generator-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-2.1.0.tgz", + "integrity": "sha512-cTIB4yPYL/Grw0EaSzASzg6bBy9gqCofvWN8okThAYIxKJZC+udlRAmGbM0XLeniEJSs8uEgHPGuHSe1XsOLSQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true, + "license": "ISC" + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@babel/core": "^7.23.9", + "@babel/parser": "^7.23.9", + "@istanbuljs/schema": "^0.1.3", + "istanbul-lib-coverage": "^3.2.0", + "semver": "^7.5.4" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-5.0.6.tgz", + "integrity": "sha512-yg2d+Em4KizZC5niWhQaIomgf5WlL4vOOjZ5xGCmF8SnPE/mDWWXgvRExdcpCgh9lLRRa1/fSYp2ymmbJ1pI+A==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.23", + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.2.0.tgz", + "integrity": "sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-3.4.3.tgz", + "integrity": "sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/jest": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest/-/jest-30.5.2.tgz", + "integrity": "sha512-3gnpdBIza8ijCl3iMV9ChE3hSt1+46865qqod863gQtJr1DixOkAU5DoGbi3u+XlRcw++BhZQMu/y4xBdHBvSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "30.5.2", + "@jest/types": "30.5.1", + "import-local": "^3.2.0", + "jest-cli": "30.5.2" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-changed-files": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-30.5.1.tgz", + "integrity": "sha512-0+bvMM/ENhDI29Z8q1r4HxiDIi4G5tnBmSw4esfPQoj9q8Nik7KIyuxHkTVnnniJQf05SxpGaKDQ+4h28ynGPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "execa": "^5.1.1", + "jest-util": "30.5.1", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-circus": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-30.5.2.tgz", + "integrity": "sha512-vffFgjs5JSJ9q4ds1vNW3klKYPJfYfIY61LT/zaZgvTeASJOWZUt8LBfHgIcV4rwxlPBLl/ePBGccHEclS4PlQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "30.5.2", + "@jest/expect": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/types": "30.5.1", + "@types/node": "*", + "chalk": "^4.1.2", + "co": "^4.6.0", + "dedent": "^1.6.0", + "is-generator-fn": "^2.1.0", + "jest-each": "30.5.2", + "jest-matcher-utils": "30.5.2", + "jest-message-util": "30.5.1", + "jest-runtime": "30.5.2", + "jest-snapshot": "30.5.2", + "jest-util": "30.5.1", + "p-limit": "^3.1.0", + "pretty-format": "30.5.1", + "pure-rand": "^7.0.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.6" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-cli": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-30.5.2.tgz", + "integrity": "sha512-YYYxUUVjFgPvgEleKNKMaYGIFgR3l3832Cl0kRL/oCiDZ03v7wImUtquHl2OOBCCNgprjZgBN5bczS/JklPBDg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/core": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/types": "30.5.1", + "chalk": "^4.1.2", + "exit-x": "^0.2.2", + "import-local": "^3.2.0", + "jest-config": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", + "yargs": "^17.7.2" + }, + "bin": { + "jest": "bin/jest.js" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "node-notifier": "^8.0.1 || ^9.0.0 || ^10.0.0" + }, + "peerDependenciesMeta": { + "node-notifier": { + "optional": true + } + } + }, + "node_modules/jest-config": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-config/-/jest-config-30.5.2.tgz", + "integrity": "sha512-U6221OZekabePvGcGPf4raIBKMvYQWFHvhobDJRojOYaFMj2HaGytAdknjDhYc6JTz2fdHW9+6k0wWUDaNeOFQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.27.4", + "@jest/get-type": "30.5.0", + "@jest/pattern": "30.5.0", + "@jest/test-sequencer": "30.5.2", + "@jest/types": "30.5.1", + "babel-jest": "30.5.2", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "deepmerge": "^4.3.1", + "glob": "^13.0.6", + "graceful-fs": "^4.2.11", + "jest-circus": "30.5.2", + "jest-docblock": "30.5.0", + "jest-environment-node": "30.5.2", + "jest-regex-util": "30.5.0", + "jest-resolve": "30.5.1", + "jest-runner": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", + "parse-json": "^5.2.0", + "pretty-format": "30.5.1", + "slash": "^3.0.0", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + }, + "peerDependencies": { + "@types/node": "*", + "esbuild-register": ">=3.4.0", + "ts-node": ">=9.0.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "esbuild-register": { + "optional": true + }, + "ts-node": { + "optional": true + } + } + }, + "node_modules/jest-diff": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-30.5.2.tgz", + "integrity": "sha512-rBtHnI6BWTiWj3lM7fOLVfChx7R9B0u9VV3PRHawKs79x6ZjW1QoSrKenaigNGWlvhtoi2BqvDbABDie+Os3xQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/diff-sequences": "30.5.0", + "@jest/get-type": "30.5.0", + "chalk": "^4.1.2", + "pretty-format": "30.5.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-docblock": { + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/jest-docblock/-/jest-docblock-30.5.0.tgz", + "integrity": "sha512-NwDqcxtoZi33RhuW+zJS/RVA3rmheQ8BnwpYZuc/Eruaz6seQb7+aoCeDZu/3X7W2XmD8DbSo9Pn72DbKsBFYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-newline": "^3.1.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-each": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-each/-/jest-each-30.5.2.tgz", + "integrity": "sha512-GRrW+7fmmgmkvyfEBqc1QFdWnF1Ex5yG6Y6AWL4TTxnkWlKIT98dsKh3P3UuWm6v4XsQwVE6DEzXIPMzWJ3ZbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/get-type": "30.5.0", + "@jest/types": "30.5.1", + "chalk": "^4.1.2", + "jest-regex-util": "30.5.0", + "jest-util": "30.5.1", + "pretty-format": "30.5.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-environment-node": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-30.5.2.tgz", + "integrity": "sha512-Ciz4KgTGIbojxSKpuFImgWJj5EyqfE8xMq9NxWmOXnQywHHS03H9Mv+vaCB29J5pr3JBrY27WbRV18rBdjh8Dg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "30.5.2", + "@jest/fake-timers": "30.5.2", + "@jest/types": "30.5.1", + "@types/node": "*", + "jest-mock": "30.5.2", + "jest-util": "30.5.1", + "jest-validate": "30.5.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-haste-map": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-30.5.1.tgz", + "integrity": "sha512-VIFgt67jW480YDxKfEv9IYQKrFpYt7bOCMn3VsnjK7AK9qo7p6acpnA1DHwsVOULE3dTaYew/6JaTD/d0VDHoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.5.1", + "@parcel/watcher": "^2.6.0", + "@types/node": "*", + "anymatch": "^3.1.3", + "fb-watchman": "^2.0.2", + "fdir": "^6.5.0", + "graceful-fs": "^4.2.11", + "jest-regex-util": "30.5.0", + "jest-util": "30.5.1", + "jest-worker": "30.5.1", + "picomatch": "^4.0.3" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-leak-detector": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-30.5.1.tgz", + "integrity": "sha512-gt4GT2aWgEoCNTcBe4rqS74xTIUJxi+UD9SNSu9aOk5LmTEd6fS5KSTmAKAfitCCktQHNN+upUuL6EkBfFbMDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/get-type": "30.5.0", + "pretty-format": "30.5.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-matcher-utils": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-30.5.2.tgz", + "integrity": "sha512-lFkB365PTIHOhPzwrb9T6gvlDnPpOZ7/c3ewOKKB7bzztqjVrtlyRL2MkyfJXpyY2u2SKw001JKrTx14fBUFcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/get-type": "30.5.0", + "chalk": "^4.1.2", + "jest-diff": "30.5.2", + "pretty-format": "30.5.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-message-util": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-message-util/-/jest-message-util-30.5.1.tgz", + "integrity": "sha512-UdQlLdd9wL/Ys7xRErckqwD6wPlSZYueosSWuHc1r2ztGLwlgPvtSJq2+BPEgaEY13WLvfFbmhTj8pba0Sd1jg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.27.1", + "@jest/types": "30.5.1", + "@types/stack-utils": "^2.0.3", + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "jest-util": "30.5.1", + "picomatch": "^4.0.3", + "pretty-format": "30.5.1", + "slash": "^3.0.0", + "stack-utils": "^2.0.6" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-mock": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-30.5.2.tgz", + "integrity": "sha512-KTHb37Fhj8xY8qPFvTFaFJHcdsumQp+ExsUlgoX232Agmc706gagBs53+CYvulV7MVQo9AgXOUxsqzzVBoJlrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/expect-utils": "30.5.2", + "@jest/types": "30.5.1", + "@types/node": "*", + "jest-util": "30.5.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-regex-util": { + "version": "30.5.0", + "resolved": "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-30.5.0.tgz", + "integrity": "sha512-Mg0WK7A6xRHLSA1udJ8y9f3lM0uUhFTBnLKzwPmqB9AylvpleJ6BLemR8K9dK27DY+cesDryoA7yLZCAHsPG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-resolve": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-resolve/-/jest-resolve-30.5.1.tgz", + "integrity": "sha512-wprhLejRtwN6h8ZgaqC0eYjGJ1uMdGPT/+b3eFncbG4NWuuP9QL+vWwRinu9waw7hkOLcpMJGVJAMgBwsPssMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "^4.1.2", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.5.1", + "jest-util": "30.5.1", + "jest-validate": "30.5.1", + "slash": "^3.0.0", + "unrs-resolver": "^1.12.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-resolve-dependencies": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-30.5.2.tgz", + "integrity": "sha512-GMI0DP5enX9Z2qW2zFy1bOkrCfWAOPRJQ7qHt0pdfrxBPsgWxglMPrRSK2TX/wRWYxcPRSLFg3Z88qPOzHx7FQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "jest-regex-util": "30.5.0", + "jest-snapshot": "30.5.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-runner": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-runner/-/jest-runner-30.5.2.tgz", + "integrity": "sha512-/B6px7hiiNhVSRwuv9AGn0nawYvwsHeQZ3ItTd5Gp2diFd0EOKaWVeWqcbw3L88vx1GfpCKjQkxWItZCTl11Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/console": "30.5.2", + "@jest/environment": "30.5.2", + "@jest/source-map": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", + "@types/node": "*", + "chalk": "^4.1.2", + "emittery": "^0.13.1", + "exit-x": "^0.2.2", + "graceful-fs": "^4.2.11", + "jest-docblock": "30.5.0", + "jest-environment-node": "30.5.2", + "jest-haste-map": "30.5.1", + "jest-leak-detector": "30.5.1", + "jest-message-util": "30.5.1", + "jest-resolve": "30.5.1", + "jest-runtime": "30.5.2", + "jest-util": "30.5.1", + "jest-watcher": "30.5.2", + "jest-worker": "30.5.1", + "p-limit": "^3.1.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-runtime": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-30.5.2.tgz", + "integrity": "sha512-0paUAHBlheai10A3XSy9Xh+YBG0IROy+/qzcDPzQ/nbbXrznQzeWy5qniICWK6d3W3scaRQCVAbXdcK0ibBq4w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/environment": "30.5.2", + "@jest/fake-timers": "30.5.2", + "@jest/globals": "30.5.2", + "@jest/source-map": "30.5.2", + "@jest/test-result": "30.5.2", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", + "@types/node": "*", + "chalk": "^4.1.2", + "cjs-module-lexer": "^2.2.0", + "collect-v8-coverage": "^1.0.2", + "es-module-lexer": "^2.1.0", + "glob": "^13.0.6", + "graceful-fs": "^4.2.11", + "jest-haste-map": "30.5.1", + "jest-message-util": "30.5.1", + "jest-mock": "30.5.2", + "jest-regex-util": "30.5.0", + "jest-resolve": "30.5.1", + "jest-snapshot": "30.5.2", + "jest-util": "30.5.1", + "slash": "^3.0.0", + "strip-bom": "^4.0.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-snapshot": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-30.5.2.tgz", + "integrity": "sha512-jKIdes25AnAH73dOCi2qE6J6vHJ6L2vyBS11M89kT50DVJcLTf2AOjvcc+2vVaN8lUbY5v2R83aqXo3Ro9fqYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.27.4", + "@babel/generator": "^7.27.5", + "@babel/plugin-syntax-jsx": "^7.27.1", + "@babel/plugin-syntax-typescript": "^7.27.1", + "@babel/types": "^7.27.3", + "@jest/expect-utils": "30.5.2", + "@jest/get-type": "30.5.0", + "@jest/snapshot-utils": "30.5.1", + "@jest/transform": "30.5.2", + "@jest/types": "30.5.1", + "babel-preset-current-node-syntax": "^1.2.0", + "chalk": "^4.1.2", + "expect": "30.5.2", + "graceful-fs": "^4.2.11", + "jest-diff": "30.5.2", + "jest-matcher-utils": "30.5.2", + "jest-message-util": "30.5.1", + "jest-util": "30.5.1", + "pretty-format": "30.5.1", + "semver": "^7.7.2", + "synckit": "^0.11.8" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-snapshot/node_modules/semver": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/jest-util": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-util/-/jest-util-30.5.1.tgz", + "integrity": "sha512-yKuxmNy2rSbTXw+3SIPanJo+nV4/BS1p26v44IYBFMsswSQySfMMcPHErnOncda7i9HEz0q605rIhSTBVgrZTg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/types": "30.5.1", + "@types/node": "*", + "chalk": "^4.1.2", + "ci-info": "^4.2.0", + "graceful-fs": "^4.2.11", + "picomatch": "^4.0.3" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-validate": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-validate/-/jest-validate-30.5.1.tgz", + "integrity": "sha512-i/buJ56wTpxihE93hQYNMfdOThS87+HGvLZzZJmU4xggPcdTYQq051iwALLCHp3q+SkCGH+EFejQZz5EbBSkkg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/get-type": "30.5.0", + "@jest/types": "30.5.1", + "camelcase": "^6.3.0", + "chalk": "^4.1.2", + "leven": "^3.1.0", + "pretty-format": "30.5.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-validate/node_modules/camelcase": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.3.0.tgz", + "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/jest-watcher": { + "version": "30.5.2", + "resolved": "https://registry.npmjs.org/jest-watcher/-/jest-watcher-30.5.2.tgz", + "integrity": "sha512-rqRgg4R11GA9m1UsEZwQeixHsgZReCn6TOHAHtIH33yXrIvoX0OGPA20Yzzjkz7X40fZvcRSxEpQppYPcWzmcQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/test-result": "30.5.2", + "@jest/types": "30.5.1", + "@types/node": "*", + "ansi-escapes": "^4.3.2", + "chalk": "^4.1.2", + "emittery": "^0.13.1", + "jest-util": "30.5.1", + "string-length": "^4.0.2" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-worker": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-30.5.1.tgz", + "integrity": "sha512-Cbxh5v7AoLuFRmFJSM4/aHdQ68rjXvUWr716EE0Dh3I7T+T/3FgFKhOERGXHcU2Meftq9+9zxPM3TSNyI9D+HA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "@ungap/structured-clone": "^1.3.0", + "jest-util": "30.5.1", + "merge-stream": "^2.0.0", + "supports-color": "^8.1.1" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/js-tokens": { + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-10.0.0.tgz", + "integrity": "sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/js-yaml": { + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.15.2.tgz", + "integrity": "sha512-6EuL879VkRA+1Cz578mKMiKvjPNEuk6+r1JaFzoSWejZmtf7xWbIyw1e3KkxlkzTIt9Taw6JBhEppG7utc1P+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/keyv": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-5.6.0.tgz", + "integrity": "sha512-CYDD3SOtsHtyXeEORYRx2qBtpDJFjRTGXUtmNEMGyzYOKj1TE3tycdlho7kA1Ufx9OYWZzg52QFBGALTirzDSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@keyv/serialize": "^1.1.1" + } + }, + "node_modules/leven": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", + "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lightningcss": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.33.0.tgz", + "integrity": "sha512-WkUDrojuJs0xkgGf2udWxa3yGBRxPtxUkB79i6aCZLRgc7PM8fZe9TosfPDcvEpQZbuFASnHYmRLBLUbmLOIIA==", + "dev": true, + "license": "MPL-2.0", + "peer": true, + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.33.0", + "lightningcss-darwin-arm64": "1.33.0", + "lightningcss-darwin-x64": "1.33.0", + "lightningcss-freebsd-x64": "1.33.0", + "lightningcss-linux-arm-gnueabihf": "1.33.0", + "lightningcss-linux-arm64-gnu": "1.33.0", + "lightningcss-linux-arm64-musl": "1.33.0", + "lightningcss-linux-x64-gnu": "1.33.0", + "lightningcss-linux-x64-musl": "1.33.0", + "lightningcss-win32-arm64-msvc": "1.33.0", + "lightningcss-win32-x64-msvc": "1.33.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.33.0.tgz", + "integrity": "sha512-gEpRTalKdosp4Bb8qWtc2iOgE5SeIHlpS1up9bFq2wAyYhl1UdTObYiHe98zEM9SQvSoqQZ1IQD0JNpg3Ml5pg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.33.0.tgz", + "integrity": "sha512-Sciaz8eenNTKn9b3t7+xr0ipTp9YxKQY4npwQ3mrRuL0BAVHBLyZxofhaKBAVtzmtRZ/zTyo0/to4B1uWG/Djg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.33.0.tgz", + "integrity": "sha512-Z5UPAxzrjlWNNyGy6i65cJzzvgJ5D3T6wMvs+gWpY9d7qRhANrxqAp6LhxIgZhWEw18RfJTGcRxjuLIBr+m8XQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.33.0.tgz", + "integrity": "sha512-QQM/Ti/hQajJwCY+RiWuCZ9sdtI/XQk7nDK5vC8kkdwixezOlDgvDx7+RT+QjK6FcFT4MpsuoBnHIo/O3StRRg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.33.0.tgz", + "integrity": "sha512-N7FVBe6iS24MlM6R/4RBTxGhQheZGs7tiQ9U32UtF75NzP5Q7xWPRqLBCKxlRQRk3rY1jCIPLzx7WzOhuUIRLQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.33.0.tgz", + "integrity": "sha512-j2v/itmy4HlNxlc6voKXYgBqNi0Ng2LShg4z7GufpEgs05P+2suBVyi9I6YHq5uoVFx9ETin3eCEhLVyXGQnKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.33.0.tgz", + "integrity": "sha512-yiO5ROMuYQgXbC60yjZU5CYSFZGKXL0HFATXt9mHJn1+zW55oCtMI9NfcVhYLMFDL7gV7oBPon/EmMMGg2OvtQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.33.0.tgz", + "integrity": "sha512-ar+Ju7LmcN0Jo4FpL4hpFybwNG9/3A/Br5KW2n2jyODg3MEZXaDYADdemoNS+BDNfMgKvylJLj4S5tyRActuAg==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "glibc" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.33.0.tgz", + "integrity": "sha512-RYiYbkokw0trfKqqzfF55lginwEPrD3OJDfTuJzFs1MK6iFnDenaz1fqLLtX4ITG3OktJQXOeTaw1awrBAlZPw==", + "cpu": [ + "x64" + ], + "dev": true, + "libc": [ + "musl" + ], + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.33.0.tgz", + "integrity": "sha512-1K+MPfLSFVpphzpdbfkhlWk6wBrTObBzS2T6db10PNOZgR9GoVsAWzwNyuhUYYbTp23j+4RrncfujZ4uAzXvwA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.33.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.33.0.tgz", + "integrity": "sha512-OlEICDx/Xl0FqSp4bry8zFnCvGpig3Gl4gCquvYwHuqJKEC1+n9NgDniFvqHGmMv1ZkqDJrDqKKSykTDX+ehuA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "peer": true, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-1.4.5.tgz", + "integrity": "sha512-oLLC2+YvQUfAa+vxoufE/yc1icb87M9iXIRqAoR/2EhE/8cb3SF/+Gi0c2By1B+5Vz2e2vQtUvHiu1+63Znh+w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.6.0" + } + }, + "node_modules/magicast": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/magicast/-/magicast-0.5.5.tgz", + "integrity": "sha512-UicdXN8zQ3JHlxVq+28afMXPr1z7WNY6+7EJnzTdQWkTAlMLF5fNCCKxJHBQwGaNGR11581EiQmQzx73+MvszA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7", + "source-map-js": "^1.2.1" + } + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true, + "license": "MIT" + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/minimatch": { + "version": "11.0.10", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.10.tgz", + "integrity": "sha512-L3/cjhQ5E6lft0VCp/2mO3Ic74RnutKy3rz7iGwp/6w1hKcO262g2rbfacFyw6eBig5OdI0nu5PpuA0/WQs9Tw==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/nonrecursive-glob-match": "^1.1.0", + "brace-expansion": "^5.0.12" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.20", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.20.tgz", + "integrity": "sha512-uKdg2G3GNCKQn9byYOpxbGqrT2fGO5KRt5J/8b3pok8rT6qxGWF6hxMyJiEYtAf+FVyYuD9hRaDqX5uPFYJ4ZQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/napi-postinstall": { + "version": "0.3.8", + "resolved": "https://registry.npmjs.org/napi-postinstall/-/napi-postinstall-0.3.8.tgz", + "integrity": "sha512-dHbDC5V1g/EI8OLEtL4Iuwbu0fgzmyykxenn2KnlsX9XdhTXL3gWnfbbP+ab+oUcgV6CFpb8QGyQt/ZXA0UXig==", + "dev": true, + "license": "MIT", + "bin": { + "napi-patch": "lib/patch.js", + "napi-postinstall": "lib/cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/napi-postinstall" + } + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-addon-api": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-7.1.1.tgz", + "integrity": "sha512-5m3bsyrjFWE1xf7nz7YXdN4udnVtXK6/Yfgn5qnahL6bCkf2yKt4k3nuTKAtT4r3IG8JNR2ncsIMdZuAzJjHQQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-int64": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", + "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-releases": { + "version": "2.0.67", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.67.tgz", + "integrity": "sha512-qgSZT38oj+YV4qyFmdPQEGRFQRP1l8a0wccOECrcrdGl9KldZlCXrEz7uOviThiOWR1KyqiQYeLrf7M9xRi1bg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "license": "MIT", + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/obug": { + "version": "3.0.0", "resolved": "https://registry.npmjs.org/obug/-/obug-3.0.0.tgz", "integrity": "sha512-5vvB5+W7ePv+p3uqxi+RcW1XAzLW0/hxt3/4X4Lc4qHudzOhmBiBwOY6DRob4WnanAEGvNcLjF+KNOufrUoEQw==", "dev": true, "funding": [ - "https://github.com/sponsors/sxzz", - "https://opencollective.com/debug" + "https://github.com/sponsors/sxzz", + "https://opencollective.com/debug" + ], + "license": "MIT", + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/optionator": { + "version": "0.9.4", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", + "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.5" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "dev": true, + "license": "BlueOak-1.0.0" + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-scurry": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.2.tgz", + "integrity": "sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==", + "dev": true, + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.5.4", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.4.tgz", + "integrity": "sha512-B8nJCTi8JuSaDBg0tBdnImV6j5O2CXaqKfdj24ZTCFbyivN8KZ2Z+RL3aHjwJAfLutD9cNnObG4SIgW4gMufiw==", + "dev": true, + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", + "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pirates": { + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.7.tgz", + "integrity": "sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 6" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/postcss": { + "version": "8.5.33", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz", + "integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "peer": true, + "dependencies": { + "nanoid": "^3.3.20", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.2" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pretty-format": { + "version": "30.5.1", + "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-30.5.1.tgz", + "integrity": "sha512-byhRAPguVKMQIj4kjJwJ5lAskVhfuiSdiYl/aLTWpgkGEmic2jYhJh1yE9ih8Ox44Xg9ccCT11/S6QrzSJuNrg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jest/react-is-18": "npm:react-is@^18.3.1", + "@jest/react-is-19": "npm:react-is@^19.2.5", + "@jest/schemas": "30.5.0", + "ansi-styles": "^5.2.0" + }, + "engines": { + "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" + } + }, + "node_modules/pretty-format/node_modules/ansi-styles": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-5.2.0.tgz", + "integrity": "sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/pure-rand": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-7.0.1.tgz", + "integrity": "sha512-oTUZM/NAZS8p7ANR3SHh30kXB+zK2r2BPcEn/awJIbOvq82WoMN4p62AWWp3Hhw50G0xMsw1mhIBLqHw64EcNQ==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } ], + "license": "MIT" + }, + "node_modules/qified": { + "version": "0.10.1", + "resolved": "https://registry.npmjs.org/qified/-/qified-0.10.1.tgz", + "integrity": "sha512-+Owyggi9IxT1ePKGafcI87ubSmxol6smwJ+RAHDQlx9+9cPwFWDiKFFCPuWhr9ignlGpZ9vDQLw67N4dcTVFEA==", + "dev": true, + "license": "MIT", + "dependencies": { + "hookified": "^2.1.1" + }, + "engines": { + "node": ">=20" + } + }, + "node_modules/qified/node_modules/hookified": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/hookified/-/hookified-2.2.0.tgz", + "integrity": "sha512-p/LgFzRN5FeoD3DLS6bkUapeye6E4SI6yJs6KetENd18S+FBthqYq2amJUWpt5z0EQwwHemidjY5OqJGEKm5uA==", + "dev": true, + "license": "MIT" + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/rolldown": { + "version": "1.2.19", + "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.19.tgz", + "integrity": "sha512-QIiV1J9d0pzN4jeeTH4sjPy0AZ6cAy2cG0ExeoE1+U8Rvj+hR3gYkokx0YbeUNGlZqiQJJ2utcETe0oKXwzsuA==", + "dev": true, + "license": "MIT", + "peer": true, + "dependencies": { + "@oxc-project/types": "=0.156.0", + "@rolldown/pluginutils": "^1.0.0" + }, + "bin": { + "rolldown": "bin/cli.mjs" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "optionalDependencies": { + "@rolldown/binding-android-arm-eabi": "1.2.19", + "@rolldown/binding-android-arm64": "1.2.19", + "@rolldown/binding-darwin-arm64": "1.2.19", + "@rolldown/binding-darwin-x64": "1.2.19", + "@rolldown/binding-freebsd-x64": "1.2.19", + "@rolldown/binding-linux-arm-gnueabihf": "1.2.19", + "@rolldown/binding-linux-arm64-gnu": "1.2.19", + "@rolldown/binding-linux-arm64-musl": "1.2.19", + "@rolldown/binding-linux-ppc64-gnu": "1.2.19", + "@rolldown/binding-linux-s390x-gnu": "1.2.19", + "@rolldown/binding-linux-x64-gnu": "1.2.19", + "@rolldown/binding-linux-x64-musl": "1.2.19", + "@rolldown/binding-openharmony-arm64": "1.2.19", + "@rolldown/binding-wasm32-wasi": "1.2.19", + "@rolldown/binding-win32-arm64-msvc": "1.2.19", + "@rolldown/binding-win32-x64-msvc": "1.2.19" + } + }, + "node_modules/semver": { + "version": "6.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.2.tgz", + "integrity": "sha512-GYrCADwpu6yV5OAvchkQ27Z5wwMxWAEMg5NNWjyHh/5DboFFqbdbvYNIvZouQpxXyeMPoTOh0vdPYKlf0ZswdQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "license": "MIT", + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/source-map-js": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", + "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/std-env": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.3.0.tgz", + "integrity": "sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==", + "dev": true, + "license": "MIT" + }, + "node_modules/string-length": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", + "integrity": "sha512-+l6rNN5fYHNhZZy41RXsYptCjA2Igmq4EG7kZAYFQI1E1VTXarr6ZPXBg6eq7Y6eK4FEhY6AJlyuFIb/v/S0VQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "char-regex": "^1.0.2", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, "license": "MIT", "engines": { - "node": ">=12.20.0" + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/picocolors": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", - "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, - "license": "ISC", - "peer": true + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } }, - "node_modules/picomatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz", - "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==", + "node_modules/synckit": { + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.11.13.tgz", + "integrity": "sha512-eNRKgb3z66Yp3D2CixVujOUvXLFUTij/zVnV8KRyvFdQwpz7I5DS8UfRkTeLzb64u+dkzDSdelE24izu+zSSUg==", "dev": true, "license": "MIT", + "dependencies": { + "@pkgr/core": "^0.3.6" + }, "engines": { - "node": ">=12" + "node": "^14.18.0 || >=16.0.0" }, "funding": { - "url": "https://github.com/sponsors/jonschlinkert" + "url": "https://opencollective.com/synckit" } }, - "node_modules/postcss": { - "version": "8.5.33", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.33.tgz", - "integrity": "sha512-RVHEU9/Pp1Fnjr/MpAJsZoADukCKhfIi15OunEYiGktIkYLkPVvC1sioWolGDS7XByMTx9m/IGbro0Js13zhnQ==", + "node_modules/test-exclude": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-7.0.2.tgz", + "integrity": "sha512-u9E6A+ZDYdp7a4WnarkXPZOx8Ilz46+kby6p1yZ8zsGTz9gYa6FIS7lj2oezzNKmtdyyJNNmmXDppga5GB7kSw==", "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "license": "MIT", - "peer": true, + "license": "ISC", "dependencies": { - "nanoid": "^3.3.20", - "picocolors": "^1.1.1", - "source-map-js": "^1.2.2" + "@istanbuljs/schema": "^0.1.2", + "glob": "^10.4.1", + "minimatch": "^10.2.2" }, "engines": { - "node": "^10 || ^12 || >=14" + "node": ">=18" } }, - "node_modules/rolldown": { - "version": "1.2.19", - "resolved": "https://registry.npmjs.org/rolldown/-/rolldown-1.2.19.tgz", - "integrity": "sha512-QIiV1J9d0pzN4jeeTH4sjPy0AZ6cAy2cG0ExeoE1+U8Rvj+hR3gYkokx0YbeUNGlZqiQJJ2utcETe0oKXwzsuA==", + "node_modules/test-exclude/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true, - "license": "MIT", - "peer": true, + "license": "MIT" + }, + "node_modules/test-exclude/node_modules/glob": { + "version": "10.5.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.5.0.tgz", + "integrity": "sha512-DfXN8DfhJ7NH3Oe7cFmu3NCu1wKbkReJ8TorzSAFbSKrlNaQSKfIzqYqVY8zlbs2NLBbWpRiU52GX2PbaBVNkg==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "dev": true, + "license": "ISC", "dependencies": { - "@oxc-project/types": "=0.156.0", - "@rolldown/pluginutils": "^1.0.0" + "foreground-child": "^3.1.0", + "jackspeak": "^3.1.2", + "minimatch": "^9.0.4", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^1.11.1" }, "bin": { - "rolldown": "bin/cli.mjs" + "glob": "dist/esm/bin.mjs" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/test-exclude/node_modules/glob/node_modules/brace-expansion": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.8.tgz", + "integrity": "sha512-BnlDzDYQoplTsZSvPi86CNzmbcb07X8ufR8fk1zivaiEJlXJkiq1MQyDCVmlWcsWbj6aWXqHnrwwevbrm/Saig==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/test-exclude/node_modules/glob/node_modules/minimatch": { + "version": "9.0.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.9.tgz", + "integrity": "sha512-OBwBN9AL4dqmETlpS2zasx+vTeWclWzkblfZk7KTA5j3jeOONz/tRCnZomUyvNg83wL5Zv9Ss6HMJXAgL8R2Yg==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.2" }, "engines": { - "node": "^20.19.0 || >=22.12.0" + "node": ">=16 || 14 >=14.17" }, - "optionalDependencies": { - "@rolldown/binding-android-arm-eabi": "1.2.19", - "@rolldown/binding-android-arm64": "1.2.19", - "@rolldown/binding-darwin-arm64": "1.2.19", - "@rolldown/binding-darwin-x64": "1.2.19", - "@rolldown/binding-freebsd-x64": "1.2.19", - "@rolldown/binding-linux-arm-gnueabihf": "1.2.19", - "@rolldown/binding-linux-arm64-gnu": "1.2.19", - "@rolldown/binding-linux-arm64-musl": "1.2.19", - "@rolldown/binding-linux-ppc64-gnu": "1.2.19", - "@rolldown/binding-linux-s390x-gnu": "1.2.19", - "@rolldown/binding-linux-x64-gnu": "1.2.19", - "@rolldown/binding-linux-x64-musl": "1.2.19", - "@rolldown/binding-openharmony-arm64": "1.2.19", - "@rolldown/binding-wasm32-wasi": "1.2.19", - "@rolldown/binding-win32-arm64-msvc": "1.2.19", - "@rolldown/binding-win32-x64-msvc": "1.2.19" + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/source-map-js": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.2.tgz", - "integrity": "sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==", + "node_modules/test-exclude/node_modules/lru-cache": { + "version": "10.4.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", + "integrity": "sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==", "dev": true, - "license": "BSD-3-Clause", + "license": "ISC" + }, + "node_modules/test-exclude/node_modules/minimatch": { + "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.8" + }, "engines": { - "node": ">=0.10.0" + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/std-env": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-4.3.0.tgz", - "integrity": "sha512-OtU/EgQ1kIm5KwqQpBC6ZEMXrZRui11w8zgfTWp8cdO9B8OaPsbA8bTHO2P+HNo1VlUTGMVBwPhydu6poeXiag==", + "node_modules/test-exclude/node_modules/path-scurry": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", + "integrity": "sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==", "dev": true, - "license": "MIT" + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^10.2.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "engines": { + "node": ">=16 || 14 >=14.18" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } }, "node_modules/tinybench": { "version": "6.2.3", @@ -1236,6 +6314,141 @@ "optional": true, "peer": true }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "license": "MIT", + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "dev": true, + "license": "MIT" + }, + "node_modules/unrs-resolver": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/unrs-resolver/-/unrs-resolver-1.13.0.tgz", + "integrity": "sha512-mcPQo9Vm6kXd84d/WqMiYBi2CcA57QHBX/ev5PoUEb8b2oQzUvJ6xYsfseQblnCncgnVmCZGWiFwK7KkS5JZJA==", + "dev": true, + "license": "MIT", + "dependencies": { + "napi-postinstall": "^0.3.7" + }, + "funding": { + "url": "https://opencollective.com/unrs-resolver" + }, + "optionalDependencies": { + "@unrs/resolver-binding-android-arm-eabi": "1.13.0", + "@unrs/resolver-binding-android-arm64": "1.13.0", + "@unrs/resolver-binding-darwin-arm64": "1.13.0", + "@unrs/resolver-binding-darwin-x64": "1.13.0", + "@unrs/resolver-binding-freebsd-x64": "1.13.0", + "@unrs/resolver-binding-linux-arm-gnueabihf": "1.13.0", + "@unrs/resolver-binding-linux-arm-musleabihf": "1.13.0", + "@unrs/resolver-binding-linux-arm64-gnu": "1.13.0", + "@unrs/resolver-binding-linux-arm64-musl": "1.13.0", + "@unrs/resolver-binding-linux-loong64-gnu": "1.13.0", + "@unrs/resolver-binding-linux-loong64-musl": "1.13.0", + "@unrs/resolver-binding-linux-ppc64-gnu": "1.13.0", + "@unrs/resolver-binding-linux-riscv64-gnu": "1.13.0", + "@unrs/resolver-binding-linux-riscv64-musl": "1.13.0", + "@unrs/resolver-binding-linux-s390x-gnu": "1.13.0", + "@unrs/resolver-binding-linux-x64-gnu": "1.13.0", + "@unrs/resolver-binding-linux-x64-musl": "1.13.0", + "@unrs/resolver-binding-openharmony-arm64": "1.13.0", + "@unrs/resolver-binding-win32-arm64-msvc": "1.13.0", + "@unrs/resolver-binding-win32-ia32-msvc": "1.13.0", + "@unrs/resolver-binding-win32-x64-msvc": "1.13.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.4.0.tgz", + "integrity": "sha512-WPJuOnjI9FWDct4fB+ej4Mz8opLaw5CDcZ2t44tFZ0vIQVYWzBhWR3mkixuUj/A7+vY4V9+ApOZ2YYLwdgq46w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/v8-to-istanbul": { + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", + "dev": true, + "license": "ISC", + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, "node_modules/vite": { "version": "8.3.8", "resolved": "https://registry.npmjs.org/vite/-/vite-8.3.8.tgz", @@ -1398,6 +6611,22 @@ } } }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/why-is-node-running": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-3.2.1.tgz", @@ -1411,6 +6640,97 @@ "node": ">=20.11" } }, + "node_modules/word-wrap": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", + "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/write-file-atomic": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-5.0.1.tgz", + "integrity": "sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==", + "dev": true, + "license": "ISC", + "dependencies": { + "imurmurhash": "^0.1.4", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": "^14.17.0 || ^16.13.0 || >=18.0.0" + } + }, + "node_modules/write-file-atomic/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, "node_modules/yaml": { "version": "2.9.1", "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz", @@ -1426,6 +6746,48 @@ "funding": { "url": "https://github.com/sponsors/eemeli" } + }, + "node_modules/yargs": { + "version": "17.7.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", + "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } } } diff --git a/tests/continuous-integration/package.json b/tests/continuous-integration/package.json index 0d166d7a..ba73465b 100644 --- a/tests/continuous-integration/package.json +++ b/tests/continuous-integration/package.json @@ -9,8 +9,11 @@ }, "devDependencies": { "@actions/expressions": "0.3.61", - "yaml": "2.9.1", + "@biomejs/biome": "2.6.9", + "@vitest/coverage-v8": "5.1.1", + "eslint": "10.16.0", + "jest": "30.5.2", "vitest": "5.1.1", - "@vitest/coverage-v8": "5.1.1" + "yaml": "2.9.1" } } diff --git a/tests/continuous-integration/presets.test.js b/tests/continuous-integration/presets.test.js new file mode 100644 index 00000000..b636bdda --- /dev/null +++ b/tests/continuous-integration/presets.test.js @@ -0,0 +1,158 @@ +import assert from "node:assert/strict"; +import { spawnSync } from "node:child_process"; +import fs from "node:fs"; +import { createRequire } from "node:module"; +import os from "node:os"; +import path from "node:path"; +import { describe, it } from "node:test"; + +const require = createRequire(import.meta.url); +const { TestCommand } = require("../../actions/test/src/TestCommand.cjs"); +const { LintCommand } = require("../../actions/lint/src/LintCommand.cjs"); +const execCommand = "npm exec --offline --no --"; + +const fixture = (t, files) => { + const project = fs.mkdtempSync(path.join(os.tmpdir(), "native-presets-")); + t.after(() => fs.rmSync(project, { recursive: true, force: true })); + fs.symlinkSync( + path.join(import.meta.dirname, "node_modules"), + path.join(project, "node_modules"), + "junction", + ); + for (const [file, contents] of Object.entries(files)) + fs.writeFileSync(path.join(project, file), contents); + return project; +}; + +const execute = (invocation, project) => { + const env = { + ...process.env, + CI: "true", + npm_config_cache: path.join(project, ".npm-cache"), + }; + delete env.NODE_TEST_CONTEXT; + delete env.NODE_V8_COVERAGE; + const [command, ...prefix] = invocation.command.split(" "); + const result = spawnSync(command, [...prefix, ...invocation.args], { + cwd: project, + env, + encoding: "utf8", + timeout: 30000, + }); + assert.ifError(result.error); + return result; +}; + +describe("native engine presets", () => { + for (const engine of ["vitest", "jest"]) { + it(`${engine} retains failed tests with coverage and disables collection independently`, (t) => { + // Arrange + const source = + engine === "vitest" + ? "export const add = value => value + 1;" + : "exports.add = value => value + 1;"; + const test = + engine === "vitest" + ? "import {test, expect} from 'vitest'; import {add} from './source.js'; test('addition', () => expect(add(1)).toBe(3));" + : "const {add} = require('./source.js'); test('addition', () => expect(add(1)).toBe(3));"; + const configuration = + engine === "vitest" + ? { + "vitest.config.js": + "import {defineConfig} from 'vitest/config'; export default defineConfig({test:{include:['example.test.js'],coverage:{provider:'v8',include:['source.js'],thresholds:{lines:100}}}});", + } + : { + "jest.config.cjs": + "module.exports = {testMatch:['**/example.test.js'],collectCoverageFrom:['source.js'],coverageThreshold:{global:{lines:100}}};", + }; + const project = fixture(t, { + "package.json": JSON.stringify({ + private: true, + type: engine === "vitest" ? "module" : "commonjs", + devDependencies: { [engine]: "*" }, + }), + "source.js": source, + "example.test.js": test, + ...configuration, + }); + for (const coverage of [true, false]) { + const directory = path.join(project, `reports ${coverage}`); + fs.mkdirSync(directory); + const invocation = TestCommand.create({ + project, + directory, + execCommand, + coverage, + args: engine === "jest" ? ["--runInBand"] : [], + }); + // Act + const result = execute(invocation, project); + // Assert + assert.equal(result.status, 1, result.stdout + result.stderr); + const report = JSON.parse( + fs.readFileSync(path.join(directory, "results.json"), "utf8"), + ); + assert.equal(report.numFailedTests, 1); + assert.equal( + Object.keys(report.coverageMap || {}).length > 0, + coverage, + ); + } + }); + } + + for (const [engine, dependency, configuration, file] of [ + [ + "biome", + "@biomejs/biome", + { + "biome.json": JSON.stringify({ + linter: { + rules: { recommended: false, suspicious: { noDebugger: "error" } }, + }, + }), + }, + "lint.sarif", + ], + [ + "eslint", + "eslint", + { + "eslint.config.mjs": + "export default [{files:['**/*.js'],rules:{'no-debugger':'error'}}];", + }, + "lint.json", + ], + ]) { + it(`${engine} retains native findings and fails the command`, (t) => { + // Arrange + const project = fixture(t, { + "package.json": JSON.stringify({ + private: true, + devDependencies: { [dependency]: "*" }, + }), + "source.js": "debugger;\n", + ...configuration, + }); + const directory = path.join(project, "reports with spaces"); + fs.mkdirSync(directory); + const invocation = LintCommand.create({ + project, + directory, + execCommand, + }); + // Act + const result = execute(invocation, project); + // Assert + assert.equal(result.status, 1, result.stdout + result.stderr); + const report = JSON.parse( + fs.readFileSync(path.join(directory, file), "utf8"), + ); + const findings = + engine === "biome" + ? report.runs.flatMap((run) => run.results) + : report.flatMap((item) => item.messages); + assert.ok(findings.some((finding) => /debugger/i.test(finding.ruleId))); + }); + } +}); diff --git a/tests/continuous-integration/sharding.test.js b/tests/continuous-integration/sharding.test.js index 6c991ab3..08994e8d 100644 --- a/tests/continuous-integration/sharding.test.js +++ b/tests/continuous-integration/sharding.test.js @@ -12,6 +12,7 @@ import shardsModule from "../../actions/test/TestShards.cjs"; const { TestShards } = shardsModule; const require = createRequire(import.meta.url); +const { TestCommand } = require("../../actions/test/src/TestCommand.cjs"); const packageDirectory = fileURLToPath(new URL(".", import.meta.url)); const actionDirectory = fileURLToPath( new URL("../../actions/test", import.meta.url), @@ -48,21 +49,9 @@ function fixture(t) { return { configuration, merger, record }; } -test("script arguments preserve spaces and shell syntax without expansion", () => { +test("arguments preserve spaces and shell syntax without expansion", () => { const args = TestShards.arguments('["--config","a b.js","$(not-a-command)"]'); - assert.deepEqual(TestShards.scriptArguments("npm run", "test:ci", args), [ - "test:ci", - "--", - ...args, - ]); - for (const manager of ["pnpm", "yarn"]) - assert.deepEqual(TestShards.scriptArguments(manager, "test:ci", args), [ - "test:ci", - ...args, - ]); - assert.deepEqual(TestShards.scriptArguments("npm run", "test:ci", []), [ - "test:ci", - ]); + assert.deepEqual(args, ["--config", "a b.js", "$(not-a-command)"]); for (const input of ['"--coverage"', "[1]", '["\\u0000"]']) assert.throws(() => TestShards.arguments(input), /arguments/); }); @@ -182,36 +171,31 @@ test("real Vitest merging preserves inventory, coverage, thresholds and failed t "dir", ); const cli = path.join(packageDirectory, "node_modules/vitest/vitest.mjs"); - const run = (args, env = {}) => - spawnSync( - process.execPath, - [ - cli, - "run", - "--config", - "fixtures/vitest.config.mjs", - "--reporter=default", - "--reporter=json", - "--outputFile.json=coverage/sharding/results.json", - ...args, - ], - { - cwd: project, - env: { - ...process.env, - CI: "true", - CI_TEST_SHARD: "", - CI_TEST_MERGE: args.some((arg) => arg.startsWith("--merge-reports=")) - ? "true" - : "false", - CI_REPORTS_DIR: "", - CI_TEST_COVERAGE: "true", - ...env, - }, - encoding: "utf8", - timeout: 30_000, + const run = (args, env = {}) => { + const merge = args.some((arg) => arg.startsWith("--merge-reports=")); + const invocation = TestCommand.create({ + engine: "vitest", + directory: path.join(project, "coverage/sharding"), + coverage: true, + shard: Boolean(env.CI_TEST_SHARD), + merge, + args: ["--config", "fixtures/vitest.config.mjs", ...args], + }); + return spawnSync(process.execPath, [cli, ...invocation.args.slice(1)], { + cwd: project, + env: { + ...process.env, + CI: "true", + CI_TEST_SHARD: "", + CI_TEST_MERGE: String(merge), + CI_REPORTS_DIR: "", + CI_TEST_COVERAGE: "true", + ...env, }, - ); + encoding: "utf8", + timeout: 30_000, + }); + }; const assertSuccess = (result) => assert.equal(result.status, 0, `${result.stdout}\n${result.stderr}`); const report = () => @@ -247,7 +231,7 @@ test("real Vitest merging preserves inventory, coverage, thresholds and failed t }; } const lcov = fs.readFileSync( - path.join(project, "coverage/sharding/lcov.info"), + path.join(project, "coverage/sharding/coverage/lcov.info"), "utf8", ); const lines = [...lcov.matchAll(/^DA:(\d+),(\d+)$/gm)]; From d15ca1156054e38c3cfd5316b144606e6ee03d41 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 3 Dec 2026 12:13:23 +0100 Subject: [PATCH 44/48] ci: show the repository linter summary only in CI reports --- .github/workflows/__checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/__checks.yml b/.github/workflows/__checks.yml index 51304701..e6d933aa 100644 --- a/.github/workflows/__checks.yml +++ b/.github/workflows/__checks.yml @@ -12,7 +12,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@cc9b360c9d6fc794dcc1797d4358e16b3f6b5e0b # PR #683 (unreleased) permissions: actions: read contents: read From 80d9b7aeea132162b685dece89ed5531f685dc8a Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 3 Dec 2026 14:12:31 +0100 Subject: [PATCH 45/48] ci: adopt separate test and lint report comments --- .github/workflows/__shared-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index 19d4c7b7..ef64bb40 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -21,7 +21,7 @@ jobs: reports: if: always() needs: checks - uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@a57403ecded4ed077dc24a6574953f7c46e69224 # PR #683 (unreleased) permissions: actions: read contents: read From 4a81243248d9ee9569eb3134b5ef862f378da4b2 Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 3 Dec 2026 14:56:45 +0100 Subject: [PATCH 46/48] ci: display lint before tests in reports --- .github/workflows/__shared-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index ef64bb40..d9e42fea 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -21,7 +21,7 @@ jobs: reports: if: always() needs: checks - uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@a57403ecded4ed077dc24a6574953f7c46e69224 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@0ad84c70926a266244e95a652034fb098a4d5399 # PR #683 (unreleased) permissions: actions: read contents: read From 077eee7f2d3d34da36953a595932805f18a02cac Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 3 Dec 2026 19:43:35 +0100 Subject: [PATCH 47/48] build(deps): update ci-github-common to 5.0.0 --- .github/workflows/__checks.yml | 2 +- .../__commit-action-distributions.yml | 2 +- .github/workflows/__greetings.yml | 2 +- .github/workflows/__need-fix-to-issue.yml | 2 +- .../__rebuild-action-distributions.yml | 2 +- .github/workflows/__semantic-pull-request.yml | 2 +- .github/workflows/__shared-ci.yml | 4 ++-- .github/workflows/__stale.yml | 2 +- .github/workflows/__test-action-lint.yml | 2 +- .../__test-action-package-create.yml | 2 +- .github/workflows/__test-action-test.yml | 4 ++-- ...__test-workflow-continuous-integration.yml | 6 ++--- .github/workflows/continuous-integration.md | 2 +- .github/workflows/continuous-integration.yml | 22 +++++++++---------- actions/build/action.yml | 2 +- actions/dependencies-cache/action.yml | 2 +- actions/get-package-manager/action.yml | 2 +- actions/has-installed-dependencies/action.yml | 2 +- actions/lint/action.yml | 4 ++-- actions/package/create/action.yml | 4 ++-- actions/package/publish/action.yml | 2 +- actions/setup-node/action.yml | 2 +- actions/test/action.yml | 4 ++-- docs/usage/test-reports.md | 2 +- 24 files changed, 41 insertions(+), 41 deletions(-) diff --git a/.github/workflows/__checks.yml b/.github/workflows/__checks.yml index e6d933aa..e6a9b43c 100644 --- a/.github/workflows/__checks.yml +++ b/.github/workflows/__checks.yml @@ -12,7 +12,7 @@ permissions: {} jobs: lint: name: linter - uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@cc9b360c9d6fc794dcc1797d4358e16b3f6b5e0b # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 permissions: actions: read contents: read diff --git a/.github/workflows/__commit-action-distributions.yml b/.github/workflows/__commit-action-distributions.yml index d8a83697..e84e197a 100644 --- a/.github/workflows/__commit-action-distributions.yml +++ b/.github/workflows/__commit-action-distributions.yml @@ -9,7 +9,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 permissions: actions: read contents: read diff --git a/.github/workflows/__greetings.yml b/.github/workflows/__greetings.yml index 53642414..2e4ef9a4 100644 --- a/.github/workflows/__greetings.yml +++ b/.github/workflows/__greetings.yml @@ -10,7 +10,7 @@ permissions: {} jobs: greetings: - uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 permissions: contents: read issues: write diff --git a/.github/workflows/__need-fix-to-issue.yml b/.github/workflows/__need-fix-to-issue.yml index ada8f725..f4df0577 100644 --- a/.github/workflows/__need-fix-to-issue.yml +++ b/.github/workflows/__need-fix-to-issue.yml @@ -18,7 +18,7 @@ permissions: {} jobs: main: - uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 permissions: contents: read issues: write diff --git a/.github/workflows/__rebuild-action-distributions.yml b/.github/workflows/__rebuild-action-distributions.yml index 9800892b..f6fe1af6 100644 --- a/.github/workflows/__rebuild-action-distributions.yml +++ b/.github/workflows/__rebuild-action-distributions.yml @@ -8,7 +8,7 @@ permissions: {} jobs: distributions: - uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 permissions: actions: read contents: read diff --git a/.github/workflows/__semantic-pull-request.yml b/.github/workflows/__semantic-pull-request.yml index 5ed432f9..2122f611 100644 --- a/.github/workflows/__semantic-pull-request.yml +++ b/.github/workflows/__semantic-pull-request.yml @@ -14,4 +14,4 @@ jobs: main: permissions: contents: read - uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 diff --git a/.github/workflows/__shared-ci.yml b/.github/workflows/__shared-ci.yml index d9e42fea..b7fe9255 100644 --- a/.github/workflows/__shared-ci.yml +++ b/.github/workflows/__shared-ci.yml @@ -21,7 +21,7 @@ jobs: reports: if: always() needs: checks - uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@0ad84c70926a266244e95a652034fb098a4d5399 # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 permissions: actions: read contents: read @@ -37,7 +37,7 @@ jobs: needs: - checks - reports - uses: hoverkraft-tech/ci-github-common/.github/workflows/check-jobs.yml@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/.github/workflows/check-jobs.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 permissions: {} with: job-results: ${{ toJSON(needs) }} diff --git a/.github/workflows/__stale.yml b/.github/workflows/__stale.yml index bca5e369..fcdfac8f 100644 --- a/.github/workflows/__stale.yml +++ b/.github/workflows/__stale.yml @@ -8,7 +8,7 @@ permissions: {} jobs: main: - uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 permissions: issues: write pull-requests: write diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index f71aecfc..2559b5b5 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/lint run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: working-directory: actions/lint - name: Arrange - Create a dependency-free lint project diff --git a/.github/workflows/__test-action-package-create.yml b/.github/workflows/__test-action-package-create.yml index 3cf4698a..d8412ef0 100644 --- a/.github/workflows/__test-action-package-create.yml +++ b/.github/workflows/__test-action-package-create.yml @@ -198,7 +198,7 @@ jobs: - name: Assert - Download package tarball artifact by ID id: download-package-tarball - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/download-artifact@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: artifact-ids: ${{ matrix.package-tarball-artifact-id }} path: ${{ runner.temp }} diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 7fdc35d6..3b05d378 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -26,7 +26,7 @@ jobs: working-directory: actions/test run: npm run check:dist - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@a4afe51a04cd4fcb7189f0f6e91ec479649af06f # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: working-directory: actions/test - name: Arrange - Create a dependency-free native test project @@ -56,7 +56,7 @@ jobs: coverage: "true" - name: Assert - Retrieve reports even after a failed test if: steps.test.outputs.report-artifact-id != '' - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/download-artifact@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: artifact-ids: ${{ steps.test.outputs.report-artifact-id }} path: downloaded-reports diff --git a/.github/workflows/__test-workflow-continuous-integration.yml b/.github/workflows/__test-workflow-continuous-integration.yml index 701e043d..d8f0d715 100644 --- a/.github/workflows/__test-workflow-continuous-integration.yml +++ b/.github/workflows/__test-workflow-continuous-integration.yml @@ -312,7 +312,7 @@ jobs: with: persist-credentials: false ref: ${{ github.event.pull_request.head.sha || github.sha }} - - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: artifact-ids: ${{ needs.act-without-container.outputs.build-artifact-id }} path: "/" @@ -504,7 +504,7 @@ jobs: with: persist-credentials: false ref: ${{ github.event.pull_request.head.sha || github.sha }} - - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: artifact-ids: ${{ needs.act-with-container.outputs.build-artifact-id }} path: ${{ runner.temp }} @@ -558,7 +558,7 @@ jobs: with: persist-credentials: false ref: ${{ github.event.pull_request.head.sha || github.sha }} - - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: artifact-ids: ${{ needs.act-with-container-advanced.outputs.build-artifact-id }} path: ${{ runner.temp }} diff --git a/.github/workflows/continuous-integration.md b/.github/workflows/continuous-integration.md index 1a6f07c6..91ceb4fa 100644 --- a/.github/workflows/continuous-integration.md +++ b/.github/workflows/continuous-integration.md @@ -40,7 +40,7 @@ Test actions merge shards natively; their coverage output remains separate. Producer calls require actions: read and contents: read. The caller publishes those artifacts once with `publish-ci-reports.yml`. -See the [common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/feat/native-github-coverage/.github/workflows/publish-ci-reports.md#consumer-workflow). +See the [common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/5.0.0/.github/workflows/publish-ci-reports.md#consumer-workflow). Prebuilt CI containers must include Git. They require a checkout for source verification and test.source-sha plus test.source-prefix identifying the tested source. diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 857a8b7b..b5845117 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -10,7 +10,7 @@ # Producer calls require actions: read and contents: read. # The caller publishes those artifacts once with `publish-ci-reports.yml`. -# See the [common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/feat/native-github-coverage/.github/workflows/publish-ci-reports.md#consumer-workflow). +# See the [common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/5.0.0/.github/workflows/publish-ci-reports.md#consumer-workflow). # Prebuilt CI containers must include Git. They require a checkout for source verification and # test.source-sha plus test.source-prefix identifying the tested source. @@ -568,7 +568,7 @@ jobs: security-events: write runs-on: *ci-runner steps: - - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + - uses: hoverkraft-tech/ci-github-common/actions/checkout@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 - id: code-ql-options uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 env: @@ -611,7 +611,7 @@ jobs: contents: read runs-on: *ci-runner steps: - - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + - uses: hoverkraft-tech/ci-github-common/actions/checkout@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 - uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1 lint: @@ -632,7 +632,7 @@ jobs: packages: read actions: read steps: - - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + - uses: hoverkraft-tech/ci-github-common/actions/checkout@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} @@ -688,7 +688,7 @@ jobs: outputs: artifact-id: ${{ steps.build.outputs.artifact-id }} steps: - - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + - uses: hoverkraft-tech/ci-github-common/actions/checkout@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 if: inputs.container == '' with: ref: ${{ github.event.pull_request.head.sha || github.sha }} @@ -743,12 +743,12 @@ jobs: max-parallel: ${{ fromJSON(needs.prepare.outputs.test-shards) }} matrix: ${{ fromJSON(needs.prepare.outputs.test-matrix) }} steps: - - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + - uses: hoverkraft-tech/ci-github-common/actions/checkout@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} - if: needs.build.outputs.artifact-id && inputs.container == '' - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/download-artifact@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: artifact-ids: ${{ needs.build.outputs.artifact-id }} path: "/" @@ -783,12 +783,12 @@ jobs: packages: read actions: read steps: - - uses: hoverkraft-tech/ci-github-common/actions/checkout@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + - uses: hoverkraft-tech/ci-github-common/actions/checkout@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: ref: ${{ github.event.pull_request.head.sha || github.sha }} - if: needs.build.outputs.artifact-id && inputs.container == '' - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/download-artifact@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: artifact-ids: ${{ needs.build.outputs.artifact-id }} path: "/" @@ -834,7 +834,7 @@ jobs: with: persist-credentials: false - id: working-directory - uses: hoverkraft-tech/ci-github-common/actions/working-directory@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/working-directory@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: working-directory: ${{ needs.prepare.outputs.working-directory }} - id: packages @@ -970,7 +970,7 @@ jobs: working-directory: ${{ inputs.working-directory }} install-dependencies: "false" - name: Download workspace tarballs - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/download-artifact@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: artifact-ids: ${{ needs.package-manifests.outputs.artifact-ids }} path: ${{ runner.temp }}/workspace-tarballs diff --git a/actions/build/action.yml b/actions/build/action.yml index e3894386..78ab2c30 100644 --- a/actions/build/action.yml +++ b/actions/build/action.yml @@ -74,7 +74,7 @@ runs: steps: # jscpd:ignore-start - id: working-directory - uses: hoverkraft-tech/ci-github-common/actions/working-directory@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/working-directory@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: working-directory: ${{ inputs.working-directory }} enforce-path-in-workspace: ${{ inputs.container == 'true' && 'false' || 'true' }} diff --git a/actions/dependencies-cache/action.yml b/actions/dependencies-cache/action.yml index 8ae8be01..9b51a87e 100644 --- a/actions/dependencies-cache/action.yml +++ b/actions/dependencies-cache/action.yml @@ -34,7 +34,7 @@ runs: steps: # jscpd:ignore-start - id: working-directory - uses: hoverkraft-tech/ci-github-common/actions/working-directory@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/working-directory@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: working-directory: ${{ inputs.working-directory }} enforce-path-in-workspace: "false" diff --git a/actions/get-package-manager/action.yml b/actions/get-package-manager/action.yml index d558b6d7..0acb455f 100644 --- a/actions/get-package-manager/action.yml +++ b/actions/get-package-manager/action.yml @@ -40,7 +40,7 @@ runs: using: "composite" steps: - id: working-directory - uses: hoverkraft-tech/ci-github-common/actions/working-directory@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/working-directory@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: working-directory: ${{ inputs.working-directory }} enforce-path-in-workspace: "false" diff --git a/actions/has-installed-dependencies/action.yml b/actions/has-installed-dependencies/action.yml index 8614a560..91103d8c 100644 --- a/actions/has-installed-dependencies/action.yml +++ b/actions/has-installed-dependencies/action.yml @@ -26,7 +26,7 @@ runs: steps: # jscpd:ignore-start - id: working-directory - uses: hoverkraft-tech/ci-github-common/actions/working-directory@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/working-directory@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: working-directory: ${{ inputs.working-directory }} enforce-path-in-workspace: "false" diff --git a/actions/lint/action.yml b/actions/lint/action.yml index 3d0433d8..7445a0b3 100644 --- a/actions/lint/action.yml +++ b/actions/lint/action.yml @@ -66,7 +66,7 @@ runs: steps: # jscpd:ignore-start - id: working-directory - uses: hoverkraft-tech/ci-github-common/actions/working-directory@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/working-directory@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: working-directory: ${{ inputs.working-directory }} enforce-path-in-workspace: ${{ inputs.container == 'true' && 'false' || 'true' }} @@ -167,7 +167,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} diff --git a/actions/package/create/action.yml b/actions/package/create/action.yml index 9481b052..ac4db475 100644 --- a/actions/package/create/action.yml +++ b/actions/package/create/action.yml @@ -65,7 +65,7 @@ runs: # jscpd:ignore-start - id: working-directory - uses: hoverkraft-tech/ci-github-common/actions/working-directory@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/working-directory@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: working-directory: ${{ inputs.working-directory }} enforce-path-in-workspace: "false" @@ -73,7 +73,7 @@ runs: - name: Download build artifacts if: inputs.build-artifact-id != '' - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/download-artifact@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: artifact-ids: ${{ inputs.build-artifact-id }} path: ${{ inputs.build-artifact-path }} diff --git a/actions/package/publish/action.yml b/actions/package/publish/action.yml index 410ea3b1..f9032146 100644 --- a/actions/package/publish/action.yml +++ b/actions/package/publish/action.yml @@ -109,7 +109,7 @@ runs: - name: Download package tarball id: download-package-tarball - uses: hoverkraft-tech/ci-github-common/actions/download-artifact@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/download-artifact@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: artifact-ids: ${{ inputs.package-tarball-artifact-id }} path: ${{ steps.validate.outputs.download-path }} diff --git a/actions/setup-node/action.yml b/actions/setup-node/action.yml index 7c7de627..aa7d08d1 100644 --- a/actions/setup-node/action.yml +++ b/actions/setup-node/action.yml @@ -62,7 +62,7 @@ runs: done # jscpd:ignore-start - id: working-directory - uses: hoverkraft-tech/ci-github-common/actions/working-directory@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/working-directory@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: working-directory: ${{ inputs.working-directory }} enforce-path-in-workspace: "false" diff --git a/actions/test/action.yml b/actions/test/action.yml index 8dd9e282..19fd7527 100644 --- a/actions/test/action.yml +++ b/actions/test/action.yml @@ -107,7 +107,7 @@ runs: steps: # jscpd:ignore-start - id: working-directory - uses: hoverkraft-tech/ci-github-common/actions/working-directory@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3 + uses: hoverkraft-tech/ci-github-common/actions/working-directory@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: working-directory: ${{ inputs.working-directory }} enforce-path-in-workspace: ${{ inputs.container == 'true' && 'false' || 'true' }} @@ -306,7 +306,7 @@ runs: - id: reports name: Prepare and retain reports if: ${{ !cancelled() && steps.prepare-reports.outcome == 'success' }} - uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@d2ffd56d454d76f14fef75ec9a3feeb0fb94843e # PR #683 (unreleased) + uses: hoverkraft-tech/ci-github-common/actions/quality/prepare-ci-reports@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 with: definition: ${{ steps.prepare-reports.outputs.definition }} directory: ${{ steps.prepare-reports.outputs.report-directory }} diff --git a/docs/usage/test-reports.md b/docs/usage/test-reports.md index 3011bdd4..580fb6b7 100644 --- a/docs/usage/test-reports.md +++ b/docs/usage/test-reports.md @@ -108,5 +108,5 @@ complete shard set and retains failed shard outcomes. Configure publication destinations and credentials on the outer `publish-ci-reports.yml` call. Follow the -[common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/feat/native-github-coverage/.github/workflows/publish-ci-reports.md#consumer-workflow) +[common reporting guide](https://github.com/hoverkraft-tech/ci-github-common/blob/5.0.0/.github/workflows/publish-ci-reports.md#consumer-workflow) for the caller workflow, permissions and separate completion gate. From 771ccbabcb08342645081938bb7c204009f8845e Mon Sep 17 00:00:00 2001 From: Emilien Escalle Date: Thu, 3 Dec 2026 23:04:34 +0100 Subject: [PATCH 48/48] ci: reuse shared action distribution tests --- .github/workflows/__checks.yml | 6 ++++++ .github/workflows/__test-action-lint.yml | 11 ----------- .github/workflows/__test-action-test.yml | 11 ----------- docs/development/reporting-actions.md | 9 ++++++--- 4 files changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/__checks.yml b/.github/workflows/__checks.yml index e6a9b43c..5b1e9af6 100644 --- a/.github/workflows/__checks.yml +++ b/.github/workflows/__checks.yml @@ -22,6 +22,12 @@ jobs: security-events: write statuses: write + test-bundled-actions: + needs: lint + uses: hoverkraft-tech/ci-github-common/.github/workflows/test-action-distributions.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 + permissions: + contents: read + test-release: name: Test release preparation and recovery uses: $/.github/workflows/__test-release.yml diff --git a/.github/workflows/__test-action-lint.yml b/.github/workflows/__test-action-lint.yml index 2559b5b5..fe5ea28d 100644 --- a/.github/workflows/__test-action-lint.yml +++ b/.github/workflows/__test-action-lint.yml @@ -18,17 +18,6 @@ jobs: with: persist-credentials: false ref: ${{ github.event.pull_request.head.sha || github.sha }} - - name: Arrange - Install action build dependencies - uses: $/actions/setup-node - with: - working-directory: actions/lint - - name: Assert - Verify the checked-in action distribution - working-directory: actions/lint - run: npm run check:dist - - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 - with: - working-directory: actions/lint - name: Arrange - Create a dependency-free lint project uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: diff --git a/.github/workflows/__test-action-test.yml b/.github/workflows/__test-action-test.yml index 3b05d378..6de17085 100644 --- a/.github/workflows/__test-action-test.yml +++ b/.github/workflows/__test-action-test.yml @@ -18,17 +18,6 @@ jobs: with: persist-credentials: false ref: ${{ github.event.pull_request.head.sha || github.sha }} - - name: Arrange - Install action build dependencies - uses: $/actions/setup-node - with: - working-directory: actions/test - - name: Assert - Verify the checked-in action distribution - working-directory: actions/test - run: npm run check:dist - - name: Assert - Verify the isolated action contracts - uses: hoverkraft-tech/ci-github-common/actions/quality/test-action-distribution@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0 - with: - working-directory: actions/test - name: Arrange - Create a dependency-free native test project uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: diff --git a/docs/development/reporting-actions.md b/docs/development/reporting-actions.md index 2951dd37..c5e1fe76 100644 --- a/docs/development/reporting-actions.md +++ b/docs/development/reporting-actions.md @@ -16,7 +16,10 @@ npm test --prefix actions/test npm run build --prefix actions/test ``` -Commit the updated distribution. Dedicated lint and test workflows verify -reproducibility, isolated distribution contracts and actual native report -retention. The outer `publish-ci-reports.yml` workflow handles publication. +Commit the updated distribution. Common's +[`test-action-distributions.yml`](https://github.com/hoverkraft-tech/ci-github-common/blob/5.0.0/.github/workflows/test-action-distributions.md) +discovers bundled actions, runs `check:dist` and tests isolated bundles on a host +and in a Node.js container. The package-owned scripts remain available locally. +Dedicated lint and test workflows verify actual native report retention. +The outer `publish-ci-reports.yml` workflow handles publication. See the [consumer guide](../usage/test-reports.md) for report generation.