@savvy-web/silk 3.0.5 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/changesets-changelog.cjs +311 -60
- package/changesets-changelog.d.cts +186 -9
- package/changesets-changelog.d.ts +186 -9
- package/changesets-changelog.js +312 -60
- package/changesets-markdownlint.cjs +311 -60
- package/changesets-markdownlint.d.cts +186 -9
- package/changesets-markdownlint.d.ts +186 -9
- package/changesets-markdownlint.js +312 -60
- package/package.json +6 -6
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
|
@@ -2381,7 +2381,7 @@ var GlobSet = class GlobSet extends Schema.Class("GlobSet")(Schema.Struct({ patt
|
|
|
2381
2381
|
};
|
|
2382
2382
|
|
|
2383
2383
|
//#endregion
|
|
2384
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
2384
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/BunExtension.js
|
|
2385
2385
|
/**
|
|
2386
2386
|
* Extension data specific to bun lockfiles, attached to `Lockfile.extension`
|
|
2387
2387
|
* when the format is `"bun"`.
|
|
@@ -2403,7 +2403,7 @@ var BunExtension = class extends Schema.Class("BunExtension")({
|
|
|
2403
2403
|
}) {};
|
|
2404
2404
|
|
|
2405
2405
|
//#endregion
|
|
2406
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2406
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.3.0_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/CatalogResolver.js
|
|
2407
2407
|
/**
|
|
2408
2408
|
* Contract for resolving pnpm `catalog:` dependency specifiers to concrete
|
|
2409
2409
|
* version ranges.
|
|
@@ -2450,7 +2450,7 @@ var CatalogResolver = class CatalogResolver extends Context.Service()("@effected
|
|
|
2450
2450
|
};
|
|
2451
2451
|
|
|
2452
2452
|
//#endregion
|
|
2453
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2453
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.3.0_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/WorkspaceResolver.js
|
|
2454
2454
|
/**
|
|
2455
2455
|
* Raised when a `catalog:` or `workspace:` specifier cannot be resolved
|
|
2456
2456
|
* because the resolution mechanism itself failed — not for an ordinary
|
|
@@ -2512,7 +2512,7 @@ var WorkspaceResolver = class WorkspaceResolver extends Context.Service()("@effe
|
|
|
2512
2512
|
};
|
|
2513
2513
|
|
|
2514
2514
|
//#endregion
|
|
2515
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2515
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.3.0_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/CatalogAssemblyError.js
|
|
2516
2516
|
/**
|
|
2517
2517
|
* Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
|
|
2518
2518
|
* that is unreadable or not valid YAML, a root `package.json` `workspaces` field
|
|
@@ -2557,7 +2557,7 @@ var CatalogAssemblyError = class extends Schema.TaggedErrorClass()("CatalogAssem
|
|
|
2557
2557
|
};
|
|
2558
2558
|
|
|
2559
2559
|
//#endregion
|
|
2560
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2560
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.3.0_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/DependencySection.js
|
|
2561
2561
|
/**
|
|
2562
2562
|
* The short dependency kind: which dependency map an entry came from, named the
|
|
2563
2563
|
* way consumers branch on it.
|
|
@@ -4067,7 +4067,7 @@ const isComparatorSetSubset = (sub, sup) => {
|
|
|
4067
4067
|
};
|
|
4068
4068
|
|
|
4069
4069
|
//#endregion
|
|
4070
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4070
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.3.0_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/DependencySpecifier.js
|
|
4071
4071
|
/**
|
|
4072
4072
|
* Indicates that a string could not be parsed as a valid dependency specifier.
|
|
4073
4073
|
*
|
|
@@ -4275,7 +4275,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
|
|
|
4275
4275
|
});
|
|
4276
4276
|
|
|
4277
4277
|
//#endregion
|
|
4278
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4278
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.3.0_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/IntegrityHash.js
|
|
4279
4279
|
const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
|
|
4280
4280
|
const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
|
|
4281
4281
|
const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
|
|
@@ -4329,7 +4329,176 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
|
|
|
4329
4329
|
});
|
|
4330
4330
|
|
|
4331
4331
|
//#endregion
|
|
4332
|
-
//#region ../../node_modules/.pnpm/@effected+
|
|
4332
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.3.0_@effected+semver@0.2.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/ReleaseAgeGate.js
|
|
4333
|
+
const MS_PER_MINUTE = 6e4;
|
|
4334
|
+
/**
|
|
4335
|
+
* A source's partial contribution to a {@link ReleaseAgeGate}: the effective
|
|
4336
|
+
* gate is assembled from more than one place (inline `pnpm-workspace.yaml`
|
|
4337
|
+
* keys, replayed `updateConfig` hooks, `pnpm config get` output), and each
|
|
4338
|
+
* source may set the age, the exclude list, both, or neither. Absent fields
|
|
4339
|
+
* contribute nothing to the combination.
|
|
4340
|
+
*
|
|
4341
|
+
* Deliberately permissive: unlike {@link ReleaseAgeGate} it does not constrain
|
|
4342
|
+
* `ageMinutes` to be non-negative, because the raw values arrive from arbitrary
|
|
4343
|
+
* config sources and {@link ReleaseAgeGate.combine} is the single authority
|
|
4344
|
+
* that clamps them.
|
|
4345
|
+
*
|
|
4346
|
+
* @public
|
|
4347
|
+
*/
|
|
4348
|
+
const PartialReleaseAgeGate = Schema.Struct({
|
|
4349
|
+
/** Minutes a release must age; absent means this source sets no age. */
|
|
4350
|
+
ageMinutes: Schema.optionalKey(Schema.Number),
|
|
4351
|
+
/** Exempt package-name patterns; absent means this source adds no exemptions. */
|
|
4352
|
+
exclude: Schema.optionalKey(Schema.Array(Schema.String))
|
|
4353
|
+
});
|
|
4354
|
+
const AgeMinutes = Schema.Number.check(Schema.isGreaterThanOrEqualTo(0), Schema.isFinite());
|
|
4355
|
+
const matchesPattern = (name, pattern) => {
|
|
4356
|
+
if (pattern === name) return true;
|
|
4357
|
+
if (!pattern.includes("*")) return false;
|
|
4358
|
+
let nameIndex = 0;
|
|
4359
|
+
let patternIndex = 0;
|
|
4360
|
+
let starIndex = -1;
|
|
4361
|
+
let retryNameIndex = 0;
|
|
4362
|
+
while (nameIndex < name.length) if (pattern[patternIndex] === "*") {
|
|
4363
|
+
starIndex = patternIndex;
|
|
4364
|
+
patternIndex += 1;
|
|
4365
|
+
retryNameIndex = nameIndex;
|
|
4366
|
+
} else if (pattern[patternIndex] === name[nameIndex]) {
|
|
4367
|
+
patternIndex += 1;
|
|
4368
|
+
nameIndex += 1;
|
|
4369
|
+
} else if (starIndex !== -1) {
|
|
4370
|
+
patternIndex = starIndex + 1;
|
|
4371
|
+
retryNameIndex += 1;
|
|
4372
|
+
nameIndex = retryNameIndex;
|
|
4373
|
+
} else return false;
|
|
4374
|
+
while (pattern[patternIndex] === "*") patternIndex += 1;
|
|
4375
|
+
return patternIndex === pattern.length;
|
|
4376
|
+
};
|
|
4377
|
+
const matchesExclude = (name, patterns) => patterns.some((pattern) => matchesPattern(name, pattern));
|
|
4378
|
+
/**
|
|
4379
|
+
* pnpm's publish-time release-age gate: the number of minutes a published
|
|
4380
|
+
* version must age before it is eligible, and the set of package-name patterns
|
|
4381
|
+
* exempt from the gate. Mirrors pnpm's `minimumReleaseAge` /
|
|
4382
|
+
* `minimumReleaseAgeExclude` config so a resolver can drop too-young candidate
|
|
4383
|
+
* versions before picking, avoiding `ERR_PNPM_NO_MATURE_MATCHING_VERSION`.
|
|
4384
|
+
*
|
|
4385
|
+
* `ageMinutes` is constrained non-negative and finite; a `ReleaseAgeGate` with
|
|
4386
|
+
* `ageMinutes <= 0` is an inert gate that filters nothing. Assemble a gate from
|
|
4387
|
+
* multiple config sources with {@link ReleaseAgeGate.combine}, and apply it to
|
|
4388
|
+
* a package's candidate versions with {@link ReleaseAgeGate.filterVersions}.
|
|
4389
|
+
*
|
|
4390
|
+
* @example
|
|
4391
|
+
* ```ts
|
|
4392
|
+
* import { ReleaseAgeGate } from "@effected/npm";
|
|
4393
|
+
*
|
|
4394
|
+
* const gate = ReleaseAgeGate.combine(
|
|
4395
|
+
* { ageMinutes: 1440 },
|
|
4396
|
+
* { exclude: ["@my-scope/*"] },
|
|
4397
|
+
* );
|
|
4398
|
+
* // gate.ageMinutes === 1440, gate.exclude === ["@my-scope/*"]
|
|
4399
|
+
*
|
|
4400
|
+
* const eligible = gate.filterVersions(
|
|
4401
|
+
* ["1.0.0", "1.0.1"],
|
|
4402
|
+
* { "1.0.0": "2020-01-01T00:00:00Z", "1.0.1": "2026-07-21T00:00:00Z" },
|
|
4403
|
+
* "prettier",
|
|
4404
|
+
* Date.now(),
|
|
4405
|
+
* );
|
|
4406
|
+
* ```
|
|
4407
|
+
*
|
|
4408
|
+
* @public
|
|
4409
|
+
*/
|
|
4410
|
+
var ReleaseAgeGate = class ReleaseAgeGate extends Schema.Class("ReleaseAgeGate")({
|
|
4411
|
+
/** Minutes a published version must age before it is eligible (non-negative, finite). */
|
|
4412
|
+
ageMinutes: AgeMinutes,
|
|
4413
|
+
/** Package-name patterns exempt from the gate (exact names or `*`-globs). */
|
|
4414
|
+
exclude: Schema.Array(Schema.String)
|
|
4415
|
+
}) {
|
|
4416
|
+
/**
|
|
4417
|
+
* Combine partial contributions from multiple sources into one effective
|
|
4418
|
+
* gate: **strictest age wins** (the maximum of the contributed ages,
|
|
4419
|
+
* clamped to be non-negative) and the exclude sets **union** (deduplicated,
|
|
4420
|
+
* insertion order preserved). A contribution's absent field adds nothing; a
|
|
4421
|
+
* negative or non-finite contributed age is ignored by the clamp. With no
|
|
4422
|
+
* contributions (or only empty ones) the result is the inert zero gate
|
|
4423
|
+
* (`ageMinutes: 0`, `exclude: []`).
|
|
4424
|
+
*
|
|
4425
|
+
* `combine` is total — it never throws on a fractional, negative, or
|
|
4426
|
+
* non-finite contribution — which is why {@link (PartialReleaseAgeGate:variable)}
|
|
4427
|
+
* does not constrain its `ageMinutes` and this method owns the clamp.
|
|
4428
|
+
*
|
|
4429
|
+
* @param contributions - the partial gates to merge, one per source.
|
|
4430
|
+
*/
|
|
4431
|
+
static combine(...contributions) {
|
|
4432
|
+
const ages = contributions.map((contribution) => contribution.ageMinutes).filter((age) => typeof age === "number" && Number.isFinite(age));
|
|
4433
|
+
const ageMinutes = ages.length > 0 ? Math.max(0, ...ages) : 0;
|
|
4434
|
+
const exclude = [...new Set(contributions.flatMap((contribution) => contribution.exclude ?? []))];
|
|
4435
|
+
return ReleaseAgeGate.make({
|
|
4436
|
+
ageMinutes,
|
|
4437
|
+
exclude
|
|
4438
|
+
});
|
|
4439
|
+
}
|
|
4440
|
+
/**
|
|
4441
|
+
* Whether a package name matches any of `patterns`, using pnpm's
|
|
4442
|
+
* `@pnpm/matcher` semantics: an exact-name match, or a `*`-glob where `*`
|
|
4443
|
+
* matches any run of characters **including `/`** — so a bare `*` matches a
|
|
4444
|
+
* scoped name like `@scope/pkg`, and `@scope/*` matches every package in a
|
|
4445
|
+
* scope.
|
|
4446
|
+
*
|
|
4447
|
+
* @remarks
|
|
4448
|
+
* This is deliberately **NOT** `@effected/glob`'s minimatch dialect, in
|
|
4449
|
+
* which `*` refuses to cross `/` (there `*` matches `pkg` but not
|
|
4450
|
+
* `@scope/pkg`, and you would need `**`). pnpm treats the package name as a
|
|
4451
|
+
* flat string, so this matcher does too. Do not "fix" this to route through
|
|
4452
|
+
* `@effected/glob`: it would silently change which packages a gate exempts
|
|
4453
|
+
* and diverge from pnpm's own behavior.
|
|
4454
|
+
*
|
|
4455
|
+
* @param name - the package name to test.
|
|
4456
|
+
* @param patterns - the exclude patterns (exact names or `*`-globs).
|
|
4457
|
+
*/
|
|
4458
|
+
static matchesExclude(name, patterns) {
|
|
4459
|
+
return matchesExclude(name, patterns);
|
|
4460
|
+
}
|
|
4461
|
+
/**
|
|
4462
|
+
* Whether this gate exempts the given package name from the release-age
|
|
4463
|
+
* check — `ReleaseAgeGate.matchesExclude(name, this.exclude)`.
|
|
4464
|
+
*
|
|
4465
|
+
* @param name - the package name to test.
|
|
4466
|
+
*/
|
|
4467
|
+
isExcluded(name) {
|
|
4468
|
+
return matchesExclude(name, this.exclude);
|
|
4469
|
+
}
|
|
4470
|
+
/**
|
|
4471
|
+
* Filter a package's candidate versions to those old enough to pass the
|
|
4472
|
+
* gate, given each version's publish timestamp and a caller-supplied `now`.
|
|
4473
|
+
*
|
|
4474
|
+
* A version is kept when it has a parseable publish timestamp at or before
|
|
4475
|
+
* the cutoff (`now - ageMinutes * 60000`). A version with a **missing or
|
|
4476
|
+
* unparseable** timestamp in `times` is **dropped** — matching pnpm's strict
|
|
4477
|
+
* posture: a version whose age cannot be established is treated as too young.
|
|
4478
|
+
* The clock is the caller's; this method reads no wall clock.
|
|
4479
|
+
*
|
|
4480
|
+
* Returns all versions unchanged (a no-op) when the gate is inert
|
|
4481
|
+
* (`ageMinutes <= 0`) or the package name is excluded.
|
|
4482
|
+
*
|
|
4483
|
+
* @param versions - the candidate version strings.
|
|
4484
|
+
* @param times - a map from version string to its ISO-8601 publish date.
|
|
4485
|
+
* @param name - the package name (checked against the gate's `exclude` list).
|
|
4486
|
+
* @param now - the current time in epoch milliseconds (the caller's clock).
|
|
4487
|
+
*/
|
|
4488
|
+
filterVersions(versions, times, name, now) {
|
|
4489
|
+
if (this.ageMinutes <= 0 || this.isExcluded(name)) return versions;
|
|
4490
|
+
const cutoff = now - this.ageMinutes * MS_PER_MINUTE;
|
|
4491
|
+
return versions.filter((version) => {
|
|
4492
|
+
const time = times[version];
|
|
4493
|
+
if (time === void 0) return false;
|
|
4494
|
+
const published = Date.parse(time);
|
|
4495
|
+
return Number.isFinite(published) && published <= cutoff;
|
|
4496
|
+
});
|
|
4497
|
+
}
|
|
4498
|
+
};
|
|
4499
|
+
|
|
4500
|
+
//#endregion
|
|
4501
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/ImporterDependency.js
|
|
4333
4502
|
/**
|
|
4334
4503
|
* One declared dependency of one workspace importer, as the lockfile records it.
|
|
4335
4504
|
*
|
|
@@ -4358,7 +4527,7 @@ var ImporterDependency = class extends Schema.Class("ImporterDependency")({
|
|
|
4358
4527
|
}) {};
|
|
4359
4528
|
|
|
4360
4529
|
//#endregion
|
|
4361
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4530
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/LockfileImporter.js
|
|
4362
4531
|
/**
|
|
4363
4532
|
* One workspace importer's declared dependencies, as the lockfile records them.
|
|
4364
4533
|
*
|
|
@@ -4383,7 +4552,7 @@ var LockfileImporter = class extends Schema.Class("LockfileImporter")({
|
|
|
4383
4552
|
}) {};
|
|
4384
4553
|
|
|
4385
4554
|
//#endregion
|
|
4386
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4555
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/ResolvedPackage.js
|
|
4387
4556
|
const EMPTY_DEPENDENCIES = {};
|
|
4388
4557
|
/**
|
|
4389
4558
|
* A package resolved from a lockfile.
|
|
@@ -4419,7 +4588,7 @@ var ResolvedPackage = class extends Schema.Class("ResolvedPackage")({
|
|
|
4419
4588
|
}) {};
|
|
4420
4589
|
|
|
4421
4590
|
//#endregion
|
|
4422
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4591
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/WorkspaceDependency.js
|
|
4423
4592
|
/**
|
|
4424
4593
|
* A directed dependency edge between two workspace packages as recorded in
|
|
4425
4594
|
* the lockfile.
|
|
@@ -4442,7 +4611,7 @@ var WorkspaceDependency = class extends Schema.Class("WorkspaceDependency")({
|
|
|
4442
4611
|
}) {};
|
|
4443
4612
|
|
|
4444
4613
|
//#endregion
|
|
4445
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4614
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/PnpmExtension.js
|
|
4446
4615
|
/**
|
|
4447
4616
|
* Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
|
|
4448
4617
|
* when the format is `"pnpm"`.
|
|
@@ -4468,7 +4637,7 @@ var PnpmExtension = class extends Schema.Class("PnpmExtension")({
|
|
|
4468
4637
|
}) {};
|
|
4469
4638
|
|
|
4470
4639
|
//#endregion
|
|
4471
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4640
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/LockfileFormat.js
|
|
4472
4641
|
/**
|
|
4473
4642
|
* The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
|
|
4474
4643
|
* `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
|
|
@@ -4503,7 +4672,7 @@ const FILENAMES = {
|
|
|
4503
4672
|
const filenameFor = (format) => FILENAMES[format];
|
|
4504
4673
|
|
|
4505
4674
|
//#endregion
|
|
4506
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4675
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/internal/shared.js
|
|
4507
4676
|
/**
|
|
4508
4677
|
* The four dependency sections of a manifest, in a stable order — the shared
|
|
4509
4678
|
* dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
|
|
@@ -6445,7 +6614,7 @@ var JsoncModifier = class {
|
|
|
6445
6614
|
};
|
|
6446
6615
|
|
|
6447
6616
|
//#endregion
|
|
6448
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
6617
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/internal/bun.js
|
|
6449
6618
|
const DepRecord$2 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
|
|
6450
6619
|
const BunWorkspaceEntry = Schema.Struct({
|
|
6451
6620
|
name: Schema.optionalKey(Schema.String),
|
|
@@ -6539,7 +6708,7 @@ const toFields$3 = (raw) => Effect.gen(function* () {
|
|
|
6539
6708
|
});
|
|
6540
6709
|
|
|
6541
6710
|
//#endregion
|
|
6542
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
6711
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/internal/npm.js
|
|
6543
6712
|
const DepRecord$1 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
|
|
6544
6713
|
const NpmPackageEntry = Schema.Struct({
|
|
6545
6714
|
name: Schema.optionalKey(Schema.String),
|
|
@@ -13550,7 +13719,7 @@ function deepEqualValues(a, b) {
|
|
|
13550
13719
|
}
|
|
13551
13720
|
|
|
13552
13721
|
//#endregion
|
|
13553
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13722
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/internal/documents.js
|
|
13554
13723
|
/**
|
|
13555
13724
|
* An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
|
|
13556
13725
|
* and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
|
|
@@ -13621,7 +13790,7 @@ const selectSoleDocument = (content) => Effect.gen(function* () {
|
|
|
13621
13790
|
});
|
|
13622
13791
|
|
|
13623
13792
|
//#endregion
|
|
13624
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13793
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/internal/pnpm.js
|
|
13625
13794
|
const PnpmImporterDeps = Schema.optionalKey(Schema.Record(Schema.String, Schema.Struct({
|
|
13626
13795
|
specifier: Schema.String,
|
|
13627
13796
|
version: Schema.String
|
|
@@ -13748,7 +13917,7 @@ const toFields$1 = (raw) => Effect.gen(function* () {
|
|
|
13748
13917
|
});
|
|
13749
13918
|
|
|
13750
13919
|
//#endregion
|
|
13751
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13920
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/internal/yarn.js
|
|
13752
13921
|
const YarnLockfileRaw = Schema.Record(Schema.String, Schema.Unknown);
|
|
13753
13922
|
const DepRecord = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
|
|
13754
13923
|
const YarnEntry = Schema.Struct({
|
|
@@ -13872,7 +14041,7 @@ const cleanYarnDeps = (deps) => {
|
|
|
13872
14041
|
};
|
|
13873
14042
|
|
|
13874
14043
|
//#endregion
|
|
13875
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
14044
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/Lockfile.js
|
|
13876
14045
|
const EMPTY_IMPORTERS = [];
|
|
13877
14046
|
/**
|
|
13878
14047
|
* Failure of `Lockfile.parse`: the given content is not a valid lockfile of
|
|
@@ -14117,7 +14286,7 @@ var Lockfile = class Lockfile extends Schema.Class("Lockfile")({
|
|
|
14117
14286
|
};
|
|
14118
14287
|
|
|
14119
14288
|
//#endregion
|
|
14120
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
14289
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.9_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__@effected+npm@0.3_d470055e7ca4b6a23d413cae592e2835/node_modules/@effected/lockfiles/LockfileIntegrity.js
|
|
14121
14290
|
/**
|
|
14122
14291
|
* The minimal manifest shape {@link LockfileIntegrity.compare} checks a
|
|
14123
14292
|
* lockfile against: a package name plus the four optional dependency maps.
|
|
@@ -14234,7 +14403,7 @@ var LockfileIntegrity = class LockfileIntegrity extends Schema.Class("LockfileIn
|
|
|
14234
14403
|
};
|
|
14235
14404
|
|
|
14236
14405
|
//#endregion
|
|
14237
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
14406
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/Dependency.js
|
|
14238
14407
|
/**
|
|
14239
14408
|
* A resolved dependency entry pairing a package name with its version
|
|
14240
14409
|
* specifier and the `kind` of map it came from (`@effected/npm`'s
|
|
@@ -14299,7 +14468,7 @@ var Dependency = class extends Schema.Class("Dependency")({
|
|
|
14299
14468
|
};
|
|
14300
14469
|
|
|
14301
14470
|
//#endregion
|
|
14302
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
14471
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/DevEngines.js
|
|
14303
14472
|
/**
|
|
14304
14473
|
* A single `devEngines` constraint with a name and optional `version` / `onFail`.
|
|
14305
14474
|
*
|
|
@@ -15340,7 +15509,7 @@ var require_spdx_expression_parse = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
15340
15509
|
}));
|
|
15341
15510
|
|
|
15342
15511
|
//#endregion
|
|
15343
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15512
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/License.js
|
|
15344
15513
|
var import_spdx_expression_parse = /* @__PURE__ */ __toESM(require_spdx_expression_parse(), 1);
|
|
15345
15514
|
/**
|
|
15346
15515
|
* Indicates that a string is not a valid SPDX license identifier or expression.
|
|
@@ -15382,7 +15551,7 @@ const isValidSpdx = (value) => {
|
|
|
15382
15551
|
const SpdxLicense = Schema.String.pipe(Schema.check(Schema.makeFilter((value) => isValidSpdx(value) ? void 0 : "Expected a valid SPDX license expression")), Schema.brand("SpdxLicense"));
|
|
15383
15552
|
|
|
15384
15553
|
//#endregion
|
|
15385
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15554
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageManager.js
|
|
15386
15555
|
const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
|
|
15387
15556
|
/**
|
|
15388
15557
|
* The `packageManager` field only ever carries corepack's `<algo>.<hex>`
|
|
@@ -15441,7 +15610,7 @@ var PackageManager = class PackageManager extends Schema.Class("PackageManager")
|
|
|
15441
15610
|
};
|
|
15442
15611
|
|
|
15443
15612
|
//#endregion
|
|
15444
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15613
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageName.js
|
|
15445
15614
|
/**
|
|
15446
15615
|
* Indicates that a string could not be used as a valid npm package name.
|
|
15447
15616
|
*
|
|
@@ -15500,7 +15669,7 @@ const PackageName = Object.assign(Schema.Union([ScopedPackageName, UnscopedPacka
|
|
|
15500
15669
|
});
|
|
15501
15670
|
|
|
15502
15671
|
//#endregion
|
|
15503
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15672
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/Person.js
|
|
15504
15673
|
const parsePersonString = (input) => {
|
|
15505
15674
|
const emailMatch = input.match(/<([^>]+)>/);
|
|
15506
15675
|
const urlMatch = input.match(/\(([^)]+)\)/);
|
|
@@ -15644,7 +15813,7 @@ var Person = class Person extends Schema.Class("Person")({
|
|
|
15644
15813
|
};
|
|
15645
15814
|
|
|
15646
15815
|
//#endregion
|
|
15647
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15816
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/internal/format.js
|
|
15648
15817
|
const KEY_INDEX = new Map([
|
|
15649
15818
|
"$schema",
|
|
15650
15819
|
"name",
|
|
@@ -15868,7 +16037,7 @@ const renderJson = (raw, options) => {
|
|
|
15868
16037
|
};
|
|
15869
16038
|
|
|
15870
16039
|
//#endregion
|
|
15871
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
16040
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/Package.js
|
|
15872
16041
|
const toHashMap = SchemaTransformation.transform({
|
|
15873
16042
|
decode: (record) => HashMap.fromIterable(Object.entries(record)),
|
|
15874
16043
|
encode: (map) => Object.fromEntries(HashMap.toEntries(map))
|
|
@@ -16187,7 +16356,7 @@ var Package = class Package extends Schema.Class("Package")({
|
|
|
16187
16356
|
};
|
|
16188
16357
|
|
|
16189
16358
|
//#endregion
|
|
16190
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16359
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspacePackage.js
|
|
16191
16360
|
const EMPTY$1 = Object.freeze(Object.create(null));
|
|
16192
16361
|
const EMPTY_MANIFEST = Object.freeze(Object.create(null));
|
|
16193
16362
|
/**
|
|
@@ -16796,7 +16965,7 @@ const Walker$1 = {
|
|
|
16796
16965
|
};
|
|
16797
16966
|
|
|
16798
16967
|
//#endregion
|
|
16799
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16968
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceRoot.js
|
|
16800
16969
|
/**
|
|
16801
16970
|
* The marker filenames {@link WorkspaceRoot} probes for, in priority order.
|
|
16802
16971
|
*
|
|
@@ -16984,7 +17153,7 @@ var WorkspaceRoot = class WorkspaceRoot extends Context.Service()("@effected/wor
|
|
|
16984
17153
|
};
|
|
16985
17154
|
|
|
16986
17155
|
//#endregion
|
|
16987
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17156
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/limits.js
|
|
16988
17157
|
/**
|
|
16989
17158
|
* Hard ceiling on directories the enumerator will visit for one pattern set.
|
|
16990
17159
|
* Guards the pathological case a depth cap alone does not: a wide, shallow
|
|
@@ -17003,7 +17172,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
|
|
|
17003
17172
|
const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
17004
17173
|
|
|
17005
17174
|
//#endregion
|
|
17006
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17175
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/traverse.js
|
|
17007
17176
|
/** Directory names never descended into. */
|
|
17008
17177
|
const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
|
|
17009
17178
|
/** Join root-relative POSIX segments; `""` is the root itself. */
|
|
@@ -17094,7 +17263,7 @@ var Traversal = class {
|
|
|
17094
17263
|
};
|
|
17095
17264
|
|
|
17096
17265
|
//#endregion
|
|
17097
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17266
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/enumerate.js
|
|
17098
17267
|
/** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
|
|
17099
17268
|
const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
|
|
17100
17269
|
/**
|
|
@@ -17165,7 +17334,7 @@ const enumerate = (root, globs, options) => Effect.gen(function* () {
|
|
|
17165
17334
|
});
|
|
17166
17335
|
|
|
17167
17336
|
//#endregion
|
|
17168
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17337
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/patterns.js
|
|
17169
17338
|
const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
|
|
17170
17339
|
/** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
|
|
17171
17340
|
const pnpmPatternsOf = (document) => {
|
|
@@ -17223,7 +17392,7 @@ const readPatterns = (root) => Effect.gen(function* () {
|
|
|
17223
17392
|
});
|
|
17224
17393
|
|
|
17225
17394
|
//#endregion
|
|
17226
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17395
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceDiscovery.js
|
|
17227
17396
|
/**
|
|
17228
17397
|
* Raised when a workspace member's `package.json` cannot be read, parsed, or
|
|
17229
17398
|
* used — it is missing, malformed, or lacks a `name` or `version`.
|
|
@@ -17658,7 +17827,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends Context.Service()("@ef
|
|
|
17658
17827
|
const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
|
|
17659
17828
|
|
|
17660
17829
|
//#endregion
|
|
17661
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17830
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/DependencyGraph.js
|
|
17662
17831
|
/**
|
|
17663
17832
|
* Raised when the workspace dependency graph cannot be topologically ordered
|
|
17664
17833
|
* because it contains a cycle.
|
|
@@ -19260,7 +19429,7 @@ var Git = class extends Context.Service()("@effected/git/Git") {
|
|
|
19260
19429
|
};
|
|
19261
19430
|
|
|
19262
19431
|
//#endregion
|
|
19263
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19432
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/ChangeDetector.js
|
|
19264
19433
|
/**
|
|
19265
19434
|
* Which git refs to compare, and whether to fold in the working tree.
|
|
19266
19435
|
*
|
|
@@ -19542,7 +19711,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
|
|
|
19542
19711
|
}
|
|
19543
19712
|
|
|
19544
19713
|
//#endregion
|
|
19545
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19714
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/catalogs.js
|
|
19546
19715
|
/** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
|
|
19547
19716
|
const inlineCatalogs = (manifest) => {
|
|
19548
19717
|
if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
|
|
@@ -19607,7 +19776,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
|
|
|
19607
19776
|
};
|
|
19608
19777
|
|
|
19609
19778
|
//#endregion
|
|
19610
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19779
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/ConfigDependencyHooks.js
|
|
19611
19780
|
/** Whether `value` is a non-null, non-array object. */
|
|
19612
19781
|
const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19613
19782
|
/**
|
|
@@ -19642,17 +19811,45 @@ const seedToConfig = (seed) => {
|
|
|
19642
19811
|
else catalogs[name] = { ...entries };
|
|
19643
19812
|
return {
|
|
19644
19813
|
catalog,
|
|
19645
|
-
catalogs
|
|
19814
|
+
catalogs,
|
|
19815
|
+
minimumReleaseAge: void 0,
|
|
19816
|
+
minimumReleaseAgeExclude: void 0
|
|
19646
19817
|
};
|
|
19647
19818
|
};
|
|
19648
|
-
/**
|
|
19819
|
+
/** A finite number if `value` is one, else the prior threaded value — a garbage age is dropped, not fatal. */
|
|
19820
|
+
const finiteNumberOr = (value, fallback) => typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
|
19821
|
+
/** A string array if `value` is one, else the prior threaded value — a malformed exclude is dropped, not fatal. */
|
|
19822
|
+
const stringArrayOr = (value, fallback) => Array.isArray(value) && value.every((entry) => typeof entry === "string") ? value : fallback;
|
|
19823
|
+
/**
|
|
19824
|
+
* Read the catalog slice and the release-age keys back out of whatever a hook
|
|
19825
|
+
* returned, threading the prior config as the fallback.
|
|
19826
|
+
*
|
|
19827
|
+
* @remarks
|
|
19828
|
+
* Tolerant by design, matching this seam's discipline: a hook's returned *data*
|
|
19829
|
+
* is normalized, never a typed failure (only a load/replay *mechanism* failure
|
|
19830
|
+
* raises `CatalogAssemblyError`). A hook that omits a key, or returns a
|
|
19831
|
+
* malformed value for it, leaves the prior threaded value in place; a hook that
|
|
19832
|
+
* sets a well-formed key rewrites it — so across hooks the **last well-formed
|
|
19833
|
+
* write wins**, exactly as pnpm's single mutable config object behaves.
|
|
19834
|
+
*/
|
|
19649
19835
|
const configOf = (value, fallback) => {
|
|
19650
19836
|
if (!isObject$2(value)) return fallback;
|
|
19651
19837
|
return {
|
|
19652
19838
|
catalog: isObject$2(value.catalog) ? value.catalog : fallback.catalog,
|
|
19653
|
-
catalogs: isObject$2(value.catalogs) ? value.catalogs : fallback.catalogs
|
|
19839
|
+
catalogs: isObject$2(value.catalogs) ? value.catalogs : fallback.catalogs,
|
|
19840
|
+
minimumReleaseAge: finiteNumberOr(value.minimumReleaseAge, fallback.minimumReleaseAge),
|
|
19841
|
+
minimumReleaseAgeExclude: stringArrayOr(value.minimumReleaseAgeExclude, fallback.minimumReleaseAgeExclude)
|
|
19654
19842
|
};
|
|
19655
19843
|
};
|
|
19844
|
+
/**
|
|
19845
|
+
* Project the threaded config's release-age keys into a partial gate
|
|
19846
|
+
* contribution, omitting a key the hooks never set (never an explicit
|
|
19847
|
+
* `undefined` — the fields are `optionalKey`).
|
|
19848
|
+
*/
|
|
19849
|
+
const releaseAgeOf = (config) => ({
|
|
19850
|
+
...config.minimumReleaseAge !== void 0 ? { ageMinutes: config.minimumReleaseAge } : {},
|
|
19851
|
+
...config.minimumReleaseAgeExclude !== void 0 ? { exclude: config.minimumReleaseAgeExclude } : {}
|
|
19852
|
+
});
|
|
19656
19853
|
/** Fold the hook config back into the normalized `catalog name → dependency → range` record. */
|
|
19657
19854
|
const configToEntries = (config) => {
|
|
19658
19855
|
const raw = { ...config.catalogs };
|
|
@@ -19692,7 +19889,10 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends Context.Service(
|
|
|
19692
19889
|
* config dependency. The default {@link WorkspaceCatalogs} layer wires this, so
|
|
19693
19890
|
* the default catalog path provably executes no config-dependency code.
|
|
19694
19891
|
*/
|
|
19695
|
-
static layerNoop = Layer.succeed(ConfigDependencyHooks, { inject: (_root, _configDependencies, seed) => Effect.succeed(
|
|
19892
|
+
static layerNoop = Layer.succeed(ConfigDependencyHooks, { inject: (_root, _configDependencies, seed) => Effect.succeed({
|
|
19893
|
+
catalogs: seed,
|
|
19894
|
+
releaseAge: {}
|
|
19895
|
+
}) });
|
|
19696
19896
|
/**
|
|
19697
19897
|
* The live layer: dynamically imports each config dependency's `pnpmfile.cjs`
|
|
19698
19898
|
* (in process, no subprocess) and replays its `updateConfig` hook over the
|
|
@@ -19711,7 +19911,10 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends Context.Service(
|
|
|
19711
19911
|
*/
|
|
19712
19912
|
static layerLive = Layer.succeed(ConfigDependencyHooks, { inject: (root, configDependencies, seed) => Effect.gen(function* () {
|
|
19713
19913
|
const names = Object.keys(configDependencies);
|
|
19714
|
-
if (names.length === 0) return
|
|
19914
|
+
if (names.length === 0) return {
|
|
19915
|
+
catalogs: seed,
|
|
19916
|
+
releaseAge: {}
|
|
19917
|
+
};
|
|
19715
19918
|
let config = seedToConfig(seed);
|
|
19716
19919
|
for (const name of names) {
|
|
19717
19920
|
if (hasTraversalSegment(name)) return yield* Effect.fail(new CatalogAssemblyError({
|
|
@@ -19752,12 +19955,15 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends Context.Service(
|
|
|
19752
19955
|
})
|
|
19753
19956
|
});
|
|
19754
19957
|
}
|
|
19755
|
-
return
|
|
19958
|
+
return {
|
|
19959
|
+
catalogs: configToEntries(config),
|
|
19960
|
+
releaseAge: releaseAgeOf(config)
|
|
19961
|
+
};
|
|
19756
19962
|
}) });
|
|
19757
19963
|
};
|
|
19758
19964
|
|
|
19759
19965
|
//#endregion
|
|
19760
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19966
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/PackageManagerName.js
|
|
19761
19967
|
/**
|
|
19762
19968
|
* The four package managers this package understands.
|
|
19763
19969
|
*
|
|
@@ -20000,7 +20206,7 @@ var PackageManagerDetector = class PackageManagerDetector extends Context.Servic
|
|
|
20000
20206
|
};
|
|
20001
20207
|
|
|
20002
20208
|
//#endregion
|
|
20003
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20209
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/LockfileReader.js
|
|
20004
20210
|
/**
|
|
20005
20211
|
* Raised when the workspace's lockfile cannot be read off disk.
|
|
20006
20212
|
*
|
|
@@ -20111,7 +20317,7 @@ var LockfileReader = class LockfileReader extends Context.Service()("@effected/w
|
|
|
20111
20317
|
};
|
|
20112
20318
|
|
|
20113
20319
|
//#endregion
|
|
20114
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20320
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/Publishability.js
|
|
20115
20321
|
/** The public npm registry, used when `publishConfig.registry` says nothing. */
|
|
20116
20322
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
20117
20323
|
/**
|
|
@@ -20212,7 +20418,7 @@ var PublishabilityDetector = class PublishabilityDetector extends Context.Servic
|
|
|
20212
20418
|
};
|
|
20213
20419
|
|
|
20214
20420
|
//#endregion
|
|
20215
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20421
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceCatalogs.js
|
|
20216
20422
|
/**
|
|
20217
20423
|
* An immutable, fully-normalized catalog collection — the one catalog
|
|
20218
20424
|
* resolution semantic in the package.
|
|
@@ -20385,6 +20591,37 @@ const configDependenciesOf = (document) => {
|
|
|
20385
20591
|
for (const [name, spec] of Object.entries(document.configDependencies)) if (typeof spec === "string") out[name] = spec;
|
|
20386
20592
|
return out;
|
|
20387
20593
|
};
|
|
20594
|
+
/**
|
|
20595
|
+
* The inline release-age gate contribution of a parsed `pnpm-workspace.yaml`
|
|
20596
|
+
* document — pnpm's top-level `minimumReleaseAge` (minutes) and
|
|
20597
|
+
* `minimumReleaseAgeExclude` (name patterns) keys, mapped onto
|
|
20598
|
+
* `@effected/npm`'s `PartialReleaseAgeGate` field names
|
|
20599
|
+
* (`ageMinutes` / `exclude`).
|
|
20600
|
+
*
|
|
20601
|
+
* @remarks
|
|
20602
|
+
* **Hard-fail by design**, the same posture as the live catalog-block reader:
|
|
20603
|
+
* a present-but-malformed value (a non-numeric `minimumReleaseAge`, a
|
|
20604
|
+
* `minimumReleaseAgeExclude` that is not a string array) fails typed as a
|
|
20605
|
+
* `CatalogAssemblyError` rather than being silently dropped, because a
|
|
20606
|
+
* silently-ignored gate is the "install refuses a too-young version the
|
|
20607
|
+
* resolver already picked" bug this vocabulary exists to prevent. An absent or
|
|
20608
|
+
* explicitly `null` key contributes nothing; the permissive
|
|
20609
|
+
* `PartialReleaseAgeGate` accepts any finite `ageMinutes` (negatives and
|
|
20610
|
+
* fractions included) — `ReleaseAgeGate.combine` is the single clamping
|
|
20611
|
+
* authority, exactly as on the hook path.
|
|
20612
|
+
*/
|
|
20613
|
+
const inlineReleaseAge = (document) => {
|
|
20614
|
+
if (!isObject$1(document)) return Effect.succeed({});
|
|
20615
|
+
const raw = {};
|
|
20616
|
+
if (document.minimumReleaseAge !== void 0 && document.minimumReleaseAge !== null) raw.ageMinutes = document.minimumReleaseAge;
|
|
20617
|
+
if (document.minimumReleaseAgeExclude !== void 0 && document.minimumReleaseAgeExclude !== null) raw.exclude = document.minimumReleaseAgeExclude;
|
|
20618
|
+
if (Object.keys(raw).length === 0) return Effect.succeed({});
|
|
20619
|
+
return Schema.decodeUnknownEffect(PartialReleaseAgeGate)(raw).pipe(Effect.catchTag("SchemaError", (cause) => new CatalogAssemblyError({
|
|
20620
|
+
source: "manifest",
|
|
20621
|
+
path: "pnpm-workspace.yaml",
|
|
20622
|
+
cause
|
|
20623
|
+
})));
|
|
20624
|
+
};
|
|
20388
20625
|
/** A hard-fail catalog-assembly failure naming the malformed part of a `workspaces` field. */
|
|
20389
20626
|
const malformed = (source, path, detail) => new CatalogAssemblyError({
|
|
20390
20627
|
source,
|
|
@@ -20505,6 +20742,8 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
|
|
|
20505
20742
|
const hasPnpmWorkspace = yield* probeExists(workspaceYaml);
|
|
20506
20743
|
let inline;
|
|
20507
20744
|
let injected;
|
|
20745
|
+
let inlineGate = {};
|
|
20746
|
+
let hookGate = {};
|
|
20508
20747
|
if (hasPnpmWorkspace) {
|
|
20509
20748
|
const text = yield* fs.readFileString(workspaceYaml).pipe(Effect.mapError((cause) => new CatalogAssemblyError({
|
|
20510
20749
|
source: "manifest",
|
|
@@ -20518,11 +20757,16 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
|
|
|
20518
20757
|
})));
|
|
20519
20758
|
yield* validatePnpmWorkspaceCatalogs(document);
|
|
20520
20759
|
inline = CatalogSet.fromCatalogs(inlineCatalogs(catalogBlocksOf(document)));
|
|
20521
|
-
|
|
20522
|
-
|
|
20760
|
+
inlineGate = yield* inlineReleaseAge(document);
|
|
20761
|
+
const injection = yield* hooks.inject(root, configDependenciesOf(document), inline.entries);
|
|
20762
|
+
injected = CatalogSet.fromCatalogs(injection.catalogs);
|
|
20763
|
+
hookGate = injection.releaseAge;
|
|
20523
20764
|
} else {
|
|
20524
20765
|
const manifestPath = path.join(root, "package.json");
|
|
20525
|
-
if (!(yield* probeExists(manifestPath))) return
|
|
20766
|
+
if (!(yield* probeExists(manifestPath))) return {
|
|
20767
|
+
catalogs: fromLockfile,
|
|
20768
|
+
releaseAgeGate: ReleaseAgeGate.combine()
|
|
20769
|
+
};
|
|
20526
20770
|
const text = yield* fs.readFileString(manifestPath).pipe(Effect.mapError((cause) => new CatalogAssemblyError({
|
|
20527
20771
|
source: "manifest",
|
|
20528
20772
|
path: manifestPath,
|
|
@@ -20532,20 +20776,28 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
|
|
|
20532
20776
|
injected = CatalogSet.empty();
|
|
20533
20777
|
}
|
|
20534
20778
|
const assembled = CatalogSet.merge(fromLockfile, inline, injected);
|
|
20779
|
+
const releaseAgeGate = ReleaseAgeGate.combine(inlineGate, hookGate);
|
|
20535
20780
|
yield* Effect.logDebug("Catalogs assembled").pipe(Effect.annotateLogs({
|
|
20536
20781
|
"workspace.root": root,
|
|
20537
|
-
"workspace.catalogs": Object.keys(assembled.entries).join(",")
|
|
20782
|
+
"workspace.catalogs": Object.keys(assembled.entries).join(","),
|
|
20783
|
+
"workspace.releaseAgeMinutes": releaseAgeGate.ageMinutes
|
|
20538
20784
|
}));
|
|
20539
|
-
return
|
|
20785
|
+
return {
|
|
20786
|
+
catalogs: assembled,
|
|
20787
|
+
releaseAgeGate
|
|
20788
|
+
};
|
|
20540
20789
|
});
|
|
20541
20790
|
const [resolveOnce, invalidate] = yield* Effect.cachedInvalidateWithTTL(assemble, Duration.infinity);
|
|
20542
20791
|
const memo = Effect.onExit(resolveOnce, (exit) => Exit.isSuccess(exit) ? Effect.void : invalidate);
|
|
20543
20792
|
return {
|
|
20544
20793
|
set: Effect.fn("WorkspaceCatalogs.set")(function* () {
|
|
20545
|
-
return yield* memo;
|
|
20794
|
+
return (yield* memo).catalogs;
|
|
20546
20795
|
}),
|
|
20547
20796
|
resolveSpecifier: Effect.fn("WorkspaceCatalogs.resolveSpecifier")(function* (dependency, specifier) {
|
|
20548
|
-
return (yield* memo).resolveSpecifier(dependency, specifier);
|
|
20797
|
+
return (yield* memo).catalogs.resolveSpecifier(dependency, specifier);
|
|
20798
|
+
}),
|
|
20799
|
+
releaseAgeGate: Effect.fn("WorkspaceCatalogs.releaseAgeGate")(function* () {
|
|
20800
|
+
return (yield* memo).releaseAgeGate;
|
|
20549
20801
|
})
|
|
20550
20802
|
};
|
|
20551
20803
|
});
|
|
@@ -20597,7 +20849,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
|
|
|
20597
20849
|
};
|
|
20598
20850
|
|
|
20599
20851
|
//#endregion
|
|
20600
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20852
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
|
|
20601
20853
|
const EMPTY = Object.freeze(Object.create(null));
|
|
20602
20854
|
const DependencyMap = Schema.Record(Schema.String, Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed(EMPTY)), Schema.withConstructorDefault(Effect.succeed(EMPTY)));
|
|
20603
20855
|
/**
|
|
@@ -20763,7 +21015,7 @@ var WorkspaceStateSnapshot = class extends Schema.Class("WorkspaceStateSnapshot"
|
|
|
20763
21015
|
};
|
|
20764
21016
|
|
|
20765
21017
|
//#endregion
|
|
20766
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
21018
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceSnapshots.js
|
|
20767
21019
|
/** Whether `value` is a non-null, non-array object. */
|
|
20768
21020
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20769
21021
|
/** Whether every value in a record is a string — a usable dependency map. */
|
|
@@ -20956,7 +21208,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
|
|
|
20956
21208
|
};
|
|
20957
21209
|
|
|
20958
21210
|
//#endregion
|
|
20959
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
21211
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.6.0_@effected+jsonc@0.5.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/Workspaces.js
|
|
20960
21212
|
/**
|
|
20961
21213
|
* Every service that needs only a filesystem: root, package-manager detection,
|
|
20962
21214
|
* discovery, lockfile reading, catalogs and publishability.
|