@savvy-web/silk 3.2.11 → 3.3.1
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 +833 -634
- package/changesets-changelog.d.cts +258 -98
- package/changesets-changelog.d.ts +258 -98
- package/changesets-changelog.js +849 -650
- package/changesets-markdownlint.cjs +833 -634
- package/changesets-markdownlint.d.cts +258 -98
- package/changesets-markdownlint.d.ts +258 -98
- package/changesets-markdownlint.js +849 -650
- package/lint.d.ts +2 -2
- package/lint.js +2 -2
- package/package.json +10 -10
- package/tsconfig/node/dist/tsconfig.tsbuildinfo +1 -1
|
@@ -29,7 +29,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
29
29
|
}
|
|
30
30
|
return to;
|
|
31
31
|
};
|
|
32
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, "default", {
|
|
32
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp$1(target, "default", {
|
|
33
33
|
value: mod,
|
|
34
34
|
enumerable: true
|
|
35
35
|
}) : target, mod));
|
|
@@ -216,7 +216,7 @@ function isSilkChangelog(changelog) {
|
|
|
216
216
|
* const reader = yield* ChangesetConfigReader;
|
|
217
217
|
* return yield* reader.read(process.cwd());
|
|
218
218
|
* }).pipe(
|
|
219
|
-
* Effect.provide(
|
|
219
|
+
* Effect.provide(ChangesetConfigReader.layer),
|
|
220
220
|
* Effect.provide(NodeServices.layer),
|
|
221
221
|
* )
|
|
222
222
|
* );
|
|
@@ -225,64 +225,65 @@ function isSilkChangelog(changelog) {
|
|
|
225
225
|
* @since 0.1.0
|
|
226
226
|
* @public
|
|
227
227
|
*/
|
|
228
|
-
var ChangesetConfigReader = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfigReader") {
|
|
229
|
-
/**
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
* @remarks
|
|
233
|
-
* Requires the core `FileSystem` service. Provide `NodeServices.layer` (or
|
|
234
|
-
* `NodeFileSystem.layer`) from `@effect/platform-node` to satisfy this dependency.
|
|
235
|
-
*
|
|
236
|
-
* @since 0.1.0
|
|
237
|
-
* @public
|
|
238
|
-
*/
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
path: configPath,
|
|
252
|
-
reason: "File not found"
|
|
253
|
-
}));
|
|
254
|
-
const raw = yield* fs.readFileString(configPath).pipe(effect.Effect.mapError(
|
|
255
|
-
/* v8 ignore next 4 -- error path requires fs.readFileString to fail */
|
|
256
|
-
(cause) => new ChangesetConfigError({
|
|
257
|
-
path: configPath,
|
|
258
|
-
reason: String(cause)
|
|
259
|
-
})
|
|
260
|
-
));
|
|
261
|
-
const parsed = yield* effect.Effect.try({
|
|
262
|
-
try: () => JSON.parse(raw),
|
|
263
|
-
catch: (cause) => new ChangesetConfigError({
|
|
228
|
+
var ChangesetConfigReader = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfigReader") {
|
|
229
|
+
/**
|
|
230
|
+
* Production implementation of {@link ChangesetConfigReader}.
|
|
231
|
+
*
|
|
232
|
+
* @remarks
|
|
233
|
+
* Requires the core `FileSystem` service. Provide `NodeServices.layer` (or
|
|
234
|
+
* `NodeFileSystem.layer`) from `@effect/platform-node` to satisfy this dependency.
|
|
235
|
+
*
|
|
236
|
+
* @since 0.1.0
|
|
237
|
+
* @public
|
|
238
|
+
*/
|
|
239
|
+
static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
|
|
240
|
+
const fs = yield* effect.FileSystem.FileSystem;
|
|
241
|
+
const read = (root) => {
|
|
242
|
+
const configPath = `${root}/.changeset/config.json`;
|
|
243
|
+
return effect.Effect.gen(function* () {
|
|
244
|
+
if (!(yield* fs.exists(configPath).pipe(effect.Effect.mapError(
|
|
245
|
+
/* v8 ignore next 4 -- error path requires fs.exists to fail */
|
|
246
|
+
(cause) => new ChangesetConfigError({
|
|
247
|
+
path: configPath,
|
|
248
|
+
reason: String(cause)
|
|
249
|
+
})
|
|
250
|
+
)))) return yield* effect.Effect.fail(new ChangesetConfigError({
|
|
264
251
|
path: configPath,
|
|
265
|
-
reason:
|
|
266
|
-
})
|
|
252
|
+
reason: "File not found"
|
|
253
|
+
}));
|
|
254
|
+
const raw = yield* fs.readFileString(configPath).pipe(effect.Effect.mapError(
|
|
255
|
+
/* v8 ignore next 4 -- error path requires fs.readFileString to fail */
|
|
256
|
+
(cause) => new ChangesetConfigError({
|
|
257
|
+
path: configPath,
|
|
258
|
+
reason: String(cause)
|
|
259
|
+
})
|
|
260
|
+
));
|
|
261
|
+
const parsed = yield* effect.Effect.try({
|
|
262
|
+
try: () => JSON.parse(raw),
|
|
263
|
+
catch: (cause) => new ChangesetConfigError({
|
|
264
|
+
path: configPath,
|
|
265
|
+
reason: `Invalid JSON: ${String(cause)}`
|
|
266
|
+
})
|
|
267
|
+
});
|
|
268
|
+
if (isSilkChangelog(parsed.changelog)) return yield* effect.Schema.decodeUnknownEffect(SilkChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
|
|
269
|
+
/* v8 ignore next 4 -- error path requires schema decode failure */
|
|
270
|
+
(cause) => new ChangesetConfigError({
|
|
271
|
+
path: configPath,
|
|
272
|
+
reason: `Schema decode failed: ${String(cause)}`
|
|
273
|
+
})
|
|
274
|
+
));
|
|
275
|
+
return yield* effect.Schema.decodeUnknownEffect(ChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
|
|
276
|
+
/* v8 ignore next 4 -- error path requires schema decode failure */
|
|
277
|
+
(cause) => new ChangesetConfigError({
|
|
278
|
+
path: configPath,
|
|
279
|
+
reason: `Schema decode failed: ${String(cause)}`
|
|
280
|
+
})
|
|
281
|
+
));
|
|
267
282
|
});
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
reason: `Schema decode failed: ${String(cause)}`
|
|
273
|
-
})
|
|
274
|
-
));
|
|
275
|
-
return yield* effect.Schema.decodeUnknownEffect(ChangesetConfigFile)(parsed).pipe(effect.Effect.mapError(
|
|
276
|
-
/* v8 ignore next 4 -- error path requires schema decode failure */
|
|
277
|
-
(cause) => new ChangesetConfigError({
|
|
278
|
-
path: configPath,
|
|
279
|
-
reason: `Schema decode failed: ${String(cause)}`
|
|
280
|
-
})
|
|
281
|
-
));
|
|
282
|
-
});
|
|
283
|
-
};
|
|
284
|
-
return { read };
|
|
285
|
-
}));
|
|
283
|
+
};
|
|
284
|
+
return { read };
|
|
285
|
+
}));
|
|
286
|
+
};
|
|
286
287
|
//#endregion
|
|
287
288
|
//#region ../silk-effects/dist/dev/pkg/errors/PublishTargetBindingError.js
|
|
288
289
|
/**
|
|
@@ -311,6 +312,7 @@ var PublishTargetBindingError = class extends effect.Data.TaggedError("PublishTa
|
|
|
311
312
|
};
|
|
312
313
|
//#endregion
|
|
313
314
|
//#region ../silk-effects/dist/dev/pkg/services/ChangesetConfig.js
|
|
315
|
+
const isSilk = (cfg) => "_isSilk" in cfg && cfg._isSilk === true;
|
|
314
316
|
/**
|
|
315
317
|
* Accessor service over a workspace root's `.changeset/config.json`.
|
|
316
318
|
*
|
|
@@ -322,7 +324,7 @@ var PublishTargetBindingError = class extends effect.Data.TaggedError("PublishTa
|
|
|
322
324
|
* @since 0.4.0
|
|
323
325
|
* @public
|
|
324
326
|
*/
|
|
325
|
-
var ChangesetConfig = class extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfig") {
|
|
327
|
+
var ChangesetConfig = class ChangesetConfig extends effect.Context.Service()("@savvy-web/silk-effects/ChangesetConfig") {
|
|
326
328
|
/**
|
|
327
329
|
* The one ignore matcher: exact name match, or `@scope/*` wildcard.
|
|
328
330
|
*
|
|
@@ -336,55 +338,54 @@ var ChangesetConfig = class extends effect.Context.Service()("@savvy-web/silk-ef
|
|
|
336
338
|
}
|
|
337
339
|
return name === pattern;
|
|
338
340
|
}
|
|
341
|
+
/**
|
|
342
|
+
* Production layer for {@link ChangesetConfig}, reading via {@link ChangesetConfigReader}, cached per root.
|
|
343
|
+
*
|
|
344
|
+
* @remarks
|
|
345
|
+
* Requires `ChangesetConfigReader` (which requires `FileSystem`). Provide
|
|
346
|
+
* `ChangesetConfigReader.layer` + a platform layer (`NodeServices.layer`).
|
|
347
|
+
*
|
|
348
|
+
* @since 0.4.0
|
|
349
|
+
* @public
|
|
350
|
+
*/
|
|
351
|
+
static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
|
|
352
|
+
const reader = yield* ChangesetConfigReader;
|
|
353
|
+
const cache = /* @__PURE__ */ new Map();
|
|
354
|
+
const read = (root) => effect.Effect.gen(function* () {
|
|
355
|
+
const hit = cache.get(root);
|
|
356
|
+
if (hit !== void 0) return hit;
|
|
357
|
+
const result = yield* reader.read(root).pipe(effect.Effect.option);
|
|
358
|
+
cache.set(root, result);
|
|
359
|
+
return result;
|
|
360
|
+
});
|
|
361
|
+
return {
|
|
362
|
+
mode: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
|
|
363
|
+
onNone: () => "none",
|
|
364
|
+
onSome: (cfg) => isSilk(cfg) ? "silk" : "vanilla"
|
|
365
|
+
}))),
|
|
366
|
+
versionPrivate: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
|
|
367
|
+
onNone: () => false,
|
|
368
|
+
onSome: (cfg) => {
|
|
369
|
+
const pp = cfg.privatePackages;
|
|
370
|
+
return pp !== void 0 && pp !== false && pp.version === true;
|
|
371
|
+
}
|
|
372
|
+
}))),
|
|
373
|
+
ignorePatterns: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
|
|
374
|
+
onNone: () => [],
|
|
375
|
+
onSome: (cfg) => cfg.ignore ?? []
|
|
376
|
+
}))),
|
|
377
|
+
isIgnored: (name, root) => read(root).pipe(effect.Effect.map(effect.Option.match({
|
|
378
|
+
onNone: () => false,
|
|
379
|
+
onSome: (cfg) => (cfg.ignore ?? []).some((p) => ChangesetConfig.matches(name, p))
|
|
380
|
+
}))),
|
|
381
|
+
fixed: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
|
|
382
|
+
onNone: () => [],
|
|
383
|
+
onSome: (cfg) => cfg.fixed ?? []
|
|
384
|
+
}))),
|
|
385
|
+
refresh: () => effect.Effect.sync(() => cache.clear())
|
|
386
|
+
};
|
|
387
|
+
}));
|
|
339
388
|
};
|
|
340
|
-
const isSilk = (cfg) => "_isSilk" in cfg && cfg._isSilk === true;
|
|
341
|
-
/**
|
|
342
|
-
* Live {@link ChangesetConfig} reading via {@link ChangesetConfigReader}, cached per root.
|
|
343
|
-
*
|
|
344
|
-
* @remarks
|
|
345
|
-
* Requires `ChangesetConfigReader` (which requires `FileSystem`). Provide
|
|
346
|
-
* `ChangesetConfigReaderLive` + a platform layer (`NodeServices.layer`).
|
|
347
|
-
*
|
|
348
|
-
* @since 0.4.0
|
|
349
|
-
* @public
|
|
350
|
-
*/
|
|
351
|
-
const ChangesetConfigLive = effect.Layer.effect(ChangesetConfig, effect.Effect.gen(function* () {
|
|
352
|
-
const reader = yield* ChangesetConfigReader;
|
|
353
|
-
const cache = /* @__PURE__ */ new Map();
|
|
354
|
-
const read = (root) => effect.Effect.gen(function* () {
|
|
355
|
-
const hit = cache.get(root);
|
|
356
|
-
if (hit !== void 0) return hit;
|
|
357
|
-
const result = yield* reader.read(root).pipe(effect.Effect.option);
|
|
358
|
-
cache.set(root, result);
|
|
359
|
-
return result;
|
|
360
|
-
});
|
|
361
|
-
return {
|
|
362
|
-
mode: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
|
|
363
|
-
onNone: () => "none",
|
|
364
|
-
onSome: (cfg) => isSilk(cfg) ? "silk" : "vanilla"
|
|
365
|
-
}))),
|
|
366
|
-
versionPrivate: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
|
|
367
|
-
onNone: () => false,
|
|
368
|
-
onSome: (cfg) => {
|
|
369
|
-
const pp = cfg.privatePackages;
|
|
370
|
-
return pp !== void 0 && pp !== false && pp.version === true;
|
|
371
|
-
}
|
|
372
|
-
}))),
|
|
373
|
-
ignorePatterns: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
|
|
374
|
-
onNone: () => [],
|
|
375
|
-
onSome: (cfg) => cfg.ignore ?? []
|
|
376
|
-
}))),
|
|
377
|
-
isIgnored: (name, root) => read(root).pipe(effect.Effect.map(effect.Option.match({
|
|
378
|
-
onNone: () => false,
|
|
379
|
-
onSome: (cfg) => (cfg.ignore ?? []).some((p) => ChangesetConfig.matches(name, p))
|
|
380
|
-
}))),
|
|
381
|
-
fixed: (root) => read(root).pipe(effect.Effect.map(effect.Option.match({
|
|
382
|
-
onNone: () => [],
|
|
383
|
-
onSome: (cfg) => cfg.fixed ?? []
|
|
384
|
-
}))),
|
|
385
|
-
refresh: () => effect.Effect.sync(() => cache.clear())
|
|
386
|
-
};
|
|
387
|
-
}));
|
|
388
389
|
//#endregion
|
|
389
390
|
//#region ../silk-effects/dist/dev/pkg/utils/TrailingSlash.js
|
|
390
391
|
/**
|
|
@@ -404,7 +405,7 @@ const trimTrailingSlashes = (s) => {
|
|
|
404
405
|
//#endregion
|
|
405
406
|
//#region ../../node_modules/.pnpm/@effected+glob@0.2.1_effect@4.0.0-beta.101/node_modules/@effected/glob/internal/limits.js
|
|
406
407
|
/** Hard cap on pattern length. Upstream minimatch's MAX_PATTERN_LENGTH (64KB). */
|
|
407
|
-
const MAX_PATTERN_LENGTH =
|
|
408
|
+
const MAX_PATTERN_LENGTH = 65536;
|
|
408
409
|
/** Default brace-expansion output budget. Upstream brace-expansion's EXPANSION_MAX. */
|
|
409
410
|
const EXPANSION_MAX = 1e5;
|
|
410
411
|
/**
|
|
@@ -2336,7 +2337,7 @@ var GlobSet = class GlobSet extends effect.Schema.Class("GlobSet")(effect.Schema
|
|
|
2336
2337
|
}
|
|
2337
2338
|
};
|
|
2338
2339
|
//#endregion
|
|
2339
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
2340
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/BunExtension.js
|
|
2340
2341
|
/**
|
|
2341
2342
|
* Extension data specific to bun lockfiles, attached to `Lockfile.extension`
|
|
2342
2343
|
* when the format is `"bun"`.
|
|
@@ -2357,7 +2358,7 @@ var BunExtension = class extends effect.Schema.Class("BunExtension")({
|
|
|
2357
2358
|
trustedDependencies: effect.Schema.optionalKey(effect.Schema.Array(effect.Schema.String))
|
|
2358
2359
|
}) {};
|
|
2359
2360
|
//#endregion
|
|
2360
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2361
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogResolver.js
|
|
2361
2362
|
/**
|
|
2362
2363
|
* Contract for resolving pnpm `catalog:` dependency specifiers to concrete
|
|
2363
2364
|
* version ranges.
|
|
@@ -2403,7 +2404,7 @@ var CatalogResolver = class CatalogResolver extends effect.Context.Service()("@e
|
|
|
2403
2404
|
static noop = effect.Layer.succeed(CatalogResolver, { rangeOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2404
2405
|
};
|
|
2405
2406
|
//#endregion
|
|
2406
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2407
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/WorkspaceResolver.js
|
|
2407
2408
|
/**
|
|
2408
2409
|
* Raised when a `catalog:` or `workspace:` specifier cannot be resolved
|
|
2409
2410
|
* because the resolution mechanism itself failed — not for an ordinary
|
|
@@ -2464,7 +2465,7 @@ var WorkspaceResolver = class WorkspaceResolver extends effect.Context.Service()
|
|
|
2464
2465
|
static noop = effect.Layer.succeed(WorkspaceResolver, { versionOf: () => effect.Effect.succeed(effect.Option.none()) });
|
|
2465
2466
|
};
|
|
2466
2467
|
//#endregion
|
|
2467
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2468
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/CatalogAssemblyError.js
|
|
2468
2469
|
/**
|
|
2469
2470
|
* Raised when a workspace's catalogs cannot be assembled — a `pnpm-workspace.yaml`
|
|
2470
2471
|
* that is unreadable or not valid YAML, a root `package.json` `workspaces` field
|
|
@@ -2508,7 +2509,7 @@ var CatalogAssemblyError = class extends effect.Schema.TaggedErrorClass()("Catal
|
|
|
2508
2509
|
}
|
|
2509
2510
|
};
|
|
2510
2511
|
//#endregion
|
|
2511
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
2512
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySection.js
|
|
2512
2513
|
/**
|
|
2513
2514
|
* The short dependency kind: which dependency map an entry came from, named the
|
|
2514
2515
|
* way consumers branch on it.
|
|
@@ -2540,7 +2541,7 @@ Object.fromEntries(Object.entries({
|
|
|
2540
2541
|
optional: "optionalDependencies"
|
|
2541
2542
|
}).map(([kind, field]) => [field, kind]));
|
|
2542
2543
|
//#endregion
|
|
2543
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.
|
|
2544
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/desugar.js
|
|
2544
2545
|
const sv = (major, minor, patch, prerelease = [], build = []) => ({
|
|
2545
2546
|
major,
|
|
2546
2547
|
minor,
|
|
@@ -2629,7 +2630,7 @@ const desugarHyphen = (lower, upper) => {
|
|
|
2629
2630
|
return [comp(">=", lowerVersion)];
|
|
2630
2631
|
};
|
|
2631
2632
|
//#endregion
|
|
2632
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.
|
|
2633
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/grammar.js
|
|
2633
2634
|
/** Private control-flow exception; never escapes the entry points. */
|
|
2634
2635
|
var ParseFailure = class {
|
|
2635
2636
|
position;
|
|
@@ -2865,13 +2866,17 @@ const parseSimple = (s) => {
|
|
|
2865
2866
|
if (ch === "~") {
|
|
2866
2867
|
advance$1(s);
|
|
2867
2868
|
if (peek$1(s) === ">") return fail(s);
|
|
2868
|
-
|
|
2869
|
+
const partial = parsePartial(s);
|
|
2870
|
+
return desugarTilde(partial);
|
|
2869
2871
|
}
|
|
2870
2872
|
if (ch === "^") {
|
|
2871
2873
|
advance$1(s);
|
|
2872
|
-
|
|
2874
|
+
const partial = parsePartial(s);
|
|
2875
|
+
return desugarCaret(partial);
|
|
2873
2876
|
}
|
|
2874
|
-
|
|
2877
|
+
const operator = parseOperator(s);
|
|
2878
|
+
const partial = parsePartial(s);
|
|
2879
|
+
return desugarXRange(operator, partial);
|
|
2875
2880
|
};
|
|
2876
2881
|
const atRangeEnd = (s) => {
|
|
2877
2882
|
if (atEnd$1(s)) return true;
|
|
@@ -2888,7 +2893,8 @@ const parseRangeComparators = (s) => {
|
|
|
2888
2893
|
advance$1(s);
|
|
2889
2894
|
advance$1(s);
|
|
2890
2895
|
advance$1(s);
|
|
2891
|
-
|
|
2896
|
+
const upper = parsePartial(s);
|
|
2897
|
+
return desugarHyphen(lower, upper);
|
|
2892
2898
|
} catch (failure) {
|
|
2893
2899
|
if (!(failure instanceof ParseFailure)) throw failure;
|
|
2894
2900
|
s.pos = savedPos;
|
|
@@ -3024,7 +3030,7 @@ const formatComparator = (c) => {
|
|
|
3024
3030
|
/** Print comparator sets as `a b || c d`. */
|
|
3025
3031
|
const formatRange = (sets) => sets.map((set) => set.map(formatComparator).join(" ")).join(" || ");
|
|
3026
3032
|
//#endregion
|
|
3027
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.
|
|
3033
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/order.js
|
|
3028
3034
|
/**
|
|
3029
3035
|
* Compare two prerelease identifiers per SemVer 2.0.0 §11: numeric
|
|
3030
3036
|
* identifiers always have lower precedence than alphanumeric ones; numerics
|
|
@@ -3077,7 +3083,7 @@ const compareBuild = (a, b) => {
|
|
|
3077
3083
|
return 0;
|
|
3078
3084
|
};
|
|
3079
3085
|
//#endregion
|
|
3080
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.
|
|
3086
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/SemVer.js
|
|
3081
3087
|
/**
|
|
3082
3088
|
* Indicates that a string could not be parsed as a valid SemVer 2.0.0 version.
|
|
3083
3089
|
*
|
|
@@ -3158,6 +3164,35 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
|
|
|
3158
3164
|
encode: (parts) => effect.Effect.succeed(formatVersion(parts))
|
|
3159
3165
|
})));
|
|
3160
3166
|
/**
|
|
3167
|
+
* `Schema.String` refined by {@link SemVer.isValid}: an exact SemVer 2.0.0
|
|
3168
|
+
* version string whose type stays `string`.
|
|
3169
|
+
*
|
|
3170
|
+
* @remarks
|
|
3171
|
+
* For consumer structs whose field must remain a plain string — a manifest
|
|
3172
|
+
* model, an action input — while still refusing everything that is not
|
|
3173
|
+
* exactly one version: ranges, partial versions, dist-tags, and padded
|
|
3174
|
+
* input (see {@link SemVer.isValid} for the whitespace posture). Build
|
|
3175
|
+
* metadata is valid grammar and passes; reach for
|
|
3176
|
+
* {@link SemVer.PinnableVersionString} when the `+` position is spoken for.
|
|
3177
|
+
* Decode to a {@link SemVer} instance with {@link SemVer.FromString}
|
|
3178
|
+
* instead when the parsed components are wanted.
|
|
3179
|
+
*/
|
|
3180
|
+
static ExactVersionString = effect.Schema.String.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => SemVer.isValid(value) ? void 0 : "Expected an exact SemVer 2.0.0 version string (ranges, partial versions, dist-tags and surrounding whitespace are not valid)")));
|
|
3181
|
+
/**
|
|
3182
|
+
* `Schema.String` refined by {@link SemVer.isPinnable}: an exact,
|
|
3183
|
+
* build-metadata-free SemVer 2.0.0 version string whose type stays
|
|
3184
|
+
* `string`.
|
|
3185
|
+
*
|
|
3186
|
+
* @remarks
|
|
3187
|
+
* The corepack-pinnable notion: what the `<name>@<version>[+<integrity>]`
|
|
3188
|
+
* pin grammar can express in its version position, where the first `+`
|
|
3189
|
+
* always begins the integrity component. `@effected/package-json`'s
|
|
3190
|
+
* `PackageManager` field model consumes this schema directly; suites that
|
|
3191
|
+
* must prove they share it rather than carrying a copy can assert object
|
|
3192
|
+
* identity against this export.
|
|
3193
|
+
*/
|
|
3194
|
+
static PinnableVersionString = effect.Schema.String.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => SemVer.isPinnable(value) ? void 0 : "Expected an exact SemVer version with no build metadata (ranges, partial versions, dist-tags and surrounding whitespace are not pinnable)")));
|
|
3195
|
+
/**
|
|
3161
3196
|
* Parse a strict SemVer 2.0.0 version string, synchronously, returning a
|
|
3162
3197
|
* `Result` instead of an `Effect`.
|
|
3163
3198
|
*
|
|
@@ -3165,6 +3200,12 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
|
|
|
3165
3200
|
* identifiers and partially consumed input.
|
|
3166
3201
|
*
|
|
3167
3202
|
* @remarks
|
|
3203
|
+
* **Surrounding whitespace is TRIMMED before parsing**, matching
|
|
3204
|
+
* node-semver's constructor: `" 1.2.3"` parses successfully. When padded
|
|
3205
|
+
* input should be the caller's error rather than silently canonicalized,
|
|
3206
|
+
* reach for {@link SemVer.isValid} / {@link SemVer.ExactVersionString}
|
|
3207
|
+
* (or their pinnable twins), which deliberately reject it.
|
|
3208
|
+
*
|
|
3168
3209
|
* {@link SemVer.parse} is defined in terms of this function; the two never
|
|
3169
3210
|
* diverge. Reach for the `Effect` variant inside Effect code — it carries
|
|
3170
3211
|
* the `SemVer.parse` tracing span — and for this one at synchronous
|
|
@@ -3210,6 +3251,49 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
|
|
|
3210
3251
|
*/
|
|
3211
3252
|
static parse = effect.Effect.fn("SemVer.parse")((input) => effect.Effect.fromResult(SemVer.parseResult(input)));
|
|
3212
3253
|
/**
|
|
3254
|
+
* Whether `input` is a valid SemVer 2.0.0 version string, exactly as
|
|
3255
|
+
* given.
|
|
3256
|
+
*
|
|
3257
|
+
* @remarks
|
|
3258
|
+
* Strict grammar validity — the same grammar as {@link SemVer.parseResult}
|
|
3259
|
+
* — with one deliberate divergence: surrounding whitespace is **rejected**.
|
|
3260
|
+
* `parseResult` trims its input (matching node-semver, whose `SemVer`
|
|
3261
|
+
* constructor trims), so `" 1.2.3"` parses; this predicate answers a
|
|
3262
|
+
* different question — "is this string, byte for byte, a version?" — and a
|
|
3263
|
+
* padded input is the caller's bug to surface, not this package's to hide.
|
|
3264
|
+
* Build metadata is valid grammar (`isValid("1.2.3+build")` is `true`);
|
|
3265
|
+
* reach for {@link SemVer.isPinnable} when the `+` position must stay
|
|
3266
|
+
* free.
|
|
3267
|
+
*
|
|
3268
|
+
* @param input - the candidate version string
|
|
3269
|
+
* @returns `true` when `input` is a valid version string with no
|
|
3270
|
+
* surrounding whitespace.
|
|
3271
|
+
*/
|
|
3272
|
+
static isValid(input) {
|
|
3273
|
+
return input === input.trim() && effect.Result.isSuccess(SemVer.parseResult(input));
|
|
3274
|
+
}
|
|
3275
|
+
/**
|
|
3276
|
+
* Whether `input` is a corepack-pinnable version string: valid by
|
|
3277
|
+
* {@link SemVer.isValid} **and** carrying no build metadata.
|
|
3278
|
+
*
|
|
3279
|
+
* @remarks
|
|
3280
|
+
* The notion the `<name>@<version>[+<integrity>]` pin grammar needs: there
|
|
3281
|
+
* the first `+` after the version always begins the integrity component,
|
|
3282
|
+
* so a version carrying build identifiers would encode to a string that
|
|
3283
|
+
* re-parses differently. Prerelease versions are pinnable; the whitespace
|
|
3284
|
+
* posture is {@link SemVer.isValid}'s.
|
|
3285
|
+
*
|
|
3286
|
+
* @param input - the candidate version string
|
|
3287
|
+
* @returns `true` when `input` is a valid version string with no
|
|
3288
|
+
* surrounding whitespace (the string equals its own trim) and whose
|
|
3289
|
+
* build metadata is empty.
|
|
3290
|
+
*/
|
|
3291
|
+
static isPinnable(input) {
|
|
3292
|
+
if (input !== input.trim()) return false;
|
|
3293
|
+
const parsed = SemVer.parseResult(input);
|
|
3294
|
+
return effect.Result.isSuccess(parsed) && parsed.success.build.length === 0;
|
|
3295
|
+
}
|
|
3296
|
+
/**
|
|
3213
3297
|
* Positional convenience constructor: `SemVer.of(1, 2, 3)`.
|
|
3214
3298
|
*
|
|
3215
3299
|
* @param major - the major version component
|
|
@@ -3312,9 +3396,7 @@ var SemVer = class SemVer extends effect.Schema.Class("SemVer")({
|
|
|
3312
3396
|
case "minor":
|
|
3313
3397
|
key = `${version.major}.${version.minor}`;
|
|
3314
3398
|
break;
|
|
3315
|
-
case "patch":
|
|
3316
|
-
key = `${version.major}.${version.minor}.${version.patch}`;
|
|
3317
|
-
break;
|
|
3399
|
+
case "patch": key = `${version.major}.${version.minor}.${version.patch}`;
|
|
3318
3400
|
}
|
|
3319
3401
|
const group = grouped[key] ?? [];
|
|
3320
3402
|
group.push(version);
|
|
@@ -3512,7 +3594,7 @@ var SemVerBump = class {
|
|
|
3512
3594
|
}
|
|
3513
3595
|
};
|
|
3514
3596
|
//#endregion
|
|
3515
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.
|
|
3597
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/Comparator.js
|
|
3516
3598
|
/**
|
|
3517
3599
|
* Indicates that a string could not be parsed as a single comparator.
|
|
3518
3600
|
*
|
|
@@ -3646,7 +3728,7 @@ var Comparator = class Comparator extends effect.Schema.Class("Comparator")({
|
|
|
3646
3728
|
}
|
|
3647
3729
|
};
|
|
3648
3730
|
//#endregion
|
|
3649
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.
|
|
3731
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/internal/normalize.js
|
|
3650
3732
|
const operatorWeight = (op) => {
|
|
3651
3733
|
switch (op) {
|
|
3652
3734
|
case ">=": return 0;
|
|
@@ -3677,7 +3759,7 @@ const normalizeComparatorSet = (set) => sortComparators(removeDuplicates(set));
|
|
|
3677
3759
|
/** Normalize every comparator set in a range: sort and deduplicate each independently. */
|
|
3678
3760
|
const normalizeSets = (sets) => sets.map(normalizeComparatorSet);
|
|
3679
3761
|
//#endregion
|
|
3680
|
-
//#region ../../node_modules/.pnpm/@effected+semver@0.
|
|
3762
|
+
//#region ../../node_modules/.pnpm/@effected+semver@0.3.0_effect@4.0.0-beta.101/node_modules/@effected/semver/Range.js
|
|
3681
3763
|
/**
|
|
3682
3764
|
* Indicates that a string could not be parsed as a range expression.
|
|
3683
3765
|
*
|
|
@@ -3956,9 +4038,7 @@ const isSetSatisfiable = (set) => {
|
|
|
3956
4038
|
case "<=":
|
|
3957
4039
|
if (cmp > 0) return false;
|
|
3958
4040
|
break;
|
|
3959
|
-
case "=":
|
|
3960
|
-
if (cmp !== 0) return false;
|
|
3961
|
-
break;
|
|
4041
|
+
case "=": if (cmp !== 0) return false;
|
|
3962
4042
|
}
|
|
3963
4043
|
}
|
|
3964
4044
|
for (const lo of lowers) for (const hi of uppers) {
|
|
@@ -3997,9 +4077,7 @@ const isComparatorImplied = (set, comp) => {
|
|
|
3997
4077
|
if (s.operator === "<=" && cmp < 0) return true;
|
|
3998
4078
|
if (s.operator === "=" && cmp < 0) return true;
|
|
3999
4079
|
break;
|
|
4000
|
-
case "=":
|
|
4001
|
-
if (s.operator === "=" && cmp === 0) return true;
|
|
4002
|
-
break;
|
|
4080
|
+
case "=": if (s.operator === "=" && cmp === 0) return true;
|
|
4003
4081
|
}
|
|
4004
4082
|
}
|
|
4005
4083
|
return false;
|
|
@@ -4009,7 +4087,7 @@ const isComparatorSetSubset = (sub, sup) => {
|
|
|
4009
4087
|
return true;
|
|
4010
4088
|
};
|
|
4011
4089
|
//#endregion
|
|
4012
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4090
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/DependencySpecifier.js
|
|
4013
4091
|
/**
|
|
4014
4092
|
* Indicates that a string could not be parsed as a valid dependency specifier.
|
|
4015
4093
|
*
|
|
@@ -4216,9 +4294,9 @@ const DependencySpecifier = Object.assign(brandedSpecifier, {
|
|
|
4216
4294
|
FromString: fromString
|
|
4217
4295
|
});
|
|
4218
4296
|
//#endregion
|
|
4219
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4297
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/IntegrityHash.js
|
|
4220
4298
|
const SRI_RE = /^(sha1|sha256|sha384|sha512)-[A-Za-z0-9+/]+={0,2}$/;
|
|
4221
|
-
const COREPACK_RE = /^(sha1|sha256|sha384|sha512)\.[0-9a-f]+$/;
|
|
4299
|
+
const COREPACK_RE = /^(sha1|sha224|sha256|sha384|sha512)\.[0-9a-f]+$/;
|
|
4222
4300
|
const YARN_RE = /^[0-9]+(c[0-9]+)?\/[0-9a-f]+$/;
|
|
4223
4301
|
const isSri = (value) => SRI_RE.test(value);
|
|
4224
4302
|
const isCorepack = (value) => COREPACK_RE.test(value);
|
|
@@ -4268,6 +4346,58 @@ const IntegrityHash = Object.assign(brandedIntegrity, {
|
|
|
4268
4346
|
algorithmOf,
|
|
4269
4347
|
decode: decode$2
|
|
4270
4348
|
});
|
|
4349
|
+
/**
|
|
4350
|
+
* {@link (IntegrityHash:variable)} narrowed to the corepack `<algo>.<hex>` form
|
|
4351
|
+
* — `sha512.deadbeef`, and corepack's own sha224 default pins
|
|
4352
|
+
* (`sha224.877304e3…`). An SRI (`sha512-<base64>`) or yarn (`10c0/<hex>`)
|
|
4353
|
+
* hash, both valid `IntegrityHash` values, fails this schema.
|
|
4354
|
+
*
|
|
4355
|
+
* @remarks
|
|
4356
|
+
* The corepack pin tail (`<name>@<version>+<integrity>`) is the one place the
|
|
4357
|
+
* kit meets this form, and two schemas name it: `PackageManagerPin.integrity`
|
|
4358
|
+
* here and `@effected/package-json`'s `PackageManager.integrity`. Both consume
|
|
4359
|
+
* **this** schema — the restriction existed privately in each module until they
|
|
4360
|
+
* were consolidated, and a private copy is exactly how the two drift (the
|
|
4361
|
+
* widening that admitted sha224 had to be made twice).
|
|
4362
|
+
*
|
|
4363
|
+
* It decodes to the same {@link IntegrityHashBrand} the unrestricted schema
|
|
4364
|
+
* does, so a corepack-validated value assigns anywhere an `IntegrityHash` is
|
|
4365
|
+
* expected; there is no second brand. Reach for
|
|
4366
|
+
* `IntegrityHash.isCorepack(value)` to ask the same question about a raw
|
|
4367
|
+
* string without decoding.
|
|
4368
|
+
*
|
|
4369
|
+
* That single brand is also why sharing this schema is not type-enforced, and
|
|
4370
|
+
* the consequence is sharper than it looks: a `Schema.check` is **erased from
|
|
4371
|
+
* the built type**, so this schema and the unrestricted one are the same
|
|
4372
|
+
* declared type. A consumer that quietly reverts to a private copy compiles
|
|
4373
|
+
* clean, and — if the copy is faithful — passes every rejection test too.
|
|
4374
|
+
* Neither `tsc` nor behaviour can see the re-fork.
|
|
4375
|
+
*
|
|
4376
|
+
* What does see it is **object identity**, so each consumer's suite asserts
|
|
4377
|
+
* that its field schema IS this export:
|
|
4378
|
+
* `PackageManagerPin.fields.integrity.schema === CorepackIntegrityHash` (an
|
|
4379
|
+
* `optionalKey` field keeps the inner schema on `.schema`), and
|
|
4380
|
+
* `PackageManager.fields.integrity.value === CorepackIntegrityHash` on the
|
|
4381
|
+
* `@effected/package-json` side (a `Schema.Option` keeps it on `.value`). Both
|
|
4382
|
+
* assertions carry a control against the unrestricted brand, so they discriminate
|
|
4383
|
+
* rather than passing on any schema at all. That identity assertion is the only
|
|
4384
|
+
* thing standing between the two surfaces and a silent re-fork; do not replace
|
|
4385
|
+
* it with a behavioural test, which cannot fail.
|
|
4386
|
+
*
|
|
4387
|
+
* @example
|
|
4388
|
+
* ```ts
|
|
4389
|
+
* import { CorepackIntegrityHash } from "@effected/npm";
|
|
4390
|
+
* import { Schema } from "effect";
|
|
4391
|
+
*
|
|
4392
|
+
* const decode = Schema.decodeUnknownExit(CorepackIntegrityHash);
|
|
4393
|
+
*
|
|
4394
|
+
* decode("sha512.deadbeef"); // success
|
|
4395
|
+
* decode("sha512-3q2+7w=="); // failure — SRI form
|
|
4396
|
+
* ```
|
|
4397
|
+
*
|
|
4398
|
+
* @public
|
|
4399
|
+
*/
|
|
4400
|
+
const CorepackIntegrityHash = brandedIntegrity.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
|
|
4271
4401
|
effect.Schema.Literals([
|
|
4272
4402
|
"npm",
|
|
4273
4403
|
"pnpm",
|
|
@@ -4463,7 +4593,7 @@ var LocalExec = class LocalExec extends effect.Context.Service()("@effected/comm
|
|
|
4463
4593
|
static layerTest = (overrides = {}) => effect.Layer.succeed(LocalExec, LocalExec.makeTest(overrides));
|
|
4464
4594
|
};
|
|
4465
4595
|
//#endregion
|
|
4466
|
-
//#region ../../node_modules/.pnpm/@effected+npm@0.
|
|
4596
|
+
//#region ../../node_modules/.pnpm/@effected+npm@0.8.0_@effected+semver@0.3.0_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/npm/ReleaseAgeGate.js
|
|
4467
4597
|
const MS_PER_MINUTE = 6e4;
|
|
4468
4598
|
/**
|
|
4469
4599
|
* A source's partial contribution to a {@link ReleaseAgeGate}: the effective
|
|
@@ -4633,7 +4763,7 @@ var ReleaseAgeGate = class ReleaseAgeGate extends effect.Schema.Class("ReleaseAg
|
|
|
4633
4763
|
}
|
|
4634
4764
|
};
|
|
4635
4765
|
//#endregion
|
|
4636
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4766
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/ImporterDependency.js
|
|
4637
4767
|
/**
|
|
4638
4768
|
* One declared dependency of one workspace importer, as the lockfile records it.
|
|
4639
4769
|
*
|
|
@@ -4671,7 +4801,7 @@ var ImporterDependency = class extends effect.Schema.Class("ImporterDependency")
|
|
|
4671
4801
|
depType: DependencyField
|
|
4672
4802
|
}) {};
|
|
4673
4803
|
//#endregion
|
|
4674
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4804
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/LockfileImporter.js
|
|
4675
4805
|
/**
|
|
4676
4806
|
* One workspace importer's declared dependencies, as the lockfile records them.
|
|
4677
4807
|
*
|
|
@@ -4695,7 +4825,7 @@ var LockfileImporter = class extends effect.Schema.Class("LockfileImporter")({
|
|
|
4695
4825
|
dependencies: effect.Schema.Array(ImporterDependency)
|
|
4696
4826
|
}) {};
|
|
4697
4827
|
//#endregion
|
|
4698
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4828
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/ResolvedPackage.js
|
|
4699
4829
|
const EMPTY_DEPENDENCIES = {};
|
|
4700
4830
|
/**
|
|
4701
4831
|
* A package resolved from a lockfile.
|
|
@@ -4730,7 +4860,7 @@ var ResolvedPackage = class extends effect.Schema.Class("ResolvedPackage")({
|
|
|
4730
4860
|
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)))
|
|
4731
4861
|
}) {};
|
|
4732
4862
|
//#endregion
|
|
4733
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4863
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/WorkspaceDependency.js
|
|
4734
4864
|
/**
|
|
4735
4865
|
* A directed dependency edge between two workspace packages as recorded in
|
|
4736
4866
|
* the lockfile.
|
|
@@ -4752,7 +4882,7 @@ var WorkspaceDependency = class extends effect.Schema.Class("WorkspaceDependency
|
|
|
4752
4882
|
constraint: effect.Schema.String
|
|
4753
4883
|
}) {};
|
|
4754
4884
|
//#endregion
|
|
4755
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4885
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/PnpmExtension.js
|
|
4756
4886
|
/**
|
|
4757
4887
|
* Extension data specific to pnpm lockfiles, attached to `Lockfile.extension`
|
|
4758
4888
|
* when the format is `"pnpm"`.
|
|
@@ -4777,7 +4907,7 @@ var PnpmExtension = class extends effect.Schema.Class("PnpmExtension")({
|
|
|
4777
4907
|
}))
|
|
4778
4908
|
}) {};
|
|
4779
4909
|
//#endregion
|
|
4780
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4910
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/LockfileFormat.js
|
|
4781
4911
|
/**
|
|
4782
4912
|
* The lockfile formats this package parses: bun's `bun.lock` (JSONC), npm's
|
|
4783
4913
|
* `package-lock.json` (v2/v3 JSON), pnpm's `pnpm-lock.yaml` and yarn Berry's
|
|
@@ -4798,20 +4928,24 @@ const LockfileFormat = effect.Schema.Literals([
|
|
|
4798
4928
|
"yarn"
|
|
4799
4929
|
]);
|
|
4800
4930
|
const FILENAMES = {
|
|
4801
|
-
bun: "bun.lock",
|
|
4802
|
-
npm: "package-lock.json",
|
|
4803
|
-
pnpm: "pnpm-lock.yaml",
|
|
4804
|
-
yarn: "yarn.lock"
|
|
4931
|
+
bun: ["bun.lock", "bun.lockb"],
|
|
4932
|
+
npm: ["package-lock.json", "npm-shrinkwrap.json"],
|
|
4933
|
+
pnpm: ["pnpm-lock.yaml"],
|
|
4934
|
+
yarn: ["yarn.lock"]
|
|
4805
4935
|
};
|
|
4806
4936
|
/**
|
|
4807
4937
|
* The conventional lockfile filename for a format: `"bun.lock"`,
|
|
4808
4938
|
* `"package-lock.json"`, `"pnpm-lock.yaml"` or `"yarn.lock"`.
|
|
4809
4939
|
*
|
|
4940
|
+
* @remarks
|
|
4941
|
+
* The primary name only — the first element of {@link filenamesFor}, which is
|
|
4942
|
+
* what detection that must also see the genuine alternates should use.
|
|
4943
|
+
*
|
|
4810
4944
|
* @public
|
|
4811
4945
|
*/
|
|
4812
|
-
const filenameFor = (format) => FILENAMES[format];
|
|
4946
|
+
const filenameFor = (format) => FILENAMES[format][0];
|
|
4813
4947
|
//#endregion
|
|
4814
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
4948
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/shared.js
|
|
4815
4949
|
/**
|
|
4816
4950
|
* The four dependency sections of a manifest, in a stable order — the shared
|
|
4817
4951
|
* dependency-sections table (v3's `DEP_SECTIONS`). Each entry is both the
|
|
@@ -5226,9 +5360,7 @@ const createScanner$2 = (text, ignoreTrivia = false) => {
|
|
|
5226
5360
|
else tokenError = "InvalidUnicode";
|
|
5227
5361
|
break;
|
|
5228
5362
|
}
|
|
5229
|
-
default:
|
|
5230
|
-
tokenError = "InvalidEscapeCharacter";
|
|
5231
|
-
break;
|
|
5363
|
+
default: tokenError = "InvalidEscapeCharacter";
|
|
5232
5364
|
}
|
|
5233
5365
|
start = pos;
|
|
5234
5366
|
} else if (isLineBreak$1(ch)) {
|
|
@@ -6742,7 +6874,7 @@ var JsoncModifier = class {
|
|
|
6742
6874
|
});
|
|
6743
6875
|
};
|
|
6744
6876
|
//#endregion
|
|
6745
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
6877
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/bun.js
|
|
6746
6878
|
const DepRecord$2 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
6747
6879
|
const BunWorkspaceEntry = effect.Schema.Struct({
|
|
6748
6880
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -6835,7 +6967,7 @@ const toFields$3 = (raw) => effect.Effect.gen(function* () {
|
|
|
6835
6967
|
};
|
|
6836
6968
|
});
|
|
6837
6969
|
//#endregion
|
|
6838
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
6970
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/npm.js
|
|
6839
6971
|
const DepRecord$1 = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
6840
6972
|
const NpmPackageEntry = effect.Schema.Struct({
|
|
6841
6973
|
name: effect.Schema.optionalKey(effect.Schema.String),
|
|
@@ -13757,7 +13889,7 @@ function deepEqualValues(a, b) {
|
|
|
13757
13889
|
return false;
|
|
13758
13890
|
}
|
|
13759
13891
|
//#endregion
|
|
13760
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
13892
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/documents.js
|
|
13761
13893
|
/**
|
|
13762
13894
|
* An empty YAML document composes to `null` (`Yaml.parseAll("")` is `[null]`,
|
|
13763
13895
|
* and the trailing document of an env-only `pnpm-lock.yaml` is `null` too).
|
|
@@ -13827,7 +13959,7 @@ const selectSoleDocument = (content) => effect.Effect.gen(function* () {
|
|
|
13827
13959
|
};
|
|
13828
13960
|
});
|
|
13829
13961
|
//#endregion
|
|
13830
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
13962
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/pnpm.js
|
|
13831
13963
|
const PnpmImporterDeps = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.Struct({
|
|
13832
13964
|
specifier: effect.Schema.String,
|
|
13833
13965
|
version: effect.Schema.String
|
|
@@ -13952,7 +14084,7 @@ const toFields$1 = (raw) => effect.Effect.gen(function* () {
|
|
|
13952
14084
|
};
|
|
13953
14085
|
});
|
|
13954
14086
|
//#endregion
|
|
13955
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
14087
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/internal/yarn.js
|
|
13956
14088
|
const YarnLockfileRaw = effect.Schema.Record(effect.Schema.String, effect.Schema.Unknown);
|
|
13957
14089
|
const DepRecord = effect.Schema.optionalKey(effect.Schema.Record(effect.Schema.String, effect.Schema.String));
|
|
13958
14090
|
const YarnEntry = effect.Schema.Struct({
|
|
@@ -14075,7 +14207,7 @@ const cleanYarnDeps = (deps) => {
|
|
|
14075
14207
|
return Object.fromEntries(Object.entries(deps).map(([name, value]) => [name, value.startsWith("npm:") ? value.slice(4) : value]));
|
|
14076
14208
|
};
|
|
14077
14209
|
//#endregion
|
|
14078
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
14210
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/Lockfile.js
|
|
14079
14211
|
const EMPTY_IMPORTERS = [];
|
|
14080
14212
|
/**
|
|
14081
14213
|
* Failure of `Lockfile.parse`: the given content is not a valid lockfile of
|
|
@@ -14319,7 +14451,7 @@ var Lockfile = class Lockfile extends effect.Schema.Class("Lockfile")({
|
|
|
14319
14451
|
}
|
|
14320
14452
|
};
|
|
14321
14453
|
//#endregion
|
|
14322
|
-
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.
|
|
14454
|
+
//#region ../../node_modules/.pnpm/@effected+lockfiles@0.3.0_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__@effected+npm@0._6d3ff0eb8f85b9388aafe615e49a1bcb/node_modules/@effected/lockfiles/LockfileIntegrity.js
|
|
14323
14455
|
/**
|
|
14324
14456
|
* The minimal manifest shape {@link LockfileIntegrity.compare} checks a
|
|
14325
14457
|
* lockfile against: a package name plus the four optional dependency maps.
|
|
@@ -14435,7 +14567,7 @@ var LockfileIntegrity = class LockfileIntegrity extends effect.Schema.Class("Loc
|
|
|
14435
14567
|
}
|
|
14436
14568
|
};
|
|
14437
14569
|
//#endregion
|
|
14438
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.
|
|
14570
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Dependency.js
|
|
14439
14571
|
/**
|
|
14440
14572
|
* A resolved dependency entry pairing a package name with its version
|
|
14441
14573
|
* specifier and the `kind` of map it came from (`@effected/npm`'s
|
|
@@ -14499,7 +14631,7 @@ var Dependency = class extends effect.Schema.Class("Dependency")({
|
|
|
14499
14631
|
}
|
|
14500
14632
|
};
|
|
14501
14633
|
//#endregion
|
|
14502
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.
|
|
14634
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/DevEngines.js
|
|
14503
14635
|
/**
|
|
14504
14636
|
* A single `devEngines` constraint with a name and optional `version` / `onFail`.
|
|
14505
14637
|
*
|
|
@@ -16054,7 +16186,7 @@ effect.Schema.String.pipe(effect.Schema.decodeTo(SpdxExpressionUnion, effect.Sch
|
|
|
16054
16186
|
encode: (expression) => effect.Effect.succeed(serialize$1(expression))
|
|
16055
16187
|
})));
|
|
16056
16188
|
//#endregion
|
|
16057
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.
|
|
16189
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/License.js
|
|
16058
16190
|
/**
|
|
16059
16191
|
* Indicates that a string is not a valid SPDX license identifier or expression.
|
|
16060
16192
|
*
|
|
@@ -16089,50 +16221,103 @@ const isValidSpdx = (value) => {
|
|
|
16089
16221
|
*/
|
|
16090
16222
|
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"));
|
|
16091
16223
|
//#endregion
|
|
16092
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.
|
|
16093
|
-
const
|
|
16094
|
-
|
|
16095
|
-
* The `packageManager` field only ever carries corepack's `<algo>.<hex>`
|
|
16096
|
-
* integrity form (the `name@version+sha512.<hex>` tail). Restrict the
|
|
16097
|
-
* `@effected/npm` `IntegrityHash` brand — which also admits the SRI and yarn
|
|
16098
|
-
* forms — to just the corepack shape, so an SRI or yarn integrity here fails
|
|
16099
|
-
* typed rather than being accepted into a field that can never legitimately
|
|
16100
|
-
* hold it.
|
|
16101
|
-
*/
|
|
16102
|
-
const CorepackIntegrity = IntegrityHash.pipe(effect.Schema.check(effect.Schema.makeFilter((value) => IntegrityHash.isCorepack(value) ? void 0 : "Expected a corepack (<algo>.<hex>) integrity hash")));
|
|
16224
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageManager.js
|
|
16225
|
+
const PACKAGE_MANAGER_NAME_RE = /^[a-z]+$/;
|
|
16226
|
+
const invalid$1 = (input, message) => effect.Effect.fail(new effect.SchemaIssue.InvalidValue(effect.Option.some(input), { message }));
|
|
16103
16227
|
/**
|
|
16104
16228
|
* A structured `packageManager` value with `name`, `version` and an optional
|
|
16105
16229
|
* `integrity` hash.
|
|
16106
16230
|
*
|
|
16231
|
+
* @remarks
|
|
16232
|
+
* The same `<name>@<version>[+<integrity>]` triple `@effected/npm`'s
|
|
16233
|
+
* `PackageManagerPin` models, in its `package.json` field form. Both share the
|
|
16234
|
+
* strict pieces — the version is `@effected/semver`'s
|
|
16235
|
+
* `SemVer.PinnableVersionString` (decode rules through `SemVer.isPinnable`),
|
|
16236
|
+
* the integrity is npm's `CorepackIntegrityHash` — and
|
|
16237
|
+
* both apply the first-`+`-is-integrity rule. Reach for the pin when
|
|
16238
|
+
* provisioning a package manager; reach for this class when reading or writing
|
|
16239
|
+
* the manifest field.
|
|
16240
|
+
*
|
|
16241
|
+
* **The one deliberate divergence is the name grammar**, and it points this
|
|
16242
|
+
* way: the pin closes the set to the four managers the kit can provision
|
|
16243
|
+
* (`npm | pnpm | yarn | bun`), while this field model accepts any lowercase
|
|
16244
|
+
* name. The evidence:
|
|
16245
|
+
*
|
|
16246
|
+
* - Corepack 0.34.0 (`specUtils.ts`, `parseSpec`) recognises **three** names —
|
|
16247
|
+
* `npm`, `pnpm`, `yarn` — and throws an "unsupported package manager
|
|
16248
|
+
* specification" usage error for any other. Adopting that set here would reject
|
|
16249
|
+
* `bun@1.2.20`, which is real: six published packages in this repo's own
|
|
16250
|
+
* `node_modules` carry exactly that value, and a manifest model that cannot
|
|
16251
|
+
* read them is useless for the job it has.
|
|
16252
|
+
* - Corepack does not treat the set as closed either. `parseSpec` skips the
|
|
16253
|
+
* name check entirely when the spec is a URL, so a custom name is reachable
|
|
16254
|
+
* in corepack's own grammar (behind `COREPACK_ENABLE_UNSAFE_CUSTOM_URLS`).
|
|
16255
|
+
* - npm documents no constraint on this field at all. Its `package.json`
|
|
16256
|
+
* reference constrains only `devEngines.packageManager.name` — a different
|
|
16257
|
+
* field, modeled here by `DevEngine` and out of scope for this class.
|
|
16258
|
+
*
|
|
16259
|
+
* So: field model = manifests as they exist in the wild; pin = the kit's
|
|
16260
|
+
* provisioning vocabulary. A name outside the pin's four is representable here
|
|
16261
|
+
* and simply will not be installable through the pin — which is the honest
|
|
16262
|
+
* relationship between a document model and a provisioning contract.
|
|
16263
|
+
*
|
|
16107
16264
|
* @public
|
|
16108
16265
|
*/
|
|
16109
16266
|
var PackageManager = class PackageManager extends effect.Schema.Class("PackageManager")({
|
|
16110
|
-
/** The package-manager name (e.g. `pnpm`). */
|
|
16267
|
+
/** The package-manager name (e.g. `pnpm`). Any lowercase name — see the class remarks. */
|
|
16111
16268
|
name: effect.Schema.String,
|
|
16112
|
-
/**
|
|
16113
|
-
version
|
|
16114
|
-
|
|
16115
|
-
|
|
16269
|
+
/**
|
|
16270
|
+
* The version (e.g. `10.33.0`): `@effected/semver`'s
|
|
16271
|
+
* `SemVer.PinnableVersionString` — an exact SemVer 2.0.0 version with no
|
|
16272
|
+
* build metadata and no surrounding whitespace. Prerelease versions are
|
|
16273
|
+
* allowed (`10.0.0-rc.1`); ranges, partial versions, dist-tags,
|
|
16274
|
+
* leading-zero components and padded values are not, and a version
|
|
16275
|
+
* carrying build metadata is rejected at construction because the grammar
|
|
16276
|
+
* cannot express it. The shared schema is consumed by identity, not
|
|
16277
|
+
* copied — the suite asserts `fields.version === SemVer.PinnableVersionString`.
|
|
16278
|
+
*/
|
|
16279
|
+
version: SemVer.PinnableVersionString,
|
|
16280
|
+
/**
|
|
16281
|
+
* The optional integrity hash (e.g. `sha512.abc`): `@effected/npm`'s
|
|
16282
|
+
* `CorepackIntegrityHash`, the shared restriction of the `IntegrityHash`
|
|
16283
|
+
* brand to the corepack `<algo>.<hex>` form.
|
|
16284
|
+
*/
|
|
16285
|
+
integrity: effect.Schema.Option(CorepackIntegrityHash)
|
|
16116
16286
|
}) {
|
|
16117
16287
|
/**
|
|
16118
16288
|
* Schema transformation between the `"name@version+integrity"` string and a
|
|
16119
16289
|
* {@link PackageManager}.
|
|
16290
|
+
*
|
|
16291
|
+
* @remarks
|
|
16292
|
+
* Decoding splits on the first `@`, then on the first `+` — which always
|
|
16293
|
+
* begins the integrity, never semver build metadata — and validates each
|
|
16294
|
+
* component: the name against the lowercase grammar, the version through
|
|
16295
|
+
* `@effected/semver`'s strict parse, the integrity through
|
|
16296
|
+
* `CorepackIntegrityHash`. Every failure is a typed decode failure naming
|
|
16297
|
+
* the component that failed. Encoding prints the canonical string, which is
|
|
16298
|
+
* byte-identical to any input this codec accepts.
|
|
16120
16299
|
*/
|
|
16121
16300
|
static FromString = effect.Schema.String.pipe(effect.Schema.decodeTo(effect.Schema.instanceOf(PackageManager), effect.SchemaTransformation.transformOrFail({
|
|
16122
16301
|
decode: (input) => {
|
|
16123
|
-
const
|
|
16124
|
-
if (
|
|
16125
|
-
const
|
|
16126
|
-
if (
|
|
16127
|
-
|
|
16128
|
-
|
|
16302
|
+
const at = input.indexOf("@");
|
|
16303
|
+
if (at === -1) return invalid$1(input, `Invalid packageManager format: "${input}"`);
|
|
16304
|
+
const name = input.slice(0, at);
|
|
16305
|
+
if (!PACKAGE_MANAGER_NAME_RE.test(name)) return invalid$1(input, `Invalid packageManager name: "${name}"`);
|
|
16306
|
+
const rest = input.slice(at + 1);
|
|
16307
|
+
const plus = rest.indexOf("+");
|
|
16308
|
+
const version = plus === -1 ? rest : rest.slice(0, plus);
|
|
16309
|
+
if (!SemVer.isPinnable(version)) return invalid$1(input, `Invalid packageManager version: "${version}"`);
|
|
16310
|
+
if (plus === -1) return effect.Effect.succeed(PackageManager.make({
|
|
16311
|
+
name,
|
|
16312
|
+
version,
|
|
16129
16313
|
integrity: effect.Option.none()
|
|
16130
16314
|
}));
|
|
16131
|
-
const
|
|
16132
|
-
|
|
16315
|
+
const rawIntegrity = rest.slice(plus + 1);
|
|
16316
|
+
const decoded = effect.Schema.decodeUnknownExit(CorepackIntegrityHash)(rawIntegrity);
|
|
16317
|
+
if (effect.Exit.isFailure(decoded)) return invalid$1(input, `Invalid packageManager integrity: "${rawIntegrity}"`);
|
|
16133
16318
|
return effect.Effect.succeed(PackageManager.make({
|
|
16134
|
-
name
|
|
16135
|
-
version
|
|
16319
|
+
name,
|
|
16320
|
+
version,
|
|
16136
16321
|
integrity: effect.Option.some(decoded.value)
|
|
16137
16322
|
}));
|
|
16138
16323
|
},
|
|
@@ -16147,7 +16332,7 @@ var PackageManager = class PackageManager extends effect.Schema.Class("PackageMa
|
|
|
16147
16332
|
}
|
|
16148
16333
|
};
|
|
16149
16334
|
//#endregion
|
|
16150
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.
|
|
16335
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/PackageName.js
|
|
16151
16336
|
/**
|
|
16152
16337
|
* Indicates that a string could not be used as a valid npm package name.
|
|
16153
16338
|
*
|
|
@@ -16205,7 +16390,7 @@ const PackageName = Object.assign(effect.Schema.Union([ScopedPackageName, Unscop
|
|
|
16205
16390
|
isScoped
|
|
16206
16391
|
});
|
|
16207
16392
|
//#endregion
|
|
16208
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.
|
|
16393
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Person.js
|
|
16209
16394
|
const parsePersonString = (input) => {
|
|
16210
16395
|
const emailMatch = input.match(/<([^>]+)>/);
|
|
16211
16396
|
const urlMatch = input.match(/\(([^)]+)\)/);
|
|
@@ -16351,7 +16536,7 @@ var Person = class Person extends effect.Schema.Class("Person")({
|
|
|
16351
16536
|
}
|
|
16352
16537
|
};
|
|
16353
16538
|
//#endregion
|
|
16354
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.
|
|
16539
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Repository.js
|
|
16355
16540
|
/** The shorthand hosts npm resolves without a scheme. */
|
|
16356
16541
|
const SHORTHAND_HOSTS = /* @__PURE__ */ new Map([
|
|
16357
16542
|
["github", "https://github.com"],
|
|
@@ -16526,7 +16711,7 @@ var Bugs = class Bugs extends effect.Schema.Class("Bugs")({
|
|
|
16526
16711
|
})));
|
|
16527
16712
|
};
|
|
16528
16713
|
//#endregion
|
|
16529
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.
|
|
16714
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/internal/format.js
|
|
16530
16715
|
const KEY_INDEX = new Map([
|
|
16531
16716
|
"$schema",
|
|
16532
16717
|
"name",
|
|
@@ -16749,7 +16934,7 @@ const renderJson = (raw, options) => {
|
|
|
16749
16934
|
return options.newline ? `${json}\n` : json;
|
|
16750
16935
|
};
|
|
16751
16936
|
//#endregion
|
|
16752
|
-
//#region ../../node_modules/.pnpm/@effected+package-json@0.
|
|
16937
|
+
//#region ../../node_modules/.pnpm/@effected+package-json@0.7.1_effect@4.0.0-beta.101/node_modules/@effected/package-json/Package.js
|
|
16753
16938
|
const toHashMap = effect.SchemaTransformation.transform({
|
|
16754
16939
|
decode: (record) => effect.HashMap.fromIterable(Object.entries(record)),
|
|
16755
16940
|
encode: (map) => Object.fromEntries(effect.HashMap.toEntries(map))
|
|
@@ -17060,11 +17245,12 @@ var Package = class Package extends effect.Schema.Class("Package")({
|
|
|
17060
17245
|
* sorting and empty-map stripping unless the options opt out. Pure.
|
|
17061
17246
|
*/
|
|
17062
17247
|
toJsonString(options) {
|
|
17063
|
-
|
|
17248
|
+
const raw = effect.Schema.encodeUnknownSync(Package.schema)(this);
|
|
17249
|
+
return renderJson(raw, resolveFormatOptions(options));
|
|
17064
17250
|
}
|
|
17065
17251
|
};
|
|
17066
17252
|
//#endregion
|
|
17067
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
17253
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspacePackage.js
|
|
17068
17254
|
const EMPTY$1 = Object.freeze(Object.create(null));
|
|
17069
17255
|
const EMPTY_MANIFEST = Object.freeze(Object.create(null));
|
|
17070
17256
|
/**
|
|
@@ -17662,7 +17848,7 @@ var Walker$1 = class {
|
|
|
17662
17848
|
static findRoot = findRoot$1;
|
|
17663
17849
|
};
|
|
17664
17850
|
//#endregion
|
|
17665
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
17851
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceRoot.js
|
|
17666
17852
|
/**
|
|
17667
17853
|
* The marker filenames {@link WorkspaceRoot} probes for, in priority order.
|
|
17668
17854
|
*
|
|
@@ -17849,7 +18035,7 @@ var WorkspaceRoot = class WorkspaceRoot extends effect.Context.Service()("@effec
|
|
|
17849
18035
|
static layerTest = (root) => effect.Layer.effect(WorkspaceRoot, WorkspaceRoot.makeTest(root)).pipe(effect.Layer.provide(effect.Path.layer));
|
|
17850
18036
|
};
|
|
17851
18037
|
//#endregion
|
|
17852
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
18038
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/limits.js
|
|
17853
18039
|
/**
|
|
17854
18040
|
* Hard ceiling on directories the enumerator will visit for one pattern set.
|
|
17855
18041
|
* Guards the pathological case a depth cap alone does not: a wide, shallow
|
|
@@ -17867,7 +18053,7 @@ const MAX_ENUMERATION_ENTRIES = 1e5;
|
|
|
17867
18053
|
*/
|
|
17868
18054
|
const PRUNED_DIRECTORIES = /* @__PURE__ */ new Set([".git", "node_modules"]);
|
|
17869
18055
|
//#endregion
|
|
17870
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
18056
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/traverse.js
|
|
17871
18057
|
/** Directory names never descended into. */
|
|
17872
18058
|
const isPruned = (entry) => PRUNED_DIRECTORIES.has(entry);
|
|
17873
18059
|
/** Join root-relative POSIX segments; `""` is the root itself. */
|
|
@@ -17957,7 +18143,7 @@ var Traversal = class {
|
|
|
17957
18143
|
}
|
|
17958
18144
|
};
|
|
17959
18145
|
//#endregion
|
|
17960
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
18146
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/enumerate.js
|
|
17961
18147
|
/** Strip a trailing slash from `GlobPattern.enumerationPrefix` to get a relative directory. */
|
|
17962
18148
|
const baseOf = (pattern) => pattern.enumerationPrefix.replace(/\/$/, "");
|
|
17963
18149
|
/**
|
|
@@ -18027,7 +18213,7 @@ const enumerate = (root, globs, options) => effect.Effect.gen(function* () {
|
|
|
18027
18213
|
return results;
|
|
18028
18214
|
});
|
|
18029
18215
|
//#endregion
|
|
18030
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
18216
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/patterns.js
|
|
18031
18217
|
const stringsOf = (value) => Array.isArray(value) ? value.filter((entry) => typeof entry === "string") : void 0;
|
|
18032
18218
|
/** The `packages:` list of a `pnpm-workspace.yaml` document. Total on a parsed document. */
|
|
18033
18219
|
const pnpmPatternsOf = (document) => {
|
|
@@ -18084,7 +18270,7 @@ const readPatterns = (root) => effect.Effect.gen(function* () {
|
|
|
18084
18270
|
return manifestPatternsOf(manifest);
|
|
18085
18271
|
});
|
|
18086
18272
|
//#endregion
|
|
18087
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
18273
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceDiscovery.js
|
|
18088
18274
|
/**
|
|
18089
18275
|
* Raised when a workspace member's `package.json` cannot be read, parsed, or
|
|
18090
18276
|
* used — it is missing, malformed, or lacks a `name` or `version`.
|
|
@@ -18285,12 +18471,13 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
|
|
|
18285
18471
|
kind: failure.kind,
|
|
18286
18472
|
cause: failure.cause
|
|
18287
18473
|
})));
|
|
18288
|
-
const
|
|
18474
|
+
const globs = yield* GlobSet.compile(patterns).pipe(effect.Effect.mapError((error) => new WorkspacePatternError({
|
|
18289
18475
|
root,
|
|
18290
18476
|
pattern: error.pattern,
|
|
18291
18477
|
kind: "uncompilable",
|
|
18292
18478
|
detail: error.message
|
|
18293
|
-
})))
|
|
18479
|
+
})));
|
|
18480
|
+
const directories = yield* enumerate(root, globs, { maxDepth: options?.maxDepth ?? 32 }).pipe(effect.Effect.mapError((failure) => new WorkspacePatternError({
|
|
18294
18481
|
root,
|
|
18295
18482
|
pattern: failure.pattern,
|
|
18296
18483
|
kind: patternKindOf(failure.kind),
|
|
@@ -18521,7 +18708,7 @@ var WorkspaceDiscovery = class WorkspaceDiscovery extends effect.Context.Service
|
|
|
18521
18708
|
};
|
|
18522
18709
|
const isStringRecord$2 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) && Object.values(value).every((entry) => typeof entry === "string");
|
|
18523
18710
|
//#endregion
|
|
18524
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
18711
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/DependencyGraph.js
|
|
18525
18712
|
/**
|
|
18526
18713
|
* Raised when the workspace dependency graph cannot be topologically ordered
|
|
18527
18714
|
* because it contains a cycle.
|
|
@@ -18666,10 +18853,9 @@ packages: effect.Schema.Array(WorkspacePackage) }) {
|
|
|
18666
18853
|
const { reverse } = this.#index();
|
|
18667
18854
|
const affected = /* @__PURE__ */ new Set();
|
|
18668
18855
|
const queue = [...names];
|
|
18669
|
-
|
|
18670
|
-
const current = queue
|
|
18671
|
-
|
|
18672
|
-
if (current === void 0) break;
|
|
18856
|
+
for (let head = 0; head < queue.length; head += 1) {
|
|
18857
|
+
const current = queue[head];
|
|
18858
|
+
if (current === void 0) continue;
|
|
18673
18859
|
if (affected.has(current)) continue;
|
|
18674
18860
|
affected.add(current);
|
|
18675
18861
|
for (const dependent of reverse.get(current) ?? []) if (!affected.has(dependent)) queue.push(dependent);
|
|
@@ -18700,10 +18886,9 @@ packages: effect.Schema.Array(WorkspacePackage) }) {
|
|
|
18700
18886
|
}));
|
|
18701
18887
|
const needed = /* @__PURE__ */ new Set();
|
|
18702
18888
|
const queue = [...names];
|
|
18703
|
-
|
|
18704
|
-
const current = queue
|
|
18705
|
-
|
|
18706
|
-
if (current === void 0) break;
|
|
18889
|
+
for (let head = 0; head < queue.length; head += 1) {
|
|
18890
|
+
const current = queue[head];
|
|
18891
|
+
if (current === void 0) continue;
|
|
18707
18892
|
if (needed.has(current)) continue;
|
|
18708
18893
|
needed.add(current);
|
|
18709
18894
|
for (const dependency of forward.get(current) ?? []) if (!needed.has(dependency)) queue.push(dependency);
|
|
@@ -20165,7 +20350,7 @@ var Git = class Git extends effect.Context.Service()("@effected/git/Git") {
|
|
|
20165
20350
|
static layerTest = (overrides = {}) => effect.Layer.succeed(Git, Git.makeTest(overrides));
|
|
20166
20351
|
};
|
|
20167
20352
|
//#endregion
|
|
20168
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
20353
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ChangeDetector.js
|
|
20169
20354
|
/**
|
|
20170
20355
|
* Which git refs to compare, and whether to fold in the working tree.
|
|
20171
20356
|
*
|
|
@@ -20417,7 +20602,7 @@ function resolveFromCatalog(catalogs, wantedDependency) {
|
|
|
20417
20602
|
};
|
|
20418
20603
|
}
|
|
20419
20604
|
//#endregion
|
|
20420
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
20605
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/catalogs.js
|
|
20421
20606
|
/** Project a pnpm-workspace manifest's `catalog` / `catalogs` fields into a `Catalogs` map. */
|
|
20422
20607
|
const inlineCatalogs = (manifest) => {
|
|
20423
20608
|
if (manifest.catalog === void 0 && manifest.catalogs === void 0) return {};
|
|
@@ -20435,7 +20620,7 @@ const merge = (...sources) => mergeCatalogs(...sources);
|
|
|
20435
20620
|
/** Whether `specifier` is a `catalog:` protocol reference, and which catalog it names. */
|
|
20436
20621
|
const catalogNameOf = (specifier) => parseCatalogProtocol(specifier);
|
|
20437
20622
|
/** Normalize the arbitrary shape of a catalog map into `CatalogEntries`, dropping anything unusable. */
|
|
20438
|
-
const normalize$
|
|
20623
|
+
const normalize$2 = (raw) => {
|
|
20439
20624
|
if (raw === null || typeof raw !== "object") return {};
|
|
20440
20625
|
const entries = {};
|
|
20441
20626
|
for (const [catalogName, catalog] of Object.entries(raw)) {
|
|
@@ -20481,7 +20666,7 @@ const rangeOf = (catalogs, dependency, specifier) => {
|
|
|
20481
20666
|
});
|
|
20482
20667
|
};
|
|
20483
20668
|
//#endregion
|
|
20484
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
20669
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/ConfigDependencyHooks.js
|
|
20485
20670
|
/** Whether `value` is a non-null, non-array object. */
|
|
20486
20671
|
const isObject$2 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
20487
20672
|
/**
|
|
@@ -20562,7 +20747,7 @@ const configToEntries = (config) => {
|
|
|
20562
20747
|
...isObject$2(raw.default) ? raw.default : {},
|
|
20563
20748
|
...config.catalog
|
|
20564
20749
|
};
|
|
20565
|
-
return normalize$
|
|
20750
|
+
return normalize$2(raw);
|
|
20566
20751
|
};
|
|
20567
20752
|
/** Locate the `updateConfig` hook across the CJS/ESM export shapes a `pnpmfile.cjs` can present. */
|
|
20568
20753
|
const updateConfigOf = (mod) => {
|
|
@@ -20630,7 +20815,8 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
20630
20815
|
let loaded;
|
|
20631
20816
|
let found = false;
|
|
20632
20817
|
for (const filename of ["pnpmfile.mjs", "pnpmfile.cjs"]) {
|
|
20633
|
-
const
|
|
20818
|
+
const candidatePath = (0, node_path.join)(root, "node_modules", ".pnpm-config", name, filename);
|
|
20819
|
+
const candidateUrl = (0, node_url.pathToFileURL)(candidatePath).href;
|
|
20634
20820
|
const result = yield* effect.Effect.result(effect.Effect.tryPromise({
|
|
20635
20821
|
try: () => import(candidateUrl),
|
|
20636
20822
|
catch: (cause) => cause
|
|
@@ -20667,7 +20853,7 @@ var ConfigDependencyHooks = class ConfigDependencyHooks extends effect.Context.S
|
|
|
20667
20853
|
}) });
|
|
20668
20854
|
};
|
|
20669
20855
|
//#endregion
|
|
20670
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
20856
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/PackageManagerName.js
|
|
20671
20857
|
/**
|
|
20672
20858
|
* The four package managers this package understands.
|
|
20673
20859
|
*
|
|
@@ -20995,7 +21181,7 @@ var PackageManagerDetector = class PackageManagerDetector extends effect.Context
|
|
|
20995
21181
|
static layerTest = (overrides = {}) => effect.Layer.succeed(PackageManagerDetector, PackageManagerDetector.makeTest(overrides));
|
|
20996
21182
|
};
|
|
20997
21183
|
//#endregion
|
|
20998
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
21184
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/LockfileReader.js
|
|
20999
21185
|
/**
|
|
21000
21186
|
* Raised when the workspace's lockfile cannot be read off disk.
|
|
21001
21187
|
*
|
|
@@ -21175,7 +21361,7 @@ var LockfileReader = class LockfileReader extends effect.Context.Service()("@eff
|
|
|
21175
21361
|
static layerTest = (overrides = {}) => effect.Layer.succeed(LockfileReader, LockfileReader.makeTest(overrides));
|
|
21176
21362
|
};
|
|
21177
21363
|
//#endregion
|
|
21178
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
21364
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Publishability.js
|
|
21179
21365
|
/** The public npm registry, used when `publishConfig.registry` says nothing. */
|
|
21180
21366
|
const DEFAULT_REGISTRY = "https://registry.npmjs.org/";
|
|
21181
21367
|
/**
|
|
@@ -21334,7 +21520,7 @@ var PublishabilityDetector = class extends effect.Context.Service()("@effected/w
|
|
|
21334
21520
|
static layerNone = effect.Layer.succeed(this, this.none);
|
|
21335
21521
|
};
|
|
21336
21522
|
//#endregion
|
|
21337
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
21523
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/internal/importerVersions.js
|
|
21338
21524
|
/**
|
|
21339
21525
|
* Strip pnpm's peer-disambiguation suffix from a recorded importer version.
|
|
21340
21526
|
*
|
|
@@ -21420,7 +21606,7 @@ const unanimousVersionOf = (index, dependency) => {
|
|
|
21420
21606
|
return agreed;
|
|
21421
21607
|
};
|
|
21422
21608
|
//#endregion
|
|
21423
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
21609
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceCatalogs.js
|
|
21424
21610
|
/**
|
|
21425
21611
|
* An immutable, fully-normalized catalog collection — the one catalog
|
|
21426
21612
|
* resolution semantic in the package.
|
|
@@ -21443,7 +21629,7 @@ entries: effect.Schema.Record(effect.Schema.String, effect.Schema.Record(effect.
|
|
|
21443
21629
|
}
|
|
21444
21630
|
/** Wrap a pnpm `Catalogs` map, dropping unusable entries. */
|
|
21445
21631
|
static fromCatalogs(catalogs) {
|
|
21446
|
-
return CatalogSet.make({ entries: normalize$
|
|
21632
|
+
return CatalogSet.make({ entries: normalize$2(catalogs) });
|
|
21447
21633
|
}
|
|
21448
21634
|
/**
|
|
21449
21635
|
* The `catalog:` and `catalogs:` blocks of a `pnpm-workspace.yaml` document.
|
|
@@ -21463,7 +21649,7 @@ entries: effect.Schema.Record(effect.Schema.String, effect.Schema.Record(effect.
|
|
|
21463
21649
|
* range or a `{ specifier, version }` pair.
|
|
21464
21650
|
*/
|
|
21465
21651
|
static fromLockfileCatalogs(raw) {
|
|
21466
|
-
return CatalogSet.make({ entries: normalize$
|
|
21652
|
+
return CatalogSet.make({ entries: normalize$2(raw) });
|
|
21467
21653
|
}
|
|
21468
21654
|
/**
|
|
21469
21655
|
* The catalog set a parsed lockfile records, PM-aware.
|
|
@@ -21929,7 +22115,7 @@ var WorkspaceCatalogs = class WorkspaceCatalogs extends effect.Context.Service()
|
|
|
21929
22115
|
}));
|
|
21930
22116
|
};
|
|
21931
22117
|
//#endregion
|
|
21932
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
22118
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceStateSnapshot.js
|
|
21933
22119
|
const EMPTY = Object.freeze(Object.create(null));
|
|
21934
22120
|
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)));
|
|
21935
22121
|
/**
|
|
@@ -22152,7 +22338,7 @@ var WorkspaceStateSnapshot = class extends effect.Schema.Class("WorkspaceStateSn
|
|
|
22152
22338
|
}
|
|
22153
22339
|
};
|
|
22154
22340
|
//#endregion
|
|
22155
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
22341
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/WorkspaceSnapshots.js
|
|
22156
22342
|
/** Whether `value` is a non-null, non-array object. */
|
|
22157
22343
|
const isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22158
22344
|
/** Whether every value in a record is a string — a usable dependency map. */
|
|
@@ -22268,11 +22454,12 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
22268
22454
|
let inline;
|
|
22269
22455
|
let recorded;
|
|
22270
22456
|
if (effect.Option.isSome(pnpmWorkspaceText)) {
|
|
22271
|
-
const
|
|
22457
|
+
const document = yield* Yaml.parse(pnpmWorkspaceText.value).pipe(effect.Effect.mapError((cause) => new CatalogAssemblyError({
|
|
22272
22458
|
source: "manifest",
|
|
22273
22459
|
path: "pnpm-workspace.yaml",
|
|
22274
22460
|
cause
|
|
22275
|
-
})))
|
|
22461
|
+
})));
|
|
22462
|
+
const pnpmPatterns = pnpmPatternsOf(document);
|
|
22276
22463
|
patterns = pnpmPatterns.length > 0 ? pnpmPatterns : manifestPatternsOf(rootManifest);
|
|
22277
22464
|
inline = yield* CatalogSet.fromWorkspaceYaml(pnpmWorkspaceText.value);
|
|
22278
22465
|
recorded = yield* lockfileRecord(root, ref, "pnpm");
|
|
@@ -22428,7 +22615,7 @@ var WorkspaceSnapshots = class WorkspaceSnapshots extends effect.Context.Service
|
|
|
22428
22615
|
static layerTest = (overrides = {}) => effect.Layer.succeed(WorkspaceSnapshots, WorkspaceSnapshots.makeTest(overrides));
|
|
22429
22616
|
};
|
|
22430
22617
|
//#endregion
|
|
22431
|
-
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.
|
|
22618
|
+
//#region ../../node_modules/.pnpm/@effected+workspaces@0.9.3_@effected+jsonc@0.5.1_effect@4.0.0-beta.101__effect@4.0.0-beta.101/node_modules/@effected/workspaces/Workspaces.js
|
|
22432
22619
|
const compose = (options, catalogsFactory) => {
|
|
22433
22620
|
const roots = WorkspaceRoot.layer;
|
|
22434
22621
|
const detector = PackageManagerDetector.layer;
|
|
@@ -22722,7 +22909,7 @@ const provenanceForRegistry = (registry) => {
|
|
|
22722
22909
|
* @since 0.4.0
|
|
22723
22910
|
* @public
|
|
22724
22911
|
*/
|
|
22725
|
-
var SilkPublishability = class {
|
|
22912
|
+
var SilkPublishability = class SilkPublishability {
|
|
22726
22913
|
/**
|
|
22727
22914
|
* Apply silk publishability rules to a raw `package.json` and the bundler's resolved
|
|
22728
22915
|
* target binding. Targets-first precedence:
|
|
@@ -22854,6 +23041,56 @@ var SilkPublishability = class {
|
|
|
22854
23041
|
return out;
|
|
22855
23042
|
});
|
|
22856
23043
|
}
|
|
23044
|
+
/**
|
|
23045
|
+
* Override of `@effected/workspaces`' `PublishabilityDetector` Tag with pure silk rules.
|
|
23046
|
+
*
|
|
23047
|
+
* @remarks Requires `FileSystem` (captured at layer build); `detect` reads the raw
|
|
23048
|
+
* `package.json` from `pkg.packageJsonPath` and applies `SilkPublishability.detect`.
|
|
23049
|
+
*
|
|
23050
|
+
* @since 0.4.0
|
|
23051
|
+
* @public
|
|
23052
|
+
*/
|
|
23053
|
+
static layer = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
|
|
23054
|
+
const fs = yield* effect.FileSystem.FileSystem;
|
|
23055
|
+
return { detect: (pkg) => effect.Effect.gen(function* () {
|
|
23056
|
+
const raw = yield* readRaw(fs, pkg.packageJsonPath);
|
|
23057
|
+
if (!raw) return [];
|
|
23058
|
+
const binding = yield* readTargetsBinding(fs, pkg.path);
|
|
23059
|
+
return SilkPublishability.detect(pkg.name, raw, binding);
|
|
23060
|
+
}) };
|
|
23061
|
+
}));
|
|
23062
|
+
/**
|
|
23063
|
+
* Ignore-aware override of `PublishabilityDetector`. `detect` short-circuits to `[]`
|
|
23064
|
+
* for changeset-ignored packages, then dispatches on `ChangesetConfig.mode`:
|
|
23065
|
+
* `none` → `[]`; `silk` → `SilkPublishability.detect`; `vanilla` → the library default.
|
|
23066
|
+
*
|
|
23067
|
+
* @remarks Requires `FileSystem` and {@link ChangesetConfig} at build.
|
|
23068
|
+
* The kit's `detect` contract no longer receives the workspace root, so the changeset
|
|
23069
|
+
* lookups read it from `pkg.workspaceRoot` — the discovery root the package was found
|
|
23070
|
+
* against, never a filesystem marker walk, which could escape an unmarked root and read
|
|
23071
|
+
* the wrong `.changeset/config.json`.
|
|
23072
|
+
*
|
|
23073
|
+
* @since 0.4.0
|
|
23074
|
+
* @public
|
|
23075
|
+
*/
|
|
23076
|
+
static layerAdaptive = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
|
|
23077
|
+
const fs = yield* effect.FileSystem.FileSystem;
|
|
23078
|
+
const config = yield* ChangesetConfig;
|
|
23079
|
+
const vanilla = PublishabilityDetector.npm;
|
|
23080
|
+
return { detect: (pkg) => effect.Effect.gen(function* () {
|
|
23081
|
+
const root = pkg.workspaceRoot;
|
|
23082
|
+
if (yield* config.isIgnored(pkg.name, root)) return [];
|
|
23083
|
+
const mode = yield* config.mode(root);
|
|
23084
|
+
if (mode === "none") return [];
|
|
23085
|
+
if (mode === "silk") {
|
|
23086
|
+
const raw = yield* readRaw(fs, pkg.packageJsonPath);
|
|
23087
|
+
if (!raw) return [];
|
|
23088
|
+
const binding = yield* readTargetsBinding(fs, pkg.path);
|
|
23089
|
+
return SilkPublishability.detect(pkg.name, raw, binding);
|
|
23090
|
+
}
|
|
23091
|
+
return yield* vanilla.detect(pkg);
|
|
23092
|
+
}) };
|
|
23093
|
+
}));
|
|
22857
23094
|
};
|
|
22858
23095
|
/**
|
|
22859
23096
|
* Reduce a directory to a comparable package-relative POSIX path: backslashes to
|
|
@@ -22870,7 +23107,8 @@ var SilkPublishability = class {
|
|
|
22870
23107
|
*/
|
|
22871
23108
|
const normalizeDir = (dir) => {
|
|
22872
23109
|
const slashed = dir.replaceAll("\\", "/");
|
|
22873
|
-
const
|
|
23110
|
+
const withoutPrefix = slashed.startsWith("./") ? slashed.slice(2) : slashed;
|
|
23111
|
+
const normalized = trimTrailingSlashes(withoutPrefix);
|
|
22874
23112
|
return normalized === "" ? "." : normalized;
|
|
22875
23113
|
};
|
|
22876
23114
|
/** True when a built target directory's package.json is `private: true`. Missing/unreadable/malformed → false. */
|
|
@@ -22900,47 +23138,6 @@ const readTargetsBinding = (fs, pkgPath) => fs.readFileString((0, node_path.join
|
|
|
22900
23138
|
try: () => JSON.parse(content),
|
|
22901
23139
|
catch: () => /* @__PURE__ */ new Error("invalid targets.json")
|
|
22902
23140
|
})), effect.Effect.orElseSucceed(() => null));
|
|
22903
|
-
effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
|
|
22904
|
-
const fs = yield* effect.FileSystem.FileSystem;
|
|
22905
|
-
return { detect: (pkg) => effect.Effect.gen(function* () {
|
|
22906
|
-
const raw = yield* readRaw(fs, pkg.packageJsonPath);
|
|
22907
|
-
if (!raw) return [];
|
|
22908
|
-
const binding = yield* readTargetsBinding(fs, pkg.path);
|
|
22909
|
-
return SilkPublishability.detect(pkg.name, raw, binding);
|
|
22910
|
-
}) };
|
|
22911
|
-
}));
|
|
22912
|
-
/**
|
|
22913
|
-
* Ignore-aware override of `PublishabilityDetector`. `detect` short-circuits to `[]`
|
|
22914
|
-
* for changeset-ignored packages, then dispatches on `ChangesetConfig.mode`:
|
|
22915
|
-
* `none` → `[]`; `silk` → `SilkPublishability.detect`; `vanilla` → the library default.
|
|
22916
|
-
*
|
|
22917
|
-
* @remarks Requires `FileSystem` and {@link ChangesetConfig} at build.
|
|
22918
|
-
* The kit's `detect` contract no longer receives the workspace root, so the changeset
|
|
22919
|
-
* lookups read it from `pkg.workspaceRoot` — the discovery root the package was found
|
|
22920
|
-
* against, never a filesystem marker walk, which could escape an unmarked root and read
|
|
22921
|
-
* the wrong `.changeset/config.json`.
|
|
22922
|
-
*
|
|
22923
|
-
* @since 0.4.0
|
|
22924
|
-
* @public
|
|
22925
|
-
*/
|
|
22926
|
-
const PublishabilityDetectorAdaptiveLive = effect.Layer.effect(PublishabilityDetector, effect.Effect.gen(function* () {
|
|
22927
|
-
const fs = yield* effect.FileSystem.FileSystem;
|
|
22928
|
-
const config = yield* ChangesetConfig;
|
|
22929
|
-
const vanilla = PublishabilityDetector.npm;
|
|
22930
|
-
return { detect: (pkg) => effect.Effect.gen(function* () {
|
|
22931
|
-
const root = pkg.workspaceRoot;
|
|
22932
|
-
if (yield* config.isIgnored(pkg.name, root)) return [];
|
|
22933
|
-
const mode = yield* config.mode(root);
|
|
22934
|
-
if (mode === "none") return [];
|
|
22935
|
-
if (mode === "silk") {
|
|
22936
|
-
const raw = yield* readRaw(fs, pkg.packageJsonPath);
|
|
22937
|
-
if (!raw) return [];
|
|
22938
|
-
const binding = yield* readTargetsBinding(fs, pkg.path);
|
|
22939
|
-
return SilkPublishability.detect(pkg.name, raw, binding);
|
|
22940
|
-
}
|
|
22941
|
-
return yield* vanilla.detect(pkg);
|
|
22942
|
-
}) };
|
|
22943
|
-
}));
|
|
22944
23141
|
//#endregion
|
|
22945
23142
|
//#region ../silk-effects/dist/dev/pkg/_virtual/_rolldown/runtime.js
|
|
22946
23143
|
var __defProp = Object.defineProperty;
|
|
@@ -24753,21 +24950,20 @@ function getGitHubInfo(params) {
|
|
|
24753
24950
|
/**
|
|
24754
24951
|
* GitHub service for fetching commit metadata.
|
|
24755
24952
|
*
|
|
24756
|
-
* Defines the {@link GitHubService} Effect service tag,
|
|
24757
|
-
*
|
|
24953
|
+
* Defines the {@link GitHubService} Effect service tag, its
|
|
24954
|
+
* `GitHubService.layer` production layer backed by `\@changesets/get-github-info`,
|
|
24758
24955
|
* and the {@link makeGitHubTest} helper for constructing deterministic test
|
|
24759
24956
|
* layers.
|
|
24760
24957
|
*
|
|
24761
24958
|
* @remarks
|
|
24762
24959
|
* The GitHub service is consumed by the changelog formatters to resolve
|
|
24763
24960
|
* commit hashes into pull-request numbers, author usernames, and link URLs.
|
|
24764
|
-
* In production,
|
|
24961
|
+
* In production, `GitHubService.layer` calls the GitHub REST API via the
|
|
24765
24962
|
* vendored `getGitHubInfo` wrapper. In tests, {@link makeGitHubTest}
|
|
24766
24963
|
* returns canned responses from a `Map` keyed by commit hash.
|
|
24767
24964
|
*
|
|
24768
24965
|
* @see {@link GitHubService} for the Effect service tag
|
|
24769
24966
|
* @see {@link GitHubServiceShape} for the service interface
|
|
24770
|
-
* @see {@link GitHubLive} for the production layer
|
|
24771
24967
|
* @see {@link makeGitHubTest} for constructing test layers
|
|
24772
24968
|
*/
|
|
24773
24969
|
/**
|
|
@@ -24781,13 +24977,13 @@ function getGitHubInfo(params) {
|
|
|
24781
24977
|
* This tag follows the standard Effect `Context.Service` pattern. Two layers
|
|
24782
24978
|
* are provided out of the box:
|
|
24783
24979
|
*
|
|
24784
|
-
* -
|
|
24980
|
+
* - `GitHubService.layer` — production layer backed by the GitHub REST API
|
|
24785
24981
|
* - {@link makeGitHubTest} — factory for deterministic test layers
|
|
24786
24982
|
*
|
|
24787
24983
|
* @example
|
|
24788
24984
|
* ```typescript
|
|
24789
|
-
* import { Effect
|
|
24790
|
-
* import { GitHubService
|
|
24985
|
+
* import { Effect } from "effect";
|
|
24986
|
+
* import { GitHubService } from "\@savvy-web/changesets";
|
|
24791
24987
|
*
|
|
24792
24988
|
* const program = Effect.gen(function* () {
|
|
24793
24989
|
* const github = yield* GitHubService;
|
|
@@ -24799,7 +24995,7 @@ function getGitHubInfo(params) {
|
|
|
24799
24995
|
* });
|
|
24800
24996
|
*
|
|
24801
24997
|
* // Provide the live layer and run
|
|
24802
|
-
* Effect.runPromise(program.pipe(Effect.provide(
|
|
24998
|
+
* Effect.runPromise(program.pipe(Effect.provide(GitHubService.layer)));
|
|
24803
24999
|
* ```
|
|
24804
25000
|
*
|
|
24805
25001
|
* @example Creating a test layer with canned responses
|
|
@@ -24823,41 +25019,41 @@ function getGitHubInfo(params) {
|
|
|
24823
25019
|
* ```
|
|
24824
25020
|
*
|
|
24825
25021
|
* @see {@link GitHubServiceShape} for the service interface
|
|
24826
|
-
* @see {@link GitHubLive} for the production layer
|
|
24827
25022
|
* @see {@link makeGitHubTest} for creating test layers
|
|
24828
25023
|
*
|
|
24829
25024
|
* @public
|
|
24830
25025
|
*/
|
|
24831
|
-
var GitHubService = class extends effect.Context.Service()("GitHubService") {
|
|
24832
|
-
/**
|
|
24833
|
-
* Production layer for {@link GitHubService}.
|
|
24834
|
-
*
|
|
24835
|
-
* Delegates to `\@changesets/get-github-info` to fetch commit metadata
|
|
24836
|
-
* from the GitHub REST API. Requires a `GITHUB_TOKEN` environment variable
|
|
24837
|
-
* to be set for authenticated requests.
|
|
24838
|
-
*
|
|
24839
|
-
* @remarks
|
|
24840
|
-
* This layer is used by the `\@savvy-web/changesets/changelog` entry point
|
|
24841
|
-
* to resolve commit hashes into PR numbers and author attribution. It is
|
|
24842
|
-
* used by the changelog formatter's
|
|
24843
|
-
* `MainLayer`.
|
|
24844
|
-
*
|
|
24845
|
-
* @example
|
|
24846
|
-
* ```typescript
|
|
24847
|
-
* import { Effect } from "effect";
|
|
24848
|
-
* import { GitHubService
|
|
24849
|
-
*
|
|
24850
|
-
* const program = Effect.gen(function* () {
|
|
24851
|
-
* const github = yield* GitHubService;
|
|
24852
|
-
* return yield* github.getInfo({ commit: "abc1234", repo: "owner/repo" });
|
|
24853
|
-
* });
|
|
24854
|
-
*
|
|
24855
|
-
* Effect.runPromise(program.pipe(Effect.provide(
|
|
24856
|
-
* ```
|
|
24857
|
-
*
|
|
24858
|
-
* @public
|
|
24859
|
-
*/
|
|
24860
|
-
|
|
25026
|
+
var GitHubService = class extends effect.Context.Service()("GitHubService") {
|
|
25027
|
+
/**
|
|
25028
|
+
* Production layer for {@link GitHubService}.
|
|
25029
|
+
*
|
|
25030
|
+
* Delegates to `\@changesets/get-github-info` to fetch commit metadata
|
|
25031
|
+
* from the GitHub REST API. Requires a `GITHUB_TOKEN` environment variable
|
|
25032
|
+
* to be set for authenticated requests.
|
|
25033
|
+
*
|
|
25034
|
+
* @remarks
|
|
25035
|
+
* This layer is used by the `\@savvy-web/changesets/changelog` entry point
|
|
25036
|
+
* to resolve commit hashes into PR numbers and author attribution. It is
|
|
25037
|
+
* used by the changelog formatter's
|
|
25038
|
+
* `MainLayer`.
|
|
25039
|
+
*
|
|
25040
|
+
* @example
|
|
25041
|
+
* ```typescript
|
|
25042
|
+
* import { Effect } from "effect";
|
|
25043
|
+
* import { GitHubService } from "\@savvy-web/changesets";
|
|
25044
|
+
*
|
|
25045
|
+
* const program = Effect.gen(function* () {
|
|
25046
|
+
* const github = yield* GitHubService;
|
|
25047
|
+
* return yield* github.getInfo({ commit: "abc1234", repo: "owner/repo" });
|
|
25048
|
+
* });
|
|
25049
|
+
*
|
|
25050
|
+
* Effect.runPromise(program.pipe(Effect.provide(GitHubService.layer)));
|
|
25051
|
+
* ```
|
|
25052
|
+
*
|
|
25053
|
+
* @public
|
|
25054
|
+
*/
|
|
25055
|
+
static layer = effect.Layer.succeed(this, { getInfo: getGitHubInfo });
|
|
25056
|
+
};
|
|
24861
25057
|
/**
|
|
24862
25058
|
* Create a test layer for {@link GitHubService} with pre-configured responses.
|
|
24863
25059
|
*
|
|
@@ -35249,7 +35445,9 @@ function factoryLabel(effects, ok, nok, type, markerType, stringType) {
|
|
|
35249
35445
|
* @type {State}
|
|
35250
35446
|
*/
|
|
35251
35447
|
function atBreak(code) {
|
|
35252
|
-
if (size > 999 || code === null || code === 91 || code === 93 && !seen ||
|
|
35448
|
+
if (size > 999 || code === null || code === 91 || code === 93 && !seen ||
|
|
35449
|
+
/* c8 ignore next 3 */
|
|
35450
|
+
code === 94 && !size && "_hiddenFootnoteSupport" in self.parser.constructs) return nok(code);
|
|
35253
35451
|
if (code === 93) {
|
|
35254
35452
|
effects.exit(stringType);
|
|
35255
35453
|
effects.enter(markerType);
|
|
@@ -45828,7 +46026,7 @@ function getReleaseLine(changeset, versionType, options) {
|
|
|
45828
46026
|
* @remarks
|
|
45829
46027
|
* The module composes two Effect programs — {@link getReleaseLine} and
|
|
45830
46028
|
* {@link getDependencyReleaseLine} — and runs each through
|
|
45831
|
-
* `Effect.runPromise` with
|
|
46029
|
+
* `Effect.runPromise` with `GitHubService.layer` (for commit metadata). Options are
|
|
45832
46030
|
* validated at the boundary via `validateChangesetOptions` before being
|
|
45833
46031
|
* passed to the formatters.
|
|
45834
46032
|
*
|
|
@@ -45870,14 +46068,14 @@ function getReleaseLine(changeset, versionType, options) {
|
|
|
45870
46068
|
/**
|
|
45871
46069
|
* The layer providing every service the formatters need.
|
|
45872
46070
|
*
|
|
45873
|
-
*
|
|
46071
|
+
* `GitHubService.layer` satisfies the requirements of both `getReleaseLine` and
|
|
45874
46072
|
* `getDependencyReleaseLine`, which each need only `GitHubService`. Markdown
|
|
45875
46073
|
* parsing is not a layer: the formatters call the remark pipeline's
|
|
45876
46074
|
* `parseMarkdown` / `stringifyMarkdown` functions directly.
|
|
45877
46075
|
*
|
|
45878
46076
|
* @internal
|
|
45879
46077
|
*/
|
|
45880
|
-
const MainLayer =
|
|
46078
|
+
const MainLayer = GitHubService.layer;
|
|
45881
46079
|
/**
|
|
45882
46080
|
* Changesets API `ChangelogFunctions` implementation.
|
|
45883
46081
|
*
|
|
@@ -47340,7 +47538,8 @@ var ChangelogTransformer = class ChangelogTransformer {
|
|
|
47340
47538
|
*/
|
|
47341
47539
|
static transformFile(filePath, options) {
|
|
47342
47540
|
const content = (0, node_fs.readFileSync)(filePath, "utf-8");
|
|
47343
|
-
|
|
47541
|
+
const result = ChangelogTransformer.transformContent(content, options);
|
|
47542
|
+
(0, node_fs.writeFileSync)(filePath, result, "utf-8");
|
|
47344
47543
|
}
|
|
47345
47544
|
};
|
|
47346
47545
|
//#endregion
|
|
@@ -47375,7 +47574,6 @@ var ChangelogTransformer = class ChangelogTransformer {
|
|
|
47375
47574
|
* {@link ConfigInspectorShape.classify} calls reuse it.
|
|
47376
47575
|
*
|
|
47377
47576
|
* @see {@link ConfigInspector} for the Effect service tag
|
|
47378
|
-
* @see {@link ConfigInspectorLive} for the production layer
|
|
47379
47577
|
*
|
|
47380
47578
|
*/
|
|
47381
47579
|
/** A `versionFiles` entry expanded to its absolute target paths. @public */
|
|
@@ -47429,7 +47627,7 @@ const ClassificationSchema = effect.Schema.Struct({
|
|
|
47429
47627
|
* @example
|
|
47430
47628
|
* ```typescript
|
|
47431
47629
|
* import { Effect } from "effect";
|
|
47432
|
-
* import { ConfigInspector
|
|
47630
|
+
* import { ConfigInspector } from "@savvy-web/changesets";
|
|
47433
47631
|
*
|
|
47434
47632
|
* const program = Effect.gen(function* () {
|
|
47435
47633
|
* const inspector = yield* ConfigInspector;
|
|
@@ -47437,12 +47635,24 @@ const ClassificationSchema = effect.Schema.Struct({
|
|
|
47437
47635
|
* return config.packages.map((p) => p.name);
|
|
47438
47636
|
* });
|
|
47439
47637
|
*
|
|
47440
|
-
* Effect.runPromise(program.pipe(Effect.provide(
|
|
47638
|
+
* Effect.runPromise(program.pipe(Effect.provide(ConfigInspector.layer)));
|
|
47441
47639
|
* ```
|
|
47442
47640
|
*
|
|
47443
47641
|
* @public
|
|
47444
47642
|
*/
|
|
47445
|
-
var ConfigInspector = class extends effect.Context.Service()("ConfigInspector") {
|
|
47643
|
+
var ConfigInspector = class extends effect.Context.Service()("ConfigInspector") {
|
|
47644
|
+
/**
|
|
47645
|
+
* Production layer for {@link ConfigInspector}.
|
|
47646
|
+
*
|
|
47647
|
+
* Requires {@link ChangesetConfigReader} and `WorkspaceDiscovery`
|
|
47648
|
+
* in the environment.
|
|
47649
|
+
*
|
|
47650
|
+
* @public
|
|
47651
|
+
*/
|
|
47652
|
+
static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
|
|
47653
|
+
return makeShape$3(yield* ChangesetConfigReader, yield* WorkspaceDiscovery, yield* effect.FileSystem.FileSystem);
|
|
47654
|
+
}));
|
|
47655
|
+
};
|
|
47446
47656
|
/**
|
|
47447
47657
|
* Pull the changelog formatter ID and its options object out of the raw
|
|
47448
47658
|
* `.changeset/config.json` shape (where `changelog` may be a tuple, a string,
|
|
@@ -47836,22 +48046,11 @@ function classifyOne(inspected, path) {
|
|
|
47836
48046
|
};
|
|
47837
48047
|
}
|
|
47838
48048
|
/**
|
|
47839
|
-
* Live layer for {@link ConfigInspector}.
|
|
47840
|
-
*
|
|
47841
|
-
* Requires {@link ChangesetConfigReader} and `WorkspaceDiscovery`
|
|
47842
|
-
* in the environment.
|
|
47843
|
-
*
|
|
47844
|
-
* @public
|
|
47845
|
-
*/
|
|
47846
|
-
const ConfigInspectorLive = effect.Layer.effect(ConfigInspector, effect.Effect.gen(function* () {
|
|
47847
|
-
return makeShape$3(yield* ChangesetConfigReader, yield* WorkspaceDiscovery, yield* effect.FileSystem.FileSystem);
|
|
47848
|
-
}));
|
|
47849
|
-
/**
|
|
47850
48049
|
* Test factory — build a {@link ConfigInspector} that returns a fixed
|
|
47851
48050
|
* {@link InspectedConfig} without touching the filesystem.
|
|
47852
48051
|
*
|
|
47853
48052
|
* Tests that need to exercise the inspect/classify logic against real files
|
|
47854
|
-
* should compose `
|
|
48053
|
+
* should compose `ConfigInspector.layer` with test layers for
|
|
47855
48054
|
* `ChangesetConfigReader` and `WorkspaceDiscovery` instead.
|
|
47856
48055
|
*
|
|
47857
48056
|
* @public
|
|
@@ -47897,7 +48096,7 @@ const BranchAnalysisSchema = effect.Schema.Struct({
|
|
|
47897
48096
|
* @example
|
|
47898
48097
|
* ```typescript
|
|
47899
48098
|
* import { Effect } from "effect";
|
|
47900
|
-
* import { BranchAnalyzer,
|
|
48099
|
+
* import { BranchAnalyzer, ConfigInspector } from "@savvy-web/changesets";
|
|
47901
48100
|
*
|
|
47902
48101
|
* const program = Effect.gen(function* () {
|
|
47903
48102
|
* const analyzer = yield* BranchAnalyzer;
|
|
@@ -47907,16 +48106,30 @@ const BranchAnalysisSchema = effect.Schema.Struct({
|
|
|
47907
48106
|
*
|
|
47908
48107
|
* Effect.runPromise(
|
|
47909
48108
|
* program.pipe(
|
|
47910
|
-
* Effect.provide(
|
|
47911
|
-
* Effect.provide(
|
|
47912
|
-
* // ... +
|
|
48109
|
+
* Effect.provide(BranchAnalyzer.layer),
|
|
48110
|
+
* Effect.provide(ConfigInspector.layer),
|
|
48111
|
+
* // ... + ChangesetConfigReader.layer + kit workspace layers + NodeServices.layer
|
|
47913
48112
|
* ),
|
|
47914
48113
|
* );
|
|
47915
48114
|
* ```
|
|
47916
48115
|
*
|
|
47917
48116
|
* @public
|
|
47918
48117
|
*/
|
|
47919
|
-
var BranchAnalyzer = class extends effect.Context.Service()("BranchAnalyzer") {
|
|
48118
|
+
var BranchAnalyzer = class extends effect.Context.Service()("BranchAnalyzer") {
|
|
48119
|
+
/**
|
|
48120
|
+
* Production layer for {@link BranchAnalyzer}.
|
|
48121
|
+
*
|
|
48122
|
+
* Requires {@link ConfigInspector} (which in turn requires
|
|
48123
|
+
* `ChangesetConfigReader` and `WorkspaceDiscovery`) and a
|
|
48124
|
+
* `ChildProcessSpawner` (satisfied by `NodeServices.layer`) for the
|
|
48125
|
+
* internally-composed `@effected/git` layer.
|
|
48126
|
+
*
|
|
48127
|
+
* @public
|
|
48128
|
+
*/
|
|
48129
|
+
static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
|
|
48130
|
+
return makeShape$2(yield* ConfigInspector, yield* Git);
|
|
48131
|
+
})).pipe(effect.Layer.provide(Git.layer));
|
|
48132
|
+
};
|
|
47920
48133
|
/**
|
|
47921
48134
|
* Fold a `@effected/git` typed failure into this package's {@link GitError},
|
|
47922
48135
|
* preserving the public `ConfigurationError | GitError` error channel.
|
|
@@ -48000,19 +48213,6 @@ function makeShape$2(inspector, git) {
|
|
|
48000
48213
|
return { analyzeBranch };
|
|
48001
48214
|
}
|
|
48002
48215
|
/**
|
|
48003
|
-
* Live layer for {@link BranchAnalyzer}.
|
|
48004
|
-
*
|
|
48005
|
-
* Requires {@link ConfigInspector} (which in turn requires
|
|
48006
|
-
* `ChangesetConfigReader` and `WorkspaceDiscovery`) and a
|
|
48007
|
-
* `ChildProcessSpawner` (satisfied by `NodeServices.layer`) for the
|
|
48008
|
-
* internally-composed `@effected/git` layer.
|
|
48009
|
-
*
|
|
48010
|
-
* @public
|
|
48011
|
-
*/
|
|
48012
|
-
const BranchAnalyzerLive = effect.Layer.effect(BranchAnalyzer, effect.Effect.gen(function* () {
|
|
48013
|
-
return makeShape$2(yield* ConfigInspector, yield* Git);
|
|
48014
|
-
})).pipe(effect.Layer.provide(Git.layer));
|
|
48015
|
-
/**
|
|
48016
48216
|
* Test factory — build a {@link BranchAnalyzer} that returns a fixed
|
|
48017
48217
|
* {@link BranchAnalysis} for any input.
|
|
48018
48218
|
*
|
|
@@ -48040,7 +48240,7 @@ function makeBranchAnalyzerTest(fixed) {
|
|
|
48040
48240
|
* ```typescript
|
|
48041
48241
|
* import { Effect } from "effect";
|
|
48042
48242
|
* import type { ChangesetOptions } from "\@savvy-web/changesets";
|
|
48043
|
-
* import { ChangelogService
|
|
48243
|
+
* import { ChangelogService } from "\@savvy-web/changesets";
|
|
48044
48244
|
*
|
|
48045
48245
|
* const program = Effect.gen(function* () {
|
|
48046
48246
|
* const changelog = yield* ChangelogService;
|
|
@@ -48234,10 +48434,10 @@ function gitListChangesetFilesAtRef(cwd, ref) {
|
|
|
48234
48434
|
*
|
|
48235
48435
|
* @remarks
|
|
48236
48436
|
* Uses the currently-active {@link SilkPublishability} — wire the
|
|
48237
|
-
*
|
|
48437
|
+
* `SilkPublishability.layer` layer to get silk semantics.
|
|
48238
48438
|
*
|
|
48239
48439
|
* The kit's `PublishabilityDetector.detect` contract no longer receives the
|
|
48240
|
-
* workspace root — the ignore/mode-aware `
|
|
48440
|
+
* workspace root — the ignore/mode-aware `SilkPublishability.layerAdaptive`
|
|
48241
48441
|
* derives the `.changeset/config.json` root per package from the package's
|
|
48242
48442
|
* own discovery coordinates (`pkg.path` ascended by `pkg.relativePath`).
|
|
48243
48443
|
* The `root` parameter is retained for signature stability
|
|
@@ -48291,7 +48491,6 @@ function listPublishablePackageNames(packages, _root) {
|
|
|
48291
48491
|
* and MCP tools are thin adapters over this service.
|
|
48292
48492
|
*
|
|
48293
48493
|
* @see {@link DepsRegen} for the service tag
|
|
48294
|
-
* @see {@link DepsRegenLive} for the production layer
|
|
48295
48494
|
*
|
|
48296
48495
|
*/
|
|
48297
48496
|
const ADJECTIVES = [
|
|
@@ -48490,7 +48689,30 @@ function renderChangesetContent(diff) {
|
|
|
48490
48689
|
*
|
|
48491
48690
|
* @public
|
|
48492
48691
|
*/
|
|
48493
|
-
var DepsRegen = class extends effect.Context.Service()("Changesets/DepsRegen") {
|
|
48692
|
+
var DepsRegen = class extends effect.Context.Service()("Changesets/DepsRegen") {
|
|
48693
|
+
/**
|
|
48694
|
+
* Production layer for {@link DepsRegen}.
|
|
48695
|
+
*
|
|
48696
|
+
* Requires `WorkspaceSnapshots`, `WorkspaceDiscovery`,
|
|
48697
|
+
* `PublishabilityDetector` (all from `@effected/workspaces`),
|
|
48698
|
+
* `Git` (from `@effected/git`, backing merge-base resolution),
|
|
48699
|
+
* {@link ConfigInspector}, {@link ChangesetConfig}, and
|
|
48700
|
+
* `FileSystem.FileSystem` (resolved once at construction and closed over by
|
|
48701
|
+
* the shape, keeping `plan`/`execute` themselves requirement-free).
|
|
48702
|
+
*
|
|
48703
|
+
* @public
|
|
48704
|
+
*/
|
|
48705
|
+
static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
|
|
48706
|
+
const snapshots = yield* WorkspaceSnapshots;
|
|
48707
|
+
const inspector = yield* ConfigInspector;
|
|
48708
|
+
const discovery = yield* WorkspaceDiscovery;
|
|
48709
|
+
const detector = yield* PublishabilityDetector;
|
|
48710
|
+
const config = yield* ChangesetConfig;
|
|
48711
|
+
const fs = yield* effect.FileSystem.FileSystem;
|
|
48712
|
+
const git = yield* Git;
|
|
48713
|
+
return makeShape$1(snapshots, inspector, discovery, detector, config, fs, effect.Layer.succeed(Git, git));
|
|
48714
|
+
}));
|
|
48715
|
+
};
|
|
48494
48716
|
/**
|
|
48495
48717
|
* Build a {@link DepsRegenShape} that closes over already-resolved service
|
|
48496
48718
|
* implementations, keeping the public `plan`/`execute` signatures
|
|
@@ -48583,29 +48805,7 @@ function makeShape$1(snapshots, inspector, discovery, detector, config, fs, prov
|
|
|
48583
48805
|
execute
|
|
48584
48806
|
};
|
|
48585
48807
|
}
|
|
48586
|
-
|
|
48587
|
-
* Live layer for {@link DepsRegen}.
|
|
48588
|
-
*
|
|
48589
|
-
* Requires `WorkspaceSnapshots`, `WorkspaceDiscovery`,
|
|
48590
|
-
* `PublishabilityDetector` (all from `@effected/workspaces`),
|
|
48591
|
-
* `Git` (from `@effected/git`, backing merge-base resolution),
|
|
48592
|
-
* {@link ConfigInspector}, {@link ChangesetConfig}, and
|
|
48593
|
-
* `FileSystem.FileSystem` (resolved once at construction and closed over by
|
|
48594
|
-
* the shape, keeping `plan`/`execute` themselves requirement-free).
|
|
48595
|
-
*
|
|
48596
|
-
* @public
|
|
48597
|
-
*/
|
|
48598
|
-
const DepsRegenLive = effect.Layer.effect(DepsRegen, effect.Effect.gen(function* () {
|
|
48599
|
-
const snapshots = yield* WorkspaceSnapshots;
|
|
48600
|
-
const inspector = yield* ConfigInspector;
|
|
48601
|
-
const discovery = yield* WorkspaceDiscovery;
|
|
48602
|
-
const detector = yield* PublishabilityDetector;
|
|
48603
|
-
const config = yield* ChangesetConfig;
|
|
48604
|
-
const fs = yield* effect.FileSystem.FileSystem;
|
|
48605
|
-
const git = yield* Git;
|
|
48606
|
-
return makeShape$1(snapshots, inspector, discovery, detector, config, fs, effect.Layer.succeed(Git, git));
|
|
48607
|
-
}));
|
|
48608
|
-
const ConfigGraph = ChangesetConfigLive.pipe(effect.Layer.provide(ChangesetConfigReaderLive));
|
|
48808
|
+
const ConfigGraph = ChangesetConfig.layer.pipe(effect.Layer.provide(ChangesetConfigReader.layer));
|
|
48609
48809
|
/**
|
|
48610
48810
|
* Build the batteries-included {@link DepsRegen} layer over a
|
|
48611
48811
|
* `@effected/workspaces` kit graph bound to `options.cwd`.
|
|
@@ -48627,7 +48827,7 @@ const ConfigGraph = ChangesetConfigLive.pipe(effect.Layer.provide(ChangesetConfi
|
|
|
48627
48827
|
*/
|
|
48628
48828
|
function makeDepsRegenDefault(options) {
|
|
48629
48829
|
const kitGraph = Workspaces.layerWithGit(options);
|
|
48630
|
-
return
|
|
48830
|
+
return DepsRegen.layer.pipe(effect.Layer.provide(ConfigInspector.layer.pipe(effect.Layer.provide(effect.Layer.mergeAll(ChangesetConfigReader.layer, kitGraph)))), effect.Layer.provide(SilkPublishability.layerAdaptive.pipe(effect.Layer.provide(effect.Layer.mergeAll(ConfigGraph, kitGraph)))), effect.Layer.provide(ConfigGraph), effect.Layer.provide(kitGraph));
|
|
48631
48831
|
}
|
|
48632
48832
|
/**
|
|
48633
48833
|
* Batteries-included {@link DepsRegen} layer: silk's opinionated default
|
|
@@ -48639,10 +48839,10 @@ function makeDepsRegenDefault(options) {
|
|
|
48639
48839
|
* (`NodeServices.layer`), not a bare filesystem-only layer.
|
|
48640
48840
|
*
|
|
48641
48841
|
* Gating uses silk's adaptive publishability detector
|
|
48642
|
-
* (
|
|
48842
|
+
* (`SilkPublishability.layerAdaptive`), so the default semantics
|
|
48643
48843
|
* are "versionable minus ignored" — identical to the savvy CLI and MCP
|
|
48644
48844
|
* runtimes. Consumers who need to swap any dependency (test detectors,
|
|
48645
|
-
* alternate config sources) should keep composing {@link
|
|
48845
|
+
* alternate config sources) should keep composing {@link DepsRegen.layer}
|
|
48646
48846
|
* directly; this layer is purely additive.
|
|
48647
48847
|
*
|
|
48648
48848
|
* @example
|
|
@@ -48831,14 +49031,12 @@ function walkJsonPath(obj, path) {
|
|
|
48831
49031
|
path: [...nodePath, segment.index]
|
|
48832
49032
|
});
|
|
48833
49033
|
break;
|
|
48834
|
-
case "wildcard":
|
|
48835
|
-
|
|
48836
|
-
|
|
48837
|
-
|
|
48838
|
-
path: [...nodePath, index]
|
|
48839
|
-
});
|
|
49034
|
+
case "wildcard": if (Array.isArray(node)) node.forEach((element, index) => {
|
|
49035
|
+
next.push({
|
|
49036
|
+
node: element,
|
|
49037
|
+
path: [...nodePath, index]
|
|
48840
49038
|
});
|
|
48841
|
-
|
|
49039
|
+
});
|
|
48842
49040
|
}
|
|
48843
49041
|
}
|
|
48844
49042
|
current = next;
|
|
@@ -49893,7 +50091,7 @@ var require_constants = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
49893
50091
|
};
|
|
49894
50092
|
module.exports = {
|
|
49895
50093
|
DEFAULT_MAX_EXTGLOB_RECURSION,
|
|
49896
|
-
MAX_LENGTH:
|
|
50094
|
+
MAX_LENGTH: 65536,
|
|
49897
50095
|
POSIX_REGEX_SOURCE: {
|
|
49898
50096
|
__proto__: null,
|
|
49899
50097
|
alnum: "a-zA-Z0-9",
|
|
@@ -51982,7 +52180,7 @@ function formatPaths(paths, mapper) {
|
|
|
51982
52180
|
if (mapper) for (let i = paths.length - 1; i >= 0; i--) paths[i] = mapper(paths[i]);
|
|
51983
52181
|
return paths;
|
|
51984
52182
|
}
|
|
51985
|
-
const defaultOptions = {
|
|
52183
|
+
const defaultOptions$1 = {
|
|
51986
52184
|
caseSensitiveMatch: true,
|
|
51987
52185
|
debug: !!process.env.TINYGLOBBY_DEBUG,
|
|
51988
52186
|
expandDirectories: true,
|
|
@@ -51991,7 +52189,7 @@ const defaultOptions = {
|
|
|
51991
52189
|
};
|
|
51992
52190
|
function getOptions(options) {
|
|
51993
52191
|
const opts = Object.assign({}, options);
|
|
51994
|
-
for (const key in defaultOptions) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions[key] });
|
|
52192
|
+
for (const key in defaultOptions$1) if (opts[key] === void 0) Object.assign(opts, { [key]: defaultOptions$1[key] });
|
|
51995
52193
|
opts.cwd = (opts.cwd instanceof URL ? (0, url.fileURLToPath)(opts.cwd) : (0, path.resolve)(opts.cwd || process.cwd())).replace(BACKSLASHES, "/");
|
|
51996
52194
|
opts.ignore = ensureStringArray(opts.ignore);
|
|
51997
52195
|
opts.fs && (opts.fs = {
|
|
@@ -52309,7 +52507,6 @@ var require_directives = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
52309
52507
|
version: "1.2"
|
|
52310
52508
|
};
|
|
52311
52509
|
this.tags = Object.assign({}, Directives.defaultTags);
|
|
52312
|
-
break;
|
|
52313
52510
|
}
|
|
52314
52511
|
return res;
|
|
52315
52512
|
}
|
|
@@ -53161,7 +53358,7 @@ var require_stringifyString = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
53161
53358
|
}
|
|
53162
53359
|
let blockEndNewlines;
|
|
53163
53360
|
try {
|
|
53164
|
-
blockEndNewlines =
|
|
53361
|
+
blockEndNewlines = new RegExp("(^|(?<!\n))\n+(?!\n|$)", "g");
|
|
53165
53362
|
} catch {
|
|
53166
53363
|
blockEndNewlines = /\n+(?!\n|$)/g;
|
|
53167
53364
|
}
|
|
@@ -54487,9 +54684,7 @@ var require_int = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
54487
54684
|
case 8:
|
|
54488
54685
|
str = `0o${str}`;
|
|
54489
54686
|
break;
|
|
54490
|
-
case 16:
|
|
54491
|
-
str = `0x${str}`;
|
|
54492
|
-
break;
|
|
54687
|
+
case 16: str = `0x${str}`;
|
|
54493
54688
|
}
|
|
54494
54689
|
const n = BigInt(str);
|
|
54495
54690
|
return sign === "-" ? BigInt(-1) * n : n;
|
|
@@ -56018,9 +56213,7 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
56018
56213
|
badChar = `block scalar indicator ${source[0]}`;
|
|
56019
56214
|
break;
|
|
56020
56215
|
case "@":
|
|
56021
|
-
case "`":
|
|
56022
|
-
badChar = `reserved character ${source[0]}`;
|
|
56023
|
-
break;
|
|
56216
|
+
case "`": badChar = `reserved character ${source[0]}`;
|
|
56024
56217
|
}
|
|
56025
56218
|
if (badChar) onError(0, "BAD_SCALAR_START", `Plain value cannot start with ${badChar}`);
|
|
56026
56219
|
return foldLines(source);
|
|
@@ -56039,8 +56232,8 @@ var require_resolve_flow_scalar = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
56039
56232
|
*/
|
|
56040
56233
|
let first, line;
|
|
56041
56234
|
try {
|
|
56042
|
-
first =
|
|
56043
|
-
line =
|
|
56235
|
+
first = new RegExp("(.*?)(?<![ ])[ ]*\r?\n", "sy");
|
|
56236
|
+
line = new RegExp("[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?\n", "sy");
|
|
56044
56237
|
} catch {
|
|
56045
56238
|
first = /(.*?)[ \t]*\r?\n/sy;
|
|
56046
56239
|
line = /[ \t]*(.*?)[ \t]*\r?\n/sy;
|
|
@@ -61944,7 +62137,7 @@ const COMMANDS = {
|
|
|
61944
62137
|
"deno": deno,
|
|
61945
62138
|
"nub": nub
|
|
61946
62139
|
};
|
|
61947
|
-
function resolveCommand(agent, command, args) {
|
|
62140
|
+
function resolveCommand$1(agent, command, args) {
|
|
61948
62141
|
const value = COMMANDS[agent][command];
|
|
61949
62142
|
return constructCommand(value, args);
|
|
61950
62143
|
}
|
|
@@ -62054,18 +62247,16 @@ async function detect$1(options = {}) {
|
|
|
62054
62247
|
if (result) return result;
|
|
62055
62248
|
break;
|
|
62056
62249
|
}
|
|
62057
|
-
case "install-metadata":
|
|
62058
|
-
|
|
62059
|
-
|
|
62060
|
-
|
|
62061
|
-
|
|
62062
|
-
|
|
62063
|
-
|
|
62064
|
-
|
|
62065
|
-
};
|
|
62066
|
-
}
|
|
62250
|
+
case "install-metadata": for (const metadata of Object.keys(INSTALL_METADATA)) {
|
|
62251
|
+
const fileOrDir = metadata.endsWith("/") ? "dir" : "file";
|
|
62252
|
+
if (await pathExists(node_path.join(directory, metadata), fileOrDir)) {
|
|
62253
|
+
const name = INSTALL_METADATA[metadata];
|
|
62254
|
+
return {
|
|
62255
|
+
name,
|
|
62256
|
+
agent: name === "yarn" ? isMetadataYarnClassic(metadata) ? "yarn" : "yarn@berry" : name
|
|
62257
|
+
};
|
|
62067
62258
|
}
|
|
62068
|
-
|
|
62259
|
+
}
|
|
62069
62260
|
}
|
|
62070
62261
|
if (stopDir?.(directory)) break;
|
|
62071
62262
|
}
|
|
@@ -62126,201 +62317,212 @@ function isMetadataYarnClassic(metadataPath) {
|
|
|
62126
62317
|
return metadataPath.endsWith(".yarn_integrity");
|
|
62127
62318
|
}
|
|
62128
62319
|
//#endregion
|
|
62129
|
-
//#region ../../node_modules/.pnpm/tinyexec@1.
|
|
62130
|
-
const
|
|
62131
|
-
const
|
|
62320
|
+
//#region ../../node_modules/.pnpm/tinyexec@1.3.0/node_modules/tinyexec/dist/main.mjs
|
|
62321
|
+
const isPathLikePattern = /^path$/i;
|
|
62322
|
+
const defaultEnvPathInfo = {
|
|
62132
62323
|
key: "PATH",
|
|
62133
62324
|
value: ""
|
|
62134
62325
|
};
|
|
62135
|
-
function
|
|
62136
|
-
for (const
|
|
62137
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
62138
|
-
const
|
|
62139
|
-
if (!
|
|
62326
|
+
function getPathFromEnv(env) {
|
|
62327
|
+
for (const key in env) {
|
|
62328
|
+
if (!Object.prototype.hasOwnProperty.call(env, key) || !isPathLikePattern.test(key)) continue;
|
|
62329
|
+
const value = env[key];
|
|
62330
|
+
if (!value) return defaultEnvPathInfo;
|
|
62140
62331
|
return {
|
|
62141
|
-
key
|
|
62142
|
-
value
|
|
62332
|
+
key,
|
|
62333
|
+
value
|
|
62143
62334
|
};
|
|
62144
62335
|
}
|
|
62145
|
-
return
|
|
62336
|
+
return defaultEnvPathInfo;
|
|
62146
62337
|
}
|
|
62147
|
-
function
|
|
62148
|
-
const
|
|
62149
|
-
const
|
|
62150
|
-
let
|
|
62151
|
-
let
|
|
62338
|
+
function addNodeBinToPath(cwd, path) {
|
|
62339
|
+
const parts = path.value.split(node_path.delimiter);
|
|
62340
|
+
const nodeBinPaths = [];
|
|
62341
|
+
let currentPath = cwd;
|
|
62342
|
+
let lastPath;
|
|
62152
62343
|
do {
|
|
62153
|
-
|
|
62154
|
-
|
|
62155
|
-
|
|
62156
|
-
} while (
|
|
62157
|
-
|
|
62158
|
-
const
|
|
62344
|
+
nodeBinPaths.push((0, node_path.resolve)(currentPath, "node_modules", ".bin"));
|
|
62345
|
+
lastPath = currentPath;
|
|
62346
|
+
currentPath = (0, node_path.dirname)(currentPath);
|
|
62347
|
+
} while (currentPath !== lastPath);
|
|
62348
|
+
nodeBinPaths.push((0, node_path.dirname)(process.execPath));
|
|
62349
|
+
const newPath = nodeBinPaths.concat(parts).join(node_path.delimiter);
|
|
62159
62350
|
return {
|
|
62160
|
-
key:
|
|
62161
|
-
value:
|
|
62351
|
+
key: path.key,
|
|
62352
|
+
value: newPath
|
|
62162
62353
|
};
|
|
62163
62354
|
}
|
|
62164
|
-
function
|
|
62165
|
-
const
|
|
62355
|
+
function computeEnv(cwd, env, nodePath = true) {
|
|
62356
|
+
const envWithDefault = {
|
|
62166
62357
|
...process.env,
|
|
62167
|
-
...
|
|
62358
|
+
...env
|
|
62168
62359
|
};
|
|
62169
|
-
if (!
|
|
62170
|
-
const
|
|
62171
|
-
|
|
62172
|
-
return
|
|
62173
|
-
}
|
|
62174
|
-
const
|
|
62175
|
-
let
|
|
62176
|
-
const
|
|
62177
|
-
const
|
|
62178
|
-
if (--
|
|
62360
|
+
if (!nodePath) return envWithDefault;
|
|
62361
|
+
const envPathInfo = addNodeBinToPath(cwd, getPathFromEnv(envWithDefault));
|
|
62362
|
+
envWithDefault[envPathInfo.key] = envPathInfo.value;
|
|
62363
|
+
return envWithDefault;
|
|
62364
|
+
}
|
|
62365
|
+
const combineStreams = (streams) => {
|
|
62366
|
+
let streamCount = streams.length;
|
|
62367
|
+
const combined = new node_stream.PassThrough();
|
|
62368
|
+
const maybeEmitEnd = () => {
|
|
62369
|
+
if (--streamCount === 0) combined.end();
|
|
62179
62370
|
};
|
|
62180
|
-
for (const
|
|
62181
|
-
return
|
|
62371
|
+
for (const stream of streams) (0, node_stream_promises.pipeline)(stream, combined, { end: false }).then(maybeEmitEnd).catch(maybeEmitEnd);
|
|
62372
|
+
return combined;
|
|
62182
62373
|
};
|
|
62183
|
-
const
|
|
62184
|
-
const
|
|
62185
|
-
const
|
|
62186
|
-
const
|
|
62187
|
-
const
|
|
62188
|
-
const
|
|
62374
|
+
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
62375
|
+
const shebangRegExp = /^#!\s*(.+)/;
|
|
62376
|
+
const isWindowsExecutableRegExp = /\.(?:com|exe)$/i;
|
|
62377
|
+
const isNodeModulesCmdRegExp = /node_modules[\\/]\.bin[\\/][^\\/]+\.cmd$/i;
|
|
62378
|
+
const isWindows = process.platform === "win32";
|
|
62379
|
+
const defaultPathExt = [
|
|
62189
62380
|
".EXE",
|
|
62190
62381
|
".CMD",
|
|
62191
62382
|
".BAT",
|
|
62192
62383
|
".COM"
|
|
62193
62384
|
];
|
|
62385
|
+
const noPathExt = [""];
|
|
62194
62386
|
/**
|
|
62195
62387
|
* Normalizes the command and arguments to work cross-platform.
|
|
62196
62388
|
* On Windows, this basically handles things like shebangs, calling
|
|
62197
62389
|
* `node_modules/.bin` commands, and escaping meta characters.
|
|
62198
62390
|
* On other platforms, it just returns the command and arguments as-is.
|
|
62199
62391
|
*/
|
|
62200
|
-
function
|
|
62201
|
-
if (
|
|
62202
|
-
command
|
|
62203
|
-
args
|
|
62204
|
-
options
|
|
62392
|
+
function normalizeSpawnCommand(command, args = [], options = {}) {
|
|
62393
|
+
if (options.shell === true || !isWindows) return {
|
|
62394
|
+
command,
|
|
62395
|
+
args,
|
|
62396
|
+
options
|
|
62205
62397
|
};
|
|
62206
|
-
let
|
|
62207
|
-
let
|
|
62208
|
-
if (
|
|
62209
|
-
const
|
|
62210
|
-
const
|
|
62211
|
-
let
|
|
62398
|
+
let file = resolveCommand(command, options);
|
|
62399
|
+
let shebang = null;
|
|
62400
|
+
if (file !== null) {
|
|
62401
|
+
const size = 150;
|
|
62402
|
+
const buffer = Buffer.alloc(size);
|
|
62403
|
+
let fd = null;
|
|
62212
62404
|
try {
|
|
62213
|
-
|
|
62214
|
-
(0, node_fs.readSync)(
|
|
62405
|
+
fd = (0, node_fs.openSync)(file, "r");
|
|
62406
|
+
(0, node_fs.readSync)(fd, buffer, 0, size, 0);
|
|
62215
62407
|
} catch {} finally {
|
|
62216
|
-
if (
|
|
62217
|
-
}
|
|
62218
|
-
const
|
|
62219
|
-
if (
|
|
62220
|
-
const
|
|
62221
|
-
const
|
|
62222
|
-
const
|
|
62223
|
-
const
|
|
62224
|
-
const
|
|
62225
|
-
|
|
62226
|
-
}
|
|
62227
|
-
}
|
|
62228
|
-
if (
|
|
62229
|
-
|
|
62230
|
-
|
|
62231
|
-
|
|
62232
|
-
}
|
|
62233
|
-
if (
|
|
62234
|
-
const
|
|
62235
|
-
|
|
62236
|
-
|
|
62237
|
-
|
|
62238
|
-
|
|
62239
|
-
|
|
62240
|
-
|
|
62241
|
-
|
|
62242
|
-
if (
|
|
62243
|
-
return
|
|
62408
|
+
if (fd !== null) (0, node_fs.closeSync)(fd);
|
|
62409
|
+
}
|
|
62410
|
+
const match = buffer.toString().match(shebangRegExp);
|
|
62411
|
+
if (match !== null) {
|
|
62412
|
+
const line = match[1].trim();
|
|
62413
|
+
const separatorIndex = line.indexOf(" ");
|
|
62414
|
+
const path = separatorIndex !== -1 ? line.slice(0, separatorIndex) : line;
|
|
62415
|
+
const argument = separatorIndex !== -1 ? line.slice(separatorIndex + 1) : "";
|
|
62416
|
+
const binary = (0, node_path.basename)(path);
|
|
62417
|
+
shebang = binary === "env" ? argument || null : binary;
|
|
62418
|
+
}
|
|
62419
|
+
}
|
|
62420
|
+
if (shebang !== null && file !== null) {
|
|
62421
|
+
args = [file, ...args];
|
|
62422
|
+
command = shebang;
|
|
62423
|
+
file = resolveCommand(command, options);
|
|
62424
|
+
}
|
|
62425
|
+
if (file === null || !isWindowsExecutableRegExp.test(file)) {
|
|
62426
|
+
const needsDoubleEscapeMetaChars = file !== null && isNodeModulesCmdRegExp.test(file);
|
|
62427
|
+
command = (0, node_path.normalize)(command);
|
|
62428
|
+
command = command.replace(metaCharsRegExp, "^$1");
|
|
62429
|
+
args = args.map((arg) => {
|
|
62430
|
+
arg = arg.replace(/(?=(\\+?)?)\1"/g, "$1$1\\\"");
|
|
62431
|
+
arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1");
|
|
62432
|
+
arg = `"${arg}"`;
|
|
62433
|
+
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
62434
|
+
if (needsDoubleEscapeMetaChars) arg = arg.replace(metaCharsRegExp, "^$1");
|
|
62435
|
+
return arg;
|
|
62244
62436
|
});
|
|
62245
|
-
|
|
62437
|
+
args = [
|
|
62246
62438
|
"/d",
|
|
62247
62439
|
"/s",
|
|
62248
62440
|
"/c",
|
|
62249
|
-
`"${[
|
|
62441
|
+
`"${[command, ...args].join(" ")}"`
|
|
62250
62442
|
];
|
|
62251
|
-
|
|
62252
|
-
|
|
62253
|
-
...
|
|
62443
|
+
command = options.env?.comspec ?? "cmd.exe";
|
|
62444
|
+
options = {
|
|
62445
|
+
...options,
|
|
62254
62446
|
windowsVerbatimArguments: true
|
|
62255
62447
|
};
|
|
62256
62448
|
}
|
|
62257
62449
|
return {
|
|
62258
|
-
command
|
|
62259
|
-
args
|
|
62260
|
-
options
|
|
62450
|
+
command,
|
|
62451
|
+
args,
|
|
62452
|
+
options
|
|
62261
62453
|
};
|
|
62262
62454
|
}
|
|
62263
62455
|
/**
|
|
62264
62456
|
* Resolves the command to an absolute path if possible.
|
|
62265
62457
|
* Handles things like traversing PATH and adding extensions from PATHEXT
|
|
62266
62458
|
*/
|
|
62267
|
-
function
|
|
62268
|
-
const
|
|
62269
|
-
const
|
|
62270
|
-
const
|
|
62271
|
-
const
|
|
62272
|
-
|
|
62273
|
-
if (
|
|
62274
|
-
for (const
|
|
62275
|
-
const
|
|
62276
|
-
for (const
|
|
62277
|
-
const
|
|
62459
|
+
function resolveCommand(command, options) {
|
|
62460
|
+
const cwd$3 = (options.cwd ?? (0, node_process.cwd)()).toString();
|
|
62461
|
+
const env = options.env ?? process.env;
|
|
62462
|
+
const PATH = getPathFromEnv(env).value;
|
|
62463
|
+
const pathEnv = command.includes("/") || command.includes("\\") ? [""] : [cwd$3, ...PATH.split(node_path.delimiter)];
|
|
62464
|
+
let pathExt = env.PATHEXT ? env.PATHEXT.split(node_path.delimiter) : defaultPathExt;
|
|
62465
|
+
if (command.includes(".") && pathExt[0] !== "") pathExt = ["", ...pathExt];
|
|
62466
|
+
for (const extensions of [pathExt, noPathExt]) for (const path of pathEnv) {
|
|
62467
|
+
const dest = (0, node_path.resolve)(cwd$3, path.startsWith("\"") && path.endsWith("\"") && path.length > 1 ? path.slice(1, -1) : path, command);
|
|
62468
|
+
for (const ext of extensions) {
|
|
62469
|
+
const destWithExt = dest + ext;
|
|
62278
62470
|
try {
|
|
62279
|
-
if ((0, node_fs.statSync)(
|
|
62471
|
+
if ((0, node_fs.statSync)(destWithExt).isFile()) return destWithExt;
|
|
62280
62472
|
} catch {}
|
|
62281
62473
|
}
|
|
62282
62474
|
}
|
|
62283
62475
|
return null;
|
|
62284
62476
|
}
|
|
62285
|
-
var
|
|
62477
|
+
var NonZeroExitError = class extends Error {
|
|
62286
62478
|
result;
|
|
62287
62479
|
output;
|
|
62288
|
-
|
|
62289
|
-
|
|
62290
|
-
|
|
62291
|
-
|
|
62292
|
-
|
|
62293
|
-
|
|
62294
|
-
|
|
62480
|
+
exitCode;
|
|
62481
|
+
get signalCode() {
|
|
62482
|
+
return this.result.signalCode;
|
|
62483
|
+
}
|
|
62484
|
+
constructor(result, output, command, args) {
|
|
62485
|
+
let target = "The process";
|
|
62486
|
+
if (command) target = `The command \`${args?.length ? `${command} ${args.map((a) => /[ "'`()]/.test(a) ? JSON.stringify(a) : a).join(" ")}` : command}\``;
|
|
62487
|
+
const exitCode = result.exitCode ?? 1;
|
|
62488
|
+
super(result.signalCode !== null ? `${target} was killed by the signal ${result.signalCode}` : `${target} exited with a non-zero status (${exitCode})`);
|
|
62489
|
+
this.result = result;
|
|
62490
|
+
this.output = output;
|
|
62491
|
+
this.exitCode = exitCode;
|
|
62492
|
+
Object.defineProperty(this, "result", {
|
|
62493
|
+
enumerable: false,
|
|
62494
|
+
writable: false,
|
|
62495
|
+
configurable: false
|
|
62496
|
+
});
|
|
62295
62497
|
}
|
|
62296
62498
|
};
|
|
62297
|
-
const
|
|
62499
|
+
const defaultOptions = {
|
|
62298
62500
|
timeout: void 0,
|
|
62299
62501
|
persist: false
|
|
62300
62502
|
};
|
|
62301
|
-
const
|
|
62302
|
-
function
|
|
62303
|
-
const
|
|
62304
|
-
for (const
|
|
62305
|
-
if (
|
|
62306
|
-
|
|
62307
|
-
return
|
|
62308
|
-
}
|
|
62309
|
-
const
|
|
62310
|
-
|
|
62503
|
+
const defaultNodeOptions = { windowsHide: true };
|
|
62504
|
+
function combineSignals(signals) {
|
|
62505
|
+
const controller = new AbortController();
|
|
62506
|
+
for (const signal of signals) {
|
|
62507
|
+
if (signal.aborted) {
|
|
62508
|
+
controller.abort();
|
|
62509
|
+
return signal;
|
|
62510
|
+
}
|
|
62511
|
+
const onAbort = () => {
|
|
62512
|
+
controller.abort(signal.reason);
|
|
62311
62513
|
};
|
|
62312
|
-
|
|
62514
|
+
signal.addEventListener("abort", onAbort, { signal: controller.signal });
|
|
62313
62515
|
}
|
|
62314
|
-
return
|
|
62516
|
+
return controller.signal;
|
|
62315
62517
|
}
|
|
62316
|
-
async function
|
|
62317
|
-
let
|
|
62518
|
+
async function readStream(stream) {
|
|
62519
|
+
let output = "";
|
|
62318
62520
|
try {
|
|
62319
|
-
for await (const
|
|
62521
|
+
for await (const chunk of stream) output += chunk.toString();
|
|
62320
62522
|
} catch {}
|
|
62321
|
-
return
|
|
62523
|
+
return output;
|
|
62322
62524
|
}
|
|
62323
|
-
var
|
|
62525
|
+
var ExecProcess = class {
|
|
62324
62526
|
_process;
|
|
62325
62527
|
_aborted = false;
|
|
62326
62528
|
_options;
|
|
@@ -62338,19 +62540,22 @@ var I = class {
|
|
|
62338
62540
|
get exitCode() {
|
|
62339
62541
|
if (this._process && this._process.exitCode !== null) return this._process.exitCode;
|
|
62340
62542
|
}
|
|
62341
|
-
|
|
62543
|
+
get signalCode() {
|
|
62544
|
+
return this._process?.signalCode ?? null;
|
|
62545
|
+
}
|
|
62546
|
+
constructor(command, args, options) {
|
|
62342
62547
|
this._options = {
|
|
62343
|
-
...
|
|
62344
|
-
...
|
|
62548
|
+
...defaultOptions,
|
|
62549
|
+
...options
|
|
62345
62550
|
};
|
|
62346
|
-
this._command =
|
|
62347
|
-
this._args =
|
|
62348
|
-
this._processClosed = new Promise((
|
|
62349
|
-
this._resolveClose =
|
|
62551
|
+
this._command = command;
|
|
62552
|
+
this._args = args ?? [];
|
|
62553
|
+
this._processClosed = new Promise((resolve) => {
|
|
62554
|
+
this._resolveClose = resolve;
|
|
62350
62555
|
});
|
|
62351
62556
|
}
|
|
62352
|
-
kill(
|
|
62353
|
-
return this._process?.kill(
|
|
62557
|
+
kill(signal) {
|
|
62558
|
+
return this._process?.kill(signal) === true;
|
|
62354
62559
|
}
|
|
62355
62560
|
get aborted() {
|
|
62356
62561
|
return this._aborted;
|
|
@@ -62358,99 +62563,99 @@ var I = class {
|
|
|
62358
62563
|
get killed() {
|
|
62359
62564
|
return this._process?.killed === true;
|
|
62360
62565
|
}
|
|
62361
|
-
pipe(
|
|
62362
|
-
return
|
|
62363
|
-
...
|
|
62566
|
+
pipe(command, args, options) {
|
|
62567
|
+
return exec(command, args, {
|
|
62568
|
+
...options,
|
|
62364
62569
|
stdin: this
|
|
62365
62570
|
});
|
|
62366
62571
|
}
|
|
62367
62572
|
async *[Symbol.asyncIterator]() {
|
|
62368
|
-
const
|
|
62369
|
-
if (!
|
|
62370
|
-
const
|
|
62371
|
-
if (this._streamErr)
|
|
62372
|
-
if (this._streamOut)
|
|
62373
|
-
const
|
|
62374
|
-
const
|
|
62375
|
-
for await (const
|
|
62573
|
+
const proc = this._process;
|
|
62574
|
+
if (!proc) return;
|
|
62575
|
+
const streams = [];
|
|
62576
|
+
if (this._streamErr) streams.push(this._streamErr);
|
|
62577
|
+
if (this._streamOut) streams.push(this._streamOut);
|
|
62578
|
+
const streamCombined = combineStreams(streams);
|
|
62579
|
+
const rl = node_readline.createInterface({ input: streamCombined });
|
|
62580
|
+
for await (const chunk of rl) yield chunk.toString();
|
|
62376
62581
|
await this._processClosed;
|
|
62377
|
-
|
|
62582
|
+
proc.removeAllListeners();
|
|
62378
62583
|
if (this._thrownError) throw this._thrownError;
|
|
62379
|
-
if (this._options?.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new
|
|
62584
|
+
if (this._options?.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, void 0, this._command, this._args);
|
|
62380
62585
|
}
|
|
62381
62586
|
async _waitForOutput() {
|
|
62382
|
-
const
|
|
62383
|
-
if (!
|
|
62384
|
-
const [
|
|
62587
|
+
const proc = this._process;
|
|
62588
|
+
if (!proc) throw new Error("No process was started");
|
|
62589
|
+
const [stdout, stderr] = await Promise.all([this._streamOut ? readStream(this._streamOut) : "", this._streamErr ? readStream(this._streamErr) : ""]);
|
|
62385
62590
|
await this._processClosed;
|
|
62386
|
-
const { stdin
|
|
62387
|
-
if (
|
|
62388
|
-
|
|
62591
|
+
const { stdin } = this._options;
|
|
62592
|
+
if (stdin && typeof stdin !== "string") await stdin;
|
|
62593
|
+
proc.removeAllListeners();
|
|
62389
62594
|
if (this._thrownError) throw this._thrownError;
|
|
62390
|
-
const
|
|
62391
|
-
stderr
|
|
62392
|
-
stdout
|
|
62595
|
+
const result = {
|
|
62596
|
+
stderr,
|
|
62597
|
+
stdout,
|
|
62393
62598
|
exitCode: this.exitCode
|
|
62394
62599
|
};
|
|
62395
|
-
if (this._options.throwOnError && this.exitCode !== 0 && this.exitCode !== void 0) throw new
|
|
62396
|
-
return
|
|
62600
|
+
if (this._options.throwOnError && (this.exitCode !== 0 && this.exitCode !== void 0 || this.signalCode !== null)) throw new NonZeroExitError(this, result, this._command, this._args);
|
|
62601
|
+
return result;
|
|
62397
62602
|
}
|
|
62398
|
-
then(
|
|
62399
|
-
return this._waitForOutput().then(
|
|
62603
|
+
then(onfulfilled, onrejected) {
|
|
62604
|
+
return this._waitForOutput().then(onfulfilled, onrejected);
|
|
62400
62605
|
}
|
|
62401
62606
|
_streamOut;
|
|
62402
62607
|
_streamErr;
|
|
62403
62608
|
spawn() {
|
|
62404
|
-
const
|
|
62405
|
-
const
|
|
62406
|
-
const
|
|
62407
|
-
...
|
|
62408
|
-
...
|
|
62609
|
+
const cwd$1 = (0, node_process.cwd)();
|
|
62610
|
+
const options = this._options;
|
|
62611
|
+
const nodeOptions = {
|
|
62612
|
+
...defaultNodeOptions,
|
|
62613
|
+
...options.nodeOptions
|
|
62409
62614
|
};
|
|
62410
|
-
const
|
|
62615
|
+
const signals = [];
|
|
62411
62616
|
this._resetState();
|
|
62412
|
-
if (
|
|
62413
|
-
if (
|
|
62414
|
-
if (
|
|
62415
|
-
if (
|
|
62416
|
-
|
|
62417
|
-
const
|
|
62418
|
-
const
|
|
62419
|
-
if (
|
|
62420
|
-
if (
|
|
62421
|
-
this._process =
|
|
62422
|
-
|
|
62423
|
-
|
|
62424
|
-
if (
|
|
62425
|
-
const { stdin
|
|
62426
|
-
if (typeof
|
|
62427
|
-
else
|
|
62617
|
+
if (options.timeout !== void 0) signals.push(AbortSignal.timeout(options.timeout));
|
|
62618
|
+
if (options.signal !== void 0) signals.push(options.signal);
|
|
62619
|
+
if (options.persist === true) nodeOptions.detached = true;
|
|
62620
|
+
if (signals.length > 0) nodeOptions.signal = combineSignals(signals);
|
|
62621
|
+
nodeOptions.env = computeEnv(cwd$1, nodeOptions.env, options.nodePath);
|
|
62622
|
+
const crossResult = normalizeSpawnCommand(this._command, this._args, nodeOptions);
|
|
62623
|
+
const handle = (0, node_child_process.spawn)(crossResult.command, crossResult.args, crossResult.options);
|
|
62624
|
+
if (handle.stderr) this._streamErr = handle.stderr;
|
|
62625
|
+
if (handle.stdout) this._streamOut = handle.stdout;
|
|
62626
|
+
this._process = handle;
|
|
62627
|
+
handle.once("error", this._onError);
|
|
62628
|
+
handle.once("close", this._onClose);
|
|
62629
|
+
if (handle.stdin) {
|
|
62630
|
+
const { stdin } = options;
|
|
62631
|
+
if (typeof stdin === "string") handle.stdin.end(stdin);
|
|
62632
|
+
else stdin?.process?.stdout?.pipe(handle.stdin);
|
|
62428
62633
|
}
|
|
62429
62634
|
}
|
|
62430
62635
|
_resetState() {
|
|
62431
62636
|
this._aborted = false;
|
|
62432
|
-
this._processClosed = new Promise((
|
|
62433
|
-
this._resolveClose =
|
|
62637
|
+
this._processClosed = new Promise((resolve) => {
|
|
62638
|
+
this._resolveClose = resolve;
|
|
62434
62639
|
});
|
|
62435
62640
|
this._thrownError = void 0;
|
|
62436
62641
|
}
|
|
62437
|
-
_onError = (
|
|
62438
|
-
if (
|
|
62642
|
+
_onError = (err) => {
|
|
62643
|
+
if (err.name === "AbortError" && (!(err.cause instanceof Error) || err.cause.name !== "TimeoutError")) {
|
|
62439
62644
|
this._aborted = true;
|
|
62440
62645
|
return;
|
|
62441
62646
|
}
|
|
62442
|
-
this._thrownError =
|
|
62647
|
+
this._thrownError = err;
|
|
62443
62648
|
};
|
|
62444
62649
|
_onClose = () => {
|
|
62445
62650
|
if (this._resolveClose) this._resolveClose();
|
|
62446
62651
|
};
|
|
62447
62652
|
};
|
|
62448
|
-
const
|
|
62449
|
-
const
|
|
62450
|
-
|
|
62451
|
-
return
|
|
62653
|
+
const x = (command, args, userOptions) => {
|
|
62654
|
+
const proc = new ExecProcess(command, args, userOptions);
|
|
62655
|
+
proc.spawn();
|
|
62656
|
+
return proc;
|
|
62452
62657
|
};
|
|
62453
|
-
const
|
|
62658
|
+
const exec = x;
|
|
62454
62659
|
//#endregion
|
|
62455
62660
|
//#region ../../node_modules/.pnpm/@changesets+format@0.1.1/node_modules/@changesets/format/dist/index.js
|
|
62456
62661
|
/**
|
|
@@ -62469,14 +62674,14 @@ function traverseUpwards(startDir, stopDir, cb) {
|
|
|
62469
62674
|
}
|
|
62470
62675
|
}
|
|
62471
62676
|
async function packageManagerExecute(packageManager, args, cwd) {
|
|
62472
|
-
const cmd = resolveCommand(packageManager, "execute-local", args) ?? {
|
|
62677
|
+
const cmd = resolveCommand$1(packageManager, "execute-local", args) ?? {
|
|
62473
62678
|
command: "npx",
|
|
62474
62679
|
args
|
|
62475
62680
|
};
|
|
62476
62681
|
return await spawnProcess(cmd.command, cmd.args, cwd);
|
|
62477
62682
|
}
|
|
62478
62683
|
async function spawnProcess(command, args, cwd) {
|
|
62479
|
-
await
|
|
62684
|
+
await exec(command, args, {
|
|
62480
62685
|
nodeOptions: { cwd },
|
|
62481
62686
|
throwOnError: true
|
|
62482
62687
|
});
|
|
@@ -62666,7 +62871,7 @@ var InternalError = class extends Error {
|
|
|
62666
62871
|
//#endregion
|
|
62667
62872
|
//#region ../../node_modules/.pnpm/@changesets+git@4.0.0-next.8/node_modules/@changesets/git/dist/index.mjs
|
|
62668
62873
|
async function getDivergedCommit(cwd, ref) {
|
|
62669
|
-
const cmd = await
|
|
62874
|
+
const cmd = await exec("git", [
|
|
62670
62875
|
"merge-base",
|
|
62671
62876
|
ref,
|
|
62672
62877
|
"HEAD"
|
|
@@ -62685,7 +62890,7 @@ async function getCommitsThatAddFiles(gitPaths, { cwd, short = false }) {
|
|
|
62685
62890
|
let remaining = gitPaths;
|
|
62686
62891
|
do {
|
|
62687
62892
|
const commitInfos = await Promise.all(remaining.map(async (gitPath) => {
|
|
62688
|
-
const [commitSha, parentSha] = (await
|
|
62893
|
+
const [commitSha, parentSha] = (await exec("git", [
|
|
62689
62894
|
"log",
|
|
62690
62895
|
"--diff-filter=A",
|
|
62691
62896
|
"--max-count=1",
|
|
@@ -62716,9 +62921,9 @@ async function getCommitsThatAddFiles(gitPaths, { cwd, short = false }) {
|
|
|
62716
62921
|
return gitPaths.map((p) => map.get(p));
|
|
62717
62922
|
}
|
|
62718
62923
|
async function isRepoShallow({ cwd }) {
|
|
62719
|
-
const isShallowRepoOutput = (await
|
|
62924
|
+
const isShallowRepoOutput = (await exec("git", ["rev-parse", "--is-shallow-repository"], { nodeOptions: { cwd } })).stdout.toString().trim();
|
|
62720
62925
|
if (isShallowRepoOutput === "--is-shallow-repository") {
|
|
62721
|
-
const gitDir = (await
|
|
62926
|
+
const gitDir = (await exec("git", ["rev-parse", "--git-dir"], { nodeOptions: { cwd } })).stdout.toString().trim();
|
|
62722
62927
|
const fullGitDir = node_path.resolve(cwd, gitDir);
|
|
62723
62928
|
try {
|
|
62724
62929
|
await node_fs_promises.access(node_path.join(fullGitDir, "shallow"));
|
|
@@ -62729,12 +62934,12 @@ async function isRepoShallow({ cwd }) {
|
|
|
62729
62934
|
} else return isShallowRepoOutput === "true";
|
|
62730
62935
|
}
|
|
62731
62936
|
async function deepenCloneBy({ by, cwd }) {
|
|
62732
|
-
const cmd = await
|
|
62937
|
+
const cmd = await exec("git", ["fetch", `--deepen=${by}`], { nodeOptions: { cwd } });
|
|
62733
62938
|
if (cmd.exitCode !== 0) throw new Error(cmd.stderr.toString());
|
|
62734
62939
|
}
|
|
62735
62940
|
async function getChangedChangesetFilesSinceRef({ cwd, ref }) {
|
|
62736
62941
|
try {
|
|
62737
|
-
const cmd = await
|
|
62942
|
+
const cmd = await exec("git", [
|
|
62738
62943
|
"diff",
|
|
62739
62944
|
"--name-only",
|
|
62740
62945
|
"--diff-filter=d",
|
|
@@ -64549,9 +64754,7 @@ function visit(text, visitor, options = ParseOptions.DEFAULT) {
|
|
|
64549
64754
|
case 2:
|
|
64550
64755
|
handleError(12);
|
|
64551
64756
|
break;
|
|
64552
|
-
case 6:
|
|
64553
|
-
handleError(16);
|
|
64554
|
-
break;
|
|
64757
|
+
case 6: handleError(16);
|
|
64555
64758
|
}
|
|
64556
64759
|
switch (token) {
|
|
64557
64760
|
case 12:
|
|
@@ -65663,7 +65866,12 @@ async function loadConfig(root, packages) {
|
|
|
65663
65866
|
};
|
|
65664
65867
|
}
|
|
65665
65868
|
/** Effect service tag for the release planner. @public */
|
|
65666
|
-
var ReleasePlanner = class extends effect.Context.Service()("ReleasePlanner") {
|
|
65869
|
+
var ReleasePlanner = class extends effect.Context.Service()("ReleasePlanner") {
|
|
65870
|
+
/** Production layer. Requires {@link ConfigInspector} (used by `apply`) and `FileSystem`. @public */
|
|
65871
|
+
static layer = effect.Layer.effect(this, effect.Effect.gen(function* () {
|
|
65872
|
+
return makeShape(yield* ConfigInspector, yield* effect.FileSystem.FileSystem);
|
|
65873
|
+
}));
|
|
65874
|
+
};
|
|
65667
65875
|
/** Build the service shape over a resolved {@link ConfigInspector} and {@link FileSystem.FileSystem}. */
|
|
65668
65876
|
function makeShape(inspector, fs) {
|
|
65669
65877
|
const plan = (root) => effect.Effect.tryPromise({
|
|
@@ -65681,10 +65889,6 @@ function makeShape(inspector, fs) {
|
|
|
65681
65889
|
apply
|
|
65682
65890
|
};
|
|
65683
65891
|
}
|
|
65684
|
-
/** Production layer. Requires {@link ConfigInspector} (used by `apply`) and `FileSystem`. @public */
|
|
65685
|
-
const ReleasePlannerLive = effect.Layer.effect(ReleasePlanner, effect.Effect.gen(function* () {
|
|
65686
|
-
return makeShape(yield* ConfigInspector, yield* effect.FileSystem.FileSystem);
|
|
65687
|
-
}));
|
|
65688
65892
|
/**
|
|
65689
65893
|
* Test factory — supply fixed results for any subset of methods. Unsupplied
|
|
65690
65894
|
* methods fail with a `ReleasePlanError`.
|
|
@@ -66802,7 +67006,6 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
|
|
|
66802
67006
|
AppliedReleaseSchema: () => AppliedReleaseSchema,
|
|
66803
67007
|
BranchAnalysisSchema: () => BranchAnalysisSchema,
|
|
66804
67008
|
BranchAnalyzer: () => BranchAnalyzer,
|
|
66805
|
-
BranchAnalyzerLive: () => BranchAnalyzerLive,
|
|
66806
67009
|
BranchFileEntrySchema: () => BranchFileEntrySchema,
|
|
66807
67010
|
BumpTypeSchema: () => BumpTypeSchema,
|
|
66808
67011
|
Categories: () => Categories,
|
|
@@ -66820,7 +67023,6 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
|
|
|
66820
67023
|
ClassificationSchema: () => ClassificationSchema,
|
|
66821
67024
|
CommitHashSchema: () => CommitHashSchema,
|
|
66822
67025
|
ConfigInspector: () => ConfigInspector,
|
|
66823
|
-
ConfigInspectorLive: () => ConfigInspectorLive,
|
|
66824
67026
|
ConfigurationError: () => ConfigurationError,
|
|
66825
67027
|
ContentStructureRule: () => ContentStructureRule$2,
|
|
66826
67028
|
ContributorFootnotesPlugin: () => ContributorFootnotesPlugin,
|
|
@@ -66835,12 +67037,10 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
|
|
|
66835
67037
|
DependencyUpdateSchema: () => DependencyUpdateSchema,
|
|
66836
67038
|
DepsRegen: () => DepsRegen,
|
|
66837
67039
|
DepsRegenDefault: () => DepsRegenDefault,
|
|
66838
|
-
DepsRegenLive: () => DepsRegenLive,
|
|
66839
67040
|
FileStatusSchema: () => FileStatusSchema,
|
|
66840
67041
|
GitError: () => GitError$1,
|
|
66841
67042
|
GitHubApiError: () => GitHubApiError,
|
|
66842
67043
|
GitHubInfoSchema: () => GitHubInfoSchema,
|
|
66843
|
-
GitHubLive: () => GitHubLive,
|
|
66844
67044
|
GitHubService: () => GitHubService,
|
|
66845
67045
|
GlobSchema: () => GlobSchema,
|
|
66846
67046
|
HeadingHierarchyRule: () => HeadingHierarchyRule$2,
|
|
@@ -66869,7 +67069,6 @@ var changesets_exports = /* @__PURE__ */ __exportAll({
|
|
|
66869
67069
|
PreviewReleaseSchema: () => PreviewReleaseSchema,
|
|
66870
67070
|
ReleasePlanError: () => ReleasePlanError,
|
|
66871
67071
|
ReleasePlanner: () => ReleasePlanner,
|
|
66872
|
-
ReleasePlannerLive: () => ReleasePlannerLive,
|
|
66873
67072
|
ReorderSectionsPlugin: () => ReorderSectionsPlugin,
|
|
66874
67073
|
RepoSchema: () => RepoSchema,
|
|
66875
67074
|
RequiredSectionsRule: () => RequiredSectionsRule$2,
|