{"_id":"@autotests/playwright-impact","_rev":"6-d57e23e081d070117ed60b42335fa546","name":"@autotests/playwright-impact","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"@autotests/playwright-impact","version":"0.1.0","license":"ISC","_id":"@autotests/playwright-impact@0.1.0","maintainers":[{"name":"autotests","email":"a.v.kiseliov@gmail.com"}],"dist":{"shasum":"79f0d791c9fa7f176ce5a0605d8b6629c5d4cf50","tarball":"https://registry.npmjs.org/@autotests/playwright-impact/-/playwright-impact-0.1.0.tgz","fileCount":28,"integrity":"sha512-cGm9sbwmUA87XODosb/fwu3fWkUlDOB6trekf3cEJyPlHVLdPHs8op+h3TNFluZjePlA/6Sa538wdh4Rl/5oJA==","signatures":[{"sig":"MEQCIFGf7qKMZUu+sdZHuny/C+3WqBcV6b5weNnH2jijqLWpAiBOV2Fbke9GH74PN+TotS++k0Skwf9Bf1kpp7qf6LhlCQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":186681},"main":"src/index.js","type":"commonjs","types":"src/index.d.ts","engines":{"node":">=18"},"exports":{".":"./src/index.js"},"gitHead":"c65a439107ec98aa044bbba157983ee68d7db7b1","scripts":{"test":"node --test tests/*.test.js"},"_npmUser":{"name":"autotests","email":"a.v.kiseliov@gmail.com"},"_npmVersion":"10.9.2","description":"Core impacted-test selection library for changed POM/method analysis","directories":{},"_nodeVersion":"22.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.2","@types/node":"^24.10.9"},"peerDependencies":{"typescript":">=5 <6"},"_npmOperationalInternal":{"tmp":"tmp/playwright-impact_0.1.0_1772099777083_0.9708757130614776","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@autotests/playwright-impact","version":"0.1.1","license":"ISC","_id":"@autotests/playwright-impact@0.1.1","maintainers":[{"name":"autotests","email":"a.v.kiseliov@gmail.com"}],"dist":{"shasum":"46b6dc024610cf3fa404173c41cb3e78cc8180f0","tarball":"https://registry.npmjs.org/@autotests/playwright-impact/-/playwright-impact-0.1.1.tgz","fileCount":28,"integrity":"sha512-4IMy5z8qbjD/1mDYZJhJztTiGa4MMNKwPRXAbA0LqrNuQqXIjGb3JvK/V7//4+9SsA7iEN4hkpYIX3BZZuBVNg==","signatures":[{"sig":"MEUCIQCqKK9reXInDSRxR+uNokJ/4yBiapRewItSQJKxHRo8dgIgWgJiCdBCIayHzVb2XdfsLq4NihyAfU62oyHqHO1x6/w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":186452},"main":"src/index.js","type":"commonjs","types":"src/index.d.ts","engines":{"node":">=18"},"exports":{".":"./src/index.js"},"gitHead":"592488e119215972fc16d33b3f70360a386a7b74","scripts":{"test":"node --test tests/*.test.js"},"_npmUser":{"name":"autotests","email":"a.v.kiseliov@gmail.com"},"_npmVersion":"10.9.2","description":"Core impacted-test selection library for changed POM/method analysis","directories":{},"_nodeVersion":"22.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.2","@types/node":"^24.10.9"},"peerDependencies":{"typescript":">=5 <6"},"_npmOperationalInternal":{"tmp":"tmp/playwright-impact_0.1.1_1772102749616_0.9348190752891545","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@autotests/playwright-impact","version":"0.1.2","license":"ISC","_id":"@autotests/playwright-impact@0.1.2","maintainers":[{"name":"autotests","email":"a.v.kiseliov@gmail.com"}],"homepage":"https://github.com/akiselevaristek/playwright-impact#readme","bugs":{"url":"https://github.com/akiselevaristek/playwright-impact/issues"},"dist":{"shasum":"726e6cfc9a26b075bfe5066ad575cf682cfff81c","tarball":"https://registry.npmjs.org/@autotests/playwright-impact/-/playwright-impact-0.1.2.tgz","fileCount":29,"integrity":"sha512-nSdW2CGg4g/6Natdtz8lrtB+Oo8DQVfVyoNdA3xM9QGKz/oCjeTmW1AqM1dfftV58Ux0JlxtdEb0lmZCsmw8TA==","signatures":[{"sig":"MEUCICwpd84YM994vMck6paW3YN1o9ynv0yLiahRzfjEBJ6FAiEAqDtN6pAVbhJqLKinHPbKyA7txI8t6el9nmsSzZLRv3k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187493},"main":"src/index.js","type":"commonjs","types":"src/index.d.ts","engines":{"node":">=18"},"exports":{".":"./src/index.js"},"gitHead":"4337a5e81b62dcd5ed235030cfb26fe4c7aa3bef","scripts":{"test":"node --test tests/*.test.js"},"_npmUser":{"name":"autotests","email":"a.v.kiseliov@gmail.com"},"repository":{"url":"git+https://github.com/akiselevaristek/playwright-impact.git","type":"git"},"_npmVersion":"10.9.2","description":"Core impacted-test selection library for changed POM/method analysis","directories":{},"_nodeVersion":"22.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.2","@types/node":"^24.10.9"},"peerDependencies":{"typescript":">=5 <6"},"_npmOperationalInternal":{"tmp":"tmp/playwright-impact_0.1.2_1772104219029_0.8194908162059553","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@autotests/playwright-impact","version":"0.1.3","license":"MIT","_id":"@autotests/playwright-impact@0.1.3","maintainers":[{"name":"autotests","email":"a.v.kiseliov@gmail.com"}],"homepage":"https://github.com/akiselevaristek/playwright-impact#readme","bugs":{"url":"https://github.com/akiselevaristek/playwright-impact/issues"},"dist":{"shasum":"69aff0372428f67555ebcbc185f2bfec4cfa1cb9","tarball":"https://registry.npmjs.org/@autotests/playwright-impact/-/playwright-impact-0.1.3.tgz","fileCount":29,"integrity":"sha512-kZxYE4Cto2ncfNZjidy6Gt6HxGZLfXEtWFEAPSNqYVc9liTl4blbZPUuliO61NZv2F9+y2KtADhyxhDkvfHLvQ==","signatures":[{"sig":"MEQCIEJmlcDKryV5sIscZyMj6nKz5q0kBNp6JKTF4wFi1O/qAiAPXcjbYLruUP/HkNhTMSy3lNdstu9UIPxbm+d79nbqKg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187596},"main":"src/index.js","type":"commonjs","types":"src/index.d.ts","engines":{"node":">=18"},"exports":{".":"./src/index.js"},"gitHead":"346343d814167b6a13edc9b9296752dcb6c2e492","scripts":{"test":"node --test tests/*.test.js"},"_npmUser":{"name":"autotests","email":"a.v.kiseliov@gmail.com"},"repository":{"url":"git+https://github.com/akiselevaristek/playwright-impact.git","type":"git"},"_npmVersion":"10.9.2","description":"Core impacted-test selection library for changed POM/method analysis","directories":{},"_nodeVersion":"22.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.2","@types/node":"^24.10.9"},"peerDependencies":{"typescript":">=5 <6"},"_npmOperationalInternal":{"tmp":"tmp/playwright-impact_0.1.3_1772107824968_0.7615159589405538","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@autotests/playwright-impact","version":"0.1.4","license":"MIT","_id":"@autotests/playwright-impact@0.1.4","maintainers":[{"name":"autotests","email":"a.v.kiseliov@gmail.com"}],"homepage":"https://github.com/akiselevaristek/playwright-impact#readme","bugs":{"url":"https://github.com/akiselevaristek/playwright-impact/issues"},"dist":{"shasum":"ff87724e2af0c1239c5794696310f6126a62edff","tarball":"https://registry.npmjs.org/@autotests/playwright-impact/-/playwright-impact-0.1.4.tgz","fileCount":15,"integrity":"sha512-FGTSus5S8vFxZygF9C/OZDkh9rQf68GXnRL6Bzpo/rgt4D5UkEonWZ7nTAM+VtYSgncEe3NySOUEf3i/ju+cqw==","signatures":[{"sig":"MEUCIQDpcUiCu7DXBX68K9+IKQpDDeFnCnxGmfHpm1RJubzpEAIgXlSDgwa/A0RaMGqCR4XK3UyaFeI9JpzpHWHe+y39Ymw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":105968},"main":"src/index.js","type":"commonjs","types":"src/index.d.ts","engines":{"node":">=18"},"exports":{".":"./src/index.js"},"gitHead":"dd54534c52c58af714382b475986e0d9f4f05cea","scripts":{"test":"node --test tests/*.test.js"},"_npmUser":{"name":"autotests","email":"a.v.kiseliov@gmail.com"},"repository":{"url":"git+https://github.com/akiselevaristek/playwright-impact.git","type":"git"},"_npmVersion":"10.9.2","description":"Core impacted-test selection library for changed POM/method analysis","directories":{},"_nodeVersion":"22.13.1","dependencies":{"isomorphic-git":"^1.37.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.2","@types/node":"^24.10.9"},"peerDependencies":{"typescript":">=5 <6"},"_npmOperationalInternal":{"tmp":"tmp/playwright-impact_0.1.4_1772110227675_0.6360782278974826","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@autotests/playwright-impact","version":"0.1.5","description":"Core impacted-test selection library for changed POM/method analysis","license":"MIT","repository":{"type":"git","url":"git+https://github.com/akiselevaristek/playwright-impact.git"},"main":"src/index.js","exports":{".":"./src/index.js"},"types":"src/index.d.ts","publishConfig":{"access":"public"},"type":"commonjs","engines":{"node":">=18"},"scripts":{"test":"node --test tests/*.test.js"},"peerDependencies":{"typescript":">=5 <6"},"devDependencies":{"@types/node":"^24.10.9","typescript":"^5.9.2"},"_id":"@autotests/playwright-impact@0.1.5","gitHead":"c900596115c57bfddde6e0048d9a676de3fca6e7","bugs":{"url":"https://github.com/akiselevaristek/playwright-impact/issues"},"homepage":"https://github.com/akiselevaristek/playwright-impact#readme","_nodeVersion":"22.13.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-FrU3xZdGTwlwYHWKFwnkcbGUAa0Uk+t5EeVH5tbSspBq1W9d7Rq3qfmkWPRIE1mB5i2DYgrUc9lIVXaHAuP8hg==","shasum":"8828c0c60bd30f13e20834343afb78e4702e8cee","tarball":"https://registry.npmjs.org/@autotests/playwright-impact/-/playwright-impact-0.1.5.tgz","fileCount":29,"unpackedSize":187596,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCON3IqdstbfFV1WXYWO481VrSwAu70IWG6PQiuvpHJkAIgQV/0lLmQZUnABtRGAVmKUs3pQTLhvpbMBrPiWf8P1LM="}]},"_npmUser":{"name":"autotests","email":"a.v.kiseliov@gmail.com"},"directories":{},"maintainers":[{"name":"autotests","email":"a.v.kiseliov@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/playwright-impact_0.1.5_1772111022178_0.4789312271346453"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-26T09:56:16.947Z","modified":"2026-02-26T13:03:42.489Z","0.1.0":"2026-02-26T09:56:17.223Z","0.1.1":"2026-02-26T10:45:49.779Z","0.1.2":"2026-02-26T11:10:19.182Z","0.1.3":"2026-02-26T12:10:25.104Z","0.1.4":"2026-02-26T12:50:27.834Z","0.1.5":"2026-02-26T13:03:42.350Z"},"bugs":{"url":"https://github.com/akiselevaristek/playwright-impact/issues"},"license":"MIT","homepage":"https://github.com/akiselevaristek/playwright-impact#readme","repository":{"type":"git","url":"git+https://github.com/akiselevaristek/playwright-impact.git"},"description":"Core impacted-test selection library for changed POM/method analysis","maintainers":[{"name":"autotests","email":"a.v.kiseliov@gmail.com"}],"readme":"# Playwright Spec Impact\n\nIf you use Playwright + POM and your CI runs are slow, this library selects only specs affected by your changes.\n\nIt reads changed files, finds impacted specs, and helps you run only what matters.\n\n## Install\n\n```bash\n// npm\nnpm i @autotests/playwright-impact\n\n// pnpm\npnpm add @autotests/playwright-impact\n```\n\n## Quick Start (Copy & Run)\n\n### Minimal working code\n\nCreate `impact.js` in your repo root:\n\n```js\nconst { analyzeImpactedSpecs } = require('@autotests/playwright-impact');\n\nconst result = analyzeImpactedSpecs({\n  repoRoot: process.cwd(),\n  profile: {\n    testsRootRelative: 'tests',\n    changedSpecPrefix: 'tests/',\n    isRelevantPomPath: (filePath) =>\n      (filePath.startsWith('src/pages/') || filePath.startsWith('src/utils/')) &&\n      (filePath.endsWith('.ts') || filePath.endsWith('.tsx')),\n  },\n});\n\nif (!result.hasAnythingToRun) {\n  console.log('No impacted specs found');\n  process.exit(0);\n}\n\nfor (const spec of result.selectedSpecsRelative) {\n  console.log(spec);\n}\n```\n\nSave as `impact.js`\n\nRun: `node impact.js`\n\nUse output paths in your Playwright CLI\n\n### What you need to change\n\nYou only need to adjust:\n\n- `testsRootRelative`: folder where your Playwright specs live.\n- `changedSpecPrefix`: prefix used to detect directly changed specs.\n- `isRelevantPomPath`: rule for which source files are treated as POM/utility inputs.\n\n### Example output\n\nExample output:\n\n```text\ntests/auth/login.spec.ts\ntests/cart/cart.spec.ts\n```\n\nIf nothing is impacted:\n\n```text\nNo impacted specs found\n```\n\n## Minimal CI Script\n\nUse this when your branch is compared to `origin/main`.\n\n```js\nconst { analyzeImpactedSpecs } = require('@autotests/playwright-impact');\n\nconst result = analyzeImpactedSpecs({\n  repoRoot: process.cwd(),\n  baseRef: 'origin/main',\n  profile: {\n    testsRootRelative: 'tests',\n    changedSpecPrefix: 'tests/',\n    isRelevantPomPath: (filePath) =>\n      (filePath.startsWith('src/pages/') || filePath.startsWith('src/utils/')) &&\n      (filePath.endsWith('.ts') || filePath.endsWith('.tsx')),\n  },\n});\n\nif (!result.hasAnythingToRun) {\n  console.log('No impacted specs found');\n  process.exit(0);\n}\n\nconsole.log(result.selectedSpecsRelative.join(' '));\n```\n\n## Typical CI Usage\n\n1. Compare current branch with `origin/main`.\n2. Compute impacted specs.\n3. Exit with `0` if nothing should run.\n4. Pass `selectedSpecsRelative` to your Playwright runner.\n\n## How It Works (High Level)\n\n1. Read changed files from Git.\n2. Include directly changed specs.\n3. Detect impacted specs from changed POM/utility code.\n4. Return a final spec list.\n\n## Advanced Config\n\nRequired:\n\n- `repoRoot`\n- `profile.testsRootRelative`\n- `profile.changedSpecPrefix`\n- `profile.isRelevantPomPath(filePath)`\n\nOptional:\n\n- `analysisRootsRelative`\n- `fixturesTypesRelative`\n- `baseRef`\n- `includeUntrackedSpecs`\n- `includeWorkingTreeWithBase`\n- `fileExtensions`\n- `selectionBias`\n\n## Advanced Diagnostics\n\n- `warnings`\n- `selectionReasons`\n- `coverageStats.uncertainCallSites`\n- `coverageStats.statusFallbackHits`\n- `changedEntriesBySource`\n\n## Reason Codes\n\n- `direct-changed-spec`\n- `matched-precise`\n- `matched-uncertain-fail-open`\n- `retained-no-bindings`\n","readmeFilename":"README.md"}