@ariestools/toolchain 9.0.4 → 9.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bin/xy.mjs CHANGED
@@ -4642,10 +4642,12 @@ function findWorkspaceRoot(startDir) {
4642
4642
  function workspaceFromPackageJsonMatch(match, cwd, seen) {
4643
4643
  const name = readJsonFile$1(match)?.name;
4644
4644
  if (name === void 0 || name.length === 0) return void 0;
4645
- const location = PATH.relative(cwd, PATH.dirname(match)) || ".";
4645
+ const dir = PATH.dirname(match);
4646
+ const location = PATH.relative(cwd, dir) || ".";
4646
4647
  if (seen.has(location)) return void 0;
4647
4648
  seen.add(location);
4648
4649
  return {
4650
+ dir: PATH.resolve(dir),
4649
4651
  location,
4650
4652
  name
4651
4653
  };
@@ -4810,7 +4812,7 @@ function hasReactDependency(packageJsonPath) {
4810
4812
  }
4811
4813
  }
4812
4814
  function hasWorkspaceReact(workspace) {
4813
- return hasReactDependency(PATH.join(workspace.location, "package.json"));
4815
+ return hasReactDependency(PATH.join(workspace.dir, "package.json"));
4814
4816
  }
4815
4817
  function isReactInMonorepo(cwd, isVerbose) {
4816
4818
  if (hasReactDependency(PATH.resolve(cwd, "package.json"))) {
@@ -5029,6 +5031,7 @@ var PnpmPackageManager = class {
5029
5031
  if (Array.isArray(parsed)) return parsed.map((pkg) => {
5030
5032
  const rel = PATH.relative(cwd, pkg.path);
5031
5033
  return {
5034
+ dir: PATH.resolve(cwd, pkg.path),
5032
5035
  location: rel === "" ? "." : rel,
5033
5036
  name: pkg.name
5034
5037
  };
@@ -19399,6 +19402,7 @@ function collectSecurePackageTargets(cwd, workspaces) {
19399
19402
  const rootName = readPackageJson$10(PATH.resolve(cwd, "package.json"))?.name;
19400
19403
  if (rootName !== void 0 && rootName.length > 0) {
19401
19404
  targets.push({
19405
+ dir: PATH.resolve(cwd),
19402
19406
  location: ".",
19403
19407
  name: rootName
19404
19408
  });
@@ -19408,6 +19412,7 @@ function collectSecurePackageTargets(cwd, workspaces) {
19408
19412
  const normalizedLocation = workspace.location || ".";
19409
19413
  if (seenLocations.has(normalizedLocation)) continue;
19410
19414
  targets.push({
19415
+ dir: workspace.dir,
19411
19416
  location: normalizedLocation,
19412
19417
  name: workspace.name
19413
19418
  });
@@ -22050,6 +22055,7 @@ function listWorkspacesFromFs(cwd) {
22050
22055
  if (existsSync(rootPath)) try {
22051
22056
  const root = JSON.parse(readFileSync(rootPath, "utf8"));
22052
22057
  if (root.name != null && root.name.length > 0 && workspaces.every((ws) => ws.location !== ".")) workspaces.unshift({
22058
+ dir: PATH.dirname(rootPath),
22053
22059
  location: ".",
22054
22060
  name: root.name
22055
22061
  });
@@ -25873,6 +25879,7 @@ function readRootWorkspace(rootDir) {
25873
25879
  const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf8"));
25874
25880
  if (packageJson.name == null || packageJson.name.length === 0) return void 0;
25875
25881
  return {
25882
+ dir: PATH.resolve(rootDir),
25876
25883
  listed: false,
25877
25884
  location: ".",
25878
25885
  name: packageJson.name,
@@ -30194,16 +30201,16 @@ function buildWorkspaceContext(workspace, options = {}) {
30194
30201
  hasRuntimeRoots: runtimeRoots.length > 0,
30195
30202
  location: workspace.location,
30196
30203
  name: workspace.name,
30197
- tsconfigExtends: getExtendsFromTsconfigs(workspace.location),
30198
- tsconfigPaths: getPathsFromTsconfigs(workspace.location),
30199
- tsconfigTypes: getTypesFromTsconfigs(workspace.location),
30204
+ tsconfigExtends: getExtendsFromTsconfigs(workspace.dir),
30205
+ tsconfigPaths: getPathsFromTsconfigs(workspace.dir),
30206
+ tsconfigTypes: getTypesFromTsconfigs(workspace.dir),
30200
30207
  useSourceFallback: packageClassification.facets.runtimeEntry !== "none"
30201
30208
  });
30202
30209
  recordPhase(phases, "importsMs", importsStarted);
30203
- const packageJsonPath = `${workspace.location}/package.json`;
30210
+ const packageJsonPath = `${workspace.dir}/package.json`;
30204
30211
  const packageParams = getDependenciesFromPackageJson(packageJsonPath);
30205
30212
  const peerForwarding = resolvePeerForwardingPolicy(options.classifier, options.apiExposureConfig, sourceParams);
30206
- const requiredTransitivePeers = getRequiredNonOptionalTransitivePeers(workspace.location, packageParams);
30213
+ const requiredTransitivePeers = getRequiredNonOptionalTransitivePeers(workspace.dir, packageParams);
30207
30214
  const runtimeRootedRequired = new Set([...getRuntimeRootedNonOptionalTransitivePeers(workspace.location, packageParams)].filter((peer) => isPeerForwarded(peerForwarding, peer)));
30208
30215
  return {
30209
30216
  classifierMode: options.classifier ?? "legacy",
@@ -32183,12 +32190,12 @@ function failedSemanticResult(pkg, output, timeMs) {
32183
32190
  }
32184
32191
  async function lintSemanticPackage({ analyze, configOverride, fix, gitignore, gitignorePath, profile, rulePlan, sharedCache, verbose, workspace }) {
32185
32192
  const started = performance$1.now();
32186
- const programResult = createWorkspaceProgramInProcess(workspace.location, sharedCache);
32193
+ const programResult = createWorkspaceProgramInProcess(workspace.dir, sharedCache);
32187
32194
  if (programResult.kind === "skipped") return failedSemanticResult(workspace.name, `Shared typecheck [${workspace.name}] requires ${PATH.join(workspace.location, "tsconfig.json")}\n`, Math.round(performance$1.now() - started));
32188
32195
  if (programResult.kind === "error") return failedSemanticResult(workspace.name, programResult.formatted, Math.round(performance$1.now() - started));
32189
32196
  const lintFiles = programResult.rootNames.filter((fileName) => scriptExtensionPattern.test(fileName));
32190
32197
  if (lintFiles.length === 0) return emptySemanticResult(workspace.name);
32191
- const base = await baseSharedTypecheckConfigs(workspace.location, configOverride, gitignorePath);
32198
+ const base = await baseSharedTypecheckConfigs(workspace.dir, configOverride, gitignorePath);
32192
32199
  const disabledRules = Object.fromEntries([...rulePlan.activeRuleNames].filter((ruleName) => !rulePlan.typeCheckedRuleNames.has(ruleName)).map((ruleName) => [ruleName, "off"]));
32193
32200
  const semanticConfig = {
32194
32201
  files: sharedTypecheckScriptPatterns,
@@ -38265,7 +38272,7 @@ const publintSingle = async ({ cliExclude, cliInclude, fix, pack, pkg, verbose }
38265
38272
  ruleLevels: resolvedRules,
38266
38273
  shouldFix: fix,
38267
38274
  shouldPack,
38268
- pkgDir: workspace.location,
38275
+ pkgDir: workspace.dir,
38269
38276
  verbose
38270
38277
  });
38271
38278
  logPublintSummary(1, result.errors, result.warnings, performance.now() - start);
@@ -38292,7 +38299,7 @@ async function runWorkspacePublint({ cliExclude, cliInclude, fix, pack, verbose,
38292
38299
  ruleLevels: resolvedRules,
38293
38300
  shouldFix: fix,
38294
38301
  shouldPack,
38295
- pkgDir: ws.location,
38302
+ pkgDir: ws.dir,
38296
38303
  verbose
38297
38304
  });
38298
38305
  captured = {
@@ -38435,7 +38442,8 @@ function selectedWorkspaces(workspaces, names) {
38435
38442
  return workspaces.filter((workspace) => selected.has(workspace.name));
38436
38443
  }
38437
38444
  function listedWorkspaces(workspaces) {
38438
- return workspaces.filter((workspace) => workspace.listed !== false).map(({ location, name }) => ({
38445
+ return workspaces.filter((workspace) => workspace.listed !== false).map(({ dir, location, name }) => ({
38446
+ dir,
38439
38447
  location,
38440
38448
  name
38441
38449
  }));
@@ -38579,6 +38587,7 @@ function readPackageJson$2(packagePath) {
38579
38587
  function rootWorkspace(rootDir) {
38580
38588
  const name = readPackageJson$2(rootDir)?.name ?? packageName();
38581
38589
  return name != null && name.length > 0 ? {
38590
+ dir: PATH.resolve(rootDir),
38582
38591
  location: ".",
38583
38592
  name
38584
38593
  } : void 0;
@@ -41000,7 +41009,7 @@ const dead = async (options = {}) => {
41000
41009
  //#endregion
41001
41010
  //#region src/actions/deploy.ts
41002
41011
  const privatePackageExcludeList = () => {
41003
- return getPackageManager().listWorkspaces().map((workspace) => [workspace, JSON.parse(readFileSync(`${workspace.location}/package.json`, { encoding: "utf8" }))]).filter(([_, pkg]) => pkg.private ?? false).map(([workspace]) => workspace).map((workspace) => `--exclude ${workspace.name}`);
41012
+ return getPackageManager().listWorkspaces().map((workspace) => [workspace, JSON.parse(readFileSync(`${workspace.dir}/package.json`, { encoding: "utf8" }))]).filter(([_, pkg]) => pkg.private ?? false).map(([workspace]) => workspace).map((workspace) => `--exclude ${workspace.name}`);
41004
41013
  };
41005
41014
  function deploy(level = "patch") {
41006
41015
  const excludeList = privatePackageExcludeList();
@@ -42928,7 +42937,7 @@ function collectUsedReleaseAgeScopePrefixes(cwd, workspaces) {
42928
42937
  for (const workspace of workspaces) {
42929
42938
  addKnownScopesUsedByPackageName(used, workspace.name);
42930
42939
  if (workspace.location === ".") continue;
42931
- scanPackageJson(workspace.location);
42940
+ scanPackageJson(workspace.dir);
42932
42941
  }
42933
42942
  return used;
42934
42943
  }
@@ -45533,7 +45542,7 @@ async function loadCommandConfig$1(commandName, pkg) {
45533
45542
  if (pkg !== void 0 && pkg.length > 0) {
45534
45543
  const workspace = getPackageManager().findWorkspace(pkg);
45535
45544
  if (workspace === void 0) throw new Error(`Workspace not found: ${pkg}`);
45536
- return loadWorkspaceCommandConfig(workspace.location, commandName);
45545
+ return loadWorkspaceCommandConfig(workspace.dir, commandName);
45537
45546
  }
45538
45547
  return loadWorkspaceCommandConfig(process.cwd(), commandName);
45539
45548
  }
@@ -53369,7 +53378,7 @@ async function loadCommandConfig(commandName, pkg) {
53369
53378
  if (pkg !== void 0 && pkg.length > 0) {
53370
53379
  const workspace = getPackageManager().findWorkspace(pkg);
53371
53380
  if (workspace === void 0) throw new Error(`Workspace not found: ${pkg}`);
53372
- return loadWorkspaceCommandConfig(workspace.location, commandName);
53381
+ return loadWorkspaceCommandConfig(workspace.dir, commandName);
53373
53382
  }
53374
53383
  return loadWorkspaceCommandConfig(process.cwd(), commandName);
53375
53384
  }