Move dist/ generation out of test script into the release process
- Dominant language
- JavaScript
- Stars
- 9
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behaviour
Running npm test should only validate code correctness (unit tests + lint). The dist/ bundle should be generated as part of the release pipeline, ensuring it is always built in a clean, controlled CI environment.
Actual Behaviour
npm test runs npm run package (ncc build) which rebuilds dist/index.js. During the np release flow, this dirtied the working tree after tests pass, causing npm version to fail with "Git working directory not clean".
Contributor guide
Research direction
Start by inspecting the npm scripts that define npm test and npm run package, then trace how the np release flow invokes them. Verify that npm test runs only unit tests and lint, while the release process generates dist/index.js in a clean CI environment; confirm the release no longer fails because the working tree is dirty.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- build-system, ci-cd, release
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- Half a day
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100