@savvy-web/silk 3.0.5 → 3.0.6
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
|
@@ -2357,7 +2357,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
|
|
|
2357
2357
|
}
|
|
2358
2358
|
};
|
|
2359
2359
|
//#endregion
|
|
2360
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
2360
|
+
//#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
|
|
2361
2361
|
/**
|
|
2362
2362
|
* Extension data specific to bun lockfiles, attached to `Lockfile.extension`
|
|
2363
2363
|
* when the format is `"bun"`.
|
|
@@ -2378,7 +2378,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
|
|
|
2378
2378
|
trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
|
|
2379
2379
|
}) {};
|
|
2380
2380
|
//#endregion
|
|
2381
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2381
|
+
//#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
|
|
2382
2382
|
/**
|
|
2383
2383
|
* Contract for resolving pnpm `catalog:` dependency specifiers to concrete
|
|
2384
2384
|
* version ranges.
|
|
@@ -2424,7 +2424,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
|
|
|
2424
2424
|
static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2425
2425
|
};
|
|
2426
2426
|
//#endregion
|
|
2427
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2427
|
+
//#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
|
|
2428
2428
|
/**
|
|
2429
2429
|
* Raised when a `catalog:` or `workspace:` specifier cannot be resolved
|
|
2430
2430
|
* because the resolution mechanism itself failed — not for an ordinary
|
|
@@ -2485,7 +2485,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
|
|
|
2485
2485
|
static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2486
2486
|
};
|
|
2487
2487
|
//#endregion
|
|
2488
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2488
|
+
//#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
|
|
2489
2489
|
/**
|
|
2490
2490
|
* Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
|
|
2491
2491
|
* that is unreadable or not valid YAML, a root `package.json` `workspaces` field
|
|
@@ -2529,7 +2529,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
|
|
|
2529
2529
|
}
|
|
2530
2530
|
};
|
|
2531
2531
|
//#endregion
|
|
2532
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2532
|
+
//#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
|
|
2533
2533
|
/**
|
|
2534
2534
|
* The short dependency kind: which dependency map an entry came from, named the
|
|
2535
2535
|
* way consumers branch on it.
|
|
@@ -4030,7 +4030,7 @@ const isComparatorSetSubset = (sub, sup) => {
|
|
|
4030
4030
|
return true;
|
|
4031
4031
|
};
|
|
4032
4032
|
//#endregion
|
|
4033
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4033
|
+
//#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
|
|
4034
4034
|
/**
|
|
4035
4035
|
* Indicates that a string could not be parsed as a valid dependency specifier.
|
|
4036
4036
|
*
|
|
@@ -4237,7 +4237,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
|
|
|
4237
4237
|
FromString: fromString
|
|
4238
4238
|
});
|
|
4239
4239
|
//#endregion
|
|
4240
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4240
|
+
//#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
|
|
4241
4241
|
const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
|
|
4242
4242
|
const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
|
|
4243
4243
|
const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
|
|
@@ -4290,7 +4290,175 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
|
|
|
4290
4290
|
decode: decode$2
|
|
4291
4291
|
});
|
|
4292
4292
|
//#endregion
|
|
4293
|
-
//#region ../../node_modules/.pnpm/@effected+
|
|
4293
|
+
//#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
|
|
4294
|
+
const MS_PER_MINUTE = 6e4;
|
|
4295
|
+
/**
|
|
4296
|
+
* A source's partial contribution to a {@link ReleaseAgeGate}: the effective
|
|
4297
|
+
* gate is assembled from more than one place (inline `pnpm-workspace.yaml`
|
|
4298
|
+
* keys, replayed `updateConfig` hooks, `pnpm config get` output), and each
|
|
4299
|
+
* source may set the age, the exclude list, both, or neither. Absent fields
|
|
4300
|
+
* contribute nothing to the combination.
|
|
4301
|
+
*
|
|
4302
|
+
* Deliberately permissive: unlike {@link ReleaseAgeGate} it does not constrain
|
|
4303
|
+
* `ageMinutes` to be non-negative, because the raw values arrive from arbitrary
|
|
4304
|
+
* config sources and {@link ReleaseAgeGate.combine} is the single authority
|
|
4305
|
+
* that clamps them.
|
|
4306
|
+
*
|
|
4307
|
+
* @public
|
|
4308
|
+
*/
|
|
4309
|
+
const PartialReleaseAgeGate = effect.Schema.Struct({
|
|
4310
|
+
/** Minutes a release must age; absent means this source sets no age. */
|
|
4311
|
+
ageMinutes: effect.Schema.optionalKey(effect.Schema.Number),
|
|
4312
|
+
/** Exempt package-name patterns; absent means this source adds no exemptions. */
|
|
4313
|
+
exclude: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
|
|
4314
|
+
});
|
|
4315
|
+
const AgeMinutes = effect.Schema.Number.check(effect.Schema.isGreaterThanOrEqualTo(0), effect.Schema.isFinite());
|
|
4316
|
+
const matchesPattern = (name, pattern) => {
|
|
4317
|
+
if (pattern === name) return true;
|
|
4318
|
+
if (!pattern.includes("*")) return false;
|
|
4319
|
+
let nameIndex = 0;
|
|
4320
|
+
let patternIndex = 0;
|
|
4321
|
+
let starIndex = -1;
|
|
4322
|
+
let retryNameIndex = 0;
|
|
4323
|
+
while (nameIndex < name.length) if (pattern[patternIndex] === "*") {
|
|
4324
|
+
starIndex = patternIndex;
|
|
4325
|
+
patternIndex += 1;
|
|
4326
|
+
retryNameIndex = nameIndex;
|
|
4327
|
+
} else if (pattern[patternIndex] === name[nameIndex]) {
|
|
4328
|
+
patternIndex += 1;
|
|
4329
|
+
nameIndex += 1;
|
|
4330
|
+
} else if (starIndex !== -1) {
|
|
4331
|
+
patternIndex = starIndex + 1;
|
|
4332
|
+
retryNameIndex += 1;
|
|
4333
|
+
nameIndex = retryNameIndex;
|
|
4334
|
+
} else return false;
|
|
4335
|
+
while (pattern[patternIndex] === "*") patternIndex += 1;
|
|
4336
|
+
return patternIndex === pattern.length;
|
|
4337
|
+
};
|
|
4338
|
+
const matchesExclude = (name, patterns) => patterns.some((pattern) => matchesPattern(name, pattern));
|
|
4339
|
+
/**
|
|
4340
|
+
* pnpm's publish-time release-age gate: the number of minutes a published
|
|
4341
|
+
* version must age before it is eligible, and the set of package-name patterns
|
|
4342
|
+
* exempt from the gate. Mirrors pnpm's `minimumReleaseAge` /
|
|
4343
|
+
* `minimumReleaseAgeExclude` config so a resolver can drop too-young candidate
|
|
4344
|
+
* versions before picking, avoiding `ERR_PNPM_NO_MATURE_MATCHING_VERSION`.
|
|
4345
|
+
*
|
|
4346
|
+
* `ageMinutes` is constrained non-negative and finite; a `ReleaseAgeGate` with
|
|
4347
|
+
* `ageMinutes <= 0` is an inert gate that filters nothing. Assemble a gate from
|
|
4348
|
+
* multiple config sources with {@link ReleaseAgeGate.combine}, and apply it to
|
|
4349
|
+
* a package's candidate versions with {@link ReleaseAgeGate.filterVersions}.
|
|
4350
|
+
*
|
|
4351
|
+
* @example
|
|
4352
|
+
* ```ts
|
|
4353
|
+
* import { ReleaseAgeGate } from "@effected/npm";
|
|
4354
|
+
*
|
|
4355
|
+
* const gate = ReleaseAgeGate.combine(
|
|
4356
|
+
* { ageMinutes: 1440 },
|
|
4357
|
+
* { exclude: ["@my-scope/*"] },
|
|
4358
|
+
* );
|
|
4359
|
+
* // gate.ageMinutes === 1440, gate.exclude === ["@my-scope/*"]
|
|
4360
|
+
*
|
|
4361
|
+
* const eligible = gate.filterVersions(
|
|
4362
|
+
* ["1.0.0", "1.0.1"],
|
|
4363
|
+
* { "1.0.0": "2020-01-01T00:00:00Z", "1.0.1": "2026-07-21T00:00:00Z" },
|
|
4364
|
+
* "prettier",
|
|
4365
|
+
* Date.now(),
|
|
4366
|
+
* );
|
|
4367
|
+
* ```
|
|
4368
|
+
*
|
|
4369
|
+
* @public
|
|
4370
|
+
*/
|
|
4371
|
+
var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAgeGate")({
|
|
4372
|
+
/** Minutes a published version must age before it is eligible (non-negative, finite). */
|
|
4373
|
+
ageMinutes: AgeMinutes,
|
|
4374
|
+
/** Package-name patterns exempt from the gate (exact names or `*`-globs). */
|
|
4375
|
+
exclude: effect.Schema.Array(effect.Schema.String)
|
|
4376
|
+
}) {
|
|
4377
|
+
/**
|
|
4378
|
+
* Combine partial contributions from multiple sources into one effective
|
|
4379
|
+
* gate: **strictest age wins** (the maximum of the contributed ages,
|
|
4380
|
+
* clamped to be non-negative) and the exclude sets **union** (deduplicated,
|
|
4381
|
+
* insertion order preserved). A contribution's absent field adds nothing; a
|
|
4382
|
+
* negative or non-finite contributed age is ignored by the clamp. With no
|
|
4383
|
+
* contributions (or only empty ones) the result is the inert zero gate
|
|
4384
|
+
* (`ageMinutes: 0`, `exclude: []`).
|
|
4385
|
+
*
|
|
4386
|
+
* `combine` is total — it never throws on a fractional, negative, or
|
|
4387
|
+
* non-finite contribution — which is why {@link (PartialReleaseAgeGate:variable)}
|
|
4388
|
+
* does not constrain its `ageMinutes` and this method owns the clamp.
|
|
4389
|
+
*
|
|
4390
|
+
* @param contributions - the partial gates to merge, one per source.
|
|
4391
|
+
*/
|
|
4392
|
+
static combine(...contributions) {
|
|
4393
|
+
const ages = contributions.map((contribution) => contribution.ageMinutes).filter((age) => typeof age === "number" && Number.isFinite(age));
|
|
4394
|
+
const ageMinutes = ages.length > 0 ? Math.max(0, ...ages) : 0;
|
|
4395
|
+
const exclude = [...new Set(contributions.flatMap((contribution) => contribution.exclude ?? []))];
|
|
4396
|
+
return ReleaseAgeGate.make({
|
|
4397
|
+
ageMinutes,
|
|
4398
|
+
exclude
|
|
4399
|
+
});
|
|
4400
|
+
}
|
|
4401
|
+
/**
|
|
4402
|
+
* Whether a package name matches any of `patterns`, using pnpm's
|
|
4403
|
+
* `@pnpm/matcher` semantics: an exact-name match, or a `*`-glob where `*`
|
|
4404
|
+
* matches any run of characters **including `/`** — so a bare `*` matches a
|
|
4405
|
+
* scoped name like `@scope/pkg`, and `@scope/*` matches every package in a
|
|
4406
|
+
* scope.
|
|
4407
|
+
*
|
|
4408
|
+
* @remarks
|
|
4409
|
+
* This is deliberately **NOT** `@effected/glob`'s minimatch dialect, in
|
|
4410
|
+
* which `*` refuses to cross `/` (there `*` matches `pkg` but not
|
|
4411
|
+
* `@scope/pkg`, and you would need `**`). pnpm treats the package name as a
|
|
4412
|
+
* flat string, so this matcher does too. Do not "fix" this to route through
|
|
4413
|
+
* `@effected/glob`: it would silently change which packages a gate exempts
|
|
4414
|
+
* and diverge from pnpm's own behavior.
|
|
4415
|
+
*
|
|
4416
|
+
* @param name - the package name to test.
|
|
4417
|
+
* @param patterns - the exclude patterns (exact names or `*`-globs).
|
|
4418
|
+
*/
|
|
4419
|
+
static matchesExclude(name, patterns) {
|
|
4420
|
+
return matchesExclude(name, patterns);
|
|
4421
|
+
}
|
|
4422
|
+
/**
|
|
4423
|
+
* Whether this gate exempts the given package name from the release-age
|
|
4424
|
+
* check — `ReleaseAgeGate.matchesExclude(name, this.exclude)`.
|
|
4425
|
+
*
|
|
4426
|
+
* @param name - the package name to test.
|
|
4427
|
+
*/
|
|
4428
|
+
isExcluded(name) {
|
|
4429
|
+
return matchesExclude(name, this.exclude);
|
|
4430
|
+
}
|
|
4431
|
+
/**
|
|
4432
|
+
* Filter a package's candidate versions to those old enough to pass the
|
|
4433
|
+
* gate, given each version's publish timestamp and a caller-supplied `now`.
|
|
4434
|
+
*
|
|
4435
|
+
* A version is kept when it has a parseable publish timestamp at or before
|
|
4436
|
+
* the cutoff (`now - ageMinutes * 60000`). A version with a **missing or
|
|
4437
|
+
* unparseable** timestamp in `times` is **dropped** — matching pnpm's strict
|
|
4438
|
+
* posture: a version whose age cannot be established is treated as too young.
|
|
4439
|
+
* The clock is the caller's; this method reads no wall clock.
|
|
4440
|
+
*
|
|
4441
|
+
* Returns all versions unchanged (a no-op) when the gate is inert
|
|
4442
|
+
* (`ageMinutes <= 0`) or the package name is excluded.
|
|
4443
|
+
*
|
|
4444
|
+
* @param versions - the candidate version strings.
|
|
4445
|
+
* @param times - a map from version string to its ISO-8601 publish date.
|
|
4446
|
+
* @param name - the package name (checked against the gate's `exclude` list).
|
|
4447
|
+
* @param now - the current time in epoch milliseconds (the caller's clock).
|
|
4448
|
+
*/
|
|
4449
|
+
filterVersions(versions, times, name, now) {
|
|
4450
|
+
if (this.ageMinutes <= 0 || this.isExcluded(name)) return versions;
|
|
4451
|
+
const cutoff = now - this.ageMinutes * MS_PER_MINUTE;
|
|
4452
|
+
return versions.filter((version) => {
|
|
4453
|
+
const time = times[version];
|
|
4454
|
+
if (time === void 0) return false;
|
|
4455
|
+
const published = Date.parse(time);
|
|
4456
|
+
return Number.isFinite(published) && published <= cutoff;
|
|
4457
|
+
});
|
|
4458
|
+
}
|
|
4459
|
+
};
|
|
4460
|
+
//#endregion
|
|
4461
|
+
//#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
|
|
4294
4462
|
/**
|
|
4295
4463
|
* One declared dependency of one workspace importer, as the lockfile records it.
|
|
4296
4464
|
*
|
|
@@ -4318,7 +4486,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
|
|
|
4318
4486
|
depType: DependencyField
|
|
4319
4487
|
}) {};
|
|
4320
4488
|
//#endregion
|
|
4321
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4489
|
+
//#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
|
|
4322
4490
|
/**
|
|
4323
4491
|
* One workspace importer's declared dependencies, as the lockfile records them.
|
|
4324
4492
|
*
|
|
@@ -4342,7 +4510,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
|
|
|
4342
4510
|
dependencies: effect.Schema.Array(ImporterDependency)
|
|
4343
4511
|
}) {};
|
|
4344
4512
|
//#endregion
|
|
4345
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4513
|
+
//#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
|
|
4346
4514
|
const EMPTY_DEPENDENCIES = {};
|
|
4347
4515
|
/**
|
|
4348
4516
|
* A package resolved from a lockfile.
|
|
@@ -4377,7 +4545,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
|
|
|
4377
4545
|
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)))
|
|
4378
4546
|
}) {};
|
|
4379
4547
|
//#endregion
|
|
4380
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4548
|
+
//#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
|
|
4381
4549
|
/**
|
|
4382
4550
|
* A directed dependency edge between two workspace packages as recorded in
|
|
4383
4551
|
* the lockfile.
|
|
@@ -4399,7 +4567,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
|
|
|
4399
4567
|
constraint: effect.Schema.String
|
|
4400
4568
|
}) {};
|
|
4401
4569
|
//#endregion
|
|
4402
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4570
|
+
//#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
|
|
4403
4571
|
/**
|
|
4404
4572
|
* Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
|
|
4405
4573
|
* when the format is `"pnpm"`.
|
|
@@ -4424,7 +4592,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
|
|
|
4424
4592
|
}))
|
|
4425
4593
|
}) {};
|
|
4426
4594
|
//#endregion
|
|
4427
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4595
|
+
//#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
|
|
4428
4596
|
/**
|
|
4429
4597
|
* The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
|
|
4430
4598
|
* `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
|
|
@@ -4458,7 +4626,7 @@ const FILENAMES = {
|
|
|
4458
4626
|
*/
|
|
4459
4627
|
const filenameFor = (format) => FILENAMES[format];
|
|
4460
4628
|
//#endregion
|
|
4461
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4629
|
+
//#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
|
|
4462
4630
|
/**
|
|
4463
4631
|
* The four dependency sections of a manifest, in a stable order — the shared
|
|
4464
4632
|
* dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
|
|
@@ -6357,7 +6525,7 @@ var JsoncModifier = class {
|
|
|
6357
6525
|
});
|
|
6358
6526
|
};
|
|
6359
6527
|
//#endregion
|
|
6360
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
6528
|
+
//#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
|
|
6361
6529
|
const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
6362
6530
|
const BunWorkspaceEntry = effect.Schema.Struct({
|
|
6363
6531
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -6450,7 +6618,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
|
|
|
6450
6618
|
};
|
|
6451
6619
|
});
|
|
6452
6620
|
//#endregion
|
|
6453
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
6621
|
+
//#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
|
|
6454
6622
|
const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
6455
6623
|
const NpmPackageEntry = effect.Schema.Struct({
|
|
6456
6624
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -13372,7 +13540,7 @@ function deepEqualValues(a, b) {
|
|
|
13372
13540
|
return false;
|
|
13373
13541
|
}
|
|
13374
13542
|
//#endregion
|
|
13375
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13543
|
+
//#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
|
|
13376
13544
|
/**
|
|
13377
13545
|
* An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
|
|
13378
13546
|
* and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
|
|
@@ -13442,7 +13610,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
|
|
|
13442
13610
|
};
|
|
13443
13611
|
});
|
|
13444
13612
|
//#endregion
|
|
13445
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13613
|
+
//#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
|
|
13446
13614
|
const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
|
|
13447
13615
|
specifier: effect.Schema.String,
|
|
13448
13616
|
version: effect.Schema.String
|
|
@@ -13568,7 +13736,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
|
|
|
13568
13736
|
};
|
|
13569
13737
|
});
|
|
13570
13738
|
//#endregion
|
|
13571
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13739
|
+
//#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
|
|
13572
13740
|
const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
|
|
13573
13741
|
const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
13574
13742
|
const YarnEntry = effect.Schema.Struct({
|
|
@@ -13691,7 +13859,7 @@ const cleanYarnDeps = (deps) => {
|
|
|
13691
13859
|
return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
|
|
13692
13860
|
};
|
|
13693
13861
|
//#endregion
|
|
13694
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13862
|
+
//#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
|
|
13695
13863
|
const EMPTY_IMPORTERS = [];
|
|
13696
13864
|
/**
|
|
13697
13865
|
* Failure of `Lockfile.parse`: the given content is not a valid lockfile of
|
|
@@ -13935,7 +14103,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
|
|
|
13935
14103
|
}
|
|
13936
14104
|
};
|
|
13937
14105
|
//#endregion
|
|
13938
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
14106
|
+
//#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
|
|
13939
14107
|
/**
|
|
13940
14108
|
* The minimal manifest shape {@link LockfileIntegrity.compare} checks a
|
|
13941
14109
|
* lockfile against: a package name plus the four optional dependency maps.
|
|
@@ -14051,7 +14219,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
|
|
|
14051
14219
|
}
|
|
14052
14220
|
};
|
|
14053
14221
|
//#endregion
|
|
14054
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
14222
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/Dependency.js
|
|
14055
14223
|
/**
|
|
14056
14224
|
* A resolved dependency entry pairing a package name with its version
|
|
14057
14225
|
* specifier and the `kind` of map it came from (`@effected/npm`'s
|
|
@@ -14115,7 +14283,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
|
|
|
14115
14283
|
}
|
|
14116
14284
|
};
|
|
14117
14285
|
//#endregion
|
|
14118
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
14286
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/DevEngines.js
|
|
14119
14287
|
/**
|
|
14120
14288
|
* A single `devEngines` constraint with a name and optional `version` / `onFail`.
|
|
14121
14289
|
*
|
|
@@ -15140,7 +15308,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15140
15308
|
};
|
|
15141
15309
|
}));
|
|
15142
15310
|
//#endregion
|
|
15143
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15311
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/License.js
|
|
15144
15312
|
var import_spdx_expression_parse = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15145
15313
|
var scan = require_scan$1();
|
|
15146
15314
|
var parse = require_parse$2();
|
|
@@ -15187,7 +15355,7 @@ const isValidSpdx = (value) => {
|
|
|
15187
15355
|
*/
|
|
15188
15356
|
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"));
|
|
15189
15357
|
//#endregion
|
|
15190
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15358
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageManager.js
|
|
15191
15359
|
const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
|
|
15192
15360
|
/**
|
|
15193
15361
|
* The `packageManager` field only ever carries corepack's `<algo>.<hex>`
|
|
@@ -15245,7 +15413,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
|
|
|
15245
15413
|
}
|
|
15246
15414
|
};
|
|
15247
15415
|
//#endregion
|
|
15248
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15416
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageName.js
|
|
15249
15417
|
/**
|
|
15250
15418
|
* Indicates that a string could not be used as a valid npm package name.
|
|
15251
15419
|
*
|
|
@@ -15303,7 +15471,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
|
|
|
15303
15471
|
isScoped
|
|
15304
15472
|
});
|
|
15305
15473
|
//#endregion
|
|
15306
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15474
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/Person.js
|
|
15307
15475
|
const parsePersonString = (input) => {
|
|
15308
15476
|
const emailMatch = input.match(/<([^>]+)>/);
|
|
15309
15477
|
const urlMatch = input.match(/\(([^)]+)\)/);
|
|
@@ -15446,7 +15614,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
|
|
|
15446
15614
|
}
|
|
15447
15615
|
};
|
|
15448
15616
|
//#endregion
|
|
15449
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15617
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/internal/format.js
|
|
15450
15618
|
const KEY_INDEX = new Map([
|
|
15451
15619
|
"$schema",
|
|
15452
15620
|
"name",
|
|
@@ -15669,7 +15837,7 @@ const renderJson = (raw, options) => {
|
|
|
15669
15837
|
return options.newline ? `${json}\n` : json;
|
|
15670
15838
|
};
|
|
15671
15839
|
//#endregion
|
|
15672
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15840
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/Package.js
|
|
15673
15841
|
const toHashMap = effect.SchemaTransformation.transform({
|
|
15674
15842
|
decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
|
|
15675
15843
|
encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
|
|
@@ -15987,7 +16155,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
|
|
|
15987
16155
|
}
|
|
15988
16156
|
};
|
|
15989
16157
|
//#endregion
|
|
15990
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16158
|
+
//#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
|
|
15991
16159
|
const EMPTY$1 = Object.freeze(Object.create(null));
|
|
15992
16160
|
const EMPTY_MANIFEST = Object.freeze(Object.create(null));
|
|
15993
16161
|
/**
|
|
@@ -16592,7 +16760,7 @@ const Walker$1 = {
|
|
|
16592
16760
|
findRoot: findRoot$1
|
|
16593
16761
|
};
|
|
16594
16762
|
//#endregion
|
|
16595
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16763
|
+
//#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
|
|
16596
16764
|
/**
|
|
16597
16765
|
* The marker filenames {@link WorkspaceRoot} probes for, in priority order.
|
|
16598
16766
|
*
|
|
@@ -16779,7 +16947,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
|
|
|
16779
16947
|
static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
|
|
16780
16948
|
};
|
|
16781
16949
|
//#endregion
|
|
16782
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16950
|
+
//#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
|
|
16783
16951
|
/**
|
|
16784
16952
|
* Hard ceiling on directories the enumerator will visit for one pattern set.
|
|
16785
16953
|
* Guards the pathological case a depth cap alone does not: a wide, shallow
|
|
@@ -16797,7 +16965,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
|
|
|
16797
16965
|
*/
|
|
16798
16966
|
const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
16799
16967
|
//#endregion
|
|
16800
|
-
//#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/internal/traverse.js
|
|
16801
16969
|
/** Directory names never descended into. */
|
|
16802
16970
|
const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
|
|
16803
16971
|
/** Join root-relative POSIX segments; `""` is the root itself. */
|
|
@@ -16887,7 +17055,7 @@ var Traversal = class {
|
|
|
16887
17055
|
}
|
|
16888
17056
|
};
|
|
16889
17057
|
//#endregion
|
|
16890
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17058
|
+
//#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
|
|
16891
17059
|
/** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
|
|
16892
17060
|
const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
|
|
16893
17061
|
/**
|
|
@@ -16957,7 +17125,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
|
|
|
16957
17125
|
return results;
|
|
16958
17126
|
});
|
|
16959
17127
|
//#endregion
|
|
16960
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17128
|
+
//#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
|
|
16961
17129
|
const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
|
|
16962
17130
|
/** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
|
|
16963
17131
|
const pnpmPatternsOf = (document) => {
|
|
@@ -17014,7 +17182,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
|
|
|
17014
17182
|
return manifestPatternsOf(manifest);
|
|
17015
17183
|
});
|
|
17016
17184
|
//#endregion
|
|
17017
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17185
|
+
//#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
|
|
17018
17186
|
/**
|
|
17019
17187
|
* Raised when a workspace member's `package.json` cannot be read, parsed, or
|
|
17020
17188
|
* used — it is missing, malformed, or lacks a `name` or `version`.
|
|
@@ -17448,7 +17616,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
|
|
|
17448
17616
|
};
|
|
17449
17617
|
const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
|
|
17450
17618
|
//#endregion
|
|
17451
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17619
|
+
//#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
|
|
17452
17620
|
/**
|
|
17453
17621
|
* Raised when the workspace dependency graph cannot be topologically ordered
|
|
17454
17622
|
* because it contains a cycle.
|
|
@@ -19046,7 +19214,7 @@ var Git = class extends effect.Context.Service()("@effected/git/Git") {
|
|
|
19046
19214
|
}));
|
|
19047
19215
|
};
|
|
19048
19216
|
//#endregion
|
|
19049
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19217
|
+
//#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
|
|
19050
19218
|
/**
|
|
19051
19219
|
* Which git refs to compare, and whether to fold in the working tree.
|
|
19052
19220
|
*
|
|
@@ -19298,7 +19466,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
|
|
|
19298
19466
|
};
|
|
19299
19467
|
}
|
|
19300
19468
|
//#endregion
|
|
19301
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19469
|
+
//#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
|
|
19302
19470
|
/** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
|
|
19303
19471
|
const inlineCatalogs = (manifest) => {
|
|
19304
19472
|
if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
|
|
@@ -19362,7 +19530,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
|
|
|
19362
19530
|
});
|
|
19363
19531
|
};
|
|
19364
19532
|
//#endregion
|
|
19365
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19533
|
+
//#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
|
|
19366
19534
|
/** Whether `value` is a non-null, non-array object. */
|
|
19367
19535
|
const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19368
19536
|
/**
|
|
@@ -19397,17 +19565,45 @@ const seedToConfig = (seed) => {
|
|
|
19397
19565
|
else catalogs[name] = { ...entries };
|
|
19398
19566
|
return {
|
|
19399
19567
|
catalog,
|
|
19400
|
-
catalogs
|
|
19568
|
+
catalogs,
|
|
19569
|
+
minimumReleaseAge: void 0,
|
|
19570
|
+
minimumReleaseAgeExclude: void 0
|
|
19401
19571
|
};
|
|
19402
19572
|
};
|
|
19403
|
-
/**
|
|
19573
|
+
/** A finite number if `value` is one, else the prior threaded value — a garbage age is dropped, not fatal. */
|
|
19574
|
+
const finiteNumberOr = (value, fallback) => typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
|
19575
|
+
/** A string array if `value` is one, else the prior threaded value — a malformed exclude is dropped, not fatal. */
|
|
19576
|
+
const stringArrayOr = (value, fallback) => Array.isArray(value) && value.every((entry) => typeof entry === "string") ? value : fallback;
|
|
19577
|
+
/**
|
|
19578
|
+
* Read the catalog slice and the release-age keys back out of whatever a hook
|
|
19579
|
+
* returned, threading the prior config as the fallback.
|
|
19580
|
+
*
|
|
19581
|
+
* @remarks
|
|
19582
|
+
* Tolerant by design, matching this seam's discipline: a hook's returned *data*
|
|
19583
|
+
* is normalized, never a typed failure (only a load/replay *mechanism* failure
|
|
19584
|
+
* raises `CatalogAssemblyError`). A hook that omits a key, or returns a
|
|
19585
|
+
* malformed value for it, leaves the prior threaded value in place; a hook that
|
|
19586
|
+
* sets a well-formed key rewrites it — so across hooks the **last well-formed
|
|
19587
|
+
* write wins**, exactly as pnpm's single mutable config object behaves.
|
|
19588
|
+
*/
|
|
19404
19589
|
const configOf = (value, fallback) => {
|
|
19405
19590
|
if (!isObject$2(value)) return fallback;
|
|
19406
19591
|
return {
|
|
19407
19592
|
catalog: isObject$2(value.catalog) ? value.catalog : fallback.catalog,
|
|
19408
|
-
catalogs: isObject$2(value.catalogs) ? value.catalogs : fallback.catalogs
|
|
19593
|
+
catalogs: isObject$2(value.catalogs) ? value.catalogs : fallback.catalogs,
|
|
19594
|
+
minimumReleaseAge: finiteNumberOr(value.minimumReleaseAge, fallback.minimumReleaseAge),
|
|
19595
|
+
minimumReleaseAgeExclude: stringArrayOr(value.minimumReleaseAgeExclude, fallback.minimumReleaseAgeExclude)
|
|
19409
19596
|
};
|
|
19410
19597
|
};
|
|
19598
|
+
/**
|
|
19599
|
+
* Project the threaded config's release-age keys into a partial gate
|
|
19600
|
+
* contribution, omitting a key the hooks never set (never an explicit
|
|
19601
|
+
* `undefined` — the fields are `optionalKey`).
|
|
19602
|
+
*/
|
|
19603
|
+
const releaseAgeOf = (config) => ({
|
|
19604
|
+
...config.minimumReleaseAge !== void 0 ? { ageMinutes: config.minimumReleaseAge } : {},
|
|
19605
|
+
...config.minimumReleaseAgeExclude !== void 0 ? { exclude: config.minimumReleaseAgeExclude } : {}
|
|
19606
|
+
});
|
|
19411
19607
|
/** Fold the hook config back into the normalized `catalog name → dependency → range` record. */
|
|
19412
19608
|
const configToEntries = (config) => {
|
|
19413
19609
|
const raw = { ...config.catalogs };
|
|
@@ -19447,7 +19643,10 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
19447
19643
|
* config dependency. The default {@link WorkspaceCatalogs} layer wires this, so
|
|
19448
19644
|
* the default catalog path provably executes no config-dependency code.
|
|
19449
19645
|
*/
|
|
19450
|
-
static layerNoop = effect.Layer.succeed(ConfigDependencyHooks, { inject: (_root, _configDependencies, seed) => effect.Effect.succeed(
|
|
19646
|
+
static layerNoop = effect.Layer.succeed(ConfigDependencyHooks, { inject: (_root, _configDependencies, seed) => effect.Effect.succeed({
|
|
19647
|
+
catalogs: seed,
|
|
19648
|
+
releaseAge: {}
|
|
19649
|
+
}) });
|
|
19451
19650
|
/**
|
|
19452
19651
|
* The live layer: dynamically imports each config dependency's `pnpmfile.cjs`
|
|
19453
19652
|
* (in process, no subprocess) and replays its `updateConfig` hook over the
|
|
@@ -19466,7 +19665,10 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
19466
19665
|
*/
|
|
19467
19666
|
static layerLive = effect.Layer.succeed(ConfigDependencyHooks, { inject: (root, configDependencies, seed) => effect.Effect.gen(function* () {
|
|
19468
19667
|
const names = Object.keys(configDependencies);
|
|
19469
|
-
if (names.length === 0) return
|
|
19668
|
+
if (names.length === 0) return {
|
|
19669
|
+
catalogs: seed,
|
|
19670
|
+
releaseAge: {}
|
|
19671
|
+
};
|
|
19470
19672
|
let config = seedToConfig(seed);
|
|
19471
19673
|
for (const name of names) {
|
|
19472
19674
|
if (hasTraversalSegment(name)) return yield* effect.Effect.fail(new CatalogAssemblyError({
|
|
@@ -19507,11 +19709,14 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
19507
19709
|
})
|
|
19508
19710
|
});
|
|
19509
19711
|
}
|
|
19510
|
-
return
|
|
19712
|
+
return {
|
|
19713
|
+
catalogs: configToEntries(config),
|
|
19714
|
+
releaseAge: releaseAgeOf(config)
|
|
19715
|
+
};
|
|
19511
19716
|
}) });
|
|
19512
19717
|
};
|
|
19513
19718
|
//#endregion
|
|
19514
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19719
|
+
//#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
|
|
19515
19720
|
/**
|
|
19516
19721
|
* The four package managers this package understands.
|
|
19517
19722
|
*
|
|
@@ -19753,7 +19958,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
|
|
|
19753
19958
|
static layer = effect.Layer.effect(PackageManagerDetector, PackageManagerDetector.make);
|
|
19754
19959
|
};
|
|
19755
19960
|
//#endregion
|
|
19756
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19961
|
+
//#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
|
|
19757
19962
|
/**
|
|
19758
19963
|
* Raised when the workspace's lockfile cannot be read off disk.
|
|
19759
19964
|
*
|
|
@@ -19863,7 +20068,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
|
|
|
19863
20068
|
static layer = (options) => effect.Layer.effect(LockfileReader, LockfileReader.make(options));
|
|
19864
20069
|
};
|
|
19865
20070
|
//#endregion
|
|
19866
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20071
|
+
//#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
|
|
19867
20072
|
/** The public npm registry, used when `publishConfig.registry` says nothing. */
|
|
19868
20073
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
19869
20074
|
/**
|
|
@@ -19963,7 +20168,7 @@ var PublishabilityDetector = class PublishabilityDetector extends effect.Context
|
|
|
19963
20168
|
}) });
|
|
19964
20169
|
};
|
|
19965
20170
|
//#endregion
|
|
19966
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20171
|
+
//#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
|
|
19967
20172
|
/**
|
|
19968
20173
|
* An immutable, fully-normalized catalog collection — the one catalog
|
|
19969
20174
|
* resolution semantic in the package.
|
|
@@ -20136,6 +20341,37 @@ const configDependenciesOf = (document) => {
|
|
|
20136
20341
|
for (const [name, spec] of Object.entries(document.configDependencies)) if (typeof spec === "string") out[name] = spec;
|
|
20137
20342
|
return out;
|
|
20138
20343
|
};
|
|
20344
|
+
/**
|
|
20345
|
+
* The inline release-age gate contribution of a parsed `pnpm-workspace.yaml`
|
|
20346
|
+
* document — pnpm's top-level `minimumReleaseAge` (minutes) and
|
|
20347
|
+
* `minimumReleaseAgeExclude` (name patterns) keys, mapped onto
|
|
20348
|
+
* `@effected/npm`'s `PartialReleaseAgeGate` field names
|
|
20349
|
+
* (`ageMinutes` / `exclude`).
|
|
20350
|
+
*
|
|
20351
|
+
* @remarks
|
|
20352
|
+
* **Hard-fail by design**, the same posture as the live catalog-block reader:
|
|
20353
|
+
* a present-but-malformed value (a non-numeric `minimumReleaseAge`, a
|
|
20354
|
+
* `minimumReleaseAgeExclude` that is not a string array) fails typed as a
|
|
20355
|
+
* `CatalogAssemblyError` rather than being silently dropped, because a
|
|
20356
|
+
* silently-ignored gate is the "install refuses a too-young version the
|
|
20357
|
+
* resolver already picked" bug this vocabulary exists to prevent. An absent or
|
|
20358
|
+
* explicitly `null` key contributes nothing; the permissive
|
|
20359
|
+
* `PartialReleaseAgeGate` accepts any finite `ageMinutes` (negatives and
|
|
20360
|
+
* fractions included) — `ReleaseAgeGate.combine` is the single clamping
|
|
20361
|
+
* authority, exactly as on the hook path.
|
|
20362
|
+
*/
|
|
20363
|
+
const inlineReleaseAge = (document) => {
|
|
20364
|
+
if (!isObject$1(document)) return effect.Effect.succeed({});
|
|
20365
|
+
const raw = {};
|
|
20366
|
+
if (document.minimumReleaseAge !== void 0 && document.minimumReleaseAge !== null) raw.ageMinutes = document.minimumReleaseAge;
|
|
20367
|
+
if (document.minimumReleaseAgeExclude !== void 0 && document.minimumReleaseAgeExclude !== null) raw.exclude = document.minimumReleaseAgeExclude;
|
|
20368
|
+
if (Object.keys(raw).length === 0) return effect.Effect.succeed({});
|
|
20369
|
+
return effect.Schema.decodeUnknownEffect(PartialReleaseAgeGate)(raw).pipe(effect.Effect.catchTag("SchemaError", (cause) => new CatalogAssemblyError({
|
|
20370
|
+
source: "manifest",
|
|
20371
|
+
path: "pnpm-workspace.yaml",
|
|
20372
|
+
cause
|
|
20373
|
+
})));
|
|
20374
|
+
};
|
|
20139
20375
|
/** A hard-fail catalog-assembly failure naming the malformed part of a `workspaces` field. */
|
|
20140
20376
|
const malformed = (source, path, detail) => new CatalogAssemblyError({
|
|
20141
20377
|
source,
|
|
@@ -20256,6 +20492,8 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
20256
20492
|
const hasPnpmWorkspace = yield* probeExists(workspaceYaml);
|
|
20257
20493
|
let inline;
|
|
20258
20494
|
let injected;
|
|
20495
|
+
let inlineGate = {};
|
|
20496
|
+
let hookGate = {};
|
|
20259
20497
|
if (hasPnpmWorkspace) {
|
|
20260
20498
|
const text = yield* fs.readFileString(workspaceYaml).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
|
|
20261
20499
|
source: "manifest",
|
|
@@ -20269,11 +20507,16 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
20269
20507
|
})));
|
|
20270
20508
|
yield* validatePnpmWorkspaceCatalogs(document);
|
|
20271
20509
|
inline = CatalogSet.fromCatalogs(inlineCatalogs(catalogBlocksOf(document)));
|
|
20272
|
-
|
|
20273
|
-
|
|
20510
|
+
inlineGate = yield* inlineReleaseAge(document);
|
|
20511
|
+
const injection = yield* hooks.inject(root, configDependenciesOf(document), inline.entries);
|
|
20512
|
+
injected = CatalogSet.fromCatalogs(injection.catalogs);
|
|
20513
|
+
hookGate = injection.releaseAge;
|
|
20274
20514
|
} else {
|
|
20275
20515
|
const manifestPath = path.join(root, "package.json");
|
|
20276
|
-
if (!(yield* probeExists(manifestPath))) return
|
|
20516
|
+
if (!(yield* probeExists(manifestPath))) return {
|
|
20517
|
+
catalogs: fromLockfile,
|
|
20518
|
+
releaseAgeGate: ReleaseAgeGate.combine()
|
|
20519
|
+
};
|
|
20277
20520
|
const text = yield* fs.readFileString(manifestPath).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
|
|
20278
20521
|
source: "manifest",
|
|
20279
20522
|
path: manifestPath,
|
|
@@ -20283,20 +20526,28 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
20283
20526
|
injected = CatalogSet.empty();
|
|
20284
20527
|
}
|
|
20285
20528
|
const assembled = CatalogSet.merge(fromLockfile, inline, injected);
|
|
20529
|
+
const releaseAgeGate = ReleaseAgeGate.combine(inlineGate, hookGate);
|
|
20286
20530
|
yield* effect.Effect.logDebug("Catalogs assembled").pipe(effect.Effect.annotateLogs({
|
|
20287
20531
|
"workspace.root": root,
|
|
20288
|
-
"workspace.catalogs": Object.keys(assembled.entries).join(",")
|
|
20532
|
+
"workspace.catalogs": Object.keys(assembled.entries).join(","),
|
|
20533
|
+
"workspace.releaseAgeMinutes": releaseAgeGate.ageMinutes
|
|
20289
20534
|
}));
|
|
20290
|
-
return
|
|
20535
|
+
return {
|
|
20536
|
+
catalogs: assembled,
|
|
20537
|
+
releaseAgeGate
|
|
20538
|
+
};
|
|
20291
20539
|
});
|
|
20292
20540
|
const [resolveOnce, invalidate] = yield* effect.Effect.cachedInvalidateWithTTL(assemble, effect.Duration.infinity);
|
|
20293
20541
|
const memo = effect.Effect.onExit(resolveOnce, (exit) => effect.Exit.isSuccess(exit) ? effect.Effect.void : invalidate);
|
|
20294
20542
|
return {
|
|
20295
20543
|
set: effect.Effect.fn("WorkspaceCatalogs.set")(function* () {
|
|
20296
|
-
return yield* memo;
|
|
20544
|
+
return (yield* memo).catalogs;
|
|
20297
20545
|
}),
|
|
20298
20546
|
resolveSpecifier: effect.Effect.fn("WorkspaceCatalogs.resolveSpecifier")(function* (dependency, specifier) {
|
|
20299
|
-
return (yield* memo).resolveSpecifier(dependency, specifier);
|
|
20547
|
+
return (yield* memo).catalogs.resolveSpecifier(dependency, specifier);
|
|
20548
|
+
}),
|
|
20549
|
+
releaseAgeGate: effect.Effect.fn("WorkspaceCatalogs.releaseAgeGate")(function* () {
|
|
20550
|
+
return (yield* memo).releaseAgeGate;
|
|
20300
20551
|
})
|
|
20301
20552
|
};
|
|
20302
20553
|
});
|
|
@@ -20347,7 +20598,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
20347
20598
|
}));
|
|
20348
20599
|
};
|
|
20349
20600
|
//#endregion
|
|
20350
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20601
|
+
//#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
|
|
20351
20602
|
const EMPTY = Object.freeze(Object.create(null));
|
|
20352
20603
|
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)));
|
|
20353
20604
|
/**
|
|
@@ -20512,7 +20763,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
|
|
|
20512
20763
|
}
|
|
20513
20764
|
};
|
|
20514
20765
|
//#endregion
|
|
20515
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20766
|
+
//#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
|
|
20516
20767
|
/** Whether `value` is a non-null, non-array object. */
|
|
20517
20768
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20518
20769
|
/** Whether every value in a record is a string — a usable dependency map. */
|
|
@@ -20704,7 +20955,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
20704
20955
|
static layer = (options) => effect.Layer.effect(WorkspaceSnapshots, WorkspaceSnapshots.make(options));
|
|
20705
20956
|
};
|
|
20706
20957
|
//#endregion
|
|
20707
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20958
|
+
//#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
|
|
20708
20959
|
/**
|
|
20709
20960
|
* Every service that needs only a filesystem: root, package-manager detection,
|
|
20710
20961
|
* discovery, lockfile reading, catalogs and publishability.
|