@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
package/changesets-changelog.cjs
CHANGED
|
@@ -2353,7 +2353,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
|
|
|
2353
2353
|
}
|
|
2354
2354
|
};
|
|
2355
2355
|
//#endregion
|
|
2356
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
2356
|
+
//#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
|
|
2357
2357
|
/**
|
|
2358
2358
|
* Extension data specific to bun lockfiles, attached to `Lockfile.extension`
|
|
2359
2359
|
* when the format is `"bun"`.
|
|
@@ -2374,7 +2374,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
|
|
|
2374
2374
|
trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
|
|
2375
2375
|
}) {};
|
|
2376
2376
|
//#endregion
|
|
2377
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2377
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.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
|
|
2378
2378
|
/**
|
|
2379
2379
|
* Contract for resolving pnpm `catalog:` dependency specifiers to concrete
|
|
2380
2380
|
* version ranges.
|
|
@@ -2420,7 +2420,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
|
|
|
2420
2420
|
static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2421
2421
|
};
|
|
2422
2422
|
//#endregion
|
|
2423
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2423
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.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
|
|
2424
2424
|
/**
|
|
2425
2425
|
* Raised when a `catalog:` or `workspace:` specifier cannot be resolved
|
|
2426
2426
|
* because the resolution mechanism itself failed — not for an ordinary
|
|
@@ -2481,7 +2481,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
|
|
|
2481
2481
|
static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2482
2482
|
};
|
|
2483
2483
|
//#endregion
|
|
2484
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2484
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.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
|
|
2485
2485
|
/**
|
|
2486
2486
|
* Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
|
|
2487
2487
|
* that is unreadable or not valid YAML, a root `package.json` `workspaces` field
|
|
@@ -2525,7 +2525,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
|
|
|
2525
2525
|
}
|
|
2526
2526
|
};
|
|
2527
2527
|
//#endregion
|
|
2528
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2528
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.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
|
|
2529
2529
|
/**
|
|
2530
2530
|
* The short dependency kind: which dependency map an entry came from, named the
|
|
2531
2531
|
* way consumers branch on it.
|
|
@@ -4026,7 +4026,7 @@ const isComparatorSetSubset = (sub, sup) => {
|
|
|
4026
4026
|
return true;
|
|
4027
4027
|
};
|
|
4028
4028
|
//#endregion
|
|
4029
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4029
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.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
|
|
4030
4030
|
/**
|
|
4031
4031
|
* Indicates that a string could not be parsed as a valid dependency specifier.
|
|
4032
4032
|
*
|
|
@@ -4233,7 +4233,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
|
|
|
4233
4233
|
FromString: fromString
|
|
4234
4234
|
});
|
|
4235
4235
|
//#endregion
|
|
4236
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4236
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.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
|
|
4237
4237
|
const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
|
|
4238
4238
|
const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
|
|
4239
4239
|
const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
|
|
@@ -4286,7 +4286,175 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
|
|
|
4286
4286
|
decode: decode$2
|
|
4287
4287
|
});
|
|
4288
4288
|
//#endregion
|
|
4289
|
-
//#region ../../node_modules/.pnpm/@effected+
|
|
4289
|
+
//#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
|
|
4290
|
+
const MS_PER_MINUTE = 6e4;
|
|
4291
|
+
/**
|
|
4292
|
+
* A source's partial contribution to a {@link ReleaseAgeGate}: the effective
|
|
4293
|
+
* gate is assembled from more than one place (inline `pnpm-workspace.yaml`
|
|
4294
|
+
* keys, replayed `updateConfig` hooks, `pnpm config get` output), and each
|
|
4295
|
+
* source may set the age, the exclude list, both, or neither. Absent fields
|
|
4296
|
+
* contribute nothing to the combination.
|
|
4297
|
+
*
|
|
4298
|
+
* Deliberately permissive: unlike {@link ReleaseAgeGate} it does not constrain
|
|
4299
|
+
* `ageMinutes` to be non-negative, because the raw values arrive from arbitrary
|
|
4300
|
+
* config sources and {@link ReleaseAgeGate.combine} is the single authority
|
|
4301
|
+
* that clamps them.
|
|
4302
|
+
*
|
|
4303
|
+
* @public
|
|
4304
|
+
*/
|
|
4305
|
+
const PartialReleaseAgeGate = effect.Schema.Struct({
|
|
4306
|
+
/** Minutes a release must age; absent means this source sets no age. */
|
|
4307
|
+
ageMinutes: effect.Schema.optionalKey(effect.Schema.Number),
|
|
4308
|
+
/** Exempt package-name patterns; absent means this source adds no exemptions. */
|
|
4309
|
+
exclude: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
|
|
4310
|
+
});
|
|
4311
|
+
const AgeMinutes = effect.Schema.Number.check(effect.Schema.isGreaterThanOrEqualTo(0), effect.Schema.isFinite());
|
|
4312
|
+
const matchesPattern = (name, pattern) => {
|
|
4313
|
+
if (pattern === name) return true;
|
|
4314
|
+
if (!pattern.includes("*")) return false;
|
|
4315
|
+
let nameIndex = 0;
|
|
4316
|
+
let patternIndex = 0;
|
|
4317
|
+
let starIndex = -1;
|
|
4318
|
+
let retryNameIndex = 0;
|
|
4319
|
+
while (nameIndex < name.length) if (pattern[patternIndex] === "*") {
|
|
4320
|
+
starIndex = patternIndex;
|
|
4321
|
+
patternIndex += 1;
|
|
4322
|
+
retryNameIndex = nameIndex;
|
|
4323
|
+
} else if (pattern[patternIndex] === name[nameIndex]) {
|
|
4324
|
+
patternIndex += 1;
|
|
4325
|
+
nameIndex += 1;
|
|
4326
|
+
} else if (starIndex !== -1) {
|
|
4327
|
+
patternIndex = starIndex + 1;
|
|
4328
|
+
retryNameIndex += 1;
|
|
4329
|
+
nameIndex = retryNameIndex;
|
|
4330
|
+
} else return false;
|
|
4331
|
+
while (pattern[patternIndex] === "*") patternIndex += 1;
|
|
4332
|
+
return patternIndex === pattern.length;
|
|
4333
|
+
};
|
|
4334
|
+
const matchesExclude = (name, patterns) => patterns.some((pattern) => matchesPattern(name, pattern));
|
|
4335
|
+
/**
|
|
4336
|
+
* pnpm's publish-time release-age gate: the number of minutes a published
|
|
4337
|
+
* version must age before it is eligible, and the set of package-name patterns
|
|
4338
|
+
* exempt from the gate. Mirrors pnpm's `minimumReleaseAge` /
|
|
4339
|
+
* `minimumReleaseAgeExclude` config so a resolver can drop too-young candidate
|
|
4340
|
+
* versions before picking, avoiding `ERR_PNPM_NO_MATURE_MATCHING_VERSION`.
|
|
4341
|
+
*
|
|
4342
|
+
* `ageMinutes` is constrained non-negative and finite; a `ReleaseAgeGate` with
|
|
4343
|
+
* `ageMinutes <= 0` is an inert gate that filters nothing. Assemble a gate from
|
|
4344
|
+
* multiple config sources with {@link ReleaseAgeGate.combine}, and apply it to
|
|
4345
|
+
* a package's candidate versions with {@link ReleaseAgeGate.filterVersions}.
|
|
4346
|
+
*
|
|
4347
|
+
* @example
|
|
4348
|
+
* ```ts
|
|
4349
|
+
* import { ReleaseAgeGate } from "@effected/npm";
|
|
4350
|
+
*
|
|
4351
|
+
* const gate = ReleaseAgeGate.combine(
|
|
4352
|
+
* { ageMinutes: 1440 },
|
|
4353
|
+
* { exclude: ["@my-scope/*"] },
|
|
4354
|
+
* );
|
|
4355
|
+
* // gate.ageMinutes === 1440, gate.exclude === ["@my-scope/*"]
|
|
4356
|
+
*
|
|
4357
|
+
* const eligible = gate.filterVersions(
|
|
4358
|
+
* ["1.0.0", "1.0.1"],
|
|
4359
|
+
* { "1.0.0": "2020-01-01T00:00:00Z", "1.0.1": "2026-07-21T00:00:00Z" },
|
|
4360
|
+
* "prettier",
|
|
4361
|
+
* Date.now(),
|
|
4362
|
+
* );
|
|
4363
|
+
* ```
|
|
4364
|
+
*
|
|
4365
|
+
* @public
|
|
4366
|
+
*/
|
|
4367
|
+
var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAgeGate")({
|
|
4368
|
+
/** Minutes a published version must age before it is eligible (non-negative, finite). */
|
|
4369
|
+
ageMinutes: AgeMinutes,
|
|
4370
|
+
/** Package-name patterns exempt from the gate (exact names or `*`-globs). */
|
|
4371
|
+
exclude: effect.Schema.Array(effect.Schema.String)
|
|
4372
|
+
}) {
|
|
4373
|
+
/**
|
|
4374
|
+
* Combine partial contributions from multiple sources into one effective
|
|
4375
|
+
* gate: **strictest age wins** (the maximum of the contributed ages,
|
|
4376
|
+
* clamped to be non-negative) and the exclude sets **union** (deduplicated,
|
|
4377
|
+
* insertion order preserved). A contribution's absent field adds nothing; a
|
|
4378
|
+
* negative or non-finite contributed age is ignored by the clamp. With no
|
|
4379
|
+
* contributions (or only empty ones) the result is the inert zero gate
|
|
4380
|
+
* (`ageMinutes: 0`, `exclude: []`).
|
|
4381
|
+
*
|
|
4382
|
+
* `combine` is total — it never throws on a fractional, negative, or
|
|
4383
|
+
* non-finite contribution — which is why {@link (PartialReleaseAgeGate:variable)}
|
|
4384
|
+
* does not constrain its `ageMinutes` and this method owns the clamp.
|
|
4385
|
+
*
|
|
4386
|
+
* @param contributions - the partial gates to merge, one per source.
|
|
4387
|
+
*/
|
|
4388
|
+
static combine(...contributions) {
|
|
4389
|
+
const ages = contributions.map((contribution) => contribution.ageMinutes).filter((age) => typeof age === "number" && Number.isFinite(age));
|
|
4390
|
+
const ageMinutes = ages.length > 0 ? Math.max(0, ...ages) : 0;
|
|
4391
|
+
const exclude = [...new Set(contributions.flatMap((contribution) => contribution.exclude ?? []))];
|
|
4392
|
+
return ReleaseAgeGate.make({
|
|
4393
|
+
ageMinutes,
|
|
4394
|
+
exclude
|
|
4395
|
+
});
|
|
4396
|
+
}
|
|
4397
|
+
/**
|
|
4398
|
+
* Whether a package name matches any of `patterns`, using pnpm's
|
|
4399
|
+
* `@pnpm/matcher` semantics: an exact-name match, or a `*`-glob where `*`
|
|
4400
|
+
* matches any run of characters **including `/`** — so a bare `*` matches a
|
|
4401
|
+
* scoped name like `@scope/pkg`, and `@scope/*` matches every package in a
|
|
4402
|
+
* scope.
|
|
4403
|
+
*
|
|
4404
|
+
* @remarks
|
|
4405
|
+
* This is deliberately **NOT** `@effected/glob`'s minimatch dialect, in
|
|
4406
|
+
* which `*` refuses to cross `/` (there `*` matches `pkg` but not
|
|
4407
|
+
* `@scope/pkg`, and you would need `**`). pnpm treats the package name as a
|
|
4408
|
+
* flat string, so this matcher does too. Do not "fix" this to route through
|
|
4409
|
+
* `@effected/glob`: it would silently change which packages a gate exempts
|
|
4410
|
+
* and diverge from pnpm's own behavior.
|
|
4411
|
+
*
|
|
4412
|
+
* @param name - the package name to test.
|
|
4413
|
+
* @param patterns - the exclude patterns (exact names or `*`-globs).
|
|
4414
|
+
*/
|
|
4415
|
+
static matchesExclude(name, patterns) {
|
|
4416
|
+
return matchesExclude(name, patterns);
|
|
4417
|
+
}
|
|
4418
|
+
/**
|
|
4419
|
+
* Whether this gate exempts the given package name from the release-age
|
|
4420
|
+
* check — `ReleaseAgeGate.matchesExclude(name, this.exclude)`.
|
|
4421
|
+
*
|
|
4422
|
+
* @param name - the package name to test.
|
|
4423
|
+
*/
|
|
4424
|
+
isExcluded(name) {
|
|
4425
|
+
return matchesExclude(name, this.exclude);
|
|
4426
|
+
}
|
|
4427
|
+
/**
|
|
4428
|
+
* Filter a package's candidate versions to those old enough to pass the
|
|
4429
|
+
* gate, given each version's publish timestamp and a caller-supplied `now`.
|
|
4430
|
+
*
|
|
4431
|
+
* A version is kept when it has a parseable publish timestamp at or before
|
|
4432
|
+
* the cutoff (`now - ageMinutes * 60000`). A version with a **missing or
|
|
4433
|
+
* unparseable** timestamp in `times` is **dropped** — matching pnpm's strict
|
|
4434
|
+
* posture: a version whose age cannot be established is treated as too young.
|
|
4435
|
+
* The clock is the caller's; this method reads no wall clock.
|
|
4436
|
+
*
|
|
4437
|
+
* Returns all versions unchanged (a no-op) when the gate is inert
|
|
4438
|
+
* (`ageMinutes <= 0`) or the package name is excluded.
|
|
4439
|
+
*
|
|
4440
|
+
* @param versions - the candidate version strings.
|
|
4441
|
+
* @param times - a map from version string to its ISO-8601 publish date.
|
|
4442
|
+
* @param name - the package name (checked against the gate's `exclude` list).
|
|
4443
|
+
* @param now - the current time in epoch milliseconds (the caller's clock).
|
|
4444
|
+
*/
|
|
4445
|
+
filterVersions(versions, times, name, now) {
|
|
4446
|
+
if (this.ageMinutes <= 0 || this.isExcluded(name)) return versions;
|
|
4447
|
+
const cutoff = now - this.ageMinutes * MS_PER_MINUTE;
|
|
4448
|
+
return versions.filter((version) => {
|
|
4449
|
+
const time = times[version];
|
|
4450
|
+
if (time === void 0) return false;
|
|
4451
|
+
const published = Date.parse(time);
|
|
4452
|
+
return Number.isFinite(published) && published <= cutoff;
|
|
4453
|
+
});
|
|
4454
|
+
}
|
|
4455
|
+
};
|
|
4456
|
+
//#endregion
|
|
4457
|
+
//#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
|
|
4290
4458
|
/**
|
|
4291
4459
|
* One declared dependency of one workspace importer, as the lockfile records it.
|
|
4292
4460
|
*
|
|
@@ -4314,7 +4482,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
|
|
|
4314
4482
|
depType: DependencyField
|
|
4315
4483
|
}) {};
|
|
4316
4484
|
//#endregion
|
|
4317
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4485
|
+
//#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
|
|
4318
4486
|
/**
|
|
4319
4487
|
* One workspace importer's declared dependencies, as the lockfile records them.
|
|
4320
4488
|
*
|
|
@@ -4338,7 +4506,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
|
|
|
4338
4506
|
dependencies: effect.Schema.Array(ImporterDependency)
|
|
4339
4507
|
}) {};
|
|
4340
4508
|
//#endregion
|
|
4341
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4509
|
+
//#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
|
|
4342
4510
|
const EMPTY_DEPENDENCIES = {};
|
|
4343
4511
|
/**
|
|
4344
4512
|
* A package resolved from a lockfile.
|
|
@@ -4373,7 +4541,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
|
|
|
4373
4541
|
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)))
|
|
4374
4542
|
}) {};
|
|
4375
4543
|
//#endregion
|
|
4376
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4544
|
+
//#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
|
|
4377
4545
|
/**
|
|
4378
4546
|
* A directed dependency edge between two workspace packages as recorded in
|
|
4379
4547
|
* the lockfile.
|
|
@@ -4395,7 +4563,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
|
|
|
4395
4563
|
constraint: effect.Schema.String
|
|
4396
4564
|
}) {};
|
|
4397
4565
|
//#endregion
|
|
4398
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4566
|
+
//#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
|
|
4399
4567
|
/**
|
|
4400
4568
|
* Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
|
|
4401
4569
|
* when the format is `"pnpm"`.
|
|
@@ -4420,7 +4588,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
|
|
|
4420
4588
|
}))
|
|
4421
4589
|
}) {};
|
|
4422
4590
|
//#endregion
|
|
4423
|
-
//#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/LockfileFormat.js
|
|
4424
4592
|
/**
|
|
4425
4593
|
* The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
|
|
4426
4594
|
* `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
|
|
@@ -4454,7 +4622,7 @@ const FILENAMES = {
|
|
|
4454
4622
|
*/
|
|
4455
4623
|
const filenameFor = (format) => FILENAMES[format];
|
|
4456
4624
|
//#endregion
|
|
4457
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4625
|
+
//#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
|
|
4458
4626
|
/**
|
|
4459
4627
|
* The four dependency sections of a manifest, in a stable order — the shared
|
|
4460
4628
|
* dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
|
|
@@ -6353,7 +6521,7 @@ var JsoncModifier = class {
|
|
|
6353
6521
|
});
|
|
6354
6522
|
};
|
|
6355
6523
|
//#endregion
|
|
6356
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
6524
|
+
//#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
|
|
6357
6525
|
const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
6358
6526
|
const BunWorkspaceEntry = effect.Schema.Struct({
|
|
6359
6527
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -6446,7 +6614,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
|
|
|
6446
6614
|
};
|
|
6447
6615
|
});
|
|
6448
6616
|
//#endregion
|
|
6449
|
-
//#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/npm.js
|
|
6450
6618
|
const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
6451
6619
|
const NpmPackageEntry = effect.Schema.Struct({
|
|
6452
6620
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -13368,7 +13536,7 @@ function deepEqualValues(a, b) {
|
|
|
13368
13536
|
return false;
|
|
13369
13537
|
}
|
|
13370
13538
|
//#endregion
|
|
13371
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13539
|
+
//#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
|
|
13372
13540
|
/**
|
|
13373
13541
|
* An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
|
|
13374
13542
|
* and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
|
|
@@ -13438,7 +13606,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
|
|
|
13438
13606
|
};
|
|
13439
13607
|
});
|
|
13440
13608
|
//#endregion
|
|
13441
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13609
|
+
//#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
|
|
13442
13610
|
const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
|
|
13443
13611
|
specifier: effect.Schema.String,
|
|
13444
13612
|
version: effect.Schema.String
|
|
@@ -13564,7 +13732,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
|
|
|
13564
13732
|
};
|
|
13565
13733
|
});
|
|
13566
13734
|
//#endregion
|
|
13567
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13735
|
+
//#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
|
|
13568
13736
|
const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
|
|
13569
13737
|
const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
13570
13738
|
const YarnEntry = effect.Schema.Struct({
|
|
@@ -13687,7 +13855,7 @@ const cleanYarnDeps = (deps) => {
|
|
|
13687
13855
|
return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
|
|
13688
13856
|
};
|
|
13689
13857
|
//#endregion
|
|
13690
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13858
|
+
//#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
|
|
13691
13859
|
const EMPTY_IMPORTERS = [];
|
|
13692
13860
|
/**
|
|
13693
13861
|
* Failure of `Lockfile.parse`: the given content is not a valid lockfile of
|
|
@@ -13931,7 +14099,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
|
|
|
13931
14099
|
}
|
|
13932
14100
|
};
|
|
13933
14101
|
//#endregion
|
|
13934
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
14102
|
+
//#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
|
|
13935
14103
|
/**
|
|
13936
14104
|
* The minimal manifest shape {@link LockfileIntegrity.compare} checks a
|
|
13937
14105
|
* lockfile against: a package name plus the four optional dependency maps.
|
|
@@ -14047,7 +14215,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
|
|
|
14047
14215
|
}
|
|
14048
14216
|
};
|
|
14049
14217
|
//#endregion
|
|
14050
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
14218
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/Dependency.js
|
|
14051
14219
|
/**
|
|
14052
14220
|
* A resolved dependency entry pairing a package name with its version
|
|
14053
14221
|
* specifier and the `kind` of map it came from (`@effected/npm`'s
|
|
@@ -14111,7 +14279,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
|
|
|
14111
14279
|
}
|
|
14112
14280
|
};
|
|
14113
14281
|
//#endregion
|
|
14114
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
14282
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/DevEngines.js
|
|
14115
14283
|
/**
|
|
14116
14284
|
* A single `devEngines` constraint with a name and optional `version` / `onFail`.
|
|
14117
14285
|
*
|
|
@@ -15136,7 +15304,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
15136
15304
|
};
|
|
15137
15305
|
}));
|
|
15138
15306
|
//#endregion
|
|
15139
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15307
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/License.js
|
|
15140
15308
|
var import_spdx_expression_parse = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
15141
15309
|
var scan = require_scan$1();
|
|
15142
15310
|
var parse = require_parse$2();
|
|
@@ -15183,7 +15351,7 @@ const isValidSpdx = (value) => {
|
|
|
15183
15351
|
*/
|
|
15184
15352
|
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"));
|
|
15185
15353
|
//#endregion
|
|
15186
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15354
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageManager.js
|
|
15187
15355
|
const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
|
|
15188
15356
|
/**
|
|
15189
15357
|
* The `packageManager` field only ever carries corepack's `<algo>.<hex>`
|
|
@@ -15241,7 +15409,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
|
|
|
15241
15409
|
}
|
|
15242
15410
|
};
|
|
15243
15411
|
//#endregion
|
|
15244
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15412
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageName.js
|
|
15245
15413
|
/**
|
|
15246
15414
|
* Indicates that a string could not be used as a valid npm package name.
|
|
15247
15415
|
*
|
|
@@ -15299,7 +15467,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
|
|
|
15299
15467
|
isScoped
|
|
15300
15468
|
});
|
|
15301
15469
|
//#endregion
|
|
15302
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15470
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/Person.js
|
|
15303
15471
|
const parsePersonString = (input) => {
|
|
15304
15472
|
const emailMatch = input.match(/<([^>]+)>/);
|
|
15305
15473
|
const urlMatch = input.match(/\(([^)]+)\)/);
|
|
@@ -15442,7 +15610,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
|
|
|
15442
15610
|
}
|
|
15443
15611
|
};
|
|
15444
15612
|
//#endregion
|
|
15445
|
-
//#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/internal/format.js
|
|
15446
15614
|
const KEY_INDEX = new Map([
|
|
15447
15615
|
"$schema",
|
|
15448
15616
|
"name",
|
|
@@ -15665,7 +15833,7 @@ const renderJson = (raw, options) => {
|
|
|
15665
15833
|
return options.newline ? `${json}\n` : json;
|
|
15666
15834
|
};
|
|
15667
15835
|
//#endregion
|
|
15668
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.
|
|
15836
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.4.2_effect@4.0.0-beta.99/node_modules/@effected/package-json/Package.js
|
|
15669
15837
|
const toHashMap = effect.SchemaTransformation.transform({
|
|
15670
15838
|
decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
|
|
15671
15839
|
encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
|
|
@@ -15983,7 +16151,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
|
|
|
15983
16151
|
}
|
|
15984
16152
|
};
|
|
15985
16153
|
//#endregion
|
|
15986
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16154
|
+
//#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
|
|
15987
16155
|
const EMPTY$1 = Object.freeze(Object.create(null));
|
|
15988
16156
|
const EMPTY_MANIFEST = Object.freeze(Object.create(null));
|
|
15989
16157
|
/**
|
|
@@ -16588,7 +16756,7 @@ const Walker$1 = {
|
|
|
16588
16756
|
findRoot: findRoot$1
|
|
16589
16757
|
};
|
|
16590
16758
|
//#endregion
|
|
16591
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16759
|
+
//#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
|
|
16592
16760
|
/**
|
|
16593
16761
|
* The marker filenames {@link WorkspaceRoot} probes for, in priority order.
|
|
16594
16762
|
*
|
|
@@ -16775,7 +16943,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
|
|
|
16775
16943
|
static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
|
|
16776
16944
|
};
|
|
16777
16945
|
//#endregion
|
|
16778
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16946
|
+
//#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
|
|
16779
16947
|
/**
|
|
16780
16948
|
* Hard ceiling on directories the enumerator will visit for one pattern set.
|
|
16781
16949
|
* Guards the pathological case a depth cap alone does not: a wide, shallow
|
|
@@ -16793,7 +16961,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
|
|
|
16793
16961
|
*/
|
|
16794
16962
|
const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
16795
16963
|
//#endregion
|
|
16796
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16964
|
+
//#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
|
|
16797
16965
|
/** Directory names never descended into. */
|
|
16798
16966
|
const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
|
|
16799
16967
|
/** Join root-relative POSIX segments; `""` is the root itself. */
|
|
@@ -16883,7 +17051,7 @@ var Traversal = class {
|
|
|
16883
17051
|
}
|
|
16884
17052
|
};
|
|
16885
17053
|
//#endregion
|
|
16886
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17054
|
+
//#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
|
|
16887
17055
|
/** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
|
|
16888
17056
|
const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
|
|
16889
17057
|
/**
|
|
@@ -16953,7 +17121,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
|
|
|
16953
17121
|
return results;
|
|
16954
17122
|
});
|
|
16955
17123
|
//#endregion
|
|
16956
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17124
|
+
//#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
|
|
16957
17125
|
const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
|
|
16958
17126
|
/** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
|
|
16959
17127
|
const pnpmPatternsOf = (document) => {
|
|
@@ -17010,7 +17178,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
|
|
|
17010
17178
|
return manifestPatternsOf(manifest);
|
|
17011
17179
|
});
|
|
17012
17180
|
//#endregion
|
|
17013
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17181
|
+
//#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
|
|
17014
17182
|
/**
|
|
17015
17183
|
* Raised when a workspace member's `package.json` cannot be read, parsed, or
|
|
17016
17184
|
* used — it is missing, malformed, or lacks a `name` or `version`.
|
|
@@ -17444,7 +17612,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
|
|
|
17444
17612
|
};
|
|
17445
17613
|
const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
|
|
17446
17614
|
//#endregion
|
|
17447
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17615
|
+
//#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
|
|
17448
17616
|
/**
|
|
17449
17617
|
* Raised when the workspace dependency graph cannot be topologically ordered
|
|
17450
17618
|
* because it contains a cycle.
|
|
@@ -19042,7 +19210,7 @@ var Git = class extends effect.Context.Service()("@effected/git/Git") {
|
|
|
19042
19210
|
}));
|
|
19043
19211
|
};
|
|
19044
19212
|
//#endregion
|
|
19045
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19213
|
+
//#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
|
|
19046
19214
|
/**
|
|
19047
19215
|
* Which git refs to compare, and whether to fold in the working tree.
|
|
19048
19216
|
*
|
|
@@ -19294,7 +19462,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
|
|
|
19294
19462
|
};
|
|
19295
19463
|
}
|
|
19296
19464
|
//#endregion
|
|
19297
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19465
|
+
//#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
|
|
19298
19466
|
/** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
|
|
19299
19467
|
const inlineCatalogs = (manifest) => {
|
|
19300
19468
|
if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
|
|
@@ -19358,7 +19526,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
|
|
|
19358
19526
|
});
|
|
19359
19527
|
};
|
|
19360
19528
|
//#endregion
|
|
19361
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19529
|
+
//#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
|
|
19362
19530
|
/** Whether `value` is a non-null, non-array object. */
|
|
19363
19531
|
const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19364
19532
|
/**
|
|
@@ -19393,17 +19561,45 @@ const seedToConfig = (seed) => {
|
|
|
19393
19561
|
else catalogs[name] = { ...entries };
|
|
19394
19562
|
return {
|
|
19395
19563
|
catalog,
|
|
19396
|
-
catalogs
|
|
19564
|
+
catalogs,
|
|
19565
|
+
minimumReleaseAge: void 0,
|
|
19566
|
+
minimumReleaseAgeExclude: void 0
|
|
19397
19567
|
};
|
|
19398
19568
|
};
|
|
19399
|
-
/**
|
|
19569
|
+
/** A finite number if `value` is one, else the prior threaded value — a garbage age is dropped, not fatal. */
|
|
19570
|
+
const finiteNumberOr = (value, fallback) => typeof value === "number" && Number.isFinite(value) ? value : fallback;
|
|
19571
|
+
/** A string array if `value` is one, else the prior threaded value — a malformed exclude is dropped, not fatal. */
|
|
19572
|
+
const stringArrayOr = (value, fallback) => Array.isArray(value) && value.every((entry) => typeof entry === "string") ? value : fallback;
|
|
19573
|
+
/**
|
|
19574
|
+
* Read the catalog slice and the release-age keys back out of whatever a hook
|
|
19575
|
+
* returned, threading the prior config as the fallback.
|
|
19576
|
+
*
|
|
19577
|
+
* @remarks
|
|
19578
|
+
* Tolerant by design, matching this seam's discipline: a hook's returned *data*
|
|
19579
|
+
* is normalized, never a typed failure (only a load/replay *mechanism* failure
|
|
19580
|
+
* raises `CatalogAssemblyError`). A hook that omits a key, or returns a
|
|
19581
|
+
* malformed value for it, leaves the prior threaded value in place; a hook that
|
|
19582
|
+
* sets a well-formed key rewrites it — so across hooks the **last well-formed
|
|
19583
|
+
* write wins**, exactly as pnpm's single mutable config object behaves.
|
|
19584
|
+
*/
|
|
19400
19585
|
const configOf = (value, fallback) => {
|
|
19401
19586
|
if (!isObject$2(value)) return fallback;
|
|
19402
19587
|
return {
|
|
19403
19588
|
catalog: isObject$2(value.catalog) ? value.catalog : fallback.catalog,
|
|
19404
|
-
catalogs: isObject$2(value.catalogs) ? value.catalogs : fallback.catalogs
|
|
19589
|
+
catalogs: isObject$2(value.catalogs) ? value.catalogs : fallback.catalogs,
|
|
19590
|
+
minimumReleaseAge: finiteNumberOr(value.minimumReleaseAge, fallback.minimumReleaseAge),
|
|
19591
|
+
minimumReleaseAgeExclude: stringArrayOr(value.minimumReleaseAgeExclude, fallback.minimumReleaseAgeExclude)
|
|
19405
19592
|
};
|
|
19406
19593
|
};
|
|
19594
|
+
/**
|
|
19595
|
+
* Project the threaded config's release-age keys into a partial gate
|
|
19596
|
+
* contribution, omitting a key the hooks never set (never an explicit
|
|
19597
|
+
* `undefined` — the fields are `optionalKey`).
|
|
19598
|
+
*/
|
|
19599
|
+
const releaseAgeOf = (config) => ({
|
|
19600
|
+
...config.minimumReleaseAge !== void 0 ? { ageMinutes: config.minimumReleaseAge } : {},
|
|
19601
|
+
...config.minimumReleaseAgeExclude !== void 0 ? { exclude: config.minimumReleaseAgeExclude } : {}
|
|
19602
|
+
});
|
|
19407
19603
|
/** Fold the hook config back into the normalized `catalog name → dependency → range` record. */
|
|
19408
19604
|
const configToEntries = (config) => {
|
|
19409
19605
|
const raw = { ...config.catalogs };
|
|
@@ -19443,7 +19639,10 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
19443
19639
|
* config dependency. The default {@link WorkspaceCatalogs} layer wires this, so
|
|
19444
19640
|
* the default catalog path provably executes no config-dependency code.
|
|
19445
19641
|
*/
|
|
19446
|
-
static layerNoop = effect.Layer.succeed(ConfigDependencyHooks, { inject: (_root, _configDependencies, seed) => effect.Effect.succeed(
|
|
19642
|
+
static layerNoop = effect.Layer.succeed(ConfigDependencyHooks, { inject: (_root, _configDependencies, seed) => effect.Effect.succeed({
|
|
19643
|
+
catalogs: seed,
|
|
19644
|
+
releaseAge: {}
|
|
19645
|
+
}) });
|
|
19447
19646
|
/**
|
|
19448
19647
|
* The live layer: dynamically imports each config dependency's `pnpmfile.cjs`
|
|
19449
19648
|
* (in process, no subprocess) and replays its `updateConfig` hook over the
|
|
@@ -19462,7 +19661,10 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
19462
19661
|
*/
|
|
19463
19662
|
static layerLive = effect.Layer.succeed(ConfigDependencyHooks, { inject: (root, configDependencies, seed) => effect.Effect.gen(function* () {
|
|
19464
19663
|
const names = Object.keys(configDependencies);
|
|
19465
|
-
if (names.length === 0) return
|
|
19664
|
+
if (names.length === 0) return {
|
|
19665
|
+
catalogs: seed,
|
|
19666
|
+
releaseAge: {}
|
|
19667
|
+
};
|
|
19466
19668
|
let config = seedToConfig(seed);
|
|
19467
19669
|
for (const name of names) {
|
|
19468
19670
|
if (hasTraversalSegment(name)) return yield* effect.Effect.fail(new CatalogAssemblyError({
|
|
@@ -19503,11 +19705,14 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
19503
19705
|
})
|
|
19504
19706
|
});
|
|
19505
19707
|
}
|
|
19506
|
-
return
|
|
19708
|
+
return {
|
|
19709
|
+
catalogs: configToEntries(config),
|
|
19710
|
+
releaseAge: releaseAgeOf(config)
|
|
19711
|
+
};
|
|
19507
19712
|
}) });
|
|
19508
19713
|
};
|
|
19509
19714
|
//#endregion
|
|
19510
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19715
|
+
//#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
|
|
19511
19716
|
/**
|
|
19512
19717
|
* The four package managers this package understands.
|
|
19513
19718
|
*
|
|
@@ -19749,7 +19954,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
|
|
|
19749
19954
|
static layer = effect.Layer.effect(PackageManagerDetector, PackageManagerDetector.make);
|
|
19750
19955
|
};
|
|
19751
19956
|
//#endregion
|
|
19752
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19957
|
+
//#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
|
|
19753
19958
|
/**
|
|
19754
19959
|
* Raised when the workspace's lockfile cannot be read off disk.
|
|
19755
19960
|
*
|
|
@@ -19859,7 +20064,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
|
|
|
19859
20064
|
static layer = (options) => effect.Layer.effect(LockfileReader, LockfileReader.make(options));
|
|
19860
20065
|
};
|
|
19861
20066
|
//#endregion
|
|
19862
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20067
|
+
//#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
|
|
19863
20068
|
/** The public npm registry, used when `publishConfig.registry` says nothing. */
|
|
19864
20069
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
19865
20070
|
/**
|
|
@@ -19959,7 +20164,7 @@ var PublishabilityDetector = class PublishabilityDetector extends effect.Context
|
|
|
19959
20164
|
}) });
|
|
19960
20165
|
};
|
|
19961
20166
|
//#endregion
|
|
19962
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20167
|
+
//#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
|
|
19963
20168
|
/**
|
|
19964
20169
|
* An immutable, fully-normalized catalog collection — the one catalog
|
|
19965
20170
|
* resolution semantic in the package.
|
|
@@ -20132,6 +20337,37 @@ const configDependenciesOf = (document) => {
|
|
|
20132
20337
|
for (const [name, spec] of Object.entries(document.configDependencies)) if (typeof spec === "string") out[name] = spec;
|
|
20133
20338
|
return out;
|
|
20134
20339
|
};
|
|
20340
|
+
/**
|
|
20341
|
+
* The inline release-age gate contribution of a parsed `pnpm-workspace.yaml`
|
|
20342
|
+
* document — pnpm's top-level `minimumReleaseAge` (minutes) and
|
|
20343
|
+
* `minimumReleaseAgeExclude` (name patterns) keys, mapped onto
|
|
20344
|
+
* `@effected/npm`'s `PartialReleaseAgeGate` field names
|
|
20345
|
+
* (`ageMinutes` / `exclude`).
|
|
20346
|
+
*
|
|
20347
|
+
* @remarks
|
|
20348
|
+
* **Hard-fail by design**, the same posture as the live catalog-block reader:
|
|
20349
|
+
* a present-but-malformed value (a non-numeric `minimumReleaseAge`, a
|
|
20350
|
+
* `minimumReleaseAgeExclude` that is not a string array) fails typed as a
|
|
20351
|
+
* `CatalogAssemblyError` rather than being silently dropped, because a
|
|
20352
|
+
* silently-ignored gate is the "install refuses a too-young version the
|
|
20353
|
+
* resolver already picked" bug this vocabulary exists to prevent. An absent or
|
|
20354
|
+
* explicitly `null` key contributes nothing; the permissive
|
|
20355
|
+
* `PartialReleaseAgeGate` accepts any finite `ageMinutes` (negatives and
|
|
20356
|
+
* fractions included) — `ReleaseAgeGate.combine` is the single clamping
|
|
20357
|
+
* authority, exactly as on the hook path.
|
|
20358
|
+
*/
|
|
20359
|
+
const inlineReleaseAge = (document) => {
|
|
20360
|
+
if (!isObject$1(document)) return effect.Effect.succeed({});
|
|
20361
|
+
const raw = {};
|
|
20362
|
+
if (document.minimumReleaseAge !== void 0 && document.minimumReleaseAge !== null) raw.ageMinutes = document.minimumReleaseAge;
|
|
20363
|
+
if (document.minimumReleaseAgeExclude !== void 0 && document.minimumReleaseAgeExclude !== null) raw.exclude = document.minimumReleaseAgeExclude;
|
|
20364
|
+
if (Object.keys(raw).length === 0) return effect.Effect.succeed({});
|
|
20365
|
+
return effect.Schema.decodeUnknownEffect(PartialReleaseAgeGate)(raw).pipe(effect.Effect.catchTag("SchemaError", (cause) => new CatalogAssemblyError({
|
|
20366
|
+
source: "manifest",
|
|
20367
|
+
path: "pnpm-workspace.yaml",
|
|
20368
|
+
cause
|
|
20369
|
+
})));
|
|
20370
|
+
};
|
|
20135
20371
|
/** A hard-fail catalog-assembly failure naming the malformed part of a `workspaces` field. */
|
|
20136
20372
|
const malformed = (source, path, detail) => new CatalogAssemblyError({
|
|
20137
20373
|
source,
|
|
@@ -20252,6 +20488,8 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
20252
20488
|
const hasPnpmWorkspace = yield* probeExists(workspaceYaml);
|
|
20253
20489
|
let inline;
|
|
20254
20490
|
let injected;
|
|
20491
|
+
let inlineGate = {};
|
|
20492
|
+
let hookGate = {};
|
|
20255
20493
|
if (hasPnpmWorkspace) {
|
|
20256
20494
|
const text = yield* fs.readFileString(workspaceYaml).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
|
|
20257
20495
|
source: "manifest",
|
|
@@ -20265,11 +20503,16 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
20265
20503
|
})));
|
|
20266
20504
|
yield* validatePnpmWorkspaceCatalogs(document);
|
|
20267
20505
|
inline = CatalogSet.fromCatalogs(inlineCatalogs(catalogBlocksOf(document)));
|
|
20268
|
-
|
|
20269
|
-
|
|
20506
|
+
inlineGate = yield* inlineReleaseAge(document);
|
|
20507
|
+
const injection = yield* hooks.inject(root, configDependenciesOf(document), inline.entries);
|
|
20508
|
+
injected = CatalogSet.fromCatalogs(injection.catalogs);
|
|
20509
|
+
hookGate = injection.releaseAge;
|
|
20270
20510
|
} else {
|
|
20271
20511
|
const manifestPath = path.join(root, "package.json");
|
|
20272
|
-
if (!(yield* probeExists(manifestPath))) return
|
|
20512
|
+
if (!(yield* probeExists(manifestPath))) return {
|
|
20513
|
+
catalogs: fromLockfile,
|
|
20514
|
+
releaseAgeGate: ReleaseAgeGate.combine()
|
|
20515
|
+
};
|
|
20273
20516
|
const text = yield* fs.readFileString(manifestPath).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
|
|
20274
20517
|
source: "manifest",
|
|
20275
20518
|
path: manifestPath,
|
|
@@ -20279,20 +20522,28 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
20279
20522
|
injected = CatalogSet.empty();
|
|
20280
20523
|
}
|
|
20281
20524
|
const assembled = CatalogSet.merge(fromLockfile, inline, injected);
|
|
20525
|
+
const releaseAgeGate = ReleaseAgeGate.combine(inlineGate, hookGate);
|
|
20282
20526
|
yield* effect.Effect.logDebug("Catalogs assembled").pipe(effect.Effect.annotateLogs({
|
|
20283
20527
|
"workspace.root": root,
|
|
20284
|
-
"workspace.catalogs": Object.keys(assembled.entries).join(",")
|
|
20528
|
+
"workspace.catalogs": Object.keys(assembled.entries).join(","),
|
|
20529
|
+
"workspace.releaseAgeMinutes": releaseAgeGate.ageMinutes
|
|
20285
20530
|
}));
|
|
20286
|
-
return
|
|
20531
|
+
return {
|
|
20532
|
+
catalogs: assembled,
|
|
20533
|
+
releaseAgeGate
|
|
20534
|
+
};
|
|
20287
20535
|
});
|
|
20288
20536
|
const [resolveOnce, invalidate] = yield* effect.Effect.cachedInvalidateWithTTL(assemble, effect.Duration.infinity);
|
|
20289
20537
|
const memo = effect.Effect.onExit(resolveOnce, (exit) => effect.Exit.isSuccess(exit) ? effect.Effect.void : invalidate);
|
|
20290
20538
|
return {
|
|
20291
20539
|
set: effect.Effect.fn("WorkspaceCatalogs.set")(function* () {
|
|
20292
|
-
return yield* memo;
|
|
20540
|
+
return (yield* memo).catalogs;
|
|
20293
20541
|
}),
|
|
20294
20542
|
resolveSpecifier: effect.Effect.fn("WorkspaceCatalogs.resolveSpecifier")(function* (dependency, specifier) {
|
|
20295
|
-
return (yield* memo).resolveSpecifier(dependency, specifier);
|
|
20543
|
+
return (yield* memo).catalogs.resolveSpecifier(dependency, specifier);
|
|
20544
|
+
}),
|
|
20545
|
+
releaseAgeGate: effect.Effect.fn("WorkspaceCatalogs.releaseAgeGate")(function* () {
|
|
20546
|
+
return (yield* memo).releaseAgeGate;
|
|
20296
20547
|
})
|
|
20297
20548
|
};
|
|
20298
20549
|
});
|
|
@@ -20343,7 +20594,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
20343
20594
|
}));
|
|
20344
20595
|
};
|
|
20345
20596
|
//#endregion
|
|
20346
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20597
|
+
//#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
|
|
20347
20598
|
const EMPTY = Object.freeze(Object.create(null));
|
|
20348
20599
|
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)));
|
|
20349
20600
|
/**
|
|
@@ -20508,7 +20759,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
|
|
|
20508
20759
|
}
|
|
20509
20760
|
};
|
|
20510
20761
|
//#endregion
|
|
20511
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20762
|
+
//#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
|
|
20512
20763
|
/** Whether `value` is a non-null, non-array object. */
|
|
20513
20764
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20514
20765
|
/** Whether every value in a record is a string — a usable dependency map. */
|
|
@@ -20700,7 +20951,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
20700
20951
|
static layer = (options) => effect.Layer.effect(WorkspaceSnapshots, WorkspaceSnapshots.make(options));
|
|
20701
20952
|
};
|
|
20702
20953
|
//#endregion
|
|
20703
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20954
|
+
//#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
|
|
20704
20955
|
/**
|
|
20705
20956
|
* Every service that needs only a filesystem: root, package-manager detection,
|
|
20706
20957
|
* discovery, lockfile reading, catalogs and publishability.
|