@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
package/changesets-changelog.cjs
CHANGED
|
@@ -52,7 +52,6 @@ let module$1 = require("module");
|
|
|
52
52
|
let semver_classes_range_js = require("semver/classes/range.js");
|
|
53
53
|
semver_classes_range_js = __toESM(semver_classes_range_js, 1);
|
|
54
54
|
let node_child_process = require("node:child_process");
|
|
55
|
-
node_child_process = __toESM(node_child_process, 1);
|
|
56
55
|
let node_stream_promises = require("node:stream/promises");
|
|
57
56
|
let node_stream = require("node:stream");
|
|
58
57
|
let node_readline = require("node:readline");
|
|
@@ -420,7 +419,7 @@ const trimTrailingSlashes = (s) => {
|
|
|
420
419
|
return s.slice(0, end);
|
|
421
420
|
};
|
|
422
421
|
//#endregion
|
|
423
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
422
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/limits.js
|
|
424
423
|
/** Hard cap on pattern length. Upstream minimatch's MAX_PATTERN_LENGTH (64KB). */
|
|
425
424
|
const MAX_PATTERN_LENGTH = 1024 * 64;
|
|
426
425
|
/** Default brace-expansion output budget. Upstream brace-expansion's EXPANSION_MAX. */
|
|
@@ -454,7 +453,7 @@ const assertCap = (name, value) => {
|
|
|
454
453
|
return value;
|
|
455
454
|
};
|
|
456
455
|
//#endregion
|
|
457
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
456
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/unescape.js
|
|
458
457
|
/**
|
|
459
458
|
* Un-escape a string that has been escaped with `escape`.
|
|
460
459
|
*
|
|
@@ -477,11 +476,11 @@ const unescapePattern = (s, { windowsPathsNoEscape = false, magicalBraces = true
|
|
|
477
476
|
return windowsPathsNoEscape ? s.replace(/\[([^/\\{}])\]/g, "$1") : s.replace(/((?!\\).|^)\[([^/\\{}])\]/g, "$1$2").replace(/\\([^/{}])/g, "$1");
|
|
478
477
|
};
|
|
479
478
|
//#endregion
|
|
480
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
479
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/types.js
|
|
481
480
|
/** The globstar marker in a compiled pattern set. */
|
|
482
481
|
const GLOBSTAR = Symbol("globstar **");
|
|
483
482
|
//#endregion
|
|
484
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
483
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/escape.js
|
|
485
484
|
/**
|
|
486
485
|
* Escape all magic characters in a glob pattern.
|
|
487
486
|
*
|
|
@@ -499,13 +498,13 @@ const escapePattern = (s, { windowsPathsNoEscape = false, magicalBraces = false
|
|
|
499
498
|
return windowsPathsNoEscape ? s.replace(/[?*()[\]]/g, "[$&]") : s.replace(/[?*()[\]\\]/g, "\\$&");
|
|
500
499
|
};
|
|
501
500
|
//#endregion
|
|
502
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
501
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/assertValidPattern.js
|
|
503
502
|
const assertValidPattern = (pattern) => {
|
|
504
503
|
if (typeof pattern !== "string") throw new TypeError("invalid pattern");
|
|
505
504
|
if (pattern.length > 65536) throw new GuardExceeded("PatternTooLong", MAX_PATTERN_LENGTH, pattern.length);
|
|
506
505
|
};
|
|
507
506
|
//#endregion
|
|
508
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
507
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpressions.js
|
|
509
508
|
const posixClasses = {
|
|
510
509
|
"[:alnum:]": ["\\p{L}\\p{Nl}\\p{Nd}", true],
|
|
511
510
|
"[:alpha:]": ["\\p{L}\\p{Nl}", true],
|
|
@@ -628,7 +627,7 @@ const parseClass = (glob, position) => {
|
|
|
628
627
|
];
|
|
629
628
|
};
|
|
630
629
|
//#endregion
|
|
631
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
630
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/ast.js
|
|
632
631
|
const types = /* @__PURE__ */ new Set([
|
|
633
632
|
"!",
|
|
634
633
|
"?",
|
|
@@ -1145,7 +1144,7 @@ var AST = class AST {
|
|
|
1145
1144
|
}
|
|
1146
1145
|
};
|
|
1147
1146
|
//#endregion
|
|
1148
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
1147
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/balancedMatch.js
|
|
1149
1148
|
const maybeMatch = (reg, str) => {
|
|
1150
1149
|
const m = str.match(reg);
|
|
1151
1150
|
return m ? m[0] : null;
|
|
@@ -1203,7 +1202,7 @@ const range = (a, b, str) => {
|
|
|
1203
1202
|
return result;
|
|
1204
1203
|
};
|
|
1205
1204
|
//#endregion
|
|
1206
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
1205
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/braceExpansion.js
|
|
1207
1206
|
const escSlash = `\0SLASH${Math.random()}\0`;
|
|
1208
1207
|
const escOpen = `\0OPEN${Math.random()}\0`;
|
|
1209
1208
|
const escClose = `\0CLOSE${Math.random()}\0`;
|
|
@@ -1350,7 +1349,7 @@ function expand_(str, max, isTopInput, depth) {
|
|
|
1350
1349
|
}
|
|
1351
1350
|
}
|
|
1352
1351
|
//#endregion
|
|
1353
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
1352
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/internal/minimatch.js
|
|
1354
1353
|
const starDotExtRE = /^\*+([^+@!?*[(]*)$/;
|
|
1355
1354
|
const starDotExtTest = (ext) => (f) => !f.startsWith(".") && f.endsWith(ext);
|
|
1356
1355
|
const starDotExtTestDot = (ext) => (f) => f.endsWith(ext);
|
|
@@ -1921,7 +1920,7 @@ var Minimatch = class {
|
|
|
1921
1920
|
}
|
|
1922
1921
|
};
|
|
1923
1922
|
//#endregion
|
|
1924
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
1923
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobPattern.js
|
|
1925
1924
|
/**
|
|
1926
1925
|
* Typed failure raised when a glob pattern trips a compile-time guard:
|
|
1927
1926
|
* over-length, brace-expansion budget exhaustion, or nesting past the depth
|
|
@@ -2173,7 +2172,7 @@ var GlobPattern = class GlobPattern extends effect.Schema.Class("GlobPattern")(e
|
|
|
2173
2172
|
})));
|
|
2174
2173
|
};
|
|
2175
2174
|
//#endregion
|
|
2176
|
-
//#region ../../node_modules/.pnpm/@effected+glob@0.1.
|
|
2175
|
+
//#region ../../node_modules/.pnpm/@effected+glob@0.1.2_effect@4.0.0-beta.99/node_modules/@effected/glob/GlobSet.js
|
|
2177
2176
|
const exclusionTarget = (pattern) => pattern.startsWith("!") ? pattern.slice(1) : void 0;
|
|
2178
2177
|
const allCompileUnderDefaults = (patterns) => {
|
|
2179
2178
|
for (const pattern of patterns) {
|
|
@@ -2301,7 +2300,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
|
|
|
2301
2300
|
}
|
|
2302
2301
|
};
|
|
2303
2302
|
//#endregion
|
|
2304
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
2303
|
+
//#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
|
|
2305
2304
|
/**
|
|
2306
2305
|
* Extension data specific to bun lockfiles, attached to `Lockfile.extension`
|
|
2307
2306
|
* when the format is `"bun"`.
|
|
@@ -2322,7 +2321,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
|
|
|
2322
2321
|
trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
|
|
2323
2322
|
}) {};
|
|
2324
2323
|
//#endregion
|
|
2325
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
2324
|
+
//#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
|
|
2326
2325
|
/**
|
|
2327
2326
|
* Contract for resolving pnpm `catalog:` dependency specifiers to concrete
|
|
2328
2327
|
* version ranges.
|
|
@@ -2368,7 +2367,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
|
|
|
2368
2367
|
static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2369
2368
|
};
|
|
2370
2369
|
//#endregion
|
|
2371
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
2370
|
+
//#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
|
|
2372
2371
|
/**
|
|
2373
2372
|
* Raised when a `catalog:` or `workspace:` specifier cannot be resolved
|
|
2374
2373
|
* because the resolution mechanism itself failed — not for an ordinary
|
|
@@ -2429,7 +2428,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
|
|
|
2429
2428
|
static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2430
2429
|
};
|
|
2431
2430
|
//#endregion
|
|
2432
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
2431
|
+
//#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
|
|
2433
2432
|
/**
|
|
2434
2433
|
* Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
|
|
2435
2434
|
* that is unreadable or not valid YAML, a root `package.json` `workspaces` field
|
|
@@ -2473,7 +2472,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
|
|
|
2473
2472
|
}
|
|
2474
2473
|
};
|
|
2475
2474
|
//#endregion
|
|
2476
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
2475
|
+
//#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
|
|
2477
2476
|
/**
|
|
2478
2477
|
* The short dependency kind: which dependency map an entry came from, named the
|
|
2479
2478
|
* way consumers branch on it.
|
|
@@ -2505,7 +2504,7 @@ Object.fromEntries(Object.entries({
|
|
|
2505
2504
|
optional: "optionalDependencies"
|
|
2506
2505
|
}).map(([kind, field]) => [field, kind]));
|
|
2507
2506
|
//#endregion
|
|
2508
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
2507
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/desugar.js
|
|
2509
2508
|
const sv = (major, minor, patch, prerelease = [], build = []) => ({
|
|
2510
2509
|
major,
|
|
2511
2510
|
minor,
|
|
@@ -2594,7 +2593,7 @@ const desugarHyphen = (lower, upper) => {
|
|
|
2594
2593
|
return [comp(">=", lowerVersion)];
|
|
2595
2594
|
};
|
|
2596
2595
|
//#endregion
|
|
2597
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
2596
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/grammar.js
|
|
2598
2597
|
/** Private control-flow exception; never escapes the entry points. */
|
|
2599
2598
|
var ParseFailure = class {
|
|
2600
2599
|
position;
|
|
@@ -2989,7 +2988,7 @@ const formatComparator = (c) => {
|
|
|
2989
2988
|
/** Print comparator sets as `a b || c d`. */
|
|
2990
2989
|
const formatRange = (sets) => sets.map((set) => set.map(formatComparator).join(" ")).join(" || ");
|
|
2991
2990
|
//#endregion
|
|
2992
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
2991
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/order.js
|
|
2993
2992
|
/**
|
|
2994
2993
|
* Compare two prerelease identifiers per SemVer 2.0.0 §11: numeric
|
|
2995
2994
|
* identifiers always have lower precedence than alphanumeric ones; numerics
|
|
@@ -3042,7 +3041,7 @@ const compareBuild = (a, b) => {
|
|
|
3042
3041
|
return 0;
|
|
3043
3042
|
};
|
|
3044
3043
|
//#endregion
|
|
3045
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
3044
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/SemVer.js
|
|
3046
3045
|
/**
|
|
3047
3046
|
* Indicates that a string could not be parsed as a valid SemVer 2.0.0 version.
|
|
3048
3047
|
*
|
|
@@ -3443,7 +3442,7 @@ var SemVerBump = class {
|
|
|
3443
3442
|
}
|
|
3444
3443
|
};
|
|
3445
3444
|
//#endregion
|
|
3446
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
3445
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/Comparator.js
|
|
3447
3446
|
/**
|
|
3448
3447
|
* Indicates that a string could not be parsed as a single comparator.
|
|
3449
3448
|
*
|
|
@@ -3543,7 +3542,7 @@ var Comparator = class Comparator extends effect.Schema.Class("Comparator")({
|
|
|
3543
3542
|
}
|
|
3544
3543
|
};
|
|
3545
3544
|
//#endregion
|
|
3546
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
3545
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/internal/normalize.js
|
|
3547
3546
|
const operatorWeight = (op) => {
|
|
3548
3547
|
switch (op) {
|
|
3549
3548
|
case ">=": return 0;
|
|
@@ -3574,7 +3573,7 @@ const normalizeComparatorSet = (set) => sortComparators(removeDuplicates(set));
|
|
|
3574
3573
|
/** Normalize every comparator set in a range: sort and deduplicate each independently. */
|
|
3575
3574
|
const normalizeSets = (sets) => sets.map(normalizeComparatorSet);
|
|
3576
3575
|
//#endregion
|
|
3577
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.1.
|
|
3576
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.1.1_effect@4.0.0-beta.99/node_modules/@effected/semver/Range.js
|
|
3578
3577
|
/**
|
|
3579
3578
|
* Indicates that a string could not be parsed as a range expression.
|
|
3580
3579
|
*
|
|
@@ -3843,7 +3842,7 @@ const isComparatorSetSubset = (sub, sup) => {
|
|
|
3843
3842
|
return true;
|
|
3844
3843
|
};
|
|
3845
3844
|
//#endregion
|
|
3846
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
3845
|
+
//#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
|
|
3847
3846
|
/**
|
|
3848
3847
|
* Indicates that a string could not be parsed as a valid dependency specifier.
|
|
3849
3848
|
*
|
|
@@ -4050,7 +4049,7 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
|
|
|
4050
4049
|
FromString: fromString
|
|
4051
4050
|
});
|
|
4052
4051
|
//#endregion
|
|
4053
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.2.
|
|
4052
|
+
//#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
|
|
4054
4053
|
const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
|
|
4055
4054
|
const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
|
|
4056
4055
|
const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
|
|
@@ -4103,7 +4102,7 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
|
|
|
4103
4102
|
decode: decode$2
|
|
4104
4103
|
});
|
|
4105
4104
|
//#endregion
|
|
4106
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4105
|
+
//#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
|
|
4107
4106
|
/**
|
|
4108
4107
|
* One declared dependency of one workspace importer, as the lockfile records it.
|
|
4109
4108
|
*
|
|
@@ -4131,7 +4130,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
|
|
|
4131
4130
|
depType: DependencyField
|
|
4132
4131
|
}) {};
|
|
4133
4132
|
//#endregion
|
|
4134
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4133
|
+
//#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
|
|
4135
4134
|
/**
|
|
4136
4135
|
* One workspace importer's declared dependencies, as the lockfile records them.
|
|
4137
4136
|
*
|
|
@@ -4155,7 +4154,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
|
|
|
4155
4154
|
dependencies: effect.Schema.Array(ImporterDependency)
|
|
4156
4155
|
}) {};
|
|
4157
4156
|
//#endregion
|
|
4158
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4157
|
+
//#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
|
|
4159
4158
|
const EMPTY_DEPENDENCIES = {};
|
|
4160
4159
|
/**
|
|
4161
4160
|
* A package resolved from a lockfile.
|
|
@@ -4190,7 +4189,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
|
|
|
4190
4189
|
dependencies: effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY_DEPENDENCIES)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY_DEPENDENCIES)))
|
|
4191
4190
|
}) {};
|
|
4192
4191
|
//#endregion
|
|
4193
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4192
|
+
//#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
|
|
4194
4193
|
/**
|
|
4195
4194
|
* A directed dependency edge between two workspace packages as recorded in
|
|
4196
4195
|
* the lockfile.
|
|
@@ -4212,7 +4211,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
|
|
|
4212
4211
|
constraint: effect.Schema.String
|
|
4213
4212
|
}) {};
|
|
4214
4213
|
//#endregion
|
|
4215
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4214
|
+
//#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
|
|
4216
4215
|
/**
|
|
4217
4216
|
* Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
|
|
4218
4217
|
* when the format is `"pnpm"`.
|
|
@@ -4237,7 +4236,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
|
|
|
4237
4236
|
}))
|
|
4238
4237
|
}) {};
|
|
4239
4238
|
//#endregion
|
|
4240
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4239
|
+
//#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
|
|
4241
4240
|
/**
|
|
4242
4241
|
* The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
|
|
4243
4242
|
* `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
|
|
@@ -4271,7 +4270,7 @@ const FILENAMES = {
|
|
|
4271
4270
|
*/
|
|
4272
4271
|
const filenameFor = (format) => FILENAMES[format];
|
|
4273
4272
|
//#endregion
|
|
4274
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
4273
|
+
//#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
|
|
4275
4274
|
/**
|
|
4276
4275
|
* The four dependency sections of a manifest, in a stable order — the shared
|
|
4277
4276
|
* dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
|
|
@@ -4397,7 +4396,7 @@ const extractWorkspaceDeps = (workspaces, workspaceNames) => {
|
|
|
4397
4396
|
return deps;
|
|
4398
4397
|
};
|
|
4399
4398
|
//#endregion
|
|
4400
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4399
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncNode.js
|
|
4401
4400
|
/**
|
|
4402
4401
|
* Discriminator values for JSONC AST node types: the JSON value types
|
|
4403
4402
|
* (`string`/`number`/`boolean`/`null`), the structural types
|
|
@@ -4572,7 +4571,7 @@ function evaluateNode(node, depth) {
|
|
|
4572
4571
|
}
|
|
4573
4572
|
}
|
|
4574
4573
|
//#endregion
|
|
4575
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4574
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/scanner.js
|
|
4576
4575
|
const isWhitespace = (ch) => ch === 32 || ch === 9 || ch === 11 || ch === 12 || ch === 160 || ch === 65279;
|
|
4577
4576
|
const isLineBreak$1 = (ch) => ch === 10 || ch === 13 || ch === 8232 || ch === 8233;
|
|
4578
4577
|
const isDigit$1 = (ch) => ch >= 48 && ch <= 57;
|
|
@@ -4868,7 +4867,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
|
|
|
4868
4867
|
};
|
|
4869
4868
|
};
|
|
4870
4869
|
//#endregion
|
|
4871
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4870
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/skip.js
|
|
4872
4871
|
/**
|
|
4873
4872
|
* Iteratively consume the value beginning at the cursor's current token and
|
|
4874
4873
|
* return its tight end offset (excludes trailing whitespace/comments).
|
|
@@ -4898,7 +4897,7 @@ const skipBalancedValue = (cursor) => {
|
|
|
4898
4897
|
return end;
|
|
4899
4898
|
};
|
|
4900
4899
|
//#endregion
|
|
4901
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
4900
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/parser.js
|
|
4902
4901
|
/**
|
|
4903
4902
|
* The public parse-error code vocabulary. The facade builds its `@public`
|
|
4904
4903
|
* `JsoncParseErrorCode` schema from this array; the parser produces these codes
|
|
@@ -5311,7 +5310,7 @@ const parseTree$2 = (text, flags) => {
|
|
|
5311
5310
|
};
|
|
5312
5311
|
};
|
|
5313
5312
|
//#endregion
|
|
5314
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
5313
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/Jsonc.js
|
|
5315
5314
|
/**
|
|
5316
5315
|
* The single public parse-error code vocabulary, appearing as the `code` field
|
|
5317
5316
|
* of {@link JsoncParseErrorDetail}.
|
|
@@ -5356,6 +5355,47 @@ effect.Schema.Class("JsoncParseOptions")({
|
|
|
5356
5355
|
allowTrailingComma: effect.Schema.optionalKey(effect.Schema.Boolean),
|
|
5357
5356
|
allowEmptyContent: effect.Schema.optionalKey(effect.Schema.Boolean)
|
|
5358
5357
|
});
|
|
5358
|
+
/**
|
|
5359
|
+
* The public stringify-error code vocabulary, appearing as the `code` field of
|
|
5360
|
+
* {@link JsoncStringifyError}:
|
|
5361
|
+
*
|
|
5362
|
+
* - `CircularReference` — the value contains a reference cycle, so no finite
|
|
5363
|
+
* JSON text exists for it.
|
|
5364
|
+
* - `BigIntValue` — the value contains a `bigint` (anywhere, top-level or
|
|
5365
|
+
* nested), which JSON cannot represent.
|
|
5366
|
+
* - `TopLevelUnrepresentable` — the top-level value (`undefined`, a function
|
|
5367
|
+
* or a symbol) serializes to no output at all.
|
|
5368
|
+
*
|
|
5369
|
+
* @public
|
|
5370
|
+
*/
|
|
5371
|
+
const JsoncStringifyErrorCode = effect.Schema.Literals([
|
|
5372
|
+
"CircularReference",
|
|
5373
|
+
"BigIntValue",
|
|
5374
|
+
"TopLevelUnrepresentable"
|
|
5375
|
+
]);
|
|
5376
|
+
effect.Schema.Class("JsoncStringifyOptions")({
|
|
5377
|
+
tabSize: effect.Schema.optionalKey(effect.Schema.Number),
|
|
5378
|
+
insertSpaces: effect.Schema.optionalKey(effect.Schema.Boolean)
|
|
5379
|
+
});
|
|
5380
|
+
/**
|
|
5381
|
+
* Stringification failure: a `JsoncStringifyErrorCode` naming the
|
|
5382
|
+
* failure mode, a human-readable `detail` (the engine's message for thrown
|
|
5383
|
+
* cases — on V8 the circular-reference message includes the offending property
|
|
5384
|
+
* path), and the offending `value`. Raised by {@link Jsonc.stringify},
|
|
5385
|
+
* {@link Jsonc.stringifyResult} and the encode direction of the schema
|
|
5386
|
+
* factories.
|
|
5387
|
+
*
|
|
5388
|
+
* @public
|
|
5389
|
+
*/
|
|
5390
|
+
var JsoncStringifyError = class extends effect.Schema.TaggedErrorClass()("JsoncStringifyError", {
|
|
5391
|
+
code: JsoncStringifyErrorCode,
|
|
5392
|
+
detail: effect.Schema.String,
|
|
5393
|
+
value: effect.Schema.Unknown
|
|
5394
|
+
}) {
|
|
5395
|
+
get message() {
|
|
5396
|
+
return `JSONC stringify failed: ${this.code} — ${this.detail}`;
|
|
5397
|
+
}
|
|
5398
|
+
};
|
|
5359
5399
|
const toFlags = (options) => options === void 0 ? {} : {
|
|
5360
5400
|
disallowComments: options.disallowComments,
|
|
5361
5401
|
allowTrailingComma: options.allowTrailingComma,
|
|
@@ -5436,9 +5476,56 @@ const deepEqual = (a, b, depth = 0) => {
|
|
|
5436
5476
|
var Jsonc = class Jsonc {
|
|
5437
5477
|
constructor() {}
|
|
5438
5478
|
/**
|
|
5479
|
+
* Parse JSONC into a plain JavaScript value, synchronously, returning a
|
|
5480
|
+
* `Result` instead of an `Effect`. Same error-recovery semantics as
|
|
5481
|
+
* {@link Jsonc.parse}: every parse error is collected and the failure side
|
|
5482
|
+
* carries one aggregate {@link JsoncParseError}. Pure — parsing is
|
|
5483
|
+
* fundamentally synchronous, so non-Effect consumers (a plain config
|
|
5484
|
+
* loader, a build script) can call this directly instead of wrapping
|
|
5485
|
+
* `Effect.runSync(Effect.result(Jsonc.parse(text)))`.
|
|
5486
|
+
*
|
|
5487
|
+
* @remarks
|
|
5488
|
+
* {@link Jsonc.parse} is defined in terms of this function; the two never
|
|
5489
|
+
* diverge. Reach for the `Effect` variant inside Effect code — it carries
|
|
5490
|
+
* the `Jsonc.parse` tracing span — and for this one at synchronous
|
|
5491
|
+
* boundaries.
|
|
5492
|
+
*
|
|
5493
|
+
* @example
|
|
5494
|
+
* ```ts
|
|
5495
|
+
* import { Jsonc } from "@effected/jsonc";
|
|
5496
|
+
* import { Result } from "effect";
|
|
5497
|
+
*
|
|
5498
|
+
* const ok = Jsonc.parseResult('{ "port": 3000 // dev\n }');
|
|
5499
|
+
* if (Result.isSuccess(ok)) {
|
|
5500
|
+
* console.log(ok.success); // => { port: 3000 }
|
|
5501
|
+
* }
|
|
5502
|
+
*
|
|
5503
|
+
* const bad = Jsonc.parseResult("{ bad }");
|
|
5504
|
+
* if (Result.isFailure(bad)) {
|
|
5505
|
+
* console.log(bad.failure._tag); // => "JsoncParseError"
|
|
5506
|
+
* }
|
|
5507
|
+
* ```
|
|
5508
|
+
*
|
|
5509
|
+
* @param text - The JSONC source to parse.
|
|
5510
|
+
* @param options - Optional {@link JsoncParseOptions}; defaults apply for
|
|
5511
|
+
* omitted fields.
|
|
5512
|
+
* @returns A `Result` succeeding with the decoded value (`unknown`, never
|
|
5513
|
+
* `any`), or failing with the aggregate {@link JsoncParseError}.
|
|
5514
|
+
*/
|
|
5515
|
+
static parseResult(text, options) {
|
|
5516
|
+
const { value, errors } = parseValue(text, toFlags(options));
|
|
5517
|
+
if (errors.length > 0) return effect.Result.fail(new JsoncParseError({
|
|
5518
|
+
errors: toDetails(text, errors),
|
|
5519
|
+
input: text
|
|
5520
|
+
}));
|
|
5521
|
+
return effect.Result.succeed(value);
|
|
5522
|
+
}
|
|
5523
|
+
/**
|
|
5439
5524
|
* Parse JSONC into a plain JavaScript value. Error-recovery parsing:
|
|
5440
5525
|
* collects every parse error and fails once with the aggregate
|
|
5441
|
-
* {@link JsoncParseError}. Returns `unknown`, never `any`.
|
|
5526
|
+
* {@link JsoncParseError}. Returns `unknown`, never `any`. Defined in terms
|
|
5527
|
+
* of {@link Jsonc.parseResult} — synchronous callers can use that variant
|
|
5528
|
+
* directly.
|
|
5442
5529
|
*
|
|
5443
5530
|
* @param text - The JSONC source to parse.
|
|
5444
5531
|
* @param options - Optional {@link JsoncParseOptions}; defaults apply for
|
|
@@ -5446,14 +5533,7 @@ var Jsonc = class Jsonc {
|
|
|
5446
5533
|
* @returns An `Effect` that succeeds with the decoded value, or fails with
|
|
5447
5534
|
* the aggregate {@link JsoncParseError}.
|
|
5448
5535
|
*/
|
|
5449
|
-
static parse = effect.Effect.fn("Jsonc.parse")(
|
|
5450
|
-
const { value, errors } = parseValue(text, toFlags(options));
|
|
5451
|
-
if (errors.length > 0) return yield* new JsoncParseError({
|
|
5452
|
-
errors: toDetails(text, errors),
|
|
5453
|
-
input: text
|
|
5454
|
-
});
|
|
5455
|
-
return value;
|
|
5456
|
-
});
|
|
5536
|
+
static parse = effect.Effect.fn("Jsonc.parse")((text, options) => effect.Effect.fromResult(Jsonc.parseResult(text, options)));
|
|
5457
5537
|
/**
|
|
5458
5538
|
* Parse JSONC into an immutable {@link JsoncNode} AST. `Option.none()` for
|
|
5459
5539
|
* empty input (with `allowEmptyContent`); the aggregate
|
|
@@ -5475,6 +5555,95 @@ var Jsonc = class Jsonc {
|
|
|
5475
5555
|
return root !== void 0 ? effect.Option.some(root) : effect.Option.none();
|
|
5476
5556
|
});
|
|
5477
5557
|
/**
|
|
5558
|
+
* Stringify a plain JavaScript value as JSON text, synchronously, returning
|
|
5559
|
+
* a `Result` instead of an `Effect`. With no options the output is
|
|
5560
|
+
* byte-identical to `JSON.stringify(value, null, 2)`.
|
|
5561
|
+
*
|
|
5562
|
+
* Plain JSON emission: JSONC comments exist only in the document/edit layer
|
|
5563
|
+
* (`JsoncNode`, `JsoncEdit`, `JsoncFormatter`), so no comment survives — or
|
|
5564
|
+
* can be produced by — value-level stringification.
|
|
5565
|
+
*
|
|
5566
|
+
* Nested unrepresentable values follow `JSON.stringify`'s documented
|
|
5567
|
+
* semantics: `undefined`, functions and symbols are dropped from objects and
|
|
5568
|
+
* become `null` in arrays. The typed failure channel covers only the cases
|
|
5569
|
+
* where output would be absent or an exception thrown — see
|
|
5570
|
+
* `JsoncStringifyErrorCode`. A throwing `toJSON` method or getter is
|
|
5571
|
+
* caller code failing and rethrows as a defect, never a typed error.
|
|
5572
|
+
*
|
|
5573
|
+
* @remarks
|
|
5574
|
+
* {@link Jsonc.stringify} is defined in terms of this function; the two
|
|
5575
|
+
* never diverge. Reach for the `Effect` variant inside Effect code — it
|
|
5576
|
+
* carries the `Jsonc.stringify` tracing span — and for this one at
|
|
5577
|
+
* synchronous boundaries.
|
|
5578
|
+
*
|
|
5579
|
+
* @example
|
|
5580
|
+
* ```ts
|
|
5581
|
+
* import { Jsonc } from "@effected/jsonc";
|
|
5582
|
+
* import { Result } from "effect";
|
|
5583
|
+
*
|
|
5584
|
+
* const ok = Jsonc.stringifyResult({ port: 3000 });
|
|
5585
|
+
* if (Result.isSuccess(ok)) {
|
|
5586
|
+
* console.log(ok.success); // => '{\n "port": 3000\n}'
|
|
5587
|
+
* }
|
|
5588
|
+
*
|
|
5589
|
+
* const bad = Jsonc.stringifyResult(0n);
|
|
5590
|
+
* if (Result.isFailure(bad)) {
|
|
5591
|
+
* console.log(bad.failure.code); // => "BigIntValue"
|
|
5592
|
+
* }
|
|
5593
|
+
* ```
|
|
5594
|
+
*
|
|
5595
|
+
* @param value - The plain JavaScript value to stringify.
|
|
5596
|
+
* @param options - Optional {@link JsoncStringifyOptions}; defaults apply
|
|
5597
|
+
* for omitted fields.
|
|
5598
|
+
* @returns A `Result` succeeding with the JSON text, or failing with a
|
|
5599
|
+
* {@link JsoncStringifyError}.
|
|
5600
|
+
*/
|
|
5601
|
+
static stringifyResult(value, options) {
|
|
5602
|
+
const space = options?.insertSpaces === false ? " " : options?.tabSize ?? 2;
|
|
5603
|
+
let text;
|
|
5604
|
+
try {
|
|
5605
|
+
text = JSON.stringify(value, null, space);
|
|
5606
|
+
} catch (defect) {
|
|
5607
|
+
if (defect instanceof TypeError) {
|
|
5608
|
+
if (/circular|cyclic/i.test(defect.message)) return effect.Result.fail(new JsoncStringifyError({
|
|
5609
|
+
code: "CircularReference",
|
|
5610
|
+
detail: defect.message,
|
|
5611
|
+
value
|
|
5612
|
+
}));
|
|
5613
|
+
if (/bigint/i.test(defect.message)) return effect.Result.fail(new JsoncStringifyError({
|
|
5614
|
+
code: "BigIntValue",
|
|
5615
|
+
detail: defect.message,
|
|
5616
|
+
value
|
|
5617
|
+
}));
|
|
5618
|
+
}
|
|
5619
|
+
throw defect;
|
|
5620
|
+
}
|
|
5621
|
+
if (text === void 0) return effect.Result.fail(new JsoncStringifyError({
|
|
5622
|
+
code: "TopLevelUnrepresentable",
|
|
5623
|
+
detail: "the top-level value (undefined, a function or a symbol) has no JSON representation",
|
|
5624
|
+
value
|
|
5625
|
+
}));
|
|
5626
|
+
return effect.Result.succeed(text);
|
|
5627
|
+
}
|
|
5628
|
+
/**
|
|
5629
|
+
* Stringify a plain JavaScript value as JSON text. With no options the
|
|
5630
|
+
* output is byte-identical to `JSON.stringify(value, null, 2)`. Fails with
|
|
5631
|
+
* {@link JsoncStringifyError} on circular references, `bigint` values and a
|
|
5632
|
+
* top-level value with no JSON representation; nested `undefined`, functions
|
|
5633
|
+
* and symbols follow `JSON.stringify`'s documented semantics (dropped from
|
|
5634
|
+
* objects, `null` in arrays). Comments are a document/edit-layer concern —
|
|
5635
|
+
* value-level stringification never emits them. Defined in terms of
|
|
5636
|
+
* {@link Jsonc.stringifyResult} — synchronous callers can use that variant
|
|
5637
|
+
* directly.
|
|
5638
|
+
*
|
|
5639
|
+
* @param value - The plain JavaScript value to stringify.
|
|
5640
|
+
* @param options - Optional {@link JsoncStringifyOptions}; defaults apply
|
|
5641
|
+
* for omitted fields.
|
|
5642
|
+
* @returns An `Effect` that succeeds with the JSON text, or fails with a
|
|
5643
|
+
* {@link JsoncStringifyError}.
|
|
5644
|
+
*/
|
|
5645
|
+
static stringify = effect.Effect.fn("Jsonc.stringify")((value, options) => effect.Effect.fromResult(Jsonc.stringifyResult(value, options)));
|
|
5646
|
+
/**
|
|
5478
5647
|
* Remove all comments from JSONC, producing valid JSON. Pass a `replaceCh`
|
|
5479
5648
|
* (e.g. `" "`) to replace each comment character instead of deleting it,
|
|
5480
5649
|
* keeping all offsets stable (line breaks inside block comments are kept).
|
|
@@ -5541,8 +5710,11 @@ var Jsonc = class Jsonc {
|
|
|
5541
5710
|
}
|
|
5542
5711
|
/**
|
|
5543
5712
|
* A `Schema<unknown, string>` decoding JSONC with the given `options`
|
|
5544
|
-
* (defaults when omitted). Encoding is
|
|
5545
|
-
*
|
|
5713
|
+
* (defaults when omitted). Encoding is {@link Jsonc.stringifyResult} with
|
|
5714
|
+
* default options (2-space indent, byte-identical to
|
|
5715
|
+
* `JSON.stringify(value, null, 2)`), so comments do not survive a
|
|
5716
|
+
* round-trip encode; a {@link JsoncStringifyError} on the encode side
|
|
5717
|
+
* surfaces as a schema issue.
|
|
5546
5718
|
*
|
|
5547
5719
|
* @remarks
|
|
5548
5720
|
* Schema-producing: each call returns a fresh schema whose derivation caches
|
|
@@ -5569,7 +5741,7 @@ var Jsonc = class Jsonc {
|
|
|
5569
5741
|
}
|
|
5570
5742
|
return effect.Effect.succeed(value);
|
|
5571
5743
|
},
|
|
5572
|
-
encode: (value) => effect.Effect.
|
|
5744
|
+
encode: (value) => effect.Effect.fromResult(Jsonc.stringifyResult(value)).pipe(effect.Effect.mapError((error) => new effect.SchemaIssue.InvalidValue(effect.Option.some(value), { message: error.message })))
|
|
5573
5745
|
})));
|
|
5574
5746
|
}
|
|
5575
5747
|
/**
|
|
@@ -5595,6 +5767,49 @@ var Jsonc = class Jsonc {
|
|
|
5595
5767
|
static schema(target, options) {
|
|
5596
5768
|
return Jsonc.fromString(options).pipe(effect.Schema.decodeTo(target));
|
|
5597
5769
|
}
|
|
5770
|
+
/**
|
|
5771
|
+
* Bind a target schema to the JSONC codec once, yielding the composed
|
|
5772
|
+
* schema plus pre-derived `decode`/`encode` directions — the
|
|
5773
|
+
* {@link Jsonc.schema} composition without the generic `Schema` machinery
|
|
5774
|
+
* at every use site. Binds the plain form only: default
|
|
5775
|
+
* {@link JsoncParseOptions} on decode, default stringify options on encode.
|
|
5776
|
+
*
|
|
5777
|
+
* Both directions fail with `Schema.SchemaError`, exactly as
|
|
5778
|
+
* `Schema.decodeEffect`/`Schema.encodeEffect` over {@link Jsonc.schema}
|
|
5779
|
+
* would; the target's decoding/encoding service requirements flow through.
|
|
5780
|
+
*
|
|
5781
|
+
* @remarks
|
|
5782
|
+
* Schema-producing: each call composes a fresh schema and derives both
|
|
5783
|
+
* directions from it. Bind the result to a `const` — that single binding is
|
|
5784
|
+
* the point.
|
|
5785
|
+
*
|
|
5786
|
+
* @example
|
|
5787
|
+
* ```ts
|
|
5788
|
+
* import { Jsonc } from "@effected/jsonc";
|
|
5789
|
+
* import { Effect, Schema } from "effect";
|
|
5790
|
+
*
|
|
5791
|
+
* const Config = Schema.Struct({ port: Schema.Number });
|
|
5792
|
+
* const config = Jsonc.bind(Config);
|
|
5793
|
+
*
|
|
5794
|
+
* const program = Effect.gen(function* () {
|
|
5795
|
+
* const value = yield* config.decode('{ "port": 3000 // dev\n }');
|
|
5796
|
+
* const text = yield* config.encode(value);
|
|
5797
|
+
* return [value, text] as const;
|
|
5798
|
+
* });
|
|
5799
|
+
* ```
|
|
5800
|
+
*
|
|
5801
|
+
* @param target - The domain schema decoded values must satisfy.
|
|
5802
|
+
* @returns A {@link JsoncBoundCodec} carrying the composed schema and its
|
|
5803
|
+
* two pre-bound directions.
|
|
5804
|
+
*/
|
|
5805
|
+
static bind(target) {
|
|
5806
|
+
const schema = Jsonc.schema(target);
|
|
5807
|
+
return {
|
|
5808
|
+
schema,
|
|
5809
|
+
decode: effect.Schema.decodeEffect(schema),
|
|
5810
|
+
encode: effect.Schema.encodeEffect(schema)
|
|
5811
|
+
};
|
|
5812
|
+
}
|
|
5598
5813
|
};
|
|
5599
5814
|
effect.Schema.Class("JsoncRange")({
|
|
5600
5815
|
offset: effect.Schema.Number,
|
|
@@ -5638,7 +5853,8 @@ var JsoncEdit = class extends effect.Schema.Class("JsoncEdit")({
|
|
|
5638
5853
|
/**
|
|
5639
5854
|
* Apply `edits` to `text`, producing a new string. Edits are applied in
|
|
5640
5855
|
* reverse-offset order so earlier offsets stay valid; the input `edits`
|
|
5641
|
-
* array is not mutated.
|
|
5856
|
+
* array is not mutated. Overlapping edits are a programmer error and throw
|
|
5857
|
+
* as a defect — `JsoncFormatter` never produces them.
|
|
5642
5858
|
*
|
|
5643
5859
|
* @param text - The source text to edit.
|
|
5644
5860
|
* @param edits - The edits to apply, in any order.
|
|
@@ -5646,13 +5862,18 @@ var JsoncEdit = class extends effect.Schema.Class("JsoncEdit")({
|
|
|
5646
5862
|
*/
|
|
5647
5863
|
static applyAll(text, edits) {
|
|
5648
5864
|
const sorted = [...edits].sort((a, b) => b.offset - a.offset);
|
|
5865
|
+
for (let i = 0; i + 1 < sorted.length; i++) {
|
|
5866
|
+
const upper = sorted[i];
|
|
5867
|
+
const lower = sorted[i + 1];
|
|
5868
|
+
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`);
|
|
5869
|
+
}
|
|
5649
5870
|
let result = text;
|
|
5650
5871
|
for (const edit of sorted) result = result.substring(0, edit.offset) + edit.content + result.substring(edit.offset + edit.length);
|
|
5651
5872
|
return result;
|
|
5652
5873
|
}
|
|
5653
5874
|
};
|
|
5654
5875
|
//#endregion
|
|
5655
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
5876
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/internal/navigate.js
|
|
5656
5877
|
/**
|
|
5657
5878
|
* Resolve `path` against `text`, returning where the target is (or where it
|
|
5658
5879
|
* would be inserted). `path` must be non-empty — the whole-document case is
|
|
@@ -5779,7 +6000,7 @@ function navigate(text, path) {
|
|
|
5779
6000
|
return { _tag: "NoOp" };
|
|
5780
6001
|
}
|
|
5781
6002
|
//#endregion
|
|
5782
|
-
//#region ../../node_modules/.pnpm/@effected+jsonc@0.
|
|
6003
|
+
//#region ../../node_modules/.pnpm/@effected+jsonc@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/jsonc/JsoncModifier.js
|
|
5783
6004
|
/**
|
|
5784
6005
|
* Raised when `JsoncModifier.modify` cannot navigate the requested path: the
|
|
5785
6006
|
* value at `depth` is not the container kind (`expected`) the next path segment
|
|
@@ -5907,7 +6128,7 @@ var JsoncModifier = class {
|
|
|
5907
6128
|
});
|
|
5908
6129
|
};
|
|
5909
6130
|
//#endregion
|
|
5910
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
6131
|
+
//#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
|
|
5911
6132
|
const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
5912
6133
|
const BunWorkspaceEntry = effect.Schema.Struct({
|
|
5913
6134
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -6000,7 +6221,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
|
|
|
6000
6221
|
};
|
|
6001
6222
|
});
|
|
6002
6223
|
//#endregion
|
|
6003
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
6224
|
+
//#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
|
|
6004
6225
|
const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
6005
6226
|
const NpmPackageEntry = effect.Schema.Struct({
|
|
6006
6227
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -6098,7 +6319,7 @@ const toFields$2 = (raw) => effect.Effect.gen(function* () {
|
|
|
6098
6319
|
};
|
|
6099
6320
|
});
|
|
6100
6321
|
//#endregion
|
|
6101
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
6322
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlNode.js
|
|
6102
6323
|
/**
|
|
6103
6324
|
* YAML scalar presentation styles.
|
|
6104
6325
|
*
|
|
@@ -6490,7 +6711,7 @@ function nodeToValue(node, anchors, budget, counting = false) {
|
|
|
6490
6711
|
return null;
|
|
6491
6712
|
}
|
|
6492
6713
|
//#endregion
|
|
6493
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
6714
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/diagnostics.js
|
|
6494
6715
|
/** Error codes emitted by the lexer stage. */
|
|
6495
6716
|
const YAML_LEX_ERROR_CODES = [
|
|
6496
6717
|
"UnexpectedCharacter",
|
|
@@ -6568,7 +6789,7 @@ function isFatalCode(code) {
|
|
|
6568
6789
|
return FATAL_CODES.has(code);
|
|
6569
6790
|
}
|
|
6570
6791
|
//#endregion
|
|
6571
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
6792
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/YamlDiagnostic.js
|
|
6572
6793
|
/**
|
|
6573
6794
|
* Error codes emitted by the lexer stage.
|
|
6574
6795
|
*
|
|
@@ -6689,7 +6910,7 @@ function lineChar(text, offset) {
|
|
|
6689
6910
|
};
|
|
6690
6911
|
}
|
|
6691
6912
|
//#endregion
|
|
6692
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
6913
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/anchors.js
|
|
6693
6914
|
/**
|
|
6694
6915
|
* Check if a pending anchor is being applied to an alias node (invalid in YAML 1.2 §3.2.2).
|
|
6695
6916
|
* Aliases represent references to existing anchored nodes and cannot have their own anchors.
|
|
@@ -6782,7 +7003,7 @@ function collectAnchors(node, anchors) {
|
|
|
6782
7003
|
}
|
|
6783
7004
|
}
|
|
6784
7005
|
//#endregion
|
|
6785
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
7006
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/lexer.js
|
|
6786
7007
|
/**
|
|
6787
7008
|
* Create a new YAML scanner for the given source text.
|
|
6788
7009
|
*
|
|
@@ -7739,7 +7960,7 @@ function lexAll(text) {
|
|
|
7739
7960
|
return tokens;
|
|
7740
7961
|
}
|
|
7741
7962
|
//#endregion
|
|
7742
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
7963
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/cst-parser.js
|
|
7743
7964
|
/**
|
|
7744
7965
|
* Hardening: cap CST nesting so hostile inputs cannot overflow the stack
|
|
7745
7966
|
* while the tree is being BUILT. Set slightly above the composer's
|
|
@@ -8451,7 +8672,7 @@ function parseCSTAll(text) {
|
|
|
8451
8672
|
return parseDocuments(lexAll(text), text);
|
|
8452
8673
|
}
|
|
8453
8674
|
//#endregion
|
|
8454
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
8675
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/state.js
|
|
8455
8676
|
let lineStartsText;
|
|
8456
8677
|
let lineStartsCache = [];
|
|
8457
8678
|
function getLineStarts(text) {
|
|
@@ -8557,7 +8778,7 @@ function exitNesting(state) {
|
|
|
8557
8778
|
state.depth--;
|
|
8558
8779
|
}
|
|
8559
8780
|
//#endregion
|
|
8560
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
8781
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/tags.js
|
|
8561
8782
|
/**
|
|
8562
8783
|
* Resolve a tag shorthand using the document's %TAG directives.
|
|
8563
8784
|
* For example, with `%TAG !! tag:example.com,2000:app/`, the tag `!!int`
|
|
@@ -8643,7 +8864,7 @@ function validateTagHandlesInDocument(docCst, state) {
|
|
|
8643
8864
|
}
|
|
8644
8865
|
}
|
|
8645
8866
|
//#endregion
|
|
8646
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
8867
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/scalars.js
|
|
8647
8868
|
const NULL_RE$1 = /^(?:null|Null|NULL|~)$/;
|
|
8648
8869
|
const TRUE_RE$1 = /^(?:true|True|TRUE)$/;
|
|
8649
8870
|
const FALSE_RE$1 = /^(?:false|False|FALSE)$/;
|
|
@@ -9521,7 +9742,7 @@ function shouldPreserveRaw(rawValue, value) {
|
|
|
9521
9742
|
return false;
|
|
9522
9743
|
}
|
|
9523
9744
|
//#endregion
|
|
9524
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
9745
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/block.js
|
|
9525
9746
|
/**
|
|
9526
9747
|
* Compose a block map from its CST children, with an optional external first key.
|
|
9527
9748
|
*
|
|
@@ -10669,7 +10890,7 @@ function composeFlatBlockMap(children, startIdx, parentCst, state, externalFirst
|
|
|
10669
10890
|
return map;
|
|
10670
10891
|
}
|
|
10671
10892
|
//#endregion
|
|
10672
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
10893
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/flow.js
|
|
10673
10894
|
/**
|
|
10674
10895
|
* Validate that flow collection entries are separated by commas.
|
|
10675
10896
|
*
|
|
@@ -11061,7 +11282,7 @@ function composeFlowSeqInner(cst, state, meta, parentBlockColumn) {
|
|
|
11061
11282
|
return seq;
|
|
11062
11283
|
}
|
|
11063
11284
|
//#endregion
|
|
11064
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
11285
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/composer/document.js
|
|
11065
11286
|
/** The flow-composer dispatch wired into every state this module creates. */
|
|
11066
11287
|
const FLOW = {
|
|
11067
11288
|
composeFlowMap,
|
|
@@ -11727,7 +11948,7 @@ function composeAllDocuments(text, options) {
|
|
|
11727
11948
|
};
|
|
11728
11949
|
}
|
|
11729
11950
|
//#endregion
|
|
11730
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
11951
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/fold.js
|
|
11731
11952
|
/**
|
|
11732
11953
|
* Column-based line folding for a single logical scalar line (YAML 1.2 flow
|
|
11733
11954
|
* folding, §7.3 / §8.2.1). Breaks the content at "safe" single-space
|
|
@@ -11963,7 +12184,7 @@ function renderBlockFolded(s, indent) {
|
|
|
11963
12184
|
return `>${indentIndicator}${chomp}\n${outputLines.join("\n")}`;
|
|
11964
12185
|
}
|
|
11965
12186
|
//#endregion
|
|
11966
|
-
//#region ../../node_modules/.pnpm/@effected+yaml@0.
|
|
12187
|
+
//#region ../../node_modules/.pnpm/@effected+yaml@0.4.0_effect@4.0.0-beta.99/node_modules/@effected/yaml/internal/stringifier.js
|
|
11967
12188
|
/**
|
|
11968
12189
|
* Thrown by the stringifier on its failure paths (circular references). The
|
|
11969
12190
|
* facade catches this and materializes the public stringify error.
|
|
@@ -12337,6 +12558,15 @@ effect.Schema.Class("YamlStringifyOptions")({
|
|
|
12337
12558
|
* Column at which to fold long scalars. Default `0` (and any value `<= 0`)
|
|
12338
12559
|
* never wraps; a positive value folds plain, double-quoted and block-folded
|
|
12339
12560
|
* (`>`) scalars at approximately that column, never block-literal (`|`).
|
|
12561
|
+
*
|
|
12562
|
+
* Takes effect only through {@link Yaml.stringify} and
|
|
12563
|
+
* {@link Yaml.stringifySync} — the two entry points that accept these
|
|
12564
|
+
* options on the value path. The schema factories ({@link Yaml.fromString},
|
|
12565
|
+
* {@link Yaml.schema}, {@link Yaml.YamlFromString}) encode with default
|
|
12566
|
+
* stringify options (`lineWidth` `0`), so their output never folds. The
|
|
12567
|
+
* document/node path — `YamlDocument#stringify` and the `YamlFormat`
|
|
12568
|
+
* helpers built on it — threads the field into its render context but
|
|
12569
|
+
* never reads it, so it is inert there.
|
|
12340
12570
|
*/
|
|
12341
12571
|
lineWidth: effect.Schema.optionalKey(effect.Schema.Number),
|
|
12342
12572
|
defaultScalarStyle: effect.Schema.optionalKey(ScalarStyle),
|
|
@@ -12443,7 +12673,7 @@ const stringifyDefectToError = (defect, value) => {
|
|
|
12443
12673
|
});
|
|
12444
12674
|
};
|
|
12445
12675
|
/**
|
|
12446
|
-
* Synchronous single-document parse returning a
|
|
12676
|
+
* Synchronous single-document parse returning a `Result`. The pure
|
|
12447
12677
|
* engine bypasses the Effect runtime entirely: the composer, the failure
|
|
12448
12678
|
* collection and the alias-expansion budget all run inline, and every failure
|
|
12449
12679
|
* mode (fatal diagnostics, duplicate keys, a "billion laughs" blow-up) yields
|
|
@@ -12465,7 +12695,7 @@ const parseSyncImpl = (text, options) => {
|
|
|
12465
12695
|
}
|
|
12466
12696
|
};
|
|
12467
12697
|
/**
|
|
12468
|
-
* Synchronous stringify returning a
|
|
12698
|
+
* Synchronous stringify returning a `Result`. Mirrors {@link Yaml.stringify}
|
|
12469
12699
|
* without the Effect wrapper: a circular reference or a value nested past the
|
|
12470
12700
|
* recursion budget yields a `Failure` carrying a typed {@link YamlStringifyError},
|
|
12471
12701
|
* never a thrown defect.
|
|
@@ -12595,7 +12825,7 @@ var Yaml = class Yaml {
|
|
|
12595
12825
|
return yield* stringifyOrFail(value, options);
|
|
12596
12826
|
});
|
|
12597
12827
|
/**
|
|
12598
|
-
* Synchronous single-document parse, returning a
|
|
12828
|
+
* Synchronous single-document parse, returning a `Result` instead of
|
|
12599
12829
|
* an `Effect`. A pure escape hatch for config-time callers that cannot
|
|
12600
12830
|
* `await` an Effect (a `vitest.config.ts` is the motivating case): it runs
|
|
12601
12831
|
* the same engine as {@link Yaml.parse} inline.
|
|
@@ -12624,7 +12854,7 @@ var Yaml = class Yaml {
|
|
|
12624
12854
|
return parseSyncImpl(text, options);
|
|
12625
12855
|
}
|
|
12626
12856
|
/**
|
|
12627
|
-
* Synchronous stringify, returning a
|
|
12857
|
+
* Synchronous stringify, returning a `Result` instead of an `Effect`.
|
|
12628
12858
|
* The pure counterpart to {@link Yaml.stringify} for config-time callers
|
|
12629
12859
|
* that cannot `await`.
|
|
12630
12860
|
*
|
|
@@ -12778,6 +13008,51 @@ var Yaml = class Yaml {
|
|
|
12778
13008
|
static schema(target, options) {
|
|
12779
13009
|
return Yaml.fromString(options).pipe(effect.Schema.decodeTo(target));
|
|
12780
13010
|
}
|
|
13011
|
+
/**
|
|
13012
|
+
* Bind a target schema to the YAML codec once, yielding the composed
|
|
13013
|
+
* schema plus pre-derived `decode`/`encode` directions — the
|
|
13014
|
+
* {@link Yaml.schema} composition without the generic `Schema` machinery
|
|
13015
|
+
* at every use site. Binds the plain single-document form only: default
|
|
13016
|
+
* {@link YamlParseOptions} on decode, default stringify options on encode;
|
|
13017
|
+
* for multi-document streams compose over {@link Yaml.allFromString}
|
|
13018
|
+
* directly.
|
|
13019
|
+
*
|
|
13020
|
+
* Both directions fail with `Schema.SchemaError`, exactly as
|
|
13021
|
+
* `Schema.decodeEffect`/`Schema.encodeEffect` over {@link Yaml.schema}
|
|
13022
|
+
* would; the target's decoding/encoding service requirements flow through.
|
|
13023
|
+
*
|
|
13024
|
+
* @remarks
|
|
13025
|
+
* Schema-producing: each call composes a fresh schema and derives both
|
|
13026
|
+
* directions from it. Bind the result to a `const` — that single binding is
|
|
13027
|
+
* the point.
|
|
13028
|
+
*
|
|
13029
|
+
* @example
|
|
13030
|
+
* ```ts
|
|
13031
|
+
* import { Yaml } from "@effected/yaml";
|
|
13032
|
+
* import { Effect, Schema } from "effect";
|
|
13033
|
+
*
|
|
13034
|
+
* const Config = Schema.Struct({ port: Schema.Number });
|
|
13035
|
+
* const config = Yaml.bind(Config);
|
|
13036
|
+
*
|
|
13037
|
+
* const program = Effect.gen(function* () {
|
|
13038
|
+
* const value = yield* config.decode("port: 3000");
|
|
13039
|
+
* const text = yield* config.encode(value);
|
|
13040
|
+
* return [value, text] as const;
|
|
13041
|
+
* });
|
|
13042
|
+
* ```
|
|
13043
|
+
*
|
|
13044
|
+
* @param target - The domain schema decoded values must satisfy.
|
|
13045
|
+
* @returns A {@link YamlBoundCodec} carrying the composed schema and its
|
|
13046
|
+
* two pre-bound directions.
|
|
13047
|
+
*/
|
|
13048
|
+
static bind(target) {
|
|
13049
|
+
const schema = Yaml.schema(target);
|
|
13050
|
+
return {
|
|
13051
|
+
schema,
|
|
13052
|
+
decode: effect.Schema.decodeEffect(schema),
|
|
13053
|
+
encode: effect.Schema.encodeEffect(schema)
|
|
13054
|
+
};
|
|
13055
|
+
}
|
|
12781
13056
|
};
|
|
12782
13057
|
/**
|
|
12783
13058
|
* Parse for `equals`/`equalsValue`: any recorded error — fatal or not — or a
|
|
@@ -12830,7 +13105,7 @@ function deepEqualValues(a, b) {
|
|
|
12830
13105
|
return false;
|
|
12831
13106
|
}
|
|
12832
13107
|
//#endregion
|
|
12833
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13108
|
+
//#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
|
|
12834
13109
|
/**
|
|
12835
13110
|
* An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
|
|
12836
13111
|
* and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
|
|
@@ -12900,7 +13175,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
|
|
|
12900
13175
|
};
|
|
12901
13176
|
});
|
|
12902
13177
|
//#endregion
|
|
12903
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13178
|
+
//#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
|
|
12904
13179
|
const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
|
|
12905
13180
|
specifier: effect.Schema.String,
|
|
12906
13181
|
version: effect.Schema.String
|
|
@@ -13026,7 +13301,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
|
|
|
13026
13301
|
};
|
|
13027
13302
|
});
|
|
13028
13303
|
//#endregion
|
|
13029
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13304
|
+
//#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
|
|
13030
13305
|
const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
|
|
13031
13306
|
const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
13032
13307
|
const YarnEntry = effect.Schema.Struct({
|
|
@@ -13149,7 +13424,7 @@ const cleanYarnDeps = (deps) => {
|
|
|
13149
13424
|
return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
|
|
13150
13425
|
};
|
|
13151
13426
|
//#endregion
|
|
13152
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13427
|
+
//#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
|
|
13153
13428
|
const EMPTY_IMPORTERS = [];
|
|
13154
13429
|
/**
|
|
13155
13430
|
* Failure of `Lockfile.parse`: the given content is not a valid lockfile of
|
|
@@ -13393,7 +13668,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
|
|
|
13393
13668
|
}
|
|
13394
13669
|
};
|
|
13395
13670
|
//#endregion
|
|
13396
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.1.
|
|
13671
|
+
//#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
|
|
13397
13672
|
/**
|
|
13398
13673
|
* The minimal manifest shape {@link LockfileIntegrity.compare} checks a
|
|
13399
13674
|
* lockfile against: a package name plus the four optional dependency maps.
|
|
@@ -13509,7 +13784,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
|
|
|
13509
13784
|
}
|
|
13510
13785
|
};
|
|
13511
13786
|
//#endregion
|
|
13512
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
13787
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Dependency.js
|
|
13513
13788
|
/**
|
|
13514
13789
|
* A resolved dependency entry pairing a package name with its version
|
|
13515
13790
|
* specifier and the `kind` of map it came from (`@effected/npm`'s
|
|
@@ -13573,7 +13848,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
|
|
|
13573
13848
|
}
|
|
13574
13849
|
};
|
|
13575
13850
|
//#endregion
|
|
13576
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
13851
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/DevEngines.js
|
|
13577
13852
|
/**
|
|
13578
13853
|
* A single `devEngines` constraint with a name and optional `version` / `onFail`.
|
|
13579
13854
|
*
|
|
@@ -14598,7 +14873,7 @@ var require_parse$2 = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
14598
14873
|
};
|
|
14599
14874
|
}));
|
|
14600
14875
|
//#endregion
|
|
14601
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
14876
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/License.js
|
|
14602
14877
|
var import_spdx_expression_parse = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
14603
14878
|
var scan = require_scan$1();
|
|
14604
14879
|
var parse = require_parse$2();
|
|
@@ -14645,7 +14920,7 @@ const isValidSpdx = (value) => {
|
|
|
14645
14920
|
*/
|
|
14646
14921
|
const SpdxLicense = effect.Schema.String.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isValidSpdx(value) ? void 0 : "Expected a valid SPDX license expression")), effect.Schema.brand("SpdxLicense"));
|
|
14647
14922
|
//#endregion
|
|
14648
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
14923
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageManager.js
|
|
14649
14924
|
const PACKAGE_MANAGER_RE = /^([a-z]+)@(\d+\.\d+\.\d+(?:-[a-zA-Z0-9._-]+)?)(?:\+(.+))?$/;
|
|
14650
14925
|
/**
|
|
14651
14926
|
* The `packageManager` field only ever carries corepack's `<algo>.<hex>`
|
|
@@ -14703,7 +14978,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
|
|
|
14703
14978
|
}
|
|
14704
14979
|
};
|
|
14705
14980
|
//#endregion
|
|
14706
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
14981
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/PackageName.js
|
|
14707
14982
|
/**
|
|
14708
14983
|
* Indicates that a string could not be used as a valid npm package name.
|
|
14709
14984
|
*
|
|
@@ -14761,7 +15036,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
|
|
|
14761
15036
|
isScoped
|
|
14762
15037
|
});
|
|
14763
15038
|
//#endregion
|
|
14764
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
15039
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Person.js
|
|
14765
15040
|
const parsePersonString = (input) => {
|
|
14766
15041
|
const emailMatch = input.match(/<([^>]+)>/);
|
|
14767
15042
|
const urlMatch = input.match(/\(([^)]+)\)/);
|
|
@@ -14808,7 +15083,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
|
|
|
14808
15083
|
static FromValue = effect.Schema.Union([Person, Person.FromString]);
|
|
14809
15084
|
};
|
|
14810
15085
|
//#endregion
|
|
14811
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
15086
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/internal/format.js
|
|
14812
15087
|
const KEY_INDEX = new Map([
|
|
14813
15088
|
"$schema",
|
|
14814
15089
|
"name",
|
|
@@ -15031,7 +15306,7 @@ const renderJson = (raw, options) => {
|
|
|
15031
15306
|
return options.newline ? `${json}\n` : json;
|
|
15032
15307
|
};
|
|
15033
15308
|
//#endregion
|
|
15034
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.
|
|
15309
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.3.1_effect@4.0.0-beta.99/node_modules/@effected/package-json/Package.js
|
|
15035
15310
|
const toHashMap = effect.SchemaTransformation.transform({
|
|
15036
15311
|
decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
|
|
15037
15312
|
encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
|
|
@@ -15349,7 +15624,7 @@ var Package = class Package extends effect.Schema.Class("Package")({
|
|
|
15349
15624
|
}
|
|
15350
15625
|
};
|
|
15351
15626
|
//#endregion
|
|
15352
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
15627
|
+
//#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
|
|
15353
15628
|
const EMPTY$1 = Object.freeze(Object.create(null));
|
|
15354
15629
|
const EMPTY_MANIFEST = Object.freeze(Object.create(null));
|
|
15355
15630
|
/**
|
|
@@ -15611,7 +15886,7 @@ var WorkspacePackage = class WorkspacePackage extends effect.Schema.Class("Works
|
|
|
15611
15886
|
}
|
|
15612
15887
|
};
|
|
15613
15888
|
//#endregion
|
|
15614
|
-
//#region ../../node_modules/.pnpm/@effected+walker@0.2.
|
|
15889
|
+
//#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
|
|
15615
15890
|
/**
|
|
15616
15891
|
* Typed failure raised by {@link descend}: a directory mid-walk was unreadable
|
|
15617
15892
|
* (under `onUnreadable: "fail"`), or the walk descended past `maxDepth`. Depth
|
|
@@ -15746,7 +16021,7 @@ const descend = effect.Effect.fn("Walker.descend")(function* (pattern, options)
|
|
|
15746
16021
|
return results;
|
|
15747
16022
|
});
|
|
15748
16023
|
//#endregion
|
|
15749
|
-
//#region ../../node_modules/.pnpm/@effected+walker@0.2.
|
|
16024
|
+
//#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
|
|
15750
16025
|
/**
|
|
15751
16026
|
* Ascend from `start` toward the filesystem root, yielding each directory,
|
|
15752
16027
|
* nearest first.
|
|
@@ -15836,7 +16111,7 @@ const Walker$1 = {
|
|
|
15836
16111
|
findRoot: findRoot$1
|
|
15837
16112
|
};
|
|
15838
16113
|
//#endregion
|
|
15839
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16114
|
+
//#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
|
|
15840
16115
|
/**
|
|
15841
16116
|
* The marker filenames {@link WorkspaceRoot} probes for, in priority order.
|
|
15842
16117
|
*
|
|
@@ -15921,7 +16196,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
|
|
|
15921
16196
|
static layer = effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.make);
|
|
15922
16197
|
};
|
|
15923
16198
|
//#endregion
|
|
15924
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16199
|
+
//#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
|
|
15925
16200
|
/**
|
|
15926
16201
|
* Hard ceiling on directories the enumerator will visit for one pattern set.
|
|
15927
16202
|
* Guards the pathological case a depth cap alone does not: a wide, shallow
|
|
@@ -15939,7 +16214,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
|
|
|
15939
16214
|
*/
|
|
15940
16215
|
const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
15941
16216
|
//#endregion
|
|
15942
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16217
|
+
//#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
|
|
15943
16218
|
/** Directory names never descended into. */
|
|
15944
16219
|
const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
|
|
15945
16220
|
/** Join root-relative POSIX segments; `""` is the root itself. */
|
|
@@ -16029,7 +16304,7 @@ var Traversal = class {
|
|
|
16029
16304
|
}
|
|
16030
16305
|
};
|
|
16031
16306
|
//#endregion
|
|
16032
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16307
|
+
//#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
|
|
16033
16308
|
/** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
|
|
16034
16309
|
const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
|
|
16035
16310
|
/**
|
|
@@ -16099,7 +16374,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
|
|
|
16099
16374
|
return results;
|
|
16100
16375
|
});
|
|
16101
16376
|
//#endregion
|
|
16102
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16377
|
+
//#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
|
|
16103
16378
|
const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
|
|
16104
16379
|
/** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
|
|
16105
16380
|
const pnpmPatternsOf = (document) => {
|
|
@@ -16156,7 +16431,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
|
|
|
16156
16431
|
return manifestPatternsOf(manifest);
|
|
16157
16432
|
});
|
|
16158
16433
|
//#endregion
|
|
16159
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16434
|
+
//#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
|
|
16160
16435
|
/**
|
|
16161
16436
|
* Raised when a workspace member's `package.json` cannot be read, parsed, or
|
|
16162
16437
|
* used — it is missing, malformed, or lacks a `name` or `version`.
|
|
@@ -16454,6 +16729,109 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
|
|
|
16454
16729
|
*/
|
|
16455
16730
|
static layer = (options) => effect.Layer.effect(WorkspaceDiscovery, WorkspaceDiscovery.make(options));
|
|
16456
16731
|
/**
|
|
16732
|
+
* An in-memory test double of the service shape, with every method
|
|
16733
|
+
* defaulted so a test stubs only what it exercises.
|
|
16734
|
+
*
|
|
16735
|
+
* @remarks
|
|
16736
|
+
* The defaults model an **empty workspace**, and the derived methods run
|
|
16737
|
+
* over the *effective* `listPackages` — the override when one is supplied —
|
|
16738
|
+
* so stubbing only `listPackages` yields a consistent double:
|
|
16739
|
+
*
|
|
16740
|
+
* - `listPackages` — succeeds with `[]`.
|
|
16741
|
+
* - `importerMap` — derived: the packages keyed by `relativePath`.
|
|
16742
|
+
* - `getPackage` — derived: a name lookup that fails with the service's own
|
|
16743
|
+
* typed {@link PackageNotFoundError} on a miss, exactly as the live
|
|
16744
|
+
* implementation does.
|
|
16745
|
+
* - `resolveFile` / `resolveFiles` — derived: longest-prefix ownership over
|
|
16746
|
+
* `pkg.path`, POSIX-terminated (`"/"`); supply a win32 double explicitly
|
|
16747
|
+
* if your fixture paths are win32.
|
|
16748
|
+
* - `refresh` — a no-op (`Effect.void`); there is nothing memoized to drop.
|
|
16749
|
+
* - `info` — **dies** with an explanatory defect. No honest default exists
|
|
16750
|
+
* (a fabricated root path would leak into consumer path logic), so an
|
|
16751
|
+
* unstubbed `info()` call is a test-wiring mistake and fails loudly as a
|
|
16752
|
+
* defect rather than succeeding with a lie or failing with a dishonest
|
|
16753
|
+
* typed error.
|
|
16754
|
+
*
|
|
16755
|
+
* @example
|
|
16756
|
+
* ```ts
|
|
16757
|
+
* import { WorkspaceDiscovery, WorkspacePackage } from "@effected/workspaces";
|
|
16758
|
+
* import { Effect } from "effect";
|
|
16759
|
+
*
|
|
16760
|
+
* const double = WorkspaceDiscovery.makeTest({
|
|
16761
|
+
* listPackages: () =>
|
|
16762
|
+
* Effect.succeed([
|
|
16763
|
+
* WorkspacePackage.make({
|
|
16764
|
+
* name: "@my-org/utils",
|
|
16765
|
+
* version: "1.0.0",
|
|
16766
|
+
* path: "/repo/packages/utils",
|
|
16767
|
+
* packageJsonPath: "/repo/packages/utils/package.json",
|
|
16768
|
+
* relativePath: "packages/utils",
|
|
16769
|
+
* }),
|
|
16770
|
+
* ]),
|
|
16771
|
+
* });
|
|
16772
|
+
* // `getPackage`, `importerMap`, `resolveFile(s)` now answer consistently.
|
|
16773
|
+
* ```
|
|
16774
|
+
*/
|
|
16775
|
+
static makeTest = (overrides = {}) => {
|
|
16776
|
+
const listPackages = overrides.listPackages ?? (() => effect.Effect.succeed([]));
|
|
16777
|
+
const ownerOf = (filePath, all) => {
|
|
16778
|
+
let best;
|
|
16779
|
+
let bestLength = 0;
|
|
16780
|
+
for (const pkg of all) {
|
|
16781
|
+
const prefix = pkg.path.endsWith("/") ? pkg.path : `${pkg.path}/`;
|
|
16782
|
+
if (filePath.startsWith(prefix) && prefix.length > bestLength) {
|
|
16783
|
+
best = pkg;
|
|
16784
|
+
bestLength = prefix.length;
|
|
16785
|
+
}
|
|
16786
|
+
}
|
|
16787
|
+
return effect.Option.fromUndefinedOr(best);
|
|
16788
|
+
};
|
|
16789
|
+
return {
|
|
16790
|
+
listPackages,
|
|
16791
|
+
info: () => effect.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.")),
|
|
16792
|
+
importerMap: () => effect.Effect.map(listPackages(), (all) => new Map(all.map((pkg) => [pkg.relativePath, pkg]))),
|
|
16793
|
+
getPackage: (name) => effect.Effect.flatMap(listPackages(), (all) => {
|
|
16794
|
+
const found = all.find((pkg) => pkg.name === name);
|
|
16795
|
+
return found !== void 0 ? effect.Effect.succeed(found) : effect.Effect.fail(new PackageNotFoundError({
|
|
16796
|
+
name,
|
|
16797
|
+
available: all.map((pkg) => pkg.name)
|
|
16798
|
+
}));
|
|
16799
|
+
}),
|
|
16800
|
+
resolveFile: (filePath) => effect.Effect.map(listPackages(), (all) => ownerOf(filePath, all)),
|
|
16801
|
+
resolveFiles: (filePaths) => effect.Effect.map(listPackages(), (all) => {
|
|
16802
|
+
const seen = /* @__PURE__ */ new Map();
|
|
16803
|
+
for (const filePath of filePaths) {
|
|
16804
|
+
const owner = ownerOf(filePath, all);
|
|
16805
|
+
if (effect.Option.isSome(owner)) seen.set(owner.value.name, owner.value);
|
|
16806
|
+
}
|
|
16807
|
+
return [...seen.values()].sort((a, b) => a.name.localeCompare(b.name));
|
|
16808
|
+
}),
|
|
16809
|
+
refresh: () => effect.Effect.void,
|
|
16810
|
+
...overrides
|
|
16811
|
+
};
|
|
16812
|
+
};
|
|
16813
|
+
/**
|
|
16814
|
+
* The test layer: {@link WorkspaceDiscovery.makeTest} behind
|
|
16815
|
+
* `Layer.succeed`, so a suite provides only the methods it exercises.
|
|
16816
|
+
*
|
|
16817
|
+
* @remarks
|
|
16818
|
+
* A parameterized layer factory mints a **fresh reference per call**, and
|
|
16819
|
+
* layers memoize by reference — bind the result to a `const` and reuse it
|
|
16820
|
+
* rather than calling `layerTest(...)` at each composition site.
|
|
16821
|
+
*
|
|
16822
|
+
* @example
|
|
16823
|
+
* ```ts
|
|
16824
|
+
* import { WorkspaceDiscovery } from "@effected/workspaces";
|
|
16825
|
+
* import { Effect } from "effect";
|
|
16826
|
+
*
|
|
16827
|
+
* const TestDiscovery = WorkspaceDiscovery.layerTest({
|
|
16828
|
+
* listPackages: () => Effect.succeed([]),
|
|
16829
|
+
* });
|
|
16830
|
+
* // program.pipe(Effect.provide(TestDiscovery))
|
|
16831
|
+
* ```
|
|
16832
|
+
*/
|
|
16833
|
+
static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceDiscovery, WorkspaceDiscovery.makeTest(overrides));
|
|
16834
|
+
/**
|
|
16457
16835
|
* The real implementation of `@effected/npm`'s `WorkspaceResolver` contract
|
|
16458
16836
|
* — the one `@effected/package-json` declares but cannot fill.
|
|
16459
16837
|
*
|
|
@@ -16485,7 +16863,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
|
|
|
16485
16863
|
};
|
|
16486
16864
|
const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
|
|
16487
16865
|
//#endregion
|
|
16488
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
16866
|
+
//#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
|
|
16489
16867
|
/**
|
|
16490
16868
|
* Raised when the workspace dependency graph cannot be topologically ordered
|
|
16491
16869
|
* because it contains a cycle.
|
|
@@ -16720,7 +17098,7 @@ const kahn = (edges) => {
|
|
|
16720
17098
|
};
|
|
16721
17099
|
};
|
|
16722
17100
|
//#endregion
|
|
16723
|
-
//#region ../../node_modules/.pnpm/@effected+git@0.4.
|
|
17101
|
+
//#region ../../node_modules/.pnpm/@effected+git@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/git/GitCommand.js
|
|
16724
17102
|
/**
|
|
16725
17103
|
* Builds a `git` `ChildProcess.StandardCommand` with the argv this package
|
|
16726
17104
|
* classifies against.
|
|
@@ -17139,7 +17517,7 @@ const GitCommand = {
|
|
|
17139
17517
|
status
|
|
17140
17518
|
};
|
|
17141
17519
|
//#endregion
|
|
17142
|
-
//#region ../../node_modules/.pnpm/@effected+git@0.4.
|
|
17520
|
+
//#region ../../node_modules/.pnpm/@effected+git@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/git/internal/run.js
|
|
17143
17521
|
/**
|
|
17144
17522
|
* Spawns `command` and collects its stdout, stderr, and exit code as a single
|
|
17145
17523
|
* triple.
|
|
@@ -17166,7 +17544,7 @@ const runCollected = (command) => effect.Effect.scoped(effect.Effect.gen(functio
|
|
|
17166
17544
|
};
|
|
17167
17545
|
}));
|
|
17168
17546
|
//#endregion
|
|
17169
|
-
//#region ../../node_modules/.pnpm/@effected+git@0.4.
|
|
17547
|
+
//#region ../../node_modules/.pnpm/@effected+git@0.4.1_effect@4.0.0-beta.99/node_modules/@effected/git/Git.js
|
|
17170
17548
|
/** git's own ceiling: a run that has not answered in 30s is not going to. */
|
|
17171
17549
|
const GIT_TIMEOUT = effect.Duration.seconds(30);
|
|
17172
17550
|
/**
|
|
@@ -17178,7 +17556,7 @@ const GIT_TIMEOUT = effect.Duration.seconds(30);
|
|
|
17178
17556
|
* `exitCode` and `stderr` are populated when git actually ran. `detail`
|
|
17179
17557
|
* carries a human-readable explanation of an absorbed spawn-level
|
|
17180
17558
|
* `PlatformError` or a per-run timeout — the two cases where git never
|
|
17181
|
-
* produced an exit code at all.
|
|
17559
|
+
* produced an exit code at all. `kind`
|
|
17182
17560
|
* discriminates a pre-spawn guard rejection (`"refused"`) from a genuine git
|
|
17183
17561
|
* failure (`"failed"`) structurally, so composed retry/fallback logic never has
|
|
17184
17562
|
* to parse the prose in `message` or `detail`.
|
|
@@ -18083,7 +18461,7 @@ var Git = class extends effect.Context.Service()("@effected/git/Git") {
|
|
|
18083
18461
|
}));
|
|
18084
18462
|
};
|
|
18085
18463
|
//#endregion
|
|
18086
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18464
|
+
//#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
|
|
18087
18465
|
/**
|
|
18088
18466
|
* Which git refs to compare, and whether to fold in the working tree.
|
|
18089
18467
|
*
|
|
@@ -18335,7 +18713,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
|
|
|
18335
18713
|
};
|
|
18336
18714
|
}
|
|
18337
18715
|
//#endregion
|
|
18338
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18716
|
+
//#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
|
|
18339
18717
|
/** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
|
|
18340
18718
|
const inlineCatalogs = (manifest) => {
|
|
18341
18719
|
if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
|
|
@@ -18399,7 +18777,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
|
|
|
18399
18777
|
});
|
|
18400
18778
|
};
|
|
18401
18779
|
//#endregion
|
|
18402
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18780
|
+
//#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
|
|
18403
18781
|
/** Whether `value` is a non-null, non-array object. */
|
|
18404
18782
|
const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
18405
18783
|
/**
|
|
@@ -18544,7 +18922,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
18544
18922
|
}) });
|
|
18545
18923
|
};
|
|
18546
18924
|
//#endregion
|
|
18547
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
18925
|
+
//#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
|
|
18548
18926
|
/**
|
|
18549
18927
|
* The four package managers this package understands.
|
|
18550
18928
|
*
|
|
@@ -18786,7 +19164,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
|
|
|
18786
19164
|
static layer = effect.Layer.effect(PackageManagerDetector, PackageManagerDetector.make);
|
|
18787
19165
|
};
|
|
18788
19166
|
//#endregion
|
|
18789
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19167
|
+
//#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
|
|
18790
19168
|
/**
|
|
18791
19169
|
* Raised when the workspace's lockfile cannot be read off disk.
|
|
18792
19170
|
*
|
|
@@ -18896,7 +19274,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
|
|
|
18896
19274
|
static layer = (options) => effect.Layer.effect(LockfileReader, LockfileReader.make(options));
|
|
18897
19275
|
};
|
|
18898
19276
|
//#endregion
|
|
18899
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19277
|
+
//#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
|
|
18900
19278
|
/** The public npm registry, used when `publishConfig.registry` says nothing. */
|
|
18901
19279
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
18902
19280
|
/**
|
|
@@ -18996,7 +19374,7 @@ var PublishabilityDetector = class PublishabilityDetector extends effect.Context
|
|
|
18996
19374
|
}) });
|
|
18997
19375
|
};
|
|
18998
19376
|
//#endregion
|
|
18999
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19377
|
+
//#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
|
|
19000
19378
|
/**
|
|
19001
19379
|
* An immutable, fully-normalized catalog collection — the one catalog
|
|
19002
19380
|
* resolution semantic in the package.
|
|
@@ -19380,7 +19758,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
19380
19758
|
}));
|
|
19381
19759
|
};
|
|
19382
19760
|
//#endregion
|
|
19383
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19761
|
+
//#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
|
|
19384
19762
|
const EMPTY = Object.freeze(Object.create(null));
|
|
19385
19763
|
const DependencyMap = effect.Schema.Record(effect.Schema.String, effect.Schema.String).pipe(effect.Schema.withDecodingDefaultKey(effect.Effect.succeed(EMPTY)), effect.Schema.withConstructorDefault(effect.Effect.succeed(EMPTY)));
|
|
19386
19764
|
/**
|
|
@@ -19545,7 +19923,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
|
|
|
19545
19923
|
}
|
|
19546
19924
|
};
|
|
19547
19925
|
//#endregion
|
|
19548
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
19926
|
+
//#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
|
|
19549
19927
|
/** Whether `value` is a non-null, non-array object. */
|
|
19550
19928
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
19551
19929
|
/** Whether every value in a record is a string — a usable dependency map. */
|
|
@@ -19737,7 +20115,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
19737
20115
|
static layer = (options) => effect.Layer.effect(WorkspaceSnapshots, WorkspaceSnapshots.make(options));
|
|
19738
20116
|
};
|
|
19739
20117
|
//#endregion
|
|
19740
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.
|
|
20118
|
+
//#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
|
|
19741
20119
|
/**
|
|
19742
20120
|
* Every service that needs only a filesystem: root, package-manager detection,
|
|
19743
20121
|
* discovery, lockfile reading, catalogs and publishability.
|
|
@@ -21514,7 +21892,7 @@ function validateChangesetOptions(input) {
|
|
|
21514
21892
|
})));
|
|
21515
21893
|
}
|
|
21516
21894
|
//#endregion
|
|
21517
|
-
//#region ../../node_modules/.pnpm/@changesets+get-github-info@1.0.0-next.
|
|
21895
|
+
//#region ../../node_modules/.pnpm/@changesets+get-github-info@1.0.0-next.4/node_modules/@changesets/get-github-info/dist/index.mjs
|
|
21518
21896
|
var import_dataloader = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
21519
21897
|
/**
|
|
21520
21898
|
* Copyright (c) 2019-present, GraphQL Foundation
|
|
@@ -23268,7 +23646,7 @@ function normalizeIdentifier(value) {
|
|
|
23268
23646
|
return value.replace(/[\t\n\r ]+/g, " ").replace(/^ | $/g, "").toLowerCase().toUpperCase();
|
|
23269
23647
|
}
|
|
23270
23648
|
//#endregion
|
|
23271
|
-
//#region ../../node_modules/.pnpm/mdast-util-gfm-footnote@2.1.
|
|
23649
|
+
//#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
|
|
23272
23650
|
/**
|
|
23273
23651
|
* @import {
|
|
23274
23652
|
* CompileContext,
|
|
@@ -23460,7 +23838,7 @@ function mapAll(line, index, blank) {
|
|
|
23460
23838
|
return (blank ? "" : " ") + line;
|
|
23461
23839
|
}
|
|
23462
23840
|
//#endregion
|
|
23463
|
-
//#region ../../node_modules/.pnpm/mdast-util-gfm-strikethrough@2.0.
|
|
23841
|
+
//#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
|
|
23464
23842
|
/**
|
|
23465
23843
|
* @typedef {import('mdast').Delete} Delete
|
|
23466
23844
|
*
|
|
@@ -28511,7 +28889,7 @@ function safeBound(value, config) {
|
|
|
28511
28889
|
return safe(this, value, config);
|
|
28512
28890
|
}
|
|
28513
28891
|
//#endregion
|
|
28514
|
-
//#region ../../node_modules/.pnpm/mdast-util-gfm-table@2.0.
|
|
28892
|
+
//#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
|
|
28515
28893
|
/**
|
|
28516
28894
|
* @typedef {import('mdast').InlineCode} InlineCode
|
|
28517
28895
|
* @typedef {import('mdast').Table} Table
|
|
@@ -28775,7 +29153,7 @@ function gfmTableToMarkdown(options) {
|
|
|
28775
29153
|
}
|
|
28776
29154
|
}
|
|
28777
29155
|
//#endregion
|
|
28778
|
-
//#region ../../node_modules/.pnpm/mdast-util-gfm-task-list-item@2.0.
|
|
29156
|
+
//#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
|
|
28779
29157
|
/**
|
|
28780
29158
|
* @typedef {import('mdast').ListItem} ListItem
|
|
28781
29159
|
* @typedef {import('mdast').Paragraph} Paragraph
|
|
@@ -28885,7 +29263,7 @@ function listItemWithTaskListItem(node, parent, state, info) {
|
|
|
28885
29263
|
}
|
|
28886
29264
|
}
|
|
28887
29265
|
//#endregion
|
|
28888
|
-
//#region ../../node_modules/.pnpm/mdast-util-gfm@3.1.
|
|
29266
|
+
//#region ../../node_modules/.pnpm/mdast-util-gfm@3.1.0_supports-color@8.1.1/node_modules/mdast-util-gfm/lib/index.js
|
|
28889
29267
|
/**
|
|
28890
29268
|
* @import {Extension as FromMarkdownExtension} from 'mdast-util-from-markdown'
|
|
28891
29269
|
* @import {Options} from 'mdast-util-gfm'
|
|
@@ -36969,7 +37347,7 @@ function gfm(options) {
|
|
|
36969
37347
|
]);
|
|
36970
37348
|
}
|
|
36971
37349
|
//#endregion
|
|
36972
|
-
//#region ../../node_modules/.pnpm/remark-gfm@4.0.1/node_modules/remark-gfm/lib/index.js
|
|
37350
|
+
//#region ../../node_modules/.pnpm/remark-gfm@4.0.1_supports-color@8.1.1/node_modules/remark-gfm/lib/index.js
|
|
36973
37351
|
/**
|
|
36974
37352
|
* @import {Root} from 'mdast'
|
|
36975
37353
|
* @import {Options} from 'remark-gfm'
|
|
@@ -37000,7 +37378,7 @@ function remarkGfm(options) {
|
|
|
37000
37378
|
toMarkdownExtensions.push(gfmToMarkdown(settings));
|
|
37001
37379
|
}
|
|
37002
37380
|
//#endregion
|
|
37003
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
37381
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/content.js
|
|
37004
37382
|
/**
|
|
37005
37383
|
* @import {
|
|
37006
37384
|
* InitialConstruct,
|
|
@@ -37067,7 +37445,7 @@ function initializeContent(effects) {
|
|
|
37067
37445
|
}
|
|
37068
37446
|
}
|
|
37069
37447
|
//#endregion
|
|
37070
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
37448
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/document.js
|
|
37071
37449
|
/**
|
|
37072
37450
|
* @import {
|
|
37073
37451
|
* Construct,
|
|
@@ -37283,7 +37661,7 @@ function tokenizeContainer(effects, ok, nok) {
|
|
|
37283
37661
|
return factorySpace(effects, effects.attempt(this.parser.constructs.document, ok, nok), "linePrefix", this.parser.constructs.disable.null.includes("codeIndented") ? void 0 : 4);
|
|
37284
37662
|
}
|
|
37285
37663
|
//#endregion
|
|
37286
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
37664
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/flow.js
|
|
37287
37665
|
/**
|
|
37288
37666
|
* @import {
|
|
37289
37667
|
* InitialConstruct,
|
|
@@ -37330,7 +37708,7 @@ function initializeFlow(effects) {
|
|
|
37330
37708
|
}
|
|
37331
37709
|
}
|
|
37332
37710
|
//#endregion
|
|
37333
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
37711
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/initialize/text.js
|
|
37334
37712
|
/**
|
|
37335
37713
|
* @import {
|
|
37336
37714
|
* Code,
|
|
@@ -37507,7 +37885,7 @@ function resolveAllLineSuffixes(events, context) {
|
|
|
37507
37885
|
return events;
|
|
37508
37886
|
}
|
|
37509
37887
|
//#endregion
|
|
37510
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
37888
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/constructs.js
|
|
37511
37889
|
/**
|
|
37512
37890
|
* @import {Extension} from 'micromark-util-types'
|
|
37513
37891
|
*/
|
|
@@ -37585,7 +37963,7 @@ const attentionMarkers = { null: [42, 95] };
|
|
|
37585
37963
|
/** @satisfies {Extension['disable']} */
|
|
37586
37964
|
const disable = { null: [] };
|
|
37587
37965
|
//#endregion
|
|
37588
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
37966
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/create-tokenizer.js
|
|
37589
37967
|
/**
|
|
37590
37968
|
* @import {
|
|
37591
37969
|
* Chunk,
|
|
@@ -38054,7 +38432,7 @@ function serializeChunks(chunks, expandTabs) {
|
|
|
38054
38432
|
return result.join("");
|
|
38055
38433
|
}
|
|
38056
38434
|
//#endregion
|
|
38057
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
38435
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/parse.js
|
|
38058
38436
|
/**
|
|
38059
38437
|
* @import {
|
|
38060
38438
|
* Create,
|
|
@@ -38098,7 +38476,7 @@ function parse$1(options) {
|
|
|
38098
38476
|
}
|
|
38099
38477
|
}
|
|
38100
38478
|
//#endregion
|
|
38101
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
38479
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/postprocess.js
|
|
38102
38480
|
/**
|
|
38103
38481
|
* @import {Event} from 'micromark-util-types'
|
|
38104
38482
|
*/
|
|
@@ -38113,7 +38491,7 @@ function postprocess(events) {
|
|
|
38113
38491
|
return events;
|
|
38114
38492
|
}
|
|
38115
38493
|
//#endregion
|
|
38116
|
-
//#region ../../node_modules/.pnpm/micromark@4.0.
|
|
38494
|
+
//#region ../../node_modules/.pnpm/micromark@4.0.2_supports-color@8.1.1/node_modules/micromark/lib/preprocess.js
|
|
38117
38495
|
/**
|
|
38118
38496
|
* @import {Chunk, Code, Encoding, Value} from 'micromark-util-types'
|
|
38119
38497
|
*/
|
|
@@ -38278,7 +38656,7 @@ function index(value) {
|
|
|
38278
38656
|
return value && typeof value === "number" ? value : 1;
|
|
38279
38657
|
}
|
|
38280
38658
|
//#endregion
|
|
38281
|
-
//#region ../../node_modules/.pnpm/mdast-util-from-markdown@2.0.
|
|
38659
|
+
//#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
|
|
38282
38660
|
/**
|
|
38283
38661
|
* @import {
|
|
38284
38662
|
* Break,
|
|
@@ -39244,7 +39622,7 @@ function defaultOnError(left, right) {
|
|
|
39244
39622
|
}) + ") is still open");
|
|
39245
39623
|
}
|
|
39246
39624
|
//#endregion
|
|
39247
|
-
//#region ../../node_modules/.pnpm/remark-parse@11.0.
|
|
39625
|
+
//#region ../../node_modules/.pnpm/remark-parse@11.0.0_supports-color@8.1.1/node_modules/remark-parse/lib/index.js
|
|
39248
39626
|
/**
|
|
39249
39627
|
* @typedef {import('mdast').Root} Root
|
|
39250
39628
|
* @typedef {import('mdast-util-from-markdown').Options} FromMarkdownOptions
|
|
@@ -57525,7 +57903,7 @@ function validatePackages(packages) {
|
|
|
57525
57903
|
}
|
|
57526
57904
|
}
|
|
57527
57905
|
//#endregion
|
|
57528
|
-
//#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@3.0.0-next.
|
|
57906
|
+
//#region ../../node_modules/.pnpm/@changesets+get-dependents-graph@3.0.0-next.7/node_modules/@changesets/get-dependents-graph/dist/index.mjs
|
|
57529
57907
|
var src_default = new Proxy({}, { get(target, color) {
|
|
57530
57908
|
target[color] ??= (text) => (0, node_util.styleText)(color, text);
|
|
57531
57909
|
return target[color];
|
|
@@ -57645,14 +58023,14 @@ function getDependentsGraph(packages, opts) {
|
|
|
57645
58023
|
return simplifiedDependentsGraph;
|
|
57646
58024
|
}
|
|
57647
58025
|
//#endregion
|
|
57648
|
-
//#region ../../node_modules/.pnpm/@changesets+should-skip-package@1.0.0-next.
|
|
58026
|
+
//#region ../../node_modules/.pnpm/@changesets+should-skip-package@1.0.0-next.7/node_modules/@changesets/should-skip-package/dist/index.mjs
|
|
57649
58027
|
function shouldSkipPackage({ packageJson }, { ignore, allowPrivatePackages }) {
|
|
57650
58028
|
if (ignore.includes(packageJson.name)) return true;
|
|
57651
58029
|
if (packageJson.private && !allowPrivatePackages) return true;
|
|
57652
58030
|
return !packageJson.version;
|
|
57653
58031
|
}
|
|
57654
58032
|
//#endregion
|
|
57655
|
-
//#region ../../node_modules/.pnpm/@changesets+config@4.0.0-next.
|
|
58033
|
+
//#region ../../node_modules/.pnpm/@changesets+config@4.0.0-next.7/node_modules/@changesets/config/dist/index.mjs
|
|
57656
58034
|
const DEFAULT_CONFIG = {
|
|
57657
58035
|
lang: void 0,
|
|
57658
58036
|
message: void 0,
|
|
@@ -58564,7 +58942,7 @@ async function readConfig(cwd, packages) {
|
|
|
58564
58942
|
packages ??= await getPackages(cwd);
|
|
58565
58943
|
return validateConfig(JSON.parse(await node_fs_promises.readFile(node_path.join(packages.rootDir, ".changeset", "config.json"), "utf8")), packages);
|
|
58566
58944
|
}
|
|
58567
|
-
var version = "4.0.0-next.
|
|
58945
|
+
var version = "4.0.0-next.7";
|
|
58568
58946
|
const defaultConfig = normalizeWrittenConfig({
|
|
58569
58947
|
packageNames: [],
|
|
58570
58948
|
writtenConfig: parse(WrittenConfigSchema, {
|
|
@@ -59287,228 +59665,6 @@ function isMetadataYarnClassic(metadataPath) {
|
|
|
59287
59665
|
return metadataPath.endsWith(".yarn_integrity");
|
|
59288
59666
|
}
|
|
59289
59667
|
//#endregion
|
|
59290
|
-
//#region ../../node_modules/.pnpm/@changesets+format@0.1.0/node_modules/@changesets/format/dist/index.js
|
|
59291
|
-
/**
|
|
59292
|
-
* Traverse upwards from `startDir` to `stopDir` (inclusive), calling `cb` in each directory. If
|
|
59293
|
-
* `cb` returns a non-null value, it'll stop and return that value.
|
|
59294
|
-
*/
|
|
59295
|
-
function traverseUpwards(startDir, stopDir, cb) {
|
|
59296
|
-
let dir = startDir;
|
|
59297
|
-
while (dir) {
|
|
59298
|
-
const result = cb(dir);
|
|
59299
|
-
if (result !== void 0) return result;
|
|
59300
|
-
if (dir === stopDir) break;
|
|
59301
|
-
const nextDir = node_path.dirname(dir);
|
|
59302
|
-
if (nextDir === dir) break;
|
|
59303
|
-
dir = nextDir;
|
|
59304
|
-
}
|
|
59305
|
-
}
|
|
59306
|
-
async function packageManagerExecute(packageManager, args, cwd) {
|
|
59307
|
-
const cmd = resolveCommand(packageManager, "execute-local", args) ?? {
|
|
59308
|
-
command: "npx",
|
|
59309
|
-
args
|
|
59310
|
-
};
|
|
59311
|
-
return await spawnProcess(cmd.command, cmd.args, cwd);
|
|
59312
|
-
}
|
|
59313
|
-
async function spawnProcess(command, args, cwd) {
|
|
59314
|
-
return new Promise((resolve, reject) => {
|
|
59315
|
-
const child = node_child_process.spawn(command, args, { cwd });
|
|
59316
|
-
let stderr = "";
|
|
59317
|
-
child.stderr.on("data", (data) => {
|
|
59318
|
-
stderr += data.toString();
|
|
59319
|
-
});
|
|
59320
|
-
child.on("exit", (code) => {
|
|
59321
|
-
if (code === 0) resolve();
|
|
59322
|
-
else reject(/* @__PURE__ */ new Error(`${command} exited with code ${code}. Stderr:\n${stderr}`));
|
|
59323
|
-
});
|
|
59324
|
-
child.on("error", (err) => {
|
|
59325
|
-
reject(err);
|
|
59326
|
-
});
|
|
59327
|
-
});
|
|
59328
|
-
}
|
|
59329
|
-
const formatters = {
|
|
59330
|
-
prettier: {
|
|
59331
|
-
name: "prettier",
|
|
59332
|
-
packageName: "prettier",
|
|
59333
|
-
configFiles: [
|
|
59334
|
-
".prettierrc",
|
|
59335
|
-
".prettierrc.json",
|
|
59336
|
-
".prettierrc.yml",
|
|
59337
|
-
".prettierrc.yaml",
|
|
59338
|
-
".prettierrc.json5",
|
|
59339
|
-
".prettierrc.js",
|
|
59340
|
-
"prettier.config.js",
|
|
59341
|
-
".prettierrc.ts",
|
|
59342
|
-
"prettier.config.ts",
|
|
59343
|
-
".prettierrc.mjs",
|
|
59344
|
-
"prettier.config.mjs",
|
|
59345
|
-
".prettierrc.mts",
|
|
59346
|
-
"prettier.config.mts",
|
|
59347
|
-
".prettierrc.cjs",
|
|
59348
|
-
"prettier.config.cjs",
|
|
59349
|
-
".prettierrc.cts",
|
|
59350
|
-
"prettier.config.cts",
|
|
59351
|
-
".prettierrc.toml",
|
|
59352
|
-
{
|
|
59353
|
-
file: "package.json",
|
|
59354
|
-
key: "prettier"
|
|
59355
|
-
}
|
|
59356
|
-
],
|
|
59357
|
-
async format(files, ctx) {
|
|
59358
|
-
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
59359
|
-
"prettier",
|
|
59360
|
-
"--write",
|
|
59361
|
-
...files
|
|
59362
|
-
], ctx.cwd);
|
|
59363
|
-
}
|
|
59364
|
-
},
|
|
59365
|
-
biome: {
|
|
59366
|
-
name: "biome",
|
|
59367
|
-
packageName: "@biomejs/biome",
|
|
59368
|
-
configFiles: [
|
|
59369
|
-
"biome.json",
|
|
59370
|
-
"biome.jsonc",
|
|
59371
|
-
".biome.json",
|
|
59372
|
-
".biome.jsonc"
|
|
59373
|
-
],
|
|
59374
|
-
async format(files, ctx) {
|
|
59375
|
-
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
59376
|
-
"@biomejs/biome",
|
|
59377
|
-
"format",
|
|
59378
|
-
"--write",
|
|
59379
|
-
...files
|
|
59380
|
-
], ctx.cwd);
|
|
59381
|
-
}
|
|
59382
|
-
},
|
|
59383
|
-
oxfmt: {
|
|
59384
|
-
name: "oxfmt",
|
|
59385
|
-
packageName: "oxfmt",
|
|
59386
|
-
configFiles: [
|
|
59387
|
-
".oxfmtrc.json",
|
|
59388
|
-
".oxfmtrc.jsonc",
|
|
59389
|
-
"oxfmt.config.ts"
|
|
59390
|
-
],
|
|
59391
|
-
async format(files, ctx) {
|
|
59392
|
-
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
59393
|
-
"oxfmt",
|
|
59394
|
-
"--write",
|
|
59395
|
-
...files
|
|
59396
|
-
], ctx.cwd);
|
|
59397
|
-
}
|
|
59398
|
-
},
|
|
59399
|
-
deno: {
|
|
59400
|
-
name: "deno",
|
|
59401
|
-
configFiles: [
|
|
59402
|
-
"deno.json",
|
|
59403
|
-
"deno.jsonc",
|
|
59404
|
-
{
|
|
59405
|
-
file: "deno.json",
|
|
59406
|
-
key: "fmt"
|
|
59407
|
-
}
|
|
59408
|
-
],
|
|
59409
|
-
async format(files, ctx) {
|
|
59410
|
-
await spawnProcess("deno", ["fmt", ...files], ctx.cwd);
|
|
59411
|
-
}
|
|
59412
|
-
},
|
|
59413
|
-
dprint: {
|
|
59414
|
-
name: "dprint",
|
|
59415
|
-
packageName: "dprint",
|
|
59416
|
-
configFiles: [
|
|
59417
|
-
"dprint.json",
|
|
59418
|
-
"dprint.jsonc",
|
|
59419
|
-
".dprint.json",
|
|
59420
|
-
".dprint.jsonc"
|
|
59421
|
-
],
|
|
59422
|
-
async format(files, ctx) {
|
|
59423
|
-
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
59424
|
-
"dprint",
|
|
59425
|
-
"fmt",
|
|
59426
|
-
...files
|
|
59427
|
-
], ctx.cwd);
|
|
59428
|
-
}
|
|
59429
|
-
}
|
|
59430
|
-
};
|
|
59431
|
-
const defaultDetectOrder = Object.freeze([
|
|
59432
|
-
"dprint",
|
|
59433
|
-
"deno",
|
|
59434
|
-
"oxfmt",
|
|
59435
|
-
"biome",
|
|
59436
|
-
"prettier"
|
|
59437
|
-
]);
|
|
59438
|
-
/**
|
|
59439
|
-
* Detect the preferred formatter used in the project.
|
|
59440
|
-
*/
|
|
59441
|
-
async function detect(options = {}) {
|
|
59442
|
-
const cwd = options.cwd ? node_path.resolve(options.cwd) : process.cwd();
|
|
59443
|
-
const stopDir = options.stopDir ? node_path.resolve(cwd, options.stopDir) : void 0;
|
|
59444
|
-
const order = options.order ?? defaultDetectOrder;
|
|
59445
|
-
let found = traverseUpwards(cwd, stopDir, (dir) => {
|
|
59446
|
-
for (const formatterName of order) {
|
|
59447
|
-
const formatter = formatters[formatterName];
|
|
59448
|
-
for (const configFile of formatter.configFiles) if (typeof configFile === "string") {
|
|
59449
|
-
const configFilePath = node_path.join(dir, configFile);
|
|
59450
|
-
if (node_fs.existsSync(configFilePath)) return formatter.name;
|
|
59451
|
-
} else if (checkConfigFileWithKeyExists(node_path.join(dir, configFile.file), configFile.key)) return formatter.name;
|
|
59452
|
-
}
|
|
59453
|
-
});
|
|
59454
|
-
found ??= traverseUpwards(cwd, stopDir, (dir) => {
|
|
59455
|
-
for (const formatterName of order) {
|
|
59456
|
-
const formatter = formatters[formatterName];
|
|
59457
|
-
if (formatter.packageName) {
|
|
59458
|
-
const packagePath = node_path.join(dir, "node_modules", formatter.packageName);
|
|
59459
|
-
if (node_fs.existsSync(packagePath)) return formatter.name;
|
|
59460
|
-
}
|
|
59461
|
-
}
|
|
59462
|
-
});
|
|
59463
|
-
return found;
|
|
59464
|
-
}
|
|
59465
|
-
function checkConfigFileWithKeyExists(configFile, key) {
|
|
59466
|
-
try {
|
|
59467
|
-
const content = node_fs.readFileSync(configFile, "utf-8");
|
|
59468
|
-
return key in JSON.parse(content);
|
|
59469
|
-
} catch {
|
|
59470
|
-
return false;
|
|
59471
|
-
}
|
|
59472
|
-
}
|
|
59473
|
-
/**
|
|
59474
|
-
* Format the given patterns with a specified or auto-detected formatter. It returns `true` if a
|
|
59475
|
-
* formatter is found and the formatting process passes, otherwise returns `false`.
|
|
59476
|
-
*/
|
|
59477
|
-
async function format$1(patterns, options = {}) {
|
|
59478
|
-
const formatterName = options.formatter ?? await detect({
|
|
59479
|
-
cwd: options.cwd,
|
|
59480
|
-
stopDir: options.stopDir
|
|
59481
|
-
});
|
|
59482
|
-
if (!formatterName) return false;
|
|
59483
|
-
const formatter = formatters[formatterName];
|
|
59484
|
-
const ctx = {
|
|
59485
|
-
cwd: options.cwd ? node_path.resolve(options.cwd) : process.cwd(),
|
|
59486
|
-
async getPackageManager() {
|
|
59487
|
-
if (options.packageManager) return options.packageManager;
|
|
59488
|
-
return (await detect$1({
|
|
59489
|
-
cwd: options.cwd,
|
|
59490
|
-
stopDir: options.stopDir
|
|
59491
|
-
}))?.agent ?? "npm";
|
|
59492
|
-
}
|
|
59493
|
-
};
|
|
59494
|
-
await formatter.format(patterns, ctx);
|
|
59495
|
-
return true;
|
|
59496
|
-
}
|
|
59497
|
-
//#endregion
|
|
59498
|
-
//#region ../../node_modules/.pnpm/@changesets+errors@1.0.0-next.3/node_modules/@changesets/errors/dist/index.mjs
|
|
59499
|
-
var GitError = class extends Error {
|
|
59500
|
-
code;
|
|
59501
|
-
constructor(code, message) {
|
|
59502
|
-
super(`${message}, exit code: ${code}`);
|
|
59503
|
-
this.code = code;
|
|
59504
|
-
}
|
|
59505
|
-
};
|
|
59506
|
-
var InternalError = class extends Error {
|
|
59507
|
-
constructor(message) {
|
|
59508
|
-
super(message);
|
|
59509
|
-
}
|
|
59510
|
-
};
|
|
59511
|
-
//#endregion
|
|
59512
59668
|
//#region ../../node_modules/.pnpm/tinyexec@1.2.4/node_modules/tinyexec/dist/main.mjs
|
|
59513
59669
|
const h = /^path$/i;
|
|
59514
59670
|
const g = {
|
|
@@ -59835,7 +59991,219 @@ const R = (e, t, n) => {
|
|
|
59835
59991
|
};
|
|
59836
59992
|
const z = R;
|
|
59837
59993
|
//#endregion
|
|
59838
|
-
//#region ../../node_modules/.pnpm/@changesets+
|
|
59994
|
+
//#region ../../node_modules/.pnpm/@changesets+format@0.1.1/node_modules/@changesets/format/dist/index.js
|
|
59995
|
+
/**
|
|
59996
|
+
* Traverse upwards from `startDir` to `stopDir` (inclusive), calling `cb` in each directory. If
|
|
59997
|
+
* `cb` returns a non-null value, it'll stop and return that value.
|
|
59998
|
+
*/
|
|
59999
|
+
function traverseUpwards(startDir, stopDir, cb) {
|
|
60000
|
+
let dir = startDir;
|
|
60001
|
+
while (dir) {
|
|
60002
|
+
const result = cb(dir);
|
|
60003
|
+
if (result !== void 0) return result;
|
|
60004
|
+
if (dir === stopDir) break;
|
|
60005
|
+
const nextDir = node_path.dirname(dir);
|
|
60006
|
+
if (nextDir === dir) break;
|
|
60007
|
+
dir = nextDir;
|
|
60008
|
+
}
|
|
60009
|
+
}
|
|
60010
|
+
async function packageManagerExecute(packageManager, args, cwd) {
|
|
60011
|
+
const cmd = resolveCommand(packageManager, "execute-local", args) ?? {
|
|
60012
|
+
command: "npx",
|
|
60013
|
+
args
|
|
60014
|
+
};
|
|
60015
|
+
return await spawnProcess(cmd.command, cmd.args, cwd);
|
|
60016
|
+
}
|
|
60017
|
+
async function spawnProcess(command, args, cwd) {
|
|
60018
|
+
await z(command, args, {
|
|
60019
|
+
nodeOptions: { cwd },
|
|
60020
|
+
throwOnError: true
|
|
60021
|
+
});
|
|
60022
|
+
}
|
|
60023
|
+
const formatters = {
|
|
60024
|
+
prettier: {
|
|
60025
|
+
name: "prettier",
|
|
60026
|
+
packageName: "prettier",
|
|
60027
|
+
configFiles: [
|
|
60028
|
+
".prettierrc",
|
|
60029
|
+
".prettierrc.json",
|
|
60030
|
+
".prettierrc.yml",
|
|
60031
|
+
".prettierrc.yaml",
|
|
60032
|
+
".prettierrc.json5",
|
|
60033
|
+
".prettierrc.js",
|
|
60034
|
+
"prettier.config.js",
|
|
60035
|
+
".prettierrc.ts",
|
|
60036
|
+
"prettier.config.ts",
|
|
60037
|
+
".prettierrc.mjs",
|
|
60038
|
+
"prettier.config.mjs",
|
|
60039
|
+
".prettierrc.mts",
|
|
60040
|
+
"prettier.config.mts",
|
|
60041
|
+
".prettierrc.cjs",
|
|
60042
|
+
"prettier.config.cjs",
|
|
60043
|
+
".prettierrc.cts",
|
|
60044
|
+
"prettier.config.cts",
|
|
60045
|
+
".prettierrc.toml",
|
|
60046
|
+
{
|
|
60047
|
+
file: "package.json",
|
|
60048
|
+
key: "prettier"
|
|
60049
|
+
}
|
|
60050
|
+
],
|
|
60051
|
+
async format(files, ctx) {
|
|
60052
|
+
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
60053
|
+
"prettier",
|
|
60054
|
+
"--write",
|
|
60055
|
+
...files
|
|
60056
|
+
], ctx.cwd);
|
|
60057
|
+
}
|
|
60058
|
+
},
|
|
60059
|
+
biome: {
|
|
60060
|
+
name: "biome",
|
|
60061
|
+
packageName: "@biomejs/biome",
|
|
60062
|
+
configFiles: [
|
|
60063
|
+
"biome.json",
|
|
60064
|
+
"biome.jsonc",
|
|
60065
|
+
".biome.json",
|
|
60066
|
+
".biome.jsonc"
|
|
60067
|
+
],
|
|
60068
|
+
async format(files, ctx) {
|
|
60069
|
+
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
60070
|
+
"@biomejs/biome",
|
|
60071
|
+
"format",
|
|
60072
|
+
"--write",
|
|
60073
|
+
...files
|
|
60074
|
+
], ctx.cwd);
|
|
60075
|
+
}
|
|
60076
|
+
},
|
|
60077
|
+
oxfmt: {
|
|
60078
|
+
name: "oxfmt",
|
|
60079
|
+
packageName: "oxfmt",
|
|
60080
|
+
configFiles: [
|
|
60081
|
+
".oxfmtrc.json",
|
|
60082
|
+
".oxfmtrc.jsonc",
|
|
60083
|
+
"oxfmt.config.ts"
|
|
60084
|
+
],
|
|
60085
|
+
async format(files, ctx) {
|
|
60086
|
+
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
60087
|
+
"oxfmt",
|
|
60088
|
+
"--write",
|
|
60089
|
+
...files
|
|
60090
|
+
], ctx.cwd);
|
|
60091
|
+
}
|
|
60092
|
+
},
|
|
60093
|
+
deno: {
|
|
60094
|
+
name: "deno",
|
|
60095
|
+
configFiles: [
|
|
60096
|
+
"deno.json",
|
|
60097
|
+
"deno.jsonc",
|
|
60098
|
+
{
|
|
60099
|
+
file: "deno.json",
|
|
60100
|
+
key: "fmt"
|
|
60101
|
+
}
|
|
60102
|
+
],
|
|
60103
|
+
async format(files, ctx) {
|
|
60104
|
+
await spawnProcess("deno", ["fmt", ...files], ctx.cwd);
|
|
60105
|
+
}
|
|
60106
|
+
},
|
|
60107
|
+
dprint: {
|
|
60108
|
+
name: "dprint",
|
|
60109
|
+
packageName: "dprint",
|
|
60110
|
+
configFiles: [
|
|
60111
|
+
"dprint.json",
|
|
60112
|
+
"dprint.jsonc",
|
|
60113
|
+
".dprint.json",
|
|
60114
|
+
".dprint.jsonc"
|
|
60115
|
+
],
|
|
60116
|
+
async format(files, ctx) {
|
|
60117
|
+
await packageManagerExecute(await ctx.getPackageManager(), [
|
|
60118
|
+
"dprint",
|
|
60119
|
+
"fmt",
|
|
60120
|
+
...files
|
|
60121
|
+
], ctx.cwd);
|
|
60122
|
+
}
|
|
60123
|
+
}
|
|
60124
|
+
};
|
|
60125
|
+
const defaultDetectOrder = Object.freeze([
|
|
60126
|
+
"dprint",
|
|
60127
|
+
"deno",
|
|
60128
|
+
"oxfmt",
|
|
60129
|
+
"biome",
|
|
60130
|
+
"prettier"
|
|
60131
|
+
]);
|
|
60132
|
+
/**
|
|
60133
|
+
* Detect the preferred formatter used in the project.
|
|
60134
|
+
*/
|
|
60135
|
+
async function detect(options = {}) {
|
|
60136
|
+
const cwd = options.cwd ? node_path.resolve(options.cwd) : process.cwd();
|
|
60137
|
+
const stopDir = options.stopDir ? node_path.resolve(cwd, options.stopDir) : void 0;
|
|
60138
|
+
const order = options.order ?? defaultDetectOrder;
|
|
60139
|
+
let found = traverseUpwards(cwd, stopDir, (dir) => {
|
|
60140
|
+
for (const formatterName of order) {
|
|
60141
|
+
const formatter = formatters[formatterName];
|
|
60142
|
+
for (const configFile of formatter.configFiles) if (typeof configFile === "string") {
|
|
60143
|
+
const configFilePath = node_path.join(dir, configFile);
|
|
60144
|
+
if (node_fs.existsSync(configFilePath)) return formatter.name;
|
|
60145
|
+
} else if (checkConfigFileWithKeyExists(node_path.join(dir, configFile.file), configFile.key)) return formatter.name;
|
|
60146
|
+
}
|
|
60147
|
+
});
|
|
60148
|
+
found ??= traverseUpwards(cwd, stopDir, (dir) => {
|
|
60149
|
+
for (const formatterName of order) {
|
|
60150
|
+
const formatter = formatters[formatterName];
|
|
60151
|
+
if (formatter.packageName) {
|
|
60152
|
+
const packagePath = node_path.join(dir, "node_modules", formatter.packageName);
|
|
60153
|
+
if (node_fs.existsSync(packagePath)) return formatter.name;
|
|
60154
|
+
}
|
|
60155
|
+
}
|
|
60156
|
+
});
|
|
60157
|
+
return found;
|
|
60158
|
+
}
|
|
60159
|
+
function checkConfigFileWithKeyExists(configFile, key) {
|
|
60160
|
+
try {
|
|
60161
|
+
const content = node_fs.readFileSync(configFile, "utf-8");
|
|
60162
|
+
return key in JSON.parse(content);
|
|
60163
|
+
} catch {
|
|
60164
|
+
return false;
|
|
60165
|
+
}
|
|
60166
|
+
}
|
|
60167
|
+
/**
|
|
60168
|
+
* Format the given patterns with a specified or auto-detected formatter. It returns `true` if a
|
|
60169
|
+
* formatter is found and the formatting process passes, otherwise returns `false`.
|
|
60170
|
+
*/
|
|
60171
|
+
async function format$1(patterns, options = {}) {
|
|
60172
|
+
const formatterName = options.formatter ?? await detect({
|
|
60173
|
+
cwd: options.cwd,
|
|
60174
|
+
stopDir: options.stopDir
|
|
60175
|
+
});
|
|
60176
|
+
if (!formatterName) return false;
|
|
60177
|
+
const formatter = formatters[formatterName];
|
|
60178
|
+
const ctx = {
|
|
60179
|
+
cwd: options.cwd ? node_path.resolve(options.cwd) : process.cwd(),
|
|
60180
|
+
async getPackageManager() {
|
|
60181
|
+
if (options.packageManager) return options.packageManager;
|
|
60182
|
+
return (await detect$1({
|
|
60183
|
+
cwd: options.cwd,
|
|
60184
|
+
stopDir: options.stopDir
|
|
60185
|
+
}))?.agent ?? "npm";
|
|
60186
|
+
}
|
|
60187
|
+
};
|
|
60188
|
+
await formatter.format(patterns, ctx);
|
|
60189
|
+
return true;
|
|
60190
|
+
}
|
|
60191
|
+
//#endregion
|
|
60192
|
+
//#region ../../node_modules/.pnpm/@changesets+errors@1.0.0-next.4/node_modules/@changesets/errors/dist/index.mjs
|
|
60193
|
+
var GitError = class extends Error {
|
|
60194
|
+
code;
|
|
60195
|
+
constructor(code, message) {
|
|
60196
|
+
super(`${message}, exit code: ${code}`);
|
|
60197
|
+
this.code = code;
|
|
60198
|
+
}
|
|
60199
|
+
};
|
|
60200
|
+
var InternalError = class extends Error {
|
|
60201
|
+
constructor(message) {
|
|
60202
|
+
super(message);
|
|
60203
|
+
}
|
|
60204
|
+
};
|
|
60205
|
+
//#endregion
|
|
60206
|
+
//#region ../../node_modules/.pnpm/@changesets+git@4.0.0-next.7/node_modules/@changesets/git/dist/index.mjs
|
|
59839
60207
|
async function getDivergedCommit(cwd, ref) {
|
|
59840
60208
|
const cmd = await z("git", [
|
|
59841
60209
|
"merge-base",
|
|
@@ -61982,7 +62350,7 @@ function applyEdits(text, edits) {
|
|
|
61982
62350
|
return text;
|
|
61983
62351
|
}
|
|
61984
62352
|
//#endregion
|
|
61985
|
-
//#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.0.0-next.
|
|
62353
|
+
//#region ../../node_modules/.pnpm/@changesets+apply-release-plan@8.0.0-next.8/node_modules/@changesets/apply-release-plan/dist/index.mjs
|
|
61986
62354
|
/**
|
|
61987
62355
|
* A simple JSON editing utility that preserves formatting. They specified operation keys
|
|
61988
62356
|
* must exist in the JSON for this implementation.
|
|
@@ -62123,13 +62491,8 @@ const DEPENDENCY_TYPES = [
|
|
|
62123
62491
|
"peerDependencies",
|
|
62124
62492
|
"optionalDependencies"
|
|
62125
62493
|
];
|
|
62126
|
-
function
|
|
62494
|
+
function getDependencyVersionEdits(packageJson, versionsToUpdate, { cwd, updateInternalDependencies, onlyUpdatePeerDependentsWhenOutOfRange, bumpVersionsWithWorkspaceProtocolOnly, snapshot }) {
|
|
62127
62495
|
const pkgJsonEdits = [];
|
|
62128
|
-
const { newVersion, packageJson } = release;
|
|
62129
|
-
pkgJsonEdits.push({
|
|
62130
|
-
keys: ["version"],
|
|
62131
|
-
value: newVersion
|
|
62132
|
-
});
|
|
62133
62496
|
for (const depType of DEPENDENCY_TYPES) {
|
|
62134
62497
|
const deps = packageJson[depType];
|
|
62135
62498
|
if (deps) for (const { name, version, oldVersion, type, dir } of versionsToUpdate) {
|
|
@@ -62163,10 +62526,7 @@ function versionPackage(release, versionsToUpdate, { cwd, updateInternalDependen
|
|
|
62163
62526
|
}
|
|
62164
62527
|
}
|
|
62165
62528
|
}
|
|
62166
|
-
return
|
|
62167
|
-
...release,
|
|
62168
|
-
pkgJsonEdits
|
|
62169
|
-
};
|
|
62529
|
+
return pkgJsonEdits;
|
|
62170
62530
|
}
|
|
62171
62531
|
function getVersionRangeType(versionRange) {
|
|
62172
62532
|
if (versionRange.charAt(0) === "^") return "^";
|
|
@@ -62196,6 +62556,13 @@ async function getFormatter(config, cwd) {
|
|
|
62196
62556
|
});
|
|
62197
62557
|
};
|
|
62198
62558
|
}
|
|
62559
|
+
async function updatePackageJson(dir, edits) {
|
|
62560
|
+
if (edits.length === 0) return;
|
|
62561
|
+
const pkgJsonPath = node_path.resolve(dir, "package.json");
|
|
62562
|
+
const pkgUpdated = editJson(await node_fs_promises.readFile(pkgJsonPath, "utf8"), edits);
|
|
62563
|
+
await node_fs_promises.writeFile(pkgJsonPath, pkgUpdated);
|
|
62564
|
+
return pkgJsonPath;
|
|
62565
|
+
}
|
|
62199
62566
|
async function applyReleasePlan(releasePlan, packages, config = defaultConfig, snapshot, contextDir = __dirname) {
|
|
62200
62567
|
const cwd = packages.rootDir;
|
|
62201
62568
|
const touchedFiles = [];
|
|
@@ -62224,22 +62591,21 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
|
|
|
62224
62591
|
type,
|
|
62225
62592
|
dir: packagesByName.get(name).dir
|
|
62226
62593
|
}));
|
|
62227
|
-
const
|
|
62228
|
-
|
|
62229
|
-
|
|
62230
|
-
|
|
62231
|
-
|
|
62232
|
-
|
|
62233
|
-
|
|
62234
|
-
});
|
|
62235
|
-
});
|
|
62594
|
+
const dependencyUpdateOptions = {
|
|
62595
|
+
cwd,
|
|
62596
|
+
updateInternalDependencies: config.updateInternalDependencies,
|
|
62597
|
+
onlyUpdatePeerDependentsWhenOutOfRange: config.___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH.onlyUpdatePeerDependentsWhenOutOfRange,
|
|
62598
|
+
bumpVersionsWithWorkspaceProtocolOnly: config.bumpVersionsWithWorkspaceProtocolOnly,
|
|
62599
|
+
snapshot
|
|
62600
|
+
};
|
|
62236
62601
|
const filesToFormat = [];
|
|
62237
|
-
for (const release of
|
|
62238
|
-
const { changelog,
|
|
62239
|
-
const pkgJsonPath =
|
|
62240
|
-
|
|
62241
|
-
|
|
62242
|
-
|
|
62602
|
+
for (const release of releaseWithChangelogs) {
|
|
62603
|
+
const { changelog, dir, name, newVersion, packageJson } = release;
|
|
62604
|
+
const pkgJsonPath = await updatePackageJson(dir, [{
|
|
62605
|
+
keys: ["version"],
|
|
62606
|
+
value: newVersion
|
|
62607
|
+
}, ...getDependencyVersionEdits(packageJson, versionsToUpdate, dependencyUpdateOptions)]);
|
|
62608
|
+
if (pkgJsonPath) touchedFiles.push(pkgJsonPath);
|
|
62243
62609
|
if (changelog && changelog.length > 0) {
|
|
62244
62610
|
const changelogPath = node_path.resolve(dir, "CHANGELOG.md");
|
|
62245
62611
|
await updateChangelog(changelogPath, changelog, name);
|
|
@@ -62247,6 +62613,11 @@ async function applyReleasePlan(releasePlan, packages, config = defaultConfig, s
|
|
|
62247
62613
|
filesToFormat.push(changelogPath);
|
|
62248
62614
|
}
|
|
62249
62615
|
}
|
|
62616
|
+
if (packages.rootPackage) {
|
|
62617
|
+
const pkgJsonEdits = getDependencyVersionEdits(packages.rootPackage.packageJson, versionsToUpdate, dependencyUpdateOptions);
|
|
62618
|
+
const pkgJsonPath = await updatePackageJson(packages.rootPackage.dir, pkgJsonEdits);
|
|
62619
|
+
if (pkgJsonPath) touchedFiles.push(pkgJsonPath);
|
|
62620
|
+
}
|
|
62250
62621
|
if (filesToFormat.length > 0) await (await getFormatter(config.format, cwd))(filesToFormat);
|
|
62251
62622
|
if (releasePlan.preState == null || releasePlan.preState.mode === "exit") {
|
|
62252
62623
|
const changesetFolder = node_path.resolve(cwd, ".changeset");
|
|
@@ -62337,7 +62708,7 @@ async function updateChangelog(changelogPath, changelog, name) {
|
|
|
62337
62708
|
await node_fs_promises.writeFile(changelogPath, newChangelog);
|
|
62338
62709
|
}
|
|
62339
62710
|
//#endregion
|
|
62340
|
-
//#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@7.0.0-next.
|
|
62711
|
+
//#region ../../node_modules/.pnpm/@changesets+assemble-release-plan@7.0.0-next.8/node_modules/@changesets/assemble-release-plan/dist/index.mjs
|
|
62341
62712
|
function getHighestReleaseType(releases) {
|
|
62342
62713
|
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`);
|
|
62343
62714
|
let highestReleaseType = "none";
|
|
@@ -62683,7 +63054,7 @@ function getPreInfo(changesets, packagesByName, config, preState) {
|
|
|
62683
63054
|
};
|
|
62684
63055
|
}
|
|
62685
63056
|
//#endregion
|
|
62686
|
-
//#region ../../node_modules/.pnpm/@changesets+pre@3.0.0-next.
|
|
63057
|
+
//#region ../../node_modules/.pnpm/@changesets+pre@3.0.0-next.7/node_modules/@changesets/pre/dist/index.mjs
|
|
62687
63058
|
async function outputFile(filePath, content) {
|
|
62688
63059
|
await node_fs_promises.mkdir(node_path.dirname(filePath), { recursive: true });
|
|
62689
63060
|
await node_fs_promises.writeFile(filePath, content, "utf8");
|
|
@@ -62712,7 +63083,7 @@ async function migratePreState(rootDir, preState) {
|
|
|
62712
63083
|
return preState;
|
|
62713
63084
|
}
|
|
62714
63085
|
//#endregion
|
|
62715
|
-
//#region ../../node_modules/.pnpm/@changesets+parse@1.0.0-next.
|
|
63086
|
+
//#region ../../node_modules/.pnpm/@changesets+parse@1.0.0-next.8/node_modules/@changesets/parse/dist/index.mjs
|
|
62716
63087
|
const mdRegex = /\s*---([^]*?)\r?\n\s*---(\s*(?:\n|$)[^]*)/;
|
|
62717
63088
|
const EXAMPLE_FORMAT = `---\n"package-name": patch\n---`;
|
|
62718
63089
|
const validVersionTypes = [
|
|
@@ -62765,7 +63136,7 @@ YAML error: ${e instanceof Error ? e.message : String(e)}\nFrontmatter content:\
|
|
|
62765
63136
|
};
|
|
62766
63137
|
}
|
|
62767
63138
|
//#endregion
|
|
62768
|
-
//#region ../../node_modules/.pnpm/@changesets+read@1.0.0-next.
|
|
63139
|
+
//#region ../../node_modules/.pnpm/@changesets+read@1.0.0-next.8/node_modules/@changesets/read/dist/index.mjs
|
|
62769
63140
|
const ignoredMdFiles = [
|
|
62770
63141
|
/^README\.md$/i,
|
|
62771
63142
|
"AGENTS.md",
|
|
@@ -62798,7 +63169,7 @@ async function readChangesets(rootDir, sinceRef) {
|
|
|
62798
63169
|
return await Promise.all(changesetContents);
|
|
62799
63170
|
}
|
|
62800
63171
|
//#endregion
|
|
62801
|
-
//#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.0-next.
|
|
63172
|
+
//#region ../../node_modules/.pnpm/@changesets+get-release-plan@5.0.0-next.8/node_modules/@changesets/get-release-plan/dist/index.mjs
|
|
62802
63173
|
async function getReleasePlan(cwd, sinceRef, passedConfig) {
|
|
62803
63174
|
const packages = await getPackages(cwd);
|
|
62804
63175
|
const configResult = await readConfig(packages.rootDir, packages);
|