mirror of
https://github.com/rohitg00/skillkit.git
synced 2026-11-18 18:04:26 +00:00
chore: slim CLI install by making heavy deps optional
Move @skillkit/api, @skillkit/tui, @skillkit/mesh, @skillkit/messaging to optionalDependencies. Drop @skillkit/memory entirely — the CLI never imported it (only @skillkit/mcp-memory consumes it). Killing @skillkit/memory removes cozo-node (native Rust) and @xenova/transformers (~300MB ML stack) from the critical install path. Making @skillkit/tui optional removes @opentui/core's prebuild-install toolchain, which was the source of the inflight/gauge/npmlog/tar/glob deprecation warnings. Add skipNodeModulesBundle + platform=node + target=node18 to apps/skillkit tsup config so optional deps stay external. All TUI/mesh/messaging/api commands already lazy-import via dynamic import() with surrounding try/catch, so missing optional deps surface as a graceful error rather than a crash. Measured impact (npm i skillkit in a clean cache): Scenario Packages Time Deprecations Vulns (crit/high) main 544 37s 10 33 (5/5) slim (default) 475 18s 3 25 (0/0) slim --omit=optional 118 9s 0 0 Core commands (list, find, translate, recommend, install, --help, --version) smoke-tested in all three scenarios. Optional commands (ui, mesh, message, serve) confirmed to degrade with a clean "Cannot find package" error under --omit=optional.
This commit is contained in:
@@ -53,16 +53,17 @@
|
||||
"node": ">=18.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@skillkit/api": "workspace:*",
|
||||
"@skillkit/core": "workspace:*",
|
||||
"@skillkit/agents": "workspace:*",
|
||||
"@skillkit/cli": "workspace:*",
|
||||
"@skillkit/tui": "workspace:*",
|
||||
"@skillkit/memory": "workspace:*",
|
||||
"@skillkit/mesh": "workspace:*",
|
||||
"@skillkit/messaging": "workspace:*",
|
||||
"clipanion": "^4.0.0-rc.4"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@skillkit/api": "workspace:*",
|
||||
"@skillkit/tui": "workspace:*",
|
||||
"@skillkit/mesh": "workspace:*",
|
||||
"@skillkit/messaging": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.10.5",
|
||||
"tsup": "^8.3.5",
|
||||
|
||||
@@ -7,4 +7,7 @@ export default defineConfig({
|
||||
splitting: false,
|
||||
sourcemap: true,
|
||||
clean: true,
|
||||
platform: 'node',
|
||||
target: 'node18',
|
||||
skipNodeModulesBundle: true,
|
||||
});
|
||||
|
||||
@@ -22,14 +22,9 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@clack/prompts": "^0.11.0",
|
||||
"@skillkit/api": "workspace:*",
|
||||
"@skillkit/core": "workspace:*",
|
||||
"@skillkit/agents": "workspace:*",
|
||||
"@skillkit/resources": "workspace:*",
|
||||
"@skillkit/tui": "workspace:*",
|
||||
"@skillkit/memory": "workspace:*",
|
||||
"@skillkit/mesh": "workspace:*",
|
||||
"@skillkit/messaging": "workspace:*",
|
||||
"chalk": "^5.3.0",
|
||||
"clipanion": "^4.0.0-rc.4",
|
||||
"got": "^14.4.1",
|
||||
@@ -38,6 +33,12 @@
|
||||
"picocolors": "^1.1.1",
|
||||
"yaml": "^2.7.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"@skillkit/api": "workspace:*",
|
||||
"@skillkit/tui": "workspace:*",
|
||||
"@skillkit/mesh": "workspace:*",
|
||||
"@skillkit/messaging": "workspace:*"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^22.10.5",
|
||||
"tsup": "^8.3.5",
|
||||
|
||||
Generated
+76
-3366
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user