@antelopejs/tooling-configs 0.7.1 → 0.7.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.
- package/README.md +5 -3
- package/dist/bin/api-diff.mjs +22 -1
- package/dist/bin/checks.mjs +1 -1
- package/dist/bin/comment-proof.mjs +1 -1
- package/dist/bin/sync.mjs +121 -44
- package/dist/bin/verify.mjs +21 -21
- package/dist/{checks-DJ_CFEZH.mjs → checks-DvND3Ngb.mjs} +198 -67
- package/dist/{docs-compat-CSljVi3O.mjs → docs-compat-BAZiPLZt.mjs} +5 -7
- package/dist/eslint.mjs +2 -2
- package/dist/{guardrails-6i82vsUi.mjs → guardrails-PoMIcyGb.mjs} +418 -83
- package/dist/oxc/guardrails/index.mjs +1 -1
- package/dist/oxc/lint.d.mts +1 -0
- package/dist/oxc/lint.mjs +1 -1
- package/dist/pack-tarball-Cn4zGKn7.mjs +40 -0
- package/dist/{type-aware-rules-Da3769fI.mjs → type-aware-rules-BxhHbizU.mjs} +15 -2
- package/dist/{typescript-CxfNxyr2.mjs → typescript-QfxkJYzd.mjs} +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { n as TEST_FILE_GLOBS, t as ASSERTION_FUNCTION_NAMES } from "../../shared-WC0z3y9F.mjs";
|
|
2
|
-
import { t as guardrailsPlugin } from "../../guardrails-
|
|
2
|
+
import { t as guardrailsPlugin } from "../../guardrails-PoMIcyGb.mjs";
|
|
3
3
|
export { ASSERTION_FUNCTION_NAMES, TEST_FILE_GLOBS, guardrailsPlugin as default };
|
package/dist/oxc/lint.d.mts
CHANGED
package/dist/oxc/lint.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as findGitRoot } from "../ceilings-B7KayYIG.mjs";
|
|
2
2
|
import { t as readCarriedCeilings } from "../renames-L2owF5GD.mjs";
|
|
3
3
|
import { t as PRESET_CONFIGS } from "../templates-HG0fel2S.mjs";
|
|
4
|
-
import { n as typeAwareRuleSetting, t as TYPE_AWARE_RULES } from "../type-aware-rules-
|
|
4
|
+
import { n as typeAwareRuleSetting, t as TYPE_AWARE_RULES } from "../type-aware-rules-BxhHbizU.mjs";
|
|
5
5
|
import { n as TEST_FILE_GLOBS, t as ASSERTION_FUNCTION_NAMES } from "../shared-WC0z3y9F.mjs";
|
|
6
6
|
import { n as IGNORE_PATTERNS, r as SYNCED_AGENT_PATTERNS } from "../shared-BCFFyp3l.mjs";
|
|
7
7
|
import { defineConfig } from "oxlint";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { t as runCommand } from "./run-command-BlFRPORx.mjs";
|
|
2
|
+
//#region src/guardrails/pack-tarball.ts
|
|
3
|
+
/** The flag that stops `pack` from running lifecycle scripts, by package manager. */
|
|
4
|
+
const IGNORE_SCRIPTS = {
|
|
5
|
+
pnpm: "--config.ignore-scripts=true",
|
|
6
|
+
npm: "--ignore-scripts"
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* The arguments to `manager` that pack the package in the working directory into `destination`, in order: its `prepack`
|
|
10
|
+
* through `<manager> run`, which uses the configured script shell, then `<manager> pack` with lifecycle scripts off,
|
|
11
|
+
* since `pnpm pack` runs them through cmd.exe on Windows whatever the script shell, so a POSIX `prepare` fails there.
|
|
12
|
+
* Stop at the first that fails.
|
|
13
|
+
*/
|
|
14
|
+
function packSteps(manager, destination) {
|
|
15
|
+
return [[
|
|
16
|
+
"run",
|
|
17
|
+
"--if-present",
|
|
18
|
+
"prepack"
|
|
19
|
+
], [
|
|
20
|
+
"pack",
|
|
21
|
+
IGNORE_SCRIPTS[manager],
|
|
22
|
+
"--pack-destination",
|
|
23
|
+
destination
|
|
24
|
+
]];
|
|
25
|
+
}
|
|
26
|
+
/** Packs the package in `cwd` into `destination` through {@link packSteps}. Returns the first failed command, else the pack. */
|
|
27
|
+
async function packTarball(manager, cwd, destination, signal) {
|
|
28
|
+
const [prepackArgs, packArgs] = packSteps(manager, destination);
|
|
29
|
+
const prepack = await runCommand(manager, prepackArgs, {
|
|
30
|
+
cwd,
|
|
31
|
+
signal
|
|
32
|
+
});
|
|
33
|
+
if (prepack.status !== 0) return prepack;
|
|
34
|
+
return runCommand(manager, packArgs, {
|
|
35
|
+
cwd,
|
|
36
|
+
signal
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { packTarball as n, packSteps as t };
|
|
@@ -29,10 +29,23 @@ const TYPE_AWARE_RULES = [
|
|
|
29
29
|
/**
|
|
30
30
|
* The setting a type-aware rule runs at. `no-base-to-string` pins
|
|
31
31
|
* `checkUnknown: false`, typescript-eslint's default, so `String(value)` on an
|
|
32
|
-
* `unknown` stays allowed if a release changes that default.
|
|
32
|
+
* `unknown` stays allowed if a release changes that default. It adds `{}` to
|
|
33
|
+
* the default `ignoredTypeNames`, so the same call stays allowed once `null`
|
|
34
|
+
* and `undefined` checks narrow the `unknown` to `{}`. Every other value typed
|
|
35
|
+
* `{}` is skipped too: one declared `{}`, the empty literal, a `T extends {}`,
|
|
36
|
+
* a union holding `{}`, and a `NonNullable<T>` or `T & {}` over a generic.
|
|
33
37
|
*/
|
|
34
38
|
function typeAwareRuleSetting(rule) {
|
|
35
|
-
return rule === "no-base-to-string" ? ["error", {
|
|
39
|
+
return rule === "no-base-to-string" ? ["error", {
|
|
40
|
+
checkUnknown: false,
|
|
41
|
+
ignoredTypeNames: [
|
|
42
|
+
"Error",
|
|
43
|
+
"RegExp",
|
|
44
|
+
"URL",
|
|
45
|
+
"URLSearchParams",
|
|
46
|
+
"{}"
|
|
47
|
+
]
|
|
48
|
+
}] : "error";
|
|
36
49
|
}
|
|
37
50
|
//#endregion
|
|
38
51
|
export { typeAwareRuleSetting as n, TYPE_AWARE_RULES as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { s as parseManifest } from "./package-DDG3YH7W.mjs";
|
|
2
2
|
import { n as installedCompilerDefaults, r as installedTypeScriptMajor } from "./installed-typescript-6MtIWlE4.mjs";
|
|
3
3
|
import { u as trackedManifests } from "./files-C-JJhExM.mjs";
|
|
4
|
-
import { n as workspaceDirectories, r as workspacePatterns } from "./docs-compat-
|
|
4
|
+
import { n as workspaceDirectories, r as workspacePatterns } from "./docs-compat-BAZiPLZt.mjs";
|
|
5
5
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
6
6
|
import { dirname, join, matchesGlob, relative, resolve, sep } from "node:path";
|
|
7
7
|
import ts from "@typescript/typescript6";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/tooling-configs",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
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",
|