@savvy-web/silk 2.2.1 → 2.2.3

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.
@@ -388,7 +388,23 @@ const ChangesetConfigLive = effect.Layer.effect(ChangesetConfig, effect.Effect.g
388
388
  };
389
389
  }));
390
390
  //#endregion
391
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/CatalogAssemblyError.js
391
+ //#region ../silk-effects/dist/dev/pkg/utils/TrailingSlash.js
392
+ /**
393
+ * Trim trailing slashes from a string.
394
+ *
395
+ * @remarks
396
+ * Trims trailing slashes with an index scan rather than `/\/+$/`. That regex is
397
+ * unanchored at the start, so the engine retries the match from every position
398
+ * and degrades to O(n²) on a string of many slashes (CodeQL `js/polynomial-redos`).
399
+ * Only a trailing run of slashes is removed; interior slash runs are untouched.
400
+ */
401
+ const trimTrailingSlashes = (s) => {
402
+ let end = s.length;
403
+ while (end > 0 && s[end - 1] === "/") end -= 1;
404
+ return s.slice(0, end);
405
+ };
406
+ //#endregion
407
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/CatalogAssemblyError.js
392
408
  /**
393
409
  * Base constant for {@link CatalogAssemblyError}.
394
410
  *
@@ -415,7 +431,7 @@ var CatalogAssemblyError = class extends CatalogAssemblyErrorBase {
415
431
  }
416
432
  };
417
433
  //#endregion
418
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/CatalogResolutionError.js
434
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/CatalogResolutionError.js
419
435
  /**
420
436
  * Base constant for {@link CatalogResolutionError}.
421
437
  *
@@ -441,7 +457,7 @@ var CatalogResolutionError = class extends CatalogResolutionErrorBase {
441
457
  }
442
458
  };
443
459
  //#endregion
444
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/GitReadError.js
460
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/GitReadError.js
445
461
  /**
446
462
  * Base constant for {@link GitReadError}.
447
463
  *
@@ -466,7 +482,7 @@ var GitReadError = class extends GitReadErrorBase {
466
482
  }
467
483
  };
468
484
  //#endregion
469
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/PackageNotFoundError.js
485
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/PackageNotFoundError.js
470
486
  /**
471
487
  * Base constant for {@link PackageNotFoundError}.
472
488
  *
@@ -517,7 +533,7 @@ var PackageNotFoundError = class extends PackageNotFoundErrorBase {
517
533
  }
518
534
  };
519
535
  //#endregion
520
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/WorkspaceDiscoveryError.js
536
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/WorkspaceDiscoveryError.js
521
537
  /**
522
538
  * Base constant for {@link WorkspaceDiscoveryError}.
523
539
  *
@@ -568,7 +584,7 @@ var WorkspaceDiscoveryError = class extends WorkspaceDiscoveryErrorBase {
568
584
  }
569
585
  };
570
586
  //#endregion
571
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/WorkspaceRootNotFoundError.js
587
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/WorkspaceRootNotFoundError.js
572
588
  /**
573
589
  * Base constant for {@link WorkspaceRootNotFoundError}.
574
590
  *
@@ -618,7 +634,7 @@ var WorkspaceRootNotFoundError = class extends WorkspaceRootNotFoundErrorBase {
618
634
  }
619
635
  };
620
636
  //#endregion
621
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/WorkspaceDiscovery.js
637
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/WorkspaceDiscovery.js
622
638
  /**
623
639
  * Service for discovering workspace packages in a monorepo.
624
640
  *
@@ -668,7 +684,7 @@ var WorkspaceRootNotFoundError = class extends WorkspaceRootNotFoundErrorBase {
668
684
  */
669
685
  var WorkspaceDiscovery = class extends effect.Context.Tag("@spencerbeggs/workspaces-effect/WorkspaceDiscovery")() {};
670
686
  //#endregion
671
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/WorkspaceRoot.js
687
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/WorkspaceRoot.js
672
688
  /**
673
689
  * Service for finding the workspace root directory.
674
690
  *
@@ -6354,7 +6370,7 @@ function parse$3(text, options) {
6354
6370
  }));
6355
6371
  }
6356
6372
  //#endregion
6357
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/workspace-manifest.js
6373
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/workspace-manifest.js
6358
6374
  /**
6359
6375
  * Parse a pnpm-workspace.yaml text into its catalog/config-dependency/packages
6360
6376
  * slice. Pure with respect to the filesystem.
@@ -6422,7 +6438,7 @@ function checkDefaultCatalogIsDefinedOnce(manifest) {
6422
6438
  if (manifest.catalog != null && manifest.catalogs?.default != null) throw new PnpmError("INVALID_CATALOGS_CONFIGURATION", "The 'default' catalog was defined multiple times. Use the 'catalog' field or 'catalogs.default', but not both.");
6423
6439
  }
6424
6440
  //#endregion
6425
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/assemble.js
6441
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/assemble.js
6426
6442
  /** Merge catalog sources; later sources win per dependency within a catalog. */
6427
6443
  function mergeCatalogs(...sources) {
6428
6444
  const result = {};
@@ -6503,7 +6519,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
6503
6519
  };
6504
6520
  }
6505
6521
  //#endregion
6506
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/resolve.js
6522
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/resolve.js
6507
6523
  const DEP_FIELDS = [
6508
6524
  "dependencies",
6509
6525
  "devDependencies",
@@ -6573,7 +6589,7 @@ function resolveManifest(catalogs, workspaceVersions, manifest) {
6573
6589
  return out;
6574
6590
  }
6575
6591
  //#endregion
6576
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/CatalogSet.js
6592
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/CatalogSet.js
6577
6593
  /**
6578
6594
  * An immutable, fully-normalized catalog collection with the one
6579
6595
  * resolution semantic shared by live and point-in-time resolution.
@@ -6663,7 +6679,7 @@ var CatalogSet = class CatalogSet extends effect.Schema.Class("CatalogSet")({ en
6663
6679
  }
6664
6680
  };
6665
6681
  //#endregion
6666
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/point-in-time/worktree-catalogs.js
6682
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/point-in-time/worktree-catalogs.js
6667
6683
  /**
6668
6684
  * The ONE code path that reads the working tree's catalog sources
6669
6685
  * (`pnpm-workspace.yaml` + `pnpm-lock.yaml`). Consumed by
@@ -8208,7 +8224,7 @@ minimatch.Minimatch = Minimatch;
8208
8224
  minimatch.escape = escape;
8209
8225
  minimatch.unescape = unescape;
8210
8226
  //#endregion
8211
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/core.js
8227
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/core.js
8212
8228
  /**
8213
8229
  * Schema for supported package manager identifiers.
8214
8230
  *
@@ -9749,7 +9765,7 @@ function modifyImpl(text, path, value, formattingOptions) {
9749
9765
  return [];
9750
9766
  }
9751
9767
  //#endregion
9752
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/WorkspaceStateSnapshot.js
9768
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/WorkspaceStateSnapshot.js
9753
9769
  const DepRecord = effect.Schema.optionalWith(effect.Schema.Record({
9754
9770
  key: effect.Schema.String,
9755
9771
  value: effect.Schema.String
@@ -9818,7 +9834,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
9818
9834
  }
9819
9835
  };
9820
9836
  //#endregion
9821
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PointInTimeWorkspace.js
9837
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PointInTimeWorkspace.js
9822
9838
  /**
9823
9839
  * Service for reading a monorepo's workspace state at a specific moment: any
9824
9840
  * git ref (via `git show`/`git ls-tree`, without checking the ref out) or the
@@ -9845,7 +9861,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
9845
9861
  */
9846
9862
  var PointInTimeWorkspace = class extends effect.Context.Tag("@spencerbeggs/workspaces-effect/PointInTimeWorkspace")() {};
9847
9863
  //#endregion
9848
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/discovery/glob-core.js
9864
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/discovery/glob-core.js
9849
9865
  const normalize$1 = (pattern) => pattern.replace(/\/\*\*$/, "/*");
9850
9866
  const toRegex = (glob) => new RegExp(`^${glob.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, "[^/]*").replace(/\?/g, "[^/]")}$`);
9851
9867
  /**
@@ -9888,7 +9904,7 @@ const compileWorkspaceGlobs = (patterns) => {
9888
9904
  };
9889
9905
  };
9890
9906
  //#endregion
9891
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/point-in-time/git.js
9907
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/point-in-time/git.js
9892
9908
  /**
9893
9909
  * Stderr shapes that mean "the path is not present at this ref" rather than
9894
9910
  * "the git command failed."
@@ -9980,7 +9996,7 @@ const makeGitReader = (executor, options) => {
9980
9996
  };
9981
9997
  };
9982
9998
  //#endregion
9983
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/PointInTimeWorkspaceLive.js
9999
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/PointInTimeWorkspaceLive.js
9984
10000
  /**
9985
10001
  * Live layer for the {@link PointInTimeWorkspace} service.
9986
10002
  *
@@ -10102,6 +10118,7 @@ const PointInTimeWorkspaceLive = effect.Layer.effect(PointInTimeWorkspace, effec
10102
10118
  }).pipe(effect.Effect.withSpan("PointInTimeWorkspace.at", { attributes: { ref } }));
10103
10119
  const worktree = (options) => effect.Effect.gen(function* () {
10104
10120
  const root = yield* resolveRoot(options?.cwd);
10121
+ yield* discovery.refresh();
10105
10122
  return new WorkspaceStateSnapshot({
10106
10123
  packages: (yield* discovery.listPackages(root)).map((p) => new PackageStateSnapshot({
10107
10124
  name: p.name,
@@ -10121,7 +10138,7 @@ const PointInTimeWorkspaceLive = effect.Layer.effect(PointInTimeWorkspace, effec
10121
10138
  });
10122
10139
  }));
10123
10140
  //#endregion
10124
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/publish.js
10141
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/publish.js
10125
10142
  /**
10126
10143
  * Schema for package publish targets.
10127
10144
  *
@@ -10164,7 +10181,7 @@ var PublishTarget = class extends effect.Schema.Class("PublishTarget")({
10164
10181
  provenance: effect.Schema.optionalWith(effect.Schema.Boolean, { default: () => false })
10165
10182
  }) {};
10166
10183
  //#endregion
10167
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PublishabilityDetector.js
10184
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PublishabilityDetector.js
10168
10185
  /**
10169
10186
  * Service for detecting whether a workspace package is publishable and
10170
10187
  * identifying its publish targets (npm, GitHub Packages, etc.).
@@ -10226,7 +10243,7 @@ var PublishTarget = class extends effect.Schema.Class("PublishTarget")({
10226
10243
  */
10227
10244
  var PublishabilityDetector = class extends effect.Context.Tag("@spencerbeggs/workspaces-effect/PublishabilityDetector")() {};
10228
10245
  //#endregion
10229
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/PublishabilityDetectorLive.js
10246
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/PublishabilityDetectorLive.js
10230
10247
  /**
10231
10248
  * Default live implementation of the {@link PublishabilityDetector} service.
10232
10249
  *
@@ -10298,7 +10315,7 @@ const PublishabilityDetectorLive = effect.Layer.succeed(PublishabilityDetector,
10298
10315
  return targets;
10299
10316
  }).pipe(effect.Effect.withSpan("PublishabilityDetector.detect", { attributes: { "workspace.package": pkg.name } })) });
10300
10317
  //#endregion
10301
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/WorkspaceDiscoveryLive.js
10318
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/WorkspaceDiscoveryLive.js
10302
10319
  /**
10303
10320
  * Live implementation of the {@link WorkspaceDiscovery} service.
10304
10321
  *
@@ -10585,7 +10602,7 @@ const WorkspaceDiscoveryLive = effect.Layer.effect(WorkspaceDiscovery, effect.Ef
10585
10602
  };
10586
10603
  }));
10587
10604
  //#endregion
10588
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/WorkspaceRootLive.js
10605
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/WorkspaceRootLive.js
10589
10606
  /**
10590
10607
  * Live implementation of the {@link WorkspaceRoot} service.
10591
10608
  *
@@ -10871,18 +10888,16 @@ var SilkPublishability = class {
10871
10888
  * normalizes to `.`, matching how a root-directory target is recorded.
10872
10889
  *
10873
10890
  * @remarks
10874
- * Trailing slashes are trimmed with an index scan rather than `/\/+$/`. That
10875
- * regex is unanchored at the start, so the engine retries the match from every
10876
- * position and degrades to O(n²) on a path of many slashes (CodeQL
10877
- * `js/polynomial-redos`). `dir` reaches here from `dist/prod/targets.json`, which
10878
- * the bundler writes but a consumer repo could hand-edit.
10891
+ * Trailing-slash trimming is delegated to the shared `trimTrailingSlashes`
10892
+ * index-scan helper rather than `/\/+$/`: that regex is unanchored at the
10893
+ * start, so the engine retries the match from every position and degrades to
10894
+ * O(n²) on a path of many slashes (CodeQL `js/polynomial-redos`). `dir` reaches
10895
+ * here from `dist/prod/targets.json`, which the bundler writes but a consumer
10896
+ * repo could hand-edit.
10879
10897
  */
10880
10898
  const normalizeDir = (dir) => {
10881
10899
  const slashed = dir.replaceAll("\\", "/");
10882
- const withoutPrefix = slashed.startsWith("./") ? slashed.slice(2) : slashed;
10883
- let end = withoutPrefix.length;
10884
- while (end > 0 && withoutPrefix[end - 1] === "/") end -= 1;
10885
- const normalized = withoutPrefix.slice(0, end);
10900
+ const normalized = trimTrailingSlashes(slashed.startsWith("./") ? slashed.slice(2) : slashed);
10886
10901
  return normalized === "" ? "." : normalized;
10887
10902
  };
10888
10903
  /** True when a built target directory's package.json is `private: true`. Missing/unreadable/malformed → false. */
@@ -39371,6 +39386,7 @@ function makeShape$1(pit, inspector, discovery, detector, config, fs) {
39371
39386
  const plan = (options) => effect.Effect.gen(function* () {
39372
39387
  const resolvedCwd = (0, node_path.resolve)(options.cwd);
39373
39388
  const changesetDir = (0, node_path.join)(resolvedCwd, ".changeset");
39389
+ yield* discovery.refresh();
39374
39390
  let fromRef = options.from;
39375
39391
  if (!fromRef) {
39376
39392
  let baseBranch = options.base;
@@ -3326,7 +3326,7 @@ interface Catalog {
3326
3326
  readonly [dependencyName: string]: string | undefined;
3327
3327
  }
3328
3328
  //#endregion
3329
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/index.d.ts
3329
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/index.d.ts
3330
3330
  //#region src/errors/CatalogAssemblyError.d.ts
3331
3331
  /**
3332
3332
  * Base constant for {@link CatalogAssemblyError}.
@@ -3326,7 +3326,7 @@ interface Catalog {
3326
3326
  readonly [dependencyName: string]: string | undefined;
3327
3327
  }
3328
3328
  //#endregion
3329
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/index.d.ts
3329
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/index.d.ts
3330
3330
  //#region src/errors/CatalogAssemblyError.d.ts
3331
3331
  /**
3332
3332
  * Base constant for {@link CatalogAssemblyError}.
@@ -399,7 +399,24 @@ const ChangesetConfigLive = Layer.effect(ChangesetConfig, Effect.gen(function* (
399
399
  }));
400
400
 
401
401
  //#endregion
402
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/CatalogAssemblyError.js
402
+ //#region ../silk-effects/dist/dev/pkg/utils/TrailingSlash.js
403
+ /**
404
+ * Trim trailing slashes from a string.
405
+ *
406
+ * @remarks
407
+ * Trims trailing slashes with an index scan rather than `/\/+$/`. That regex is
408
+ * unanchored at the start, so the engine retries the match from every position
409
+ * and degrades to O(n²) on a string of many slashes (CodeQL `js/polynomial-redos`).
410
+ * Only a trailing run of slashes is removed; interior slash runs are untouched.
411
+ */
412
+ const trimTrailingSlashes = (s) => {
413
+ let end = s.length;
414
+ while (end > 0 && s[end - 1] === "/") end -= 1;
415
+ return s.slice(0, end);
416
+ };
417
+
418
+ //#endregion
419
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/CatalogAssemblyError.js
403
420
  /**
404
421
  * Base constant for {@link CatalogAssemblyError}.
405
422
  *
@@ -427,7 +444,7 @@ var CatalogAssemblyError = class extends CatalogAssemblyErrorBase {
427
444
  };
428
445
 
429
446
  //#endregion
430
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/CatalogResolutionError.js
447
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/CatalogResolutionError.js
431
448
  /**
432
449
  * Base constant for {@link CatalogResolutionError}.
433
450
  *
@@ -454,7 +471,7 @@ var CatalogResolutionError = class extends CatalogResolutionErrorBase {
454
471
  };
455
472
 
456
473
  //#endregion
457
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/GitReadError.js
474
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/GitReadError.js
458
475
  /**
459
476
  * Base constant for {@link GitReadError}.
460
477
  *
@@ -480,7 +497,7 @@ var GitReadError = class extends GitReadErrorBase {
480
497
  };
481
498
 
482
499
  //#endregion
483
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/PackageNotFoundError.js
500
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/PackageNotFoundError.js
484
501
  /**
485
502
  * Base constant for {@link PackageNotFoundError}.
486
503
  *
@@ -532,7 +549,7 @@ var PackageNotFoundError = class extends PackageNotFoundErrorBase {
532
549
  };
533
550
 
534
551
  //#endregion
535
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/WorkspaceDiscoveryError.js
552
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/WorkspaceDiscoveryError.js
536
553
  /**
537
554
  * Base constant for {@link WorkspaceDiscoveryError}.
538
555
  *
@@ -584,7 +601,7 @@ var WorkspaceDiscoveryError = class extends WorkspaceDiscoveryErrorBase {
584
601
  };
585
602
 
586
603
  //#endregion
587
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/WorkspaceRootNotFoundError.js
604
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/errors/WorkspaceRootNotFoundError.js
588
605
  /**
589
606
  * Base constant for {@link WorkspaceRootNotFoundError}.
590
607
  *
@@ -635,7 +652,7 @@ var WorkspaceRootNotFoundError = class extends WorkspaceRootNotFoundErrorBase {
635
652
  };
636
653
 
637
654
  //#endregion
638
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/WorkspaceDiscovery.js
655
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/WorkspaceDiscovery.js
639
656
  /**
640
657
  * Service for discovering workspace packages in a monorepo.
641
658
  *
@@ -686,7 +703,7 @@ var WorkspaceRootNotFoundError = class extends WorkspaceRootNotFoundErrorBase {
686
703
  var WorkspaceDiscovery = class extends Context.Tag("@spencerbeggs/workspaces-effect/WorkspaceDiscovery")() {};
687
704
 
688
705
  //#endregion
689
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/WorkspaceRoot.js
706
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/WorkspaceRoot.js
690
707
  /**
691
708
  * Service for finding the workspace root directory.
692
709
  *
@@ -6429,7 +6446,7 @@ function parse$3(text, options) {
6429
6446
  }
6430
6447
 
6431
6448
  //#endregion
6432
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/workspace-manifest.js
6449
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/workspace-manifest.js
6433
6450
  /**
6434
6451
  * Parse a pnpm-workspace.yaml text into its catalog/config-dependency/packages
6435
6452
  * slice. Pure with respect to the filesystem.
@@ -6505,7 +6522,7 @@ function checkDefaultCatalogIsDefinedOnce(manifest) {
6505
6522
  }
6506
6523
 
6507
6524
  //#endregion
6508
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/assemble.js
6525
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/assemble.js
6509
6526
  /** Merge catalog sources; later sources win per dependency within a catalog. */
6510
6527
  function mergeCatalogs(...sources) {
6511
6528
  const result = {};
@@ -6590,7 +6607,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
6590
6607
  }
6591
6608
 
6592
6609
  //#endregion
6593
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/resolve.js
6610
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/catalog/resolve.js
6594
6611
  const DEP_FIELDS = [
6595
6612
  "dependencies",
6596
6613
  "devDependencies",
@@ -6661,7 +6678,7 @@ function resolveManifest(catalogs, workspaceVersions, manifest) {
6661
6678
  }
6662
6679
 
6663
6680
  //#endregion
6664
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/CatalogSet.js
6681
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/CatalogSet.js
6665
6682
  /**
6666
6683
  * An immutable, fully-normalized catalog collection with the one
6667
6684
  * resolution semantic shared by live and point-in-time resolution.
@@ -6752,7 +6769,7 @@ var CatalogSet = class CatalogSet extends Schema.Class("CatalogSet")({ entries:
6752
6769
  };
6753
6770
 
6754
6771
  //#endregion
6755
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/point-in-time/worktree-catalogs.js
6772
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/point-in-time/worktree-catalogs.js
6756
6773
  /**
6757
6774
  * The ONE code path that reads the working tree's catalog sources
6758
6775
  * (`pnpm-workspace.yaml` + `pnpm-lock.yaml`). Consumed by
@@ -8308,7 +8325,7 @@ minimatch.escape = escape;
8308
8325
  minimatch.unescape = unescape;
8309
8326
 
8310
8327
  //#endregion
8311
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/core.js
8328
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/core.js
8312
8329
  /**
8313
8330
  * Schema for supported package manager identifiers.
8314
8331
  *
@@ -9931,7 +9948,7 @@ function modifyImpl(text, path, value, formattingOptions) {
9931
9948
  }
9932
9949
 
9933
9950
  //#endregion
9934
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/WorkspaceStateSnapshot.js
9951
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/WorkspaceStateSnapshot.js
9935
9952
  const DepRecord = Schema.optionalWith(Schema.Record({
9936
9953
  key: Schema.String,
9937
9954
  value: Schema.String
@@ -10001,7 +10018,7 @@ var WorkspaceStateSnapshot = class extends Schema.Class("WorkspaceStateSnapshot"
10001
10018
  };
10002
10019
 
10003
10020
  //#endregion
10004
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PointInTimeWorkspace.js
10021
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PointInTimeWorkspace.js
10005
10022
  /**
10006
10023
  * Service for reading a monorepo's workspace state at a specific moment: any
10007
10024
  * git ref (via `git show`/`git ls-tree`, without checking the ref out) or the
@@ -10029,7 +10046,7 @@ var WorkspaceStateSnapshot = class extends Schema.Class("WorkspaceStateSnapshot"
10029
10046
  var PointInTimeWorkspace = class extends Context.Tag("@spencerbeggs/workspaces-effect/PointInTimeWorkspace")() {};
10030
10047
 
10031
10048
  //#endregion
10032
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/discovery/glob-core.js
10049
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/discovery/glob-core.js
10033
10050
  const normalize$2 = (pattern) => pattern.replace(/\/\*\*$/, "/*");
10034
10051
  const toRegex = (glob) => new RegExp(`^${glob.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, "[^/]*").replace(/\?/g, "[^/]")}$`);
10035
10052
  /**
@@ -10073,7 +10090,7 @@ const compileWorkspaceGlobs = (patterns) => {
10073
10090
  };
10074
10091
 
10075
10092
  //#endregion
10076
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/point-in-time/git.js
10093
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/point-in-time/git.js
10077
10094
  /**
10078
10095
  * Stderr shapes that mean "the path is not present at this ref" rather than
10079
10096
  * "the git command failed."
@@ -10166,7 +10183,7 @@ const makeGitReader = (executor, options) => {
10166
10183
  };
10167
10184
 
10168
10185
  //#endregion
10169
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/PointInTimeWorkspaceLive.js
10186
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/PointInTimeWorkspaceLive.js
10170
10187
  /**
10171
10188
  * Live layer for the {@link PointInTimeWorkspace} service.
10172
10189
  *
@@ -10288,6 +10305,7 @@ const PointInTimeWorkspaceLive = Layer.effect(PointInTimeWorkspace, Effect.gen(f
10288
10305
  }).pipe(Effect.withSpan("PointInTimeWorkspace.at", { attributes: { ref } }));
10289
10306
  const worktree = (options) => Effect.gen(function* () {
10290
10307
  const root = yield* resolveRoot(options?.cwd);
10308
+ yield* discovery.refresh();
10291
10309
  return new WorkspaceStateSnapshot({
10292
10310
  packages: (yield* discovery.listPackages(root)).map((p) => new PackageStateSnapshot({
10293
10311
  name: p.name,
@@ -10308,7 +10326,7 @@ const PointInTimeWorkspaceLive = Layer.effect(PointInTimeWorkspace, Effect.gen(f
10308
10326
  }));
10309
10327
 
10310
10328
  //#endregion
10311
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/publish.js
10329
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/schemas/publish.js
10312
10330
  /**
10313
10331
  * Schema for package publish targets.
10314
10332
  *
@@ -10352,7 +10370,7 @@ var PublishTarget = class extends Schema.Class("PublishTarget")({
10352
10370
  }) {};
10353
10371
 
10354
10372
  //#endregion
10355
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PublishabilityDetector.js
10373
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/services/PublishabilityDetector.js
10356
10374
  /**
10357
10375
  * Service for detecting whether a workspace package is publishable and
10358
10376
  * identifying its publish targets (npm, GitHub Packages, etc.).
@@ -10415,7 +10433,7 @@ var PublishTarget = class extends Schema.Class("PublishTarget")({
10415
10433
  var PublishabilityDetector = class extends Context.Tag("@spencerbeggs/workspaces-effect/PublishabilityDetector")() {};
10416
10434
 
10417
10435
  //#endregion
10418
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/PublishabilityDetectorLive.js
10436
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/PublishabilityDetectorLive.js
10419
10437
  /**
10420
10438
  * Default live implementation of the {@link PublishabilityDetector} service.
10421
10439
  *
@@ -10488,7 +10506,7 @@ const PublishabilityDetectorLive = Layer.succeed(PublishabilityDetector, { detec
10488
10506
  }).pipe(Effect.withSpan("PublishabilityDetector.detect", { attributes: { "workspace.package": pkg.name } })) });
10489
10507
 
10490
10508
  //#endregion
10491
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/WorkspaceDiscoveryLive.js
10509
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/WorkspaceDiscoveryLive.js
10492
10510
  /**
10493
10511
  * Live implementation of the {@link WorkspaceDiscovery} service.
10494
10512
  *
@@ -10776,7 +10794,7 @@ const WorkspaceDiscoveryLive = Layer.effect(WorkspaceDiscovery, Effect.gen(funct
10776
10794
  }));
10777
10795
 
10778
10796
  //#endregion
10779
- //#region ../../node_modules/.pnpm/workspaces-effect@2.0.2_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/WorkspaceRootLive.js
10797
+ //#region ../../node_modules/.pnpm/workspaces-effect@2.0.3_@effect+platform@0.96.2_effect@3.21.4__effect@3.21.4/node_modules/workspaces-effect/layers/WorkspaceRootLive.js
10780
10798
  /**
10781
10799
  * Live implementation of the {@link WorkspaceRoot} service.
10782
10800
  *
@@ -11063,18 +11081,16 @@ var SilkPublishability = class {
11063
11081
  * normalizes to `.`, matching how a root-directory target is recorded.
11064
11082
  *
11065
11083
  * @remarks
11066
- * Trailing slashes are trimmed with an index scan rather than `/\/+$/`. That
11067
- * regex is unanchored at the start, so the engine retries the match from every
11068
- * position and degrades to O(n²) on a path of many slashes (CodeQL
11069
- * `js/polynomial-redos`). `dir` reaches here from `dist/prod/targets.json`, which
11070
- * the bundler writes but a consumer repo could hand-edit.
11084
+ * Trailing-slash trimming is delegated to the shared `trimTrailingSlashes`
11085
+ * index-scan helper rather than `/\/+$/`: that regex is unanchored at the
11086
+ * start, so the engine retries the match from every position and degrades to
11087
+ * O(n²) on a path of many slashes (CodeQL `js/polynomial-redos`). `dir` reaches
11088
+ * here from `dist/prod/targets.json`, which the bundler writes but a consumer
11089
+ * repo could hand-edit.
11071
11090
  */
11072
11091
  const normalizeDir = (dir) => {
11073
11092
  const slashed = dir.replaceAll("\\", "/");
11074
- const withoutPrefix = slashed.startsWith("./") ? slashed.slice(2) : slashed;
11075
- let end = withoutPrefix.length;
11076
- while (end > 0 && withoutPrefix[end - 1] === "/") end -= 1;
11077
- const normalized = withoutPrefix.slice(0, end);
11093
+ const normalized = trimTrailingSlashes(slashed.startsWith("./") ? slashed.slice(2) : slashed);
11078
11094
  return normalized === "" ? "." : normalized;
11079
11095
  };
11080
11096
  /** True when a built target directory's package.json is `private: true`. Missing/unreadable/malformed → false. */
@@ -39817,6 +39833,7 @@ function makeShape$1(pit, inspector, discovery, detector, config, fs) {
39817
39833
  const plan = (options) => Effect.gen(function* () {
39818
39834
  const resolvedCwd = resolve(options.cwd);
39819
39835
  const changesetDir = join(resolvedCwd, ".changeset");
39836
+ yield* discovery.refresh();
39820
39837
  let fromRef = options.from;
39821
39838
  if (!fromRef) {
39822
39839
  let baseBranch = options.base;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@savvy-web/silk",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "private": false,
5
5
  "description": "The single Silk Suite dev-tooling package — changeset, commitlint, lint, and biome conventions",
6
6
  "homepage": "https://github.com/savvy-web/systems/tree/main/packages/silk",
@@ -67,9 +67,9 @@
67
67
  "dependencies": {
68
68
  "@effect/platform": "^0.96.2",
69
69
  "@savvy-web/changelog": "0.1.1",
70
- "@savvy-web/cli": "1.5.4",
71
- "@savvy-web/mcp": "1.7.1",
72
- "@savvy-web/silk-effects": "3.2.0",
70
+ "@savvy-web/cli": "1.5.6",
71
+ "@savvy-web/mcp": "1.7.3",
72
+ "@savvy-web/silk-effects": "3.2.2",
73
73
  "effect": "^3.21.4",
74
74
  "semver": "^7.8.5"
75
75
  },