@savvy-web/silk-effects 2.0.1 → 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.
@@ -23,8 +23,36 @@ import { getPackages } from "@manypkg/get-packages";
23
23
  * (e.g. `getChangelogEntry`) is re-implemented.
24
24
  *
25
25
  */
26
- /** Single workspace-discovery seam; swap to an Effect-native stack later here. */
27
- const buildPackages = (root) => getPackages(root);
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.1",
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": "^1.1.3",
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",