@savvy-web/silk-effects 2.0.0 → 2.0.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.
|
@@ -135,7 +135,8 @@ const STATUS_MAP = {
|
|
|
135
135
|
U: "unmerged"
|
|
136
136
|
};
|
|
137
137
|
function statusFromCode(code) {
|
|
138
|
-
|
|
138
|
+
const head = code.charAt(0);
|
|
139
|
+
return STATUS_MAP[head] ?? "unknown";
|
|
139
140
|
}
|
|
140
141
|
/**
|
|
141
142
|
* Parse `git diff --name-status -z` output into one entry per changed file.
|
|
@@ -23,8 +23,36 @@ import { getPackages } from "@manypkg/get-packages";
|
|
|
23
23
|
* (e.g. `getChangelogEntry`) is re-implemented.
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
const V1_TOOLS = /* @__PURE__ */ new Set([
|
|
27
|
+
"yarn",
|
|
28
|
+
"bolt",
|
|
29
|
+
"pnpm",
|
|
30
|
+
"lerna",
|
|
31
|
+
"root"
|
|
32
|
+
]);
|
|
33
|
+
/**
|
|
34
|
+
* Single workspace-discovery seam; swap to an Effect-native stack later here.
|
|
35
|
+
*
|
|
36
|
+
* Discovers with `@manypkg/get-packages@3.x` and adapts to the v1 shape:
|
|
37
|
+
* `tool` collapses to its type string (tools unknown to v1 map to `"root"` —
|
|
38
|
+
* the engine never reads `tool` at runtime, only `root.dir`), and
|
|
39
|
+
* `rootDir`/`rootPackage` fold back into `root`.
|
|
40
|
+
*/
|
|
41
|
+
const buildPackages = async (root) => {
|
|
42
|
+
const { tool, rootDir, rootPackage, packages } = await getPackages(root);
|
|
43
|
+
if (!rootPackage) throw new Error(`Workspace root has no package.json: ${rootDir}`);
|
|
44
|
+
return {
|
|
45
|
+
tool: V1_TOOLS.has(tool.type) ? tool.type : "root",
|
|
46
|
+
root: {
|
|
47
|
+
dir: rootPackage.dir,
|
|
48
|
+
packageJson: rootPackage.packageJson
|
|
49
|
+
},
|
|
50
|
+
packages: packages.map((p) => ({
|
|
51
|
+
dir: p.dir,
|
|
52
|
+
packageJson: p.packageJson
|
|
53
|
+
}))
|
|
54
|
+
};
|
|
55
|
+
};
|
|
28
56
|
const errMsg = (e) => e instanceof Error ? e.message : String(e);
|
|
29
57
|
const _tag = Context.Tag("ReleasePlanner");
|
|
30
58
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@savvy-web/silk-effects",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared Effect library for Silk Suite conventions",
|
|
6
6
|
"homepage": "https://github.com/savvy-web/systems/tree/main/packages/silk-effects",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"@changesets/config": "^3.1.4",
|
|
33
33
|
"@changesets/get-github-info": "^0.8.0",
|
|
34
34
|
"@changesets/get-release-plan": "^4.0.16",
|
|
35
|
-
"@manypkg/get-packages": "^
|
|
35
|
+
"@manypkg/get-packages": "^3.1.0",
|
|
36
36
|
"jsonc-effect": "^0.3.0",
|
|
37
37
|
"mdast-util-heading-range": "^4.0.0",
|
|
38
38
|
"mdast-util-to-string": "^4.0.0",
|
|
@@ -40,14 +40,14 @@
|
|
|
40
40
|
"remark-gfm": "^4.0.1",
|
|
41
41
|
"remark-parse": "^11.0.0",
|
|
42
42
|
"remark-stringify": "^11.0.0",
|
|
43
|
-
"semver-effect": "^0.3.
|
|
43
|
+
"semver-effect": "^0.3.1",
|
|
44
44
|
"shell-quote": "^1.9.0",
|
|
45
45
|
"sort-package-json": "^4.0.0",
|
|
46
46
|
"tinyglobby": "^0.2.17",
|
|
47
47
|
"unified": "^11.0.5",
|
|
48
48
|
"unified-lint-rule": "^3.0.1",
|
|
49
49
|
"unist-util-visit": "^5.1.0",
|
|
50
|
-
"workspaces-effect": "^2.0.
|
|
50
|
+
"workspaces-effect": "^2.0.1",
|
|
51
51
|
"yaml": "^2.9.0",
|
|
52
52
|
"yaml-effect": "^0.7.0",
|
|
53
53
|
"yaml-lint": "^1.7.0"
|
|
@@ -126,7 +126,10 @@ var SilkPublishability = class {
|
|
|
126
126
|
const fs = yield* FileSystem.FileSystem;
|
|
127
127
|
const targets = yield* detector.detect(pkg, root);
|
|
128
128
|
const kept = [];
|
|
129
|
-
for (const t of targets)
|
|
129
|
+
for (const t of targets) {
|
|
130
|
+
const dir = isAbsolute(t.directory) ? t.directory : join(pkg.path, t.directory);
|
|
131
|
+
if (!(yield* isTargetPrivate(fs, dir))) kept.push(t);
|
|
132
|
+
}
|
|
130
133
|
return kept;
|
|
131
134
|
});
|
|
132
135
|
}
|