@antelopejs/tooling-configs 0.8.2 → 0.8.3-next.387.gb7c1b31

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.
@@ -5,7 +5,7 @@ import { r as installedTypeScriptMajor, t as asInstalledCompilerReads } from "..
5
5
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
6
6
  import { c as resolveRevision, s as repositoryRoot } from "../files-C0avD1Eo.mjs";
7
7
  import { n as shimInvocation } from "../run-command-BlFRPORx.mjs";
8
- import { _ as recordVerdict, c as unpublishedAt, d as revisionCounts, f as workspaceManifests, g as fillStars, h as describeAllowance, i as isTestSource, l as DIRECTORY_LINK, m as createAddedPolicy, o as outputRoot, p as allowedByGlob, r as isExportPath, s as packagesAt, t as emitPackage, u as compareRevisions } from "../typescript-BMXhi9hl.mjs";
8
+ import { _ as recordVerdict, c as unpublishedAt, d as revisionCounts, f as workspaceManifests, g as fillStars, h as describeAllowance, i as isTestSource, l as DIRECTORY_LINK, m as createAddedPolicy, o as outputRoot, p as allowedByGlob, r as isExportPath, s as packagesAt, t as emitPackage, u as compareRevisions } from "../typescript-CSapxWRc.mjs";
9
9
  import { createRequire } from "node:module";
10
10
  import { copyFileSync, cpSync, existsSync, globSync, mkdirSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs";
11
11
  import { basename, dirname, isAbsolute, join, matchesGlob, parse, posix, relative, resolve, sep } from "node:path";
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { n as runCliAsync } from "../cli-4Tv71vYk.mjs";
3
3
  import { s as repositoryRoot } from "../files-C0avD1Eo.mjs";
4
- import { i as runChecks, n as CI_TIER_ENV, t as CHECKS_SKIP_ENV } from "../checks-Crg3yU_o.mjs";
4
+ import { i as runChecks, n as CI_TIER_ENV, t as CHECKS_SKIP_ENV } from "../checks-1QW30Psx.mjs";
5
5
  import { parseArgs } from "node:util";
6
6
  //#region src/bin/checks.ts
7
7
  const SIGNAL_EXIT = /* @__PURE__ */ new Map([
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
3
3
  import { s as repositoryRoot } from "../files-C0avD1Eo.mjs";
4
- import { a as listsNoFiles, d as revisionCounts, n as extendedConfigs, s as packagesAt, t as emitPackage, u as compareRevisions } from "../typescript-BMXhi9hl.mjs";
4
+ import { a as listsNoFiles, d as revisionCounts, n as extendedConfigs, s as packagesAt, t as emitPackage, u as compareRevisions } from "../typescript-CSapxWRc.mjs";
5
5
  import { copyFileSync, existsSync, mkdirSync } from "node:fs";
6
6
  import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
7
7
  //#region src/guardrails/comment-proof.ts
package/dist/bin/sync.mjs CHANGED
@@ -7,9 +7,9 @@ import { t as typescript6_default } from "../typescript6-HdyOMBv3.mjs";
7
7
  import { t as runCli } from "../cli-4Tv71vYk.mjs";
8
8
  import { _ as ciRenovateSyncCallers, a as GITATTRIBUTES_ARTIFACT, b as sharedWorkflow, c as CI_CONTEXT, f as callerPlan, g as ciNodeCallers, h as MISSING_CHECKS_WORKFLOW, m as ciWorkflow, p as ciProfile, r as renovateArtifacts, u as CI_PATH, v as hasChecksWorkflow, y as sharedRefArtifacts } from "../renovate-uWHU7H3H.mjs";
9
9
  import { i as gitFiles, s as repositoryRoot } from "../files-C0avD1Eo.mjs";
10
- import { n as workspaceDirectories, r as workspacePatterns, t as planDocs } from "../docs-compat-CdgBviGf.mjs";
10
+ import { n as workspaceDirectories, r as workspacePatterns, t as planDocs } from "../docs-compat-BWNvuPHf.mjs";
11
11
  import { n as shimInvocation } from "../run-command-BlFRPORx.mjs";
12
- import { a as verifyLayers, c as pnpmLockfiles, d as moveDependencyRanges, f as runPnpm, l as inWorkspace, o as matchingScripts, r as droppedChecksSteps, s as stepsOf, u as installsWithPnpm } from "../checks-Crg3yU_o.mjs";
12
+ import { a as verifyLayers, c as pnpmLockfiles, d as moveDependencyRanges, f as runPnpm, l as inWorkspace, o as matchingScripts, r as droppedChecksSteps, s as stepsOf, u as installsWithPnpm } from "../checks-1QW30Psx.mjs";
13
13
  import { n as SUPPRESSIONS_FILE, r as adoptedBudget } from "../suppression-budget-Dbb2RlAV.mjs";
14
14
  import { c as typescript } from "../suppressions-BWTxQbDL.mjs";
15
15
  import { t as DEFAULT_SHARED } from "../map-C3j9QGqf.mjs";
@@ -2,7 +2,7 @@ import { l as serializeManifest, o as packageManager, s as parseManifest } from
2
2
  import { t as typescript6_default } from "./typescript6-HdyOMBv3.mjs";
3
3
  import { a as isString, f as parseJson, i as isObject, u as optStr } from "./json-CG2L7YFl.mjs";
4
4
  import { i as gitFiles, l as trackedManifests } from "./files-C0avD1Eo.mjs";
5
- import { i as DMS_PACKAGES, n as workspaceDirectories } from "./docs-compat-CdgBviGf.mjs";
5
+ import { i as DMS_PACKAGES, n as workspaceDirectories } from "./docs-compat-BWNvuPHf.mjs";
6
6
  import { n as shimInvocation, t as runCommand } from "./run-command-BlFRPORx.mjs";
7
7
  import { n as tagVersion } from "./npm-CIIqL5SG.mjs";
8
8
  import { n as packTarball } from "./pack-tarball-Cn4zGKn7.mjs";
@@ -2,6 +2,22 @@ import { s as parseManifest } from "./package-7oylgBeT.mjs";
2
2
  import { isMap, isScalar, isSeq, parseDocument } from "yaml";
3
3
  import { existsSync, readFileSync, readdirSync, statSync } from "node:fs";
4
4
  import { join } from "node:path";
5
+ //#region actions/docs/published-range.mjs
6
+ const WORKSPACE = "workspace:";
7
+ /**
8
+ * The range `pnpm pack` publishes for a dependency spec: `workspace:^` and
9
+ * `workspace:~` become `^` and `~` plus the sibling's version, `workspace:*`
10
+ * the exact version, `workspace:<range>` the range, and any other spec itself.
11
+ * Undefined when the spec needs a sibling version that is unknown.
12
+ */
13
+ function publishedRange(spec, version) {
14
+ if (!spec.startsWith(WORKSPACE)) return spec;
15
+ const rest = spec.slice(10);
16
+ if (rest === "^" || rest === "~") return version && `${rest}${version}`;
17
+ if (rest === "*") return version;
18
+ return /^[\d^~<>=]/.test(rest) ? rest : void 0;
19
+ }
20
+ //#endregion
5
21
  //#region src/guardrails/marker-block.ts
6
22
  /** The comment pair sync writes a generated block between. */
7
23
  function markers(name) {
@@ -358,13 +374,17 @@ function workspaceDirectories(root) {
358
374
  }
359
375
  return [...found].sort();
360
376
  }
361
- function declaredRanges(manifest) {
377
+ function declaredRanges(manifest, versions, unresolved) {
362
378
  const ranges = /* @__PURE__ */ new Map();
363
379
  for (const field of [
364
380
  manifest.optionalDependencies,
365
381
  manifest.dependencies,
366
382
  manifest.peerDependencies
367
- ]) for (const [name, range] of Object.entries(field ?? {})) if (name.startsWith(SCOPE)) ranges.set(name, range);
383
+ ]) for (const [name, range] of Object.entries(field ?? {})) if (name.startsWith(SCOPE)) {
384
+ const published = publishedRange(range, versions.get(name));
385
+ if (published === void 0) unresolved.push(`${name}@${range}`);
386
+ else ranges.set(name, published);
387
+ }
368
388
  return ranges;
369
389
  }
370
390
  function readManifest(root, directory) {
@@ -446,14 +466,19 @@ function planPackage(root, plan, lock, standard, { directory, name, ranges, publ
446
466
  */
447
467
  function planDocs(root, manager) {
448
468
  const rootManifest = readManifest(root, "");
449
- const packages = ["", ...workspaceDirectories(root)].map((directory) => {
450
- const manifest = directory ? readManifest(root, directory) : rootManifest;
469
+ const directories = ["", ...workspaceDirectories(root)];
470
+ const manifests = directories.map((directory) => directory ? readManifest(root, directory) : rootManifest);
471
+ const versions = /* @__PURE__ */ new Map();
472
+ for (const { name, version } of manifests) if (name && version) versions.set(name, version);
473
+ const unresolved = [];
474
+ const packages = directories.map((directory, index) => {
475
+ const manifest = manifests[index];
451
476
  return {
452
477
  directory,
453
478
  name: manifest.name,
454
479
  published: !directory || !manifest.private,
455
480
  node: manifest.engines?.node,
456
- ranges: manifest.private ? /* @__PURE__ */ new Map() : declaredRanges(manifest)
481
+ ranges: manifest.private ? /* @__PURE__ */ new Map() : declaredRanges(manifest, versions, unresolved)
457
482
  };
458
483
  });
459
484
  const qualifying = packages.filter(({ ranges }) => ranges.size > 0);
@@ -463,6 +488,7 @@ function planDocs(root, manager) {
463
488
  errors: [],
464
489
  exists: (path) => existsSync(join(root, path))
465
490
  };
491
+ for (const spec of new Set(unresolved)) plan.errors.push(`${spec} names no workspace package version, so the docs-compat block cannot show the range pnpm pack writes.`);
466
492
  const shared = sharesLockfile(root);
467
493
  const documents = /* @__PURE__ */ new Map();
468
494
  const locks = new Map(qualifying.map(({ directory }) => [directory, manager === "pnpm" ? readLock(root, shared, directory, documents) : void 0]));
@@ -2,7 +2,7 @@ import { s as parseManifest } from "./package-7oylgBeT.mjs";
2
2
  import { t as typescript6_default } from "./typescript6-HdyOMBv3.mjs";
3
3
  import { n as installedCompilerDefaults, r as installedTypeScriptMajor } from "./installed-typescript-CF_FR9DV.mjs";
4
4
  import { c as resolveRevision, l as trackedManifests } from "./files-C0avD1Eo.mjs";
5
- import { n as workspaceDirectories, r as workspacePatterns } from "./docs-compat-CdgBviGf.mjs";
5
+ import { n as workspaceDirectories, r as workspacePatterns } from "./docs-compat-BWNvuPHf.mjs";
6
6
  import { i as revisionSuppressions, n as countSuppressions } from "./suppressions-BWTxQbDL.mjs";
7
7
  import { copyFileSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs";
8
8
  import { dirname, isAbsolute, join, matchesGlob, relative, resolve, sep } from "node:path";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antelopejs/tooling-configs",
3
- "version": "0.8.2",
3
+ "version": "0.8.3-next.387.gb7c1b31",
4
4
  "description": "Shared tooling presets for AntelopeJS repositories: oxlint (with the vendored anti-slop rules), oxfmt, ESLint for Nuxt layers, Knip, and a dependency range check",
5
5
  "keywords": [
6
6
  "antelopejs",
@@ -152,7 +152,7 @@
152
152
  "engines": {
153
153
  "node": ">=22.18.0"
154
154
  },
155
- "gitHead": "d81bd2144c17ac22ff1263a9d377d19fe885406d",
155
+ "gitHead": "b7c1b31347845f188a1bdba47c85e266d2ae6554",
156
156
  "scripts": {
157
157
  "build": "tsdown",
158
158
  "lint": "oxlint",