@savvy-web/silk-effects 4.0.0 → 4.1.0

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/index.d.ts CHANGED
@@ -287,7 +287,7 @@ declare class Categories {
287
287
  static isValidHeading(heading: string): boolean;
288
288
  }
289
289
  //#endregion
290
- //#region ../../node_modules/.pnpm/@changesets+types@7.0.0-next.6/node_modules/@changesets/types/dist/index.d.mts
290
+ //#region ../../node_modules/.pnpm/@changesets+types@7.0.0-next.7/node_modules/@changesets/types/dist/index.d.mts
291
291
  //#region src/index.d.ts
292
292
  type MaybePromise<T> = T | Promise<T>;
293
293
  type VersionType$1 = "major" | "minor" | "patch" | "none";
@@ -360,10 +360,13 @@ type Config = {
360
360
  * The formatter to use to format changesets and changelogs. Set `false` to disable formatting.
361
361
  * The default value of `"auto"` will auto-detect the formatter based on the project's configuration files.
362
362
  */
363
- format: "auto" | "prettier" | "oxfmt" | "deno" | "dprint" | false; /** Features enabled for Private packages */
364
- privatePackages: PrivatePackages; /** The minimum bump type to trigger automatic update of internal dependencies that are part of the same release */
363
+ format: "auto" | "prettier" | "oxfmt" | "deno" | "dprint" | false;
364
+ /** Features enabled for Private packages */
365
+ privatePackages: PrivatePackages;
366
+ /** The minimum bump type to trigger automatic update of internal dependencies that are part of the same release */
365
367
  updateInternalDependencies: "patch" | "minor";
366
- ignore: ReadonlyArray<string>; /** This is supposed to be used with pnpm's `link-workspace-packages: false` and Berry's `enableTransparentWorkspaces: false` */
368
+ ignore: ReadonlyArray<string>;
369
+ /** This is supposed to be used with pnpm's `link-workspace-packages: false` and Berry's `enableTransparentWorkspaces: false` */
367
370
  bumpVersionsWithWorkspaceProtocolOnly?: boolean;
368
371
  ___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH: Required<ExperimentalOptions>;
369
372
  snapshot: {
@@ -5174,7 +5177,7 @@ interface TokenTypeMap {
5174
5177
  chunkString: 'chunkString';
5175
5178
  }
5176
5179
  //#endregion
5177
- //#region ../../node_modules/.pnpm/markdownlint@0.41.1/node_modules/markdownlint/lib/markdownlint.d.mts
5180
+ //#region ../../node_modules/.pnpm/markdownlint@0.41.1_supports-color@8.1.1/node_modules/markdownlint/lib/markdownlint.d.mts
5178
5181
  /**
5179
5182
  * Function to implement rule logic.
5180
5183
  */
@@ -5447,7 +5450,7 @@ type Rule$2 = {
5447
5450
  */
5448
5451
  type RuleConfiguration = boolean | any;
5449
5452
  //#endregion
5450
- //#region ../../node_modules/.pnpm/markdownlint@0.41.1/node_modules/markdownlint/lib/exports.d.mts
5453
+ //#region ../../node_modules/.pnpm/markdownlint@0.41.1_supports-color@8.1.1/node_modules/markdownlint/lib/exports.d.mts
5451
5454
  type Rule$1 = Rule$2;
5452
5455
  //#endregion
5453
5456
  //#region src/changesets/markdownlint/rules/content-structure.d.ts
@@ -7433,6 +7436,25 @@ declare class PnpmWorkspace {
7433
7436
  * @returns Sorted content
7434
7437
  */
7435
7438
  static sortContent(content: PnpmWorkspaceContent): PnpmWorkspaceContent;
7439
+ /**
7440
+ * Stringify sorted workspace content to the repo's canonical YAML byte format.
7441
+ *
7442
+ * @remarks
7443
+ * The single source of truth for pnpm-workspace.yaml formatting. Both
7444
+ * {@link create} and the `savvy lint fmt pnpm-workspace` CLI subcommand route
7445
+ * through here so the two paths cannot drift.
7446
+ *
7447
+ * `@effected/yaml` emits block sequences without the leading two-space
7448
+ * indentation and prefers single-quoted scalars; Prettier's YAML printer
7449
+ * normalizes both back to the v3 `yaml` posture (indented sequences,
7450
+ * double-quoted scalars). Do NOT write `EffectedYaml.stringify` output
7451
+ * directly — that regresses the file on every format pass.
7452
+ *
7453
+ * @param content - Sorted pnpm-workspace.yaml content
7454
+ * @param filepath - Path used to resolve Prettier config
7455
+ * @returns The formatted YAML source
7456
+ */
7457
+ static formatContent(content: PnpmWorkspaceContent, filepath?: string): Promise<string>;
7436
7458
  /**
7437
7459
  * Create a handler that returns a CLI command to sort/format pnpm-workspace.yaml.
7438
7460
  *
@@ -101,6 +101,31 @@ var PnpmWorkspace = class PnpmWorkspace {
101
101
  return result;
102
102
  }
103
103
  /**
104
+ * Stringify sorted workspace content to the repo's canonical YAML byte format.
105
+ *
106
+ * @remarks
107
+ * The single source of truth for pnpm-workspace.yaml formatting. Both
108
+ * {@link create} and the `savvy lint fmt pnpm-workspace` CLI subcommand route
109
+ * through here so the two paths cannot drift.
110
+ *
111
+ * `@effected/yaml` emits block sequences without the leading two-space
112
+ * indentation and prefers single-quoted scalars; Prettier's YAML printer
113
+ * normalizes both back to the v3 `yaml` posture (indented sequences,
114
+ * double-quoted scalars). Do NOT write `EffectedYaml.stringify` output
115
+ * directly — that regresses the file on every format pass.
116
+ *
117
+ * @param content - Sorted pnpm-workspace.yaml content
118
+ * @param filepath - Path used to resolve Prettier config
119
+ * @returns The formatted YAML source
120
+ */
121
+ static async formatContent(content, filepath = PnpmWorkspace.glob) {
122
+ return format(Effect.runSync(Yaml.stringify(content, DEFAULT_STRINGIFY_OPTIONS)), {
123
+ ...await resolveConfig(filepath),
124
+ filepath,
125
+ parser: "yaml"
126
+ });
127
+ }
128
+ /**
104
129
  * Create a handler that returns a CLI command to sort/format pnpm-workspace.yaml.
105
130
  *
106
131
  * @remarks
@@ -139,11 +164,7 @@ var PnpmWorkspace = class PnpmWorkspace {
139
164
  let parsed = parseResult.success;
140
165
  if (!skipSort) parsed = PnpmWorkspace.sortContent(parsed);
141
166
  if (!skipSort || !skipFormat) {
142
- writeFileSync(filepath, await format(Effect.runSync(Yaml.stringify(parsed, DEFAULT_STRINGIFY_OPTIONS)), {
143
- ...await resolveConfig(filepath),
144
- filepath,
145
- parser: "yaml"
146
- }), "utf-8");
167
+ writeFileSync(filepath, await PnpmWorkspace.formatContent(parsed, filepath), "utf-8");
147
168
  return [];
148
169
  }
149
170
  return [];
@@ -27,7 +27,7 @@ let cachedPaths = UNRESOLVED;
27
27
  */
28
28
  function getWorkspaceRoot() {
29
29
  if (cachedRoot !== UNRESOLVED) return cachedRoot;
30
- cachedRoot = findWorkspaceRootSync(nodeSyncOps);
30
+ cachedRoot = findWorkspaceRootSync(process.cwd(), nodeSyncOps);
31
31
  return cachedRoot;
32
32
  }
33
33
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvy-web/silk-effects",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
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",
@@ -33,13 +33,13 @@
33
33
  "@changesets/config": "^4.0.0-next.6",
34
34
  "@changesets/get-github-info": "^1.0.0-next.3",
35
35
  "@changesets/get-release-plan": "^5.0.0-next.7",
36
- "@effected/git": "^0.3.0",
37
- "@effected/glob": "^0.1.0",
38
- "@effected/jsonc": "^0.2.0",
39
- "@effected/package-json": "^0.3.0",
40
- "@effected/walker": "^0.2.0",
41
- "@effected/workspaces": "^0.3.0",
42
- "@effected/yaml": "^0.2.0",
36
+ "@effected/git": "^0.4.1",
37
+ "@effected/glob": "^0.1.2",
38
+ "@effected/jsonc": "^0.4.0",
39
+ "@effected/package-json": "^0.3.1",
40
+ "@effected/walker": "^0.2.2",
41
+ "@effected/workspaces": "^0.4.1",
42
+ "@effected/yaml": "^0.4.0",
43
43
  "@manypkg/get-packages": "^3.1.0",
44
44
  "mdast-util-heading-range": "^4.0.0",
45
45
  "mdast-util-to-string": "^4.0.0",
@@ -55,6 +55,6 @@
55
55
  "yaml-lint": "^1.7.0"
56
56
  },
57
57
  "peerDependencies": {
58
- "effect": "4.0.0-beta.98"
58
+ "effect": "4.0.0-beta.99"
59
59
  }
60
60
  }
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.58.10"
8
+ "packageVersion": "7.58.11"
9
9
  }
10
10
  ]
11
11
  }