@savvy-web/silk 3.2.1 → 3.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.
- package/changesets-changelog.cjs +775 -128
- package/changesets-changelog.d.cts +329 -11
- package/changesets-changelog.d.ts +329 -11
- package/changesets-changelog.js +777 -129
- package/changesets-markdownlint.cjs +775 -128
- package/changesets-markdownlint.d.cts +329 -11
- package/changesets-markdownlint.d.ts +329 -11
- package/changesets-markdownlint.js +777 -129
- package/package.json +4 -4
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
package/changesets-changelog.cjs
CHANGED
|
@@ -2353,7 +2353,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
|
|
|
2353
2353
|
}
|
|
2354
2354
|
};
|
|
2355
2355
|
//#endregion
|
|
2356
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
2356
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/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"`.
|
|
@@ -2374,7 +2374,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
|
|
|
2374
2374
|
trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
|
|
2375
2375
|
}) {};
|
|
2376
2376
|
//#endregion
|
|
2377
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2377
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogResolver.js
|
|
2378
2378
|
/**
|
|
2379
2379
|
* Contract for resolving pnpm `catalog:` dependency specifiers to concrete
|
|
2380
2380
|
* version ranges.
|
|
@@ -2420,7 +2420,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
|
|
|
2420
2420
|
static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2421
2421
|
};
|
|
2422
2422
|
//#endregion
|
|
2423
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2423
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/WorkspaceResolver.js
|
|
2424
2424
|
/**
|
|
2425
2425
|
* Raised when a `catalog:` or `workspace:` specifier cannot be resolved
|
|
2426
2426
|
* because the resolution mechanism itself failed — not for an ordinary
|
|
@@ -2481,7 +2481,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
|
|
|
2481
2481
|
static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2482
2482
|
};
|
|
2483
2483
|
//#endregion
|
|
2484
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2484
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogAssemblyError.js
|
|
2485
2485
|
/**
|
|
2486
2486
|
* Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
|
|
2487
2487
|
* that is unreadable or not valid YAML, a root `package.json` `workspaces` field
|
|
@@ -2525,7 +2525,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
|
|
|
2525
2525
|
}
|
|
2526
2526
|
};
|
|
2527
2527
|
//#endregion
|
|
2528
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2528
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySection.js
|
|
2529
2529
|
/**
|
|
2530
2530
|
* The short dependency kind: which dependency map an entry came from, named the
|
|
2531
2531
|
* way consumers branch on it.
|
|
@@ -4026,7 +4026,7 @@ const isComparatorSetSubset = (sub, sup) => {
|
|
|
4026
4026
|
return true;
|
|
4027
4027
|
};
|
|
4028
4028
|
//#endregion
|
|
4029
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4029
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySpecifier.js
|
|
4030
4030
|
/**
|
|
4031
4031
|
* Indicates that a string could not be parsed as a valid dependency specifier.
|
|
4032
4032
|
*
|
|
@@ -4233,7 +4233,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
|
|
|
4233
4233
|
FromString: fromString
|
|
4234
4234
|
});
|
|
4235
4235
|
//#endregion
|
|
4236
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4236
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/IntegrityHash.js
|
|
4237
4237
|
const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
|
|
4238
4238
|
const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
|
|
4239
4239
|
const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
|
|
@@ -4286,7 +4286,7 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
|
|
|
4286
4286
|
decode: decode$2
|
|
4287
4287
|
});
|
|
4288
4288
|
//#endregion
|
|
4289
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4289
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.4.0_@effected+semver@0.2.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/ReleaseAgeGate.js
|
|
4290
4290
|
const MS_PER_MINUTE = 6e4;
|
|
4291
4291
|
/**
|
|
4292
4292
|
* A source's partial contribution to a {@link ReleaseAgeGate}: the effective
|
|
@@ -4374,7 +4374,9 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
|
|
|
4374
4374
|
* Combine partial contributions from multiple sources into one effective
|
|
4375
4375
|
* gate: **strictest age wins** (the maximum of the contributed ages,
|
|
4376
4376
|
* clamped to be non-negative) and the exclude sets **union** (deduplicated,
|
|
4377
|
-
*
|
|
4377
|
+
* lexicographically sorted — a canonical wire form, so the combined gate is
|
|
4378
|
+
* deterministic regardless of the order contributions arrive in). A
|
|
4379
|
+
* contribution's absent field adds nothing; a
|
|
4378
4380
|
* negative or non-finite contributed age is ignored by the clamp. With no
|
|
4379
4381
|
* contributions (or only empty ones) the result is the inert zero gate
|
|
4380
4382
|
* (`ageMinutes: 0`, `exclude: []`).
|
|
@@ -4388,7 +4390,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
|
|
|
4388
4390
|
static combine(...contributions) {
|
|
4389
4391
|
const ages = contributions.map((contribution) => contribution.ageMinutes).filter((age) => typeof age === "number" && Number.isFinite(age));
|
|
4390
4392
|
const ageMinutes = ages.length > 0 ? Math.max(0, ...ages) : 0;
|
|
4391
|
-
const exclude = [...new Set(contributions.flatMap((contribution) => contribution.exclude ?? []))];
|
|
4393
|
+
const exclude = [...new Set(contributions.flatMap((contribution) => contribution.exclude ?? []))].sort();
|
|
4392
4394
|
return ReleaseAgeGate.make({
|
|
4393
4395
|
ageMinutes,
|
|
4394
4396
|
exclude
|
|
@@ -4454,7 +4456,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
|
|
|
4454
4456
|
}
|
|
4455
4457
|
};
|
|
4456
4458
|
//#endregion
|
|
4457
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4459
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/ImporterDependency.js
|
|
4458
4460
|
/**
|
|
4459
4461
|
* One declared dependency of one workspace importer, as the lockfile records it.
|
|
4460
4462
|
*
|
|
@@ -4465,11 +4467,20 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
|
|
|
4465
4467
|
* `ClassifiedSpecifier` (`catalog:` / `workspace:` / range / dist-tag / raw),
|
|
4466
4468
|
* while encoding round-trips the **exact original string byte-for-byte** — the
|
|
4467
4469
|
* guarantee a before/after lockfile diff relies on.
|
|
4468
|
-
* - `version` — the concrete resolved version, **populated by pnpm only
|
|
4469
|
-
* records `{ specifier, version }`
|
|
4470
|
-
*
|
|
4471
|
-
* `version` is
|
|
4472
|
-
* `
|
|
4470
|
+
* - `version` — the concrete resolved version, **populated by pnpm only**:
|
|
4471
|
+
* comparable across refs and printable. pnpm records `{ specifier, version }`
|
|
4472
|
+
* per importer dependency, and the parser splits pnpm's peer-disambiguation
|
|
4473
|
+
* suffix off into `peerSuffix`, so `version` is always the plain version — or
|
|
4474
|
+
* a non-registry resolution (`link:../utils`, `file:...`), passed through
|
|
4475
|
+
* verbatim. bun and npm record resolved versions on their package entries
|
|
4476
|
+
* instead, so for those formats `version` is absent and a consumer joins by
|
|
4477
|
+
* `name` against `Lockfile.packages`.
|
|
4478
|
+
* - `peerSuffix` — pnpm's peer-disambiguation context: the raw parenthesized
|
|
4479
|
+
* chain the lockfile recorded after the version, e.g.
|
|
4480
|
+
* `(effect@4.0.0-beta.101)(ioredis@5.11.1(supports-color@8.1.1))`. Present
|
|
4481
|
+
* only when the lockfile recorded one — never for suffix-free pnpm entries,
|
|
4482
|
+
* and never for the other formats, which do not record peer context per
|
|
4483
|
+
* importer dependency.
|
|
4473
4484
|
* - `depType` — which dependency map declared it, spelled with `@effected/npm`'s
|
|
4474
4485
|
* kit-wide `DependencyField` vocabulary.
|
|
4475
4486
|
*
|
|
@@ -4479,10 +4490,11 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
|
|
|
4479
4490
|
name: effect.Schema.NonEmptyString,
|
|
4480
4491
|
specifier: DependencySpecifier.FromString,
|
|
4481
4492
|
version: effect.Schema.optionalKey(effect.Schema.String),
|
|
4493
|
+
peerSuffix: effect.Schema.optionalKey(effect.Schema.String),
|
|
4482
4494
|
depType: DependencyField
|
|
4483
4495
|
}) {};
|
|
4484
4496
|
//#endregion
|
|
4485
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4497
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/LockfileImporter.js
|
|
4486
4498
|
/**
|
|
4487
4499
|
* One workspace importer's declared dependencies, as the lockfile records them.
|
|
4488
4500
|
*
|
|
@@ -4506,7 +4518,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
|
|
|
4506
4518
|
dependencies: effect.Schema.Array(ImporterDependency)
|
|
4507
4519
|
}) {};
|
|
4508
4520
|
//#endregion
|
|
4509
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4521
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/ResolvedPackage.js
|
|
4510
4522
|
const EMPTY_DEPENDENCIES = {};
|
|
4511
4523
|
/**
|
|
4512
4524
|
* A package resolved from a lockfile.
|
|
@@ -4541,7 +4553,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
|
|
|
4541
4553
|
dependencies: effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY_DEPENDENCIES)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY_DEPENDENCIES)))
|
|
4542
4554
|
}) {};
|
|
4543
4555
|
//#endregion
|
|
4544
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4556
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/WorkspaceDependency.js
|
|
4545
4557
|
/**
|
|
4546
4558
|
* A directed dependency edge between two workspace packages as recorded in
|
|
4547
4559
|
* the lockfile.
|
|
@@ -4563,7 +4575,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
|
|
|
4563
4575
|
constraint: effect.Schema.String
|
|
4564
4576
|
}) {};
|
|
4565
4577
|
//#endregion
|
|
4566
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4578
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/PnpmExtension.js
|
|
4567
4579
|
/**
|
|
4568
4580
|
* Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
|
|
4569
4581
|
* when the format is `"pnpm"`.
|
|
@@ -4588,7 +4600,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
|
|
|
4588
4600
|
}))
|
|
4589
4601
|
}) {};
|
|
4590
4602
|
//#endregion
|
|
4591
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4603
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/LockfileFormat.js
|
|
4592
4604
|
/**
|
|
4593
4605
|
* The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
|
|
4594
4606
|
* `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
|
|
@@ -4622,7 +4634,7 @@ const FILENAMES = {
|
|
|
4622
4634
|
*/
|
|
4623
4635
|
const filenameFor = (format) => FILENAMES[format];
|
|
4624
4636
|
//#endregion
|
|
4625
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4637
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/shared.js
|
|
4626
4638
|
/**
|
|
4627
4639
|
* The four dependency sections of a manifest, in a stable order — the shared
|
|
4628
4640
|
* dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
|
|
@@ -4661,22 +4673,54 @@ const toIntegrityHash = (raw) => {
|
|
|
4661
4673
|
};
|
|
4662
4674
|
const decodeSpecifier = effect.Schema.decodeUnknownExit(DependencySpecifier.FromString);
|
|
4663
4675
|
/**
|
|
4676
|
+
* Split pnpm's peer-disambiguation suffix off a recorded string: everything
|
|
4677
|
+
* from the first `(` on is suffix, since package names and versions never
|
|
4678
|
+
* contain `(`. Handles both shapes pnpm records — a bare version
|
|
4679
|
+
* (`"1.0.0(effect@4.0.0)"`, importer entries) and a `name@version` snapshot key
|
|
4680
|
+
* (`"fdir@6.5.0(picomatch@4.0.4)"`). A string with no `(` — including
|
|
4681
|
+
* `link:...` / `file:...` resolutions — passes through untouched. So does a
|
|
4682
|
+
* protocol-bearing string (a `:` ahead of the first `(`), where a parenthesis
|
|
4683
|
+
* is path or URL text rather than a peer suffix: pnpm attaches suffixes to
|
|
4684
|
+
* registry versions only. This is the single stripping implementation — do not
|
|
4685
|
+
* hand-roll an `indexOf("(")` split elsewhere.
|
|
4686
|
+
*
|
|
4687
|
+
* @internal
|
|
4688
|
+
*/
|
|
4689
|
+
const splitPeerSuffix = (raw) => {
|
|
4690
|
+
const parenIndex = raw.indexOf("(");
|
|
4691
|
+
if (parenIndex === -1) return { plain: raw };
|
|
4692
|
+
if (raw.lastIndexOf(":", parenIndex) !== -1) return { plain: raw };
|
|
4693
|
+
return {
|
|
4694
|
+
plain: raw.slice(0, parenIndex),
|
|
4695
|
+
peerSuffix: raw.slice(parenIndex)
|
|
4696
|
+
};
|
|
4697
|
+
};
|
|
4698
|
+
/**
|
|
4664
4699
|
* Build one {@link ImporterDependency}, decoding the raw specifier string into
|
|
4665
4700
|
* the `@effected/npm` `ClassifiedSpecifier` tagged union. Returns `undefined`
|
|
4666
4701
|
* — a skip, never a throw — when the name is empty or the specifier does not
|
|
4667
4702
|
* classify (e.g. an empty specifier), per the total-string-surgery discipline.
|
|
4668
4703
|
*
|
|
4704
|
+
* A pnpm-recorded version is normalized through {@link splitPeerSuffix}: the
|
|
4705
|
+
* `version` field carries the plain version and the split-off peer chain lands
|
|
4706
|
+
* in `peerSuffix`. A version that is *only* a peer chain (empty plain part) is
|
|
4707
|
+
* treated as no concrete version — a skip of both fields, never a throw.
|
|
4708
|
+
*
|
|
4669
4709
|
* @internal
|
|
4670
4710
|
*/
|
|
4671
4711
|
const buildImporterDependency = (name, specifier, depType, version) => {
|
|
4672
4712
|
if (name === "") return void 0;
|
|
4673
4713
|
const exit = decodeSpecifier(specifier);
|
|
4674
4714
|
if (effect.Exit.isFailure(exit)) return void 0;
|
|
4715
|
+
const resolved = version !== void 0 && version !== "" ? splitPeerSuffix(version) : void 0;
|
|
4675
4716
|
return ImporterDependency.make({
|
|
4676
4717
|
name,
|
|
4677
4718
|
specifier: exit.value,
|
|
4678
4719
|
depType,
|
|
4679
|
-
...
|
|
4720
|
+
...resolved !== void 0 && resolved.plain !== "" ? {
|
|
4721
|
+
version: resolved.plain,
|
|
4722
|
+
...resolved.peerSuffix !== void 0 ? { peerSuffix: resolved.peerSuffix } : {}
|
|
4723
|
+
} : {}
|
|
4680
4724
|
});
|
|
4681
4725
|
};
|
|
4682
4726
|
/**
|
|
@@ -6521,7 +6565,7 @@ var JsoncModifier = class {
|
|
|
6521
6565
|
});
|
|
6522
6566
|
};
|
|
6523
6567
|
//#endregion
|
|
6524
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
6568
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/bun.js
|
|
6525
6569
|
const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
6526
6570
|
const BunWorkspaceEntry = effect.Schema.Struct({
|
|
6527
6571
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -6614,7 +6658,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
|
|
|
6614
6658
|
};
|
|
6615
6659
|
});
|
|
6616
6660
|
//#endregion
|
|
6617
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
6661
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/npm.js
|
|
6618
6662
|
const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
6619
6663
|
const NpmPackageEntry = effect.Schema.Struct({
|
|
6620
6664
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -6712,7 +6756,7 @@ const toFields$2 = (raw) => effect.Effect.gen(function* () {
|
|
|
6712
6756
|
};
|
|
6713
6757
|
});
|
|
6714
6758
|
//#endregion
|
|
6715
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
6759
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/YamlNode.js
|
|
6716
6760
|
/**
|
|
6717
6761
|
* YAML scalar presentation styles.
|
|
6718
6762
|
*
|
|
@@ -7114,7 +7158,7 @@ function nodeToValue(node, anchors, budget, counting = false) {
|
|
|
7114
7158
|
return null;
|
|
7115
7159
|
}
|
|
7116
7160
|
//#endregion
|
|
7117
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
7161
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/diagnostics.js
|
|
7118
7162
|
/** Error codes emitted by the lexer stage. */
|
|
7119
7163
|
const YAML_LEX_ERROR_CODES = [
|
|
7120
7164
|
"UnexpectedCharacter",
|
|
@@ -7192,7 +7236,7 @@ function isFatalCode(code) {
|
|
|
7192
7236
|
return FATAL_CODES.has(code);
|
|
7193
7237
|
}
|
|
7194
7238
|
//#endregion
|
|
7195
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
7239
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/YamlDiagnostic.js
|
|
7196
7240
|
/**
|
|
7197
7241
|
* Error codes emitted by the lexer stage.
|
|
7198
7242
|
*
|
|
@@ -7313,7 +7357,7 @@ function lineChar(text, offset) {
|
|
|
7313
7357
|
};
|
|
7314
7358
|
}
|
|
7315
7359
|
//#endregion
|
|
7316
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
7360
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/anchors.js
|
|
7317
7361
|
/**
|
|
7318
7362
|
* Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
|
|
7319
7363
|
* Aliases represent references to existing anchored nodes and cannot have their own anchors.
|
|
@@ -7406,7 +7450,7 @@ function collectAnchors(node, anchors) {
|
|
|
7406
7450
|
}
|
|
7407
7451
|
}
|
|
7408
7452
|
//#endregion
|
|
7409
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
7453
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/lexer.js
|
|
7410
7454
|
/**
|
|
7411
7455
|
* Create a new YAML scanner for the given source text.
|
|
7412
7456
|
*
|
|
@@ -8363,7 +8407,7 @@ function lexAll(text) {
|
|
|
8363
8407
|
return tokens;
|
|
8364
8408
|
}
|
|
8365
8409
|
//#endregion
|
|
8366
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
8410
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/cst-parser.js
|
|
8367
8411
|
/**
|
|
8368
8412
|
* Hardening: cap CST nesting so hostile inputs cannot overflow the stack
|
|
8369
8413
|
* while the tree is being BUILT. Set slightly above the composer's
|
|
@@ -9075,7 +9119,7 @@ function parseCSTAll(text) {
|
|
|
9075
9119
|
return parseDocuments(lexAll(text), text);
|
|
9076
9120
|
}
|
|
9077
9121
|
//#endregion
|
|
9078
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
9122
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/state.js
|
|
9079
9123
|
let lineStartsText;
|
|
9080
9124
|
let lineStartsCache = [];
|
|
9081
9125
|
function getLineStarts(text) {
|
|
@@ -9181,7 +9225,7 @@ function exitNesting(state) {
|
|
|
9181
9225
|
state.depth--;
|
|
9182
9226
|
}
|
|
9183
9227
|
//#endregion
|
|
9184
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
9228
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/tags.js
|
|
9185
9229
|
/**
|
|
9186
9230
|
* Resolve a tag shorthand using the document's %TAG directives.
|
|
9187
9231
|
* For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
|
|
@@ -9267,7 +9311,7 @@ function validateTagHandlesInDocument(docCst, state) {
|
|
|
9267
9311
|
}
|
|
9268
9312
|
}
|
|
9269
9313
|
//#endregion
|
|
9270
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
9314
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/scalars.js
|
|
9271
9315
|
const NULL_RE$1 = /^(?:null|Null|NULL|~)$/;
|
|
9272
9316
|
const TRUE_RE$1 = /^(?:true|True|TRUE)$/;
|
|
9273
9317
|
const FALSE_RE$1 = /^(?:false|False|FALSE)$/;
|
|
@@ -10145,7 +10189,7 @@ function shouldPreserveRaw(rawValue, value) {
|
|
|
10145
10189
|
return false;
|
|
10146
10190
|
}
|
|
10147
10191
|
//#endregion
|
|
10148
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
10192
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/block.js
|
|
10149
10193
|
/**
|
|
10150
10194
|
* Compose a block map from its CST children, with an optional external first key.
|
|
10151
10195
|
*
|
|
@@ -11293,7 +11337,7 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
|
|
|
11293
11337
|
return map;
|
|
11294
11338
|
}
|
|
11295
11339
|
//#endregion
|
|
11296
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
11340
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/flow.js
|
|
11297
11341
|
/**
|
|
11298
11342
|
* Validate that flow collection entries are separated by commas.
|
|
11299
11343
|
*
|
|
@@ -11685,7 +11729,7 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
|
|
|
11685
11729
|
return seq;
|
|
11686
11730
|
}
|
|
11687
11731
|
//#endregion
|
|
11688
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
11732
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/composer/document.js
|
|
11689
11733
|
/** The flow-composer dispatch wired into every state this module creates. */
|
|
11690
11734
|
const FLOW = {
|
|
11691
11735
|
composeFlowMap,
|
|
@@ -12351,7 +12395,7 @@ function composeAllDocuments(text, options) {
|
|
|
12351
12395
|
};
|
|
12352
12396
|
}
|
|
12353
12397
|
//#endregion
|
|
12354
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
12398
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/fold.js
|
|
12355
12399
|
/**
|
|
12356
12400
|
* Column-based line folding for a single logical scalar line (YAML 1.2 flow
|
|
12357
12401
|
* folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
|
|
@@ -12587,7 +12631,7 @@ function renderBlockFolded(s, indent) {
|
|
|
12587
12631
|
return `>${indentIndicator}${chomp}\n${outputLines.join("\n")}`;
|
|
12588
12632
|
}
|
|
12589
12633
|
//#endregion
|
|
12590
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
12634
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.6.0_effect@4.0.0-beta.101/node_modules/@effected/yaml/internal/stringifier.js
|
|
12591
12635
|
/**
|
|
12592
12636
|
* Thrown by the stringifier on its failure paths (circular references). The
|
|
12593
12637
|
* facade catches this and materializes the public stringify error.
|
|
@@ -13536,7 +13580,7 @@ function deepEqualValues(a, b) {
|
|
|
13536
13580
|
return false;
|
|
13537
13581
|
}
|
|
13538
13582
|
//#endregion
|
|
13539
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
13583
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/documents.js
|
|
13540
13584
|
/**
|
|
13541
13585
|
* An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
|
|
13542
13586
|
* and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
|
|
@@ -13606,7 +13650,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
|
|
|
13606
13650
|
};
|
|
13607
13651
|
});
|
|
13608
13652
|
//#endregion
|
|
13609
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
13653
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/pnpm.js
|
|
13610
13654
|
const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
|
|
13611
13655
|
specifier: effect.Schema.String,
|
|
13612
13656
|
version: effect.Schema.String
|
|
@@ -13703,8 +13747,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
|
|
|
13703
13747
|
}));
|
|
13704
13748
|
}
|
|
13705
13749
|
if (raw.packages) for (const [key, pkg] of Object.entries(raw.packages)) {
|
|
13706
|
-
const
|
|
13707
|
-
const bare = parenIndex === -1 ? key : key.slice(0, parenIndex);
|
|
13750
|
+
const { plain: bare } = splitPeerSuffix(key);
|
|
13708
13751
|
const atIndex = bare.lastIndexOf("@");
|
|
13709
13752
|
if (atIndex <= 0) continue;
|
|
13710
13753
|
const name = bare.slice(0, atIndex);
|
|
@@ -13732,7 +13775,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
|
|
|
13732
13775
|
};
|
|
13733
13776
|
});
|
|
13734
13777
|
//#endregion
|
|
13735
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
13778
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/internal/yarn.js
|
|
13736
13779
|
const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
|
|
13737
13780
|
const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
13738
13781
|
const YarnEntry = effect.Schema.Struct({
|
|
@@ -13855,7 +13898,7 @@ const cleanYarnDeps = (deps) => {
|
|
|
13855
13898
|
return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
|
|
13856
13899
|
};
|
|
13857
13900
|
//#endregion
|
|
13858
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
13901
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/Lockfile.js
|
|
13859
13902
|
const EMPTY_IMPORTERS = [];
|
|
13860
13903
|
/**
|
|
13861
13904
|
* Failure of `Lockfile.parse`: the given content is not a valid lockfile of
|
|
@@ -14099,7 +14142,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
|
|
|
14099
14142
|
}
|
|
14100
14143
|
};
|
|
14101
14144
|
//#endregion
|
|
14102
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
14145
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.2.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._bb7f362bdd42193e6ed4fc5154b217f4/node_modules/@effected/lockfiles/LockfileIntegrity.js
|
|
14103
14146
|
/**
|
|
14104
14147
|
* The minimal manifest shape {@link LockfileIntegrity.compare} checks a
|
|
14105
14148
|
* lockfile against: a package name plus the four optional dependency maps.
|
|
@@ -14215,7 +14258,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
|
|
|
14215
14258
|
}
|
|
14216
14259
|
};
|
|
14217
14260
|
//#endregion
|
|
14218
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.
|
|
14261
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
|
|
14219
14262
|
/**
|
|
14220
14263
|
* A resolved dependency entry pairing a package name with its version
|
|
14221
14264
|
* specifier and the `kind` of map it came from (`@effected/npm`'s
|
|
@@ -14279,7 +14322,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
|
|
|
14279
14322
|
}
|
|
14280
14323
|
};
|
|
14281
14324
|
//#endregion
|
|
14282
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.
|
|
14325
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
|
|
14283
14326
|
/**
|
|
14284
14327
|
* A single `devEngines` constraint with a name and optional `version` / `onFail`.
|
|
14285
14328
|
*
|
|
@@ -15834,7 +15877,7 @@ effect.Schema.String.pipe(effect.Schema.decodeTo(SpdxExpressionUnion, effect.Sch
|
|
|
15834
15877
|
encode: (expression) => effect.Effect.succeed(serialize$1(expression))
|
|
15835
15878
|
})));
|
|
15836
15879
|
//#endregion
|
|
15837
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.
|
|
15880
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
|
|
15838
15881
|
/**
|
|
15839
15882
|
* Indicates that a string is not a valid SPDX license identifier or expression.
|
|
15840
15883
|
*
|
|
@@ -15869,7 +15912,7 @@ const isValidSpdx = (value) => {
|
|
|
15869
15912
|
*/
|
|
15870
15913
|
const SpdxLicense = effect.Schema.String.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isValidSpdx(value) ? void 0 : "Expected a valid SPDX license expression")), effect.Schema.brand("SpdxLicense"));
|
|
15871
15914
|
//#endregion
|
|
15872
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.
|
|
15915
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
|
|
15873
15916
|
const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
|
|
15874
15917
|
/**
|
|
15875
15918
|
* The `packageManager` field only ever carries corepack's `<algo>.<hex>`
|
|
@@ -15927,7 +15970,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
|
|
|
15927
15970
|
}
|
|
15928
15971
|
};
|
|
15929
15972
|
//#endregion
|
|
15930
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.
|
|
15973
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
|
|
15931
15974
|
/**
|
|
15932
15975
|
* Indicates that a string could not be used as a valid npm package name.
|
|
15933
15976
|
*
|
|
@@ -15985,7 +16028,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
|
|
|
15985
16028
|
isScoped
|
|
15986
16029
|
});
|
|
15987
16030
|
//#endregion
|
|
15988
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.
|
|
16031
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
|
|
15989
16032
|
const parsePersonString = (input) => {
|
|
15990
16033
|
const emailMatch = input.match(/<([^>]+)>/);
|
|
15991
16034
|
const urlMatch = input.match(/\(([^)]+)\)/);
|
|
@@ -16128,7 +16171,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
|
|
|
16128
16171
|
}
|
|
16129
16172
|
};
|
|
16130
16173
|
//#endregion
|
|
16131
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.
|
|
16174
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
|
|
16132
16175
|
const KEY_INDEX = new Map([
|
|
16133
16176
|
"$schema",
|
|
16134
16177
|
"name",
|
|
@@ -16351,7 +16394,7 @@ const renderJson = (raw, options) => {
|
|
|
16351
16394
|
return options.newline ? `${json}\n` : json;
|
|
16352
16395
|
};
|
|
16353
16396
|
//#endregion
|
|
16354
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.
|
|
16397
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.5.2_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
|
|
16355
16398
|
const toHashMap = effect.SchemaTransformation.transform({
|
|
16356
16399
|
decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
|
|
16357
16400
|
encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
|
|
@@ -16669,7 +16712,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
|
|
|
16669
16712
|
}
|
|
16670
16713
|
};
|
|
16671
16714
|
//#endregion
|
|
16672
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16715
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspacePackage.js
|
|
16673
16716
|
const EMPTY$1 = Object.freeze(Object.create(null));
|
|
16674
16717
|
const EMPTY_MANIFEST = Object.freeze(Object.create(null));
|
|
16675
16718
|
/**
|
|
@@ -17274,7 +17317,7 @@ const Walker$1 = {
|
|
|
17274
17317
|
findRoot: findRoot$1
|
|
17275
17318
|
};
|
|
17276
17319
|
//#endregion
|
|
17277
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17320
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceRoot.js
|
|
17278
17321
|
/**
|
|
17279
17322
|
* The marker filenames {@link WorkspaceRoot} probes for, in priority order.
|
|
17280
17323
|
*
|
|
@@ -17461,7 +17504,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
|
|
|
17461
17504
|
static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
|
|
17462
17505
|
};
|
|
17463
17506
|
//#endregion
|
|
17464
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17507
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/limits.js
|
|
17465
17508
|
/**
|
|
17466
17509
|
* Hard ceiling on directories the enumerator will visit for one pattern set.
|
|
17467
17510
|
* Guards the pathological case a depth cap alone does not: a wide, shallow
|
|
@@ -17479,7 +17522,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
|
|
|
17479
17522
|
*/
|
|
17480
17523
|
const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
17481
17524
|
//#endregion
|
|
17482
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17525
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/traverse.js
|
|
17483
17526
|
/** Directory names never descended into. */
|
|
17484
17527
|
const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
|
|
17485
17528
|
/** Join root-relative POSIX segments; `""` is the root itself. */
|
|
@@ -17569,7 +17612,7 @@ var Traversal = class {
|
|
|
17569
17612
|
}
|
|
17570
17613
|
};
|
|
17571
17614
|
//#endregion
|
|
17572
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17615
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/enumerate.js
|
|
17573
17616
|
/** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
|
|
17574
17617
|
const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
|
|
17575
17618
|
/**
|
|
@@ -17639,7 +17682,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
|
|
|
17639
17682
|
return results;
|
|
17640
17683
|
});
|
|
17641
17684
|
//#endregion
|
|
17642
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17685
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/patterns.js
|
|
17643
17686
|
const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
|
|
17644
17687
|
/** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
|
|
17645
17688
|
const pnpmPatternsOf = (document) => {
|
|
@@ -17696,7 +17739,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
|
|
|
17696
17739
|
return manifestPatternsOf(manifest);
|
|
17697
17740
|
});
|
|
17698
17741
|
//#endregion
|
|
17699
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17742
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceDiscovery.js
|
|
17700
17743
|
/**
|
|
17701
17744
|
* Raised when a workspace member's `package.json` cannot be read, parsed, or
|
|
17702
17745
|
* used — it is missing, malformed, or lacks a `name` or `version`.
|
|
@@ -18130,7 +18173,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
|
|
|
18130
18173
|
};
|
|
18131
18174
|
const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
|
|
18132
18175
|
//#endregion
|
|
18133
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18176
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/DependencyGraph.js
|
|
18134
18177
|
/**
|
|
18135
18178
|
* Raised when the workspace dependency graph cannot be topologically ordered
|
|
18136
18179
|
* because it contains a cycle.
|
|
@@ -18365,7 +18408,7 @@ const kahn = (edges) => {
|
|
|
18365
18408
|
};
|
|
18366
18409
|
};
|
|
18367
18410
|
//#endregion
|
|
18368
|
-
//#region ../../node_modules/.pnpm/@effected+git@0.
|
|
18411
|
+
//#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/GitCommand.js
|
|
18369
18412
|
/**
|
|
18370
18413
|
* Builds a `git` `ChildProcess.StandardCommand` with the argv this package
|
|
18371
18414
|
* classifies against.
|
|
@@ -18784,7 +18827,7 @@ const GitCommand = {
|
|
|
18784
18827
|
status
|
|
18785
18828
|
};
|
|
18786
18829
|
//#endregion
|
|
18787
|
-
//#region ../../node_modules/.pnpm/@effected+git@0.
|
|
18830
|
+
//#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/internal/run.js
|
|
18788
18831
|
/**
|
|
18789
18832
|
* Spawns `command` and collects its stdout, stderr, and exit code as a single
|
|
18790
18833
|
* triple.
|
|
@@ -18811,7 +18854,7 @@ const runCollected = (command) => effect.Effect.scoped(effect.Effect.gen(functio
|
|
|
18811
18854
|
};
|
|
18812
18855
|
}));
|
|
18813
18856
|
//#endregion
|
|
18814
|
-
//#region ../../node_modules/.pnpm/@effected+git@0.
|
|
18857
|
+
//#region ../../node_modules/.pnpm/@effected+git@0.5.0_effect@4.0.0-beta.101/node_modules/@effected/git/Git.js
|
|
18815
18858
|
/** git's own ceiling: a run that has not answered in 30s is not going to. */
|
|
18816
18859
|
const GIT_TIMEOUT = effect.Duration.seconds(30);
|
|
18817
18860
|
/**
|
|
@@ -19698,6 +19741,12 @@ const make = (spawner) => {
|
|
|
19698
19741
|
};
|
|
19699
19742
|
};
|
|
19700
19743
|
/**
|
|
19744
|
+
* The default for every {@link Git.makeTest} method a test did not stub: a
|
|
19745
|
+
* defect naming the method, so an unexercised call fails loudly instead of
|
|
19746
|
+
* succeeding with a lie or failing with a dishonest typed error.
|
|
19747
|
+
*/
|
|
19748
|
+
const notStubbed = (method) => () => effect.Effect.die(/* @__PURE__ */ new Error(`Git.makeTest: ${method}() was called but not stubbed — no honest default exists for a test double; pass a \`${method}\` override.`));
|
|
19749
|
+
/**
|
|
19701
19750
|
* Typed git introspection over core's `ChildProcessSpawner`: read a
|
|
19702
19751
|
* repository's state at any ref without checking it out, plus the mutating
|
|
19703
19752
|
* tier (`checkout`, `fetch`, `fetchAny`, `submoduleUpdate`, `submoduleAdd`,
|
|
@@ -19720,15 +19769,102 @@ const make = (spawner) => {
|
|
|
19720
19769
|
*
|
|
19721
19770
|
* @public
|
|
19722
19771
|
*/
|
|
19723
|
-
var Git = class extends effect.Context.Service()("@effected/git/Git") {
|
|
19772
|
+
var Git = class Git extends effect.Context.Service()("@effected/git/Git") {
|
|
19724
19773
|
/** Resolves `ChildProcessSpawner` once, at construction — every method's `R` is `never`. */
|
|
19725
19774
|
static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
|
|
19726
19775
|
const spawner = yield* effect_unstable_process.ChildProcessSpawner.ChildProcessSpawner;
|
|
19727
19776
|
return make(spawner);
|
|
19728
19777
|
}));
|
|
19778
|
+
/**
|
|
19779
|
+
* An in-memory test double of the service shape: stub only the methods the
|
|
19780
|
+
* test exercises, every other method **dies** with a defect naming itself.
|
|
19781
|
+
*
|
|
19782
|
+
* @remarks
|
|
19783
|
+
* Unlike `WorkspaceDiscovery.makeTest`, **no method here has an honest
|
|
19784
|
+
* default** — the shape is twenty-six unrelated git operations, and a
|
|
19785
|
+
* fabricated answer for any of them (an empty tree, a made-up sha, a silent
|
|
19786
|
+
* no-op `checkout`) would leak into consumer logic as fact. So every
|
|
19787
|
+
* unstubbed method fails loudly as a defect
|
|
19788
|
+
* (`Git.makeTest: <name>() was called but not stubbed`) rather than
|
|
19789
|
+
* succeeding with a lie or failing with a dishonest typed error — which is
|
|
19790
|
+
* also what makes the double a proof that a test touches *nothing but* the
|
|
19791
|
+
* methods it stubbed.
|
|
19792
|
+
*
|
|
19793
|
+
* The double deliberately models **none** of the live service's semantics:
|
|
19794
|
+
* no stderr classification, no option-injection guard (an option-like ref a
|
|
19795
|
+
* stub accepts would be refused live), no `LC_ALL=C` pinning, no timeout,
|
|
19796
|
+
* and no `./`-vs-bare path resolution on `show` — a stub answers exactly
|
|
19797
|
+
* what it is told and nothing else. A suite exercising any of those wants
|
|
19798
|
+
* `Git.layer` over a mocked `ChildProcessSpawner` (or real git) instead.
|
|
19799
|
+
*
|
|
19800
|
+
* @example
|
|
19801
|
+
* ```ts
|
|
19802
|
+
* import { Git } from "@effected/git";
|
|
19803
|
+
* import { Effect, Option } from "effect";
|
|
19804
|
+
*
|
|
19805
|
+
* const double = Git.makeTest({
|
|
19806
|
+
* show: (_cwd, _ref, path) =>
|
|
19807
|
+
* Effect.succeed(path === "./package.json" ? Option.some("{}") : Option.none()),
|
|
19808
|
+
* });
|
|
19809
|
+
* // `double.show(...)` answers; `double.status(...)` dies, named.
|
|
19810
|
+
* ```
|
|
19811
|
+
*/
|
|
19812
|
+
static makeTest = (overrides = {}) => ({
|
|
19813
|
+
show: notStubbed("show"),
|
|
19814
|
+
lsTree: notStubbed("lsTree"),
|
|
19815
|
+
refExists: notStubbed("refExists"),
|
|
19816
|
+
mergeBase: notStubbed("mergeBase"),
|
|
19817
|
+
changedFiles: notStubbed("changedFiles"),
|
|
19818
|
+
workingChanges: notStubbed("workingChanges"),
|
|
19819
|
+
revParse: notStubbed("revParse"),
|
|
19820
|
+
checkout: notStubbed("checkout"),
|
|
19821
|
+
fetch: notStubbed("fetch"),
|
|
19822
|
+
fetchAny: notStubbed("fetchAny"),
|
|
19823
|
+
submoduleUpdate: notStubbed("submoduleUpdate"),
|
|
19824
|
+
submoduleAdd: notStubbed("submoduleAdd"),
|
|
19825
|
+
sparseCheckoutSet: notStubbed("sparseCheckoutSet"),
|
|
19826
|
+
configSet: notStubbed("configSet"),
|
|
19827
|
+
add: notStubbed("add"),
|
|
19828
|
+
nameStatus: notStubbed("nameStatus"),
|
|
19829
|
+
unstagedChanges: notStubbed("unstagedChanges"),
|
|
19830
|
+
stagedChanges: notStubbed("stagedChanges"),
|
|
19831
|
+
untrackedFiles: notStubbed("untrackedFiles"),
|
|
19832
|
+
defaultBranch: notStubbed("defaultBranch"),
|
|
19833
|
+
currentBranch: notStubbed("currentBranch"),
|
|
19834
|
+
repoRoot: notStubbed("repoRoot"),
|
|
19835
|
+
configGet: notStubbed("configGet"),
|
|
19836
|
+
remoteUrl: notStubbed("remoteUrl"),
|
|
19837
|
+
commitInfo: notStubbed("commitInfo"),
|
|
19838
|
+
status: notStubbed("status"),
|
|
19839
|
+
...overrides
|
|
19840
|
+
});
|
|
19841
|
+
/**
|
|
19842
|
+
* The test layer: {@link Git.makeTest} behind `Layer.succeed`, so a suite
|
|
19843
|
+
* provides only the methods it exercises.
|
|
19844
|
+
*
|
|
19845
|
+
* @remarks
|
|
19846
|
+
* A parameterized layer factory mints a **fresh reference per call**, and
|
|
19847
|
+
* layers memoize by reference — bind the result to a `const` and reuse it
|
|
19848
|
+
* rather than calling `layerTest(...)` at each composition site.
|
|
19849
|
+
*
|
|
19850
|
+
* @example
|
|
19851
|
+
* ```ts
|
|
19852
|
+
* import { Git, LsTreeEntry } from "@effected/git";
|
|
19853
|
+
* import { Effect } from "effect";
|
|
19854
|
+
*
|
|
19855
|
+
* const TestGit = Git.layerTest({
|
|
19856
|
+
* lsTree: () =>
|
|
19857
|
+
* Effect.succeed([
|
|
19858
|
+
* LsTreeEntry.make({ mode: "100644", type: "blob", oid: "0".repeat(40), path: "package.json" }),
|
|
19859
|
+
* ]),
|
|
19860
|
+
* });
|
|
19861
|
+
* // program.pipe(Effect.provide(TestGit))
|
|
19862
|
+
* ```
|
|
19863
|
+
*/
|
|
19864
|
+
static layerTest = (overrides = {}) => effect.Layer.succeed(Git, Git.makeTest(overrides));
|
|
19729
19865
|
};
|
|
19730
19866
|
//#endregion
|
|
19731
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19867
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ChangeDetector.js
|
|
19732
19868
|
/**
|
|
19733
19869
|
* Which git refs to compare, and whether to fold in the working tree.
|
|
19734
19870
|
*
|
|
@@ -19980,7 +20116,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
|
|
|
19980
20116
|
};
|
|
19981
20117
|
}
|
|
19982
20118
|
//#endregion
|
|
19983
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20119
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/catalogs.js
|
|
19984
20120
|
/** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
|
|
19985
20121
|
const inlineCatalogs = (manifest) => {
|
|
19986
20122
|
if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
|
|
@@ -20044,7 +20180,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
|
|
|
20044
20180
|
});
|
|
20045
20181
|
};
|
|
20046
20182
|
//#endregion
|
|
20047
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20183
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ConfigDependencyHooks.js
|
|
20048
20184
|
/** Whether `value` is a non-null, non-array object. */
|
|
20049
20185
|
const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20050
20186
|
/**
|
|
@@ -20230,7 +20366,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
20230
20366
|
}) });
|
|
20231
20367
|
};
|
|
20232
20368
|
//#endregion
|
|
20233
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20369
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/PackageManagerName.js
|
|
20234
20370
|
/**
|
|
20235
20371
|
* The four package managers this package understands.
|
|
20236
20372
|
*
|
|
@@ -20472,7 +20608,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
|
|
|
20472
20608
|
static layer = effect.Layer.effect(PackageManagerDetector, PackageManagerDetector.make);
|
|
20473
20609
|
};
|
|
20474
20610
|
//#endregion
|
|
20475
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20611
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/LockfileReader.js
|
|
20476
20612
|
/**
|
|
20477
20613
|
* Raised when the workspace's lockfile cannot be read off disk.
|
|
20478
20614
|
*
|
|
@@ -20495,6 +20631,8 @@ var LockfileReadError = class extends effect.Schema.TaggedErrorClass()("Lockfile
|
|
|
20495
20631
|
return `Cannot read ${this.format} lockfile at ${this.lockfilePath}`;
|
|
20496
20632
|
}
|
|
20497
20633
|
};
|
|
20634
|
+
/** A defect naming the unstubbed test-double method — a test-wiring mistake, not a typed failure. */
|
|
20635
|
+
const unstubbed$2 = (method) => effect.Effect.die(/* @__PURE__ */ new Error(`LockfileReader.makeTest: ${method}() was called but not stubbed — pass a \`${method}\` override.`));
|
|
20498
20636
|
/**
|
|
20499
20637
|
* Reads and parses the workspace's lockfile.
|
|
20500
20638
|
*
|
|
@@ -20580,9 +20718,77 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
|
|
|
20580
20718
|
* `const` and reuse it.
|
|
20581
20719
|
*/
|
|
20582
20720
|
static layer = (options) => effect.Layer.effect(LockfileReader, LockfileReader.make(options));
|
|
20721
|
+
/**
|
|
20722
|
+
* A test double satisfying the full {@link LockfileReaderShape} with no
|
|
20723
|
+
* filesystem, root walk, or package-manager detection.
|
|
20724
|
+
*
|
|
20725
|
+
* @remarks
|
|
20726
|
+
* There is **no honest default lockfile**: an empty one that looks like a
|
|
20727
|
+
* legitimate answer is indistinguishable from "this workspace resolves
|
|
20728
|
+
* nothing" — the silent-empty failure class this package documents on the
|
|
20729
|
+
* live paths — so `read` **dies** with an instructive defect until stubbed.
|
|
20730
|
+
*
|
|
20731
|
+
* The one derivation mirrors `WorkspaceDiscovery.makeTest`'s
|
|
20732
|
+
* derived-from-the-primary rule: when a `read` override is supplied,
|
|
20733
|
+
* `resolvedVersion` answers as the live service does — the **first** entry
|
|
20734
|
+
* of `lockfile.packagesNamed(name)` in lockfile order, `Option.none()` on a
|
|
20735
|
+
* miss — so the two stay consistent by construction. `integrity` is **not**
|
|
20736
|
+
* derivable: the live method compares the lockfile against the workspace
|
|
20737
|
+
* manifests discovery enumerates, and the double has no discovery to ask, so
|
|
20738
|
+
* it dies unless stubbed.
|
|
20739
|
+
*
|
|
20740
|
+
* `refresh` defaults to `Effect.void` honestly: the live contract is "drop
|
|
20741
|
+
* the memoized read so the next call re-reads", and this double memoizes
|
|
20742
|
+
* nothing — every `read()` call re-invokes the override — so there is
|
|
20743
|
+
* nothing to drop and the no-op is truthful, the same reasoning as
|
|
20744
|
+
* `WorkspaceDiscovery.makeTest`'s `refresh`.
|
|
20745
|
+
*
|
|
20746
|
+
* @example
|
|
20747
|
+
* ```ts
|
|
20748
|
+
* import { Lockfile } from "@effected/lockfiles";
|
|
20749
|
+
* import { LockfileReader } from "@effected/workspaces";
|
|
20750
|
+
* import { Effect } from "effect";
|
|
20751
|
+
*
|
|
20752
|
+
* const double = LockfileReader.makeTest({
|
|
20753
|
+
* read: () =>
|
|
20754
|
+
* Effect.succeed(
|
|
20755
|
+
* Lockfile.make({ format: "pnpm", lockfileVersion: "9.0", packages: [], workspaceDependencies: [] }),
|
|
20756
|
+
* ),
|
|
20757
|
+
* });
|
|
20758
|
+
* // `resolvedVersion` now answers consistently from that lockfile.
|
|
20759
|
+
* ```
|
|
20760
|
+
*/
|
|
20761
|
+
static makeTest = (overrides = {}) => {
|
|
20762
|
+
const read = overrides.read;
|
|
20763
|
+
return {
|
|
20764
|
+
read: () => unstubbed$2("read"),
|
|
20765
|
+
resolvedVersion: read !== void 0 ? (packageName) => effect.Effect.map(read(), (lockfile) => effect.Option.fromUndefinedOr(lockfile.packagesNamed(packageName)[0])) : () => unstubbed$2("resolvedVersion"),
|
|
20766
|
+
integrity: () => unstubbed$2("integrity"),
|
|
20767
|
+
refresh: () => effect.Effect.void,
|
|
20768
|
+
...overrides
|
|
20769
|
+
};
|
|
20770
|
+
};
|
|
20771
|
+
/**
|
|
20772
|
+
* The test layer: {@link LockfileReader.makeTest} behind `Layer.succeed`, so
|
|
20773
|
+
* a suite provides only the methods it exercises.
|
|
20774
|
+
*
|
|
20775
|
+
* @remarks
|
|
20776
|
+
* A parameterized layer factory mints a **fresh reference per call**, and
|
|
20777
|
+
* layers memoize by reference — bind the result to a `const` and reuse it
|
|
20778
|
+
* rather than calling `layerTest(...)` at each composition site.
|
|
20779
|
+
*
|
|
20780
|
+
* @example
|
|
20781
|
+
* ```ts
|
|
20782
|
+
* import { LockfileReader } from "@effected/workspaces";
|
|
20783
|
+
*
|
|
20784
|
+
* const TestLockfiles = LockfileReader.layerTest();
|
|
20785
|
+
* // program.pipe(Effect.provide(TestLockfiles)) — dies loudly if touched.
|
|
20786
|
+
* ```
|
|
20787
|
+
*/
|
|
20788
|
+
static layerTest = (overrides = {}) => effect.Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
|
|
20583
20789
|
};
|
|
20584
20790
|
//#endregion
|
|
20585
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20791
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Publishability.js
|
|
20586
20792
|
/** The public npm registry, used when `publishConfig.registry` says nothing. */
|
|
20587
20793
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
20588
20794
|
/**
|
|
@@ -20682,7 +20888,93 @@ var PublishabilityDetector = class PublishabilityDetector extends effect.Context
|
|
|
20682
20888
|
}) });
|
|
20683
20889
|
};
|
|
20684
20890
|
//#endregion
|
|
20685
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20891
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/importerVersions.js
|
|
20892
|
+
/**
|
|
20893
|
+
* Strip pnpm's peer-disambiguation suffix from a recorded importer version.
|
|
20894
|
+
*
|
|
20895
|
+
* pnpm records an importer version as the resolved version followed by the peer
|
|
20896
|
+
* context it was resolved under — `4.0.0-beta.101(effect@4.0.0-beta.101)(ioredis@5.11.1(supports-color@8.1.1))`.
|
|
20897
|
+
* `@effected/lockfiles` stores that string verbatim (its `packages:` key parser
|
|
20898
|
+
* strips the suffix; the importer entries deliberately keep it), so the raw
|
|
20899
|
+
* value must never reach a consumer's dependency table — it would render the
|
|
20900
|
+
* whole parenthesized chain as the "version" a dependency moved to.
|
|
20901
|
+
*
|
|
20902
|
+
* Everything from the first `(` is dropped; a version with no suffix passes
|
|
20903
|
+
* through untouched.
|
|
20904
|
+
*/
|
|
20905
|
+
const stripPeerSuffix = (version) => {
|
|
20906
|
+
const paren = version.indexOf("(");
|
|
20907
|
+
return paren === -1 ? version : version.slice(0, paren);
|
|
20908
|
+
};
|
|
20909
|
+
/**
|
|
20910
|
+
* Whether a recorded importer version is a concrete version usable as a
|
|
20911
|
+
* resolution answer.
|
|
20912
|
+
*
|
|
20913
|
+
* A `link:` / `file:` entry records a filesystem edge rather than a version, and
|
|
20914
|
+
* an empty string is pnpm's "specifier only, nothing installed" marker. Both
|
|
20915
|
+
* would be worse than no answer at all: the fallback exists to report a concrete
|
|
20916
|
+
* version movement, and reporting `link:../foo` as a version is noise a
|
|
20917
|
+
* changeset would carry into release notes.
|
|
20918
|
+
*/
|
|
20919
|
+
const isConcreteVersion = (version) => version.length > 0 && !version.startsWith("link:") && !version.startsWith("file:");
|
|
20920
|
+
/**
|
|
20921
|
+
* Build the importer-path → dependency-name → version index a snapshot uses to
|
|
20922
|
+
* answer `catalog:` specifiers its catalog set cannot resolve.
|
|
20923
|
+
*
|
|
20924
|
+
* @remarks
|
|
20925
|
+
* Keyed by **name only** within each importer, deliberately across every
|
|
20926
|
+
* dependency field. The bug this fixes is a peer declared `catalog:effect:peers`
|
|
20927
|
+
* whose importer records no `peerDependencies` entry at all — pnpm writes peer
|
|
20928
|
+
* declarations into the importer block only when they are also installed, so the
|
|
20929
|
+
* concrete version lives on the package's `devDependencies` row for the same
|
|
20930
|
+
* name. Joining by name across fields is what finds it; joining by field, or by
|
|
20931
|
+
* matching the recorded specifier, would not.
|
|
20932
|
+
*
|
|
20933
|
+
* Only pnpm populates importer versions; bun and npm record resolved versions on
|
|
20934
|
+
* their package entries instead, so those formats yield an empty index and the
|
|
20935
|
+
* fallback is inert for them.
|
|
20936
|
+
*/
|
|
20937
|
+
const importerVersionsOf = (lockfile) => {
|
|
20938
|
+
const index = Object.create(null);
|
|
20939
|
+
for (const importer of lockfile.importers) {
|
|
20940
|
+
const versions = Object.create(null);
|
|
20941
|
+
for (const dependency of importer.dependencies) {
|
|
20942
|
+
const recorded = dependency.version;
|
|
20943
|
+
if (recorded === void 0) continue;
|
|
20944
|
+
const version = stripPeerSuffix(recorded);
|
|
20945
|
+
if (!isConcreteVersion(version)) continue;
|
|
20946
|
+
versions[dependency.name] ??= version;
|
|
20947
|
+
}
|
|
20948
|
+
index[importer.path] = versions;
|
|
20949
|
+
}
|
|
20950
|
+
return index;
|
|
20951
|
+
};
|
|
20952
|
+
/**
|
|
20953
|
+
* The version every importer agrees `dependency` resolved to, or `undefined`
|
|
20954
|
+
* when they disagree or none record it.
|
|
20955
|
+
*
|
|
20956
|
+
* @remarks
|
|
20957
|
+
* The unambiguity rule is what makes a workspace-wide answer safe from a
|
|
20958
|
+
* snapshot method that receives no importer context. Two packages in one
|
|
20959
|
+
* monorepo may legitimately hold different versions of the same dependency; in
|
|
20960
|
+
* that case there is no single correct answer, so this yields nothing and the
|
|
20961
|
+
* caller keeps today's behavior (no row) rather than inventing a wrong one.
|
|
20962
|
+
*/
|
|
20963
|
+
const unanimousVersionOf = (index, dependency) => {
|
|
20964
|
+
let agreed;
|
|
20965
|
+
for (const versions of Object.values(index)) {
|
|
20966
|
+
const version = versions[dependency];
|
|
20967
|
+
if (version === void 0) continue;
|
|
20968
|
+
if (agreed === void 0) {
|
|
20969
|
+
agreed = version;
|
|
20970
|
+
continue;
|
|
20971
|
+
}
|
|
20972
|
+
if (agreed !== version) return void 0;
|
|
20973
|
+
}
|
|
20974
|
+
return agreed;
|
|
20975
|
+
};
|
|
20976
|
+
//#endregion
|
|
20977
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceCatalogs.js
|
|
20686
20978
|
/**
|
|
20687
20979
|
* An immutable, fully-normalized catalog collection — the one catalog
|
|
20688
20980
|
* resolution semantic in the package.
|
|
@@ -20958,6 +21250,8 @@ const validatePnpmWorkspaceCatalogs = (document) => {
|
|
|
20958
21250
|
catalogs: "catalogs"
|
|
20959
21251
|
}));
|
|
20960
21252
|
};
|
|
21253
|
+
/** A defect naming the unstubbed test-double method — a test-wiring mistake, not a typed failure. */
|
|
21254
|
+
const unstubbed$1 = (method) => effect.Effect.die(/* @__PURE__ */ new Error(`WorkspaceCatalogs.makeTest: ${method}() was called but not stubbed — pass a \`${method}\` override.`));
|
|
20961
21255
|
/**
|
|
20962
21256
|
* Assembles a workspace's catalogs, package-manager-aware.
|
|
20963
21257
|
*
|
|
@@ -21001,7 +21295,15 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
21001
21295
|
}));
|
|
21002
21296
|
const assemble = effect.Effect.gen(function* () {
|
|
21003
21297
|
const root = yield* effect.Effect.suspend(() => roots.find(options?.cwd ?? process.cwd()));
|
|
21004
|
-
const
|
|
21298
|
+
const lockfileOutputs = yield* lockfiles.read().pipe(effect.Effect.map((lockfile) => ({
|
|
21299
|
+
catalogs: CatalogSet.fromLockfile(lockfile),
|
|
21300
|
+
importerVersions: importerVersionsOf(lockfile)
|
|
21301
|
+
})), effect.Effect.catch((_failure) => effect.Effect.succeed({
|
|
21302
|
+
catalogs: CatalogSet.empty(),
|
|
21303
|
+
importerVersions: {}
|
|
21304
|
+
})));
|
|
21305
|
+
const fromLockfile = lockfileOutputs.catalogs;
|
|
21306
|
+
const importerVersions = lockfileOutputs.importerVersions;
|
|
21005
21307
|
const workspaceYaml = path.join(root, "pnpm-workspace.yaml");
|
|
21006
21308
|
const hasPnpmWorkspace = yield* probeExists(workspaceYaml);
|
|
21007
21309
|
let inline;
|
|
@@ -21029,7 +21331,8 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
21029
21331
|
const manifestPath = path.join(root, "package.json");
|
|
21030
21332
|
if (!(yield* probeExists(manifestPath))) return {
|
|
21031
21333
|
catalogs: fromLockfile,
|
|
21032
|
-
releaseAgeGate: ReleaseAgeGate.combine()
|
|
21334
|
+
releaseAgeGate: ReleaseAgeGate.combine(),
|
|
21335
|
+
importerVersions
|
|
21033
21336
|
};
|
|
21034
21337
|
const text = yield* fs.readFileString(manifestPath).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
|
|
21035
21338
|
source: "manifest",
|
|
@@ -21048,7 +21351,8 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
21048
21351
|
}));
|
|
21049
21352
|
return {
|
|
21050
21353
|
catalogs: assembled,
|
|
21051
|
-
releaseAgeGate
|
|
21354
|
+
releaseAgeGate,
|
|
21355
|
+
importerVersions
|
|
21052
21356
|
};
|
|
21053
21357
|
});
|
|
21054
21358
|
const [resolveOnce, invalidate] = yield* effect.Effect.cachedInvalidateWithTTL(assemble, effect.Duration.infinity);
|
|
@@ -21062,6 +21366,9 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
21062
21366
|
}),
|
|
21063
21367
|
releaseAgeGate: effect.Effect.fn("WorkspaceCatalogs.releaseAgeGate")(function* () {
|
|
21064
21368
|
return (yield* memo).releaseAgeGate;
|
|
21369
|
+
}),
|
|
21370
|
+
importerVersions: effect.Effect.fn("WorkspaceCatalogs.importerVersions")(function* () {
|
|
21371
|
+
return (yield* memo).importerVersions;
|
|
21065
21372
|
})
|
|
21066
21373
|
};
|
|
21067
21374
|
});
|
|
@@ -21088,6 +21395,70 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
21088
21395
|
*/
|
|
21089
21396
|
static layerWithConfigDependencies = (options) => effect.Layer.effect(WorkspaceCatalogs, WorkspaceCatalogs.make(options)).pipe(effect.Layer.provide(ConfigDependencyHooks.layerLive));
|
|
21090
21397
|
/**
|
|
21398
|
+
* A test double satisfying the full {@link WorkspaceCatalogsShape} with no
|
|
21399
|
+
* filesystem, lockfile read, or hook replay.
|
|
21400
|
+
*
|
|
21401
|
+
* @remarks
|
|
21402
|
+
* There is **no honest default catalog set**: an empty `CatalogSet` that
|
|
21403
|
+
* looks like a legitimate answer is the "every dependency looks newly added"
|
|
21404
|
+
* failure class the live assembler hard-fails to prevent, so every method
|
|
21405
|
+
* **dies** with an instructive defect until stubbed — a test-wiring mistake
|
|
21406
|
+
* fails loudly as a defect rather than succeeding with a lie or failing with
|
|
21407
|
+
* a dishonest typed error.
|
|
21408
|
+
*
|
|
21409
|
+
* The one derivation mirrors `WorkspaceDiscovery.makeTest`'s
|
|
21410
|
+
* derived-from-the-primary rule: when a `set` override is supplied,
|
|
21411
|
+
* `resolveSpecifier` answers from that `CatalogSet`'s own
|
|
21412
|
+
* {@link CatalogSet.resolveSpecifier} — exactly what the live service runs
|
|
21413
|
+
* over its assembled set — so the two stay consistent by construction.
|
|
21414
|
+
* `releaseAgeGate` and `importerVersions` are **not** derivable from a
|
|
21415
|
+
* catalog set (the gate comes from release-age keys and hook contributions,
|
|
21416
|
+
* the importer index from the lockfile's importer blocks — neither is in a
|
|
21417
|
+
* `CatalogSet`) and always die unless stubbed.
|
|
21418
|
+
*
|
|
21419
|
+
* @example
|
|
21420
|
+
* ```ts
|
|
21421
|
+
* import { CatalogSet, WorkspaceCatalogs } from "@effected/workspaces";
|
|
21422
|
+
* import { Effect } from "effect";
|
|
21423
|
+
*
|
|
21424
|
+
* const double = WorkspaceCatalogs.makeTest({
|
|
21425
|
+
* set: () => Effect.succeed(CatalogSet.fromCatalogs({ default: { effect: "4.0.0" } })),
|
|
21426
|
+
* });
|
|
21427
|
+
* // `resolveSpecifier` now answers consistently from that set.
|
|
21428
|
+
* ```
|
|
21429
|
+
*/
|
|
21430
|
+
static makeTest = (overrides = {}) => {
|
|
21431
|
+
const set = overrides.set;
|
|
21432
|
+
return {
|
|
21433
|
+
set: () => unstubbed$1("set"),
|
|
21434
|
+
resolveSpecifier: set !== void 0 ? (dependency, specifier) => effect.Effect.map(set(), (catalogs) => catalogs.resolveSpecifier(dependency, specifier)) : () => unstubbed$1("resolveSpecifier"),
|
|
21435
|
+
releaseAgeGate: () => unstubbed$1("releaseAgeGate"),
|
|
21436
|
+
importerVersions: () => unstubbed$1("importerVersions"),
|
|
21437
|
+
...overrides
|
|
21438
|
+
};
|
|
21439
|
+
};
|
|
21440
|
+
/**
|
|
21441
|
+
* The test layer: {@link WorkspaceCatalogs.makeTest} behind `Layer.succeed`,
|
|
21442
|
+
* so a suite provides only the methods it exercises.
|
|
21443
|
+
*
|
|
21444
|
+
* @remarks
|
|
21445
|
+
* A parameterized layer factory mints a **fresh reference per call**, and
|
|
21446
|
+
* layers memoize by reference — bind the result to a `const` and reuse it
|
|
21447
|
+
* rather than calling `layerTest(...)` at each composition site.
|
|
21448
|
+
*
|
|
21449
|
+
* @example
|
|
21450
|
+
* ```ts
|
|
21451
|
+
* import { CatalogSet, WorkspaceCatalogs } from "@effected/workspaces";
|
|
21452
|
+
* import { Effect } from "effect";
|
|
21453
|
+
*
|
|
21454
|
+
* const TestCatalogs = WorkspaceCatalogs.layerTest({
|
|
21455
|
+
* set: () => Effect.succeed(CatalogSet.empty()),
|
|
21456
|
+
* });
|
|
21457
|
+
* // program.pipe(Effect.provide(TestCatalogs))
|
|
21458
|
+
* ```
|
|
21459
|
+
*/
|
|
21460
|
+
static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceCatalogs, WorkspaceCatalogs.makeTest(overrides));
|
|
21461
|
+
/**
|
|
21091
21462
|
* The real implementation of `@effected/npm`'s `CatalogResolver` contract —
|
|
21092
21463
|
* the one `@effected/package-json` declares but cannot fill.
|
|
21093
21464
|
*
|
|
@@ -21112,7 +21483,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
21112
21483
|
}));
|
|
21113
21484
|
};
|
|
21114
21485
|
//#endregion
|
|
21115
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
21486
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
|
|
21116
21487
|
const EMPTY = Object.freeze(Object.create(null));
|
|
21117
21488
|
const DependencyMap = effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY)));
|
|
21118
21489
|
/**
|
|
@@ -21196,7 +21567,19 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
|
|
|
21196
21567
|
/** Every workspace package captured at this moment. */
|
|
21197
21568
|
packages: effect.Schema.Array(PackageStateSnapshot),
|
|
21198
21569
|
/** The catalog set assembled at this moment. */
|
|
21199
|
-
catalogs: CatalogSet
|
|
21570
|
+
catalogs: CatalogSet,
|
|
21571
|
+
/**
|
|
21572
|
+
* Each importer's dependency-name → resolved-version map, as the manager's
|
|
21573
|
+
* lockfile recorded it at this moment.
|
|
21574
|
+
*
|
|
21575
|
+
* @remarks
|
|
21576
|
+
* Defaults to `{}`, so a `WorkspaceStateSnapshot` serialized before this field
|
|
21577
|
+
* existed still decodes — and an empty index simply makes the `catalog:`
|
|
21578
|
+
* fallback in {@link WorkspaceStateSnapshot.resolve} inert, which is exactly
|
|
21579
|
+
* the behavior those older values were captured under. Only pnpm records
|
|
21580
|
+
* importer versions; bun and npm yield an empty index.
|
|
21581
|
+
*/
|
|
21582
|
+
importerVersions: effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Record(effect.Schema.String, effect.Schema.String)))
|
|
21200
21583
|
}) {
|
|
21201
21584
|
#versionIndex;
|
|
21202
21585
|
#packageIndex;
|
|
@@ -21231,16 +21614,62 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
|
|
|
21231
21614
|
* unparseable string — is `Option.none()`, because there is no indirection to
|
|
21232
21615
|
* resolve. Total.
|
|
21233
21616
|
*
|
|
21617
|
+
* A `catalog:` specifier the catalog set cannot resolve falls back to this
|
|
21618
|
+
* snapshot's `importerVersions` — but only to a version
|
|
21619
|
+
* **every** importer recording that dependency agrees on. A catalog injected
|
|
21620
|
+
* by a config-dependency pnpmfile hook appears in no committed catalog source,
|
|
21621
|
+
* so without this fallback both sides of a before/after diff resolve it to the
|
|
21622
|
+
* same raw string and a real version movement produces no row. When importers
|
|
21623
|
+
* disagree there is no single correct answer, so this stays `Option.none()`
|
|
21624
|
+
* rather than inventing one; {@link WorkspaceStateSnapshot.resolveIn} answers
|
|
21625
|
+
* precisely for callers that know which importer is asking.
|
|
21626
|
+
*
|
|
21234
21627
|
* @param dependency - The dependency's package name (what `workspace:` /
|
|
21235
21628
|
* `catalog:` resolve for).
|
|
21236
21629
|
* @param specifier - The raw specifier string.
|
|
21237
21630
|
*/
|
|
21238
21631
|
resolve(dependency, specifier) {
|
|
21632
|
+
return this.#resolveWith(dependency, specifier, () => effect.Option.fromUndefinedOr(unanimousVersionOf(this.importerVersions ?? {}, dependency)));
|
|
21633
|
+
}
|
|
21634
|
+
/**
|
|
21635
|
+
* The concrete range or version a specifier resolved to AS OF this snapshot,
|
|
21636
|
+
* scoped to the importer that declared it.
|
|
21637
|
+
*
|
|
21638
|
+
* @remarks
|
|
21639
|
+
* Identical to {@link WorkspaceStateSnapshot.resolve} except in how an
|
|
21640
|
+
* unresolvable `catalog:` specifier falls back: this consults **only**
|
|
21641
|
+
* `importerPath`'s own recorded versions, so a monorepo whose packages hold
|
|
21642
|
+
* different versions of one dependency still gets an exact answer where
|
|
21643
|
+
* `resolve` must abstain. Prefer this whenever the caller knows the importer —
|
|
21644
|
+
* a consumer iterating `packages` has `relativePath` in hand, which is the
|
|
21645
|
+
* importer key (`"."` for the root package).
|
|
21646
|
+
*
|
|
21647
|
+
* An unknown `importerPath`, or one recording nothing for `dependency`, is
|
|
21648
|
+
* `Option.none()`. Total.
|
|
21649
|
+
*
|
|
21650
|
+
* @param importerPath - The importer's path relative to the workspace root,
|
|
21651
|
+
* `"."` for the root package — `PackageStateSnapshot.relativePath`.
|
|
21652
|
+
* @param dependency - The dependency's package name.
|
|
21653
|
+
* @param specifier - The raw specifier string.
|
|
21654
|
+
*/
|
|
21655
|
+
resolveIn(importerPath, dependency, specifier) {
|
|
21656
|
+
return this.#resolveWith(dependency, specifier, () => effect.Option.fromUndefinedOr(this.importerVersions?.[importerPath]?.[dependency]));
|
|
21657
|
+
}
|
|
21658
|
+
/**
|
|
21659
|
+
* The shared resolution path: classify, answer from the captured state, and
|
|
21660
|
+
* consult `onUnresolvedCatalog` only for a `catalog:` specifier the catalog set
|
|
21661
|
+
* could not answer. A plain range is already its own answer and must keep
|
|
21662
|
+
* resolving to `Option.none()` so the caller falls back to the raw string.
|
|
21663
|
+
*/
|
|
21664
|
+
#resolveWith(dependency, specifier, onUnresolvedCatalog) {
|
|
21239
21665
|
const exit = effect.Schema.decodeUnknownExit(DependencySpecifier.FromString)(specifier);
|
|
21240
21666
|
if (!effect.Exit.isSuccess(exit)) return effect.Option.none();
|
|
21241
21667
|
const classified = exit.value;
|
|
21242
21668
|
switch (classified._tag) {
|
|
21243
|
-
case "catalog":
|
|
21669
|
+
case "catalog": {
|
|
21670
|
+
const fromCatalogs = this.catalogs.rangeOf(dependency, classified.name);
|
|
21671
|
+
return effect.Option.isSome(fromCatalogs) ? fromCatalogs : onUnresolvedCatalog();
|
|
21672
|
+
}
|
|
21244
21673
|
case "workspace": return effect.Option.fromUndefinedOr(this.#versions().get(dependency));
|
|
21245
21674
|
default: return effect.Option.none();
|
|
21246
21675
|
}
|
|
@@ -21277,7 +21706,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
|
|
|
21277
21706
|
}
|
|
21278
21707
|
};
|
|
21279
21708
|
//#endregion
|
|
21280
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
21709
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceSnapshots.js
|
|
21281
21710
|
/** Whether `value` is a non-null, non-array object. */
|
|
21282
21711
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
21283
21712
|
/** Whether every value in a record is a string — a usable dependency map. */
|
|
@@ -21331,6 +21760,13 @@ const bunInlineCatalogs = (manifest) => {
|
|
|
21331
21760
|
catalogs: workspaces.catalogs
|
|
21332
21761
|
});
|
|
21333
21762
|
};
|
|
21763
|
+
/** The contribution of an absent or malformed lockfile: nothing, on both counts. */
|
|
21764
|
+
const EMPTY_LOCKFILE_RECORD = {
|
|
21765
|
+
catalogs: CatalogSet.empty(),
|
|
21766
|
+
importerVersions: {}
|
|
21767
|
+
};
|
|
21768
|
+
/** A defect naming the unstubbed test-double method — a test-wiring mistake, not a typed failure. */
|
|
21769
|
+
const unstubbed = (method) => effect.Effect.die(/* @__PURE__ */ new Error(`WorkspaceSnapshots.makeTest: ${method}() was called but not stubbed — pass a \`${method}\` override.`));
|
|
21334
21770
|
/**
|
|
21335
21771
|
* Reads workspace state at a git ref with no checkout, and the live worktree.
|
|
21336
21772
|
*
|
|
@@ -21363,10 +21799,17 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
21363
21799
|
const roots = yield* WorkspaceRoot;
|
|
21364
21800
|
const discovery = yield* WorkspaceDiscovery;
|
|
21365
21801
|
const catalogsService = yield* WorkspaceCatalogs;
|
|
21366
|
-
/**
|
|
21367
|
-
|
|
21368
|
-
|
|
21369
|
-
|
|
21802
|
+
/**
|
|
21803
|
+
* What a manager's lockfile records at the ref: its catalog set and its
|
|
21804
|
+
* importer versions, from ONE parse. Empty on both counts when the
|
|
21805
|
+
* lockfile is absent or malformed.
|
|
21806
|
+
*/
|
|
21807
|
+
const lockfileRecord = (root, ref, format) => git.show(root, ref, `./${filenameFor(format)}`).pipe(effect.Effect.flatMap((content) => effect.Option.match(content, {
|
|
21808
|
+
onNone: () => effect.Effect.succeed(EMPTY_LOCKFILE_RECORD),
|
|
21809
|
+
onSome: (text) => Lockfile.parse(text, { format }).pipe(effect.Effect.map((lockfile) => ({
|
|
21810
|
+
catalogs: CatalogSet.fromLockfile(lockfile),
|
|
21811
|
+
importerVersions: importerVersionsOf(lockfile)
|
|
21812
|
+
})), effect.Effect.catch(() => effect.Effect.succeed(EMPTY_LOCKFILE_RECORD)))
|
|
21370
21813
|
})));
|
|
21371
21814
|
const computeAt = (root, ref) => effect.Effect.gen(function* () {
|
|
21372
21815
|
const pnpmWorkspaceText = yield* git.show(root, ref, "./pnpm-workspace.yaml");
|
|
@@ -21377,7 +21820,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
21377
21820
|
});
|
|
21378
21821
|
let patterns;
|
|
21379
21822
|
let inline;
|
|
21380
|
-
let
|
|
21823
|
+
let recorded;
|
|
21381
21824
|
if (effect.Option.isSome(pnpmWorkspaceText)) {
|
|
21382
21825
|
const pnpmPatterns = pnpmPatternsOf(yield* Yaml.parse(pnpmWorkspaceText.value).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
|
|
21383
21826
|
source: "manifest",
|
|
@@ -21386,13 +21829,13 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
21386
21829
|
}))));
|
|
21387
21830
|
patterns = pnpmPatterns.length > 0 ? pnpmPatterns : manifestPatternsOf(rootManifest);
|
|
21388
21831
|
inline = yield* CatalogSet.fromWorkspaceYaml(pnpmWorkspaceText.value);
|
|
21389
|
-
|
|
21832
|
+
recorded = yield* lockfileRecord(root, ref, "pnpm");
|
|
21390
21833
|
} else {
|
|
21391
21834
|
patterns = manifestPatternsOf(rootManifest);
|
|
21392
21835
|
inline = bunInlineCatalogs(rootManifest);
|
|
21393
|
-
|
|
21836
|
+
recorded = yield* lockfileRecord(root, ref, "bun");
|
|
21394
21837
|
}
|
|
21395
|
-
const catalogs = CatalogSet.merge(
|
|
21838
|
+
const catalogs = CatalogSet.merge(recorded.catalogs, inline);
|
|
21396
21839
|
const globs = yield* GlobSet.compile(patterns).pipe(effect.Effect.mapError((error) => new CatalogAssemblyError({
|
|
21397
21840
|
source: "manifest",
|
|
21398
21841
|
path: error.pattern,
|
|
@@ -21419,7 +21862,8 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
21419
21862
|
for (const member of members) if (effect.Option.isSome(member)) packages.push(member.value);
|
|
21420
21863
|
return WorkspaceStateSnapshot.make({
|
|
21421
21864
|
packages,
|
|
21422
|
-
catalogs
|
|
21865
|
+
catalogs,
|
|
21866
|
+
importerVersions: recorded.importerVersions
|
|
21423
21867
|
});
|
|
21424
21868
|
});
|
|
21425
21869
|
const atCaches = /* @__PURE__ */ new Map();
|
|
@@ -21443,6 +21887,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
21443
21887
|
worktree: effect.Effect.fn("WorkspaceSnapshots.worktree")(function* () {
|
|
21444
21888
|
const packages = yield* discovery.listPackages();
|
|
21445
21889
|
const catalogs = yield* catalogsService.set();
|
|
21890
|
+
const importerVersions = yield* catalogsService.importerVersions();
|
|
21446
21891
|
const snapshotPackages = packages.map((pkg) => PackageStateSnapshot.make({
|
|
21447
21892
|
name: pkg.name,
|
|
21448
21893
|
version: pkg.version,
|
|
@@ -21454,7 +21899,8 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
21454
21899
|
}));
|
|
21455
21900
|
return WorkspaceStateSnapshot.make({
|
|
21456
21901
|
packages: snapshotPackages,
|
|
21457
|
-
catalogs
|
|
21902
|
+
catalogs,
|
|
21903
|
+
importerVersions
|
|
21458
21904
|
});
|
|
21459
21905
|
})
|
|
21460
21906
|
};
|
|
@@ -21467,9 +21913,69 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
21467
21913
|
* `const` and reuse it, or layer memoization does not apply.
|
|
21468
21914
|
*/
|
|
21469
21915
|
static layer = (options) => effect.Layer.effect(WorkspaceSnapshots, WorkspaceSnapshots.make(options));
|
|
21916
|
+
/**
|
|
21917
|
+
* A test double satisfying the full {@link WorkspaceSnapshotsShape} with no
|
|
21918
|
+
* git, filesystem, discovery, or catalog assembly.
|
|
21919
|
+
*
|
|
21920
|
+
* @remarks
|
|
21921
|
+
* There are **no honest defaults and no derivations** here: `at(ref)` and
|
|
21922
|
+
* `worktree()` are two independent reads of two different sources (a git ref
|
|
21923
|
+
* vs. the live tree), so neither can be honestly derived from the other, and
|
|
21924
|
+
* a fabricated empty {@link WorkspaceStateSnapshot} on either side of a
|
|
21925
|
+
* before/after diff reads as every dependency newly added or removed — the
|
|
21926
|
+
* exact silent-empty failure class this package documents on the live paths.
|
|
21927
|
+
* Both methods therefore **die** with an instructive defect until stubbed; a
|
|
21928
|
+
* test-wiring mistake fails loudly as a defect rather than succeeding with a
|
|
21929
|
+
* lie.
|
|
21930
|
+
*
|
|
21931
|
+
* @example
|
|
21932
|
+
* ```ts
|
|
21933
|
+
* import { CatalogSet, WorkspaceSnapshots, WorkspaceStateSnapshot } from "@effected/workspaces";
|
|
21934
|
+
* import { Effect } from "effect";
|
|
21935
|
+
*
|
|
21936
|
+
* const empty = WorkspaceStateSnapshot.make({
|
|
21937
|
+
* packages: [],
|
|
21938
|
+
* catalogs: CatalogSet.empty(),
|
|
21939
|
+
* importerVersions: {},
|
|
21940
|
+
* });
|
|
21941
|
+
* const double = WorkspaceSnapshots.makeTest({
|
|
21942
|
+
* at: () => Effect.succeed(empty),
|
|
21943
|
+
* worktree: () => Effect.succeed(empty),
|
|
21944
|
+
* });
|
|
21945
|
+
* ```
|
|
21946
|
+
*/
|
|
21947
|
+
static makeTest = (overrides = {}) => ({
|
|
21948
|
+
at: () => unstubbed("at"),
|
|
21949
|
+
worktree: () => unstubbed("worktree"),
|
|
21950
|
+
...overrides
|
|
21951
|
+
});
|
|
21952
|
+
/**
|
|
21953
|
+
* The test layer: {@link WorkspaceSnapshots.makeTest} behind `Layer.succeed`,
|
|
21954
|
+
* so a suite provides only the methods it exercises.
|
|
21955
|
+
*
|
|
21956
|
+
* @remarks
|
|
21957
|
+
* A parameterized layer factory mints a **fresh reference per call**, and
|
|
21958
|
+
* layers memoize by reference — bind the result to a `const` and reuse it
|
|
21959
|
+
* rather than calling `layerTest(...)` at each composition site.
|
|
21960
|
+
*
|
|
21961
|
+
* @example
|
|
21962
|
+
* ```ts
|
|
21963
|
+
* import { CatalogSet, WorkspaceSnapshots, WorkspaceStateSnapshot } from "@effected/workspaces";
|
|
21964
|
+
* import { Effect } from "effect";
|
|
21965
|
+
*
|
|
21966
|
+
* const TestSnapshots = WorkspaceSnapshots.layerTest({
|
|
21967
|
+
* worktree: () =>
|
|
21968
|
+
* Effect.succeed(
|
|
21969
|
+
* WorkspaceStateSnapshot.make({ packages: [], catalogs: CatalogSet.empty(), importerVersions: {} }),
|
|
21970
|
+
* ),
|
|
21971
|
+
* });
|
|
21972
|
+
* // program.pipe(Effect.provide(TestSnapshots))
|
|
21973
|
+
* ```
|
|
21974
|
+
*/
|
|
21975
|
+
static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
|
|
21470
21976
|
};
|
|
21471
21977
|
//#endregion
|
|
21472
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
21978
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.8.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Workspaces.js
|
|
21473
21979
|
/**
|
|
21474
21980
|
* Every service that needs only a filesystem: root, package-manager detection,
|
|
21475
21981
|
* discovery, lockfile reading, catalogs and publishability.
|
|
@@ -43160,6 +43666,80 @@ function isUint8Array(value) {
|
|
|
43160
43666
|
//#endregion
|
|
43161
43667
|
//#region ../silk-effects/dist/dev/pkg/changesets/utils/remark-pipeline.js
|
|
43162
43668
|
/**
|
|
43669
|
+
* Marker set on the `data` of a text node whose value must be written to
|
|
43670
|
+
* markdown verbatim rather than escaped.
|
|
43671
|
+
*
|
|
43672
|
+
* @remarks
|
|
43673
|
+
* `remark-stringify` escapes any character that could open a markdown
|
|
43674
|
+
* construct. Inside a dependency table that is always wrong: with
|
|
43675
|
+
* `remark-gfm` enabled `~` is the strikethrough delimiter, so the specifier
|
|
43676
|
+
* `~0.2.1` is written as `\~0.2.1`, and `_` in a package name becomes `\_`.
|
|
43677
|
+
* The corruption compounds on every re-serialization, and dependency-table
|
|
43678
|
+
* cells round-trip through consolidation and PR-body reconstruction.
|
|
43679
|
+
*
|
|
43680
|
+
* The marker is deliberately narrow. It is set only by the dependency-table
|
|
43681
|
+
* cell builder, whose cell vocabulary is closed — package name, dependency
|
|
43682
|
+
* type, action, version specifier, and the em-dash sentinel — and none of
|
|
43683
|
+
* those can legitimately carry markdown. Prose elsewhere in a changeset keeps
|
|
43684
|
+
* the default escaping.
|
|
43685
|
+
*
|
|
43686
|
+
* @internal
|
|
43687
|
+
*/
|
|
43688
|
+
const LITERAL_TEXT_MARKER = "silkLiteralText";
|
|
43689
|
+
/**
|
|
43690
|
+
* Mark a text node so {@link createRemarkProcessor} writes it verbatim.
|
|
43691
|
+
*
|
|
43692
|
+
* @param value - The literal cell text
|
|
43693
|
+
* @returns An MDAST `Text` node carrying the literal marker
|
|
43694
|
+
*
|
|
43695
|
+
* @internal
|
|
43696
|
+
*/
|
|
43697
|
+
function literalText(value) {
|
|
43698
|
+
return {
|
|
43699
|
+
type: "text",
|
|
43700
|
+
value,
|
|
43701
|
+
data: { [LITERAL_TEXT_MARKER]: true }
|
|
43702
|
+
};
|
|
43703
|
+
}
|
|
43704
|
+
/**
|
|
43705
|
+
* Whether a text node was marked by {@link literalText}.
|
|
43706
|
+
*
|
|
43707
|
+
* @internal
|
|
43708
|
+
*/
|
|
43709
|
+
function isLiteralText(node) {
|
|
43710
|
+
return node.data?.[LITERAL_TEXT_MARKER] === true;
|
|
43711
|
+
}
|
|
43712
|
+
/**
|
|
43713
|
+
* Escape the two characters that would otherwise corrupt the table grid.
|
|
43714
|
+
*
|
|
43715
|
+
* @remarks
|
|
43716
|
+
* A `|` would close the cell early and a `\` would be read as an escape
|
|
43717
|
+
* introducer, so both are escaped to keep the written cell parseable back to
|
|
43718
|
+
* its exact input. Every other character is emitted as-is. Because parsing
|
|
43719
|
+
* consumes the backslash, a value that already carries a legacy `\~` from the
|
|
43720
|
+
* old escaping path re-parses to its clean form rather than accumulating
|
|
43721
|
+
* another layer.
|
|
43722
|
+
*
|
|
43723
|
+
* @internal
|
|
43724
|
+
*/
|
|
43725
|
+
function escapeCellLiteral(value) {
|
|
43726
|
+
return value.replace(/[\\|]/g, "\\$&");
|
|
43727
|
+
}
|
|
43728
|
+
/**
|
|
43729
|
+
* `mdast-util-to-markdown` handler overrides used by the shared processor.
|
|
43730
|
+
*
|
|
43731
|
+
* @remarks
|
|
43732
|
+
* Replaces the default `text` handler — which is `state.safe(node.value, info)`
|
|
43733
|
+
* — with one that bypasses escaping for nodes marked by {@link literalText}
|
|
43734
|
+
* and delegates to the default behavior for everything else.
|
|
43735
|
+
*
|
|
43736
|
+
* @internal
|
|
43737
|
+
*/
|
|
43738
|
+
const literalTextHandlers = { text: (node, _parent, state, info) => {
|
|
43739
|
+
const text = node;
|
|
43740
|
+
return isLiteralText(text) ? escapeCellLiteral(text.value) : state.safe(text.value, info);
|
|
43741
|
+
} };
|
|
43742
|
+
/**
|
|
43163
43743
|
* Create a unified processor configured with remark-parse, remark-gfm,
|
|
43164
43744
|
* and remark-stringify.
|
|
43165
43745
|
*
|
|
@@ -43167,7 +43747,8 @@ function isUint8Array(value) {
|
|
|
43167
43747
|
* Each call creates a fresh processor instance. The plugin chain is:
|
|
43168
43748
|
* 1. `remark-parse` — markdown to MDAST
|
|
43169
43749
|
* 2. `remark-gfm` — GitHub Flavored Markdown extensions (tables, etc.)
|
|
43170
|
-
* 3. `remark-stringify` — MDAST back to markdown
|
|
43750
|
+
* 3. `remark-stringify` — MDAST back to markdown, with the
|
|
43751
|
+
* {@link literalText} handler override
|
|
43171
43752
|
*
|
|
43172
43753
|
* @privateRemarks
|
|
43173
43754
|
* Return type is intentionally inferred because the unified `Processor`
|
|
@@ -43178,7 +43759,7 @@ function isUint8Array(value) {
|
|
|
43178
43759
|
* @internal
|
|
43179
43760
|
*/
|
|
43180
43761
|
function createRemarkProcessor() {
|
|
43181
|
-
return unified().use(remarkParse).use(remarkGfm).use(remarkStringify);
|
|
43762
|
+
return unified().use(remarkParse).use(remarkGfm).use(remarkStringify, { handlers: literalTextHandlers });
|
|
43182
43763
|
}
|
|
43183
43764
|
/**
|
|
43184
43765
|
* Parse a markdown string into an MDAST AST synchronously.
|
|
@@ -43686,6 +44267,12 @@ function parseDependencyTable(table) {
|
|
|
43686
44267
|
/**
|
|
43687
44268
|
* Create a table cell with a text node.
|
|
43688
44269
|
*
|
|
44270
|
+
* @remarks
|
|
44271
|
+
* The cell text is marked literal, so stringification writes it verbatim
|
|
44272
|
+
* instead of escaping characters that could open a markdown construct. See
|
|
44273
|
+
* {@link literalText} — without it `~0.2.1` is written as `\~0.2.1` and
|
|
44274
|
+
* `some_pkg` as `some\_pkg`.
|
|
44275
|
+
*
|
|
43689
44276
|
* @param text - The cell text content
|
|
43690
44277
|
* @returns An MDAST `TableCell` node
|
|
43691
44278
|
*
|
|
@@ -43694,10 +44281,7 @@ function parseDependencyTable(table) {
|
|
|
43694
44281
|
function makeCell(text) {
|
|
43695
44282
|
return {
|
|
43696
44283
|
type: "tableCell",
|
|
43697
|
-
children: [
|
|
43698
|
-
type: "text",
|
|
43699
|
-
value: text
|
|
43700
|
-
}]
|
|
44284
|
+
children: [literalText(text)]
|
|
43701
44285
|
};
|
|
43702
44286
|
}
|
|
43703
44287
|
/**
|
|
@@ -43772,11 +44356,10 @@ function serializeDependencyTable(rows) {
|
|
|
43772
44356
|
* @internal
|
|
43773
44357
|
*/
|
|
43774
44358
|
function serializeDependencyTableToMarkdown(rows) {
|
|
43775
|
-
|
|
44359
|
+
return stringifyMarkdown({
|
|
43776
44360
|
type: "root",
|
|
43777
44361
|
children: [serializeDependencyTable(rows)]
|
|
43778
|
-
};
|
|
43779
|
-
return unified().use(remarkGfm).use(remarkStringify).stringify(tree).trim();
|
|
44362
|
+
}).trim();
|
|
43780
44363
|
}
|
|
43781
44364
|
/**
|
|
43782
44365
|
* Sort priority for dependency actions: removed first, then updated, then added.
|
|
@@ -46530,20 +47113,25 @@ function readRawPackageJson(fs, pkgDir) {
|
|
|
46530
47113
|
}
|
|
46531
47114
|
/**
|
|
46532
47115
|
* Build resolved scopes from the discovered workspace packages, keeping only
|
|
46533
|
-
* those that are a release surface
|
|
46534
|
-
* one publish target
|
|
46535
|
-
*
|
|
46536
|
-
*
|
|
46537
|
-
*
|
|
46538
|
-
*
|
|
46539
|
-
* declares
|
|
46540
|
-
|
|
46541
|
-
|
|
47116
|
+
* those that are a release surface: a package that declares publishConfig
|
|
47117
|
+
* yielding at least one publish target, OR — when the changeset config sets
|
|
47118
|
+
* `privatePackages.version: true` (`versionPrivate`) — any workspace package
|
|
47119
|
+
* at all, since changesets versions private packages too in that mode (#360:
|
|
47120
|
+
* a private single-root repo with `privatePackages.version: true` previously
|
|
47121
|
+
* produced an empty release surface and left every file unmapped). Used both
|
|
47122
|
+
* when `.changeset/config.json` declares no explicit `packages` record AND to
|
|
47123
|
+
* augment an explicit record with the remaining workspace packages it does
|
|
47124
|
+
* not list (so the record annotates the listed packages without shrinking the
|
|
47125
|
+
* release surface). The changeset `ignore` list is intentionally NOT
|
|
47126
|
+
* consulted here — an ignored package still declares publishConfig and
|
|
47127
|
+
* remains a valid changeset target.
|
|
47128
|
+
*/
|
|
47129
|
+
function buildFallbackScopes(fs, workspaces, versionPrivate) {
|
|
46542
47130
|
return effect.Effect.forEach(workspaces, (ws) => effect.Effect.gen(function* () {
|
|
46543
47131
|
const raw = yield* readRawPackageJson(fs, ws.path);
|
|
46544
47132
|
if (raw === null) return [];
|
|
46545
47133
|
const binding = yield* readTargetsBinding(fs, ws.path);
|
|
46546
|
-
if (SilkPublishability.detect(ws.name, raw, binding).length === 0) return [];
|
|
47134
|
+
if (SilkPublishability.detect(ws.name, raw, binding).length === 0 && !versionPrivate) return [];
|
|
46547
47135
|
return [{
|
|
46548
47136
|
name: ws.name,
|
|
46549
47137
|
workspaceDir: ws.path,
|
|
@@ -46649,6 +47237,8 @@ function makeShape$3(reader, discovery, fs) {
|
|
|
46649
47237
|
version: w.version
|
|
46650
47238
|
}));
|
|
46651
47239
|
const hasExplicitPackages = Object.keys(decodedOptions.packages ?? {}).length > 0;
|
|
47240
|
+
const privatePackages = config.privatePackages;
|
|
47241
|
+
const versionPrivate = privatePackages !== void 0 && privatePackages !== false && privatePackages.version === true;
|
|
46652
47242
|
let scopes;
|
|
46653
47243
|
if (hasExplicitPackages) {
|
|
46654
47244
|
const explicitScopes = yield* buildResolvedScopes({
|
|
@@ -46664,9 +47254,9 @@ function makeShape$3(reader, discovery, fs) {
|
|
|
46664
47254
|
throw e;
|
|
46665
47255
|
}
|
|
46666
47256
|
const explicitNames = new Set(explicitScopes.map((s) => s.name));
|
|
46667
|
-
const discoveredScopes = yield* buildFallbackScopes(fs, workspaces.filter((w) => !explicitNames.has(w.name)));
|
|
47257
|
+
const discoveredScopes = yield* buildFallbackScopes(fs, workspaces.filter((w) => !explicitNames.has(w.name)), versionPrivate);
|
|
46668
47258
|
scopes = [...explicitScopes, ...discoveredScopes];
|
|
46669
|
-
} else scopes = yield* buildFallbackScopes(fs, workspaces);
|
|
47259
|
+
} else scopes = yield* buildFallbackScopes(fs, workspaces, versionPrivate);
|
|
46670
47260
|
const inspected = {
|
|
46671
47261
|
configPath,
|
|
46672
47262
|
projectDir,
|
|
@@ -46700,12 +47290,19 @@ function makeShape$3(reader, discovery, fs) {
|
|
|
46700
47290
|
function classifyOne(inspected, path) {
|
|
46701
47291
|
const abs = (0, node_path.resolve)(inspected.projectDir, path);
|
|
46702
47292
|
let bestWorkspace = null;
|
|
46703
|
-
|
|
46704
|
-
|
|
46705
|
-
if (
|
|
46706
|
-
|
|
46707
|
-
|
|
46708
|
-
}
|
|
47293
|
+
let rootScope = null;
|
|
47294
|
+
for (const s of inspected.packages) {
|
|
47295
|
+
if (s.workspaceDir === inspected.projectDir) {
|
|
47296
|
+
rootScope = s.name;
|
|
47297
|
+
continue;
|
|
47298
|
+
}
|
|
47299
|
+
if (isInside(s.workspaceDir, abs)) {
|
|
47300
|
+
const depth = s.workspaceDir.length;
|
|
47301
|
+
if (!bestWorkspace || depth > bestWorkspace.depth) bestWorkspace = {
|
|
47302
|
+
pkg: s.name,
|
|
47303
|
+
depth
|
|
47304
|
+
};
|
|
47305
|
+
}
|
|
46709
47306
|
}
|
|
46710
47307
|
if (bestWorkspace) return {
|
|
46711
47308
|
path,
|
|
@@ -46732,6 +47329,11 @@ function classifyOne(inspected, path) {
|
|
|
46732
47329
|
glob: vf.glob
|
|
46733
47330
|
}
|
|
46734
47331
|
};
|
|
47332
|
+
if (rootScope && isInside(inspected.projectDir, abs)) return {
|
|
47333
|
+
path,
|
|
47334
|
+
package: rootScope,
|
|
47335
|
+
reason: "workspace"
|
|
47336
|
+
};
|
|
46735
47337
|
return {
|
|
46736
47338
|
path,
|
|
46737
47339
|
package: null,
|
|
@@ -46968,10 +47570,23 @@ const DEP_TYPE_MAP = [
|
|
|
46968
47570
|
["optionalDependencies", "optionalDependency"]
|
|
46969
47571
|
];
|
|
46970
47572
|
/**
|
|
46971
|
-
* Resolve a specifier against the snapshot it belongs to,
|
|
46972
|
-
*
|
|
46973
|
-
|
|
46974
|
-
|
|
47573
|
+
* Resolve a specifier against the snapshot it belongs to, scoped to the
|
|
47574
|
+
* importer that declared it, falling back to the raw specifier string when
|
|
47575
|
+
* the snapshot cannot resolve it.
|
|
47576
|
+
*
|
|
47577
|
+
* @remarks
|
|
47578
|
+
* Uses `resolveIn` rather than the workspace-wide `resolve`. Both consult the
|
|
47579
|
+
* ref's own lockfile importer entries when a `catalog:` specifier is not in the
|
|
47580
|
+
* catalog set — which is what makes hook-injected catalogs (`catalog:effect:peers`,
|
|
47581
|
+
* injected by a config-dependency pnpmfile and recorded in neither
|
|
47582
|
+
* `pnpm-workspace.yaml` nor the lockfile's `catalogs:` block) resolvable at all.
|
|
47583
|
+
* The workspace-wide form abstains whenever two importers disagree on a
|
|
47584
|
+
* dependency's version, which in a multi-package repo reproduces the original
|
|
47585
|
+
* defect: both sides fall back to the identical raw specifier, compare equal,
|
|
47586
|
+
* and emit no row. Scoping to the declaring importer answers precisely where
|
|
47587
|
+
* the workspace-wide form cannot.
|
|
47588
|
+
*/
|
|
47589
|
+
const resolveOrRaw = (snapshot, importerPath, dep, spec) => effect.Option.getOrElse(snapshot.resolveIn(importerPath, dep, spec), () => spec);
|
|
46975
47590
|
/**
|
|
46976
47591
|
* Drop no-net-change field moves: the same dependency removed from one field
|
|
46977
47592
|
* and added to another with an equal resolved version (e.g. a dep promoted
|
|
@@ -47016,13 +47631,15 @@ function computeWorkspaceDependencyDiffs(before, after) {
|
|
|
47016
47631
|
for (const afterPkg of after.packages) {
|
|
47017
47632
|
const beforePkg = effect.Option.getOrNull(before.package(afterPkg.name));
|
|
47018
47633
|
const rows = [];
|
|
47634
|
+
const afterImporter = afterPkg.relativePath;
|
|
47635
|
+
const beforeImporter = beforePkg?.relativePath ?? afterImporter;
|
|
47019
47636
|
for (const [field, type] of DEP_TYPE_MAP) {
|
|
47020
47637
|
const beforeRecord = beforePkg?.[field] ?? {};
|
|
47021
47638
|
const afterRecord = afterPkg[field];
|
|
47022
47639
|
const seen = /* @__PURE__ */ new Set();
|
|
47023
47640
|
for (const [name, beforeSpec] of Object.entries(beforeRecord)) {
|
|
47024
47641
|
seen.add(name);
|
|
47025
|
-
const from = resolveOrRaw(before, name, beforeSpec);
|
|
47642
|
+
const from = resolveOrRaw(before, beforeImporter, name, beforeSpec);
|
|
47026
47643
|
const afterSpec = afterRecord[name];
|
|
47027
47644
|
if (afterSpec === void 0) {
|
|
47028
47645
|
rows.push({
|
|
@@ -47034,7 +47651,7 @@ function computeWorkspaceDependencyDiffs(before, after) {
|
|
|
47034
47651
|
});
|
|
47035
47652
|
continue;
|
|
47036
47653
|
}
|
|
47037
|
-
const to = resolveOrRaw(after, name, afterSpec);
|
|
47654
|
+
const to = resolveOrRaw(after, afterImporter, name, afterSpec);
|
|
47038
47655
|
if (from !== to) rows.push({
|
|
47039
47656
|
dependency: name,
|
|
47040
47657
|
type,
|
|
@@ -47050,7 +47667,7 @@ function computeWorkspaceDependencyDiffs(before, after) {
|
|
|
47050
47667
|
type,
|
|
47051
47668
|
action: "added",
|
|
47052
47669
|
from: EM_DASH$1,
|
|
47053
|
-
to: resolveOrRaw(after, name, afterSpec)
|
|
47670
|
+
to: resolveOrRaw(after, afterImporter, name, afterSpec)
|
|
47054
47671
|
});
|
|
47055
47672
|
}
|
|
47056
47673
|
}
|
|
@@ -65196,8 +65813,38 @@ function getHeadingLevel(heading) {
|
|
|
65196
65813
|
return sequence ? sequence.text.length : 0;
|
|
65197
65814
|
}
|
|
65198
65815
|
/**
|
|
65816
|
+
* CommonMark backslash escapes: a backslash is literal unless it precedes an
|
|
65817
|
+
* ASCII punctuation character, in which case the pair denotes that character.
|
|
65818
|
+
*/
|
|
65819
|
+
const BACKSLASH_ESCAPE_RE = /\\([!-/:-@[-`{-~])/g;
|
|
65820
|
+
/**
|
|
65821
|
+
* Resolve CommonMark backslash escapes in raw micromark source text.
|
|
65822
|
+
*
|
|
65823
|
+
* @remarks
|
|
65824
|
+
* Every rule in this directory has a sibling remark implementation that reads
|
|
65825
|
+
* the parsed mdast tree, where the parser has already resolved escapes, via
|
|
65826
|
+
* `mdast-util-to-string`. Micromark tokens instead carry RAW source. Comparing
|
|
65827
|
+
* raw text against a value the parsed form would produce makes the two
|
|
65828
|
+
* implementations of one documented rule disagree about the same file
|
|
65829
|
+
* (issue #367).
|
|
65830
|
+
*
|
|
65831
|
+
* Applied at the shared extractors below so both implementations judge the
|
|
65832
|
+
* value a reader actually sees, rather than per-rule where the next extractor
|
|
65833
|
+
* added would silently reintroduce the split.
|
|
65834
|
+
*
|
|
65835
|
+
* @internal
|
|
65836
|
+
*/
|
|
65837
|
+
function unescapeMarkdown(raw) {
|
|
65838
|
+
return raw.replace(BACKSLASH_ESCAPE_RE, "$1");
|
|
65839
|
+
}
|
|
65840
|
+
/**
|
|
65199
65841
|
* Get the plain text content of an `atxHeading` token.
|
|
65200
65842
|
*
|
|
65843
|
+
* @remarks
|
|
65844
|
+
* Escape-resolved, so a heading compares equal to the same heading as the
|
|
65845
|
+
* remark rules see it. `getHeadingLevel` needs no equivalent — it counts
|
|
65846
|
+
* sequence characters rather than reading text.
|
|
65847
|
+
*
|
|
65201
65848
|
* @param heading - The `atxHeading` micromark token
|
|
65202
65849
|
* @returns The heading text, or empty string if no text token found
|
|
65203
65850
|
*
|
|
@@ -65205,7 +65852,7 @@ function getHeadingLevel(heading) {
|
|
|
65205
65852
|
*/
|
|
65206
65853
|
function getHeadingText(heading) {
|
|
65207
65854
|
const textToken = heading.children.find((c) => c.type === "atxHeadingText");
|
|
65208
|
-
return textToken ? textToken.text : "";
|
|
65855
|
+
return textToken ? unescapeMarkdown(textToken.text) : "";
|
|
65209
65856
|
}
|
|
65210
65857
|
//#endregion
|
|
65211
65858
|
//#region ../silk-effects/dist/dev/pkg/changesets/markdownlint/rules/content-structure.js
|
|
@@ -65330,13 +65977,13 @@ const EXPECTED_HEADERS = [
|
|
|
65330
65977
|
* The `tableContent` token has a `.text` property with the cell value.
|
|
65331
65978
|
*
|
|
65332
65979
|
* @param cell - A GFM table cell token (header or data)
|
|
65333
|
-
* @returns The trimmed text content of the cell, or an empty string
|
|
65980
|
+
* @returns The trimmed, escape-resolved text content of the cell, or an empty string
|
|
65334
65981
|
*
|
|
65335
65982
|
* @internal
|
|
65336
65983
|
*/
|
|
65337
65984
|
function getCellText(cell) {
|
|
65338
65985
|
const content = cell.children.find((c) => c.type === "tableContent");
|
|
65339
|
-
return content ? content.text.trim() : "";
|
|
65986
|
+
return content ? unescapeMarkdown(content.text.trim()) : "";
|
|
65340
65987
|
}
|
|
65341
65988
|
/**
|
|
65342
65989
|
* Extract all cell texts from a `tableRow` token.
|