@dsh-workbench/module-tools 0.1.13 → 0.1.14
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/package.json +1 -1
- package/src/checks/markers.mjs +9 -1
package/package.json
CHANGED
package/src/checks/markers.mjs
CHANGED
|
@@ -22,8 +22,16 @@ function walk(dir, acc = []) {
|
|
|
22
22
|
return acc;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
// 只扫**工作台自己会发出去的**包:声明了 `dsh.workbench` 的模块,或 `@dsh-workbench/*` 名下的。
|
|
26
|
+
// 不能照搬"本 workspace 里所有 access=public 的包" —— 在外壳仓里等价,但把这个工具拿到
|
|
27
|
+
// 别人的 monorepo(例如 pdv2)里跑时,那条会把人家二十几个自家 SDK 包一起判了。
|
|
28
|
+
const OWN_SCOPE = '@dsh-workbench/';
|
|
29
|
+
const isOurs = (pkg) =>
|
|
30
|
+
pkg.manifest.dsh?.workbench !== void 0 ||
|
|
31
|
+
String(pkg.manifest.name ?? '').startsWith(OWN_SCOPE);
|
|
32
|
+
|
|
25
33
|
const publicPackages = discoverPackages({ root: process.cwd() }).filter(
|
|
26
|
-
(pkg) => pkg.manifest.publishConfig?.access === 'public',
|
|
34
|
+
(pkg) => isOurs(pkg) && pkg.manifest.publishConfig?.access === 'public',
|
|
27
35
|
);
|
|
28
36
|
const problems = [];
|
|
29
37
|
for (const pkg of publicPackages) {
|