@ariestools/toolchain 8.7.29 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/actions/analyze.d.ts.map +1 -1
- package/dist/actions/api-exposure/apiExposure.d.ts.map +1 -1
- package/dist/actions/build.d.ts.map +1 -1
- package/dist/actions/clean.d.ts.map +1 -1
- package/dist/actions/compile.d.ts +9 -3
- package/dist/actions/compile.d.ts.map +1 -1
- package/dist/actions/copy-assets.d.ts.map +1 -1
- package/dist/actions/dead/dead.d.ts.map +1 -1
- package/dist/actions/deplint/deplint.d.ts.map +1 -1
- package/dist/actions/deplint/deplintPick.d.ts.map +1 -1
- package/dist/actions/deplint/editXyConfigPackages.d.ts +1 -1
- package/dist/actions/deplint/editXyConfigPackages.d.ts.map +1 -1
- package/dist/actions/deplint/implicitDevDependencies.d.ts.map +1 -1
- package/dist/actions/deplint/packageEditor.d.ts.map +1 -1
- package/dist/actions/fix.d.ts.map +1 -1
- package/dist/actions/license.d.ts.map +1 -1
- package/dist/actions/lint-config.d.ts +1 -1
- package/dist/actions/lint-config.d.ts.map +1 -1
- package/dist/actions/lint.d.ts.map +1 -1
- package/dist/actions/lintNextWorker.d.ts.map +1 -1
- package/dist/actions/npmignore-gen.d.ts.map +1 -1
- package/dist/actions/package/clean-outputs.d.ts.map +1 -1
- package/dist/actions/package/clean-typescript.d.ts.map +1 -1
- package/dist/actions/package/clean.d.ts.map +1 -1
- package/dist/actions/package/cleanPlan.d.ts +1 -1
- package/dist/actions/package/cleanPlan.d.ts.map +1 -1
- package/dist/actions/package/cleanRules.d.ts +6 -6
- package/dist/actions/package/cleanRules.d.ts.map +1 -1
- package/dist/actions/package/compile/XyConfig.d.ts +21 -0
- package/dist/actions/package/compile/XyConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/buildEntries.d.ts.map +1 -1
- package/dist/actions/package/compile/compile.d.ts.map +1 -1
- package/dist/actions/package/compile/createTypescriptConfig.d.ts.map +1 -1
- package/dist/actions/package/compile/entryOutputName.d.ts +1 -1
- package/dist/actions/package/compile/entryOutputName.d.ts.map +1 -1
- package/dist/actions/package/compile/getCompilerOptions.d.ts.map +1 -1
- package/dist/actions/package/compile/inputs.d.ts.map +1 -1
- package/dist/actions/package/compile/monolithCompileLayout.d.ts +1 -1
- package/dist/actions/package/compile/monolithCompileLayout.d.ts.map +1 -1
- package/dist/actions/package/compile/packageCompileEsbuild.d.ts +2 -2
- package/dist/actions/package/compile/packageCompileEsbuild.d.ts.map +1 -1
- package/dist/actions/package/compile/packageCompileMonolith.d.ts.map +1 -1
- package/dist/actions/package/compile/packageCompileTsc.d.ts +1 -1
- package/dist/actions/package/compile/packageCompileTsc.d.ts.map +1 -1
- package/dist/actions/package/compile/packageCompileTsup.d.ts.map +1 -1
- package/dist/actions/package/compile/packageCompileVendor.d.ts.map +1 -1
- package/dist/actions/package/compile/resolveCompilePlatforms.d.ts.map +1 -1
- package/dist/actions/package/compile/resolvePlatformTypes.d.ts.map +1 -1
- package/dist/actions/package/compile/resolveTscBin.d.ts +46 -0
- package/dist/actions/package/compile/resolveTscBin.d.ts.map +1 -0
- package/dist/actions/package/compile/runTsc.d.ts +14 -1
- package/dist/actions/package/compile/runTsc.d.ts.map +1 -1
- package/dist/actions/package/compile/validateFullPackage.d.ts +2 -1
- package/dist/actions/package/compile/validateFullPackage.d.ts.map +1 -1
- package/dist/actions/package/compile/vendorCompileInternals.d.ts.map +1 -1
- package/dist/actions/package/compile/vendorCompileTypes.d.ts +1 -1
- package/dist/actions/package/compile/vendorCompileTypes.d.ts.map +1 -1
- package/dist/actions/package/copy-assets.d.ts.map +1 -1
- package/dist/actions/package/lint.d.ts.map +1 -1
- package/dist/actions/package/publint.d.ts.map +1 -1
- package/dist/actions/package/recompile.d.ts.map +1 -1
- package/dist/actions/publint.d.ts.map +1 -1
- package/dist/actions/publish.d.ts.map +1 -1
- package/dist/actions/rebuild.d.ts.map +1 -1
- package/dist/actions/recompile.d.ts.map +1 -1
- package/dist/actions/reinstall.d.ts.map +1 -1
- package/dist/actions/releaseAgeExcludeScopes.d.ts +1 -1
- package/dist/actions/releaseAgeExcludeScopes.d.ts.map +1 -1
- package/dist/actions/relint.d.ts.map +1 -1
- package/dist/actions/republint.d.ts.map +1 -1
- package/dist/actions/retest.d.ts.map +1 -1
- package/dist/actions/secure.d.ts.map +1 -1
- package/dist/actions/skills/defaults.d.ts +2 -2
- package/dist/actions/skills/defaults.d.ts.map +1 -1
- package/dist/actions/skills/detectProfile.d.ts.map +1 -1
- package/dist/actions/skills/installed.d.ts +1 -1
- package/dist/actions/skills/installed.d.ts.map +1 -1
- package/dist/actions/skills/lint.d.ts.map +1 -1
- package/dist/actions/skills/passthrough.d.ts.map +1 -1
- package/dist/actions/skills/skillRules.d.ts.map +1 -1
- package/dist/actions/skills/updo.d.ts.map +1 -1
- package/dist/actions/skills/versions.d.ts.map +1 -1
- package/dist/actions/test.d.ts.map +1 -1
- package/dist/actions/tsc-validate/tscValidate.d.ts.map +1 -1
- package/dist/actions/updo.d.ts.map +1 -1
- package/dist/actions/work/github.d.ts +2 -2
- package/dist/actions/work/github.d.ts.map +1 -1
- package/dist/actions/work/helpers.d.ts +1 -1
- package/dist/actions/work/helpers.d.ts.map +1 -1
- package/dist/actions/work/id.d.ts.map +1 -1
- package/dist/actions/work/index.d.ts.map +1 -1
- package/dist/actions/work/inline.d.ts.map +1 -1
- package/dist/actions/work/lifecycle.d.ts.map +1 -1
- package/dist/actions/work/lint.d.ts.map +1 -1
- package/dist/actions/work/list.d.ts.map +1 -1
- package/dist/actions/work/move.d.ts.map +1 -1
- package/dist/actions/work/priority.d.ts.map +1 -1
- package/dist/actions/work/queue.d.ts.map +1 -1
- package/dist/actions/work/render.d.ts.map +1 -1
- package/dist/actions/work/result.d.ts.map +1 -1
- package/dist/actions/work/schema.d.ts +3 -3
- package/dist/actions/work/schema.d.ts.map +1 -1
- package/dist/actions/work/store.d.ts.map +1 -1
- package/dist/actions/work/sync.d.ts.map +1 -1
- package/dist/actions/work/workspace.d.ts +1 -1
- package/dist/actions/work/workspace.d.ts.map +1 -1
- package/dist/bin/package/build.mjs +113 -19
- package/dist/bin/package/build.mjs.map +1 -1
- package/dist/bin/package/compile.mjs +113 -19
- package/dist/bin/package/compile.mjs.map +1 -1
- package/dist/bin/package/recompile.mjs +113 -19
- package/dist/bin/package/recompile.mjs.map +1 -1
- package/dist/bin/xy.mjs +157 -14
- package/dist/bin/xy.mjs.map +1 -1
- package/dist/lib/aliasSpec.d.ts +28 -0
- package/dist/lib/aliasSpec.d.ts.map +1 -0
- package/dist/lib/checkResult.d.ts +1 -1
- package/dist/lib/checkResult.d.ts.map +1 -1
- package/dist/lib/createBuildConfig.d.ts +1 -1
- package/dist/lib/createBuildConfig.d.ts.map +1 -1
- package/dist/lib/defaultBuildConfig.d.ts.map +1 -1
- package/dist/lib/deleteGlob.d.ts.map +1 -1
- package/dist/lib/dependencies/DuplicateDetector.d.ts.map +1 -1
- package/dist/lib/dependencies/detectDuplicateDependencies.d.ts.map +1 -1
- package/dist/lib/file/fileLines.d.ts.map +1 -1
- package/dist/lib/file/tryReadFileSync.d.ts.map +1 -1
- package/dist/lib/generateIgnoreFiles.d.ts.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/jsonFormatters.d.ts.map +1 -1
- package/dist/lib/latestVersions.d.ts +5 -5
- package/dist/lib/latestVersions.d.ts.map +1 -1
- package/dist/lib/loadConfig.d.ts.map +1 -1
- package/dist/lib/parsedPackageJson.d.ts.map +1 -1
- package/dist/lib/processEx.d.ts.map +1 -1
- package/dist/lib/ruleCommandRegistry.d.ts +44 -44
- package/dist/lib/ruleCommandRegistry.d.ts.map +1 -1
- package/dist/lib/runSteps.d.ts.map +1 -1
- package/dist/lib/runStepsAsync.d.ts.map +1 -1
- package/dist/lib/runXy.d.ts.map +1 -1
- package/dist/lib/runXyWithWarning.d.ts.map +1 -1
- package/dist/lib/safeExit.d.ts.map +1 -1
- package/dist/lib/string/empty.d.ts.map +1 -1
- package/dist/lib/string/union.d.ts.map +1 -1
- package/dist/lib/updo/collectWorkspaceDeps.d.ts.map +1 -1
- package/dist/lib/updo/index.d.ts +1 -0
- package/dist/lib/updo/index.d.ts.map +1 -1
- package/dist/lib/updo/interactiveSelect.d.ts.map +1 -1
- package/dist/lib/updo/interfaces.d.ts +20 -0
- package/dist/lib/updo/interfaces.d.ts.map +1 -1
- package/dist/lib/updo/majorCeiling.d.ts +21 -0
- package/dist/lib/updo/majorCeiling.d.ts.map +1 -0
- package/dist/lib/updo/resolveVersions.d.ts.map +1 -1
- package/dist/lib/updo/runUpdo.d.ts.map +1 -1
- package/dist/lib/withErrnoException.d.ts.map +1 -1
- package/dist/lib/withError.d.ts.map +1 -1
- package/dist/lib/yarn/isYarnVersionOrGreater.d.ts.map +1 -1
- package/dist/lib/yarn/workspace/yarnWorkspace.d.ts.map +1 -1
- package/dist/pm/bunPackageManager.d.ts +1 -1
- package/dist/pm/bunPackageManager.d.ts.map +1 -1
- package/dist/pm/npmPackageManager.d.ts +1 -1
- package/dist/pm/npmPackageManager.d.ts.map +1 -1
- package/dist/pm/pnpmPackageManager.d.ts +1 -1
- package/dist/pm/pnpmPackageManager.d.ts.map +1 -1
- package/dist/pm/yarnPackageManager.d.ts +1 -1
- package/dist/pm/yarnPackageManager.d.ts.map +1 -1
- package/dist/xy/build/index.d.ts.map +1 -1
- package/dist/xy/common/index.d.ts.map +1 -1
- package/dist/xy/common/work/options.d.ts.map +1 -1
- package/dist/xy/deploy/index.d.ts.map +1 -1
- package/dist/xy/install/index.d.ts.map +1 -1
- package/dist/xy/lint/index.d.ts.map +1 -1
- package/dist/xy/param.d.ts.map +1 -1
- package/dist/xy/react/index.d.ts.map +1 -1
- package/dist/xy/xy.d.ts +2 -2
- package/dist/xy/xy.d.ts.map +1 -1
- package/package.json +5 -4
package/dist/bin/xy.mjs
CHANGED
|
@@ -71,6 +71,40 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
71
71
|
}) : target, mod));
|
|
72
72
|
var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
|
|
73
73
|
//#endregion
|
|
74
|
+
//#region src/lib/aliasSpec.ts
|
|
75
|
+
const ALIAS_PREFIX = "npm:";
|
|
76
|
+
/**
|
|
77
|
+
* Splits an `npm:` alias spec into the registry name and the semver range it
|
|
78
|
+
* carries: `npm:typescript@~7.0.2` → `{ registryName: 'typescript', range: '~7.0.2' }`.
|
|
79
|
+
*
|
|
80
|
+
* Aliases exist so two releases of one package can be installed side by side —
|
|
81
|
+
* `typescript` (the compiler API) alongside `npm:typescript@7` (the native
|
|
82
|
+
* compiler). Without this, the declaration key is the only name updo sees, and
|
|
83
|
+
* a key like `typescript-native` is not a real package: the registry lookup
|
|
84
|
+
* 404s and the dependency is silently never updated.
|
|
85
|
+
*
|
|
86
|
+
* Returns undefined for non-alias specs and for alias specs carrying no range
|
|
87
|
+
* (`npm:typescript`), which express no version intent to move.
|
|
88
|
+
*/
|
|
89
|
+
function parseAliasSpec(spec) {
|
|
90
|
+
if (!spec.startsWith(ALIAS_PREFIX)) return void 0;
|
|
91
|
+
const target = spec.slice(4);
|
|
92
|
+
const separator = target.indexOf("@", 1);
|
|
93
|
+
if (separator <= 0 || separator === target.length - 1) return void 0;
|
|
94
|
+
return {
|
|
95
|
+
range: target.slice(separator + 1),
|
|
96
|
+
registryName: target.slice(0, separator)
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Re-wraps a resolved range in its `npm:` alias spec, so an update to an
|
|
101
|
+
* aliased declaration is written back in the form the package manager expects.
|
|
102
|
+
* Non-aliased declarations pass through untouched.
|
|
103
|
+
*/
|
|
104
|
+
function formatDeclaredRange(dep, range) {
|
|
105
|
+
return dep.registryName === dep.name ? range : `${ALIAS_PREFIX}${dep.registryName}@${range}`;
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
74
108
|
//#region src/lib/bundledCliPath.ts
|
|
75
109
|
const require$8 = createRequire(import.meta.url);
|
|
76
110
|
function toolchainPackageRoot() {
|
|
@@ -19730,10 +19764,12 @@ function collectExternalWorkspaceDeps(deps, depField, ws, workspaceNames, declar
|
|
|
19730
19764
|
for (const [name, range] of Object.entries(deps)) {
|
|
19731
19765
|
if (workspaceNames.has(name)) continue;
|
|
19732
19766
|
if (range.startsWith("workspace:")) continue;
|
|
19767
|
+
const alias = parseAliasSpec(range);
|
|
19733
19768
|
declaredDeps.push({
|
|
19734
19769
|
depType: depField,
|
|
19735
19770
|
name,
|
|
19736
|
-
range,
|
|
19771
|
+
range: alias?.range ?? range,
|
|
19772
|
+
registryName: alias?.registryName ?? name,
|
|
19737
19773
|
workspaceLocation: ws.location,
|
|
19738
19774
|
workspaceName: ws.name
|
|
19739
19775
|
});
|
|
@@ -21284,7 +21320,7 @@ const updoPrompt = createPrompt((config, done) => {
|
|
|
21284
21320
|
const version = getTargetVersion(dep, selectionsRef.current[i]);
|
|
21285
21321
|
if (version != null && version.length > 0) results.push({
|
|
21286
21322
|
name: dep.name,
|
|
21287
|
-
targetRange: version,
|
|
21323
|
+
targetRange: formatDeclaredRange(dep, version),
|
|
21288
21324
|
workspaces: dep.workspaces
|
|
21289
21325
|
});
|
|
21290
21326
|
}
|
|
@@ -21331,6 +21367,36 @@ async function interactiveSelect(deps, options = {}) {
|
|
|
21331
21367
|
}
|
|
21332
21368
|
}
|
|
21333
21369
|
//#endregion
|
|
21370
|
+
//#region src/lib/updo/majorCeiling.ts
|
|
21371
|
+
/**
|
|
21372
|
+
* Packages whose next major is not the same thing further along, but a
|
|
21373
|
+
* different distribution published under the same name. updo will not offer a
|
|
21374
|
+
* bump across the ceiling — not even under `--latest`, whose whole job is to
|
|
21375
|
+
* pick the highest available bump.
|
|
21376
|
+
*
|
|
21377
|
+
* A declaration already anchored above the ceiling is left alone: that is the
|
|
21378
|
+
* deliberate side-by-side install (`"typescript-native": "npm:typescript@7"`),
|
|
21379
|
+
* which should keep receiving updates like anything else.
|
|
21380
|
+
*/
|
|
21381
|
+
const MAJOR_CEILINGS = /* @__PURE__ */ new Map([["typescript", {
|
|
21382
|
+
maxMajor: 6,
|
|
21383
|
+
reason: [
|
|
21384
|
+
"typescript@7 is the native compiler and exports no compiler API —",
|
|
21385
|
+
"ESLint, deplint, dead-code and api-exposure all load it from `typescript`.",
|
|
21386
|
+
"Install it side by side instead: `\"typescript-native\": \"npm:typescript@7\"`",
|
|
21387
|
+
"with `compile.compiler: \"native\"`."
|
|
21388
|
+
].join(" ")
|
|
21389
|
+
}]]);
|
|
21390
|
+
/**
|
|
21391
|
+
* The ceiling in force for a declaration, or undefined when none applies —
|
|
21392
|
+
* including when the declaration is already above its ceiling.
|
|
21393
|
+
*/
|
|
21394
|
+
function majorCeilingFor(registryName, anchorMajor) {
|
|
21395
|
+
const ceiling = MAJOR_CEILINGS.get(registryName);
|
|
21396
|
+
if (ceiling === void 0) return void 0;
|
|
21397
|
+
return anchorMajor <= ceiling.maxMajor ? ceiling : void 0;
|
|
21398
|
+
}
|
|
21399
|
+
//#endregion
|
|
21334
21400
|
//#region src/lib/updo/resolveVersions.ts
|
|
21335
21401
|
function parseExclude(pattern) {
|
|
21336
21402
|
const sep = pattern.indexOf("@", 1);
|
|
@@ -21445,7 +21511,7 @@ function differentFromCurrent(value, current) {
|
|
|
21445
21511
|
if (value == null || value.length === 0) return void 0;
|
|
21446
21512
|
return value === current ? void 0 : value;
|
|
21447
21513
|
}
|
|
21448
|
-
function unresolvedDep(name, current, declaredRanges, preferredRangePrefix, workspaces) {
|
|
21514
|
+
function unresolvedDep(name, registryName, current, declaredRanges, preferredRangePrefix, workspaces) {
|
|
21449
21515
|
return {
|
|
21450
21516
|
current,
|
|
21451
21517
|
declaredRanges,
|
|
@@ -21456,10 +21522,23 @@ function unresolvedDep(name, current, declaredRanges, preferredRangePrefix, work
|
|
|
21456
21522
|
next: void 0,
|
|
21457
21523
|
patch: void 0,
|
|
21458
21524
|
preferredRangePrefix,
|
|
21525
|
+
registryName,
|
|
21459
21526
|
updateAvailable: false,
|
|
21460
21527
|
workspaces
|
|
21461
21528
|
};
|
|
21462
21529
|
}
|
|
21530
|
+
function majorOf(version) {
|
|
21531
|
+
return import_semver.default.parse(version)?.major;
|
|
21532
|
+
}
|
|
21533
|
+
function underCeiling(version, ceiling) {
|
|
21534
|
+
const major = majorOf(version);
|
|
21535
|
+
return major === void 0 || major <= ceiling.maxMajor;
|
|
21536
|
+
}
|
|
21537
|
+
function ceilingFilteredDistTags(distTags, ceiling) {
|
|
21538
|
+
const filtered = {};
|
|
21539
|
+
for (const [tag, version] of Object.entries(distTags)) if (underCeiling(version, ceiling)) filtered[tag] = version;
|
|
21540
|
+
return filtered;
|
|
21541
|
+
}
|
|
21463
21542
|
function normalizedMixedPatch(patch, declaredRanges, preferredRangePrefix, anchor) {
|
|
21464
21543
|
if (patch != null && patch.length > 0 || declaredRanges.length <= 1) return patch;
|
|
21465
21544
|
if (!declaredRanges.every((range) => {
|
|
@@ -21469,6 +21548,25 @@ function normalizedMixedPatch(patch, declaredRanges, preferredRangePrefix, ancho
|
|
|
21469
21548
|
const normalized = `${preferredRangePrefix}${anchor.version}`;
|
|
21470
21549
|
return declaredRanges.some((r) => r !== normalized) ? normalized : patch;
|
|
21471
21550
|
}
|
|
21551
|
+
/**
|
|
21552
|
+
* Removes candidate versions above the package's major ceiling, and reports
|
|
21553
|
+
* when doing so hid a major bump that would otherwise have been offered.
|
|
21554
|
+
*/
|
|
21555
|
+
function applyMajorCeiling(registryName, stable, distTags, anchor) {
|
|
21556
|
+
const ceiling = majorCeilingFor(registryName, anchor.major);
|
|
21557
|
+
if (ceiling === void 0) return {
|
|
21558
|
+
distTags,
|
|
21559
|
+
eligible: stable,
|
|
21560
|
+
withheldMajorReason: void 0
|
|
21561
|
+
};
|
|
21562
|
+
const eligible = stable.filter((v) => underCeiling(v, ceiling));
|
|
21563
|
+
const isMajorWithheld = pickBuckets(eligible, anchor).major === void 0 && pickBuckets(stable, anchor).major !== void 0;
|
|
21564
|
+
return {
|
|
21565
|
+
distTags: ceilingFilteredDistTags(distTags, ceiling),
|
|
21566
|
+
eligible,
|
|
21567
|
+
withheldMajorReason: isMajorWithheld ? ceiling.reason : void 0
|
|
21568
|
+
};
|
|
21569
|
+
}
|
|
21472
21570
|
function resolveOne(name, group, info, options, excludeRules) {
|
|
21473
21571
|
const nonPeer = group.filter((d) => d.depType !== "peerDependencies");
|
|
21474
21572
|
const sourceForRange = nonPeer.length > 0 ? nonPeer : group;
|
|
@@ -21477,15 +21575,16 @@ function resolveOne(name, group, info, options, excludeRules) {
|
|
|
21477
21575
|
const current = declaredRanges.length === 1 ? declaredRanges[0] : "mixed";
|
|
21478
21576
|
const preferredRangePrefix = pickPrefix(declaredRanges);
|
|
21479
21577
|
const anchor = lowestAnchor(declaredRanges);
|
|
21480
|
-
|
|
21481
|
-
|
|
21482
|
-
const
|
|
21483
|
-
const
|
|
21484
|
-
const
|
|
21578
|
+
const registryName = group[0].registryName;
|
|
21579
|
+
if (info === void 0 || anchor === void 0) return unresolvedDep(name, registryName, current, declaredRanges, preferredRangePrefix, workspaces);
|
|
21580
|
+
const effectiveInfo = options.minReleaseAge ? filterRegistryInfo(registryName, info, options.minReleaseAge, excludeRules) : info;
|
|
21581
|
+
const { distTags, eligible, withheldMajorReason } = applyMajorCeiling(registryName, effectiveInfo.versions.filter((v) => import_semver.default.valid(v) !== null && isStable(v)), effectiveInfo.distTags, anchor);
|
|
21582
|
+
const downgrade = options.minReleaseAge && !isDeclaredRangeSatisfiable(declaredRanges, eligible) ? format$1(preferredRangePrefix, pickDowngrade(eligible, anchor)) : void 0;
|
|
21583
|
+
const buckets = pickBuckets(eligible, anchor);
|
|
21485
21584
|
const patchRaw = format$1(preferredRangePrefix, buckets.patch);
|
|
21486
21585
|
const minorRaw = format$1(preferredRangePrefix, buckets.minor);
|
|
21487
21586
|
const majorRaw = format$1(preferredRangePrefix, buckets.major);
|
|
21488
|
-
const nextRaw = options.shouldIncludeNext ?? false ? format$1(preferredRangePrefix, pickPrerelease(
|
|
21587
|
+
const nextRaw = options.shouldIncludeNext ?? false ? format$1(preferredRangePrefix, pickPrerelease(distTags, anchor)) : void 0;
|
|
21489
21588
|
const patch = normalizedMixedPatch(differentFromCurrent(patchRaw, current), declaredRanges, preferredRangePrefix, anchor);
|
|
21490
21589
|
const minor = differentFromCurrent(minorRaw, current);
|
|
21491
21590
|
const major = differentFromCurrent(majorRaw, current);
|
|
@@ -21501,7 +21600,9 @@ function resolveOne(name, group, info, options, excludeRules) {
|
|
|
21501
21600
|
next,
|
|
21502
21601
|
patch,
|
|
21503
21602
|
preferredRangePrefix,
|
|
21603
|
+
registryName,
|
|
21504
21604
|
updateAvailable: availableVersion !== void 0 && availableVersion.length > 0,
|
|
21605
|
+
withheldMajorReason,
|
|
21505
21606
|
workspaces
|
|
21506
21607
|
};
|
|
21507
21608
|
}
|
|
@@ -21514,7 +21615,7 @@ function resolveVersions(deps, registry, options = {}) {
|
|
|
21514
21615
|
}
|
|
21515
21616
|
const excludeRules = options.minReleaseAge ? buildExcludeRules(options.minReleaseAge.exclude) : [];
|
|
21516
21617
|
const resolved = [];
|
|
21517
|
-
for (const [name, group] of grouped) resolved.push(resolveOne(name, group, registry.get(
|
|
21618
|
+
for (const [name, group] of grouped) resolved.push(resolveOne(name, group, registry.get(group[0].registryName), options, excludeRules));
|
|
21518
21619
|
return resolved.toSorted((a, b) => {
|
|
21519
21620
|
if (a.updateAvailable !== b.updateAvailable) return a.updateAvailable ? -1 : 1;
|
|
21520
21621
|
return a.name.localeCompare(b.name);
|
|
@@ -21565,7 +21666,7 @@ async function runUpdo(pm, options = {}) {
|
|
|
21565
21666
|
const uniqueDependencyNames = /* @__PURE__ */ new Set();
|
|
21566
21667
|
console.log(chalk.gray("Scanning workspace dependencies..."));
|
|
21567
21668
|
const declaredDeps = collectWorkspaceDeps(cwd, workspaces, workspaceNames);
|
|
21568
|
-
for (const dep of declaredDeps) uniqueDependencyNames.add(dep.
|
|
21669
|
+
for (const dep of declaredDeps) uniqueDependencyNames.add(dep.registryName);
|
|
21569
21670
|
console.log(chalk.gray(` Found ${uniqueDependencyNames.size} unique dependencies across ${workspaces.length} workspaces`));
|
|
21570
21671
|
const minReleaseAge = resolveMinReleaseAgeFilter(pm.name, cwd);
|
|
21571
21672
|
console.log(chalk.gray("Fetching registry info..."));
|
|
@@ -21583,6 +21684,10 @@ async function runUpdo(pm, options = {}) {
|
|
|
21583
21684
|
});
|
|
21584
21685
|
const downgradeCount = resolved.filter((r) => r.downgrade !== void 0).length;
|
|
21585
21686
|
if (downgradeCount > 0) console.log(chalk.yellow(` ${downgradeCount} package(s) have a current range that pnpm will reject — see the red "Down" column for downgrade suggestions.`));
|
|
21687
|
+
for (const dep of resolved) {
|
|
21688
|
+
if (dep.withheldMajorReason === void 0) continue;
|
|
21689
|
+
console.log(chalk.gray(` ${dep.name}: major bump withheld — ${dep.withheldMajorReason}`));
|
|
21690
|
+
}
|
|
21586
21691
|
const updates = await interactiveSelect(resolved, {
|
|
21587
21692
|
shouldIncludeNext: isIncludeNext,
|
|
21588
21693
|
latest: isLatest,
|
|
@@ -25468,11 +25573,22 @@ function shouldUseIncremental$3(incremental) {
|
|
|
25468
25573
|
return incremental !== false;
|
|
25469
25574
|
}
|
|
25470
25575
|
/**
|
|
25471
|
-
CLI flag wins, then root `compile.validator`, then per-package spawns.
|
|
25576
|
+
* CLI flag wins, then root `compile.validator`, then per-package spawns.
|
|
25577
|
+
*
|
|
25578
|
+
* The shared validator runs every package through one `ts.Program` host so
|
|
25579
|
+
* dependency declarations are parsed once. That cache only exists in the JS
|
|
25580
|
+
* compiler API, which `compile.compiler: 'native'` does not have — so the two
|
|
25581
|
+
* cannot be combined, and the native compiler's own parallelism is the
|
|
25582
|
+
* intended replacement for the shared cache.
|
|
25472
25583
|
*/
|
|
25473
25584
|
async function resolveCompileValidator(override) {
|
|
25474
|
-
|
|
25475
|
-
|
|
25585
|
+
const rootConfig = await loadConfig();
|
|
25586
|
+
const requested = override ?? rootConfig.compile?.validator ?? "per-package";
|
|
25587
|
+
if (requested === "shared" && rootConfig.compile?.compiler === "native") {
|
|
25588
|
+
console.warn(chalk.yellow("Compile: compile.validator \"shared\" is not available with compile.compiler \"native\" — validating per package."));
|
|
25589
|
+
return "per-package";
|
|
25590
|
+
}
|
|
25591
|
+
return requested;
|
|
25476
25592
|
}
|
|
25477
25593
|
function createCompilePlan({ incrementalPlan, pm, shouldUseIncremental, isVerbose, workspaces }) {
|
|
25478
25594
|
if (!shouldUseIncremental) return void 0;
|
|
@@ -28321,9 +28437,36 @@ const rules = [
|
|
|
28321
28437
|
isNeeded: hasTypescriptFiles
|
|
28322
28438
|
}
|
|
28323
28439
|
];
|
|
28440
|
+
/**
|
|
28441
|
+
* Packages the toolchain runs as a binary rather than imports, and which are
|
|
28442
|
+
* therefore installed under an `npm:` alias. Today that is the native
|
|
28443
|
+
* TypeScript compiler: `typescript@7` shares the `typescript` package name and
|
|
28444
|
+
* `tsc` bin with the compiler API package, so it can only be installed
|
|
28445
|
+
* alongside as `"typescript-native": "npm:typescript@7"`.
|
|
28446
|
+
*
|
|
28447
|
+
* Static analysis can never justify such a declaration — nothing imports the
|
|
28448
|
+
* alias key, and nothing could, since TypeScript@7 exports no API. `xy compile`
|
|
28449
|
+
* resolves it by path when `compile.compiler` is `native`.
|
|
28450
|
+
*/
|
|
28451
|
+
const spawnedAliasTargets = /* @__PURE__ */ new Set(["typescript"]);
|
|
28452
|
+
function getSpawnedAliasDependencies({ location }) {
|
|
28453
|
+
const implicit = /* @__PURE__ */ new Set();
|
|
28454
|
+
let devDependencies;
|
|
28455
|
+
try {
|
|
28456
|
+
devDependencies = JSON.parse(fs.readFileSync(`${location}/package.json`, "utf8")).devDependencies ?? {};
|
|
28457
|
+
} catch {
|
|
28458
|
+
return implicit;
|
|
28459
|
+
}
|
|
28460
|
+
for (const [name, spec] of Object.entries(devDependencies)) {
|
|
28461
|
+
const alias = parseAliasSpec(spec);
|
|
28462
|
+
if (alias !== void 0 && spawnedAliasTargets.has(alias.registryName)) implicit.add(name);
|
|
28463
|
+
}
|
|
28464
|
+
return implicit;
|
|
28465
|
+
}
|
|
28324
28466
|
function getImplicitDevDependencies(context) {
|
|
28325
28467
|
const implicit = /* @__PURE__ */ new Set();
|
|
28326
28468
|
for (const rule of rules) if (rule.isNeeded(context)) implicit.add(rule.package);
|
|
28469
|
+
for (const name of getSpawnedAliasDependencies(context)) implicit.add(name);
|
|
28327
28470
|
return implicit;
|
|
28328
28471
|
}
|
|
28329
28472
|
//#endregion
|