{"_id":"@affectively/devops-scripts","_rev":"4-044d34566c70d22a5f92f78a787b83fd","name":"@affectively/devops-scripts","dist-tags":{"latest":"5.0.0"},"versions":{"1.0.0":{"name":"@affectively/devops-scripts","version":"1.0.0","keywords":["devops","monorepo","testing","nx","typescript","accessibility","automation","ci-cd"],"author":{"name":"AFFECTIVELY","email":"opensource@affectively.app"},"license":"MIT","_id":"@affectively/devops-scripts@1.0.0","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"homepage":"https://github.com/affectively-ai/devops-scripts#readme","bugs":{"url":"https://github.com/affectively-ai/devops-scripts/issues"},"bin":{"find-unused-deps":"dist/find-unused-deps.js","run-changed-tests":"dist/run-changed-tests.js","audit-accessibility":"dist/audit-accessibility.js","run-changed-typecheck":"dist/run-changed-typecheck.js"},"dist":{"shasum":"2907307e0157c958411428442522ab8d99f8621d","tarball":"https://registry.npmjs.org/@affectively/devops-scripts/-/devops-scripts-1.0.0.tgz","fileCount":26,"integrity":"sha512-r4emZYM8Ak8yHSN+I/u9d0qbTW4lDnqjNsUL7kGpyZx8QhpM8dUQLAC1iQh8F2DswplOu8XEbl08yFHwovcVEw==","signatures":[{"sig":"MEUCIHnQ4DvF1+jesF1kJRBT3Q/YfYnUPBnxAOXVfCKJRn8vAiEA+0ihtr6UnONPqV1hfi5kgnft81zrMJm0ByTRaPI5ERg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89675},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./find-unused-deps":"./dist/find-unused-deps.js","./run-changed-tests":"./dist/run-changed-tests.js","./audit-accessibility":"./dist/audit-accessibility.js","./run-changed-typecheck":"./dist/run-changed-typecheck.js"},"gitHead":"2f2da6bc47af82e3df07990eabadc781d90f0066","scripts":{"test":"bun test","build":"tsup src/index.ts src/run-changed-tests.ts src/run-changed-typecheck.ts src/audit-accessibility.ts src/find-unused-deps.ts --format cjs,esm --dts","prepublishOnly":"npm run build"},"_npmUser":{"name":"buley","email":"buley@outlook.com"},"repository":{"url":"git+https://github.com/affectively-ai/devops-scripts.git","type":"git"},"_npmVersion":"11.6.2","description":"DevOps automation scripts for monorepos - changed-file testing, type-checking, accessibility auditing, and more.","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.9.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/devops-scripts_1.0.0_1768339413393_0.293494842050011","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is deprecated and no longer supported. Do not use."},"1.0.1":{"name":"@affectively/devops-scripts","version":"1.0.1","keywords":["devops","monorepo","testing","nx","typescript","accessibility","automation","ci-cd"],"author":{"name":"AFFECTIVELY","email":"opensource@affectively.ai"},"license":"MIT","_id":"@affectively/devops-scripts@1.0.1","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"homepage":"https://github.com/affectively-ai/devops-scripts#readme","bugs":{"url":"https://github.com/affectively-ai/devops-scripts/issues"},"bin":{"find-unused-deps":"dist/find-unused-deps.js","run-changed-tests":"dist/run-changed-tests.js","audit-accessibility":"dist/audit-accessibility.js","run-changed-typecheck":"dist/run-changed-typecheck.js"},"dist":{"shasum":"e0bb5de23c1853ff3b2ea0f6d59fd900ebaec103","tarball":"https://registry.npmjs.org/@affectively/devops-scripts/-/devops-scripts-1.0.1.tgz","fileCount":26,"integrity":"sha512-/1Dmaki0FBZimzYDv+dJyUI+2KC0d4+WxA7zOx+FPDaGjTcxdC3laylq0J0ACnlyW6oBXavxCTdGDyYkIky84w==","signatures":[{"sig":"MEUCIQDyawUCsdigueSyFm4PWhzY/49TKeQhk73ziG6ve8jnKAIgWalmToSGUrkLPaJg4j3r51/EvY1Upvhau8x+M1V+E0k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89661},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./find-unused-deps":"./dist/find-unused-deps.js","./run-changed-tests":"./dist/run-changed-tests.js","./audit-accessibility":"./dist/audit-accessibility.js","./run-changed-typecheck":"./dist/run-changed-typecheck.js"},"gitHead":"9b358587439c9d5407d1bcc9e5bcd3f447ad9444","scripts":{"test":"bun test","build":"tsup src/index.ts src/run-changed-tests.ts src/run-changed-typecheck.ts src/audit-accessibility.ts src/find-unused-deps.ts --format cjs,esm --dts","prepublishOnly":"npm run build"},"_npmUser":{"name":"buley","email":"buley@outlook.com"},"repository":{"url":"git+https://github.com/affectively-ai/devops-scripts.git","type":"git"},"_npmVersion":"11.6.2","description":"DevOps automation scripts for monorepos - changed-file testing, type-checking, accessibility auditing, and more.","directories":{},"_nodeVersion":"24.11.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.9.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/devops-scripts_1.0.1_1768341338051_0.3596617073265802","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is deprecated and no longer supported. Do not use."},"5.0.0":{"name":"@affectively/devops-scripts","version":"5.0.0","keywords":["devops","monorepo","testing","nx","typescript","accessibility","automation","ci-cd"],"author":{"name":"AFFECTIVELY","email":"opensource@affectively.ai"},"license":"MIT","_id":"@affectively/devops-scripts@5.0.0","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"homepage":"https://github.com/affectively-ai/devops-scripts#readme","bugs":{"url":"https://github.com/affectively-ai/devops-scripts/issues"},"bin":{"find-unused-deps":"dist/find-unused-deps.js","run-changed-tests":"dist/run-changed-tests.js","audit-accessibility":"dist/audit-accessibility.js","run-changed-typecheck":"dist/run-changed-typecheck.js"},"dist":{"shasum":"a278411484b7e3f5c05aa52ea8ff0d3b6d566d10","tarball":"https://registry.npmjs.org/@affectively/devops-scripts/-/devops-scripts-5.0.0.tgz","fileCount":26,"integrity":"sha512-mPU54n1rokYmb53ayf/yd7xeM/1D95uS+sOxlApAKwzRn1VnMsw970YQqhM4WFmA0+vvlF74LDagMmIJEYqhgw==","signatures":[{"sig":"MEYCIQC/7XD4xGqe6sOdbGND3k56VNd/ebkVGxwQ5ajuS/AhAQIhAP2nSFILkEi9Mh3QvzPvA0vU8w/rhs6UAaU/WPT/SlIv","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":94203},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./find-unused-deps":"./dist/find-unused-deps.js","./run-changed-tests":"./dist/run-changed-tests.js","./audit-accessibility":"./dist/audit-accessibility.js","./run-changed-typecheck":"./dist/run-changed-typecheck.js"},"scripts":{"test":"bun test","build":"tsup src/index.ts src/run-changed-tests.ts src/run-changed-typecheck.ts src/audit-accessibility.ts src/find-unused-deps.ts --format cjs,esm --dts","prepublishOnly":"npm run build"},"_npmUser":{"name":"buley","email":"buley@outlook.com"},"repository":{"url":"git+https://github.com/affectively-ai/devops-scripts.git","type":"git"},"_npmVersion":"11.8.0","description":"DevOps automation scripts for monorepos - changed-file testing, type-checking, accessibility auditing, and more.","directories":{},"_nodeVersion":"25.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","typescript":"^5.9.0","@types/node":"^22.0.0"},"_npmOperationalInternal":{"tmp":"tmp/devops-scripts_5.0.0_1773156241394_0.33479660860337","host":"s3://npm-registry-packages-npm-production"},"deprecated":"This package is deprecated and no longer supported. Do not use."}},"time":{"created":"2026-01-13T21:23:33.314Z","modified":"2026-03-27T20:03:29.482Z","1.0.0":"2026-01-13T21:23:33.520Z","1.0.1":"2026-01-13T21:55:38.215Z","5.0.0":"2026-03-10T15:24:01.619Z"},"bugs":{"url":"https://github.com/affectively-ai/devops-scripts/issues"},"author":{"name":"AFFECTIVELY","email":"opensource@affectively.ai"},"license":"MIT","homepage":"https://github.com/affectively-ai/devops-scripts#readme","keywords":["devops","monorepo","testing","nx","typescript","accessibility","automation","ci-cd"],"repository":{"url":"git+https://github.com/affectively-ai/devops-scripts.git","type":"git"},"description":"DevOps automation scripts for monorepos - changed-file testing, type-checking, accessibility auditing, and more.","maintainers":[{"name":"buley","email":"buley@outlook.com"}],"readme":"# @affectively/devops-scripts\r\n\r\nDevOps automation scripts for monorepos - changed-file testing, type-checking, accessibility auditing, and more.\r\n\r\n[![npm version](https://img.shields.io/npm/v/@affectively/devops-scripts.svg)](https://www.npmjs.com/package/@affectively/devops-scripts)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\r\n\r\n## Features\r\n\r\n- **Changed-File Testing** - Run tests only for files changed since a base branch\r\n- **Changed-File Type-Checking** - Type-check only changed files for faster CI\r\n- **Accessibility Auditing** - Automated WCAG compliance checking\r\n- **Monorepo Aware** - Works with Nx, Turborepo, and plain npm workspaces\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install -D @affectively/devops-scripts\r\n# or\r\nyarn add -D @affectively/devops-scripts\r\n# or\r\nbun add -D @affectively/devops-scripts\r\n```\r\n\r\n## Quick Start\r\n\r\n### Run Changed Tests\r\n\r\nRun tests only for files changed against your base branch:\r\n\r\n```bash\r\nnpx run-changed-tests\r\n# or specify a base ref\r\nnpx run-changed-tests origin/main\r\n```\r\n\r\n### Run Changed Type-Check\r\n\r\nType-check only changed files:\r\n\r\n```bash\r\nnpx run-changed-typecheck\r\n# or specify a base ref\r\nnpx run-changed-typecheck origin/development\r\n```\r\n\r\n## Usage in package.json\r\n\r\nAdd these to your `package.json` scripts:\r\n\r\n```json\r\n{\r\n \"scripts\": {\r\n \"test:changed\": \"run-changed-tests\",\r\n \"type-check:changed\": \"run-changed-typecheck\"\r\n }\r\n}\r\n```\r\n\r\n## How It Works\r\n\r\n### Changed File Detection\r\n\r\nThe scripts detect changed files using:\r\n1. `git diff --name-only <baseRef>...HEAD` (committed changes)\r\n2. `git status --porcelain` (staged/unstaged changes)\r\n\r\n### Nx Integration\r\n\r\nWhen Nx is detected, the scripts use `nx affected` for optimal performance:\r\n\r\n```bash\r\nnx affected -t test --base <baseRef> --parallel=6\r\n```\r\n\r\n### Fallback Mode\r\n\r\nWithout Nx, the scripts filter test files directly:\r\n- `*.test.ts`, `*.test.tsx`\r\n- Tests in `__tests__/` directories adjacent to changed files\r\n\r\n## API\r\n\r\nYou can also use these as library functions:\r\n\r\n```typescript\r\nimport { \r\n getChangedFiles, \r\n filterTestFiles, \r\n runChangedTests \r\n} from '@affectively/devops-scripts';\r\n\r\n// Get files changed since main\r\nconst files = getChangedFiles('origin/main');\r\n\r\n// Filter to just test files\r\nconst tests = filterTestFiles(files);\r\n\r\n// Run the full workflow\r\nawait runChangedTests({ baseRef: 'origin/main' });\r\n```\r\n\r\n## Configuration\r\n\r\n### Environment Variables\r\n\r\n```bash\r\n# Override the default base branch\r\nDEFAULT_BASE_REF=origin/development\r\n\r\n# Parallel test execution (Nx)\r\nNX_PARALLEL=6\r\n```\r\n\r\n## Why Use Changed-File Commands?\r\n\r\n| Approach | 1000-file monorepo | 50 changed files |\r\n|----------|-------------------|------------------|\r\n| Full test suite | ~10 minutes | ~10 minutes |\r\n| Changed-file tests | ~2 minutes | ~30 seconds |\r\n\r\n**Benefits:**\r\n- 10-100x faster feedback during development\r\n- Reduced CI costs\r\n- Faster pre-commit/pre-push hooks\r\n\r\n## License\r\n\r\nMIT License - see [LICENSE](./LICENSE) for details.\r\n\r\n---\r\n\r\nMade with ️ by [AFFECTIVELY](https://affectively.ai)\r\n","readmeFilename":"README.md"}