PR #2300 moved 21 tree-sitter grammar packages from devDependencies into root dependencies, claiming "their .wasm files are loaded at runtime by parser.ts." That justification is wrong for the root claude-mem npm package: parser.ts compiles into plugin/scripts/worker-service.cjs, which runs from the marketplace folder where plugin/package.json already lists every grammar as a runtime dep. Nothing in dist/npx-cli/ ever loads a grammar, and resolveGrammarPath() handles missing packages gracefully. The regression: `npx claude-mem@12.6.1 install` now fetches all 21 grammars at npx time. tree-sitter-swift's postinstall pulls a nested tree-sitter-cli that downloads a Rust binary from GitHub and hangs the install. npm ignores the trustedDependencies bun-allowlist, so there's no way to skip the postinstall scripts on a bare `npx` fetch. Fix: move grammar packages back to root devDependencies. The marketplace plugin install (installPluginDependencies → bun install in plugin/) still works because plugin/package.json keeps them as deps and Bun honors trustedDependencies: ["tree-sitter-cli"] to skip the harmful postinstalls on every other grammar. Keep PR #2300's --legacy-peer-deps + --omit=dev install.ts changes — those address a separate, valid marketplace ERESOLVE. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+25
-25
@@ -118,13 +118,7 @@
|
||||
"dependencies": {
|
||||
"@anthropic-ai/claude-agent-sdk": "^0.2.119",
|
||||
"@clack/prompts": "^1.2.0",
|
||||
"@derekstride/tree-sitter-sql": "^0.3.11",
|
||||
"@modelcontextprotocol/sdk": "^1.29.0",
|
||||
"@tree-sitter-grammars/tree-sitter-lua": "^0.4.1",
|
||||
"@tree-sitter-grammars/tree-sitter-markdown": "^0.3.2",
|
||||
"@tree-sitter-grammars/tree-sitter-toml": "^0.7.0",
|
||||
"@tree-sitter-grammars/tree-sitter-yaml": "^0.7.1",
|
||||
"@tree-sitter-grammars/tree-sitter-zig": "^1.1.2",
|
||||
"ansi-to-html": "^0.7.2",
|
||||
"dompurify": "^3.4.1",
|
||||
"express": "^5.2.1",
|
||||
@@ -133,6 +127,31 @@
|
||||
"picocolors": "^1.1.1",
|
||||
"react": "^19.2.5",
|
||||
"react-dom": "^19.2.5",
|
||||
"yaml": "^2.8.3",
|
||||
"zod": "^4.3.6",
|
||||
"zod-to-json-schema": "^3.25.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@derekstride/tree-sitter-sql": "^0.3.11",
|
||||
"@tree-sitter-grammars/tree-sitter-lua": "^0.4.1",
|
||||
"@tree-sitter-grammars/tree-sitter-markdown": "^0.3.2",
|
||||
"@tree-sitter-grammars/tree-sitter-toml": "^0.7.0",
|
||||
"@tree-sitter-grammars/tree-sitter-yaml": "^0.7.1",
|
||||
"@tree-sitter-grammars/tree-sitter-zig": "^1.1.2",
|
||||
"@types/bun": "^1.3.13",
|
||||
"@types/cors": "^2.8.19",
|
||||
"@types/dompurify": "^3.2.0",
|
||||
"@types/express": "^5.0.6",
|
||||
"@types/node": "^25.6.0",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"esbuild": "^0.28.0",
|
||||
"jimp": "^1.6.1",
|
||||
"np": "^11.2.0",
|
||||
"parse5": "^8.0.1",
|
||||
"postcss": "^8.5.13",
|
||||
"remark-mdx": "^3.1.1",
|
||||
"remark-parse": "^11.0.0",
|
||||
"tree-sitter-bash": "^0.25.1",
|
||||
"tree-sitter-c": "^0.24.1",
|
||||
"tree-sitter-cli": "^0.26.8",
|
||||
@@ -152,25 +171,6 @@
|
||||
"tree-sitter-scss": "^1.0.0",
|
||||
"tree-sitter-swift": "^0.7.1",
|
||||
"tree-sitter-typescript": "^0.23.2",
|
||||
"yaml": "^2.8.3",
|
||||
"zod": "^4.3.6",
|
||||
"zod-to-json-schema": "^3.25.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/bun": "^1.3.13",
|
||||
"@types/cors": "^2.8.19",
|
||||
"@types/dompurify": "^3.2.0",
|
||||
"@types/express": "^5.0.6",
|
||||
"@types/node": "^25.6.0",
|
||||
"@types/react": "^19.2.14",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"esbuild": "^0.28.0",
|
||||
"jimp": "^1.6.1",
|
||||
"np": "^11.2.0",
|
||||
"parse5": "^8.0.1",
|
||||
"postcss": "^8.5.13",
|
||||
"remark-mdx": "^3.1.1",
|
||||
"remark-parse": "^11.0.0",
|
||||
"ts-prune": "^0.10.3",
|
||||
"tsx": "^4.21.0",
|
||||
"typescript": "^6.0.3",
|
||||
|
||||
Reference in New Issue
Block a user