@stll/oxlint-config 0.15.0 → 1.0.0

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
@@ -530,7 +530,7 @@ cannot be compared without executing Bun.
530
530
  Workflow/action and Docker definition edits conservatively force full CI.
531
531
  Unrelated application dependency changes do not force compiler parity.
532
532
  Setup-action runtime selectors and their tracked version-file contents must
533
- identify an exact stable release (or a dated Rust nightly). Floating selectors,
533
+ identify an exact stable release. Floating selectors,
534
534
  ranges, expressions, empty
535
535
  values, or omitted runtime versions report an unreadable snapshot and run parity
536
536
  even when their committed text is unchanged.
@@ -580,3 +580,17 @@ Supported text locks include Bun, npm, pnpm and bounded
580
580
  Yarn Classic/Berry shapes; unrecognized lock shapes run parity. Yarn compiler
581
581
  `patch:` protocols are unsupported and run parity because their patch bytes are
582
582
  not represented by the lock checksum alone.
583
+
584
+ ## Rust selectors
585
+
586
+ The shared `toolchain.json` Rust pin applies to `rust-toolchain(.toml)`, runtime
587
+ managers, workflow Rust action/reusable-workflow inputs and `RUSTUP_TOOLCHAIN`,
588
+ Cargo/rustup commands in scripts, and Rust Docker/service images. An omitted
589
+ `dtolnay/rust-toolchain` version selects a floating action default and fails.
590
+ Cargo manifest `rust-version` remains an MSRV floor at or below the shared pin.
591
+
592
+ Only `rustExceptions` in the consumer's root `stll-toolchain.json` can authorize
593
+ another exact stable release. Each record contains exactly `pin`, `reason`,
594
+ `tracking` (a GitHub issue URL) and `expires` (a future `YYYY-MM-DD` date).
595
+ Channels, expired records and `rust-version` rule opt-outs fail validation.
596
+ See the [root policy guide](../../README.md) for a complete declaration.
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { m as generateCloudSetup, p as cloudSetupPath } from "./toolchain-inputs.mjs";
2
+ import { h as generateCloudSetup, m as cloudSetupPath } from "./toolchain-inputs.mjs";
3
3
  import { n as parseToolchainConfiguration, r as readToolchainInputs } from "./toolchain-guard.mjs";
4
4
  import { t as parseToolchainPolicy } from "./toolchain-schema.mjs";
5
5
  import { constants } from "node:fs";
@@ -916,14 +916,9 @@ const stableVersion = (value) => {
916
916
  if (!/^\d+\.\d+\.\d+$/.test(version) || (0, semver.valid)(version) !== version) throw new Error("Runtime selector is not an exact stable version");
917
917
  return version;
918
918
  };
919
- const setupRuntimeVersion = ({ value, runtime }) => {
919
+ const setupRuntimeVersion = (value) => {
920
920
  if (typeof value !== "string" && typeof value !== "number") throw new Error("Unclassifiable setup runtime selector");
921
921
  const selector = String(value).trim();
922
- if (runtime === "rust" && /^nightly-\d{4}-\d{2}-\d{2}$/.test(selector)) {
923
- const date = selector.slice(8);
924
- if (new Date(date).toISOString().slice(0, 10) !== date) throw new Error("Invalid dated Rust toolchain");
925
- return selector;
926
- }
927
922
  return stableVersion(selector);
928
923
  };
929
924
  const setupRuntimeFileVersion = ({ snapshot, file, runtime }) => {
@@ -952,20 +947,11 @@ const setupRuntimeFileVersion = ({ snapshot, file, runtime }) => {
952
947
  if (file.endsWith(".toml")) {
953
948
  const value = (0, smol_toml.parse)(text);
954
949
  if (!changedRecord(value)) throw new Error("Unclassifiable setup runtime TOML");
955
- if (runtime === "rust" && changedRecord(value["toolchain"])) return setupRuntimeVersion({
956
- value: value["toolchain"]["channel"],
957
- runtime
958
- });
959
- if (runtime === "python") return setupRuntimeVersion({
960
- value: value["python-version"],
961
- runtime
962
- });
950
+ if (runtime === "rust" && changedRecord(value["toolchain"])) return setupRuntimeVersion(value["toolchain"]["channel"]);
951
+ if (runtime === "python") return setupRuntimeVersion(value["python-version"]);
963
952
  throw new Error("Unclassifiable setup runtime TOML");
964
953
  }
965
- return setupRuntimeVersion({
966
- value: text,
967
- runtime
968
- });
954
+ return setupRuntimeVersion(text);
969
955
  };
970
956
  const setupRuntimeVersions = (snapshot) => {
971
957
  const versions = [];
@@ -1023,10 +1009,7 @@ const setupRuntimeVersions = (snapshot) => {
1023
1009
  file: node_path.default.posix.normalize(input),
1024
1010
  runtime: inputRuntime
1025
1011
  });
1026
- } else version = setupRuntimeVersion({
1027
- value: input,
1028
- runtime: inputRuntime
1029
- });
1012
+ } else version = setupRuntimeVersion(input);
1030
1013
  versions.push({
1031
1014
  file,
1032
1015
  runtime: inputRuntime,