@savvy-web/silk 3.8.1 → 3.8.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.
@@ -2353,7 +2353,7 @@ var GlobSet = class GlobSet extends Schema.Class("GlobSet")(Schema.Struct({ patt
2353
2353
  };
2354
2354
 
2355
2355
  //#endregion
2356
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/BunExtension.js
2356
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/BunExtension.js
2357
2357
  /**
2358
2358
  * Extension data specific to bun lockfiles, attached to `Lockfile.extension`
2359
2359
  * when the format is `"bun"`.
@@ -2375,7 +2375,7 @@ var BunExtension = class extends Schema.Class("BunExtension")({
2375
2375
  }) {};
2376
2376
 
2377
2377
  //#endregion
2378
- //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/CatalogResolver.js
2378
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.1_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/CatalogResolver.js
2379
2379
  /**
2380
2380
  * Contract for resolving pnpm `catalog:` dependency specifiers to concrete
2381
2381
  * version ranges.
@@ -2422,7 +2422,7 @@ var CatalogResolver = class CatalogResolver extends Context.Service()("@effected
2422
2422
  };
2423
2423
 
2424
2424
  //#endregion
2425
- //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/WorkspaceResolver.js
2425
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.1_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/WorkspaceResolver.js
2426
2426
  /**
2427
2427
  * Raised when a `catalog:` or `workspace:` specifier cannot be resolved
2428
2428
  * because the resolution mechanism itself failed — not for an ordinary
@@ -2484,7 +2484,7 @@ var WorkspaceResolver = class WorkspaceResolver extends Context.Service()("@effe
2484
2484
  };
2485
2485
 
2486
2486
  //#endregion
2487
- //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/CatalogAssemblyError.js
2487
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.1_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/CatalogAssemblyError.js
2488
2488
  /**
2489
2489
  * Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
2490
2490
  * that is unreadable or not valid YAML, a root `package.json` `workspaces` field
@@ -2529,7 +2529,7 @@ var CatalogAssemblyError = class extends Schema.TaggedError()("CatalogAssemblyEr
2529
2529
  };
2530
2530
 
2531
2531
  //#endregion
2532
- //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/DependencySection.js
2532
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.1_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/DependencySection.js
2533
2533
  /**
2534
2534
  * The short dependency kind: which dependency map an entry came from, named the
2535
2535
  * way consumers branch on it.
@@ -4153,7 +4153,7 @@ const isComparatorSetSubset = (sub, sup) => {
4153
4153
  };
4154
4154
 
4155
4155
  //#endregion
4156
- //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/DependencySpecifier.js
4156
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.1_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/DependencySpecifier.js
4157
4157
  /**
4158
4158
  * Indicates that a string could not be parsed as a valid dependency specifier.
4159
4159
  *
@@ -4170,7 +4170,7 @@ input: Schema.String }) {
4170
4170
  }
4171
4171
  };
4172
4172
  const CATALOG_PREFIX = "catalog:";
4173
- const WORKSPACE_PREFIX = "workspace:";
4173
+ const WORKSPACE_PREFIX$1 = "workspace:";
4174
4174
  const isBarePath = (value) => value.startsWith("./") || value.startsWith("../") || value.startsWith("~/") || value.startsWith("/");
4175
4175
  const isGitHubShorthand = (value) => !value.startsWith(".") && !value.startsWith("~") && !value.startsWith("/") && /^[a-zA-Z0-9_.-]+\/[a-zA-Z0-9_.-]+(#.*)?$/.test(value);
4176
4176
  const isGit = (value) => value.startsWith("git+") || value.startsWith("git://") || value.startsWith("github:") || value.startsWith("gist:") || value.startsWith("bitbucket:") || value.startsWith("gitlab:") || isGitHubShorthand(value);
@@ -4178,7 +4178,7 @@ const isLocal = (value) => value.startsWith("file:") || value.startsWith("link:"
4178
4178
  const isLink = (value) => value.startsWith("link:");
4179
4179
  const isPortal = (value) => value.startsWith("portal:");
4180
4180
  const isCatalog = (value) => value.startsWith(CATALOG_PREFIX);
4181
- const isWorkspace = (value) => value.startsWith(WORKSPACE_PREFIX);
4181
+ const isWorkspace = (value) => value.startsWith(WORKSPACE_PREFIX$1);
4182
4182
  const isUrl$1 = (value) => value.startsWith("http://") || value.startsWith("https://");
4183
4183
  const parseRange = (value) => {
4184
4184
  const exit = Schema.decodeUnknownExit(Range$1.FromString)(value);
@@ -4187,7 +4187,7 @@ const parseRange = (value) => {
4187
4187
  const isRange = (value) => Option.isSome(parseRange(value));
4188
4188
  const protocolOf = (value) => {
4189
4189
  if (value.startsWith(CATALOG_PREFIX)) return "catalog";
4190
- if (value.startsWith(WORKSPACE_PREFIX)) return "workspace";
4190
+ if (value.startsWith(WORKSPACE_PREFIX$1)) return "workspace";
4191
4191
  if (value.startsWith("link:")) return "link";
4192
4192
  if (value.startsWith("portal:")) return "portal";
4193
4193
  if (value.startsWith("file:") || isBarePath(value)) return "file";
@@ -4361,7 +4361,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
4361
4361
  });
4362
4362
 
4363
4363
  //#endregion
4364
- //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/IntegrityHash.js
4364
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.1_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/IntegrityHash.js
4365
4365
  const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
4366
4366
  const COREPACK_RE = /^(sha1|sha224|sha256|sha384|sha512)\.[0-9a-f]+$/;
4367
4367
  const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
@@ -4415,6 +4415,13 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
4415
4415
  });
4416
4416
  const corepackRestricted = brandedIntegrity.pipe(Schema.check(Schema.makeFilter((value) => isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
4417
4417
  const BASE64_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
4418
+ const BASE64_INVALID = 255;
4419
+ const BASE64_INDEX = (() => {
4420
+ const table = new Uint8Array("z".charCodeAt(0) + 1);
4421
+ table.fill(BASE64_INVALID);
4422
+ for (let index = 0; index < 64; index += 1) table[BASE64_ALPHABET.charCodeAt(index)] = index;
4423
+ return table;
4424
+ })();
4418
4425
  const decodeBase64 = (value) => {
4419
4426
  const firstPad = value.indexOf("=");
4420
4427
  const body = firstPad === -1 ? value : value.slice(0, firstPad);
@@ -4426,9 +4433,11 @@ const decodeBase64 = (value) => {
4426
4433
  let buffer = 0;
4427
4434
  let bits = 0;
4428
4435
  const bytes = [];
4429
- for (const char of body) {
4430
- const sextet = BASE64_ALPHABET.indexOf(char);
4431
- if (sextet < 0) return void 0;
4436
+ for (let index = 0; index < body.length; index += 1) {
4437
+ const code = body.charCodeAt(index);
4438
+ if (code >= BASE64_INDEX.length) return void 0;
4439
+ const sextet = BASE64_INDEX[code];
4440
+ if (sextet === BASE64_INVALID) return void 0;
4432
4441
  buffer = buffer << 6 | sextet;
4433
4442
  bits += 6;
4434
4443
  if (bits >= 8) {
@@ -5450,7 +5459,7 @@ var Run = class {
5450
5459
  };
5451
5460
 
5452
5461
  //#endregion
5453
- //#region ../../node_modules/.pnpm/@effected+npm@0.11.0_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/ReleaseAgeGate.js
5462
+ //#region ../../node_modules/.pnpm/@effected+npm@0.11.1_@effected+semver@0.5.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/npm/ReleaseAgeGate.js
5454
5463
  const MS_PER_MINUTE = 6e4;
5455
5464
  /**
5456
5465
  * A source's partial contribution to a {@link ReleaseAgeGate}: the effective
@@ -5621,7 +5630,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends Schema.Class("ReleaseAgeGate")
5621
5630
  };
5622
5631
 
5623
5632
  //#endregion
5624
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/ImporterDependency.js
5633
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/ImporterDependency.js
5625
5634
  /**
5626
5635
  * One declared dependency of one workspace importer, as the lockfile records it.
5627
5636
  *
@@ -5660,7 +5669,7 @@ var ImporterDependency = class extends Schema.Class("ImporterDependency")({
5660
5669
  }) {};
5661
5670
 
5662
5671
  //#endregion
5663
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/LockfileImporter.js
5672
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/LockfileImporter.js
5664
5673
  /**
5665
5674
  * One workspace importer's declared dependencies, as the lockfile records them.
5666
5675
  *
@@ -5685,7 +5694,7 @@ var LockfileImporter = class extends Schema.Class("LockfileImporter")({
5685
5694
  }) {};
5686
5695
 
5687
5696
  //#endregion
5688
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/ResolvedPackage.js
5697
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/ResolvedPackage.js
5689
5698
  const EMPTY_DEPENDENCIES = {};
5690
5699
  const EMPTY_PEER_META = {};
5691
5700
  const EMPTY_EDGE_NAMES = [];
@@ -5776,7 +5785,7 @@ var ResolvedPackage = class extends Schema.Class("ResolvedPackage")({
5776
5785
  }) {};
5777
5786
 
5778
5787
  //#endregion
5779
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/WorkspaceDependency.js
5788
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/WorkspaceDependency.js
5780
5789
  /**
5781
5790
  * A directed dependency edge between two workspace packages as recorded in
5782
5791
  * the lockfile.
@@ -5799,7 +5808,7 @@ var WorkspaceDependency = class extends Schema.Class("WorkspaceDependency")({
5799
5808
  }) {};
5800
5809
 
5801
5810
  //#endregion
5802
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/PnpmExtension.js
5811
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/PnpmExtension.js
5803
5812
  /**
5804
5813
  * Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
5805
5814
  * when the format is `"pnpm"`.
@@ -5825,7 +5834,7 @@ var PnpmExtension = class extends Schema.Class("PnpmExtension")({
5825
5834
  }) {};
5826
5835
 
5827
5836
  //#endregion
5828
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/LockfileFormat.js
5837
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/LockfileFormat.js
5829
5838
  /**
5830
5839
  * The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
5831
5840
  * `package-lock.json` (JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
@@ -5868,7 +5877,7 @@ const FILENAMES = {
5868
5877
  const filenameFor = (format) => FILENAMES[format][0];
5869
5878
 
5870
5879
  //#endregion
5871
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/internal/shared.js
5880
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/internal/shared.js
5872
5881
  /**
5873
5882
  * The four dependency sections of a manifest, in a stable order — the shared
5874
5883
  * dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
@@ -7913,7 +7922,7 @@ var JsoncModifier = class {
7913
7922
  };
7914
7923
 
7915
7924
  //#endregion
7916
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/internal/bun.js
7925
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/internal/bun.js
7917
7926
  const DepRecord$2 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
7918
7927
  const OptionalPeers = Schema.optionalKey(Schema.Array(Schema.String));
7919
7928
  const BunWorkspaceEntry = Schema.Struct({
@@ -8091,7 +8100,7 @@ const toFields$3 = (raw) => Effect.gen(function* () {
8091
8100
  });
8092
8101
 
8093
8102
  //#endregion
8094
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/internal/npm.js
8103
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/internal/npm.js
8095
8104
  const DepRecord$1 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
8096
8105
  const PeerMetaRecord = Schema.optionalKey(Schema.Record(Schema.String, Schema.Struct({ optional: Schema.optionalKey(Schema.Boolean) })));
8097
8106
  const NpmPackageEntry = Schema.Struct({
@@ -16064,7 +16073,7 @@ function deepEqualValues(a, b) {
16064
16073
  }
16065
16074
 
16066
16075
  //#endregion
16067
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/internal/documents.js
16076
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/internal/documents.js
16068
16077
  /**
16069
16078
  * An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
16070
16079
  * and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
@@ -16135,7 +16144,7 @@ const selectSoleDocument = (content) => Effect.gen(function* () {
16135
16144
  });
16136
16145
 
16137
16146
  //#endregion
16138
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/internal/pnpm.js
16147
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/internal/pnpm.js
16139
16148
  const PnpmImporterDeps = Schema.optionalKey(Schema.Record(Schema.String, Schema.Struct({
16140
16149
  specifier: Schema.String,
16141
16150
  version: Schema.String
@@ -16265,6 +16274,31 @@ const resolveLinkTarget = (importerPath, target) => {
16265
16274
  }
16266
16275
  return segments.length === 0 ? void 0 : segments.join("/");
16267
16276
  };
16277
+ /** The specifier protocol pnpm resolves through the workspace itself. @internal */
16278
+ const WORKSPACE_PREFIX = "workspace:";
16279
+ /**
16280
+ * The importer a `link:` target lands INSIDE, longest path first.
16281
+ *
16282
+ * pnpm's `publishConfig.linkDirectory` makes a workspace link point at the
16283
+ * package's publish directory rather than its root — `link:../bundler/dist/dev/pkg`
16284
+ * where `packages/bundler` is the importer — so the target itself is a build
16285
+ * output that is no importer and never will be. The owning importer is the
16286
+ * longest ancestor of the target that IS one; longest-first so a nested importer
16287
+ * beats its parent.
16288
+ *
16289
+ * The root importer (`"."`) is deliberately unreachable here: it is an ancestor
16290
+ * of every path in the workspace, so admitting it would resolve every stray link
16291
+ * to the root rather than leaving it unnamed.
16292
+ *
16293
+ * @internal
16294
+ */
16295
+ const owningImporter = (target, importerPaths) => {
16296
+ const segments = target.split("/");
16297
+ for (let end = segments.length - 1; end > 0; end--) {
16298
+ const candidate = segments.slice(0, end).join("/");
16299
+ if (importerPaths.has(candidate)) return candidate;
16300
+ }
16301
+ };
16268
16302
  /**
16269
16303
  * Resolve one importer's outgoing edges. pnpm records `{ specifier, version }`
16270
16304
  * per importer dependency, where the version is either a registry version (the
@@ -16272,9 +16306,22 @@ const resolveLinkTarget = (importerPath, target) => {
16272
16306
  * naming another importer — normalized against this importer's own path. Both
16273
16307
  * are checked against the lockfile's instance ids before being emitted.
16274
16308
  *
16309
+ * A `link:` target that is no importer gets one further chance, and only under
16310
+ * a `workspace:` SPECIFIER: pnpm resolved that edge through the workspace, so
16311
+ * the target directory is known to belong to a workspace package, and
16312
+ * {@link owningImporter} names it. The specifier is what makes this a
16313
+ * resolution rather than a guess — a hand-written `link:../vendor/stub`
16314
+ * specifier names a directory pnpm never claimed was a workspace package, and
16315
+ * attributing it to whichever importer happens to contain it would answer with
16316
+ * the wrong package's peers instead of admitting it could not name the edge.
16317
+ *
16318
+ * The snapshot path ({@link resolveEdges}) deliberately does NOT do this: a
16319
+ * snapshot body records `name: link:<path>` with no specifier beside it, so the
16320
+ * evidence this rule turns on is not available there.
16321
+ *
16275
16322
  * @internal
16276
16323
  */
16277
- const resolveImporterEdges = (importer, importerPath, instanceIds) => {
16324
+ const resolveImporterEdges = (importer, importerPath, instanceIds, importerPaths) => {
16278
16325
  const edges = /* @__PURE__ */ new Map();
16279
16326
  const unnameable = /* @__PURE__ */ new Set();
16280
16327
  for (const group of importerDepGroups(importer)) {
@@ -16283,7 +16330,8 @@ const resolveImporterEdges = (importer, importerPath, instanceIds) => {
16283
16330
  if (name === "") continue;
16284
16331
  if (info.version.startsWith(LINK_PREFIX)) {
16285
16332
  const target = resolveLinkTarget(importerPath, info.version.slice(5));
16286
- if (target !== void 0 && instanceIds.has(target)) edges.set(name, target);
16333
+ const owner = target === void 0 ? void 0 : instanceIds.has(target) ? target : info.specifier.startsWith(WORKSPACE_PREFIX) ? owningImporter(target, importerPaths) : void 0;
16334
+ if (owner !== void 0) edges.set(name, owner);
16287
16335
  else unnameable.add(name);
16288
16336
  continue;
16289
16337
  }
@@ -16343,6 +16391,7 @@ const toFields$1 = (raw) => Effect.gen(function* () {
16343
16391
  ...raw.packages ? Object.keys(raw.packages) : [],
16344
16392
  ...Object.keys(raw.importers)
16345
16393
  ]);
16394
+ const importerPaths = new Set(Object.keys(raw.importers).filter((path) => path !== "." && path !== ""));
16346
16395
  const emitted = /* @__PURE__ */ new Set();
16347
16396
  for (const [importerPath, importer] of Object.entries(raw.importers)) {
16348
16397
  if (importerPath === "." || importerPath === "") continue;
@@ -16352,7 +16401,7 @@ const toFields$1 = (raw) => Effect.gen(function* () {
16352
16401
  instanceId: importerPath,
16353
16402
  isWorkspace: true,
16354
16403
  relativePath: importerPath,
16355
- ...resolveImporterEdges(importer, importerPath, instanceIds)
16404
+ ...resolveImporterEdges(importer, importerPath, instanceIds, importerPaths)
16356
16405
  }));
16357
16406
  }
16358
16407
  const emit = (instanceId, meta, edges) => Effect.gen(function* () {
@@ -16398,7 +16447,7 @@ const toFields$1 = (raw) => Effect.gen(function* () {
16398
16447
  });
16399
16448
 
16400
16449
  //#endregion
16401
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/internal/yarn.js
16450
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/internal/yarn.js
16402
16451
  const YarnLockfileRaw = Schema.Record(Schema.String, Schema.Unknown);
16403
16452
  const DepRecord = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
16404
16453
  const YarnEntry = Schema.Struct({
@@ -16575,7 +16624,7 @@ const cleanYarnDeps = (deps) => {
16575
16624
  };
16576
16625
 
16577
16626
  //#endregion
16578
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/Lockfile.js
16627
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/Lockfile.js
16579
16628
  const EMPTY_IMPORTERS = [];
16580
16629
  /**
16581
16630
  * Failure of `Lockfile.parse`: the given content is not a valid lockfile of
@@ -16825,7 +16874,7 @@ var Lockfile = class Lockfile extends Schema.Class("Lockfile")({
16825
16874
  };
16826
16875
 
16827
16876
  //#endregion
16828
- //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_060c8bbc0d868c806eb6e32fbf3c19ea/node_modules/@effected/lockfiles/LockfileIntegrity.js
16877
+ //#region ../../node_modules/.pnpm/@effected+lockfiles@0.6.1_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__@effected+npm@0.11_dc2ae50ba9ac4d16371f19ff9a80bde5/node_modules/@effected/lockfiles/LockfileIntegrity.js
16829
16878
  /**
16830
16879
  * The minimal manifest shape {@link LockfileIntegrity.compare} checks a
16831
16880
  * lockfile against: a package name plus the four optional dependency maps.
@@ -19701,7 +19750,7 @@ var Package = class Package extends Schema.Class("Package")({
19701
19750
  };
19702
19751
 
19703
19752
  //#endregion
19704
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspacePackage.js
19753
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspacePackage.js
19705
19754
  const EMPTY$1 = Object.freeze(Object.create(null));
19706
19755
  const EMPTY_MANIFEST = Object.freeze(Object.create(null));
19707
19756
  /**
@@ -20303,7 +20352,7 @@ var Walker$1 = class {
20303
20352
  };
20304
20353
 
20305
20354
  //#endregion
20306
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceRoot.js
20355
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceRoot.js
20307
20356
  /**
20308
20357
  * The marker filenames {@link WorkspaceRoot} probes for, in priority order.
20309
20358
  *
@@ -20491,7 +20540,7 @@ var WorkspaceRoot = class WorkspaceRoot extends Context.Service()("@effected/wor
20491
20540
  };
20492
20541
 
20493
20542
  //#endregion
20494
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/limits.js
20543
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/limits.js
20495
20544
  /**
20496
20545
  * Hard ceiling on directories the enumerator will visit for one pattern set.
20497
20546
  * Guards the pathological case a depth cap alone does not: a wide, shallow
@@ -20510,7 +20559,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
20510
20559
  const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
20511
20560
 
20512
20561
  //#endregion
20513
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/traverse.js
20562
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/traverse.js
20514
20563
  /** Directory names never descended into. */
20515
20564
  const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
20516
20565
  /** Join root-relative POSIX segments; `""` is the root itself. */
@@ -20601,7 +20650,7 @@ var Traversal = class {
20601
20650
  };
20602
20651
 
20603
20652
  //#endregion
20604
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/enumerate.js
20653
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/enumerate.js
20605
20654
  /** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
20606
20655
  const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
20607
20656
  /**
@@ -20672,7 +20721,7 @@ const enumerate = (root, globs, options) => Effect.gen(function* () {
20672
20721
  });
20673
20722
 
20674
20723
  //#endregion
20675
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/patterns.js
20724
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/patterns.js
20676
20725
  const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
20677
20726
  /** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
20678
20727
  const pnpmPatternsOf = (document) => {
@@ -20730,7 +20779,7 @@ const readPatterns = (root) => Effect.gen(function* () {
20730
20779
  });
20731
20780
 
20732
20781
  //#endregion
20733
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceDiscovery.js
20782
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceDiscovery.js
20734
20783
  /**
20735
20784
  * Raised when a workspace member's `package.json` cannot be read, parsed, or
20736
20785
  * used — it is missing, malformed, or lacks a `name` or `version`.
@@ -21187,7 +21236,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends Context.Service()("@ef
21187
21236
  const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
21188
21237
 
21189
21238
  //#endregion
21190
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/DependencyGraph.js
21239
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/DependencyGraph.js
21191
21240
  /**
21192
21241
  * Raised when the workspace dependency graph cannot be topologically ordered
21193
21242
  * because it contains a cycle.
@@ -24887,7 +24936,7 @@ var Git = class Git extends Context.Service()("@effected/git/Git") {
24887
24936
  };
24888
24937
 
24889
24938
  //#endregion
24890
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/ChangeDetector.js
24939
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/ChangeDetector.js
24891
24940
  /**
24892
24941
  * Which git refs to compare, and whether to fold in the working tree.
24893
24942
  *
@@ -25187,7 +25236,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
25187
25236
  }
25188
25237
 
25189
25238
  //#endregion
25190
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/catalogs.js
25239
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/catalogs.js
25191
25240
  /** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
25192
25241
  const inlineCatalogs = (manifest) => {
25193
25242
  if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
@@ -25253,7 +25302,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
25253
25302
  };
25254
25303
 
25255
25304
  //#endregion
25256
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/ConfigDependencyHooks.js
25305
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/ConfigDependencyHooks.js
25257
25306
  /**
25258
25307
  * The empty {@link PeerDependencyRules}: every axis present and empty.
25259
25308
  *
@@ -25736,7 +25785,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends Context.Service(
25736
25785
  };
25737
25786
 
25738
25787
  //#endregion
25739
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/PackageManagerName.js
25788
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/PackageManagerName.js
25740
25789
  /**
25741
25790
  * The four package managers this package understands.
25742
25791
  *
@@ -26112,7 +26161,7 @@ var PackageManagerDetector = class PackageManagerDetector extends Context.Servic
26112
26161
  };
26113
26162
 
26114
26163
  //#endregion
26115
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/LockfileReader.js
26164
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/LockfileReader.js
26116
26165
  /**
26117
26166
  * Raised when the workspace's lockfile cannot be read off disk.
26118
26167
  *
@@ -26293,7 +26342,7 @@ var LockfileReader = class LockfileReader extends Context.Service()("@effected/w
26293
26342
  };
26294
26343
 
26295
26344
  //#endregion
26296
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/Publishability.js
26345
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/Publishability.js
26297
26346
  /** The public npm registry, used when `publishConfig.registry` says nothing. */
26298
26347
  const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
26299
26348
  /**
@@ -26453,7 +26502,7 @@ var PublishabilityDetector = class extends Context.Service()("@effected/workspac
26453
26502
  };
26454
26503
 
26455
26504
  //#endregion
26456
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/importerVersions.js
26505
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/internal/importerVersions.js
26457
26506
  /**
26458
26507
  * Strip pnpm's peer-disambiguation suffix from a recorded importer version.
26459
26508
  *
@@ -26540,7 +26589,7 @@ const unanimousVersionOf = (index, dependency) => {
26540
26589
  };
26541
26590
 
26542
26591
  //#endregion
26543
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceCatalogs.js
26592
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceCatalogs.js
26544
26593
  /**
26545
26594
  * An immutable, fully-normalized catalog collection — the one catalog
26546
26595
  * resolution semantic in the package.
@@ -27111,7 +27160,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
27111
27160
  };
27112
27161
 
27113
27162
  //#endregion
27114
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
27163
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
27115
27164
  const EMPTY = Object.freeze(Object.create(null));
27116
27165
  const DependencyMap = Schema.Record(Schema.String, Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed(EMPTY)), Schema.withConstructorDefault(Effect.succeed(EMPTY)));
27117
27166
  /**
@@ -27335,7 +27384,7 @@ var WorkspaceStateSnapshot = class extends Schema.Class("WorkspaceStateSnapshot"
27335
27384
  };
27336
27385
 
27337
27386
  //#endregion
27338
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceSnapshots.js
27387
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/WorkspaceSnapshots.js
27339
27388
  /** Whether `value` is a non-null, non-array object. */
27340
27389
  const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
27341
27390
  /** Whether every value in a record is a string — a usable dependency map. */
@@ -27613,7 +27662,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
27613
27662
  };
27614
27663
 
27615
27664
  //#endregion
27616
- //#region ../../node_modules/.pnpm/@effected+workspaces@0.15.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/Workspaces.js
27665
+ //#region ../../node_modules/.pnpm/@effected+workspaces@0.16.0_@effected+jsonc@0.7.0_effect@4.0.0-rc.109__effect@4.0.0-rc.109/node_modules/@effected/workspaces/Workspaces.js
27617
27666
  const compose = (options, catalogsFactory) => {
27618
27667
  const roots = WorkspaceRoot.layer;
27619
27668
  const detector = PackageManagerDetector.layer;