@antelopejs/tooling-configs 0.4.0 → 0.4.1

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.
@@ -6,7 +6,7 @@ import { c as repositoryRoot } from "../files-DJ0TeaTU.mjs";
6
6
  import { t as accepting } from "../ports-DGP6bPJy.mjs";
7
7
  import { createRequire } from "node:module";
8
8
  import { existsSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
9
- import { basename, join, posix, relative, resolve, sep } from "node:path";
9
+ import { basename, dirname, join, posix, relative, resolve, sep } from "node:path";
10
10
  import { spawn } from "node:child_process";
11
11
  import { isMap, isScalar, isSeq, parseDocument } from "yaml";
12
12
  import { createHash } from "node:crypto";
@@ -223,10 +223,16 @@ function isLayerCode(layer, file) {
223
223
  const segments = relative(layer, file).split(sep);
224
224
  return segments[0] !== LAYER_PLAYGROUND && !segments.some((segment) => NOT_LAYER_CODE.has(segment));
225
225
  }
226
- /** The repository's own `tsc` entry, run with Node so no shell parses its path. */
226
+ /**
227
+ * The repository's own `tsc` entry, run with Node so no shell parses its path. It is found through the `bin.tsc` field of
228
+ * `typescript/package.json`, a subpath every TypeScript version exports, because TypeScript 7 declares an `exports` map that
229
+ * leaves `typescript/bin/tsc` out.
230
+ */
227
231
  function compilerOf(root) {
228
232
  try {
229
- return createRequire(join(root, "package.json")).resolve("typescript/bin/tsc");
233
+ const manifestPath = createRequire(join(root, "package.json")).resolve("typescript/package.json");
234
+ const tsc = parseManifest(readFileSync(manifestPath, "utf8")).bin?.tsc;
235
+ return tsc === void 0 ? void 0 : join(dirname(manifestPath), tsc);
230
236
  } catch {
231
237
  return;
232
238
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/tooling-configs",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "Shared tooling presets for AntelopeJS repositories: oxlint (with the vendored anti-slop rules), oxfmt, ESLint for Nuxt layers, Knip, and an interface range check",
5
5
  "keywords": [
6
6
  "antelopejs",