Skip to content

Commit a90d95a

Browse files
authored
perf: bundle tar-stream to reduce install footprint (#2286)
* perf: bundle tar-stream to reduce install footprint * fix: align bundled archive dependencies and simplify config
1 parent 0da105e commit a90d95a

4 files changed

Lines changed: 19 additions & 11 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@
268268
"dependencies": {
269269
"@limrun/api": "^0.24.5",
270270
"ipaddr.js": "^2.5.0",
271-
"tar-stream": "^3.2.0",
272271
"undici": "7.29.0",
273272
"yaml": "^2.9.0",
274273
"yauzl": "^3.4.0"
@@ -323,6 +322,7 @@
323322
"oxlint": "^1.79.0",
324323
"pngjs": "^7.0.0",
325324
"publint": "^0.3.24",
325+
"tar-stream": "^3.2.0",
326326
"tsdown": "^0.22.14",
327327
"typescript": "^7.0.2",
328328
"vite": "^8.2.1",

packages/host-kit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
"dependencies": {
88
"@agent-device/contracts": "workspace:*",
99
"@agent-device/kernel": "workspace:*",
10-
"tar-stream": "^3.2.0",
1110
"yauzl": "^3.4.0"
1211
},
1312
"devDependencies": {
1413
"@types/tar-stream": "^3.1.4",
15-
"@types/yauzl": "^3.4.0"
14+
"@types/yauzl": "^3.4.0",
15+
"tar-stream": "^3.2.0"
1616
},
1717
"exports": {
1818
"./archive": {

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tsdown.config.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,16 @@ export default defineConfig({
7676
'internal/update-check-entry': 'src/cli/update-check-entry.ts',
7777
},
7878
deps: {
79-
alwaysBundle: [/^@agent-device\//, 'pngjs'],
80-
onlyBundle: ['pngjs'],
79+
alwaysBundle: [/^@agent-device\//],
80+
onlyBundle: [
81+
'pngjs',
82+
'tar-stream',
83+
'streamx',
84+
'fast-fifo',
85+
'b4a',
86+
'text-decoder',
87+
'events-universal',
88+
],
8189
},
8290
inputOptions: {
8391
// A build with missing workspace links resolves nothing under `alwaysBundle` and emits the

0 commit comments

Comments
 (0)