@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, { builtinModules, 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";
|
|
@@ -12290,16 +12290,88 @@ const warnDeprecatedEmptyObjectTargets = (targets) => {
|
|
|
12290
12290
|
}
|
|
12291
12291
|
};
|
|
12292
12292
|
//#endregion
|
|
12293
|
+
//#region src/actions/package/compile/resolveTscBin.ts
|
|
12294
|
+
/**
|
|
12295
|
+
* Default `package.json` key the native compiler is expected under:
|
|
12296
|
+
* `"typescript-native": "npm:typescript@~7.0.2"`. Override per package with
|
|
12297
|
+
* `compile.nativePackage`.
|
|
12298
|
+
*/
|
|
12299
|
+
const DEFAULT_NATIVE_PACKAGE = "typescript-native";
|
|
12300
|
+
const readTscBinEntry = (packageJsonPath) => {
|
|
12301
|
+
const { bin } = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
12302
|
+
if (typeof bin === "string") return bin;
|
|
12303
|
+
return bin?.tsc;
|
|
12304
|
+
};
|
|
12305
|
+
/**
|
|
12306
|
+
* Resolves a compiler package's `tsc` entry script from `fromDir`.
|
|
12307
|
+
*
|
|
12308
|
+
* We deliberately do not go through `node_modules/.bin/tsc`. Both the API
|
|
12309
|
+
* package (`typescript@6`) and the native compiler (`typescript@7`, installed
|
|
12310
|
+
* under an alias) declare a `tsc` bin, so the `.bin` shim is whichever one the
|
|
12311
|
+
* package manager linked last — observed to be the alias, silently, in both
|
|
12312
|
+
* declaration orders. Resolving the package explicitly makes the choice the
|
|
12313
|
+
* caller's rather than the installer's.
|
|
12314
|
+
*/
|
|
12315
|
+
const resolveTscBin = (packageName, fromDir) => {
|
|
12316
|
+
try {
|
|
12317
|
+
const packageJsonPath = createRequire(PATH.join(fromDir, "package.json")).resolve(`${packageName}/package.json`);
|
|
12318
|
+
const binEntry = readTscBinEntry(packageJsonPath);
|
|
12319
|
+
if (binEntry === void 0) return void 0;
|
|
12320
|
+
return {
|
|
12321
|
+
binPath: PATH.resolve(PATH.dirname(packageJsonPath), binEntry),
|
|
12322
|
+
packageName
|
|
12323
|
+
};
|
|
12324
|
+
} catch {
|
|
12325
|
+
return;
|
|
12326
|
+
}
|
|
12327
|
+
};
|
|
12328
|
+
//#endregion
|
|
12293
12329
|
//#region src/actions/package/compile/runTsc.ts
|
|
12294
|
-
const
|
|
12330
|
+
const resolvedCache = /* @__PURE__ */ new Map();
|
|
12331
|
+
const resolveCached = (packageName, fromDir) => {
|
|
12332
|
+
const key = `${packageName}\0${fromDir}`;
|
|
12333
|
+
if (resolvedCache.has(key)) return resolvedCache.get(key);
|
|
12334
|
+
const resolved = resolveTscBin(packageName, fromDir);
|
|
12335
|
+
resolvedCache.set(key, resolved);
|
|
12336
|
+
return resolved;
|
|
12337
|
+
};
|
|
12338
|
+
const missingNativeMessage = (packageName) => [
|
|
12339
|
+
`Compile: compile.compiler is "native" but "${packageName}" is not installed.`,
|
|
12340
|
+
" Add it as an alias so it does not collide with the compiler API package:",
|
|
12341
|
+
` "${packageName}": "npm:typescript@~7.0.2"`,
|
|
12342
|
+
" Keep \"typescript\" pinned to 6.x — ESLint and the xy analyzers load the compiler API from it."
|
|
12343
|
+
].join("\n");
|
|
12344
|
+
/**
|
|
12345
|
+
* Runs `tsc -p <configPath>` against an explicitly resolved compiler.
|
|
12346
|
+
*
|
|
12347
|
+
* `native` selects the Go compiler (`typescript@7`) installed under an alias;
|
|
12348
|
+
* it is resolved from the package being compiled, not from `PATH`, because
|
|
12349
|
+
* both implementations declare a `tsc` bin and the `.bin` shim silently
|
|
12350
|
+
* resolves to whichever the package manager linked last.
|
|
12351
|
+
*/
|
|
12352
|
+
const runTsc = (configPath, options = {}) => {
|
|
12353
|
+
const { compiler = "typescript", extraArgs = [], isVerbose = false, nativePackage = DEFAULT_NATIVE_PACKAGE } = options;
|
|
12354
|
+
const pkg = cwd();
|
|
12295
12355
|
const args = [
|
|
12296
12356
|
"-p",
|
|
12297
12357
|
configPath,
|
|
12298
12358
|
...extraArgs
|
|
12299
12359
|
];
|
|
12300
|
-
|
|
12301
|
-
const
|
|
12302
|
-
|
|
12360
|
+
const packageName = compiler === "native" ? nativePackage : "typescript";
|
|
12361
|
+
const resolved = resolveCached(packageName, pkg);
|
|
12362
|
+
if (resolved === void 0 && compiler === "native") {
|
|
12363
|
+
console.error(chalk.red(missingNativeMessage(packageName)));
|
|
12364
|
+
return 1;
|
|
12365
|
+
}
|
|
12366
|
+
if (isVerbose) {
|
|
12367
|
+
const label = resolved === void 0 ? "tsc (PATH)" : `${resolved.packageName} ${resolved.binPath}`;
|
|
12368
|
+
console.log(chalk.gray(`tsc [${label}] ${args.join(" ")}`));
|
|
12369
|
+
}
|
|
12370
|
+
const result = resolved === void 0 ? spawnSync("tsc", args, {
|
|
12371
|
+
cwd: pkg,
|
|
12372
|
+
stdio: "inherit"
|
|
12373
|
+
}) : spawnSync(execPath, [resolved.binPath, ...args], {
|
|
12374
|
+
cwd: pkg,
|
|
12303
12375
|
stdio: "inherit"
|
|
12304
12376
|
});
|
|
12305
12377
|
return result.status ?? (result.error === void 0 ? 0 : 1);
|
|
@@ -12352,7 +12424,7 @@ const createFullValidationConfig = (pkg, tsconfigPath) => {
|
|
|
12352
12424
|
diagnostics: parsed.errors
|
|
12353
12425
|
};
|
|
12354
12426
|
};
|
|
12355
|
-
const validateFullPackage = (pkg, isVerbose = false) => {
|
|
12427
|
+
const validateFullPackage = (pkg, isVerbose = false, tsc = {}) => {
|
|
12356
12428
|
const tsconfigPath = PATH.resolve(pkg, "tsconfig.json");
|
|
12357
12429
|
if (!fs.existsSync(tsconfigPath)) {
|
|
12358
12430
|
console.warn(chalk.yellow("Compile:Validate skipped — tsconfig.json not found"));
|
|
@@ -12364,7 +12436,10 @@ const validateFullPackage = (pkg, isVerbose = false) => {
|
|
|
12364
12436
|
console.error(formatTsConfigDiagnostics(diagnostics, pkg));
|
|
12365
12437
|
return 1;
|
|
12366
12438
|
}
|
|
12367
|
-
const result = runTsc(configPath,
|
|
12439
|
+
const result = runTsc(configPath, {
|
|
12440
|
+
...tsc,
|
|
12441
|
+
isVerbose
|
|
12442
|
+
});
|
|
12368
12443
|
if (result !== 0) console.error(chalk.red(`Compile:Validate failed (tsc exit code ${result})`));
|
|
12369
12444
|
return result;
|
|
12370
12445
|
};
|
|
@@ -12538,7 +12613,7 @@ const resolvePlatformEsbuildOptions = (value) => {
|
|
|
12538
12613
|
const getRootOutDir$1 = (options) => {
|
|
12539
12614
|
return options.outDir ?? options.outdir ?? "dist";
|
|
12540
12615
|
};
|
|
12541
|
-
const compileFolder = async (srcDir, entries, options, platform, outDir, shouldCheckTypes, emitDeclarations, entryMode, isVerbose) => {
|
|
12616
|
+
const compileFolder = async (srcDir, entries, options, platform, outDir, shouldCheckTypes, emitDeclarations, entryMode, isVerbose, tsc = {}) => {
|
|
12542
12617
|
const pkg = cwd();
|
|
12543
12618
|
if (isVerbose ?? false) console.log(chalk.gray(`compileFolder [${srcDir}, ${outDir}]`));
|
|
12544
12619
|
if (!fs.existsSync(PATH.resolve(pkg, srcDir))) {
|
|
@@ -12551,7 +12626,10 @@ const compileFolder = async (srcDir, entries, options, platform, outDir, shouldC
|
|
|
12551
12626
|
}
|
|
12552
12627
|
const checkConfig = writeTypescriptConfig(pkg, platform, srcDir, false);
|
|
12553
12628
|
if (shouldCheckTypes) {
|
|
12554
|
-
const checkResult = runTsc(checkConfig,
|
|
12629
|
+
const checkResult = runTsc(checkConfig, {
|
|
12630
|
+
...tsc,
|
|
12631
|
+
isVerbose
|
|
12632
|
+
});
|
|
12555
12633
|
if (checkResult !== 0) {
|
|
12556
12634
|
console.error(chalk.red(`Compile:Validation had ${checkResult} errors`));
|
|
12557
12635
|
return checkResult;
|
|
@@ -12584,7 +12662,7 @@ const compileFolder = async (srcDir, entries, options, platform, outDir, shouldC
|
|
|
12584
12662
|
if (isVerbose ?? false) console.log(chalk.cyan(`ESBUILD:build:stop [${srcDir}]`));
|
|
12585
12663
|
return 0;
|
|
12586
12664
|
};
|
|
12587
|
-
function createDeclarationEmitter(isVerbose = false) {
|
|
12665
|
+
function createDeclarationEmitter(isVerbose = false, tsc = {}) {
|
|
12588
12666
|
const declarationPromises = /* @__PURE__ */ new Map();
|
|
12589
12667
|
return async (srcDir, rootOutDir, platform, outDir) => {
|
|
12590
12668
|
const key = `${srcDir}\0${rootOutDir}`;
|
|
@@ -12594,7 +12672,10 @@ function createDeclarationEmitter(isVerbose = false) {
|
|
|
12594
12672
|
const dtsConfig = writeTypescriptConfig(cwd(), platform, srcDir, true, outDir);
|
|
12595
12673
|
return {
|
|
12596
12674
|
outDir,
|
|
12597
|
-
result: runTsc(dtsConfig,
|
|
12675
|
+
result: runTsc(dtsConfig, {
|
|
12676
|
+
...tsc,
|
|
12677
|
+
isVerbose
|
|
12678
|
+
})
|
|
12598
12679
|
};
|
|
12599
12680
|
})();
|
|
12600
12681
|
declarationPromises.set(key, promise);
|
|
@@ -12615,10 +12696,14 @@ function resolveCompileMode(config, mode) {
|
|
|
12615
12696
|
shouldEmit,
|
|
12616
12697
|
shouldRunFolderChecks: !shouldRunFullValidation && !(mode.emitOnly ?? false),
|
|
12617
12698
|
shouldRunFullValidation,
|
|
12699
|
+
tsc: {
|
|
12700
|
+
compiler: compile?.compiler,
|
|
12701
|
+
nativePackage: compile?.nativePackage
|
|
12702
|
+
},
|
|
12618
12703
|
isVerbose
|
|
12619
12704
|
};
|
|
12620
12705
|
}
|
|
12621
|
-
async function compilePlatformEntries({ shouldCheckTypes, compile, emitDeclarations, entries, legacyTsupOptions, platform, platformEsbuild, isVerbose }) {
|
|
12706
|
+
async function compilePlatformEntries({ shouldCheckTypes, compile, emitDeclarations, entries, legacyTsupOptions, platform, platformEsbuild, isVerbose, tsc }) {
|
|
12622
12707
|
return (await Promise.all(Object.entries(entries).map(async ([srcDir, options]) => {
|
|
12623
12708
|
const rootOutDir = getRootOutDir$1(options);
|
|
12624
12709
|
const outDir = `${rootOutDir}/${platform}`;
|
|
@@ -12631,14 +12716,14 @@ async function compilePlatformEntries({ shouldCheckTypes, compile, emitDeclarati
|
|
|
12631
12716
|
compile?.esbuild?.options ?? {},
|
|
12632
12717
|
options,
|
|
12633
12718
|
{ outdir: outDir }
|
|
12634
|
-
], isVerbose), platform, outDir, shouldCheckTypes, () => emitDeclarations(srcDir, rootOutDir, platform, outDir), entryMode, isVerbose);
|
|
12719
|
+
], isVerbose), platform, outDir, shouldCheckTypes, () => emitDeclarations(srcDir, rootOutDir, platform, outDir), entryMode, isVerbose, tsc);
|
|
12635
12720
|
}))).reduce((prev, value) => prev + value, 0);
|
|
12636
12721
|
}
|
|
12637
12722
|
const packageCompileEsbuild = async (config, mode = {}) => {
|
|
12638
|
-
const { compile, shouldEmit, shouldRunFolderChecks, shouldRunFullValidation, isVerbose } = resolveCompileMode(config, mode);
|
|
12639
|
-
if (isVerbose) console.log(
|
|
12723
|
+
const { compile, shouldEmit, shouldRunFolderChecks, shouldRunFullValidation, tsc, isVerbose } = resolveCompileMode(config, mode);
|
|
12724
|
+
if (isVerbose) console.log(`Compiling with esbuild and ${tsc.compiler === "native" ? "the native tsc" : "tsc"}`);
|
|
12640
12725
|
if (shouldRunFullValidation) {
|
|
12641
|
-
const validateResult = validateFullPackage(cwd(), isVerbose);
|
|
12726
|
+
const validateResult = validateFullPackage(cwd(), isVerbose, tsc);
|
|
12642
12727
|
if (validateResult !== 0) return validateResult;
|
|
12643
12728
|
}
|
|
12644
12729
|
if (!shouldEmit) return 0;
|
|
@@ -12651,7 +12736,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
|
|
|
12651
12736
|
const browserEsbuild = resolvePlatformEsbuildOptions(compile?.browser);
|
|
12652
12737
|
const neutralEsbuild = resolvePlatformEsbuildOptions(compile?.neutral);
|
|
12653
12738
|
const legacyTsupOptions = compile?.tsup?.options;
|
|
12654
|
-
const emitDeclarations = createDeclarationEmitter(isVerbose);
|
|
12739
|
+
const emitDeclarations = createDeclarationEmitter(isVerbose, tsc);
|
|
12655
12740
|
const [nodeErrors, browserErrors, neutralErrors] = await Promise.all([
|
|
12656
12741
|
compilePlatformEntries({
|
|
12657
12742
|
shouldCheckTypes: shouldRunFolderChecks,
|
|
@@ -12661,6 +12746,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
|
|
|
12661
12746
|
legacyTsupOptions,
|
|
12662
12747
|
platform: "node",
|
|
12663
12748
|
platformEsbuild: nodeEsbuild,
|
|
12749
|
+
tsc,
|
|
12664
12750
|
isVerbose
|
|
12665
12751
|
}),
|
|
12666
12752
|
compilePlatformEntries({
|
|
@@ -12671,6 +12757,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
|
|
|
12671
12757
|
legacyTsupOptions,
|
|
12672
12758
|
platform: "browser",
|
|
12673
12759
|
platformEsbuild: browserEsbuild,
|
|
12760
|
+
tsc,
|
|
12674
12761
|
isVerbose
|
|
12675
12762
|
}),
|
|
12676
12763
|
compilePlatformEntries({
|
|
@@ -12681,6 +12768,7 @@ const packageCompileEsbuild = async (config, mode = {}) => {
|
|
|
12681
12768
|
legacyTsupOptions,
|
|
12682
12769
|
platform: "neutral",
|
|
12683
12770
|
platformEsbuild: neutralEsbuild,
|
|
12771
|
+
tsc,
|
|
12684
12772
|
isVerbose
|
|
12685
12773
|
})
|
|
12686
12774
|
]);
|
|
@@ -13498,7 +13586,10 @@ const packageCompileMonolith = async (config, mode = {}) => {
|
|
|
13498
13586
|
if (isVerbose) console.log(chalk.gray("monolith layout synced"));
|
|
13499
13587
|
}
|
|
13500
13588
|
if (shouldRunFullValidation) {
|
|
13501
|
-
const validateResult = validateFullPackage(packageDir, isVerbose
|
|
13589
|
+
const validateResult = validateFullPackage(packageDir, isVerbose, {
|
|
13590
|
+
compiler: compile.compiler,
|
|
13591
|
+
nativePackage: compile.nativePackage
|
|
13592
|
+
});
|
|
13502
13593
|
if (validateResult !== 0) return validateResult;
|
|
13503
13594
|
}
|
|
13504
13595
|
if (!shouldEmit) return 0;
|
|
@@ -14039,7 +14130,10 @@ const packageCompileVendor = async (config, mode = {}) => {
|
|
|
14039
14130
|
if (compile.vendorPackages?.scopes === void 0 || compile.vendorPackages.scopes.length === 0) throw new Error("vendor mode requires compile.vendorPackages.scopes");
|
|
14040
14131
|
if (isVerbose) console.log(chalk.gray("Compiling with vendor mode"));
|
|
14041
14132
|
if (shouldRunFullValidation) {
|
|
14042
|
-
const validateResult = validateFullPackage(cwd(), isVerbose
|
|
14133
|
+
const validateResult = validateFullPackage(cwd(), isVerbose, {
|
|
14134
|
+
compiler: compile.compiler,
|
|
14135
|
+
nativePackage: compile.nativePackage
|
|
14136
|
+
});
|
|
14043
14137
|
if (validateResult !== 0) return validateResult;
|
|
14044
14138
|
}
|
|
14045
14139
|
if (!shouldEmit) return 0;
|