{"_id":"@benchcutlogic/reg-keygen-plugin","_rev":"3-bddbe977f754f04c2b125b9a4e2117a5","name":"@benchcutlogic/reg-keygen-plugin","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@benchcutlogic/reg-keygen-plugin","version":"0.1.0","keywords":["reg-suit","reg-suit-plugin","visual-regression","github-actions"],"_id":"@benchcutlogic/reg-keygen-plugin@0.1.0","maintainers":[{"name":"jpoehnelt","email":"justin.poehnelt@gmail.com"}],"homepage":"https://github.com/benchcutlogic/bench/tree/main/packages/reg-keygen-plugin","bugs":{"url":"https://github.com/benchcutlogic/bench/issues"},"dist":{"shasum":"2549aeb5091546f1534b736f6b68d9425743a98c","tarball":"https://registry.npmjs.org/@benchcutlogic/reg-keygen-plugin/-/reg-keygen-plugin-0.1.0.tgz","fileCount":3,"integrity":"sha512-eiO94AIZEvtD1luCgcu/AiSTFZKHF5lh++goc9IfTkdX/gDDTi8AltZKh5fdsKUxHBmaa0Db0BYKAHDT8dndIg==","signatures":[{"sig":"MEUCIDK5bWc8P5aFx3RWN7cNUMdiWZ/aXuixHAVAzOzXDBP0AiEA8BjVB9Sf0mP7aG9JAxE47zFrSFdjgJIYuyzHsMGZmGE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10085},"main":"./index.js","type":"commonjs","engines":{"node":">=18"},"exports":{".":"./index.js"},"scripts":{"test":"vitest run index.test.mjs","check":"prettier --check ."},"_npmUser":{"name":"jpoehnelt","email":"justin.poehnelt@gmail.com"},"repository":{"url":"git+https://github.com/benchcutlogic/bench.git","type":"git","directory":"packages/reg-keygen-plugin"},"_npmVersion":"10.9.4","description":"Deterministic GitHub Actions baseline keys for reg-suit visual regression testing.","directories":{},"_nodeVersion":"22.22.1","publishConfig":{"access":"public","registry":"https://registry.npmjs.org","provenance":true},"regSuitPlugin":{"recommended":false},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/reg-keygen-plugin_0.1.0_1787265567986_0.4207561890235385","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@benchcutlogic/reg-keygen-plugin","version":"0.1.1","keywords":["reg-suit","reg-suit-plugin","visual-regression","github-actions"],"license":"Apache-2.0","_id":"@benchcutlogic/reg-keygen-plugin@0.1.1","maintainers":[{"name":"jpoehnelt","email":"justin.poehnelt@gmail.com"}],"homepage":"https://github.com/benchcutlogic/bench/tree/main/packages/reg-keygen-plugin","bugs":{"url":"https://github.com/benchcutlogic/bench/issues"},"dist":{"shasum":"0b5c4ee5f342981f5e7c9691e5fc94b051211123","tarball":"https://registry.npmjs.org/@benchcutlogic/reg-keygen-plugin/-/reg-keygen-plugin-0.1.1.tgz","fileCount":4,"integrity":"sha512-GWwuovwmV2Mku83kHKwWgwD6taHi3lFhHCvweKZMlf3fN69zSEQCl00aUErrktHov+/ZO7PQxG2EIz0x5nGpkw==","signatures":[{"sig":"MEUCIF+C/z6JSdJxaWoiJgvHwiOJSrLdOu7EUhFYuCItIbBaAiEAl0Y7WE6T9Qk+xNu5LbBuGZ61Vq6DcNWqWDEVESo3dBc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21574},"main":"./index.js","type":"commonjs","_from":"file:benchcutlogic-reg-keygen-plugin-0.1.1.tgz","engines":{"node":">=18"},"exports":{".":"./index.js"},"scripts":{"test":"vitest run index.test.mjs","check":"prettier --check ."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ce2bbca6-31cf-4613-bb55-79aea9ee34bc"}},"_resolved":"/tmp/0861955f81910680950eec076d1b41a9/benchcutlogic-reg-keygen-plugin-0.1.1.tgz","_integrity":"sha512-GWwuovwmV2Mku83kHKwWgwD6taHi3lFhHCvweKZMlf3fN69zSEQCl00aUErrktHov+/ZO7PQxG2EIz0x5nGpkw==","repository":{"url":"git+https://github.com/benchcutlogic/bench.git","type":"git","directory":"packages/reg-keygen-plugin"},"_npmVersion":"11.17.0","description":"Deterministic GitHub Actions baseline keys for reg-suit visual regression testing.","directories":{},"_nodeVersion":"24.19.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org","provenance":false},"regSuitPlugin":{"recommended":false},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.11"},"_npmOperationalInternal":{"tmp":"tmp/reg-keygen-plugin_0.1.1_1787289950973_0.993463055304356","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"_id":"@benchcutlogic/reg-keygen-plugin@0.1.2","bugs":{"url":"https://github.com/benchcutlogic/bench/issues"},"dist":{"shasum":"60d8e2459f40700bddcfb75616a4b3c044d073e8","tarball":"https://registry.npmjs.org/@benchcutlogic/reg-keygen-plugin/-/reg-keygen-plugin-0.1.2.tgz","fileCount":4,"integrity":"sha512-uahziUoDABj+3Kt5TW0p07AMx5PX7rBIhRfKklFGGCAicb4G5q/QyxsR4nKj/gay4Z7OQ80hoEk2r/7hy+Pp0w==","signatures":[{"sig":"MEUCIQDNY/NM/UGD4IZZbCwKRKc7H2I0fEQ+2vVYTt2p+CkOCQIgLgkMPXdJzJACTX5FvSOwt13Pd9eF8r9n7FFiUNCkBEI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDCEATXRXs/60mZfPLEx85aRM0+stdP3jB7lh3ki7rMSAiBJnADds3wZJMel0XnZYVA7EQEy6zQoQVgzfIc+5LnBbw=="}],"unpackedSize":22092},"main":"./index.js","name":"@benchcutlogic/reg-keygen-plugin","type":"commonjs","_from":"file:benchcutlogic-reg-keygen-plugin-0.1.2.tgz","engines":{"node":">=18"},"exports":{".":"./index.js"},"license":"Apache-2.0","scripts":{"test":"vitest run index.test.mjs","check":"prettier --check ."},"version":"0.1.2","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ce2bbca6-31cf-4613-bb55-79aea9ee34bc"}},"homepage":"https://github.com/benchcutlogic/bench/tree/main/packages/reg-keygen-plugin","keywords":["reg-suit","reg-suit-plugin","visual-regression","github-actions"],"_resolved":"/tmp/61c58669d87f8a699226ba0cfe7e2d92/benchcutlogic-reg-keygen-plugin-0.1.2.tgz","_integrity":"sha512-uahziUoDABj+3Kt5TW0p07AMx5PX7rBIhRfKklFGGCAicb4G5q/QyxsR4nKj/gay4Z7OQ80hoEk2r/7hy+Pp0w==","repository":{"url":"git+https://github.com/benchcutlogic/bench.git","type":"git","directory":"packages/reg-keygen-plugin"},"_npmVersion":"11.19.0","description":"Deterministic GitHub Actions baseline keys for reg-suit visual regression testing.","directories":{},"maintainers":[{"name":"jpoehnelt","email":"justin.poehnelt@gmail.com"}],"_nodeVersion":"24.20.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org","provenance":false},"regSuitPlugin":{"recommended":false},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^4.1.11"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/reg-keygen-plugin_0.1.2_1788850981332_0.4036413009942834"}}},"time":{"created":"2026-08-20T22:39:27.784Z","modified":"2026-09-08T07:03:01.619Z","0.1.0":"2026-08-20T22:39:28.132Z","0.1.1":"2026-08-21T05:25:51.127Z","0.1.2":"2026-09-08T07:03:01.416Z"},"bugs":{"url":"https://github.com/benchcutlogic/bench/issues"},"license":"Apache-2.0","homepage":"https://github.com/benchcutlogic/bench/tree/main/packages/reg-keygen-plugin","keywords":["reg-suit","reg-suit-plugin","visual-regression","github-actions"],"repository":{"url":"git+https://github.com/benchcutlogic/bench.git","type":"git","directory":"packages/reg-keygen-plugin"},"description":"Deterministic GitHub Actions baseline keys for reg-suit visual regression testing.","maintainers":[{"name":"jpoehnelt","email":"justin.poehnelt@gmail.com"}],"readme":"# @benchcutlogic/reg-keygen-plugin\n\nA deterministic [reg-suit](https://github.com/reg-viz/reg-suit) key generator for GitHub Actions.\n\nUnlike `reg-keygen-git-hash-plugin`, it does not inspect every local and remote branch to choose a merge base. It uses the commit SHAs supplied by the workflow, avoiding stale or missing baselines in repositories with many long-lived branches.\n\n## Install\n\n```sh\nnpm install --save-dev @benchcutlogic/reg-keygen-plugin\n```\n\n## Configure\n\nAdd the plugin to `regconfig.json`:\n\n```json\n{\n\t\"plugins\": {\n\t\t\"@benchcutlogic/reg-keygen-plugin\": {}\n\t}\n}\n```\n\nOn pull request workflows, expose the head and base commit SHAs:\n\n```yaml\nenv:\n  GITHUB_HEAD_SHA: ${{ github.event.pull_request.head.sha }}\n  GITHUB_BASE_SHA: ${{ github.event.pull_request.base.sha }}\n```\n\n`GITHUB_EVENT_NAME` and `GITHUB_SHA` are already provided by GitHub Actions.\n\n## Key selection\n\n| Run                                     | Actual key                           | Expected key                               |\n| --------------------------------------- | ------------------------------------ | ------------------------------------------ |\n| `pull_request` or `pull_request_target` | `GITHUB_HEAD_SHA`, then `GITHUB_SHA` | `REG_EXPECTED_SHA`, then `GITHUB_BASE_SHA` |\n| `push` or `workflow_dispatch`           | `GITHUB_SHA`                         | No expected key; publish-only              |\n| Outside GitHub Actions                  | `git rev-parse HEAD`                 | First parent of `HEAD~1`                   |\n\n`REG_EXPECTED_SHA` is optional. Set it when a separate resolver has selected a published baseline commit. Every environment-derived key must be a full 40-character hexadecimal Git commit SHA; abbreviated SHAs are not valid object prefixes.\n\nWhen no valid expected key exists, the plugin rejects the lookup using reg-suit's no-baseline path. Consumers should ensure their comparison or approval policy does not silently accept an empty baseline.\n\n## Requirements\n\n- Node.js 18 or newer\n- reg-suit 0.14.x\n\n## License\n\n[Apache License 2.0](LICENSE)\n","readmeFilename":"README.md"}