@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 CHANGED
@@ -70,6 +70,11 @@ Bun, TypeScript install layouts, Node, Python, Rust, GitHub Actions, and
70
70
  Dependabot. Inherit the fields for tools your repository uses. The checker
71
71
  does not require tools absent from the repository.
72
72
 
73
+ Shared-pin Dependabot ignores must contain only `dependency-name` and
74
+ `update-types`, listing `version-update:semver-major`,
75
+ `version-update:semver-minor`, and `version-update:semver-patch`. This ignores
76
+ version updates while preserving security update pull requests.
77
+
73
78
  Set `packageManager` to `bun@` followed by the policy's `bun` value, and pin
74
79
  `bun-types` to that same value. Dependency pins can live in default or named
75
80
  catalogs, including Bun's `workspaces` catalogs. Bun image tags, version
@@ -7,11 +7,11 @@ let node_child_process = require("node:child_process");
7
7
  let node_path = require("node:path");
8
8
  node_path = require_rolldown_runtime.__toESM(node_path, 1);
9
9
  let semver = require("semver");
10
+ let node_os = require("node:os");
10
11
  let yaml = require("yaml");
11
12
  let node_util = require("node:util");
12
13
  let node_fs_promises = require("node:fs/promises");
13
14
  let node_module = require("node:module");
14
- let node_os = require("node:os");
15
15
  let acorn = require("acorn");
16
16
  let node_crypto = require("node:crypto");
17
17
  //#region src/consumer-build-approvals.ts
@@ -5,10 +5,10 @@ import { wrap } from "node:module";
5
5
  import { execFile, spawn } from "node:child_process";
6
6
  import path from "node:path";
7
7
  import { compare, satisfies, valid, validRange } from "semver";
8
+ import { tmpdir } from "node:os";
8
9
  import { parse as parse$1, stringify } from "yaml";
9
10
  import { promisify } from "node:util";
10
11
  import { cp, lstat, mkdir, mkdtemp, readFile, readdir, realpath, rm, writeFile } from "node:fs/promises";
11
- import { tmpdir } from "node:os";
12
12
  import { parse as parse$2 } from "acorn";
13
13
  import { createHash } from "node:crypto";
14
14
  //#region src/consumer-build-approvals.ts
@@ -0,0 +1,46 @@
1
+ const require_rolldown_runtime = require("./rolldown-runtime.cjs");
2
+ let node_fs = require("node:fs");
3
+ let node_child_process = require("node:child_process");
4
+ let node_path = require("node:path");
5
+ node_path = require_rolldown_runtime.__toESM(node_path, 1);
6
+ let node_os = require("node:os");
7
+ //#region src/git-tracked-output.ts
8
+ /** Stream Git's file list to disk so consumer size cannot exhaust maxBuffer. */
9
+ const readGitTrackedOutput = (root, mode) => {
10
+ const scratch = (0, node_fs.mkdtempSync)(node_path.default.join((0, node_os.tmpdir)(), "stll-git-tracked-"));
11
+ try {
12
+ const output = node_path.default.join(scratch, "tracked");
13
+ const descriptor = (0, node_fs.openSync)(output, "w", 384);
14
+ try {
15
+ (0, node_child_process.execFileSync)("git", [
16
+ "ls-files",
17
+ "-z",
18
+ ...mode === "staged" ? ["--cached", "--stage"] : []
19
+ ], {
20
+ cwd: root,
21
+ stdio: [
22
+ "ignore",
23
+ descriptor,
24
+ "inherit"
25
+ ]
26
+ });
27
+ } finally {
28
+ (0, node_fs.closeSync)(descriptor);
29
+ }
30
+ return (0, node_fs.readFileSync)(output, "utf8");
31
+ } finally {
32
+ (0, node_fs.rmSync)(scratch, {
33
+ recursive: true,
34
+ force: true
35
+ });
36
+ }
37
+ };
38
+ //#endregion
39
+ Object.defineProperty(exports, "readGitTrackedOutput", {
40
+ enumerable: true,
41
+ get: function() {
42
+ return readGitTrackedOutput;
43
+ }
44
+ });
45
+
46
+ //# sourceMappingURL=git-tracked-output.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-tracked-output.cjs","names":["path"],"sources":["../src/git-tracked-output.ts"],"sourcesContent":["import { execFileSync } from \"node:child_process\";\nimport {\n closeSync,\n mkdtempSync,\n openSync,\n readFileSync,\n rmSync,\n} from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport path from \"node:path\";\n\n/** Stream Git's file list to disk so consumer size cannot exhaust maxBuffer. */\nexport const readGitTrackedOutput = (root: string, mode: \"paths\" | \"staged\") => {\n const scratch = mkdtempSync(path.join(tmpdir(), \"stll-git-tracked-\"));\n try {\n const output = path.join(scratch, \"tracked\");\n const descriptor = openSync(output, \"w\", 0o600);\n try {\n execFileSync(\n \"git\",\n [\n \"ls-files\",\n \"-z\",\n ...(mode === \"staged\" ? [\"--cached\", \"--stage\"] : []),\n ],\n { cwd: root, stdio: [\"ignore\", descriptor, \"inherit\"] },\n );\n } finally {\n closeSync(descriptor);\n }\n return readFileSync(output, \"utf8\");\n } finally {\n rmSync(scratch, { recursive: true, force: true });\n }\n};\n"],"mappings":";;;;;;;;AAYA,MAAa,wBAAwB,MAAc,SAA6B;CAC9E,MAAM,WAAA,GAAA,QAAA,YAAA,CAAsBA,UAAAA,QAAK,MAAA,GAAA,QAAA,OAAA,CAAY,GAAG,mBAAmB,CAAC;CACpE,IAAI;EACF,MAAM,SAASA,UAAAA,QAAK,KAAK,SAAS,SAAS;EAC3C,MAAM,cAAA,GAAA,QAAA,SAAA,CAAsB,QAAQ,KAAK,GAAK;EAC9C,IAAI;GACF,CAAA,GAAA,mBAAA,aAAA,CACE,OACA;IACE;IACA;IACA,GAAI,SAAS,WAAW,CAAC,YAAY,SAAS,IAAI,CAAC;GACrD,GACA;IAAE,KAAK;IAAM,OAAO;KAAC;KAAU;KAAY;IAAS;GAAE,CACxD;EACF,UAAU;GACR,CAAA,GAAA,QAAA,UAAA,CAAU,UAAU;EACtB;EACA,QAAA,GAAA,QAAA,aAAA,CAAoB,QAAQ,MAAM;CACpC,UAAU;EACR,CAAA,GAAA,QAAA,OAAA,CAAO,SAAS;GAAE,WAAW;GAAM,OAAO;EAAK,CAAC;CAClD;AACF"}
@@ -0,0 +1,39 @@
1
+ import { closeSync, mkdtempSync, openSync, readFileSync, rmSync } from "node:fs";
2
+ import { execFileSync } from "node:child_process";
3
+ import path from "node:path";
4
+ import { tmpdir } from "node:os";
5
+ //#region src/git-tracked-output.ts
6
+ /** Stream Git's file list to disk so consumer size cannot exhaust maxBuffer. */
7
+ const readGitTrackedOutput = (root, mode) => {
8
+ const scratch = mkdtempSync(path.join(tmpdir(), "stll-git-tracked-"));
9
+ try {
10
+ const output = path.join(scratch, "tracked");
11
+ const descriptor = openSync(output, "w", 384);
12
+ try {
13
+ execFileSync("git", [
14
+ "ls-files",
15
+ "-z",
16
+ ...mode === "staged" ? ["--cached", "--stage"] : []
17
+ ], {
18
+ cwd: root,
19
+ stdio: [
20
+ "ignore",
21
+ descriptor,
22
+ "inherit"
23
+ ]
24
+ });
25
+ } finally {
26
+ closeSync(descriptor);
27
+ }
28
+ return readFileSync(output, "utf8");
29
+ } finally {
30
+ rmSync(scratch, {
31
+ recursive: true,
32
+ force: true
33
+ });
34
+ }
35
+ };
36
+ //#endregion
37
+ export { readGitTrackedOutput as t };
38
+
39
+ //# sourceMappingURL=git-tracked-output.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git-tracked-output.mjs","names":[],"sources":["../src/git-tracked-output.ts"],"sourcesContent":["import { execFileSync } from \"node:child_process\";\nimport {\n closeSync,\n mkdtempSync,\n openSync,\n readFileSync,\n rmSync,\n} from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport path from \"node:path\";\n\n/** Stream Git's file list to disk so consumer size cannot exhaust maxBuffer. */\nexport const readGitTrackedOutput = (root: string, mode: \"paths\" | \"staged\") => {\n const scratch = mkdtempSync(path.join(tmpdir(), \"stll-git-tracked-\"));\n try {\n const output = path.join(scratch, \"tracked\");\n const descriptor = openSync(output, \"w\", 0o600);\n try {\n execFileSync(\n \"git\",\n [\n \"ls-files\",\n \"-z\",\n ...(mode === \"staged\" ? [\"--cached\", \"--stage\"] : []),\n ],\n { cwd: root, stdio: [\"ignore\", descriptor, \"inherit\"] },\n );\n } finally {\n closeSync(descriptor);\n }\n return readFileSync(output, \"utf8\");\n } finally {\n rmSync(scratch, { recursive: true, force: true });\n }\n};\n"],"mappings":";;;;;;AAYA,MAAa,wBAAwB,MAAc,SAA6B;CAC9E,MAAM,UAAU,YAAY,KAAK,KAAK,OAAO,GAAG,mBAAmB,CAAC;CACpE,IAAI;EACF,MAAM,SAAS,KAAK,KAAK,SAAS,SAAS;EAC3C,MAAM,aAAa,SAAS,QAAQ,KAAK,GAAK;EAC9C,IAAI;GACF,aACE,OACA;IACE;IACA;IACA,GAAI,SAAS,WAAW,CAAC,YAAY,SAAS,IAAI,CAAC;GACrD,GACA;IAAE,KAAK;IAAM,OAAO;KAAC;KAAU;KAAY;IAAS;GAAE,CACxD;EACF,UAAU;GACR,UAAU,UAAU;EACtB;EACA,OAAO,aAAa,QAAQ,MAAM;CACpC,UAAU;EACR,OAAO,SAAS;GAAE,WAAW;GAAM,OAAO;EAAK,CAAC;CAClD;AACF"}
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const require_rolldown_runtime = require("./rolldown-runtime.cjs");
4
4
  const require_toolchain_inputs = require("./toolchain-inputs.cjs");
5
+ const require_git_tracked_output = require("./git-tracked-output.cjs");
5
6
  const require_toolchain_schema = require("./toolchain-schema.cjs");
6
7
  const require_publish_contract = require("./publish-contract.cjs");
7
8
  const require_publish_build_target_vite_dts_helper = require("./publish-build-target-vite-dts-helper2.cjs");
@@ -9,8 +10,8 @@ let node_fs = require("node:fs");
9
10
  let node_child_process = require("node:child_process");
10
11
  let node_path = require("node:path");
11
12
  node_path = require_rolldown_runtime.__toESM(node_path, 1);
12
- let node_module = require("node:module");
13
13
  let node_os = require("node:os");
14
+ let node_module = require("node:module");
14
15
  let node_url = require("node:url");
15
16
  let acorn = require("acorn");
16
17
  let esbuild = require("esbuild");
@@ -921,10 +922,7 @@ const main = async () => {
921
922
  node: policy.consumerNode,
922
923
  typescript: policy.consumerTypescript
923
924
  };
924
- const tracked = (0, node_child_process.execFileSync)("git", ["ls-files", "-z"], {
925
- cwd: root,
926
- encoding: "utf8"
927
- }).split("\0");
925
+ const tracked = require_git_tracked_output.readGitTrackedOutput(root, "paths").split("\0");
928
926
  const files = {};
929
927
  for (const file of tracked) {
930
928
  if (file.split("/").some((part) => part === "node_modules" || part === ".git") || !["package.json", "pnpm-workspace.yaml"].includes(node_path.default.posix.basename(file)) && require_toolchain_inputs.githubAutomationFileKind(file) !== "workflow") continue;