@savvy-web/silk 3.2.2 → 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 +448 -95
- package/changesets-changelog.d.cts +252 -11
- package/changesets-changelog.d.ts +252 -11
- package/changesets-changelog.js +449 -96
- package/changesets-markdownlint.cjs +448 -95
- package/changesets-markdownlint.d.cts +252 -11
- package/changesets-markdownlint.d.ts +252 -11
- package/changesets-markdownlint.js +449 -96
- 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,7 @@ 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
|
|
20686
20892
|
/**
|
|
20687
20893
|
* Strip pnpm's peer-disambiguation suffix from a recorded importer version.
|
|
20688
20894
|
*
|
|
@@ -20768,7 +20974,7 @@ const unanimousVersionOf = (index, dependency) => {
|
|
|
20768
20974
|
return agreed;
|
|
20769
20975
|
};
|
|
20770
20976
|
//#endregion
|
|
20771
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
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
|
|
20772
20978
|
/**
|
|
20773
20979
|
* An immutable, fully-normalized catalog collection — the one catalog
|
|
20774
20980
|
* resolution semantic in the package.
|
|
@@ -21044,6 +21250,8 @@ const validatePnpmWorkspaceCatalogs = (document) => {
|
|
|
21044
21250
|
catalogs: "catalogs"
|
|
21045
21251
|
}));
|
|
21046
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.`));
|
|
21047
21255
|
/**
|
|
21048
21256
|
* Assembles a workspace's catalogs, package-manager-aware.
|
|
21049
21257
|
*
|
|
@@ -21187,6 +21395,70 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
21187
21395
|
*/
|
|
21188
21396
|
static layerWithConfigDependencies = (options) => effect.Layer.effect(WorkspaceCatalogs, WorkspaceCatalogs.make(options)).pipe(effect.Layer.provide(ConfigDependencyHooks.layerLive));
|
|
21189
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
|
+
/**
|
|
21190
21462
|
* The real implementation of `@effected/npm`'s `CatalogResolver` contract —
|
|
21191
21463
|
* the one `@effected/package-json` declares but cannot fill.
|
|
21192
21464
|
*
|
|
@@ -21211,7 +21483,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
21211
21483
|
}));
|
|
21212
21484
|
};
|
|
21213
21485
|
//#endregion
|
|
21214
|
-
//#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
|
|
21215
21487
|
const EMPTY = Object.freeze(Object.create(null));
|
|
21216
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)));
|
|
21217
21489
|
/**
|
|
@@ -21434,7 +21706,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
|
|
|
21434
21706
|
}
|
|
21435
21707
|
};
|
|
21436
21708
|
//#endregion
|
|
21437
|
-
//#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
|
|
21438
21710
|
/** Whether `value` is a non-null, non-array object. */
|
|
21439
21711
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
21440
21712
|
/** Whether every value in a record is a string — a usable dependency map. */
|
|
@@ -21493,6 +21765,8 @@ const EMPTY_LOCKFILE_RECORD = {
|
|
|
21493
21765
|
catalogs: CatalogSet.empty(),
|
|
21494
21766
|
importerVersions: {}
|
|
21495
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.`));
|
|
21496
21770
|
/**
|
|
21497
21771
|
* Reads workspace state at a git ref with no checkout, and the live worktree.
|
|
21498
21772
|
*
|
|
@@ -21639,9 +21913,69 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
21639
21913
|
* `const` and reuse it, or layer memoization does not apply.
|
|
21640
21914
|
*/
|
|
21641
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));
|
|
21642
21976
|
};
|
|
21643
21977
|
//#endregion
|
|
21644
|
-
//#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
|
|
21645
21979
|
/**
|
|
21646
21980
|
* Every service that needs only a filesystem: root, package-manager detection,
|
|
21647
21981
|
* discovery, lockfile reading, catalogs and publishability.
|
|
@@ -46779,20 +47113,25 @@ function readRawPackageJson(fs, pkgDir) {
|
|
|
46779
47113
|
}
|
|
46780
47114
|
/**
|
|
46781
47115
|
* Build resolved scopes from the discovered workspace packages, keeping only
|
|
46782
|
-
* those that are a release surface
|
|
46783
|
-
* one publish target
|
|
46784
|
-
*
|
|
46785
|
-
*
|
|
46786
|
-
*
|
|
46787
|
-
*
|
|
46788
|
-
* declares
|
|
46789
|
-
|
|
46790
|
-
|
|
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) {
|
|
46791
47130
|
return effect.Effect.forEach(workspaces, (ws) => effect.Effect.gen(function* () {
|
|
46792
47131
|
const raw = yield* readRawPackageJson(fs, ws.path);
|
|
46793
47132
|
if (raw === null) return [];
|
|
46794
47133
|
const binding = yield* readTargetsBinding(fs, ws.path);
|
|
46795
|
-
if (SilkPublishability.detect(ws.name, raw, binding).length === 0) return [];
|
|
47134
|
+
if (SilkPublishability.detect(ws.name, raw, binding).length === 0 && !versionPrivate) return [];
|
|
46796
47135
|
return [{
|
|
46797
47136
|
name: ws.name,
|
|
46798
47137
|
workspaceDir: ws.path,
|
|
@@ -46898,6 +47237,8 @@ function makeShape$3(reader, discovery, fs) {
|
|
|
46898
47237
|
version: w.version
|
|
46899
47238
|
}));
|
|
46900
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;
|
|
46901
47242
|
let scopes;
|
|
46902
47243
|
if (hasExplicitPackages) {
|
|
46903
47244
|
const explicitScopes = yield* buildResolvedScopes({
|
|
@@ -46913,9 +47254,9 @@ function makeShape$3(reader, discovery, fs) {
|
|
|
46913
47254
|
throw e;
|
|
46914
47255
|
}
|
|
46915
47256
|
const explicitNames = new Set(explicitScopes.map((s) => s.name));
|
|
46916
|
-
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);
|
|
46917
47258
|
scopes = [...explicitScopes, ...discoveredScopes];
|
|
46918
|
-
} else scopes = yield* buildFallbackScopes(fs, workspaces);
|
|
47259
|
+
} else scopes = yield* buildFallbackScopes(fs, workspaces, versionPrivate);
|
|
46919
47260
|
const inspected = {
|
|
46920
47261
|
configPath,
|
|
46921
47262
|
projectDir,
|
|
@@ -46949,12 +47290,19 @@ function makeShape$3(reader, discovery, fs) {
|
|
|
46949
47290
|
function classifyOne(inspected, path) {
|
|
46950
47291
|
const abs = (0, node_path.resolve)(inspected.projectDir, path);
|
|
46951
47292
|
let bestWorkspace = null;
|
|
46952
|
-
|
|
46953
|
-
|
|
46954
|
-
if (
|
|
46955
|
-
|
|
46956
|
-
|
|
46957
|
-
}
|
|
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
|
+
}
|
|
46958
47306
|
}
|
|
46959
47307
|
if (bestWorkspace) return {
|
|
46960
47308
|
path,
|
|
@@ -46981,6 +47329,11 @@ function classifyOne(inspected, path) {
|
|
|
46981
47329
|
glob: vf.glob
|
|
46982
47330
|
}
|
|
46983
47331
|
};
|
|
47332
|
+
if (rootScope && isInside(inspected.projectDir, abs)) return {
|
|
47333
|
+
path,
|
|
47334
|
+
package: rootScope,
|
|
47335
|
+
reason: "workspace"
|
|
47336
|
+
};
|
|
46984
47337
|
return {
|
|
46985
47338
|
path,
|
|
46986
47339
|
package: null,
|