@stll/oxlint-config 1.0.0 → 1.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.
- package/README.md +5 -0
- package/dist/consumer-compat-cli.cjs +1 -1
- package/dist/consumer-compat-cli.mjs +1 -1
- package/dist/git-tracked-output.cjs +46 -0
- package/dist/git-tracked-output.cjs.map +1 -0
- package/dist/git-tracked-output.mjs +39 -0
- package/dist/git-tracked-output.mjs.map +1 -0
- package/dist/publish-contract-cli.cjs +3 -5
- package/dist/publish-contract-cli.cjs.map +1 -1
- package/dist/publish-contract-cli.mjs +2 -4
- package/dist/publish-contract-cli.mjs.map +1 -1
- package/dist/toolchain-guard.cjs +11 -11
- package/dist/toolchain-guard.cjs.map +1 -1
- package/dist/toolchain-guard.mjs +11 -11
- package/dist/toolchain-guard.mjs.map +1 -1
- package/dist/typecheck-parity.cjs +1 -1
- package/dist/typecheck-parity.mjs +1 -1
- package/package.json +1 -1
package/dist/toolchain-guard.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { _ as nodeSelectorMatches, a as isPythonDependencyManifest, c as pythonDependencyManifestKind, d as isComposeDefinitionPath, f as isKubernetesDefinitionPath, h as generateCloudSetup, i as isMiseConfigPath, l as toolchainInputKind, m as cloudSetupPath, n as isDependabotGithubActionsPath, o as isShellScript, p as workspaceContains, r as isDockerDefinitionPath, s as javascriptDependencyLockfiles, t as githubAutomationFileKind, u as containerDocumentImages, v as nodeSupportRangeMatches, y as parseCloudSetup } from "./toolchain-inputs.mjs";
|
|
2
|
+
import { t as readGitTrackedOutput } from "./git-tracked-output.mjs";
|
|
2
3
|
import { _ as parseConsumerFixtures, d as consumerPackageClosure, g as discoverConsumerPackages, i as assertConsumerFixtureKind, n as assertConsumerNodeSupport, o as assertConsumerFixtureSelection } from "./toolchain-schema.mjs";
|
|
3
4
|
import { closeSync, lstatSync, openSync, readFileSync, readSync, realpathSync } from "node:fs";
|
|
4
5
|
import { execFileSync } from "node:child_process";
|
|
@@ -9,7 +10,7 @@ import picomatch from "picomatch";
|
|
|
9
10
|
import { parse as parse$2 } from "smol-toml";
|
|
10
11
|
//#endregion
|
|
11
12
|
//#region src/toolchain-consumer-checks.ts
|
|
12
|
-
const consumerRunnerVersion = "1.0.
|
|
13
|
+
const consumerRunnerVersion = "1.0.2";
|
|
13
14
|
const consumerCheckWorkflow = "stella/.github/.github/workflows/package-consumer-compat.yml";
|
|
14
15
|
const record$7 = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
15
16
|
const repositoryDirectory = (value) => typeof value === "string" && value !== "" && !value.includes("\\") && !value.includes("${{") && !value.split("").some((character) => {
|
|
@@ -268,6 +269,12 @@ const sameStrings = (value, expected) => {
|
|
|
268
269
|
const sortedExpected = [...expected].sort();
|
|
269
270
|
return [...value].sort().every((entry, index) => entry === sortedExpected[index]);
|
|
270
271
|
};
|
|
272
|
+
const pinnedVersionUpdateTypes = [
|
|
273
|
+
"version-update:semver-major",
|
|
274
|
+
"version-update:semver-minor",
|
|
275
|
+
"version-update:semver-patch"
|
|
276
|
+
];
|
|
277
|
+
const versionOnlyIgnore = (entry) => record$6(entry) && Object.keys(entry).length === 2 && typeof entry["dependency-name"] === "string" && sameStrings(entry["update-types"], pinnedVersionUpdateTypes);
|
|
271
278
|
const directoryOf = (file) => {
|
|
272
279
|
const directory = path.posix.dirname(file);
|
|
273
280
|
return directory === "." ? "/" : `/${directory}`;
|
|
@@ -576,7 +583,8 @@ const checkDependabot = ({ files, policy }) => {
|
|
|
576
583
|
const ignore = update["ignore"];
|
|
577
584
|
if (ignore !== void 0 && (!Array.isArray(ignore) || ignore.length === 0)) report("ignore", `${ecosystem}: omit ignore or provide a nonempty array`);
|
|
578
585
|
if (Array.isArray(ignore) && ignore.some((entry) => !record$6(entry) || typeof entry["dependency-name"] !== "string" || !ignored.includes(entry["dependency-name"]))) report("ignore", `${ecosystem}: ignore only packages owned by the shared policy`);
|
|
579
|
-
|
|
586
|
+
if (Array.isArray(ignore) && ignore.some((entry) => !versionOnlyIgnore(entry))) report("ignore", `${ecosystem}: each shared-pin ignore must contain only dependency-name and update-types for semver-major, semver-minor, and semver-patch version updates; security updates must remain enabled`);
|
|
587
|
+
for (const name of ignored) if (!Array.isArray(ignore) || !ignore.some((entry) => record$6(entry) && entry["dependency-name"] === name && versionOnlyIgnore(entry))) report("ignore", `${ecosystem}: ignore all version updates for shared pin ${name}`);
|
|
580
588
|
}
|
|
581
589
|
for (const [ecosystem, directories] of roots) for (const directory of directories) if (!covered.get(ecosystem)?.has(directory)) add(`add a ${ecosystem} update entry covering ${directory}`);
|
|
582
590
|
return diagnostics;
|
|
@@ -3239,15 +3247,7 @@ const parseToolchainConfiguration = (input) => {
|
|
|
3239
3247
|
/** Read one tracked configuration snapshot for guards and policy generation. */
|
|
3240
3248
|
const readToolchainInputs = (root) => {
|
|
3241
3249
|
const diagnostics = [];
|
|
3242
|
-
const tracked =
|
|
3243
|
-
"ls-files",
|
|
3244
|
-
"-z",
|
|
3245
|
-
"--cached",
|
|
3246
|
-
"--stage"
|
|
3247
|
-
], {
|
|
3248
|
-
cwd: root,
|
|
3249
|
-
encoding: "utf8"
|
|
3250
|
-
}).split("\0").filter((entry) => entry !== "" && !entry.startsWith("160000 ")).map((entry) => entry.slice(entry.indexOf(" ") + 1));
|
|
3250
|
+
const tracked = readGitTrackedOutput(root, "staged").split("\0").filter((entry) => entry !== "" && !entry.startsWith("160000 ")).map((entry) => entry.slice(entry.indexOf(" ") + 1));
|
|
3251
3251
|
const files = {};
|
|
3252
3252
|
const trackedFiles = new Set(tracked);
|
|
3253
3253
|
const resolvedRoot = realpathSync(root);
|