From f65ecab850222d3f89713bb5063b7007b351ba67 Mon Sep 17 00:00:00 2001 From: znetsixe Date: Tue, 19 May 2026 22:26:26 +0200 Subject: [PATCH] =?UTF-8?q?build:=20add=20root=20.npmignore=20=E2=80=94=20?= =?UTF-8?q?175=20MB=20=E2=86=92=201.6=20MB=20pack?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The root EVOLV package was 175.8 MB because npm pack at the parent walks the full file tree and IGNORES per-submodule .npmignore files. The .gitignore fallback wasn't enough — it left .repo-mem/ (838 MB on disk), .claude/, .agents/, .codex, every submodule's wiki + tests + simulation harness, and the per-submodule CLAUDE.md files in the tarball. This .npmignore mirrors .gitignore for the dev-artifact baseline and then adds two more layers: 1. Repo-level dev tooling that .gitignore doesn't cover (tools/, docker/, scripts/, test/, wiki/, .repo-mem/, .claude/, …). 2. Per-submodule dev-only trees under nodes/*/ — necessary because npm pack at the root doesn't honour the submodule's own .npmignore. After: 1.6 MB tarball, 498 files, runtime content only (entry .js + .html, src/, package.json, examples/, generalFunctions datasets + coolprop.wasm, per-node README/LICENSE/CONTRACT). Removes the "npm warn gitignore-fallback" warning. Co-Authored-By: Claude Opus 4.7 (1M context) --- .npmignore | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 .npmignore diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..7846446 --- /dev/null +++ b/.npmignore @@ -0,0 +1,58 @@ +# === Mirrors .gitignore — same deny list applies when packing for npm, +# kept verbatim so npm pack doesn't fall back to .gitignore silently +# (warning: gitignore-fallback). === +node_modules/ +package-lock.json +*.tgz +*.log +npm-debug.log* +.env +.env.* +.DS_Store + +# === Memory + IDE state — NEVER ships (838 MB of .repo-mem alone) === +.repo-mem/ +.codex +.codex/ +.claude/ +.agents/ +CLAUDE.md +CLAUDE.local.md + +# === Repo-level dev tooling === +tools/ +docker/ +docker-compose.yml +Dockerfile +.dockerignore +.gitea/ +eslint.config.js +jest.config.js +scripts/ +test/ + +# === Repo-level docs not needed by Node-RED consumers === +wiki/ +CONTRACTS.md +.gitmodules + +# === Per-submodule dev-only trees === +# `npm pack` at the parent walks the file tree directly and IGNORES each +# submodule's own .npmignore. So we mirror the per-submodule deny lists +# here explicitly, otherwise the root tarball still bundles every test +# tree, wiki, simulation harness, screen recording, etc. — that's how +# the root pack was 175 MB before this file existed. +nodes/*/test/ +nodes/*/wiki/ +nodes/*/simulations/ +nodes/*/tools/ +nodes/*/scripts/ +nodes/*/CLAUDE.md +nodes/*/CLAUDE.local.md +nodes/*/.claude/ +nodes/*/.codex/ +nodes/*/.git +nodes/*/.gitignore +nodes/*/.npmignore +nodes/*/.eslintrc* +nodes/*/eslint.config.js