@ariestools/toolchain 9.0.1 → 9.0.2

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 (31) hide show
  1. package/dist/actions/enable/editXyConfigCompile.d.ts +32 -0
  2. package/dist/actions/enable/editXyConfigCompile.d.ts.map +1 -0
  3. package/dist/actions/enable/index.d.ts +3 -0
  4. package/dist/actions/enable/index.d.ts.map +1 -0
  5. package/dist/actions/enable/tsNative.d.ts +36 -0
  6. package/dist/actions/enable/tsNative.d.ts.map +1 -0
  7. package/dist/actions/index.d.ts +1 -0
  8. package/dist/actions/index.d.ts.map +1 -1
  9. package/dist/actions/package/compile/XyConfig.d.ts +7 -2
  10. package/dist/actions/package/compile/XyConfig.d.ts.map +1 -1
  11. package/dist/actions/package/compile/resolveTscBin.d.ts +10 -0
  12. package/dist/actions/package/compile/resolveTscBin.d.ts.map +1 -1
  13. package/dist/actions/package/compile/runTsc.d.ts.map +1 -1
  14. package/dist/bin/package/build.mjs +40 -2
  15. package/dist/bin/package/build.mjs.map +1 -1
  16. package/dist/bin/package/clean.mjs +34 -1
  17. package/dist/bin/package/clean.mjs.map +1 -1
  18. package/dist/bin/package/compile.mjs +46 -5
  19. package/dist/bin/package/compile.mjs.map +1 -1
  20. package/dist/bin/package/publint.mjs +34 -1
  21. package/dist/bin/package/publint.mjs.map +1 -1
  22. package/dist/bin/package/recompile.mjs +40 -2
  23. package/dist/bin/package/recompile.mjs.map +1 -1
  24. package/dist/bin/package/sync-layout.mjs +40 -4
  25. package/dist/bin/package/sync-layout.mjs.map +1 -1
  26. package/dist/bin/xy.mjs +431 -75
  27. package/dist/bin/xy.mjs.map +1 -1
  28. package/dist/xy/common/enable/index.d.ts +3 -0
  29. package/dist/xy/common/enable/index.d.ts.map +1 -0
  30. package/dist/xy/common/index.d.ts.map +1 -1
  31. package/package.json +8 -7
@@ -14,7 +14,7 @@ import Pe from "node:stream";
14
14
  import { StringDecoder } from "node:string_decoder";
15
15
  import Re from "path";
16
16
  import Ue from "os";
17
- import { TypeScriptLoader } from "cosmiconfig-typescript-loader";
17
+ import { createJiti } from "jiti";
18
18
  import ts, { formatDiagnosticsWithColorAndContext, sys } from "typescript";
19
19
  import { build } from "esbuild";
20
20
  //#region \0rolldown/runtime.js
@@ -7630,6 +7630,39 @@ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
7630
7630
  exports.cosmiconfigSync = cosmiconfigSync;
7631
7631
  }));
7632
7632
  //#endregion
7633
+ //#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.2.0_cosmiconfig@10.0.0_typescript@6.0.3/node_modules/cosmiconfig-typescript-loader/dist/esm/typescript-compile-error.mjs
7634
+ var TypeScriptCompileError = class _TypeScriptCompileError extends Error {
7635
+ constructor(message) {
7636
+ super(message);
7637
+ this.name = this.constructor.name;
7638
+ Object.setPrototypeOf(this, new.target.prototype);
7639
+ }
7640
+ static fromError(error) {
7641
+ const message = `TypeScriptLoader failed to compile TypeScript:
7642
+ ${error.message}`;
7643
+ const newError = new _TypeScriptCompileError(message);
7644
+ newError.stack = error.stack;
7645
+ return newError;
7646
+ }
7647
+ };
7648
+ //#endregion
7649
+ //#region ../../node_modules/.pnpm/cosmiconfig-typescript-loader@6.3.0_@types+node@26.2.0_cosmiconfig@10.0.0_typescript@6.0.3/node_modules/cosmiconfig-typescript-loader/dist/esm/loader.mjs
7650
+ function TypeScriptLoader(options) {
7651
+ const loader = createJiti("", {
7652
+ interopDefault: true,
7653
+ ...options
7654
+ });
7655
+ return async (path, _content) => {
7656
+ try {
7657
+ const result = await loader.import(path);
7658
+ return result.default || result;
7659
+ } catch (error) {
7660
+ if (error instanceof Error) throw TypeScriptCompileError.fromError(error);
7661
+ throw error;
7662
+ }
7663
+ };
7664
+ }
7665
+ //#endregion
7633
7666
  //#region src/lib/ruleCommandRegistry.ts
7634
7667
  const RULE_COMMANDS = {
7635
7668
  apiExposure: {
@@ -11156,6 +11189,10 @@ const warnDeprecatedEmptyObjectTargets = (targets) => {
11156
11189
  * `compile.nativePackage`.
11157
11190
  */
11158
11191
  const DEFAULT_NATIVE_PACKAGE = "typescript-native";
11192
+ /**
11193
+ * Full `package.json` alias spec for {@link DEFAULT_NATIVE_PACKAGE}.
11194
+ */
11195
+ const DEFAULT_NATIVE_ALIAS_SPEC = `npm:typescript@~7.0.2`;
11159
11196
  const readTscBinEntry = (packageJsonPath) => {
11160
11197
  const { bin } = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
11161
11198
  if (typeof bin === "string") return bin;
@@ -11197,7 +11234,8 @@ const resolveCached = (packageName, fromDir) => {
11197
11234
  const missingNativeMessage = (packageName) => [
11198
11235
  `Compile: compile.compiler is "native" but "${packageName}" is not installed.`,
11199
11236
  " Add it as an alias so it does not collide with the compiler API package:",
11200
- ` "${packageName}": "npm:typescript@~7.0.2"`,
11237
+ ` "${packageName}": "${DEFAULT_NATIVE_ALIAS_SPEC}"`,
11238
+ " Or run: xy enable ts-native",
11201
11239
  " Keep \"typescript\" pinned to 6.x — ESLint and the xy analyzers load the compiler API from it."
11202
11240
  ].join("\n");
11203
11241
  /**