@geonosis/lint-parity 2.6.1 → 2.8.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @geonosis/lint-parity
2
2
 
3
+ ## 2.8.0
4
+
5
+ ## 2.7.0
6
+
7
+ ### Patch Changes
8
+
9
+ - c13ade8: `manifestOf` leaves out a rule the plugin has retired (`meta.retired`). A retired id still resolves so
10
+ a config written before the retirement parses, and it reports nothing by design — so a corpus can
11
+ never be evidence about it. Listed in the manifest a plugin's corpus build writes, it read as reach NO
12
+ for ever in every consumer's report; the kit's own shipped manifest carried both retired ids until
13
+ this, 82 rules where the corpus is evidence about 80.
14
+
3
15
  ## 2.6.1
4
16
 
5
17
  ## 2.6.0
@@ -34,13 +34,13 @@ if (existsSync(src)) {
34
34
  const built = newest(dist)
35
35
  if (built === 0) {
36
36
  process.stderr.write(
37
- 'geonosis-lint-parity: this tree has never been built — run pnpm build. No dist here at all, which is what a fresh clone or a linked git worktree starts with; nothing is stale.\n',
37
+ 'geonosis-lint-parity: this tree has never been built — run pnpm build. No dist here at all, which is what a fresh clone or a linked git worktree starts with; nothing is stale.\n'
38
38
  )
39
39
  process.exit(2)
40
40
  }
41
41
  if (newest(src, NOT_SOURCE) > built) {
42
42
  process.stderr.write(
43
- 'geonosis-lint-parity: dist is older than src — run pnpm build before trusting this bin.\n',
43
+ 'geonosis-lint-parity: dist is older than src — run pnpm build before trusting this bin.\n'
44
44
  )
45
45
  process.exit(2)
46
46
  }
@@ -278,9 +278,13 @@ var ruleIdOf = (line) => {
278
278
  return at === -1 ? token : `${token.slice(0, at)}/${token.slice(at + 1, -1)}`;
279
279
  };
280
280
  var MANIFEST_FILE = "manifest.json";
281
+ var isRetired = (rule) => {
282
+ const retired = rule?.meta?.retired;
283
+ return typeof retired === "object" && retired !== null;
284
+ };
281
285
  var manifestOf = (plugin) => ({
282
286
  plugin: plugin.meta.name,
283
- rules: Object.keys(plugin.rules).map((rule) => `${plugin.meta.name}/${rule}`).toSorted()
287
+ rules: Object.entries(plugin.rules).filter(([, rule]) => !isRetired(rule)).map(([rule]) => `${plugin.meta.name}/${rule}`).toSorted()
284
288
  });
285
289
  var namesRule = (claim, rule) => {
286
290
  if (claim === rule) return true;
package/dist/index.d.ts CHANGED
@@ -131,11 +131,6 @@ type CorpusManifest = {
131
131
  plugin: string;
132
132
  rules: string[];
133
133
  };
134
- /**
135
- * The manifest for a plugin, off the plugin itself. A plugin's corpus build writes what this
136
- * returns beside its copied fixture tree — derived, never hand-maintained, so a rule cannot be
137
- * added to the plugin and forgotten in the list of what the corpus is evidence about.
138
- */
139
134
  declare const manifestOf: (plugin: {
140
135
  meta: {
141
136
  name: string;
@@ -154,7 +149,7 @@ declare const readManifest: (corpus: string) => CorpusManifest;
154
149
  * consumer inherits every one of those as a claim it cannot check. The corpus is the evidence, and
155
150
  * `neither` is the list that has to stay empty.
156
151
  */
157
- declare const corpusOf: ({ configA, configB, corpus, expectChanged, oxlint, }: {
152
+ declare const corpusOf: ({ configA, configB, corpus, expectChanged, oxlint }: {
158
153
  configA: string;
159
154
  configB: string;
160
155
  corpus: string;
@@ -202,21 +197,21 @@ declare const parseParityArgs: (argv: string[]) => ParityArgs;
202
197
  * config named relatively does. A census taken under different arguments would describe a run
203
198
  * nobody made, which is the failure this whole envelope is about.
204
199
  */
205
- declare const filesLintedBy: ({ config, cwd, oxlint, paths, }: {
200
+ declare const filesLintedBy: ({ config, cwd, oxlint, paths }: {
206
201
  config: string;
207
202
  cwd: string;
208
203
  oxlint: string;
209
204
  paths: string[];
210
205
  }) => string[];
211
206
  /** Which files both configs would read, and which each would read alone. */
212
- declare const fileCensus: ({ configA, configB, cwd, oxlint, paths, }: {
207
+ declare const fileCensus: ({ configA, configB, cwd, oxlint, paths }: {
213
208
  configA: string;
214
209
  configB: string;
215
210
  cwd: string;
216
211
  oxlint: string;
217
212
  paths: string[];
218
213
  }) => FileCensus;
219
- declare const parityOf: ({ configA, configB, cwd, out, oxlint, paths, }: {
214
+ declare const parityOf: ({ configA, configB, cwd, out, oxlint, paths }: {
220
215
  configA: string;
221
216
  configB: string;
222
217
  cwd: string;
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import {
17
17
  ruleIdOf,
18
18
  rulesNamedBy,
19
19
  rulesTurnedOffBy
20
- } from "./chunk-JPGZG2HA.js";
20
+ } from "./chunk-OQSXP7ZK.js";
21
21
  export {
22
22
  MANIFEST_FILE,
23
23
  ParityError,
@@ -9,7 +9,7 @@ import {
9
9
  parseParityArgs,
10
10
  resolveOxlint,
11
11
  writeEnvelope
12
- } from "./chunk-JPGZG2HA.js";
12
+ } from "./chunk-OQSXP7ZK.js";
13
13
 
14
14
  // src/parity-cli.ts
15
15
  import { mkdirSync, writeFileSync } from "fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geonosis/lint-parity",
3
- "version": "2.6.1",
3
+ "version": "2.8.0",
4
4
  "types": "./dist/index.d.ts",
5
5
  "description": "Findings parity and rule reach over any two oxlint configs — the diff a fork is deleted on.",
6
6
  "keywords": [
@@ -45,7 +45,7 @@
45
45
  "access": "public"
46
46
  },
47
47
  "devDependencies": {
48
- "@geonosis/ratchet": "2.6.1"
48
+ "@geonosis/ratchet": "2.8.0"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "tsup",