@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
|
@@ -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";
|
|
@@ -10446,16 +10446,88 @@ const warnDeprecatedEmptyObjectTargets = (targets) => {
|
|
|
10446
10446
|
}
|
|
10447
10447
|
};
|
|
10448
10448
|
//#endregion
|
|
10449
|
+
//#region src/actions/package/compile/resolveTscBin.ts
|
|
10450
|
+
/**
|
|
10451
|
+
* Default `package.json` key the native compiler is expected under:
|
|
10452
|
+
* `"typescript-native": "npm:typescript@~7.0.2"`. Override per package with
|
|
10453
|
+
* `compile.nativePackage`.
|
|
10454
|
+
*/
|
|
10455
|
+
const DEFAULT_NATIVE_PACKAGE = "typescript-native";
|
|
10456
|
+
const readTscBinEntry = (packageJsonPath) => {
|
|
10457
|
+
const { bin } = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
10458
|
+
if (typeof bin === "string") return bin;
|
|
10459
|
+
return bin?.tsc;
|
|
10460
|
+
};
|
|
10461
|
+
/**
|
|
10462
|
+
* Resolves a compiler package's `tsc` entry script from `fromDir`.
|
|
10463
|
+
*
|
|
10464
|
+
* We deliberately do not go through `node_modules/.bin/tsc`. Both the API
|
|
10465
|
+
* package (`typescript@6`) and the native compiler (`typescript@7`, installed
|
|
10466
|
+
* under an alias) declare a `tsc` bin, so the `.bin` shim is whichever one the
|
|
10467
|
+
* package manager linked last — observed to be the alias, silently, in both
|
|
10468
|
+
* declaration orders. Resolving the package explicitly makes the choice the
|
|
10469
|
+
* caller's rather than the installer's.
|
|
10470
|
+
*/
|
|
10471
|
+
const resolveTscBin = (packageName, fromDir) => {
|
|
10472
|
+
try {
|
|
10473
|
+
const packageJsonPath = createRequire(PATH.join(fromDir, "package.json")).resolve(`${packageName}/package.json`);
|
|
10474
|
+
const binEntry = readTscBinEntry(packageJsonPath);
|
|
10475
|
+
if (binEntry === void 0) return void 0;
|
|
10476
|
+
return {
|
|
10477
|
+
binPath: PATH.resolve(PATH.dirname(packageJsonPath), binEntry),
|
|
10478
|
+
packageName
|
|
10479
|
+
};
|
|
10480
|
+
} catch {
|
|
10481
|
+
return;
|
|
10482
|
+
}
|
|
10483
|
+
};
|
|
10484
|
+
//#endregion
|
|
10449
10485
|
//#region src/actions/package/compile/runTsc.ts
|
|
10450
|
-
const
|
|
10486
|
+
const resolvedCache = /* @__PURE__ */ new Map();
|
|
10487
|
+
const resolveCached = (packageName, fromDir) => {
|
|
10488
|
+
const key = `${packageName}\0${fromDir}`;
|
|
10489
|
+
if (resolvedCache.has(key)) return resolvedCache.get(key);
|
|
10490
|
+
const resolved = resolveTscBin(packageName, fromDir);
|
|
10491
|
+
resolvedCache.set(key, resolved);
|
|
10492
|
+
return resolved;
|
|
10493
|
+
};
|
|
10494
|
+
const missingNativeMessage = (packageName) => [
|
|
10495
|
+
`Compile: compile.compiler is "native" but "${packageName}" is not installed.`,
|
|
10496
|
+
" Add it as an alias so it does not collide with the compiler API package:",
|
|
10497
|
+
` "${packageName}": "npm:typescript@~7.0.2"`,
|
|
10498
|
+
" Keep \"typescript\" pinned to 6.x — ESLint and the xy analyzers load the compiler API from it."
|
|
10499
|
+
].join("\n");
|
|
10500
|
+
/**
|
|
10501
|
+
* Runs `tsc -p <configPath>` against an explicitly resolved compiler.
|
|
10502
|
+
*
|
|
10503
|
+
* `native` selects the Go compiler (`typescript@7`) installed under an alias;
|
|
10504
|
+
* it is resolved from the package being compiled, not from `PATH`, because
|
|
10505
|
+
* both implementations declare a `tsc` bin and the `.bin` shim silently
|
|
10506
|
+
* resolves to whichever the package manager linked last.
|
|
10507
|
+
*/
|
|
10508
|
+
const runTsc = (configPath, options = {}) => {
|
|
10509
|
+
const { compiler = "typescript", extraArgs = [], isVerbose = false, nativePackage = DEFAULT_NATIVE_PACKAGE } = options;
|
|
10510
|
+
const pkg = cwd();
|
|
10451
10511
|
const args = [
|
|
10452
10512
|
"-p",
|
|
10453
10513
|
configPath,
|
|
10454
10514
|
...extraArgs
|
|
10455
10515
|
];
|
|
10456
|
-
|
|
10457
|
-
const
|
|
10458
|
-
|
|
10516
|
+
const packageName = compiler === "native" ? nativePackage : "typescript";
|
|
10517
|
+
const resolved = resolveCached(packageName, pkg);
|
|
10518
|
+
if (resolved === void 0 && compiler === "native") {
|
|
10519
|
+
console.error(chalk.red(missingNativeMessage(packageName)));
|
|
10520
|
+
return 1;
|
|
10521
|
+
}
|
|
10522
|
+
if (isVerbose) {
|
|
10523
|
+
const label = resolved === void 0 ? "tsc (PATH)" : `${resolved.packageName} ${resolved.binPath}`;
|
|
10524
|
+
console.log(chalk.gray(`tsc [${label}] ${args.join(" ")}`));
|
|
10525
|
+
}
|
|
10526
|
+
const result = resolved === void 0 ? spawnSync("tsc", args, {
|
|
10527
|
+
cwd: pkg,
|
|
10528
|
+
stdio: "inherit"
|
|
10529
|
+
}) : spawnSync(execPath, [resolved.binPath, ...args], {
|
|
10530
|
+
cwd: pkg,
|
|
10459
10531
|
stdio: "inherit"
|
|
10460
10532
|
});
|
|
10461
10533
|
return result.status ?? (result.error === void 0 ? 0 : 1);
|
|
@@ -10508,7 +10580,7 @@ const createFullValidationConfig = (pkg, tsconfigPath) => {
|
|
|
10508
10580
|
diagnostics: parsed.errors
|
|
10509
10581
|
};
|
|
10510
10582
|
};
|
|
10511
|
-
const validateFullPackage = (pkg, isVerbose = false) => {
|
|
10583
|
+
const validateFullPackage = (pkg, isVerbose = false, tsc = {}) => {
|
|
10512
10584
|
const tsconfigPath = PATH.resolve(pkg, "tsconfig.json");
|
|
10513
10585
|
if (!fs.existsSync(tsconfigPath)) {
|
|
10514
10586
|
console.warn(chalk.yellow("Compile:Validate skipped — tsconfig.json not found"));
|
|
@@ -10520,7 +10592,10 @@ const validateFullPackage = (pkg, isVerbose = false) => {
|
|
|
10520
10592
|
console.error(formatTsConfigDiagnostics(diagnostics, pkg));
|
|
10521
10593
|
return 1;
|
|
10522
10594
|
}
|
|
10523
|
-
const result = runTsc(configPath,
|
|
10595
|
+
const result = runTsc(configPath, {
|
|
10596
|
+
...tsc,
|
|
10597
|
+
isVerbose
|
|
10598
|
+
});
|
|
10524
10599
|
if (result !== 0) console.error(chalk.red(`Compile:Validate failed (tsc exit code ${result})`));
|
|
10525
10600
|
return result;
|
|
10526
10601
|
};
|
|
@@ -10694,7 +10769,7 @@ const resolvePlatformEsbuildOptions = (value) => {
|
|
|
10694
10769
|
const getRootOutDir = (options) => {
|
|
10695
10770
|
return options.outDir ?? options.outdir ?? "dist";
|
|
10696
10771
|
};
|
|
10697
|
-
const compileFolder = async (srcDir, entries, options, platform, outDir, shouldCheckTypes, emitDeclarations, entryMode, isVerbose) => {
|
|
10772
|
+
const compileFolder = async (srcDir, entries, options, platform, outDir, shouldCheckTypes, emitDeclarations, entryMode, isVerbose, tsc = {}) => {
|
|
10698
10773
|
const pkg = cwd();
|
|
10699
10774
|
if (isVerbose ?? false) console.log(chalk.gray(`compileFolder [${srcDir}, ${outDir}]`));
|
|
10700
10775
|
if (!fs.existsSync(PATH.resolve(pkg, srcDir))) {
|
|
@@ -10707,7 +10782,10 @@ const compileFolder = async (srcDir, entries, options, platform, outDir, shouldC
|
|
|
10707
10782
|
}
|
|
10708
10783
|
const checkConfig = writeTypescriptConfig(pkg, platform, srcDir, false);
|
|
10709
10784
|
if (shouldCheckTypes) {
|
|
10710
|
-
const checkResult = runTsc(checkConfig,
|
|
10785
|
+
const checkResult = runTsc(checkConfig, {
|
|
10786
|
+
...tsc,
|
|
10787
|
+
isVerbose
|
|
10788
|
+
});
|
|
10711
10789
|
if (checkResult !== 0) {
|
|
10712
10790
|
console.error(chalk.red(`Compile:Validation had ${checkResult} errors`));
|
|
10713
10791
|
return checkResult;
|
|
@@ -10740,7 +10818,7 @@ const compileFolder = async (srcDir, entries, options, platform, outDir, shouldC
|
|
|
10740
10818
|
if (isVerbose ?? false) console.log(chalk.cyan(`ESBUILD:build:stop [${srcDir}]`));
|
|
10741
10819
|
return 0;
|
|
10742
10820
|
};
|
|
10743
|
-
function createDeclarationEmitter(isVerbose = false) {
|
|
10821
|
+
function createDeclarationEmitter(isVerbose = false, tsc = {}) {
|
|
10744
10822
|
const declarationPromises = /* @__PURE__ */ new Map();
|
|
10745
10823
|
return async (srcDir, rootOutDir, platform, outDir) => {
|
|
10746
10824
|
const key = `${srcDir}\0${rootOutDir}`;
|
|
@@ -10750,7 +10828,10 @@ function createDeclarationEmitter(isVerbose = false) {
|
|
|
10750
10828
|
const dtsConfig = writeTypescriptConfig(cwd(), platform, srcDir, true, outDir);
|
|
10751
10829
|
return {
|
|
10752
10830
|
outDir,
|
|
10753
|
-
result: runTsc(dtsConfig,
|
|
10831
|
+
result: runTsc(dtsConfig, {
|
|
10832
|
+
...tsc,
|
|
10833
|
+
isVerbose
|
|
10834
|
+
})
|
|
10754
10835
|
};
|
|
10755
10836
|
})();
|
|
10756
10837
|
declarationPromises.set(key, promise);
|
|
@@ -10771,10 +10852,14 @@ function resolveCompileMode(config, mode) {
|
|
|
10771
10852
|
shouldEmit,
|
|
10772
10853
|
shouldRunFolderChecks: !shouldRunFullValidation && !(mode.emitOnly ?? false),
|
|
10773
10854
|
shouldRunFullValidation,
|
|
10855
|
+
tsc: {
|
|
10856
|
+
compiler: compile?.compiler,
|
|
10857
|
+
nativePackage: compile?.nativePackage
|
|
10858
|
+
},
|
|
10774
10859
|
isVerbose
|
|
10775
10860
|
};
|
|
10776
10861
|
}
|
|
10777
|
-
async function compilePlatformEntries({ shouldCheckTypes, compile, emitDeclarations, entries, legacyTsupOptions, platform, platformEsbuild, isVerbose }) {
|
|
10862
|
+
async function compilePlatformEntries({ shouldCheckTypes, compile, emitDeclarations, entries, legacyTsupOptions, platform, platformEsbuild, isVerbose, tsc }) {
|
|
10778
10863
|
return (await Promise.all(Object.entries(entries).map(async ([srcDir, options]) => {
|
|
10779
10864
|
const rootOutDir = getRootOutDir(options);
|
|
10780
10865
|
const outDir = `${rootOutDir}/${platform}`;
|
|
@@ -10787,14 +10872,14 @@ async function compilePlatformEntries({ shouldCheckTypes, compile, emitDeclarati
|
|
|
10787
10872
|
compile?.esbuild?.options ?? {},
|
|
10788
10873
|
options,
|
|
10789
10874
|
{ outdir: outDir }
|
|
10790
|
-
], isVerbose), platform, outDir, shouldCheckTypes, () => emitDeclarations(srcDir, rootOutDir, platform, outDir), entryMode, isVerbose);
|
|
10875
|
+
], isVerbose), platform, outDir, shouldCheckTypes, () => emitDeclarations(srcDir, rootOutDir, platform, outDir), entryMode, isVerbose, tsc);
|
|
10791
10876
|
}))).reduce((prev, value) => prev + value, 0);
|
|
10792
10877
|
}
|
|
10793
10878
|
const packageCompileEsbuild = async (config, mode = {}) => {
|
|
10794
|
-
const { compile, shouldEmit, shouldRunFolderChecks, shouldRunFullValidation, isVerbose } = resolveCompileMode(config, mode);
|
|
10795
|
-
if (isVerbose) console.log(
|
|
10879
|
+
const { compile, shouldEmit, shouldRunFolderChecks, shouldRunFullValidation, tsc, isVerbose } = resolveCompileMode(config, mode);
|
|
10880
|
+
if (isVerbose) console.log(`Compiling with esbuild and ${tsc.compiler === "native" ? "the native tsc" : "tsc"}`);
|
|
10796
10881
|
if (shouldRunFullValidation) {
|
|
10797
|
-
const validateResult = validateFullPackage(cwd(), isVerbose);
|
|
10882
|
+
const validateResult = validateFullPackage(cwd(), isVerbose, tsc);
|
|
10798
10883
|
if (validateResult !== 0) return validateResult;
|
|
10799
10884
|
}
|
|
10800
10885
|
if (!shouldEmit) return 0;
|
|
@@ -10807,7 +10892,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
|
|
|
10807
10892
|
const browserEsbuild = resolvePlatformEsbuildOptions(compile?.browser);
|
|
10808
10893
|
const neutralEsbuild = resolvePlatformEsbuildOptions(compile?.neutral);
|
|
10809
10894
|
const legacyTsupOptions = compile?.tsup?.options;
|
|
10810
|
-
const emitDeclarations = createDeclarationEmitter(isVerbose);
|
|
10895
|
+
const emitDeclarations = createDeclarationEmitter(isVerbose, tsc);
|
|
10811
10896
|
const [nodeErrors, browserErrors, neutralErrors] = await Promise.all([
|
|
10812
10897
|
compilePlatformEntries({
|
|
10813
10898
|
shouldCheckTypes: shouldRunFolderChecks,
|
|
@@ -10817,6 +10902,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
|
|
|
10817
10902
|
legacyTsupOptions,
|
|
10818
10903
|
platform: "node",
|
|
10819
10904
|
platformEsbuild: nodeEsbuild,
|
|
10905
|
+
tsc,
|
|
10820
10906
|
isVerbose
|
|
10821
10907
|
}),
|
|
10822
10908
|
compilePlatformEntries({
|
|
@@ -10827,6 +10913,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
|
|
|
10827
10913
|
legacyTsupOptions,
|
|
10828
10914
|
platform: "browser",
|
|
10829
10915
|
platformEsbuild: browserEsbuild,
|
|
10916
|
+
tsc,
|
|
10830
10917
|
isVerbose
|
|
10831
10918
|
}),
|
|
10832
10919
|
compilePlatformEntries({
|
|
@@ -10837,6 +10924,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
|
|
|
10837
10924
|
legacyTsupOptions,
|
|
10838
10925
|
platform: "neutral",
|
|
10839
10926
|
platformEsbuild: neutralEsbuild,
|
|
10927
|
+
tsc,
|
|
10840
10928
|
isVerbose
|
|
10841
10929
|
})
|
|
10842
10930
|
]);
|
|
@@ -11654,7 +11742,10 @@ const packageCompileMonolith = async (config, mode = {}) => {
|
|
|
11654
11742
|
if (isVerbose) console.log(chalk.gray("monolith layout synced"));
|
|
11655
11743
|
}
|
|
11656
11744
|
if (shouldRunFullValidation) {
|
|
11657
|
-
const validateResult = validateFullPackage(packageDir, isVerbose
|
|
11745
|
+
const validateResult = validateFullPackage(packageDir, isVerbose, {
|
|
11746
|
+
compiler: compile.compiler,
|
|
11747
|
+
nativePackage: compile.nativePackage
|
|
11748
|
+
});
|
|
11658
11749
|
if (validateResult !== 0) return validateResult;
|
|
11659
11750
|
}
|
|
11660
11751
|
if (!shouldEmit) return 0;
|
|
@@ -12195,7 +12286,10 @@ const packageCompileVendor = async (config, mode = {}) => {
|
|
|
12195
12286
|
if (compile.vendorPackages?.scopes === void 0 || compile.vendorPackages.scopes.length === 0) throw new Error("vendor mode requires compile.vendorPackages.scopes");
|
|
12196
12287
|
if (isVerbose) console.log(chalk.gray("Compiling with vendor mode"));
|
|
12197
12288
|
if (shouldRunFullValidation) {
|
|
12198
|
-
const validateResult = validateFullPackage(cwd(), isVerbose
|
|
12289
|
+
const validateResult = validateFullPackage(cwd(), isVerbose, {
|
|
12290
|
+
compiler: compile.compiler,
|
|
12291
|
+
nativePackage: compile.nativePackage
|
|
12292
|
+
});
|
|
12199
12293
|
if (validateResult !== 0) return validateResult;
|
|
12200
12294
|
}
|
|
12201
12295
|
if (!shouldEmit) return 0;
|