Skip to content

Commit 1819f76

Browse files
committed
chore: wip
1 parent c8bae76 commit 1819f76

File tree

9 files changed

+61
-12
lines changed

9 files changed

+61
-12
lines changed

.vscode/dictionary.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ antfu
22
biomejs
33
booleanish
44
bumpp
5+
bumpx
56
bunfig
67
bunx
78
changelogen
@@ -18,9 +19,11 @@ deps
1819
destructurable
1920
dtsx
2021
entrypoints
22+
gitlint
2123
heroicons
2224
iconify
2325
lockb
26+
logsmith
2427
openweb
2528
outdir
2629
pausable

bun.lock

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"@stacksjs/launchpad": "workspace:*",
1212
"@stacksjs/logsmith": "^0.1.8",
1313
"@types/bun": "^1.2.20",
14-
"buddy-bot": "^0.8.9",
14+
"buddy-bot": "^0.8.10",
1515
"bun-git-hooks": "^0.2.19",
1616
"bun-plugin-dtsx": "0.9.5",
1717
"typescript": "^5.9.2",
@@ -50,7 +50,7 @@
5050
"dependencies": {
5151
"bunfig": "^0.11.1",
5252
"cac": "^6.7.14",
53-
"ts-pkgx": "^0.4.30",
53+
"ts-pkgx": "^0.4.51",
5454
},
5555
"devDependencies": {
5656
"bun-plugin-dtsx": "0.9.5",
@@ -858,7 +858,7 @@
858858

859859
"browserslist": ["[email protected]", "", { "dependencies": { "caniuse-lite": "^1.0.30001726", "electron-to-chromium": "^1.5.173", "node-releases": "^2.0.19", "update-browserslist-db": "^1.1.3" }, "bin": { "browserslist": "cli.js" } }, "sha512-KGj0KoOMXLpSNkkEI6Z6mShmQy0bc1I+T7K9N81k4WWMrfz+6fQ6es80B/YLAeRoKvjYE1YSHHOW1qe9xIVzHw=="],
860860

861-
"buddy-bot": ["[email protected].9", "", { "dependencies": { "@types/prompts": "^2.4.9", "bunfig": "^0.10.1", "cac": "6.7.14", "prompts": "^2.4.2", "ts-pkgx": "0.4.38" }, "bin": { "buddy-bot": "dist/bin/cli.js" } }, "sha512-X6JmnlBxTUYfmLB/L9HHGDhAc3pSnSopMQ8pv78rpzLyYqhuJmO5tHKin9LaPefGbJAL2A3xZTBJ2+CTLksKoA=="],
861+
"buddy-bot": ["[email protected].10", "", { "dependencies": { "@types/prompts": "^2.4.9", "bunfig": "^0.10.1", "cac": "6.7.14", "prompts": "^2.4.2", "ts-pkgx": "0.4.38" }, "bin": { "buddy-bot": "dist/bin/cli.js" } }, "sha512-qpS5+KOSC6Qq9/ujKnnUvXNHxXfFmRG6L5D7xb1KvC7tt1rbMRd0z7d453KDbS13TCvYT8VCLVZ4z1zcoZvziw=="],
862862

863863
"buffer-crc32": ["[email protected]", "", {}, "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ=="],
864864

@@ -1810,7 +1810,7 @@
18101810

18111811
"ts-declaration-location": ["[email protected]", "", { "dependencies": { "picomatch": "^4.0.2" }, "peerDependencies": { "typescript": ">=4.0.0" } }, "sha512-EDyGAwH1gO0Ausm9gV6T2nUvBgXT5kGoCMJPllOaooZ+4VvJiKBdZE7wK18N1deEowhcUptS+5GXZK8U/fvpwA=="],
18121812

1813-
"ts-pkgx": ["[email protected].38", "", { "dependencies": { "chromium-bidi": "^7.2.0", "electron": "^37.2.4", "js-yaml": "^4.1.0", "playwright": "^1.54.1" }, "bin": { "ts-pkgx": "dist/bin/cli.js" } }, "sha512-UJA8LikwMv+w66ZfMvLn0f6NuG1OZ49jifMaTWn2VjUe68RV8H1nzkO0ZB/QhlhRh5tKs1Htd+YVQNnOWpc7Bw=="],
1813+
"ts-pkgx": ["[email protected].51", "", { "dependencies": { "chromium-bidi": "^7.2.0", "electron": "^37.2.4", "js-yaml": "^4.1.0", "playwright": "^1.54.1" }, "bin": { "ts-pkgx": "dist/bin/cli.js" } }, "sha512-KH79XcMSja+4wBODcwtvySZTQmhvQyZ52+Angngg2wE5IKVuIbuUxUB7H10mTyDkeCX/NlhjAifAWP9XfsFjXQ=="],
18141814

18151815
"tslib": ["[email protected]", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
18161816

@@ -2074,6 +2074,8 @@
20742074

20752075
"buddy-bot/bunfig": ["[email protected]", "", { "bin": { "bunfig": "bin/cli.js" } }, "sha512-4IB0Te+W0Jk8LcaCK9PhZqH9KHbYBJuTr70kVPRpnCDEq2WMixRPWSzOYNOihnSJBUBse8WIi9V5Ym2cyK+MDA=="],
20762076

2077+
"buddy-bot/ts-pkgx": ["[email protected]", "", { "dependencies": { "chromium-bidi": "^7.2.0", "electron": "^37.2.4", "js-yaml": "^4.1.0", "playwright": "^1.54.1" }, "bin": { "ts-pkgx": "dist/bin/cli.js" } }, "sha512-UJA8LikwMv+w66ZfMvLn0f6NuG1OZ49jifMaTWn2VjUe68RV8H1nzkO0ZB/QhlhRh5tKs1Htd+YVQNnOWpc7Bw=="],
2078+
20772079
"chokidar/fsevents": ["[email protected]", "", { "os": "darwin" }, "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw=="],
20782080

20792081
"clean-regexp/escape-string-regexp": ["[email protected]", "", {}, "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg=="],

deps.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
dependencies:
2-
bun.sh: 1.2.20
2+
bun.com: 1.2.21

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"@stacksjs/launchpad": "workspace:*",
3939
"@stacksjs/logsmith": "^0.1.8",
4040
"@types/bun": "^1.2.20",
41-
"buddy-bot": "^0.8.9",
41+
"buddy-bot": "^0.8.10",
4242
"bun-git-hooks": "^0.2.19",
4343
"bun-plugin-dtsx": "0.9.5",
4444
"typescript": "^5.9.2"

packages/launchpad/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@stacksjs/launchpad",
33
"type": "module",
44
"version": "0.6.4",
5-
"packageManager": "bun",
5+
"packageManager": "bun@1.2.21",
66
"description": "Like Homebrew, but faster.",
77
"author": "Chris Breuer <[email protected]>",
88
"license": "MIT",
@@ -66,7 +66,7 @@
6666
"dependencies": {
6767
"bunfig": "^0.11.1",
6868
"cac": "^6.7.14",
69-
"ts-pkgx": "^0.4.30"
69+
"ts-pkgx": "^0.4.51"
7070
},
7171
"devDependencies": {
7272
"bun-plugin-dtsx": "0.9.5"

packages/launchpad/src/install-main.ts

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { config } from './config'
88
import { resolveAllDependencies } from './dependency-resolution'
99
import { installPackage } from './install-core'
1010
import { clearMessageCache, logUniqueMessage } from './logging'
11-
import { parsePackageSpec } from './package-resolution'
11+
import { getPackageInfo, parsePackageSpec, resolvePackageName } from './package-resolution'
1212
import { install_prefix } from './utils'
1313

1414
/**
@@ -79,6 +79,50 @@ export async function install(packages: PackageSpec | PackageSpec[], basePath?:
7979
}
8080
}
8181

82+
// Expand with companion packages (e.g., npm for node) using ts-pkgx metadata
83+
try {
84+
const seen = new Set<string>(deduplicatedPackages)
85+
const companionsToAdd: string[] = []
86+
87+
// Only guarantee companions for the user-requested packages
88+
for (const requested of packageList) {
89+
const { name } = parsePackageSpec(requested)
90+
const info = getPackageInfo(name)
91+
if (!info || !info.companions || info.companions.length === 0)
92+
continue
93+
94+
for (const comp of info.companions) {
95+
// Normalize companion identifier: allow aliases or domains
96+
const compName = parsePackageSpec(comp).name
97+
const normalized = resolvePackageName(compName)
98+
99+
// Avoid duplicates if already present either as alias, domain, or any versioned spec
100+
const alreadyPresent = Array.from(seen).some(p => {
101+
const n = parsePackageSpec(p).name
102+
const r = resolvePackageName(n)
103+
return r === normalized
104+
})
105+
106+
if (!alreadyPresent) {
107+
companionsToAdd.push(comp)
108+
seen.add(comp)
109+
}
110+
}
111+
}
112+
113+
if (companionsToAdd.length > 0) {
114+
if (config.verbose) {
115+
console.warn(`➕ Adding companion packages: ${companionsToAdd.join(', ')}`)
116+
}
117+
deduplicatedPackages.push(...companionsToAdd)
118+
}
119+
}
120+
catch (e) {
121+
if (config.verbose) {
122+
console.warn(`Failed to expand companions: ${e instanceof Error ? e.message : String(e)}`)
123+
}
124+
}
125+
82126
if (config.verbose) {
83127
console.warn(`Installing packages: ${deduplicatedPackages.join(', ')}`)
84128
console.warn(`Install path: ${installPath}`)

packages/launchpad/src/package.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export async function run(args: string[] = process.argv.slice(2)): Promise<void>
112112

113113
case 'dev:check-updates':
114114
{
115-
const { checkAndMaybeUpdate } = await import('./update-check')
115+
const { checkAndMaybeUpdate } = await import('./dev/update-check')
116116
const result = await checkAndMaybeUpdate({})
117117
if (process.env.CI === 'true' || process.env.GITHUB_ACTIONS === 'true') {
118118
// Print minimal output for CI diagnostics

packages/launchpad/src/dev/update-check.test.ts renamed to packages/launchpad/test/update-check.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, test } from 'bun:test'
22
import fs from 'node:fs'
33
import os from 'node:os'
44
import path from 'node:path'
5-
import { checkAndMaybeUpdate, getGlobalPaths, isMarkerStale, writeUpdateNotice } from './update-check'
5+
import { checkAndMaybeUpdate, getGlobalPaths, isMarkerStale, writeUpdateNotice } from '../src/dev/update-check'
66

77
function mkdtemp(): string {
88
const dir = fs.mkdtempSync(path.join(os.tmpdir(), 'lp-upd-'))

packages/launchpad/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"include": [
77
"src/**/*.ts",
88
"test/version.ts"
9-
],
9+
, "test/update-check.test.ts" ],
1010
"exclude": [
1111
"node_modules",
1212
"dist"

0 commit comments

Comments
 (0)