@savvy-web/silk 3.0.2 → 3.0.4
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 +758 -387
- package/changesets-changelog.d.cts +84 -15
- package/changesets-changelog.d.ts +84 -15
- package/changesets-changelog.js +776 -392
- package/changesets-markdownlint.cjs +758 -387
- package/changesets-markdownlint.d.cts +84 -15
- package/changesets-markdownlint.d.ts +84 -15
- package/changesets-markdownlint.js +776 -392
- package/package.json +5 -5
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
|
@@ -18,7 +18,6 @@ import { basename as basename$1, dirname as dirname$1, isAbsolute as isAbsolute$
|
|
|
18
18
|
import { fileURLToPath as fileURLToPath$1 } from "url";
|
|
19
19
|
import { createRequire as createRequire$1 } from "module";
|
|
20
20
|
import Range from "semver/classes/range.js";
|
|
21
|
-
import * as cp from "node:child_process";
|
|
22
21
|
import { spawn } from "node:child_process";
|
|
23
22
|
import { pipeline } from "node:stream/promises";
|
|
24
23
|
import { PassThrough } from "node:stream";
|
|
@@ -436,7 +435,7 @@ const trimTrailingSlashes = (s) => {
|
|
|
436
435
|
};
|
|
437
436
|
|
|
438
437
|
//#endregion
|
|
439
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
438
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/limits.js
|
|
440
439
|
/** Hard cap on pattern length. Upstream minimatch's MAX_PATTERN_LENGTH (64KB). */
|
|
441
440
|
const MAX_PATTERN_LENGTH = 1024 * 64;
|
|
442
441
|
/** Default brace-expansion output budget. Upstream brace-expansion's EXPANSION_MAX. */
|
|
@@ -471,7 +470,7 @@ const assertCap = (name, value) => {
|
|
|
471
470
|
};
|
|
472
471
|
|
|
473
472
|
//#endregion
|
|
474
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
473
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/unescape.js
|
|
475
474
|
/**
|
|
476
475
|
* Un-escape a string that has been escaped with `escape`.
|
|
477
476
|
*
|
|
@@ -495,12 +494,12 @@ const unescapePattern = (s, { windowsPathsNoEscape = false, magicalBraces = true
|
|
|
495
494
|
};
|
|
496
495
|
|
|
497
496
|
//#endregion
|
|
498
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
497
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/types.js
|
|
499
498
|
/** The globstar marker in a compiled pattern set. */
|
|
500
499
|
const GLOBSTAR = Symbol("globstar **");
|
|
501
500
|
|
|
502
501
|
//#endregion
|
|
503
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
502
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/escape.js
|
|
504
503
|
/**
|
|
505
504
|
* Escape all magic characters in a glob pattern.
|
|
506
505
|
*
|
|
@@ -519,14 +518,14 @@ const escapePattern = (s, { windowsPathsNoEscape = false, magicalBraces = false
|
|
|
519
518
|
};
|
|
520
519
|
|
|
521
520
|
//#endregion
|
|
522
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
521
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/assertValidPattern.js
|
|
523
522
|
const assertValidPattern = (pattern) => {
|
|
524
523
|
if (typeof pattern !== "string") throw new TypeError("invalid pattern");
|
|
525
524
|
if (pattern.length > 65536) throw new GuardExceeded("PatternTooLong", MAX_PATTERN_LENGTH, pattern.length);
|
|
526
525
|
};
|
|
527
526
|
|
|
528
527
|
//#endregion
|
|
529
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
528
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpressions.js
|
|
530
529
|
const posixClasses = {
|
|
531
530
|
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
532
531
|
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
@@ -650,7 +649,7 @@ const parseClass = (glob, position) => {
|
|
|
650
649
|
};
|
|
651
650
|
|
|
652
651
|
//#endregion
|
|
653
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
652
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/ast.js
|
|
654
653
|
const types = /* @__PURE__ */ new Set([
|
|
655
654
|
"!",
|
|
656
655
|
"?",
|
|
@@ -1168,7 +1167,7 @@ var AST = class AST {
|
|
|
1168
1167
|
};
|
|
1169
1168
|
|
|
1170
1169
|
//#endregion
|
|
1171
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
1170
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/balancedMatch.js
|
|
1172
1171
|
const maybeMatch = (reg, str) => {
|
|
1173
1172
|
const m = str.match(reg);
|
|
1174
1173
|
return m ? m[0] : null;
|
|
@@ -1227,7 +1226,7 @@ const range = (a, b, str) => {
|
|
|
1227
1226
|
};
|
|
1228
1227
|
|
|
1229
1228
|
//#endregion
|
|
1230
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
1229
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpansion.js
|
|
1231
1230
|
const escSlash = `\0SLASH${Math.random()}\0`;
|
|
1232
1231
|
const escOpen = `\0OPEN${Math.random()}\0`;
|
|
1233
1232
|
const escClose = `\0CLOSE${Math.random()}\0`;
|
|
@@ -1375,7 +1374,7 @@ function expand_(str, max, isTopInput, depth) {
|
|
|
1375
1374
|
}
|
|
1376
1375
|
|
|
1377
1376
|
//#endregion
|
|
1378
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
1377
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/minimatch.js
|
|
1379
1378
|
const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
|
|
1380
1379
|
const starDotExtTest = (ext) => (f) => !f.startsWith(".") && f.endsWith(ext);
|
|
1381
1380
|
const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
|
|
@@ -1947,7 +1946,7 @@ var Minimatch = class {
|
|
|
1947
1946
|
};
|
|
1948
1947
|
|
|
1949
1948
|
//#endregion
|
|
1950
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
1949
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobPattern.js
|
|
1951
1950
|
/**
|
|
1952
1951
|
* Typed failure raised when a glob pattern trips a compile-time guard:
|
|
1953
1952
|
* over-length, brace-expansion budget exhaustion, or nesting past the depth
|
|
@@ -2200,7 +2199,7 @@ var GlobPattern = class GlobPattern extends Schema.Class("GlobPattern")(Schema.S
|
|
|
2200
2199
|
};
|
|
2201
2200
|
|
|
2202
2201
|
//#endregion
|
|
2203
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
2202
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobSet.js
|
|
2204
2203
|
const exclusionTarget = (pattern) => pattern.startsWith("!") ? pattern.slice(1) : void 0;
|
|
2205
2204
|
const allCompileUnderDefaults = (patterns) => {
|
|
2206
2205
|
for (const pattern of patterns) {
|
|
@@ -2329,7 +2328,7 @@ var GlobSet = class GlobSet extends Schema.Class("GlobSet")(Schema.Struct({ patt
|
|
|
2329
2328
|
};
|
|
2330
2329
|
|
|
2331
2330
|
//#endregion
|
|
2332
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
2331
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/BunExtension.js
|
|
2333
2332
|
/**
|
|
2334
2333
|
* Extension data specific to bun lockfiles, attached to `Lockfile.extension`
|
|
2335
2334
|
* when the format is `"bun"`.
|
|
@@ -2351,7 +2350,7 @@ var BunExtension = class extends Schema.Class("BunExtension")({
|
|
|
2351
2350
|
}) {};
|
|
2352
2351
|
|
|
2353
2352
|
//#endregion
|
|
2354
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
2353
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/CatalogResolver.js
|
|
2355
2354
|
/**
|
|
2356
2355
|
* Contract for resolving pnpm `catalog:` dependency specifiers to concrete
|
|
2357
2356
|
* version ranges.
|
|
@@ -2398,7 +2397,7 @@ var CatalogResolver = class CatalogResolver extends Context.Service()("@effected
|
|
|
2398
2397
|
};
|
|
2399
2398
|
|
|
2400
2399
|
//#endregion
|
|
2401
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
2400
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/WorkspaceResolver.js
|
|
2402
2401
|
/**
|
|
2403
2402
|
* Raised when a `catalog:` or `workspace:` specifier cannot be resolved
|
|
2404
2403
|
* because the resolution mechanism itself failed — not for an ordinary
|
|
@@ -2460,7 +2459,7 @@ var WorkspaceResolver = class WorkspaceResolver extends Context.Service()("@effe
|
|
|
2460
2459
|
};
|
|
2461
2460
|
|
|
2462
2461
|
//#endregion
|
|
2463
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
2462
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/CatalogAssemblyError.js
|
|
2464
2463
|
/**
|
|
2465
2464
|
* Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
|
|
2466
2465
|
* that is unreadable or not valid YAML, a root `package.json` `workspaces` field
|
|
@@ -2505,7 +2504,7 @@ var CatalogAssemblyError = class extends Schema.TaggedErrorClass()("CatalogAssem
|
|
|
2505
2504
|
};
|
|
2506
2505
|
|
|
2507
2506
|
//#endregion
|
|
2508
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
2507
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/DependencySection.js
|
|
2509
2508
|
/**
|
|
2510
2509
|
* The short dependency kind: which dependency map an entry came from, named the
|
|
2511
2510
|
* way consumers branch on it.
|
|
@@ -2539,7 +2538,7 @@ const KIND_TO_FIELD = {
|
|
|
2539
2538
|
const FIELD_TO_KIND = Object.fromEntries(Object.entries(KIND_TO_FIELD).map(([kind, field]) => [field, kind]));
|
|
2540
2539
|
|
|
2541
2540
|
//#endregion
|
|
2542
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
2541
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/desugar.js
|
|
2543
2542
|
const sv = (major, minor, patch, prerelease = [], build = []) => ({
|
|
2544
2543
|
major,
|
|
2545
2544
|
minor,
|
|
@@ -2629,7 +2628,7 @@ const desugarHyphen = (lower, upper) => {
|
|
|
2629
2628
|
};
|
|
2630
2629
|
|
|
2631
2630
|
//#endregion
|
|
2632
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
2631
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/grammar.js
|
|
2633
2632
|
/** Private control-flow exception; never escapes the entry points. */
|
|
2634
2633
|
var ParseFailure = class {
|
|
2635
2634
|
position;
|
|
@@ -3025,7 +3024,7 @@ const formatComparator = (c) => {
|
|
|
3025
3024
|
const formatRange = (sets) => sets.map((set) => set.map(formatComparator).join(" ")).join(" || ");
|
|
3026
3025
|
|
|
3027
3026
|
//#endregion
|
|
3028
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
3027
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/order.js
|
|
3029
3028
|
/**
|
|
3030
3029
|
* Compare two prerelease identifiers per SemVer 2.0.0 §11: numeric
|
|
3031
3030
|
* identifiers always have lower precedence than alphanumeric ones; numerics
|
|
@@ -3079,7 +3078,7 @@ const compareBuild = (a, b) => {
|
|
|
3079
3078
|
};
|
|
3080
3079
|
|
|
3081
3080
|
//#endregion
|
|
3082
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
3081
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/SemVer.js
|
|
3083
3082
|
/**
|
|
3084
3083
|
* Indicates that a string could not be parsed as a valid SemVer 2.0.0 version.
|
|
3085
3084
|
*
|
|
@@ -3481,7 +3480,7 @@ var SemVerBump = class {
|
|
|
3481
3480
|
};
|
|
3482
3481
|
|
|
3483
3482
|
//#endregion
|
|
3484
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
3483
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/Comparator.js
|
|
3485
3484
|
/**
|
|
3486
3485
|
* Indicates that a string could not be parsed as a single comparator.
|
|
3487
3486
|
*
|
|
@@ -3582,7 +3581,7 @@ var Comparator = class Comparator extends Schema.Class("Comparator")({
|
|
|
3582
3581
|
};
|
|
3583
3582
|
|
|
3584
3583
|
//#endregion
|
|
3585
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
3584
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/normalize.js
|
|
3586
3585
|
const operatorWeight = (op) => {
|
|
3587
3586
|
switch (op) {
|
|
3588
3587
|
case ">=": return 0;
|
|
@@ -3614,7 +3613,7 @@ const normalizeComparatorSet = (set) => sortComparators(removeDuplicates(set));
|
|
|
3614
3613
|
const normalizeSets = (sets) => sets.map(normalizeComparatorSet);
|
|
3615
3614
|
|
|
3616
3615
|
//#endregion
|
|
3617
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
3616
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/Range.js
|
|
3618
3617
|
/**
|
|
3619
3618
|
* Indicates that a string could not be parsed as a range expression.
|
|
3620
3619
|
*
|
|
@@ -3884,7 +3883,7 @@ const isComparatorSetSubset = (sub, sup) => {
|
|
|
3884
3883
|
};
|
|
3885
3884
|
|
|
3886
3885
|
//#endregion
|
|
3887
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
3886
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/DependencySpecifier.js
|
|
3888
3887
|
/**
|
|
3889
3888
|
* Indicates that a string could not be parsed as a valid dependency specifier.
|
|
3890
3889
|
*
|
|
@@ -4092,7 +4091,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
|
|
|
4092
4091
|
});
|
|
4093
4092
|
|
|
4094
4093
|
//#endregion
|
|
4095
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
4094
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.2.1_@effected+semver@0.1.1_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/npm/IntegrityHash.js
|
|
4096
4095
|
const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
|
|
4097
4096
|
const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
|
|
4098
4097
|
const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
|
|
@@ -4146,7 +4145,7 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
|
|
|
4146
4145
|
});
|
|
4147
4146
|
|
|
4148
4147
|
//#endregion
|
|
4149
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4148
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/ImporterDependency.js
|
|
4150
4149
|
/**
|
|
4151
4150
|
* One declared dependency of one workspace importer, as the lockfile records it.
|
|
4152
4151
|
*
|
|
@@ -4175,7 +4174,7 @@ var ImporterDependency = class extends Schema.Class("ImporterDependency")({
|
|
|
4175
4174
|
}) {};
|
|
4176
4175
|
|
|
4177
4176
|
//#endregion
|
|
4178
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4177
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/LockfileImporter.js
|
|
4179
4178
|
/**
|
|
4180
4179
|
* One workspace importer's declared dependencies, as the lockfile records them.
|
|
4181
4180
|
*
|
|
@@ -4200,7 +4199,7 @@ var LockfileImporter = class extends Schema.Class("LockfileImporter")({
|
|
|
4200
4199
|
}) {};
|
|
4201
4200
|
|
|
4202
4201
|
//#endregion
|
|
4203
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4202
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/ResolvedPackage.js
|
|
4204
4203
|
const EMPTY_DEPENDENCIES = {};
|
|
4205
4204
|
/**
|
|
4206
4205
|
* A package resolved from a lockfile.
|
|
@@ -4236,7 +4235,7 @@ var ResolvedPackage = class extends Schema.Class("ResolvedPackage")({
|
|
|
4236
4235
|
}) {};
|
|
4237
4236
|
|
|
4238
4237
|
//#endregion
|
|
4239
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4238
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/WorkspaceDependency.js
|
|
4240
4239
|
/**
|
|
4241
4240
|
* A directed dependency edge between two workspace packages as recorded in
|
|
4242
4241
|
* the lockfile.
|
|
@@ -4259,7 +4258,7 @@ var WorkspaceDependency = class extends Schema.Class("WorkspaceDependency")({
|
|
|
4259
4258
|
}) {};
|
|
4260
4259
|
|
|
4261
4260
|
//#endregion
|
|
4262
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4261
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/PnpmExtension.js
|
|
4263
4262
|
/**
|
|
4264
4263
|
* Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
|
|
4265
4264
|
* when the format is `"pnpm"`.
|
|
@@ -4285,7 +4284,7 @@ var PnpmExtension = class extends Schema.Class("PnpmExtension")({
|
|
|
4285
4284
|
}) {};
|
|
4286
4285
|
|
|
4287
4286
|
//#endregion
|
|
4288
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4287
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/LockfileFormat.js
|
|
4289
4288
|
/**
|
|
4290
4289
|
* The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
|
|
4291
4290
|
* `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
|
|
@@ -4320,7 +4319,7 @@ const FILENAMES = {
|
|
|
4320
4319
|
const filenameFor = (format) => FILENAMES[format];
|
|
4321
4320
|
|
|
4322
4321
|
//#endregion
|
|
4323
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4322
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/shared.js
|
|
4324
4323
|
/**
|
|
4325
4324
|
* The four dependency sections of a manifest, in a stable order — the shared
|
|
4326
4325
|
* dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
|
|
@@ -4447,7 +4446,7 @@ const extractWorkspaceDeps = (workspaces, workspaceNames) => {
|
|
|
4447
4446
|
};
|
|
4448
4447
|
|
|
4449
4448
|
//#endregion
|
|
4450
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4449
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncNode.js
|
|
4451
4450
|
/**
|
|
4452
4451
|
* Discriminator values for JSONC AST node types: the JSON value types
|
|
4453
4452
|
* (`string`/`number`/`boolean`/`null`), the structural types
|
|
@@ -4623,7 +4622,7 @@ function evaluateNode(node, depth) {
|
|
|
4623
4622
|
}
|
|
4624
4623
|
|
|
4625
4624
|
//#endregion
|
|
4626
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4625
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/scanner.js
|
|
4627
4626
|
const isWhitespace = (ch) => ch === 32 || ch === 9 || ch === 11 || ch === 12 || ch === 160 || ch === 65279;
|
|
4628
4627
|
const isLineBreak$1 = (ch) => ch === 10 || ch === 13 || ch === 8232 || ch === 8233;
|
|
4629
4628
|
const isDigit$1 = (ch) => ch >= 48 && ch <= 57;
|
|
@@ -4920,7 +4919,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
|
|
|
4920
4919
|
};
|
|
4921
4920
|
|
|
4922
4921
|
//#endregion
|
|
4923
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4922
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/skip.js
|
|
4924
4923
|
/**
|
|
4925
4924
|
* Iteratively consume the value beginning at the cursor's current token and
|
|
4926
4925
|
* return its tight end offset (excludes trailing whitespace/comments).
|
|
@@ -4951,7 +4950,7 @@ const skipBalancedValue = (cursor) => {
|
|
|
4951
4950
|
};
|
|
4952
4951
|
|
|
4953
4952
|
//#endregion
|
|
4954
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4953
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/parser.js
|
|
4955
4954
|
/**
|
|
4956
4955
|
* The public parse-error code vocabulary. The facade builds its `@public`
|
|
4957
4956
|
* `JsoncParseErrorCode` schema from this array; the parser produces these codes
|
|
@@ -5365,7 +5364,7 @@ const parseTree$2 = (text, flags) => {
|
|
|
5365
5364
|
};
|
|
5366
5365
|
|
|
5367
5366
|
//#endregion
|
|
5368
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
5367
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/Jsonc.js
|
|
5369
5368
|
/**
|
|
5370
5369
|
* The single public parse-error code vocabulary, appearing as the `code` field
|
|
5371
5370
|
* of {@link JsoncParseErrorDetail}.
|
|
@@ -5424,6 +5423,58 @@ var JsoncParseOptions = class extends Schema.Class("JsoncParseOptions")({
|
|
|
5424
5423
|
allowTrailingComma: Schema.optionalKey(Schema.Boolean),
|
|
5425
5424
|
allowEmptyContent: Schema.optionalKey(Schema.Boolean)
|
|
5426
5425
|
}) {};
|
|
5426
|
+
/**
|
|
5427
|
+
* The public stringify-error code vocabulary, appearing as the `code` field of
|
|
5428
|
+
* {@link JsoncStringifyError}:
|
|
5429
|
+
*
|
|
5430
|
+
* - `CircularReference` — the value contains a reference cycle, so no finite
|
|
5431
|
+
* JSON text exists for it.
|
|
5432
|
+
* - `BigIntValue` — the value contains a `bigint` (anywhere, top-level or
|
|
5433
|
+
* nested), which JSON cannot represent.
|
|
5434
|
+
* - `TopLevelUnrepresentable` — the top-level value (`undefined`, a function
|
|
5435
|
+
* or a symbol) serializes to no output at all.
|
|
5436
|
+
*
|
|
5437
|
+
* @public
|
|
5438
|
+
*/
|
|
5439
|
+
const JsoncStringifyErrorCode = Schema.Literals([
|
|
5440
|
+
"CircularReference",
|
|
5441
|
+
"BigIntValue",
|
|
5442
|
+
"TopLevelUnrepresentable"
|
|
5443
|
+
]);
|
|
5444
|
+
/**
|
|
5445
|
+
* Options controlling stringify behavior. All fields are omissible; the
|
|
5446
|
+
* vocabulary matches `JsoncFormattingOptions`.
|
|
5447
|
+
*
|
|
5448
|
+
* - `tabSize` — the indent width in spaces when `insertSpaces` is `true`.
|
|
5449
|
+
* Defaults to `2`; `0` produces compact single-line output.
|
|
5450
|
+
* - `insertSpaces` — indent with spaces (`tabSize` of them) when `true`, or a
|
|
5451
|
+
* single tab character when `false`. Defaults to `true`.
|
|
5452
|
+
*
|
|
5453
|
+
* @public
|
|
5454
|
+
*/
|
|
5455
|
+
var JsoncStringifyOptions = class extends Schema.Class("JsoncStringifyOptions")({
|
|
5456
|
+
tabSize: Schema.optionalKey(Schema.Number),
|
|
5457
|
+
insertSpaces: Schema.optionalKey(Schema.Boolean)
|
|
5458
|
+
}) {};
|
|
5459
|
+
/**
|
|
5460
|
+
* Stringification failure: a `JsoncStringifyErrorCode` naming the
|
|
5461
|
+
* failure mode, a human-readable `detail` (the engine's message for thrown
|
|
5462
|
+
* cases — on V8 the circular-reference message includes the offending property
|
|
5463
|
+
* path), and the offending `value`. Raised by {@link Jsonc.stringify},
|
|
5464
|
+
* {@link Jsonc.stringifyResult} and the encode direction of the schema
|
|
5465
|
+
* factories.
|
|
5466
|
+
*
|
|
5467
|
+
* @public
|
|
5468
|
+
*/
|
|
5469
|
+
var JsoncStringifyError = class extends Schema.TaggedErrorClass()("JsoncStringifyError", {
|
|
5470
|
+
code: JsoncStringifyErrorCode,
|
|
5471
|
+
detail: Schema.String,
|
|
5472
|
+
value: Schema.Unknown
|
|
5473
|
+
}) {
|
|
5474
|
+
get message() {
|
|
5475
|
+
return `JSONC stringify failed: ${this.code} — ${this.detail}`;
|
|
5476
|
+
}
|
|
5477
|
+
};
|
|
5427
5478
|
const toFlags = (options) => options === void 0 ? {} : {
|
|
5428
5479
|
disallowComments: options.disallowComments,
|
|
5429
5480
|
allowTrailingComma: options.allowTrailingComma,
|
|
@@ -5504,9 +5555,56 @@ const deepEqual = (a, b, depth = 0) => {
|
|
|
5504
5555
|
var Jsonc = class Jsonc {
|
|
5505
5556
|
constructor() {}
|
|
5506
5557
|
/**
|
|
5558
|
+
* Parse JSONC into a plain JavaScript value, synchronously, returning a
|
|
5559
|
+
* `Result` instead of an `Effect`. Same error-recovery semantics as
|
|
5560
|
+
* {@link Jsonc.parse}: every parse error is collected and the failure side
|
|
5561
|
+
* carries one aggregate {@link JsoncParseError}. Pure — parsing is
|
|
5562
|
+
* fundamentally synchronous, so non-Effect consumers (a plain config
|
|
5563
|
+
* loader, a build script) can call this directly instead of wrapping
|
|
5564
|
+
* `Effect.runSync(Effect.result(Jsonc.parse(text)))`.
|
|
5565
|
+
*
|
|
5566
|
+
* @remarks
|
|
5567
|
+
* {@link Jsonc.parse} is defined in terms of this function; the two never
|
|
5568
|
+
* diverge. Reach for the `Effect` variant inside Effect code — it carries
|
|
5569
|
+
* the `Jsonc.parse` tracing span — and for this one at synchronous
|
|
5570
|
+
* boundaries.
|
|
5571
|
+
*
|
|
5572
|
+
* @example
|
|
5573
|
+
* ```ts
|
|
5574
|
+
* import { Jsonc } from "@effected/jsonc";
|
|
5575
|
+
* import { Result } from "effect";
|
|
5576
|
+
*
|
|
5577
|
+
* const ok = Jsonc.parseResult('{ "port": 3000 // dev\n }');
|
|
5578
|
+
* if (Result.isSuccess(ok)) {
|
|
5579
|
+
* console.log(ok.success); // => { port: 3000 }
|
|
5580
|
+
* }
|
|
5581
|
+
*
|
|
5582
|
+
* const bad = Jsonc.parseResult("{ bad }");
|
|
5583
|
+
* if (Result.isFailure(bad)) {
|
|
5584
|
+
* console.log(bad.failure._tag); // => "JsoncParseError"
|
|
5585
|
+
* }
|
|
5586
|
+
* ```
|
|
5587
|
+
*
|
|
5588
|
+
* @param text - The JSONC source to parse.
|
|
5589
|
+
* @param options - Optional {@link JsoncParseOptions}; defaults apply for
|
|
5590
|
+
* omitted fields.
|
|
5591
|
+
* @returns A `Result` succeeding with the decoded value (`unknown`, never
|
|
5592
|
+
* `any`), or failing with the aggregate {@link JsoncParseError}.
|
|
5593
|
+
*/
|
|
5594
|
+
static parseResult(text, options) {
|
|
5595
|
+
const { value, errors } = parseValue(text, toFlags(options));
|
|
5596
|
+
if (errors.length > 0) return Result.fail(new JsoncParseError({
|
|
5597
|
+
errors: toDetails(text, errors),
|
|
5598
|
+
input: text
|
|
5599
|
+
}));
|
|
5600
|
+
return Result.succeed(value);
|
|
5601
|
+
}
|
|
5602
|
+
/**
|
|
5507
5603
|
* Parse JSONC into a plain JavaScript value. Error-recovery parsing:
|
|
5508
5604
|
* collects every parse error and fails once with the aggregate
|
|
5509
|
-
* {@link JsoncParseError}. Returns `unknown`, never `any`.
|
|
5605
|
+
* {@link JsoncParseError}. Returns `unknown`, never `any`. Defined in terms
|
|
5606
|
+
* of {@link Jsonc.parseResult} — synchronous callers can use that variant
|
|
5607
|
+
* directly.
|
|
5510
5608
|
*
|
|
5511
5609
|
* @param text - The JSONC source to parse.
|
|
5512
5610
|
* @param options - Optional {@link JsoncParseOptions}; defaults apply for
|
|
@@ -5514,14 +5612,7 @@ var Jsonc = class Jsonc {
|
|
|
5514
5612
|
* @returns An `Effect` that succeeds with the decoded value, or fails with
|
|
5515
5613
|
* the aggregate {@link JsoncParseError}.
|
|
5516
5614
|
*/
|
|
5517
|
-
static parse = Effect.fn("Jsonc.parse")(
|
|
5518
|
-
const { value, errors } = parseValue(text, toFlags(options));
|
|
5519
|
-
if (errors.length > 0) return yield* new JsoncParseError({
|
|
5520
|
-
errors: toDetails(text, errors),
|
|
5521
|
-
input: text
|
|
5522
|
-
});
|
|
5523
|
-
return value;
|
|
5524
|
-
});
|
|
5615
|
+
static parse = Effect.fn("Jsonc.parse")((text, options) => Effect.fromResult(Jsonc.parseResult(text, options)));
|
|
5525
5616
|
/**
|
|
5526
5617
|
* Parse JSONC into an immutable {@link JsoncNode} AST. `Option.none()` for
|
|
5527
5618
|
* empty input (with `allowEmptyContent`); the aggregate
|
|
@@ -5543,6 +5634,95 @@ var Jsonc = class Jsonc {
|
|
|
5543
5634
|
return root !== void 0 ? Option.some(root) : Option.none();
|
|
5544
5635
|
});
|
|
5545
5636
|
/**
|
|
5637
|
+
* Stringify a plain JavaScript value as JSON text, synchronously, returning
|
|
5638
|
+
* a `Result` instead of an `Effect`. With no options the output is
|
|
5639
|
+
* byte-identical to `JSON.stringify(value, null, 2)`.
|
|
5640
|
+
*
|
|
5641
|
+
* Plain JSON emission: JSONC comments exist only in the document/edit layer
|
|
5642
|
+
* (`JsoncNode`, `JsoncEdit`, `JsoncFormatter`), so no comment survives — or
|
|
5643
|
+
* can be produced by — value-level stringification.
|
|
5644
|
+
*
|
|
5645
|
+
* Nested unrepresentable values follow `JSON.stringify`'s documented
|
|
5646
|
+
* semantics: `undefined`, functions and symbols are dropped from objects and
|
|
5647
|
+
* become `null` in arrays. The typed failure channel covers only the cases
|
|
5648
|
+
* where output would be absent or an exception thrown — see
|
|
5649
|
+
* `JsoncStringifyErrorCode`. A throwing `toJSON` method or getter is
|
|
5650
|
+
* caller code failing and rethrows as a defect, never a typed error.
|
|
5651
|
+
*
|
|
5652
|
+
* @remarks
|
|
5653
|
+
* {@link Jsonc.stringify} is defined in terms of this function; the two
|
|
5654
|
+
* never diverge. Reach for the `Effect` variant inside Effect code — it
|
|
5655
|
+
* carries the `Jsonc.stringify` tracing span — and for this one at
|
|
5656
|
+
* synchronous boundaries.
|
|
5657
|
+
*
|
|
5658
|
+
* @example
|
|
5659
|
+
* ```ts
|
|
5660
|
+
* import { Jsonc } from "@effected/jsonc";
|
|
5661
|
+
* import { Result } from "effect";
|
|
5662
|
+
*
|
|
5663
|
+
* const ok = Jsonc.stringifyResult({ port: 3000 });
|
|
5664
|
+
* if (Result.isSuccess(ok)) {
|
|
5665
|
+
* console.log(ok.success); // => '{\n "port": 3000\n}'
|
|
5666
|
+
* }
|
|
5667
|
+
*
|
|
5668
|
+
* const bad = Jsonc.stringifyResult(0n);
|
|
5669
|
+
* if (Result.isFailure(bad)) {
|
|
5670
|
+
* console.log(bad.failure.code); // => "BigIntValue"
|
|
5671
|
+
* }
|
|
5672
|
+
* ```
|
|
5673
|
+
*
|
|
5674
|
+
* @param value - The plain JavaScript value to stringify.
|
|
5675
|
+
* @param options - Optional {@link JsoncStringifyOptions}; defaults apply
|
|
5676
|
+
* for omitted fields.
|
|
5677
|
+
* @returns A `Result` succeeding with the JSON text, or failing with a
|
|
5678
|
+
* {@link JsoncStringifyError}.
|
|
5679
|
+
*/
|
|
5680
|
+
static stringifyResult(value, options) {
|
|
5681
|
+
const space = options?.insertSpaces === false ? " " : options?.tabSize ?? 2;
|
|
5682
|
+
let text;
|
|
5683
|
+
try {
|
|
5684
|
+
text = JSON.stringify(value, null, space);
|
|
5685
|
+
} catch (defect) {
|
|
5686
|
+
if (defect instanceof TypeError) {
|
|
5687
|
+
if (/circular|cyclic/i.test(defect.message)) return Result.fail(new JsoncStringifyError({
|
|
5688
|
+
code: "CircularReference",
|
|
5689
|
+
detail: defect.message,
|
|
5690
|
+
value
|
|
5691
|
+
}));
|
|
5692
|
+
if (/bigint/i.test(defect.message)) return Result.fail(new JsoncStringifyError({
|
|
5693
|
+
code: "BigIntValue",
|
|
5694
|
+
detail: defect.message,
|
|
5695
|
+
value
|
|
5696
|
+
}));
|
|
5697
|
+
}
|
|
5698
|
+
throw defect;
|
|
5699
|
+
}
|
|
5700
|
+
if (text === void 0) return Result.fail(new JsoncStringifyError({
|
|
5701
|
+
code: "TopLevelUnrepresentable",
|
|
5702
|
+
detail: "the top-level value (undefined, a function or a symbol) has no JSON representation",
|
|
5703
|
+
value
|
|
5704
|
+
}));
|
|
5705
|
+
return Result.succeed(text);
|
|
5706
|
+
}
|
|
5707
|
+
/**
|
|
5708
|
+
* Stringify a plain JavaScript value as JSON text. With no options the
|
|
5709
|
+
* output is byte-identical to `JSON.stringify(value, null, 2)`. Fails with
|
|
5710
|
+
* {@link JsoncStringifyError} on circular references, `bigint` values and a
|
|
5711
|
+
* top-level value with no JSON representation; nested `undefined`, functions
|
|
5712
|
+
* and symbols follow `JSON.stringify`'s documented semantics (dropped from
|
|
5713
|
+
* objects, `null` in arrays). Comments are a document/edit-layer concern —
|
|
5714
|
+
* value-level stringification never emits them. Defined in terms of
|
|
5715
|
+
* {@link Jsonc.stringifyResult} — synchronous callers can use that variant
|
|
5716
|
+
* directly.
|
|
5717
|
+
*
|
|
5718
|
+
* @param value - The plain JavaScript value to stringify.
|
|
5719
|
+
* @param options - Optional {@link JsoncStringifyOptions}; defaults apply
|
|
5720
|
+
* for omitted fields.
|
|
5721
|
+
* @returns An `Effect` that succeeds with the JSON text, or fails with a
|
|
5722
|
+
* {@link JsoncStringifyError}.
|
|
5723
|
+
*/
|
|
5724
|
+
static stringify = Effect.fn("Jsonc.stringify")((value, options) => Effect.fromResult(Jsonc.stringifyResult(value, options)));
|
|
5725
|
+
/**
|
|
5546
5726
|
* Remove all comments from JSONC, producing valid JSON. Pass a `replaceCh`
|
|
5547
5727
|
* (e.g. `" "`) to replace each comment character instead of deleting it,
|
|
5548
5728
|
* keeping all offsets stable (line breaks inside block comments are kept).
|
|
@@ -5609,8 +5789,11 @@ var Jsonc = class Jsonc {
|
|
|
5609
5789
|
}
|
|
5610
5790
|
/**
|
|
5611
5791
|
* A `Schema<unknown, string>` decoding JSONC with the given `options`
|
|
5612
|
-
* (defaults when omitted). Encoding is
|
|
5613
|
-
*
|
|
5792
|
+
* (defaults when omitted). Encoding is {@link Jsonc.stringifyResult} with
|
|
5793
|
+
* default options (2-space indent, byte-identical to
|
|
5794
|
+
* `JSON.stringify(value, null, 2)`), so comments do not survive a
|
|
5795
|
+
* round-trip encode; a {@link JsoncStringifyError} on the encode side
|
|
5796
|
+
* surfaces as a schema issue.
|
|
5614
5797
|
*
|
|
5615
5798
|
* @remarks
|
|
5616
5799
|
* Schema-producing: each call returns a fresh schema whose derivation caches
|
|
@@ -5637,7 +5820,7 @@ var Jsonc = class Jsonc {
|
|
|
5637
5820
|
}
|
|
5638
5821
|
return Effect.succeed(value);
|
|
5639
5822
|
},
|
|
5640
|
-
encode: (value) => Effect.
|
|
5823
|
+
encode: (value) => Effect.fromResult(Jsonc.stringifyResult(value)).pipe(Effect.mapError((error) => new SchemaIssue.InvalidValue(Option.some(value), { message: error.message })))
|
|
5641
5824
|
})));
|
|
5642
5825
|
}
|
|
5643
5826
|
/**
|
|
@@ -5663,10 +5846,53 @@ var Jsonc = class Jsonc {
|
|
|
5663
5846
|
static schema(target, options) {
|
|
5664
5847
|
return Jsonc.fromString(options).pipe(Schema.decodeTo(target));
|
|
5665
5848
|
}
|
|
5849
|
+
/**
|
|
5850
|
+
* Bind a target schema to the JSONC codec once, yielding the composed
|
|
5851
|
+
* schema plus pre-derived `decode`/`encode` directions — the
|
|
5852
|
+
* {@link Jsonc.schema} composition without the generic `Schema` machinery
|
|
5853
|
+
* at every use site. Binds the plain form only: default
|
|
5854
|
+
* {@link JsoncParseOptions} on decode, default stringify options on encode.
|
|
5855
|
+
*
|
|
5856
|
+
* Both directions fail with `Schema.SchemaError`, exactly as
|
|
5857
|
+
* `Schema.decodeEffect`/`Schema.encodeEffect` over {@link Jsonc.schema}
|
|
5858
|
+
* would; the target's decoding/encoding service requirements flow through.
|
|
5859
|
+
*
|
|
5860
|
+
* @remarks
|
|
5861
|
+
* Schema-producing: each call composes a fresh schema and derives both
|
|
5862
|
+
* directions from it. Bind the result to a `const` — that single binding is
|
|
5863
|
+
* the point.
|
|
5864
|
+
*
|
|
5865
|
+
* @example
|
|
5866
|
+
* ```ts
|
|
5867
|
+
* import { Jsonc } from "@effected/jsonc";
|
|
5868
|
+
* import { Effect, Schema } from "effect";
|
|
5869
|
+
*
|
|
5870
|
+
* const Config = Schema.Struct({ port: Schema.Number });
|
|
5871
|
+
* const config = Jsonc.bind(Config);
|
|
5872
|
+
*
|
|
5873
|
+
* const program = Effect.gen(function* () {
|
|
5874
|
+
* const value = yield* config.decode('{ "port": 3000 // dev\n }');
|
|
5875
|
+
* const text = yield* config.encode(value);
|
|
5876
|
+
* return [value, text] as const;
|
|
5877
|
+
* });
|
|
5878
|
+
* ```
|
|
5879
|
+
*
|
|
5880
|
+
* @param target - The domain schema decoded values must satisfy.
|
|
5881
|
+
* @returns A {@link JsoncBoundCodec} carrying the composed schema and its
|
|
5882
|
+
* two pre-bound directions.
|
|
5883
|
+
*/
|
|
5884
|
+
static bind(target) {
|
|
5885
|
+
const schema = Jsonc.schema(target);
|
|
5886
|
+
return {
|
|
5887
|
+
schema,
|
|
5888
|
+
decode: Schema.decodeEffect(schema),
|
|
5889
|
+
encode: Schema.encodeEffect(schema)
|
|
5890
|
+
};
|
|
5891
|
+
}
|
|
5666
5892
|
};
|
|
5667
5893
|
|
|
5668
5894
|
//#endregion
|
|
5669
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
5895
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncEdit.js
|
|
5670
5896
|
/**
|
|
5671
5897
|
* A range within a JSONC document, expressed as a zero-based character
|
|
5672
5898
|
* `offset` and a `length` in UTF-16 code units. Pass to `JsoncFormatter.format`
|
|
@@ -5716,7 +5942,8 @@ var JsoncEdit = class extends Schema.Class("JsoncEdit")({
|
|
|
5716
5942
|
/**
|
|
5717
5943
|
* Apply `edits` to `text`, producing a new string. Edits are applied in
|
|
5718
5944
|
* reverse-offset order so earlier offsets stay valid; the input `edits`
|
|
5719
|
-
* array is not mutated.
|
|
5945
|
+
* array is not mutated. Overlapping edits are a programmer error and throw
|
|
5946
|
+
* as a defect — `JsoncFormatter` never produces them.
|
|
5720
5947
|
*
|
|
5721
5948
|
* @param text - The source text to edit.
|
|
5722
5949
|
* @param edits - The edits to apply, in any order.
|
|
@@ -5724,6 +5951,11 @@ var JsoncEdit = class extends Schema.Class("JsoncEdit")({
|
|
|
5724
5951
|
*/
|
|
5725
5952
|
static applyAll(text, edits) {
|
|
5726
5953
|
const sorted = [...edits].sort((a, b) => b.offset - a.offset);
|
|
5954
|
+
for (let i = 0; i + 1 < sorted.length; i++) {
|
|
5955
|
+
const upper = sorted[i];
|
|
5956
|
+
const lower = sorted[i + 1];
|
|
5957
|
+
if (lower.offset + lower.length > upper.offset) throw new Error(`JsoncEdit.applyAll received overlapping edits at offsets ${lower.offset} and ${upper.offset} — overlapping edits are a programmer error`);
|
|
5958
|
+
}
|
|
5727
5959
|
let result = text;
|
|
5728
5960
|
for (const edit of sorted) result = result.substring(0, edit.offset) + edit.content + result.substring(edit.offset + edit.length);
|
|
5729
5961
|
return result;
|
|
@@ -5731,7 +5963,7 @@ var JsoncEdit = class extends Schema.Class("JsoncEdit")({
|
|
|
5731
5963
|
};
|
|
5732
5964
|
|
|
5733
5965
|
//#endregion
|
|
5734
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
5966
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/navigate.js
|
|
5735
5967
|
/**
|
|
5736
5968
|
* Resolve `path` against `text`, returning where the target is (or where it
|
|
5737
5969
|
* would be inserted). `path` must be non-empty — the whole-document case is
|
|
@@ -5859,7 +6091,7 @@ function navigate(text, path) {
|
|
|
5859
6091
|
}
|
|
5860
6092
|
|
|
5861
6093
|
//#endregion
|
|
5862
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
6094
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncModifier.js
|
|
5863
6095
|
/**
|
|
5864
6096
|
* Raised when `JsoncModifier.modify` cannot navigate the requested path: the
|
|
5865
6097
|
* value at `depth` is not the container kind (`expected`) the next path segment
|
|
@@ -5988,7 +6220,7 @@ var JsoncModifier = class {
|
|
|
5988
6220
|
};
|
|
5989
6221
|
|
|
5990
6222
|
//#endregion
|
|
5991
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
6223
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/bun.js
|
|
5992
6224
|
const DepRecord$2 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
|
|
5993
6225
|
const BunWorkspaceEntry = Schema.Struct({
|
|
5994
6226
|
name: Schema.optionalKey(Schema.String),
|
|
@@ -6082,7 +6314,7 @@ const toFields$3 = (raw) => Effect.gen(function* () {
|
|
|
6082
6314
|
});
|
|
6083
6315
|
|
|
6084
6316
|
//#endregion
|
|
6085
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
6317
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/npm.js
|
|
6086
6318
|
const DepRecord$1 = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
|
|
6087
6319
|
const NpmPackageEntry = Schema.Struct({
|
|
6088
6320
|
name: Schema.optionalKey(Schema.String),
|
|
@@ -6181,7 +6413,7 @@ const toFields$2 = (raw) => Effect.gen(function* () {
|
|
|
6181
6413
|
});
|
|
6182
6414
|
|
|
6183
6415
|
//#endregion
|
|
6184
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
6416
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlNode.js
|
|
6185
6417
|
/**
|
|
6186
6418
|
* YAML scalar presentation styles.
|
|
6187
6419
|
*
|
|
@@ -6574,7 +6806,7 @@ function nodeToValue(node, anchors, budget, counting = false) {
|
|
|
6574
6806
|
}
|
|
6575
6807
|
|
|
6576
6808
|
//#endregion
|
|
6577
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
6809
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/diagnostics.js
|
|
6578
6810
|
/** Error codes emitted by the lexer stage. */
|
|
6579
6811
|
const YAML_LEX_ERROR_CODES = [
|
|
6580
6812
|
"UnexpectedCharacter",
|
|
@@ -6653,7 +6885,7 @@ function isFatalCode(code) {
|
|
|
6653
6885
|
}
|
|
6654
6886
|
|
|
6655
6887
|
//#endregion
|
|
6656
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
6888
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlDiagnostic.js
|
|
6657
6889
|
/**
|
|
6658
6890
|
* Error codes emitted by the lexer stage.
|
|
6659
6891
|
*
|
|
@@ -6775,7 +7007,7 @@ function lineChar(text, offset) {
|
|
|
6775
7007
|
}
|
|
6776
7008
|
|
|
6777
7009
|
//#endregion
|
|
6778
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
7010
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/anchors.js
|
|
6779
7011
|
/**
|
|
6780
7012
|
* Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
|
|
6781
7013
|
* Aliases represent references to existing anchored nodes and cannot have their own anchors.
|
|
@@ -6869,7 +7101,7 @@ function collectAnchors(node, anchors) {
|
|
|
6869
7101
|
}
|
|
6870
7102
|
|
|
6871
7103
|
//#endregion
|
|
6872
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
7104
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/lexer.js
|
|
6873
7105
|
/**
|
|
6874
7106
|
* Create a new YAML scanner for the given source text.
|
|
6875
7107
|
*
|
|
@@ -7827,7 +8059,7 @@ function lexAll(text) {
|
|
|
7827
8059
|
}
|
|
7828
8060
|
|
|
7829
8061
|
//#endregion
|
|
7830
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
8062
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/cst-parser.js
|
|
7831
8063
|
/**
|
|
7832
8064
|
* Hardening: cap CST nesting so hostile inputs cannot overflow the stack
|
|
7833
8065
|
* while the tree is being BUILT. Set slightly above the composer's
|
|
@@ -8540,7 +8772,7 @@ function parseCSTAll(text) {
|
|
|
8540
8772
|
}
|
|
8541
8773
|
|
|
8542
8774
|
//#endregion
|
|
8543
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
8775
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/state.js
|
|
8544
8776
|
let lineStartsText;
|
|
8545
8777
|
let lineStartsCache = [];
|
|
8546
8778
|
function getLineStarts(text) {
|
|
@@ -8647,7 +8879,7 @@ function exitNesting(state) {
|
|
|
8647
8879
|
}
|
|
8648
8880
|
|
|
8649
8881
|
//#endregion
|
|
8650
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
8882
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/tags.js
|
|
8651
8883
|
/**
|
|
8652
8884
|
* Resolve a tag shorthand using the document's %TAG directives.
|
|
8653
8885
|
* For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
|
|
@@ -8734,7 +8966,7 @@ function validateTagHandlesInDocument(docCst, state) {
|
|
|
8734
8966
|
}
|
|
8735
8967
|
|
|
8736
8968
|
//#endregion
|
|
8737
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
8969
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/scalars.js
|
|
8738
8970
|
const NULL_RE$1 = /^(?:null|Null|NULL|~)$/;
|
|
8739
8971
|
const TRUE_RE$1 = /^(?:true|True|TRUE)$/;
|
|
8740
8972
|
const FALSE_RE$1 = /^(?:false|False|FALSE)$/;
|
|
@@ -9613,7 +9845,7 @@ function shouldPreserveRaw(rawValue, value) {
|
|
|
9613
9845
|
}
|
|
9614
9846
|
|
|
9615
9847
|
//#endregion
|
|
9616
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
9848
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/block.js
|
|
9617
9849
|
/**
|
|
9618
9850
|
* Compose a block map from its CST children, with an optional external first key.
|
|
9619
9851
|
*
|
|
@@ -10762,7 +10994,7 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
|
|
|
10762
10994
|
}
|
|
10763
10995
|
|
|
10764
10996
|
//#endregion
|
|
10765
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
10997
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/flow.js
|
|
10766
10998
|
/**
|
|
10767
10999
|
* Validate that flow collection entries are separated by commas.
|
|
10768
11000
|
*
|
|
@@ -11155,7 +11387,7 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
|
|
|
11155
11387
|
}
|
|
11156
11388
|
|
|
11157
11389
|
//#endregion
|
|
11158
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
11390
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/document.js
|
|
11159
11391
|
/** The flow-composer dispatch wired into every state this module creates. */
|
|
11160
11392
|
const FLOW = {
|
|
11161
11393
|
composeFlowMap,
|
|
@@ -11822,7 +12054,7 @@ function composeAllDocuments(text, options) {
|
|
|
11822
12054
|
}
|
|
11823
12055
|
|
|
11824
12056
|
//#endregion
|
|
11825
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
12057
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/fold.js
|
|
11826
12058
|
/**
|
|
11827
12059
|
* Column-based line folding for a single logical scalar line (YAML 1.2 flow
|
|
11828
12060
|
* folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
|
|
@@ -12059,7 +12291,7 @@ function renderBlockFolded(s, indent) {
|
|
|
12059
12291
|
}
|
|
12060
12292
|
|
|
12061
12293
|
//#endregion
|
|
12062
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
12294
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/stringifier.js
|
|
12063
12295
|
/**
|
|
12064
12296
|
* Thrown by the stringifier on its failure paths (circular references). The
|
|
12065
12297
|
* facade catches this and materializes the public stringify error.
|
|
@@ -12424,7 +12656,7 @@ function stringifyValue(value, options) {
|
|
|
12424
12656
|
}
|
|
12425
12657
|
|
|
12426
12658
|
//#endregion
|
|
12427
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
12659
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/Yaml.js
|
|
12428
12660
|
/**
|
|
12429
12661
|
* Options controlling parse behavior. All fields are omissible; absent fields
|
|
12430
12662
|
* resolve to `strict` `true`, `maxAliasCount` `100` (the alias-based
|
|
@@ -12462,7 +12694,9 @@ var YamlParseOptions = class extends Schema.Class("YamlParseOptions")({
|
|
|
12462
12694
|
* no-fold behavior; a positive value folds long plain, double-quoted and
|
|
12463
12695
|
* block-folded (`>`) scalars at approximately that column, inserting only
|
|
12464
12696
|
* semantically transparent line breaks. Block-literal (`|`) content is never
|
|
12465
|
-
* folded — literal blocks preserve their bytes by definition.
|
|
12697
|
+
* folded — literal blocks preserve their bytes by definition. Folding is a
|
|
12698
|
+
* value-path feature only: `YamlDocument#stringify` and the `YamlFormat`
|
|
12699
|
+
* helpers accept these options but do not fold (see `lineWidth`).
|
|
12466
12700
|
*
|
|
12467
12701
|
* `indentSequences` controls the presentation of block sequences nested under
|
|
12468
12702
|
* a mapping key: `false` (the default) emits them at the key's column — the
|
|
@@ -12493,6 +12727,15 @@ var YamlStringifyOptions = class extends Schema.Class("YamlStringifyOptions")({
|
|
|
12493
12727
|
* Column at which to fold long scalars. Default `0` (and any value `<= 0`)
|
|
12494
12728
|
* never wraps; a positive value folds plain, double-quoted and block-folded
|
|
12495
12729
|
* (`>`) scalars at approximately that column, never block-literal (`|`).
|
|
12730
|
+
*
|
|
12731
|
+
* Takes effect only through {@link Yaml.stringify} and
|
|
12732
|
+
* {@link Yaml.stringifySync} — the two entry points that accept these
|
|
12733
|
+
* options on the value path. The schema factories ({@link Yaml.fromString},
|
|
12734
|
+
* {@link Yaml.schema}, {@link Yaml.YamlFromString}) encode with default
|
|
12735
|
+
* stringify options (`lineWidth` `0`), so their output never folds. The
|
|
12736
|
+
* document/node path — `YamlDocument#stringify` and the `YamlFormat`
|
|
12737
|
+
* helpers built on it — threads the field into its render context but
|
|
12738
|
+
* never reads it, so it is inert there.
|
|
12496
12739
|
*/
|
|
12497
12740
|
lineWidth: Schema.optionalKey(Schema.Number),
|
|
12498
12741
|
defaultScalarStyle: Schema.optionalKey(ScalarStyle),
|
|
@@ -12599,7 +12842,7 @@ const stringifyDefectToError = (defect, value) => {
|
|
|
12599
12842
|
});
|
|
12600
12843
|
};
|
|
12601
12844
|
/**
|
|
12602
|
-
* Synchronous single-document parse returning a
|
|
12845
|
+
* Synchronous single-document parse returning a `Result`. The pure
|
|
12603
12846
|
* engine bypasses the Effect runtime entirely: the composer, the failure
|
|
12604
12847
|
* collection and the alias-expansion budget all run inline, and every failure
|
|
12605
12848
|
* mode (fatal diagnostics, duplicate keys, a "billion laughs" blow-up) yields
|
|
@@ -12621,7 +12864,7 @@ const parseSyncImpl = (text, options) => {
|
|
|
12621
12864
|
}
|
|
12622
12865
|
};
|
|
12623
12866
|
/**
|
|
12624
|
-
* Synchronous stringify returning a
|
|
12867
|
+
* Synchronous stringify returning a `Result`. Mirrors {@link Yaml.stringify}
|
|
12625
12868
|
* without the Effect wrapper: a circular reference or a value nested past the
|
|
12626
12869
|
* recursion budget yields a `Failure` carrying a typed {@link YamlStringifyError},
|
|
12627
12870
|
* never a thrown defect.
|
|
@@ -12751,7 +12994,7 @@ var Yaml = class Yaml {
|
|
|
12751
12994
|
return yield* stringifyOrFail(value, options);
|
|
12752
12995
|
});
|
|
12753
12996
|
/**
|
|
12754
|
-
* Synchronous single-document parse, returning a
|
|
12997
|
+
* Synchronous single-document parse, returning a `Result` instead of
|
|
12755
12998
|
* an `Effect`. A pure escape hatch for config-time callers that cannot
|
|
12756
12999
|
* `await` an Effect (a `vitest.config.ts` is the motivating case): it runs
|
|
12757
13000
|
* the same engine as {@link Yaml.parse} inline.
|
|
@@ -12780,7 +13023,7 @@ var Yaml = class Yaml {
|
|
|
12780
13023
|
return parseSyncImpl(text, options);
|
|
12781
13024
|
}
|
|
12782
13025
|
/**
|
|
12783
|
-
* Synchronous stringify, returning a
|
|
13026
|
+
* Synchronous stringify, returning a `Result` instead of an `Effect`.
|
|
12784
13027
|
* The pure counterpart to {@link Yaml.stringify} for config-time callers
|
|
12785
13028
|
* that cannot `await`.
|
|
12786
13029
|
*
|
|
@@ -12934,6 +13177,51 @@ var Yaml = class Yaml {
|
|
|
12934
13177
|
static schema(target, options) {
|
|
12935
13178
|
return Yaml.fromString(options).pipe(Schema.decodeTo(target));
|
|
12936
13179
|
}
|
|
13180
|
+
/**
|
|
13181
|
+
* Bind a target schema to the YAML codec once, yielding the composed
|
|
13182
|
+
* schema plus pre-derived `decode`/`encode` directions — the
|
|
13183
|
+
* {@link Yaml.schema} composition without the generic `Schema` machinery
|
|
13184
|
+
* at every use site. Binds the plain single-document form only: default
|
|
13185
|
+
* {@link YamlParseOptions} on decode, default stringify options on encode;
|
|
13186
|
+
* for multi-document streams compose over {@link Yaml.allFromString}
|
|
13187
|
+
* directly.
|
|
13188
|
+
*
|
|
13189
|
+
* Both directions fail with `Schema.SchemaError`, exactly as
|
|
13190
|
+
* `Schema.decodeEffect`/`Schema.encodeEffect` over {@link Yaml.schema}
|
|
13191
|
+
* would; the target's decoding/encoding service requirements flow through.
|
|
13192
|
+
*
|
|
13193
|
+
* @remarks
|
|
13194
|
+
* Schema-producing: each call composes a fresh schema and derives both
|
|
13195
|
+
* directions from it. Bind the result to a `const` — that single binding is
|
|
13196
|
+
* the point.
|
|
13197
|
+
*
|
|
13198
|
+
* @example
|
|
13199
|
+
* ```ts
|
|
13200
|
+
* import { Yaml } from "@effected/yaml";
|
|
13201
|
+
* import { Effect, Schema } from "effect";
|
|
13202
|
+
*
|
|
13203
|
+
* const Config = Schema.Struct({ port: Schema.Number });
|
|
13204
|
+
* const config = Yaml.bind(Config);
|
|
13205
|
+
*
|
|
13206
|
+
* const program = Effect.gen(function* () {
|
|
13207
|
+
* const value = yield* config.decode("port: 3000");
|
|
13208
|
+
* const text = yield* config.encode(value);
|
|
13209
|
+
* return [value, text] as const;
|
|
13210
|
+
* });
|
|
13211
|
+
* ```
|
|
13212
|
+
*
|
|
13213
|
+
* @param target - The domain schema decoded values must satisfy.
|
|
13214
|
+
* @returns A {@link YamlBoundCodec} carrying the composed schema and its
|
|
13215
|
+
* two pre-bound directions.
|
|
13216
|
+
*/
|
|
13217
|
+
static bind(target) {
|
|
13218
|
+
const schema = Yaml.schema(target);
|
|
13219
|
+
return {
|
|
13220
|
+
schema,
|
|
13221
|
+
decode: Schema.decodeEffect(schema),
|
|
13222
|
+
encode: Schema.encodeEffect(schema)
|
|
13223
|
+
};
|
|
13224
|
+
}
|
|
12937
13225
|
};
|
|
12938
13226
|
/**
|
|
12939
13227
|
* Parse for `equals`/`equalsValue`: any recorded error — fatal or not — or a
|
|
@@ -12987,7 +13275,7 @@ function deepEqualValues(a, b) {
|
|
|
12987
13275
|
}
|
|
12988
13276
|
|
|
12989
13277
|
//#endregion
|
|
12990
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13278
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/documents.js
|
|
12991
13279
|
/**
|
|
12992
13280
|
* An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
|
|
12993
13281
|
* and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
|
|
@@ -13058,7 +13346,7 @@ const selectSoleDocument = (content) => Effect.gen(function* () {
|
|
|
13058
13346
|
});
|
|
13059
13347
|
|
|
13060
13348
|
//#endregion
|
|
13061
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13349
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/pnpm.js
|
|
13062
13350
|
const PnpmImporterDeps = Schema.optionalKey(Schema.Record(Schema.String, Schema.Struct({
|
|
13063
13351
|
specifier: Schema.String,
|
|
13064
13352
|
version: Schema.String
|
|
@@ -13185,7 +13473,7 @@ const toFields$1 = (raw) => Effect.gen(function* () {
|
|
|
13185
13473
|
});
|
|
13186
13474
|
|
|
13187
13475
|
//#endregion
|
|
13188
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13476
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/internal/yarn.js
|
|
13189
13477
|
const YarnLockfileRaw = Schema.Record(Schema.String, Schema.Unknown);
|
|
13190
13478
|
const DepRecord = Schema.optionalKey(Schema.Record(Schema.String, Schema.String));
|
|
13191
13479
|
const YarnEntry = Schema.Struct({
|
|
@@ -13309,7 +13597,7 @@ const cleanYarnDeps = (deps) => {
|
|
|
13309
13597
|
};
|
|
13310
13598
|
|
|
13311
13599
|
//#endregion
|
|
13312
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13600
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/Lockfile.js
|
|
13313
13601
|
const EMPTY_IMPORTERS = [];
|
|
13314
13602
|
/**
|
|
13315
13603
|
* Failure of `Lockfile.parse`: the given content is not a valid lockfile of
|
|
@@ -13554,7 +13842,7 @@ var Lockfile = class Lockfile extends Schema.Class("Lockfile")({
|
|
|
13554
13842
|
};
|
|
13555
13843
|
|
|
13556
13844
|
//#endregion
|
|
13557
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13845
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.5_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__@effected+npm@0.2_b1d671782d9bef489a2d22b7bd2ef126/node_modules/@effected/lockfiles/LockfileIntegrity.js
|
|
13558
13846
|
/**
|
|
13559
13847
|
* The minimal manifest shape {@link LockfileIntegrity.compare} checks a
|
|
13560
13848
|
* lockfile against: a package name plus the four optional dependency maps.
|
|
@@ -13671,7 +13959,7 @@ var LockfileIntegrity = class LockfileIntegrity extends Schema.Class("LockfileIn
|
|
|
13671
13959
|
};
|
|
13672
13960
|
|
|
13673
13961
|
//#endregion
|
|
13674
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
13962
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Dependency.js
|
|
13675
13963
|
/**
|
|
13676
13964
|
* A resolved dependency entry pairing a package name with its version
|
|
13677
13965
|
* specifier and the `kind` of map it came from (`@effected/npm`'s
|
|
@@ -13736,7 +14024,7 @@ var Dependency = class extends Schema.Class("Dependency")({
|
|
|
13736
14024
|
};
|
|
13737
14025
|
|
|
13738
14026
|
//#endregion
|
|
13739
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
14027
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/DevEngines.js
|
|
13740
14028
|
/**
|
|
13741
14029
|
* A single `devEngines` constraint with a name and optional `version` / `onFail`.
|
|
13742
14030
|
*
|
|
@@ -14777,7 +15065,7 @@ var require_spdx_expression_parse = /* @__PURE__ */ __commonJSMin(((exports, mod
|
|
|
14777
15065
|
}));
|
|
14778
15066
|
|
|
14779
15067
|
//#endregion
|
|
14780
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
15068
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/License.js
|
|
14781
15069
|
var import_spdx_expression_parse = /* @__PURE__ */ __toESM(require_spdx_expression_parse(), 1);
|
|
14782
15070
|
/**
|
|
14783
15071
|
* Indicates that a string is not a valid SPDX license identifier or expression.
|
|
@@ -14819,7 +15107,7 @@ const isValidSpdx = (value) => {
|
|
|
14819
15107
|
const SpdxLicense = Schema.String.pipe(Schema.check(Schema.makeFilter((value) => isValidSpdx(value) ? void 0 : "Expected a valid SPDX license expression")), Schema.brand("SpdxLicense"));
|
|
14820
15108
|
|
|
14821
15109
|
//#endregion
|
|
14822
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
15110
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageManager.js
|
|
14823
15111
|
const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
|
|
14824
15112
|
/**
|
|
14825
15113
|
* The `packageManager` field only ever carries corepack's `<algo>.<hex>`
|
|
@@ -14878,7 +15166,7 @@ var PackageManager = class PackageManager extends Schema.Class("PackageManager")
|
|
|
14878
15166
|
};
|
|
14879
15167
|
|
|
14880
15168
|
//#endregion
|
|
14881
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
15169
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageName.js
|
|
14882
15170
|
/**
|
|
14883
15171
|
* Indicates that a string could not be used as a valid npm package name.
|
|
14884
15172
|
*
|
|
@@ -14937,7 +15225,7 @@ const PackageName = Object.assign(Schema.Union([ScopedPackageName, UnscopedPacka
|
|
|
14937
15225
|
});
|
|
14938
15226
|
|
|
14939
15227
|
//#endregion
|
|
14940
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
15228
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Person.js
|
|
14941
15229
|
const parsePersonString = (input) => {
|
|
14942
15230
|
const emailMatch = input.match(/<([^>]+)>/);
|
|
14943
15231
|
const urlMatch = input.match(/\(([^)]+)\)/);
|
|
@@ -14985,7 +15273,7 @@ var Person = class Person extends Schema.Class("Person")({
|
|
|
14985
15273
|
};
|
|
14986
15274
|
|
|
14987
15275
|
//#endregion
|
|
14988
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
15276
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/internal/format.js
|
|
14989
15277
|
const KEY_INDEX = new Map([
|
|
14990
15278
|
"$schema",
|
|
14991
15279
|
"name",
|
|
@@ -15209,7 +15497,7 @@ const renderJson = (raw, options) => {
|
|
|
15209
15497
|
};
|
|
15210
15498
|
|
|
15211
15499
|
//#endregion
|
|
15212
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
15500
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Package.js
|
|
15213
15501
|
const toHashMap = SchemaTransformation.transform({
|
|
15214
15502
|
decode: (record) => HashMap.fromIterable(Object.entries(record)),
|
|
15215
15503
|
encode: (map) => Object.fromEntries(HashMap.toEntries(map))
|
|
@@ -15528,7 +15816,7 @@ var Package = class Package extends Schema.Class("Package")({
|
|
|
15528
15816
|
};
|
|
15529
15817
|
|
|
15530
15818
|
//#endregion
|
|
15531
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
15819
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspacePackage.js
|
|
15532
15820
|
const EMPTY$1 = Object.freeze(Object.create(null));
|
|
15533
15821
|
const EMPTY_MANIFEST = Object.freeze(Object.create(null));
|
|
15534
15822
|
/**
|
|
@@ -15791,7 +16079,7 @@ var WorkspacePackage = class WorkspacePackage extends Schema.Class("WorkspacePac
|
|
|
15791
16079
|
};
|
|
15792
16080
|
|
|
15793
16081
|
//#endregion
|
|
15794
|
-
//#region ../../node_modules/.pnpm/@effected+walker@0.2.
|
|
16082
|
+
//#region ../../node_modules/.pnpm/@effected+walker@0.2.2_@effected+glob@0.1.2_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/walker/Descend.js
|
|
15795
16083
|
/**
|
|
15796
16084
|
* Typed failure raised by {@link descend}: a directory mid-walk was unreadable
|
|
15797
16085
|
* (under `onUnreadable: "fail"`), or the walk descended past `maxDepth`. Depth
|
|
@@ -15927,7 +16215,7 @@ const descend = Effect.fn("Walker.descend")(function* (pattern, options) {
|
|
|
15927
16215
|
});
|
|
15928
16216
|
|
|
15929
16217
|
//#endregion
|
|
15930
|
-
//#region ../../node_modules/.pnpm/@effected+walker@0.2.
|
|
16218
|
+
//#region ../../node_modules/.pnpm/@effected+walker@0.2.2_@effected+glob@0.1.2_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/walker/Walker.js
|
|
15931
16219
|
/**
|
|
15932
16220
|
* Ascend from `start` toward the filesystem root, yielding each directory,
|
|
15933
16221
|
* nearest first.
|
|
@@ -16018,7 +16306,7 @@ const Walker$1 = {
|
|
|
16018
16306
|
};
|
|
16019
16307
|
|
|
16020
16308
|
//#endregion
|
|
16021
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16309
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceRoot.js
|
|
16022
16310
|
/**
|
|
16023
16311
|
* The marker filenames {@link WorkspaceRoot} probes for, in priority order.
|
|
16024
16312
|
*
|
|
@@ -16104,7 +16392,7 @@ var WorkspaceRoot = class WorkspaceRoot extends Context.Service()("@effected/wor
|
|
|
16104
16392
|
};
|
|
16105
16393
|
|
|
16106
16394
|
//#endregion
|
|
16107
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16395
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/limits.js
|
|
16108
16396
|
/**
|
|
16109
16397
|
* Hard ceiling on directories the enumerator will visit for one pattern set.
|
|
16110
16398
|
* Guards the pathological case a depth cap alone does not: a wide, shallow
|
|
@@ -16123,7 +16411,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
|
|
|
16123
16411
|
const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
16124
16412
|
|
|
16125
16413
|
//#endregion
|
|
16126
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16414
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/traverse.js
|
|
16127
16415
|
/** Directory names never descended into. */
|
|
16128
16416
|
const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
|
|
16129
16417
|
/** Join root-relative POSIX segments; `""` is the root itself. */
|
|
@@ -16214,7 +16502,7 @@ var Traversal = class {
|
|
|
16214
16502
|
};
|
|
16215
16503
|
|
|
16216
16504
|
//#endregion
|
|
16217
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16505
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/enumerate.js
|
|
16218
16506
|
/** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
|
|
16219
16507
|
const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
|
|
16220
16508
|
/**
|
|
@@ -16285,7 +16573,7 @@ const enumerate = (root, globs, options) => Effect.gen(function* () {
|
|
|
16285
16573
|
});
|
|
16286
16574
|
|
|
16287
16575
|
//#endregion
|
|
16288
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16576
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/patterns.js
|
|
16289
16577
|
const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
|
|
16290
16578
|
/** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
|
|
16291
16579
|
const pnpmPatternsOf = (document) => {
|
|
@@ -16343,7 +16631,7 @@ const readPatterns = (root) => Effect.gen(function* () {
|
|
|
16343
16631
|
});
|
|
16344
16632
|
|
|
16345
16633
|
//#endregion
|
|
16346
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16634
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceDiscovery.js
|
|
16347
16635
|
/**
|
|
16348
16636
|
* Raised when a workspace member's `package.json` cannot be read, parsed, or
|
|
16349
16637
|
* used — it is missing, malformed, or lacks a `name` or `version`.
|
|
@@ -16641,6 +16929,109 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends Context.Service()("@ef
|
|
|
16641
16929
|
*/
|
|
16642
16930
|
static layer = (options) => Layer.effect(WorkspaceDiscovery, WorkspaceDiscovery.make(options));
|
|
16643
16931
|
/**
|
|
16932
|
+
* An in-memory test double of the service shape, with every method
|
|
16933
|
+
* defaulted so a test stubs only what it exercises.
|
|
16934
|
+
*
|
|
16935
|
+
* @remarks
|
|
16936
|
+
* The defaults model an **empty workspace**, and the derived methods run
|
|
16937
|
+
* over the *effective* `listPackages` — the override when one is supplied —
|
|
16938
|
+
* so stubbing only `listPackages` yields a consistent double:
|
|
16939
|
+
*
|
|
16940
|
+
* - `listPackages` — succeeds with `[]`.
|
|
16941
|
+
* - `importerMap` — derived: the packages keyed by `relativePath`.
|
|
16942
|
+
* - `getPackage` — derived: a name lookup that fails with the service's own
|
|
16943
|
+
* typed {@link PackageNotFoundError} on a miss, exactly as the live
|
|
16944
|
+
* implementation does.
|
|
16945
|
+
* - `resolveFile` / `resolveFiles` — derived: longest-prefix ownership over
|
|
16946
|
+
* `pkg.path`, POSIX-terminated (`"/"`); supply a win32 double explicitly
|
|
16947
|
+
* if your fixture paths are win32.
|
|
16948
|
+
* - `refresh` — a no-op (`Effect.void`); there is nothing memoized to drop.
|
|
16949
|
+
* - `info` — **dies** with an explanatory defect. No honest default exists
|
|
16950
|
+
* (a fabricated root path would leak into consumer path logic), so an
|
|
16951
|
+
* unstubbed `info()` call is a test-wiring mistake and fails loudly as a
|
|
16952
|
+
* defect rather than succeeding with a lie or failing with a dishonest
|
|
16953
|
+
* typed error.
|
|
16954
|
+
*
|
|
16955
|
+
* @example
|
|
16956
|
+
* ```ts
|
|
16957
|
+
* import { WorkspaceDiscovery, WorkspacePackage } from "@effected/workspaces";
|
|
16958
|
+
* import { Effect } from "effect";
|
|
16959
|
+
*
|
|
16960
|
+
* const double = WorkspaceDiscovery.makeTest({
|
|
16961
|
+
* listPackages: () =>
|
|
16962
|
+
* Effect.succeed([
|
|
16963
|
+
* WorkspacePackage.make({
|
|
16964
|
+
* name: "@my-org/utils",
|
|
16965
|
+
* version: "1.0.0",
|
|
16966
|
+
* path: "/repo/packages/utils",
|
|
16967
|
+
* packageJsonPath: "/repo/packages/utils/package.json",
|
|
16968
|
+
* relativePath: "packages/utils",
|
|
16969
|
+
* }),
|
|
16970
|
+
* ]),
|
|
16971
|
+
* });
|
|
16972
|
+
* // `getPackage`, `importerMap`, `resolveFile(s)` now answer consistently.
|
|
16973
|
+
* ```
|
|
16974
|
+
*/
|
|
16975
|
+
static makeTest = (overrides = {}) => {
|
|
16976
|
+
const listPackages = overrides.listPackages ?? (() => Effect.succeed([]));
|
|
16977
|
+
const ownerOf = (filePath, all) => {
|
|
16978
|
+
let best;
|
|
16979
|
+
let bestLength = 0;
|
|
16980
|
+
for (const pkg of all) {
|
|
16981
|
+
const prefix = pkg.path.endsWith("/") ? pkg.path : `${pkg.path}/`;
|
|
16982
|
+
if (filePath.startsWith(prefix) && prefix.length > bestLength) {
|
|
16983
|
+
best = pkg;
|
|
16984
|
+
bestLength = prefix.length;
|
|
16985
|
+
}
|
|
16986
|
+
}
|
|
16987
|
+
return Option.fromUndefinedOr(best);
|
|
16988
|
+
};
|
|
16989
|
+
return {
|
|
16990
|
+
listPackages,
|
|
16991
|
+
info: () => Effect.die(/* @__PURE__ */ new Error("WorkspaceDiscovery.makeTest: info() was called but not stubbed — no honest default WorkspaceInfo exists for a test double; pass an `info` override.")),
|
|
16992
|
+
importerMap: () => Effect.map(listPackages(), (all) => new Map(all.map((pkg) => [pkg.relativePath, pkg]))),
|
|
16993
|
+
getPackage: (name) => Effect.flatMap(listPackages(), (all) => {
|
|
16994
|
+
const found = all.find((pkg) => pkg.name === name);
|
|
16995
|
+
return found !== void 0 ? Effect.succeed(found) : Effect.fail(new PackageNotFoundError({
|
|
16996
|
+
name,
|
|
16997
|
+
available: all.map((pkg) => pkg.name)
|
|
16998
|
+
}));
|
|
16999
|
+
}),
|
|
17000
|
+
resolveFile: (filePath) => Effect.map(listPackages(), (all) => ownerOf(filePath, all)),
|
|
17001
|
+
resolveFiles: (filePaths) => Effect.map(listPackages(), (all) => {
|
|
17002
|
+
const seen = /* @__PURE__ */ new Map();
|
|
17003
|
+
for (const filePath of filePaths) {
|
|
17004
|
+
const owner = ownerOf(filePath, all);
|
|
17005
|
+
if (Option.isSome(owner)) seen.set(owner.value.name, owner.value);
|
|
17006
|
+
}
|
|
17007
|
+
return [...seen.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
17008
|
+
}),
|
|
17009
|
+
refresh: () => Effect.void,
|
|
17010
|
+
...overrides
|
|
17011
|
+
};
|
|
17012
|
+
};
|
|
17013
|
+
/**
|
|
17014
|
+
* The test layer: {@link WorkspaceDiscovery.makeTest} behind
|
|
17015
|
+
* `Layer.succeed`, so a suite provides only the methods it exercises.
|
|
17016
|
+
*
|
|
17017
|
+
* @remarks
|
|
17018
|
+
* A parameterized layer factory mints a **fresh reference per call**, and
|
|
17019
|
+
* layers memoize by reference — bind the result to a `const` and reuse it
|
|
17020
|
+
* rather than calling `layerTest(...)` at each composition site.
|
|
17021
|
+
*
|
|
17022
|
+
* @example
|
|
17023
|
+
* ```ts
|
|
17024
|
+
* import { WorkspaceDiscovery } from "@effected/workspaces";
|
|
17025
|
+
* import { Effect } from "effect";
|
|
17026
|
+
*
|
|
17027
|
+
* const TestDiscovery = WorkspaceDiscovery.layerTest({
|
|
17028
|
+
* listPackages: () => Effect.succeed([]),
|
|
17029
|
+
* });
|
|
17030
|
+
* // program.pipe(Effect.provide(TestDiscovery))
|
|
17031
|
+
* ```
|
|
17032
|
+
*/
|
|
17033
|
+
static layerTest = (overrides = {}) => Layer.succeed(WorkspaceDiscovery, WorkspaceDiscovery.makeTest(overrides));
|
|
17034
|
+
/**
|
|
16644
17035
|
* The real implementation of `@effected/npm`'s `WorkspaceResolver` contract
|
|
16645
17036
|
* — the one `@effected/package-json` declares but cannot fill.
|
|
16646
17037
|
*
|
|
@@ -16673,7 +17064,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends Context.Service()("@ef
|
|
|
16673
17064
|
const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
|
|
16674
17065
|
|
|
16675
17066
|
//#endregion
|
|
16676
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
17067
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/DependencyGraph.js
|
|
16677
17068
|
/**
|
|
16678
17069
|
* Raised when the workspace dependency graph cannot be topologically ordered
|
|
16679
17070
|
* because it contains a cycle.
|
|
@@ -16909,7 +17300,7 @@ const kahn = (edges) => {
|
|
|
16909
17300
|
};
|
|
16910
17301
|
|
|
16911
17302
|
//#endregion
|
|
16912
|
-
//#region ../../node_modules/.pnpm/@effected+git@0.4.
|
|
17303
|
+
//#region ../../node_modules/.pnpm/@effected+git@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/git/GitCommand.js
|
|
16913
17304
|
/**
|
|
16914
17305
|
* Builds a `git` `ChildProcess.StandardCommand` with the argv this package
|
|
16915
17306
|
* classifies against.
|
|
@@ -17329,7 +17720,7 @@ const GitCommand = {
|
|
|
17329
17720
|
};
|
|
17330
17721
|
|
|
17331
17722
|
//#endregion
|
|
17332
|
-
//#region ../../node_modules/.pnpm/@effected+git@0.4.
|
|
17723
|
+
//#region ../../node_modules/.pnpm/@effected+git@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/git/internal/run.js
|
|
17333
17724
|
/**
|
|
17334
17725
|
* Spawns `command` and collects its stdout, stderr, and exit code as a single
|
|
17335
17726
|
* triple.
|
|
@@ -17357,7 +17748,7 @@ const runCollected = (command) => Effect.scoped(Effect.gen(function* () {
|
|
|
17357
17748
|
}));
|
|
17358
17749
|
|
|
17359
17750
|
//#endregion
|
|
17360
|
-
//#region ../../node_modules/.pnpm/@effected+git@0.4.
|
|
17751
|
+
//#region ../../node_modules/.pnpm/@effected+git@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/git/Git.js
|
|
17361
17752
|
/** git's own ceiling: a run that has not answered in 30s is not going to. */
|
|
17362
17753
|
const GIT_TIMEOUT = Duration.seconds(30);
|
|
17363
17754
|
/**
|
|
@@ -17369,7 +17760,7 @@ const GIT_TIMEOUT = Duration.seconds(30);
|
|
|
17369
17760
|
* `exitCode` and `stderr` are populated when git actually ran. `detail`
|
|
17370
17761
|
* carries a human-readable explanation of an absorbed spawn-level
|
|
17371
17762
|
* `PlatformError` or a per-run timeout — the two cases where git never
|
|
17372
|
-
* produced an exit code at all.
|
|
17763
|
+
* produced an exit code at all. `kind`
|
|
17373
17764
|
* discriminates a pre-spawn guard rejection (`"refused"`) from a genuine git
|
|
17374
17765
|
* failure (`"failed"`) structurally, so composed retry/fallback logic never has
|
|
17375
17766
|
* to parse the prose in `message` or `detail`.
|
|
@@ -18275,7 +18666,7 @@ var Git = class extends Context.Service()("@effected/git/Git") {
|
|
|
18275
18666
|
};
|
|
18276
18667
|
|
|
18277
18668
|
//#endregion
|
|
18278
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18669
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/ChangeDetector.js
|
|
18279
18670
|
/**
|
|
18280
18671
|
* Which git refs to compare, and whether to fold in the working tree.
|
|
18281
18672
|
*
|
|
@@ -18557,7 +18948,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
|
|
|
18557
18948
|
}
|
|
18558
18949
|
|
|
18559
18950
|
//#endregion
|
|
18560
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18951
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/internal/catalogs.js
|
|
18561
18952
|
/** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
|
|
18562
18953
|
const inlineCatalogs = (manifest) => {
|
|
18563
18954
|
if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
|
|
@@ -18622,7 +19013,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
|
|
|
18622
19013
|
};
|
|
18623
19014
|
|
|
18624
19015
|
//#endregion
|
|
18625
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19016
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/ConfigDependencyHooks.js
|
|
18626
19017
|
/** Whether `value` is a non-null, non-array object. */
|
|
18627
19018
|
const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18628
19019
|
/**
|
|
@@ -18768,7 +19159,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends Context.Service(
|
|
|
18768
19159
|
};
|
|
18769
19160
|
|
|
18770
19161
|
//#endregion
|
|
18771
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19162
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/PackageManagerName.js
|
|
18772
19163
|
/**
|
|
18773
19164
|
* The four package managers this package understands.
|
|
18774
19165
|
*
|
|
@@ -19011,7 +19402,7 @@ var PackageManagerDetector = class PackageManagerDetector extends Context.Servic
|
|
|
19011
19402
|
};
|
|
19012
19403
|
|
|
19013
19404
|
//#endregion
|
|
19014
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19405
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/LockfileReader.js
|
|
19015
19406
|
/**
|
|
19016
19407
|
* Raised when the workspace's lockfile cannot be read off disk.
|
|
19017
19408
|
*
|
|
@@ -19122,7 +19513,7 @@ var LockfileReader = class LockfileReader extends Context.Service()("@effected/w
|
|
|
19122
19513
|
};
|
|
19123
19514
|
|
|
19124
19515
|
//#endregion
|
|
19125
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19516
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/Publishability.js
|
|
19126
19517
|
/** The public npm registry, used when `publishConfig.registry` says nothing. */
|
|
19127
19518
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
19128
19519
|
/**
|
|
@@ -19223,7 +19614,7 @@ var PublishabilityDetector = class PublishabilityDetector extends Context.Servic
|
|
|
19223
19614
|
};
|
|
19224
19615
|
|
|
19225
19616
|
//#endregion
|
|
19226
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19617
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceCatalogs.js
|
|
19227
19618
|
/**
|
|
19228
19619
|
* An immutable, fully-normalized catalog collection — the one catalog
|
|
19229
19620
|
* resolution semantic in the package.
|
|
@@ -19608,7 +19999,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends Context.Service()("@effe
|
|
|
19608
19999
|
};
|
|
19609
20000
|
|
|
19610
20001
|
//#endregion
|
|
19611
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20002
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
|
|
19612
20003
|
const EMPTY = Object.freeze(Object.create(null));
|
|
19613
20004
|
const DependencyMap = Schema.Record(Schema.String, Schema.String).pipe(Schema.withDecodingDefaultKey(Effect.succeed(EMPTY)), Schema.withConstructorDefault(Effect.succeed(EMPTY)));
|
|
19614
20005
|
/**
|
|
@@ -19774,7 +20165,7 @@ var WorkspaceStateSnapshot = class extends Schema.Class("WorkspaceStateSnapshot"
|
|
|
19774
20165
|
};
|
|
19775
20166
|
|
|
19776
20167
|
//#endregion
|
|
19777
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20168
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/WorkspaceSnapshots.js
|
|
19778
20169
|
/** Whether `value` is a non-null, non-array object. */
|
|
19779
20170
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19780
20171
|
/** Whether every value in a record is a string — a usable dependency map. */
|
|
@@ -19967,7 +20358,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends Context.Service()("@ef
|
|
|
19967
20358
|
};
|
|
19968
20359
|
|
|
19969
20360
|
//#endregion
|
|
19970
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20361
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.4.1_@effected+jsonc@0.4.0_effect@4.0.0-beta.99__effect@4.0.0-beta.99/node_modules/@effected/workspaces/Workspaces.js
|
|
19971
20362
|
/**
|
|
19972
20363
|
* Every service that needs only a filesystem: root, package-manager detection,
|
|
19973
20364
|
* discovery, lockfile reading, catalogs and publishability.
|
|
@@ -21972,7 +22363,7 @@ var require_dataloader = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
21972
22363
|
}));
|
|
21973
22364
|
|
|
21974
22365
|
//#endregion
|
|
21975
|
-
//#region ../../node_modules/.pnpm/@changesets+get-github-info@1.0.0-next.
|
|
22366
|
+
//#region ../../node_modules/.pnpm/@changesets+get-github-info@1.0.0-next.4/node_modules/@changesets/get-github-info/dist/index.mjs
|
|
21976
22367
|
var import_dataloader = /* @__PURE__ */ __toESM(require_dataloader(), 1);
|
|
21977
22368
|
async function readEnvFile() {
|
|
21978
22369
|
const envFile = path$1.resolve(process.cwd(), ".env");
|
|
@@ -23544,7 +23935,7 @@ function normalizeIdentifier(value) {
|
|
|
23544
23935
|
}
|
|
23545
23936
|
|
|
23546
23937
|
//#endregion
|
|
23547
|
-
//#region ../../node_modules/.pnpm/mdast-util-gfm-footnote@2.1.
|
|
23938
|
+
//#region ../../node_modules/.pnpm/mdast-util-gfm-footnote@2.1.0_supports-color@8.1.1/node_modules/mdast-util-gfm-footnote/lib/index.js
|
|
23548
23939
|
/**
|
|
23549
23940
|
* @import {
|
|
23550
23941
|
* CompileContext,
|
|
@@ -23737,7 +24128,7 @@ function mapAll(line, index, blank) {
|
|
|
23737
24128
|
}
|
|
23738
24129
|
|
|
23739
24130
|
//#endregion
|
|
23740
|
-
//#region ../../node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.
|
|
24131
|
+
//#region ../../node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.0_supports-color@8.1.1/node_modules/mdast-util-gfm-strikethrough/lib/index.js
|
|
23741
24132
|
/**
|
|
23742
24133
|
* @typedef {import('mdast').Delete} Delete
|
|
23743
24134
|
*
|
|
@@ -28847,7 +29238,7 @@ function safeBound(value, config) {
|
|
|
28847
29238
|
}
|
|
28848
29239
|
|
|
28849
29240
|
//#endregion
|
|
28850
|
-
//#region ../../node_modules/.pnpm/mdast-util-gfm-table@2.0.
|
|
29241
|
+
//#region ../../node_modules/.pnpm/mdast-util-gfm-table@2.0.0_supports-color@8.1.1/node_modules/mdast-util-gfm-table/lib/index.js
|
|
28851
29242
|
/**
|
|
28852
29243
|
* @typedef {import('mdast').InlineCode} InlineCode
|
|
28853
29244
|
* @typedef {import('mdast').Table} Table
|
|
@@ -29113,7 +29504,7 @@ function gfmTableToMarkdown(options) {
|
|
|
29113
29504
|
}
|
|
29114
29505
|
|
|
29115
29506
|
//#endregion
|
|
29116
|
-
//#region ../../node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.
|
|
29507
|
+
//#region ../../node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.0_supports-color@8.1.1/node_modules/mdast-util-gfm-task-list-item/lib/index.js
|
|
29117
29508
|
/**
|
|
29118
29509
|
* @typedef {import('mdast').ListItem} ListItem
|
|
29119
29510
|
* @typedef {import('mdast').Paragraph} Paragraph
|
|
@@ -29224,7 +29615,7 @@ function listItemWithTaskListItem(node, parent, state, info) {
|
|
|
29224
29615
|
}
|
|
29225
29616
|
|
|
29226
29617
|
//#endregion
|
|
29227
|
-
//#region ../../node_modules/.pnpm/mdast-util-gfm@3.1.
|
|
29618
|
+
//#region ../../node_modules/.pnpm/mdast-util-gfm@3.1.0_supports-color@8.1.1/node_modules/mdast-util-gfm/lib/index.js
|
|
29228
29619
|
/**
|
|
29229
29620
|
* @import {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'
|
|
29230
29621
|
* @import {Options} from 'mdast-util-gfm'
|
|
@@ -37350,7 +37741,7 @@ function gfm(options) {
|
|
|
37350
37741
|
}
|
|
37351
37742
|
|
|
37352
37743
|
//#endregion
|
|
37353
|
-
//#region ../../node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js
|
|
37744
|
+
//#region ../../node_modules/.pnpm/remark-gfm@4.0.1_supports-color@8.1.1/node_modules/remark-gfm/lib/index.js
|
|
37354
37745
|
/**
|
|
37355
37746
|
* @import {Root} from 'mdast'
|
|
37356
37747
|
* @import {Options} from 'remark-gfm'
|
|
@@ -37382,7 +37773,7 @@ function remarkGfm(options) {
|
|
|
37382
37773
|
}
|
|
37383
37774
|
|
|
37384
37775
|
//#endregion
|
|
37385
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
37776
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/content.js
|
|
37386
37777
|
/**
|
|
37387
37778
|
* @import {
|
|
37388
37779
|
* InitialConstruct,
|
|
@@ -37450,7 +37841,7 @@ function initializeContent(effects) {
|
|
|
37450
37841
|
}
|
|
37451
37842
|
|
|
37452
37843
|
//#endregion
|
|
37453
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
37844
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/document.js
|
|
37454
37845
|
/**
|
|
37455
37846
|
* @import {
|
|
37456
37847
|
* Construct,
|
|
@@ -37667,7 +38058,7 @@ function tokenizeContainer(effects, ok, nok) {
|
|
|
37667
38058
|
}
|
|
37668
38059
|
|
|
37669
38060
|
//#endregion
|
|
37670
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
38061
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/flow.js
|
|
37671
38062
|
/**
|
|
37672
38063
|
* @import {
|
|
37673
38064
|
* InitialConstruct,
|
|
@@ -37715,7 +38106,7 @@ function initializeFlow(effects) {
|
|
|
37715
38106
|
}
|
|
37716
38107
|
|
|
37717
38108
|
//#endregion
|
|
37718
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
38109
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/text.js
|
|
37719
38110
|
/**
|
|
37720
38111
|
* @import {
|
|
37721
38112
|
* Code,
|
|
@@ -37893,7 +38284,7 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
37893
38284
|
}
|
|
37894
38285
|
|
|
37895
38286
|
//#endregion
|
|
37896
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
38287
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/constructs.js
|
|
37897
38288
|
/**
|
|
37898
38289
|
* @import {Extension} from 'micromark-util-types'
|
|
37899
38290
|
*/
|
|
@@ -37972,7 +38363,7 @@ const attentionMarkers = { null: [42, 95] };
|
|
|
37972
38363
|
const disable = { null: [] };
|
|
37973
38364
|
|
|
37974
38365
|
//#endregion
|
|
37975
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
38366
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/create-tokenizer.js
|
|
37976
38367
|
/**
|
|
37977
38368
|
* @import {
|
|
37978
38369
|
* Chunk,
|
|
@@ -38442,7 +38833,7 @@ function serializeChunks(chunks, expandTabs) {
|
|
|
38442
38833
|
}
|
|
38443
38834
|
|
|
38444
38835
|
//#endregion
|
|
38445
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
38836
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/parse.js
|
|
38446
38837
|
/**
|
|
38447
38838
|
* @import {
|
|
38448
38839
|
* Create,
|
|
@@ -38487,7 +38878,7 @@ function parse$1(options) {
|
|
|
38487
38878
|
}
|
|
38488
38879
|
|
|
38489
38880
|
//#endregion
|
|
38490
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
38881
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/postprocess.js
|
|
38491
38882
|
/**
|
|
38492
38883
|
* @import {Event} from 'micromark-util-types'
|
|
38493
38884
|
*/
|
|
@@ -38503,7 +38894,7 @@ function postprocess(events) {
|
|
|
38503
38894
|
}
|
|
38504
38895
|
|
|
38505
38896
|
//#endregion
|
|
38506
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
38897
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/preprocess.js
|
|
38507
38898
|
/**
|
|
38508
38899
|
* @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'
|
|
38509
38900
|
*/
|
|
@@ -38670,7 +39061,7 @@ function index(value) {
|
|
|
38670
39061
|
}
|
|
38671
39062
|
|
|
38672
39063
|
//#endregion
|
|
38673
|
-
//#region ../../node_modules/.pnpm/mdast-util-from-markdown@2.0.
|
|
39064
|
+
//#region ../../node_modules/.pnpm/mdast-util-from-markdown@2.0.3_supports-color@8.1.1/node_modules/mdast-util-from-markdown/lib/index.js
|
|
38674
39065
|
/**
|
|
38675
39066
|
* @import {
|
|
38676
39067
|
* Break,
|
|
@@ -39637,7 +40028,7 @@ function defaultOnError(left, right) {
|
|
|
39637
40028
|
}
|
|
39638
40029
|
|
|
39639
40030
|
//#endregion
|
|
39640
|
-
//#region ../../node_modules/.pnpm/remark-parse@11.0.
|
|
40031
|
+
//#region ../../node_modules/.pnpm/remark-parse@11.0.0_supports-color@8.1.1/node_modules/remark-parse/lib/index.js
|
|
39641
40032
|
/**
|
|
39642
40033
|
* @typedef {import('mdast').Root} Root
|
|
39643
40034
|
* @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions
|
|
@@ -58108,7 +58499,7 @@ function validatePackages(packages) {
|
|
|
58108
58499
|
}
|
|
58109
58500
|
|
|
58110
58501
|
//#endregion
|
|
58111
|
-
//#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@3.0.0-next.
|
|
58502
|
+
//#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@3.0.0-next.7/node_modules/@changesets/get-dependents-graph/dist/index.mjs
|
|
58112
58503
|
var src_default = new Proxy({}, { get(target, color) {
|
|
58113
58504
|
target[color] ??= (text) => styleText(color, text);
|
|
58114
58505
|
return target[color];
|
|
@@ -58229,7 +58620,7 @@ function getDependentsGraph(packages, opts) {
|
|
|
58229
58620
|
}
|
|
58230
58621
|
|
|
58231
58622
|
//#endregion
|
|
58232
|
-
//#region ../../node_modules/.pnpm/@changesets+should-skip-package@1.0.0-next.
|
|
58623
|
+
//#region ../../node_modules/.pnpm/@changesets+should-skip-package@1.0.0-next.7/node_modules/@changesets/should-skip-package/dist/index.mjs
|
|
58233
58624
|
function shouldSkipPackage({ packageJson }, { ignore, allowPrivatePackages }) {
|
|
58234
58625
|
if (ignore.includes(packageJson.name)) return true;
|
|
58235
58626
|
if (packageJson.private && !allowPrivatePackages) return true;
|
|
@@ -58237,7 +58628,7 @@ function shouldSkipPackage({ packageJson }, { ignore, allowPrivatePackages }) {
|
|
|
58237
58628
|
}
|
|
58238
58629
|
|
|
58239
58630
|
//#endregion
|
|
58240
|
-
//#region ../../node_modules/.pnpm/@changesets+config@4.0.0-next.
|
|
58631
|
+
//#region ../../node_modules/.pnpm/@changesets+config@4.0.0-next.7/node_modules/@changesets/config/dist/index.mjs
|
|
58241
58632
|
const DEFAULT_CONFIG = {
|
|
58242
58633
|
lang: void 0,
|
|
58243
58634
|
message: void 0,
|
|
@@ -59149,7 +59540,7 @@ async function readConfig(cwd, packages) {
|
|
|
59149
59540
|
packages ??= await getPackages(cwd);
|
|
59150
59541
|
return validateConfig(JSON.parse(await fs$1.readFile(path$1.join(packages.rootDir, ".changeset", "config.json"), "utf8")), packages);
|
|
59151
59542
|
}
|
|
59152
|
-
var version = "4.0.0-next.
|
|
59543
|
+
var version = "4.0.0-next.7";
|
|
59153
59544
|
const defaultWrittenConfig = {
|
|
59154
59545
|
["$schema"]: `https://unpkg.com/@changesets/config@${version}/schema.json`,
|
|
59155
59546
|
baseBranch: "main",
|
|
@@ -59876,230 +60267,6 @@ function isMetadataYarnClassic(metadataPath) {
|
|
|
59876
60267
|
return metadataPath.endsWith(".yarn_integrity");
|
|
59877
60268
|
}
|
|
59878
60269
|
|
|
59879
|
-
//#endregion
|
|
59880
|
-
//#region ../../node_modules/.pnpm/@changesets+format@0.1.0/node_modules/@changesets/format/dist/index.js
|
|
59881
|
-
/**
|
|
59882
|
-
* Traverse upwards from `startDir` to `stopDir` (inclusive), calling `cb` in each directory. If
|
|
59883
|
-
* `cb` returns a non-null value, it'll stop and return that value.
|
|
59884
|
-
*/
|
|
59885
|
-
function traverseUpwards(startDir, stopDir, cb) {
|
|
59886
|
-
let dir = startDir;
|
|
59887
|
-
while (dir) {
|
|
59888
|
-
const result = cb(dir);
|
|
59889
|
-
if (result !== void 0) return result;
|
|
59890
|
-
if (dir === stopDir) break;
|
|
59891
|
-
const nextDir = path$1.dirname(dir);
|
|
59892
|
-
if (nextDir === dir) break;
|
|
59893
|
-
dir = nextDir;
|
|
59894
|
-
}
|
|
59895
|
-
}
|
|
59896
|
-
async function packageManagerExecute(packageManager, args, cwd) {
|
|
59897
|
-
const cmd = resolveCommand(packageManager, "execute-local", args) ?? {
|
|
59898
|
-
command: "npx",
|
|
59899
|
-
args
|
|
59900
|
-
};
|
|
59901
|
-
return await spawnProcess(cmd.command, cmd.args, cwd);
|
|
59902
|
-
}
|
|
59903
|
-
async function spawnProcess(command, args, cwd) {
|
|
59904
|
-
return new Promise((resolve, reject) => {
|
|
59905
|
-
const child = cp.spawn(command, args, { cwd });
|
|
59906
|
-
let stderr = "";
|
|
59907
|
-
child.stderr.on("data", (data) => {
|
|
59908
|
-
stderr += data.toString();
|
|
59909
|
-
});
|
|
59910
|
-
child.on("exit", (code) => {
|
|
59911
|
-
if (code === 0) resolve();
|
|
59912
|
-
else reject(/* @__PURE__ */ new Error(`${command} exited with code ${code}. Stderr:\n${stderr}`));
|
|
59913
|
-
});
|
|
59914
|
-
child.on("error", (err) => {
|
|
59915
|
-
reject(err);
|
|
59916
|
-
});
|
|
59917
|
-
});
|
|
59918
|
-
}
|
|
59919
|
-
const formatters = {
|
|
59920
|
-
prettier: {
|
|
59921
|
-
name: "prettier",
|
|
59922
|
-
packageName: "prettier",
|
|
59923
|
-
configFiles: [
|
|
59924
|
-
".prettierrc",
|
|
59925
|
-
".prettierrc.json",
|
|
59926
|
-
".prettierrc.yml",
|
|
59927
|
-
".prettierrc.yaml",
|
|
59928
|
-
".prettierrc.json5",
|
|
59929
|
-
".prettierrc.js",
|
|
59930
|
-
"prettier.config.js",
|
|
59931
|
-
".prettierrc.ts",
|
|
59932
|
-
"prettier.config.ts",
|
|
59933
|
-
".prettierrc.mjs",
|
|
59934
|
-
"prettier.config.mjs",
|
|
59935
|
-
".prettierrc.mts",
|
|
59936
|
-
"prettier.config.mts",
|
|
59937
|
-
".prettierrc.cjs",
|
|
59938
|
-
"prettier.config.cjs",
|
|
59939
|
-
".prettierrc.cts",
|
|
59940
|
-
"prettier.config.cts",
|
|
59941
|
-
".prettierrc.toml",
|
|
59942
|
-
{
|
|
59943
|
-
file: "package.json",
|
|
59944
|
-
key: "prettier"
|
|
59945
|
-
}
|
|
59946
|
-
],
|
|
59947
|
-
async format(files, ctx) {
|
|
59948
|
-
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
59949
|
-
"prettier",
|
|
59950
|
-
"--write",
|
|
59951
|
-
...files
|
|
59952
|
-
], ctx.cwd);
|
|
59953
|
-
}
|
|
59954
|
-
},
|
|
59955
|
-
biome: {
|
|
59956
|
-
name: "biome",
|
|
59957
|
-
packageName: "@biomejs/biome",
|
|
59958
|
-
configFiles: [
|
|
59959
|
-
"biome.json",
|
|
59960
|
-
"biome.jsonc",
|
|
59961
|
-
".biome.json",
|
|
59962
|
-
".biome.jsonc"
|
|
59963
|
-
],
|
|
59964
|
-
async format(files, ctx) {
|
|
59965
|
-
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
59966
|
-
"@biomejs/biome",
|
|
59967
|
-
"format",
|
|
59968
|
-
"--write",
|
|
59969
|
-
...files
|
|
59970
|
-
], ctx.cwd);
|
|
59971
|
-
}
|
|
59972
|
-
},
|
|
59973
|
-
oxfmt: {
|
|
59974
|
-
name: "oxfmt",
|
|
59975
|
-
packageName: "oxfmt",
|
|
59976
|
-
configFiles: [
|
|
59977
|
-
".oxfmtrc.json",
|
|
59978
|
-
".oxfmtrc.jsonc",
|
|
59979
|
-
"oxfmt.config.ts"
|
|
59980
|
-
],
|
|
59981
|
-
async format(files, ctx) {
|
|
59982
|
-
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
59983
|
-
"oxfmt",
|
|
59984
|
-
"--write",
|
|
59985
|
-
...files
|
|
59986
|
-
], ctx.cwd);
|
|
59987
|
-
}
|
|
59988
|
-
},
|
|
59989
|
-
deno: {
|
|
59990
|
-
name: "deno",
|
|
59991
|
-
configFiles: [
|
|
59992
|
-
"deno.json",
|
|
59993
|
-
"deno.jsonc",
|
|
59994
|
-
{
|
|
59995
|
-
file: "deno.json",
|
|
59996
|
-
key: "fmt"
|
|
59997
|
-
}
|
|
59998
|
-
],
|
|
59999
|
-
async format(files, ctx) {
|
|
60000
|
-
await spawnProcess("deno", ["fmt", ...files], ctx.cwd);
|
|
60001
|
-
}
|
|
60002
|
-
},
|
|
60003
|
-
dprint: {
|
|
60004
|
-
name: "dprint",
|
|
60005
|
-
packageName: "dprint",
|
|
60006
|
-
configFiles: [
|
|
60007
|
-
"dprint.json",
|
|
60008
|
-
"dprint.jsonc",
|
|
60009
|
-
".dprint.json",
|
|
60010
|
-
".dprint.jsonc"
|
|
60011
|
-
],
|
|
60012
|
-
async format(files, ctx) {
|
|
60013
|
-
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
60014
|
-
"dprint",
|
|
60015
|
-
"fmt",
|
|
60016
|
-
...files
|
|
60017
|
-
], ctx.cwd);
|
|
60018
|
-
}
|
|
60019
|
-
}
|
|
60020
|
-
};
|
|
60021
|
-
const defaultDetectOrder = Object.freeze([
|
|
60022
|
-
"dprint",
|
|
60023
|
-
"deno",
|
|
60024
|
-
"oxfmt",
|
|
60025
|
-
"biome",
|
|
60026
|
-
"prettier"
|
|
60027
|
-
]);
|
|
60028
|
-
/**
|
|
60029
|
-
* Detect the preferred formatter used in the project.
|
|
60030
|
-
*/
|
|
60031
|
-
async function detect(options = {}) {
|
|
60032
|
-
const cwd = options.cwd ? path$1.resolve(options.cwd) : process.cwd();
|
|
60033
|
-
const stopDir = options.stopDir ? path$1.resolve(cwd, options.stopDir) : void 0;
|
|
60034
|
-
const order = options.order ?? defaultDetectOrder;
|
|
60035
|
-
let found = traverseUpwards(cwd, stopDir, (dir) => {
|
|
60036
|
-
for (const formatterName of order) {
|
|
60037
|
-
const formatter = formatters[formatterName];
|
|
60038
|
-
for (const configFile of formatter.configFiles) if (typeof configFile === "string") {
|
|
60039
|
-
const configFilePath = path$1.join(dir, configFile);
|
|
60040
|
-
if (fs.existsSync(configFilePath)) return formatter.name;
|
|
60041
|
-
} else if (checkConfigFileWithKeyExists(path$1.join(dir, configFile.file), configFile.key)) return formatter.name;
|
|
60042
|
-
}
|
|
60043
|
-
});
|
|
60044
|
-
found ??= traverseUpwards(cwd, stopDir, (dir) => {
|
|
60045
|
-
for (const formatterName of order) {
|
|
60046
|
-
const formatter = formatters[formatterName];
|
|
60047
|
-
if (formatter.packageName) {
|
|
60048
|
-
const packagePath = path$1.join(dir, "node_modules", formatter.packageName);
|
|
60049
|
-
if (fs.existsSync(packagePath)) return formatter.name;
|
|
60050
|
-
}
|
|
60051
|
-
}
|
|
60052
|
-
});
|
|
60053
|
-
return found;
|
|
60054
|
-
}
|
|
60055
|
-
function checkConfigFileWithKeyExists(configFile, key) {
|
|
60056
|
-
try {
|
|
60057
|
-
const content = fs.readFileSync(configFile, "utf-8");
|
|
60058
|
-
return key in JSON.parse(content);
|
|
60059
|
-
} catch {
|
|
60060
|
-
return false;
|
|
60061
|
-
}
|
|
60062
|
-
}
|
|
60063
|
-
/**
|
|
60064
|
-
* Format the given patterns with a specified or auto-detected formatter. It returns `true` if a
|
|
60065
|
-
* formatter is found and the formatting process passes, otherwise returns `false`.
|
|
60066
|
-
*/
|
|
60067
|
-
async function format$1(patterns, options = {}) {
|
|
60068
|
-
const formatterName = options.formatter ?? await detect({
|
|
60069
|
-
cwd: options.cwd,
|
|
60070
|
-
stopDir: options.stopDir
|
|
60071
|
-
});
|
|
60072
|
-
if (!formatterName) return false;
|
|
60073
|
-
const formatter = formatters[formatterName];
|
|
60074
|
-
const ctx = {
|
|
60075
|
-
cwd: options.cwd ? path$1.resolve(options.cwd) : process.cwd(),
|
|
60076
|
-
async getPackageManager() {
|
|
60077
|
-
if (options.packageManager) return options.packageManager;
|
|
60078
|
-
return (await detect$1({
|
|
60079
|
-
cwd: options.cwd,
|
|
60080
|
-
stopDir: options.stopDir
|
|
60081
|
-
}))?.agent ?? "npm";
|
|
60082
|
-
}
|
|
60083
|
-
};
|
|
60084
|
-
await formatter.format(patterns, ctx);
|
|
60085
|
-
return true;
|
|
60086
|
-
}
|
|
60087
|
-
|
|
60088
|
-
//#endregion
|
|
60089
|
-
//#region ../../node_modules/.pnpm/@changesets+errors@1.0.0-next.3/node_modules/@changesets/errors/dist/index.mjs
|
|
60090
|
-
var GitError = class extends Error {
|
|
60091
|
-
code;
|
|
60092
|
-
constructor(code, message) {
|
|
60093
|
-
super(`${message}, exit code: ${code}`);
|
|
60094
|
-
this.code = code;
|
|
60095
|
-
}
|
|
60096
|
-
};
|
|
60097
|
-
var InternalError = class extends Error {
|
|
60098
|
-
constructor(message) {
|
|
60099
|
-
super(message);
|
|
60100
|
-
}
|
|
60101
|
-
};
|
|
60102
|
-
|
|
60103
60270
|
//#endregion
|
|
60104
60271
|
//#region ../../node_modules/.pnpm/tinyexec@1.2.4/node_modules/tinyexec/dist/main.mjs
|
|
60105
60272
|
const h = /^path$/i;
|
|
@@ -60428,7 +60595,221 @@ const R = (e, t, n) => {
|
|
|
60428
60595
|
const z = R;
|
|
60429
60596
|
|
|
60430
60597
|
//#endregion
|
|
60431
|
-
//#region ../../node_modules/.pnpm/@changesets+
|
|
60598
|
+
//#region ../../node_modules/.pnpm/@changesets+format@0.1.1/node_modules/@changesets/format/dist/index.js
|
|
60599
|
+
/**
|
|
60600
|
+
* Traverse upwards from `startDir` to `stopDir` (inclusive), calling `cb` in each directory. If
|
|
60601
|
+
* `cb` returns a non-null value, it'll stop and return that value.
|
|
60602
|
+
*/
|
|
60603
|
+
function traverseUpwards(startDir, stopDir, cb) {
|
|
60604
|
+
let dir = startDir;
|
|
60605
|
+
while (dir) {
|
|
60606
|
+
const result = cb(dir);
|
|
60607
|
+
if (result !== void 0) return result;
|
|
60608
|
+
if (dir === stopDir) break;
|
|
60609
|
+
const nextDir = path$1.dirname(dir);
|
|
60610
|
+
if (nextDir === dir) break;
|
|
60611
|
+
dir = nextDir;
|
|
60612
|
+
}
|
|
60613
|
+
}
|
|
60614
|
+
async function packageManagerExecute(packageManager, args, cwd) {
|
|
60615
|
+
const cmd = resolveCommand(packageManager, "execute-local", args) ?? {
|
|
60616
|
+
command: "npx",
|
|
60617
|
+
args
|
|
60618
|
+
};
|
|
60619
|
+
return await spawnProcess(cmd.command, cmd.args, cwd);
|
|
60620
|
+
}
|
|
60621
|
+
async function spawnProcess(command, args, cwd) {
|
|
60622
|
+
await z(command, args, {
|
|
60623
|
+
nodeOptions: { cwd },
|
|
60624
|
+
throwOnError: true
|
|
60625
|
+
});
|
|
60626
|
+
}
|
|
60627
|
+
const formatters = {
|
|
60628
|
+
prettier: {
|
|
60629
|
+
name: "prettier",
|
|
60630
|
+
packageName: "prettier",
|
|
60631
|
+
configFiles: [
|
|
60632
|
+
".prettierrc",
|
|
60633
|
+
".prettierrc.json",
|
|
60634
|
+
".prettierrc.yml",
|
|
60635
|
+
".prettierrc.yaml",
|
|
60636
|
+
".prettierrc.json5",
|
|
60637
|
+
".prettierrc.js",
|
|
60638
|
+
"prettier.config.js",
|
|
60639
|
+
".prettierrc.ts",
|
|
60640
|
+
"prettier.config.ts",
|
|
60641
|
+
".prettierrc.mjs",
|
|
60642
|
+
"prettier.config.mjs",
|
|
60643
|
+
".prettierrc.mts",
|
|
60644
|
+
"prettier.config.mts",
|
|
60645
|
+
".prettierrc.cjs",
|
|
60646
|
+
"prettier.config.cjs",
|
|
60647
|
+
".prettierrc.cts",
|
|
60648
|
+
"prettier.config.cts",
|
|
60649
|
+
".prettierrc.toml",
|
|
60650
|
+
{
|
|
60651
|
+
file: "package.json",
|
|
60652
|
+
key: "prettier"
|
|
60653
|
+
}
|
|
60654
|
+
],
|
|
60655
|
+
async format(files, ctx) {
|
|
60656
|
+
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
60657
|
+
"prettier",
|
|
60658
|
+
"--write",
|
|
60659
|
+
...files
|
|
60660
|
+
], ctx.cwd);
|
|
60661
|
+
}
|
|
60662
|
+
},
|
|
60663
|
+
biome: {
|
|
60664
|
+
name: "biome",
|
|
60665
|
+
packageName: "@biomejs/biome",
|
|
60666
|
+
configFiles: [
|
|
60667
|
+
"biome.json",
|
|
60668
|
+
"biome.jsonc",
|
|
60669
|
+
".biome.json",
|
|
60670
|
+
".biome.jsonc"
|
|
60671
|
+
],
|
|
60672
|
+
async format(files, ctx) {
|
|
60673
|
+
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
60674
|
+
"@biomejs/biome",
|
|
60675
|
+
"format",
|
|
60676
|
+
"--write",
|
|
60677
|
+
...files
|
|
60678
|
+
], ctx.cwd);
|
|
60679
|
+
}
|
|
60680
|
+
},
|
|
60681
|
+
oxfmt: {
|
|
60682
|
+
name: "oxfmt",
|
|
60683
|
+
packageName: "oxfmt",
|
|
60684
|
+
configFiles: [
|
|
60685
|
+
".oxfmtrc.json",
|
|
60686
|
+
".oxfmtrc.jsonc",
|
|
60687
|
+
"oxfmt.config.ts"
|
|
60688
|
+
],
|
|
60689
|
+
async format(files, ctx) {
|
|
60690
|
+
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
60691
|
+
"oxfmt",
|
|
60692
|
+
"--write",
|
|
60693
|
+
...files
|
|
60694
|
+
], ctx.cwd);
|
|
60695
|
+
}
|
|
60696
|
+
},
|
|
60697
|
+
deno: {
|
|
60698
|
+
name: "deno",
|
|
60699
|
+
configFiles: [
|
|
60700
|
+
"deno.json",
|
|
60701
|
+
"deno.jsonc",
|
|
60702
|
+
{
|
|
60703
|
+
file: "deno.json",
|
|
60704
|
+
key: "fmt"
|
|
60705
|
+
}
|
|
60706
|
+
],
|
|
60707
|
+
async format(files, ctx) {
|
|
60708
|
+
await spawnProcess("deno", ["fmt", ...files], ctx.cwd);
|
|
60709
|
+
}
|
|
60710
|
+
},
|
|
60711
|
+
dprint: {
|
|
60712
|
+
name: "dprint",
|
|
60713
|
+
packageName: "dprint",
|
|
60714
|
+
configFiles: [
|
|
60715
|
+
"dprint.json",
|
|
60716
|
+
"dprint.jsonc",
|
|
60717
|
+
".dprint.json",
|
|
60718
|
+
".dprint.jsonc"
|
|
60719
|
+
],
|
|
60720
|
+
async format(files, ctx) {
|
|
60721
|
+
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
60722
|
+
"dprint",
|
|
60723
|
+
"fmt",
|
|
60724
|
+
...files
|
|
60725
|
+
], ctx.cwd);
|
|
60726
|
+
}
|
|
60727
|
+
}
|
|
60728
|
+
};
|
|
60729
|
+
const defaultDetectOrder = Object.freeze([
|
|
60730
|
+
"dprint",
|
|
60731
|
+
"deno",
|
|
60732
|
+
"oxfmt",
|
|
60733
|
+
"biome",
|
|
60734
|
+
"prettier"
|
|
60735
|
+
]);
|
|
60736
|
+
/**
|
|
60737
|
+
* Detect the preferred formatter used in the project.
|
|
60738
|
+
*/
|
|
60739
|
+
async function detect(options = {}) {
|
|
60740
|
+
const cwd = options.cwd ? path$1.resolve(options.cwd) : process.cwd();
|
|
60741
|
+
const stopDir = options.stopDir ? path$1.resolve(cwd, options.stopDir) : void 0;
|
|
60742
|
+
const order = options.order ?? defaultDetectOrder;
|
|
60743
|
+
let found = traverseUpwards(cwd, stopDir, (dir) => {
|
|
60744
|
+
for (const formatterName of order) {
|
|
60745
|
+
const formatter = formatters[formatterName];
|
|
60746
|
+
for (const configFile of formatter.configFiles) if (typeof configFile === "string") {
|
|
60747
|
+
const configFilePath = path$1.join(dir, configFile);
|
|
60748
|
+
if (fs.existsSync(configFilePath)) return formatter.name;
|
|
60749
|
+
} else if (checkConfigFileWithKeyExists(path$1.join(dir, configFile.file), configFile.key)) return formatter.name;
|
|
60750
|
+
}
|
|
60751
|
+
});
|
|
60752
|
+
found ??= traverseUpwards(cwd, stopDir, (dir) => {
|
|
60753
|
+
for (const formatterName of order) {
|
|
60754
|
+
const formatter = formatters[formatterName];
|
|
60755
|
+
if (formatter.packageName) {
|
|
60756
|
+
const packagePath = path$1.join(dir, "node_modules", formatter.packageName);
|
|
60757
|
+
if (fs.existsSync(packagePath)) return formatter.name;
|
|
60758
|
+
}
|
|
60759
|
+
}
|
|
60760
|
+
});
|
|
60761
|
+
return found;
|
|
60762
|
+
}
|
|
60763
|
+
function checkConfigFileWithKeyExists(configFile, key) {
|
|
60764
|
+
try {
|
|
60765
|
+
const content = fs.readFileSync(configFile, "utf-8");
|
|
60766
|
+
return key in JSON.parse(content);
|
|
60767
|
+
} catch {
|
|
60768
|
+
return false;
|
|
60769
|
+
}
|
|
60770
|
+
}
|
|
60771
|
+
/**
|
|
60772
|
+
* Format the given patterns with a specified or auto-detected formatter. It returns `true` if a
|
|
60773
|
+
* formatter is found and the formatting process passes, otherwise returns `false`.
|
|
60774
|
+
*/
|
|
60775
|
+
async function format$1(patterns, options = {}) {
|
|
60776
|
+
const formatterName = options.formatter ?? await detect({
|
|
60777
|
+
cwd: options.cwd,
|
|
60778
|
+
stopDir: options.stopDir
|
|
60779
|
+
});
|
|
60780
|
+
if (!formatterName) return false;
|
|
60781
|
+
const formatter = formatters[formatterName];
|
|
60782
|
+
const ctx = {
|
|
60783
|
+
cwd: options.cwd ? path$1.resolve(options.cwd) : process.cwd(),
|
|
60784
|
+
async getPackageManager() {
|
|
60785
|
+
if (options.packageManager) return options.packageManager;
|
|
60786
|
+
return (await detect$1({
|
|
60787
|
+
cwd: options.cwd,
|
|
60788
|
+
stopDir: options.stopDir
|
|
60789
|
+
}))?.agent ?? "npm";
|
|
60790
|
+
}
|
|
60791
|
+
};
|
|
60792
|
+
await formatter.format(patterns, ctx);
|
|
60793
|
+
return true;
|
|
60794
|
+
}
|
|
60795
|
+
|
|
60796
|
+
//#endregion
|
|
60797
|
+
//#region ../../node_modules/.pnpm/@changesets+errors@1.0.0-next.4/node_modules/@changesets/errors/dist/index.mjs
|
|
60798
|
+
var GitError = class extends Error {
|
|
60799
|
+
code;
|
|
60800
|
+
constructor(code, message) {
|
|
60801
|
+
super(`${message}, exit code: ${code}`);
|
|
60802
|
+
this.code = code;
|
|
60803
|
+
}
|
|
60804
|
+
};
|
|
60805
|
+
var InternalError = class extends Error {
|
|
60806
|
+
constructor(message) {
|
|
60807
|
+
super(message);
|
|
60808
|
+
}
|
|
60809
|
+
};
|
|
60810
|
+
|
|
60811
|
+
//#endregion
|
|
60812
|
+
//#region ../../node_modules/.pnpm/@changesets+git@4.0.0-next.7/node_modules/@changesets/git/dist/index.mjs
|
|
60432
60813
|
async function getDivergedCommit(cwd, ref) {
|
|
60433
60814
|
const cmd = await z("git", [
|
|
60434
60815
|
"merge-base",
|
|
@@ -62600,7 +62981,7 @@ function applyEdits(text, edits) {
|
|
|
62600
62981
|
}
|
|
62601
62982
|
|
|
62602
62983
|
//#endregion
|
|
62603
|
-
//#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.0.0-next.
|
|
62984
|
+
//#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.0.0-next.8/node_modules/@changesets/apply-release-plan/dist/index.mjs
|
|
62604
62985
|
/**
|
|
62605
62986
|
* A simple JSON editing utility that preserves formatting. They specified operation keys
|
|
62606
62987
|
* must exist in the JSON for this implementation.
|
|
@@ -62741,13 +63122,8 @@ const DEPENDENCY_TYPES = [
|
|
|
62741
63122
|
"peerDependencies",
|
|
62742
63123
|
"optionalDependencies"
|
|
62743
63124
|
];
|
|
62744
|
-
function
|
|
63125
|
+
function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateInternalDependencies, onlyUpdatePeerDependentsWhenOutOfRange, bumpVersionsWithWorkspaceProtocolOnly, snapshot }) {
|
|
62745
63126
|
const pkgJsonEdits = [];
|
|
62746
|
-
const { newVersion, packageJson } = release;
|
|
62747
|
-
pkgJsonEdits.push({
|
|
62748
|
-
keys: ["version"],
|
|
62749
|
-
value: newVersion
|
|
62750
|
-
});
|
|
62751
63127
|
for (const depType of DEPENDENCY_TYPES) {
|
|
62752
63128
|
const deps = packageJson[depType];
|
|
62753
63129
|
if (deps) for (const { name, version, oldVersion, type, dir } of versionsToUpdate) {
|
|
@@ -62781,10 +63157,7 @@ function versionPackage(release, versionsToUpdate, { cwd, updateInternalDependen
|
|
|
62781
63157
|
}
|
|
62782
63158
|
}
|
|
62783
63159
|
}
|
|
62784
|
-
return
|
|
62785
|
-
...release,
|
|
62786
|
-
pkgJsonEdits
|
|
62787
|
-
};
|
|
63160
|
+
return pkgJsonEdits;
|
|
62788
63161
|
}
|
|
62789
63162
|
function getVersionRangeType(versionRange) {
|
|
62790
63163
|
if (versionRange.charAt(0) === "^") return "^";
|
|
@@ -62815,6 +63188,13 @@ async function getFormatter(config, cwd) {
|
|
|
62815
63188
|
});
|
|
62816
63189
|
};
|
|
62817
63190
|
}
|
|
63191
|
+
async function updatePackageJson(dir, edits) {
|
|
63192
|
+
if (edits.length === 0) return;
|
|
63193
|
+
const pkgJsonPath = path$1.resolve(dir, "package.json");
|
|
63194
|
+
const pkgUpdated = editJson(await fs$1.readFile(pkgJsonPath, "utf8"), edits);
|
|
63195
|
+
await fs$1.writeFile(pkgJsonPath, pkgUpdated);
|
|
63196
|
+
return pkgJsonPath;
|
|
63197
|
+
}
|
|
62818
63198
|
async function applyReleasePlan(releasePlan, packages, config = defaultConfig, snapshot, contextDir = import.meta.dirname) {
|
|
62819
63199
|
const cwd = packages.rootDir;
|
|
62820
63200
|
const touchedFiles = [];
|
|
@@ -62843,22 +63223,21 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
|
|
|
62843
63223
|
type,
|
|
62844
63224
|
dir: packagesByName.get(name).dir
|
|
62845
63225
|
}));
|
|
62846
|
-
const
|
|
62847
|
-
|
|
62848
|
-
|
|
62849
|
-
|
|
62850
|
-
|
|
62851
|
-
|
|
62852
|
-
|
|
62853
|
-
});
|
|
62854
|
-
});
|
|
63226
|
+
const dependencyUpdateOptions = {
|
|
63227
|
+
cwd,
|
|
63228
|
+
updateInternalDependencies: config.updateInternalDependencies,
|
|
63229
|
+
onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange,
|
|
63230
|
+
bumpVersionsWithWorkspaceProtocolOnly: config.bumpVersionsWithWorkspaceProtocolOnly,
|
|
63231
|
+
snapshot
|
|
63232
|
+
};
|
|
62855
63233
|
const filesToFormat = [];
|
|
62856
|
-
for (const release of
|
|
62857
|
-
const { changelog,
|
|
62858
|
-
const pkgJsonPath =
|
|
62859
|
-
|
|
62860
|
-
|
|
62861
|
-
|
|
63234
|
+
for (const release of releaseWithChangelogs) {
|
|
63235
|
+
const { changelog, dir, name, newVersion, packageJson } = release;
|
|
63236
|
+
const pkgJsonPath = await updatePackageJson(dir, [{
|
|
63237
|
+
keys: ["version"],
|
|
63238
|
+
value: newVersion
|
|
63239
|
+
}, ...getDependencyVersionEdits(packageJson, versionsToUpdate, dependencyUpdateOptions)]);
|
|
63240
|
+
if (pkgJsonPath) touchedFiles.push(pkgJsonPath);
|
|
62862
63241
|
if (changelog && changelog.length > 0) {
|
|
62863
63242
|
const changelogPath = path$1.resolve(dir, "CHANGELOG.md");
|
|
62864
63243
|
await updateChangelog(changelogPath, changelog, name);
|
|
@@ -62866,6 +63245,11 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
|
|
|
62866
63245
|
filesToFormat.push(changelogPath);
|
|
62867
63246
|
}
|
|
62868
63247
|
}
|
|
63248
|
+
if (packages.rootPackage) {
|
|
63249
|
+
const pkgJsonEdits = getDependencyVersionEdits(packages.rootPackage.packageJson, versionsToUpdate, dependencyUpdateOptions);
|
|
63250
|
+
const pkgJsonPath = await updatePackageJson(packages.rootPackage.dir, pkgJsonEdits);
|
|
63251
|
+
if (pkgJsonPath) touchedFiles.push(pkgJsonPath);
|
|
63252
|
+
}
|
|
62869
63253
|
if (filesToFormat.length > 0) await (await getFormatter(config.format, cwd))(filesToFormat);
|
|
62870
63254
|
if (releasePlan.preState == null || releasePlan.preState.mode === "exit") {
|
|
62871
63255
|
const changesetFolder = path$1.resolve(cwd, ".changeset");
|
|
@@ -62957,7 +63341,7 @@ async function updateChangelog(changelogPath, changelog, name) {
|
|
|
62957
63341
|
}
|
|
62958
63342
|
|
|
62959
63343
|
//#endregion
|
|
62960
|
-
//#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@7.0.0-next.
|
|
63344
|
+
//#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@7.0.0-next.8/node_modules/@changesets/assemble-release-plan/dist/index.mjs
|
|
62961
63345
|
function getHighestReleaseType(releases) {
|
|
62962
63346
|
if (releases.length === 0) throw new Error(`Large internal Changesets error when calculating highest release type in the set of releases. Please contact the maintainers`);
|
|
62963
63347
|
let highestReleaseType = "none";
|
|
@@ -63304,7 +63688,7 @@ function getPreInfo(changesets, packagesByName, config, preState) {
|
|
|
63304
63688
|
}
|
|
63305
63689
|
|
|
63306
63690
|
//#endregion
|
|
63307
|
-
//#region ../../node_modules/.pnpm/@changesets+pre@3.0.0-next.
|
|
63691
|
+
//#region ../../node_modules/.pnpm/@changesets+pre@3.0.0-next.7/node_modules/@changesets/pre/dist/index.mjs
|
|
63308
63692
|
async function outputFile(filePath, content) {
|
|
63309
63693
|
await fs$1.mkdir(path$1.dirname(filePath), { recursive: true });
|
|
63310
63694
|
await fs$1.writeFile(filePath, content, "utf8");
|
|
@@ -63334,7 +63718,7 @@ async function migratePreState(rootDir, preState) {
|
|
|
63334
63718
|
}
|
|
63335
63719
|
|
|
63336
63720
|
//#endregion
|
|
63337
|
-
//#region ../../node_modules/.pnpm/@changesets+parse@1.0.0-next.
|
|
63721
|
+
//#region ../../node_modules/.pnpm/@changesets+parse@1.0.0-next.8/node_modules/@changesets/parse/dist/index.mjs
|
|
63338
63722
|
const mdRegex = /\s*---([^]*?)\r?\n\s*---(\s*(?:\n|$)[^]*)/;
|
|
63339
63723
|
const EXAMPLE_FORMAT = `---\n"package-name": patch\n---`;
|
|
63340
63724
|
const validVersionTypes = [
|
|
@@ -63388,7 +63772,7 @@ YAML error: ${e instanceof Error ? e.message : String(e)}\nFrontmatter content:\
|
|
|
63388
63772
|
}
|
|
63389
63773
|
|
|
63390
63774
|
//#endregion
|
|
63391
|
-
//#region ../../node_modules/.pnpm/@changesets+read@1.0.0-next.
|
|
63775
|
+
//#region ../../node_modules/.pnpm/@changesets+read@1.0.0-next.8/node_modules/@changesets/read/dist/index.mjs
|
|
63392
63776
|
const ignoredMdFiles = [
|
|
63393
63777
|
/^README\.md$/i,
|
|
63394
63778
|
"AGENTS.md",
|
|
@@ -63422,7 +63806,7 @@ async function readChangesets(rootDir, sinceRef) {
|
|
|
63422
63806
|
}
|
|
63423
63807
|
|
|
63424
63808
|
//#endregion
|
|
63425
|
-
//#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.0-next.
|
|
63809
|
+
//#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.0-next.8/node_modules/@changesets/get-release-plan/dist/index.mjs
|
|
63426
63810
|
async function getReleasePlan(cwd, sinceRef, passedConfig) {
|
|
63427
63811
|
const packages = await getPackages(cwd);
|
|
63428
63812
|
const configResult = await readConfig(packages.rootDir, packages);
|