fix(plugin): add .npmignore to exclude test/runtime artifacts (#1205)#1209
Merged
Conversation
Add hooks/.npmignore to exclude development and runtime files from the npm package. Root .npmignore cannot override package.json "files" field, so subdirectory-level .npmignore is used for hooks/ exclusions. Excluded: - .omc/ runtime state files - test_*.py test files (hooks root and lib/) - tests/ directory - __pycache__/, *.pyc, *.pyo, .pytest_cache/ Result: 64 → 50 files, 447KB → 320KB unpacked size.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
JeremyDev87
commented
Apr 3, 2026
JeremyDev87
left a comment
Owner
Author
There was a problem hiding this comment.
✅ Review complete — all comments addressed
Code Review:
- Root
.npmignore+ nestedhooks/.npmignoreapproach — verified working - npm pack: 69 files 448KB → 50 files 320KB (19 files, 128KB removed)
- Excluded:
.omc/runtime state,test_*.py,tests/,lib/test_*.py - All production hooks preserved
- CI: 27/27 checks pass (Vercel preview pending, non-blocking)
LGTM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hooks/.npmignoreto exclude development/runtime files from the npm package.npmignorefor build artifact exclusions (with note aboutfilesfield limitation).npmignorecannot overridepackage.jsonfilesfield per npm docs — subdirectory.npmignoreis requiredExcluded files
.omc/runtime state.omc/test_*.py(hooks root)test_*.pyhooks/tests/directorytests/hooks/lib/test_*.pylib/test_*.pyImpact
Production files (
hooks/lib/*.py,hooks/*.py,commands/,.claude-plugin/) are unaffected.Closes #1205
Test plan
npm pack --dry-runconfirms no.omc/,test_*.py,tests/fileshooks/lib/*.py,commands/, etc.)yarn lintpassesyarn typecheckpassesyarn testpasses (71 tests)