From 9412d636461243974a65d1ca4decd1aae143c893 Mon Sep 17 00:00:00 2001 From: JeremyDev87 Date: Fri, 3 Apr 2026 22:50:23 +0900 Subject: [PATCH] fix(plugin): add .npmignore to exclude test/runtime artifacts (#1205) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- packages/claude-code-plugin/.npmignore | 14 ++++++++++++++ packages/claude-code-plugin/hooks/.npmignore | 13 +++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 packages/claude-code-plugin/.npmignore create mode 100644 packages/claude-code-plugin/hooks/.npmignore diff --git a/packages/claude-code-plugin/.npmignore b/packages/claude-code-plugin/.npmignore new file mode 100644 index 00000000..1d3003ec --- /dev/null +++ b/packages/claude-code-plugin/.npmignore @@ -0,0 +1,14 @@ +# Build/Dev artifacts +dist/ +src/ +coverage/ +*.tsbuildinfo + +# Python cache +__pycache__/ +*.pyc +*.pyo +.pytest_cache/ + +# Note: hooks/ test/runtime exclusions are in hooks/.npmignore +# (root .npmignore cannot override package.json "files" field) diff --git a/packages/claude-code-plugin/hooks/.npmignore b/packages/claude-code-plugin/hooks/.npmignore new file mode 100644 index 00000000..9152130f --- /dev/null +++ b/packages/claude-code-plugin/hooks/.npmignore @@ -0,0 +1,13 @@ +# Runtime artifacts +.omc/ + +# Test files +test_*.py +tests/ +lib/test_*.py + +# Python cache +__pycache__/ +*.pyc +*.pyo +.pytest_cache/