@ariestools/toolchain 8.7.28 → 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.
Files changed (208) hide show
  1. package/README.md +27 -0
  2. package/dist/actions/analyze.d.ts.map +1 -1
  3. package/dist/actions/api-exposure/apiExposure.d.ts.map +1 -1
  4. package/dist/actions/build.d.ts.map +1 -1
  5. package/dist/actions/clean.d.ts.map +1 -1
  6. package/dist/actions/compile.d.ts +9 -3
  7. package/dist/actions/compile.d.ts.map +1 -1
  8. package/dist/actions/copy-assets.d.ts.map +1 -1
  9. package/dist/actions/dead/dead.d.ts.map +1 -1
  10. package/dist/actions/deplint/deplint.d.ts.map +1 -1
  11. package/dist/actions/deplint/deplintPick.d.ts.map +1 -1
  12. package/dist/actions/deplint/editXyConfigPackages.d.ts +1 -1
  13. package/dist/actions/deplint/editXyConfigPackages.d.ts.map +1 -1
  14. package/dist/actions/deplint/implicitDevDependencies.d.ts.map +1 -1
  15. package/dist/actions/deplint/packageEditor.d.ts.map +1 -1
  16. package/dist/actions/fix.d.ts.map +1 -1
  17. package/dist/actions/license.d.ts.map +1 -1
  18. package/dist/actions/lint-config.d.ts +1 -1
  19. package/dist/actions/lint-config.d.ts.map +1 -1
  20. package/dist/actions/lint.d.ts.map +1 -1
  21. package/dist/actions/lintNextWorker.d.ts.map +1 -1
  22. package/dist/actions/npmignore-gen.d.ts.map +1 -1
  23. package/dist/actions/package/clean-outputs.d.ts.map +1 -1
  24. package/dist/actions/package/clean-typescript.d.ts.map +1 -1
  25. package/dist/actions/package/clean.d.ts.map +1 -1
  26. package/dist/actions/package/cleanPlan.d.ts +1 -1
  27. package/dist/actions/package/cleanPlan.d.ts.map +1 -1
  28. package/dist/actions/package/cleanRules.d.ts +6 -6
  29. package/dist/actions/package/cleanRules.d.ts.map +1 -1
  30. package/dist/actions/package/compile/XyConfig.d.ts +21 -0
  31. package/dist/actions/package/compile/XyConfig.d.ts.map +1 -1
  32. package/dist/actions/package/compile/buildEntries.d.ts.map +1 -1
  33. package/dist/actions/package/compile/compile.d.ts.map +1 -1
  34. package/dist/actions/package/compile/createTypescriptConfig.d.ts.map +1 -1
  35. package/dist/actions/package/compile/entryOutputName.d.ts +1 -1
  36. package/dist/actions/package/compile/entryOutputName.d.ts.map +1 -1
  37. package/dist/actions/package/compile/getCompilerOptions.d.ts.map +1 -1
  38. package/dist/actions/package/compile/inputs.d.ts.map +1 -1
  39. package/dist/actions/package/compile/monolithCompileLayout.d.ts +1 -1
  40. package/dist/actions/package/compile/monolithCompileLayout.d.ts.map +1 -1
  41. package/dist/actions/package/compile/packageCompileEsbuild.d.ts +2 -2
  42. package/dist/actions/package/compile/packageCompileEsbuild.d.ts.map +1 -1
  43. package/dist/actions/package/compile/packageCompileMonolith.d.ts.map +1 -1
  44. package/dist/actions/package/compile/packageCompileTsc.d.ts +1 -1
  45. package/dist/actions/package/compile/packageCompileTsc.d.ts.map +1 -1
  46. package/dist/actions/package/compile/packageCompileTsup.d.ts.map +1 -1
  47. package/dist/actions/package/compile/packageCompileVendor.d.ts.map +1 -1
  48. package/dist/actions/package/compile/resolveCompilePlatforms.d.ts.map +1 -1
  49. package/dist/actions/package/compile/resolvePlatformTypes.d.ts.map +1 -1
  50. package/dist/actions/package/compile/resolveTscBin.d.ts +46 -0
  51. package/dist/actions/package/compile/resolveTscBin.d.ts.map +1 -0
  52. package/dist/actions/package/compile/runTsc.d.ts +14 -1
  53. package/dist/actions/package/compile/runTsc.d.ts.map +1 -1
  54. package/dist/actions/package/compile/validateFullPackage.d.ts +2 -1
  55. package/dist/actions/package/compile/validateFullPackage.d.ts.map +1 -1
  56. package/dist/actions/package/compile/vendorCompileInternals.d.ts.map +1 -1
  57. package/dist/actions/package/compile/vendorCompileTypes.d.ts +1 -1
  58. package/dist/actions/package/compile/vendorCompileTypes.d.ts.map +1 -1
  59. package/dist/actions/package/copy-assets.d.ts.map +1 -1
  60. package/dist/actions/package/lint.d.ts.map +1 -1
  61. package/dist/actions/package/publint.d.ts.map +1 -1
  62. package/dist/actions/package/recompile.d.ts.map +1 -1
  63. package/dist/actions/publint.d.ts.map +1 -1
  64. package/dist/actions/publish.d.ts.map +1 -1
  65. package/dist/actions/rebuild.d.ts.map +1 -1
  66. package/dist/actions/recompile.d.ts.map +1 -1
  67. package/dist/actions/reinstall.d.ts.map +1 -1
  68. package/dist/actions/releaseAgeExcludeScopes.d.ts +1 -1
  69. package/dist/actions/releaseAgeExcludeScopes.d.ts.map +1 -1
  70. package/dist/actions/relint.d.ts.map +1 -1
  71. package/dist/actions/repo-init/index.d.ts +7 -0
  72. package/dist/actions/repo-init/index.d.ts.map +1 -0
  73. package/dist/actions/repo-init/prompts.d.ts +4 -0
  74. package/dist/actions/repo-init/prompts.d.ts.map +1 -0
  75. package/dist/actions/repo-init/resolvePlan.d.ts +7 -0
  76. package/dist/actions/repo-init/resolvePlan.d.ts.map +1 -0
  77. package/dist/actions/repo-init/scaffold.d.ts +10 -0
  78. package/dist/actions/repo-init/scaffold.d.ts.map +1 -0
  79. package/dist/actions/repo-init/skillsInstall.d.ts +12 -0
  80. package/dist/actions/repo-init/skillsInstall.d.ts.map +1 -0
  81. package/dist/actions/repo-init/templateVars.d.ts +5 -0
  82. package/dist/actions/repo-init/templateVars.d.ts.map +1 -0
  83. package/dist/actions/repo-init/types.d.ts +40 -0
  84. package/dist/actions/repo-init/types.d.ts.map +1 -0
  85. package/dist/actions/repo-init.d.ts +1 -13
  86. package/dist/actions/repo-init.d.ts.map +1 -1
  87. package/dist/actions/republint.d.ts.map +1 -1
  88. package/dist/actions/retest.d.ts.map +1 -1
  89. package/dist/actions/secure.d.ts.map +1 -1
  90. package/dist/actions/skills/defaults.d.ts +2 -2
  91. package/dist/actions/skills/defaults.d.ts.map +1 -1
  92. package/dist/actions/skills/detectProfile.d.ts.map +1 -1
  93. package/dist/actions/skills/installed.d.ts +1 -1
  94. package/dist/actions/skills/installed.d.ts.map +1 -1
  95. package/dist/actions/skills/lint.d.ts.map +1 -1
  96. package/dist/actions/skills/passthrough.d.ts +4 -0
  97. package/dist/actions/skills/passthrough.d.ts.map +1 -1
  98. package/dist/actions/skills/skillRules.d.ts.map +1 -1
  99. package/dist/actions/skills/updo.d.ts.map +1 -1
  100. package/dist/actions/skills/versions.d.ts.map +1 -1
  101. package/dist/actions/test.d.ts.map +1 -1
  102. package/dist/actions/tsc-validate/tscValidate.d.ts.map +1 -1
  103. package/dist/actions/updo.d.ts.map +1 -1
  104. package/dist/actions/work/github.d.ts +2 -2
  105. package/dist/actions/work/github.d.ts.map +1 -1
  106. package/dist/actions/work/helpers.d.ts +1 -1
  107. package/dist/actions/work/helpers.d.ts.map +1 -1
  108. package/dist/actions/work/id.d.ts.map +1 -1
  109. package/dist/actions/work/index.d.ts.map +1 -1
  110. package/dist/actions/work/inline.d.ts.map +1 -1
  111. package/dist/actions/work/lifecycle.d.ts.map +1 -1
  112. package/dist/actions/work/lint.d.ts.map +1 -1
  113. package/dist/actions/work/list.d.ts.map +1 -1
  114. package/dist/actions/work/move.d.ts.map +1 -1
  115. package/dist/actions/work/priority.d.ts.map +1 -1
  116. package/dist/actions/work/queue.d.ts.map +1 -1
  117. package/dist/actions/work/render.d.ts.map +1 -1
  118. package/dist/actions/work/result.d.ts.map +1 -1
  119. package/dist/actions/work/schema.d.ts +3 -3
  120. package/dist/actions/work/schema.d.ts.map +1 -1
  121. package/dist/actions/work/store.d.ts.map +1 -1
  122. package/dist/actions/work/sync.d.ts.map +1 -1
  123. package/dist/actions/work/workspace.d.ts +1 -1
  124. package/dist/actions/work/workspace.d.ts.map +1 -1
  125. package/dist/bin/package/build.mjs +113 -19
  126. package/dist/bin/package/build.mjs.map +1 -1
  127. package/dist/bin/package/compile.mjs +113 -19
  128. package/dist/bin/package/compile.mjs.map +1 -1
  129. package/dist/bin/package/recompile.mjs +113 -19
  130. package/dist/bin/package/recompile.mjs.map +1 -1
  131. package/dist/bin/xy.mjs +876 -357
  132. package/dist/bin/xy.mjs.map +1 -1
  133. package/dist/lib/aliasSpec.d.ts +28 -0
  134. package/dist/lib/aliasSpec.d.ts.map +1 -0
  135. package/dist/lib/checkResult.d.ts +1 -1
  136. package/dist/lib/checkResult.d.ts.map +1 -1
  137. package/dist/lib/createBuildConfig.d.ts +1 -1
  138. package/dist/lib/createBuildConfig.d.ts.map +1 -1
  139. package/dist/lib/defaultBuildConfig.d.ts.map +1 -1
  140. package/dist/lib/deleteGlob.d.ts.map +1 -1
  141. package/dist/lib/dependencies/DuplicateDetector.d.ts.map +1 -1
  142. package/dist/lib/dependencies/detectDuplicateDependencies.d.ts.map +1 -1
  143. package/dist/lib/file/fileLines.d.ts.map +1 -1
  144. package/dist/lib/file/tryReadFileSync.d.ts.map +1 -1
  145. package/dist/lib/generateIgnoreFiles.d.ts.map +1 -1
  146. package/dist/lib/index.d.ts +1 -0
  147. package/dist/lib/index.d.ts.map +1 -1
  148. package/dist/lib/jsonFormatters.d.ts.map +1 -1
  149. package/dist/lib/latestVersions.d.ts +5 -5
  150. package/dist/lib/latestVersions.d.ts.map +1 -1
  151. package/dist/lib/loadConfig.d.ts.map +1 -1
  152. package/dist/lib/parsedPackageJson.d.ts.map +1 -1
  153. package/dist/lib/processEx.d.ts.map +1 -1
  154. package/dist/lib/ruleCommandRegistry.d.ts +44 -44
  155. package/dist/lib/ruleCommandRegistry.d.ts.map +1 -1
  156. package/dist/lib/runSteps.d.ts.map +1 -1
  157. package/dist/lib/runStepsAsync.d.ts.map +1 -1
  158. package/dist/lib/runXy.d.ts.map +1 -1
  159. package/dist/lib/runXyWithWarning.d.ts.map +1 -1
  160. package/dist/lib/safeExit.d.ts.map +1 -1
  161. package/dist/lib/string/empty.d.ts.map +1 -1
  162. package/dist/lib/string/union.d.ts.map +1 -1
  163. package/dist/lib/updo/collectWorkspaceDeps.d.ts.map +1 -1
  164. package/dist/lib/updo/index.d.ts +1 -0
  165. package/dist/lib/updo/index.d.ts.map +1 -1
  166. package/dist/lib/updo/interactiveSelect.d.ts.map +1 -1
  167. package/dist/lib/updo/interfaces.d.ts +20 -0
  168. package/dist/lib/updo/interfaces.d.ts.map +1 -1
  169. package/dist/lib/updo/majorCeiling.d.ts +21 -0
  170. package/dist/lib/updo/majorCeiling.d.ts.map +1 -0
  171. package/dist/lib/updo/resolveVersions.d.ts.map +1 -1
  172. package/dist/lib/updo/runUpdo.d.ts.map +1 -1
  173. package/dist/lib/withErrnoException.d.ts.map +1 -1
  174. package/dist/lib/withError.d.ts.map +1 -1
  175. package/dist/lib/yarn/isYarnVersionOrGreater.d.ts.map +1 -1
  176. package/dist/lib/yarn/workspace/yarnWorkspace.d.ts.map +1 -1
  177. package/dist/pm/bunPackageManager.d.ts +1 -1
  178. package/dist/pm/bunPackageManager.d.ts.map +1 -1
  179. package/dist/pm/npmPackageManager.d.ts +1 -1
  180. package/dist/pm/npmPackageManager.d.ts.map +1 -1
  181. package/dist/pm/pnpmPackageManager.d.ts +1 -1
  182. package/dist/pm/pnpmPackageManager.d.ts.map +1 -1
  183. package/dist/pm/yarnPackageManager.d.ts +1 -1
  184. package/dist/pm/yarnPackageManager.d.ts.map +1 -1
  185. package/dist/xy/build/index.d.ts.map +1 -1
  186. package/dist/xy/common/index.d.ts.map +1 -1
  187. package/dist/xy/common/repo/initCommand.d.ts.map +1 -1
  188. package/dist/xy/common/work/options.d.ts.map +1 -1
  189. package/dist/xy/deploy/index.d.ts.map +1 -1
  190. package/dist/xy/install/index.d.ts.map +1 -1
  191. package/dist/xy/lint/index.d.ts.map +1 -1
  192. package/dist/xy/param.d.ts.map +1 -1
  193. package/dist/xy/react/index.d.ts.map +1 -1
  194. package/dist/xy/xy.d.ts +2 -2
  195. package/dist/xy/xy.d.ts.map +1 -1
  196. package/package.json +9 -8
  197. package/templates/repo/cli/package/package.json.tmpl +5 -5
  198. package/templates/repo/cli/package/tsconfig.json.tmpl +4 -0
  199. package/templates/repo/cli/root/AGENTS.md.tmpl +34 -0
  200. package/templates/repo/cli/root/CLAUDE.md.tmpl +15 -15
  201. package/templates/repo/cli/root/eslint.config.ts.tmpl +16 -0
  202. package/templates/repo/cli/root/gitignore.tmpl +6 -9
  203. package/templates/repo/cli/root/package.json.tmpl +16 -14
  204. package/templates/repo/cli/root/tsconfig.json.tmpl +4 -0
  205. package/templates/repo/cli/root/{vitest.config.ts → vitest.config.ts.tmpl} +2 -2
  206. package/templates/repo/cli/package/tsconfig.json +0 -4
  207. package/templates/repo/cli/root/eslint.config.ts +0 -20
  208. package/templates/repo/cli/root/tsconfig.json +0 -4
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import Be, { createRequire } from "node:module";
3
- import process$1, { cwd } from "node:process";
3
+ import process$1, { cwd, execPath } from "node:process";
4
4
  import os from "node:os";
5
5
  import tty from "node:tty";
6
6
  import * as xi from "node:fs";
@@ -11143,16 +11143,88 @@ const warnDeprecatedEmptyObjectTargets = (targets) => {
11143
11143
  }
11144
11144
  };
11145
11145
  //#endregion
11146
+ //#region src/actions/package/compile/resolveTscBin.ts
11147
+ /**
11148
+ * Default `package.json` key the native compiler is expected under:
11149
+ * `"typescript-native": "npm:typescript@~7.0.2"`. Override per package with
11150
+ * `compile.nativePackage`.
11151
+ */
11152
+ const DEFAULT_NATIVE_PACKAGE = "typescript-native";
11153
+ const readTscBinEntry = (packageJsonPath) => {
11154
+ const { bin } = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
11155
+ if (typeof bin === "string") return bin;
11156
+ return bin?.tsc;
11157
+ };
11158
+ /**
11159
+ * Resolves a compiler package's `tsc` entry script from `fromDir`.
11160
+ *
11161
+ * We deliberately do not go through `node_modules/.bin/tsc`. Both the API
11162
+ * package (`typescript@6`) and the native compiler (`typescript@7`, installed
11163
+ * under an alias) declare a `tsc` bin, so the `.bin` shim is whichever one the
11164
+ * package manager linked last — observed to be the alias, silently, in both
11165
+ * declaration orders. Resolving the package explicitly makes the choice the
11166
+ * caller's rather than the installer's.
11167
+ */
11168
+ const resolveTscBin = (packageName, fromDir) => {
11169
+ try {
11170
+ const packageJsonPath = createRequire(PATH.join(fromDir, "package.json")).resolve(`${packageName}/package.json`);
11171
+ const binEntry = readTscBinEntry(packageJsonPath);
11172
+ if (binEntry === void 0) return void 0;
11173
+ return {
11174
+ binPath: PATH.resolve(PATH.dirname(packageJsonPath), binEntry),
11175
+ packageName
11176
+ };
11177
+ } catch {
11178
+ return;
11179
+ }
11180
+ };
11181
+ //#endregion
11146
11182
  //#region src/actions/package/compile/runTsc.ts
11147
- const runTsc = (configPath, isVerbose = false, extraArgs = []) => {
11183
+ const resolvedCache = /* @__PURE__ */ new Map();
11184
+ const resolveCached = (packageName, fromDir) => {
11185
+ const key = `${packageName}\0${fromDir}`;
11186
+ if (resolvedCache.has(key)) return resolvedCache.get(key);
11187
+ const resolved = resolveTscBin(packageName, fromDir);
11188
+ resolvedCache.set(key, resolved);
11189
+ return resolved;
11190
+ };
11191
+ const missingNativeMessage = (packageName) => [
11192
+ `Compile: compile.compiler is "native" but "${packageName}" is not installed.`,
11193
+ " Add it as an alias so it does not collide with the compiler API package:",
11194
+ ` "${packageName}": "npm:typescript@~7.0.2"`,
11195
+ " Keep \"typescript\" pinned to 6.x — ESLint and the xy analyzers load the compiler API from it."
11196
+ ].join("\n");
11197
+ /**
11198
+ * Runs `tsc -p <configPath>` against an explicitly resolved compiler.
11199
+ *
11200
+ * `native` selects the Go compiler (`typescript@7`) installed under an alias;
11201
+ * it is resolved from the package being compiled, not from `PATH`, because
11202
+ * both implementations declare a `tsc` bin and the `.bin` shim silently
11203
+ * resolves to whichever the package manager linked last.
11204
+ */
11205
+ const runTsc = (configPath, options = {}) => {
11206
+ const { compiler = "typescript", extraArgs = [], isVerbose = false, nativePackage = DEFAULT_NATIVE_PACKAGE } = options;
11207
+ const pkg = cwd();
11148
11208
  const args = [
11149
11209
  "-p",
11150
11210
  configPath,
11151
11211
  ...extraArgs
11152
11212
  ];
11153
- if (isVerbose) console.log(chalk.gray(`tsc ${args.join(" ")}`));
11154
- const result = spawnSync("tsc", args, {
11155
- cwd: cwd(),
11213
+ const packageName = compiler === "native" ? nativePackage : "typescript";
11214
+ const resolved = resolveCached(packageName, pkg);
11215
+ if (resolved === void 0 && compiler === "native") {
11216
+ console.error(chalk.red(missingNativeMessage(packageName)));
11217
+ return 1;
11218
+ }
11219
+ if (isVerbose) {
11220
+ const label = resolved === void 0 ? "tsc (PATH)" : `${resolved.packageName} ${resolved.binPath}`;
11221
+ console.log(chalk.gray(`tsc [${label}] ${args.join(" ")}`));
11222
+ }
11223
+ const result = resolved === void 0 ? spawnSync("tsc", args, {
11224
+ cwd: pkg,
11225
+ stdio: "inherit"
11226
+ }) : spawnSync(execPath, [resolved.binPath, ...args], {
11227
+ cwd: pkg,
11156
11228
  stdio: "inherit"
11157
11229
  });
11158
11230
  return result.status ?? (result.error === void 0 ? 0 : 1);
@@ -11205,7 +11277,7 @@ const createFullValidationConfig = (pkg, tsconfigPath) => {
11205
11277
  diagnostics: parsed.errors
11206
11278
  };
11207
11279
  };
11208
- const validateFullPackage = (pkg, isVerbose = false) => {
11280
+ const validateFullPackage = (pkg, isVerbose = false, tsc = {}) => {
11209
11281
  const tsconfigPath = PATH.resolve(pkg, "tsconfig.json");
11210
11282
  if (!fs.existsSync(tsconfigPath)) {
11211
11283
  console.warn(chalk.yellow("Compile:Validate skipped — tsconfig.json not found"));
@@ -11217,7 +11289,10 @@ const validateFullPackage = (pkg, isVerbose = false) => {
11217
11289
  console.error(formatTsConfigDiagnostics(diagnostics, pkg));
11218
11290
  return 1;
11219
11291
  }
11220
- const result = runTsc(configPath, isVerbose);
11292
+ const result = runTsc(configPath, {
11293
+ ...tsc,
11294
+ isVerbose
11295
+ });
11221
11296
  if (result !== 0) console.error(chalk.red(`Compile:Validate failed (tsc exit code ${result})`));
11222
11297
  return result;
11223
11298
  };
@@ -11391,7 +11466,7 @@ const resolvePlatformEsbuildOptions = (value) => {
11391
11466
  const getRootOutDir = (options) => {
11392
11467
  return options.outDir ?? options.outdir ?? "dist";
11393
11468
  };
11394
- const compileFolder = async (srcDir, entries, options, platform, outDir, shouldCheckTypes, emitDeclarations, entryMode, isVerbose) => {
11469
+ const compileFolder = async (srcDir, entries, options, platform, outDir, shouldCheckTypes, emitDeclarations, entryMode, isVerbose, tsc = {}) => {
11395
11470
  const pkg = cwd();
11396
11471
  if (isVerbose ?? false) console.log(chalk.gray(`compileFolder [${srcDir}, ${outDir}]`));
11397
11472
  if (!fs.existsSync(PATH.resolve(pkg, srcDir))) {
@@ -11404,7 +11479,10 @@ const compileFolder = async (srcDir, entries, options, platform, outDir, shouldC
11404
11479
  }
11405
11480
  const checkConfig = writeTypescriptConfig(pkg, platform, srcDir, false);
11406
11481
  if (shouldCheckTypes) {
11407
- const checkResult = runTsc(checkConfig, isVerbose);
11482
+ const checkResult = runTsc(checkConfig, {
11483
+ ...tsc,
11484
+ isVerbose
11485
+ });
11408
11486
  if (checkResult !== 0) {
11409
11487
  console.error(chalk.red(`Compile:Validation had ${checkResult} errors`));
11410
11488
  return checkResult;
@@ -11437,7 +11515,7 @@ const compileFolder = async (srcDir, entries, options, platform, outDir, shouldC
11437
11515
  if (isVerbose ?? false) console.log(chalk.cyan(`ESBUILD:build:stop [${srcDir}]`));
11438
11516
  return 0;
11439
11517
  };
11440
- function createDeclarationEmitter(isVerbose = false) {
11518
+ function createDeclarationEmitter(isVerbose = false, tsc = {}) {
11441
11519
  const declarationPromises = /* @__PURE__ */ new Map();
11442
11520
  return async (srcDir, rootOutDir, platform, outDir) => {
11443
11521
  const key = `${srcDir}\0${rootOutDir}`;
@@ -11447,7 +11525,10 @@ function createDeclarationEmitter(isVerbose = false) {
11447
11525
  const dtsConfig = writeTypescriptConfig(cwd(), platform, srcDir, true, outDir);
11448
11526
  return {
11449
11527
  outDir,
11450
- result: runTsc(dtsConfig, isVerbose)
11528
+ result: runTsc(dtsConfig, {
11529
+ ...tsc,
11530
+ isVerbose
11531
+ })
11451
11532
  };
11452
11533
  })();
11453
11534
  declarationPromises.set(key, promise);
@@ -11468,10 +11549,14 @@ function resolveCompileMode(config, mode) {
11468
11549
  shouldEmit,
11469
11550
  shouldRunFolderChecks: !shouldRunFullValidation && !(mode.emitOnly ?? false),
11470
11551
  shouldRunFullValidation,
11552
+ tsc: {
11553
+ compiler: compile?.compiler,
11554
+ nativePackage: compile?.nativePackage
11555
+ },
11471
11556
  isVerbose
11472
11557
  };
11473
11558
  }
11474
- async function compilePlatformEntries({ shouldCheckTypes, compile, emitDeclarations, entries, legacyTsupOptions, platform, platformEsbuild, isVerbose }) {
11559
+ async function compilePlatformEntries({ shouldCheckTypes, compile, emitDeclarations, entries, legacyTsupOptions, platform, platformEsbuild, isVerbose, tsc }) {
11475
11560
  return (await Promise.all(Object.entries(entries).map(async ([srcDir, options]) => {
11476
11561
  const rootOutDir = getRootOutDir(options);
11477
11562
  const outDir = `${rootOutDir}/${platform}`;
@@ -11484,14 +11569,14 @@ async function compilePlatformEntries({ shouldCheckTypes, compile, emitDeclarati
11484
11569
  compile?.esbuild?.options ?? {},
11485
11570
  options,
11486
11571
  { outdir: outDir }
11487
- ], isVerbose), platform, outDir, shouldCheckTypes, () => emitDeclarations(srcDir, rootOutDir, platform, outDir), entryMode, isVerbose);
11572
+ ], isVerbose), platform, outDir, shouldCheckTypes, () => emitDeclarations(srcDir, rootOutDir, platform, outDir), entryMode, isVerbose, tsc);
11488
11573
  }))).reduce((prev, value) => prev + value, 0);
11489
11574
  }
11490
11575
  const packageCompileEsbuild = async (config, mode = {}) => {
11491
- const { compile, shouldEmit, shouldRunFolderChecks, shouldRunFullValidation, isVerbose } = resolveCompileMode(config, mode);
11492
- if (isVerbose) console.log("Compiling with esbuild and tsc");
11576
+ const { compile, shouldEmit, shouldRunFolderChecks, shouldRunFullValidation, tsc, isVerbose } = resolveCompileMode(config, mode);
11577
+ if (isVerbose) console.log(`Compiling with esbuild and ${tsc.compiler === "native" ? "the native tsc" : "tsc"}`);
11493
11578
  if (shouldRunFullValidation) {
11494
- const validateResult = validateFullPackage(cwd(), isVerbose);
11579
+ const validateResult = validateFullPackage(cwd(), isVerbose, tsc);
11495
11580
  if (validateResult !== 0) return validateResult;
11496
11581
  }
11497
11582
  if (!shouldEmit) return 0;
@@ -11504,7 +11589,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
11504
11589
  const browserEsbuild = resolvePlatformEsbuildOptions(compile?.browser);
11505
11590
  const neutralEsbuild = resolvePlatformEsbuildOptions(compile?.neutral);
11506
11591
  const legacyTsupOptions = compile?.tsup?.options;
11507
- const emitDeclarations = createDeclarationEmitter(isVerbose);
11592
+ const emitDeclarations = createDeclarationEmitter(isVerbose, tsc);
11508
11593
  const [nodeErrors, browserErrors, neutralErrors] = await Promise.all([
11509
11594
  compilePlatformEntries({
11510
11595
  shouldCheckTypes: shouldRunFolderChecks,
@@ -11514,6 +11599,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
11514
11599
  legacyTsupOptions,
11515
11600
  platform: "node",
11516
11601
  platformEsbuild: nodeEsbuild,
11602
+ tsc,
11517
11603
  isVerbose
11518
11604
  }),
11519
11605
  compilePlatformEntries({
@@ -11524,6 +11610,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
11524
11610
  legacyTsupOptions,
11525
11611
  platform: "browser",
11526
11612
  platformEsbuild: browserEsbuild,
11613
+ tsc,
11527
11614
  isVerbose
11528
11615
  }),
11529
11616
  compilePlatformEntries({
@@ -11534,6 +11621,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
11534
11621
  legacyTsupOptions,
11535
11622
  platform: "neutral",
11536
11623
  platformEsbuild: neutralEsbuild,
11624
+ tsc,
11537
11625
  isVerbose
11538
11626
  })
11539
11627
  ]);
@@ -12351,7 +12439,10 @@ const packageCompileMonolith = async (config, mode = {}) => {
12351
12439
  if (isVerbose) console.log(chalk.gray("monolith layout synced"));
12352
12440
  }
12353
12441
  if (shouldRunFullValidation) {
12354
- const validateResult = validateFullPackage(packageDir, isVerbose);
12442
+ const validateResult = validateFullPackage(packageDir, isVerbose, {
12443
+ compiler: compile.compiler,
12444
+ nativePackage: compile.nativePackage
12445
+ });
12355
12446
  if (validateResult !== 0) return validateResult;
12356
12447
  }
12357
12448
  if (!shouldEmit) return 0;
@@ -12892,7 +12983,10 @@ const packageCompileVendor = async (config, mode = {}) => {
12892
12983
  if (compile.vendorPackages?.scopes === void 0 || compile.vendorPackages.scopes.length === 0) throw new Error("vendor mode requires compile.vendorPackages.scopes");
12893
12984
  if (isVerbose) console.log(chalk.gray("Compiling with vendor mode"));
12894
12985
  if (shouldRunFullValidation) {
12895
- const validateResult = validateFullPackage(cwd(), isVerbose);
12986
+ const validateResult = validateFullPackage(cwd(), isVerbose, {
12987
+ compiler: compile.compiler,
12988
+ nativePackage: compile.nativePackage
12989
+ });
12896
12990
  if (validateResult !== 0) return validateResult;
12897
12991
  }
12898
12992
  if (!shouldEmit) return 0;