@shazhou/proman-core 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.2 — 2026-06-13
|
|
4
|
+
|
|
5
|
+
- Fix build regression: cli type falls back to tsc when no build script
|
|
6
|
+
|
|
7
|
+
Since the monorepo refactor, `proman build` dispatched `pnpm run build`
|
|
8
|
+
for all `cli`-type packages. This broke consumers (ocas, uwf) whose cli
|
|
9
|
+
packages have no build script — they relied on proman's built-in
|
|
10
|
+
`tsc --build`.
|
|
11
|
+
|
|
12
|
+
Now cli-type packages check for a build script in package.json first.
|
|
13
|
+
If present, use `pnpm run build`; otherwise fall back to `tsc --build`
|
|
14
|
+
(same as lib/api types).
|
|
15
|
+
|
|
3
16
|
## 0.9.1 — 2026-06-13
|
|
4
17
|
|
|
5
18
|
- Update release workflow for monorepo and fix smoke test workspace deps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAUA,OAAO,EAA4B,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAExE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;0EAGsE;IACtE,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAMD,wBAAsB,KAAK,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"dev.d.ts","sourceRoot":"","sources":["../../src/commands/dev.ts"],"names":[],"mappings":"AAUA,OAAO,EAA4B,KAAK,OAAO,EAAE,MAAM,iBAAiB,CAAA;AAExE,MAAM,MAAM,iBAAiB,GAAG;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,OAAO,CAAA;IACf;;;0EAGsE;IACtE,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAMD,wBAAsB,KAAK,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CA+ElE;AAsBD,wBAAsB,QAAQ,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAuBrE;AAED,wBAAsB,KAAK,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAyBlE;AAED,wBAAsB,MAAM,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAInE"}
|
package/dist/commands/dev.js
CHANGED
|
@@ -49,10 +49,18 @@ export async function build(opts) {
|
|
|
49
49
|
case 'webui':
|
|
50
50
|
argv = pnpmExec('vite', 'build');
|
|
51
51
|
break;
|
|
52
|
-
case 'cli':
|
|
53
|
-
// cli →
|
|
54
|
-
|
|
52
|
+
case 'cli': {
|
|
53
|
+
// cli → prefer package's own build script if it exists,
|
|
54
|
+
// otherwise fall back to tsc --build (same as lib/api)
|
|
55
|
+
const pkgJsonPath = join(pkgDir, 'package.json');
|
|
56
|
+
let hasBuildScript = false;
|
|
57
|
+
if (existsSync(pkgJsonPath)) {
|
|
58
|
+
const pkgJson = JSON.parse(readFileSync(pkgJsonPath, 'utf-8'));
|
|
59
|
+
hasBuildScript = pkgJson.scripts?.build != null;
|
|
60
|
+
}
|
|
61
|
+
argv = hasBuildScript ? ['pnpm', 'run', 'build'] : pnpmExec('tsc', '--build');
|
|
55
62
|
break;
|
|
63
|
+
}
|
|
56
64
|
default:
|
|
57
65
|
// lib | api → tsc --build
|
|
58
66
|
argv = pnpmExec('tsc', '--build');
|
package/package.json
CHANGED
package/src/commands/dev.ts
CHANGED
|
@@ -74,10 +74,18 @@ export async function build(opts: DevCommandOptions): Promise<void> {
|
|
|
74
74
|
case 'webui':
|
|
75
75
|
argv = pnpmExec('vite', 'build')
|
|
76
76
|
break
|
|
77
|
-
case 'cli':
|
|
78
|
-
// cli →
|
|
79
|
-
|
|
77
|
+
case 'cli': {
|
|
78
|
+
// cli → prefer package's own build script if it exists,
|
|
79
|
+
// otherwise fall back to tsc --build (same as lib/api)
|
|
80
|
+
const pkgJsonPath = join(pkgDir, 'package.json')
|
|
81
|
+
let hasBuildScript = false
|
|
82
|
+
if (existsSync(pkgJsonPath)) {
|
|
83
|
+
const pkgJson = JSON.parse(readFileSync(pkgJsonPath, 'utf-8'))
|
|
84
|
+
hasBuildScript = pkgJson.scripts?.build != null
|
|
85
|
+
}
|
|
86
|
+
argv = hasBuildScript ? ['pnpm', 'run', 'build'] : pnpmExec('tsc', '--build')
|
|
80
87
|
break
|
|
88
|
+
}
|
|
81
89
|
default:
|
|
82
90
|
// lib | api → tsc --build
|
|
83
91
|
argv = pnpmExec('tsc', '--build')
|
package/tests/dev.test.ts
CHANGED
|
@@ -67,7 +67,7 @@ describe('build command', () => {
|
|
|
67
67
|
// lib: tsc --build
|
|
68
68
|
expectExec(calls[0]?.argv, 'tsc', ['--build'])
|
|
69
69
|
expect(calls[0]?.cwd).toBe(resolve(FIX('typed'), 'packages/core'))
|
|
70
|
-
// cli: pnpm run build
|
|
70
|
+
// cli: pnpm run build (has build script in package.json)
|
|
71
71
|
expect(calls[1]?.argv).toEqual(['pnpm', 'run', 'build'])
|
|
72
72
|
expect(calls[1]?.cwd).toBe(resolve(FIX('typed'), 'packages/mycli'))
|
|
73
73
|
// webui: vite build
|