@neralabs/rerail-pack-javascript 0.1.4 → 0.1.5

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
@@ -17,7 +17,7 @@ It is checked by `npx vitest run test/engine/catalog/packs.test.ts -t "pack java
17
17
  | `upstream/eslint/` | ESLint's copied test cases (`fixtures/`) and its recording (`fixtures.expected.json`) |
18
18
  | `upstream/generate.mjs` | ESLint's recorder |
19
19
  | `upstream/eslint-plugin-unicorn/` | eslint-plugin-unicorn's copied test cases, its recording and its recorder (`generate.mjs`) |
20
- | `upstream/<tool>/gates.yaml`, `recording.lock`, `goldens.tsv` | The port readiness gates' manifest for the tool, the lock naming its recordings (`recording.json`, `corpus.json`, held in a GitHub release) and its goldens ([docs/port-readiness.md](../../docs/port-readiness.md)) |
20
+ | `upstream/<tool>/gates.yaml`, `recording.lock`, `goldens.tsv` | The port readiness gates' manifest for the tool, the lock naming its recordings (`recording.json`, `corpus.json`, kept out of git, by sha256) and its goldens ([docs/port-readiness.md](../../docs/port-readiness.md)) |
21
21
  | `candidates/rules/` | Ports of ESLint and eslint-plugin-unicorn rules still being evaluated: listed in `conformance.json`, scored and reported, never gated, never shipped |
22
22
  | `licenses/<tool>/` | The tool's licence and `UPSTREAM.md`, listing every copied file |
23
23
 
@@ -32,11 +32,15 @@ TypeScript they report overloads, declaration merges and type names, and with bo
32
32
  port would report the same violation again. `no-loss-of-precision` and `prefer-spread`, which typescript-eslint leaves
33
33
  to the core rule on TypeScript, run on every ECMA file.
34
34
 
35
- Re-recording runs offline against the pinned tool versions (the recorder's header lists them):
35
+ Re-recording is a maintainer deriving the pack's test data from its pins and archiving it
36
+ ([CONTRIBUTING.md](../../CONTRIBUTING.md#pack-test-data)); it is never committed. The recipe
37
+ (`scripts/pack-data/recipes/javascript.ts`) runs each tool's recorder against the pinned tool versions and upstream
38
+ commit (the recorder's header lists them):
36
39
 
37
40
  ```sh
38
- node upstream/generate.mjs --tools <dir> --eslint <ESLint checkout at v10.11.0>
39
- node upstream/eslint-plugin-unicorn/generate.mjs --tools <dir> --unicorn <eslint-plugin-unicorn checkout at v76.0.0>
41
+ npm run fixtures:derive -- --pack javascript # every tool
42
+ npm run fixtures:derive -- --pack javascript --tool eslint-plugin-unicorn # one
43
+ npm run fixtures:push -- --pack javascript --tool eslint-plugin-unicorn # on your own branch: archive it and rewrite its test-data.lock
40
44
  ```
41
45
 
42
46
  Scoring one rule with every false positive and false negative printed:
@@ -14,7 +14,7 @@ Each copied file is the `code` of one of the rule's own `valid` or `invalid` Rul
14
14
  left out, and identical code in the same language is written once. The port readiness gates' recorder (`npm run port-readiness:record`)
15
15
  reuses those files and writes every other case the gates read, the same verbatim `code`, as
16
16
  `upstream/eslint/fixtures/<rule>/<sha256 prefix>.<ext>`. Its recording (`recording.json`, which
17
- `upstream/eslint/recording.lock` names and a GitHub release holds) also holds the `code` of every RuleTester case of
17
+ `upstream/eslint/recording.lock` names by its sha256; it is cached, not committed) also holds the `code` of every RuleTester case of
18
18
  ESLint's rule tests, verbatim, as the words `not-overfit` reads.
19
19
 
20
20
  Paths are relative to the pack directory, `packs/javascript/`.
@@ -10381,8 +10381,8 @@ Paths are relative to the pack directory, `packs/javascript/`.
10381
10381
  | `upstream/eslint/fixtures/yoda/146.js` | `tests/lib/rules/yoda.js` | derived |
10382
10382
 
10383
10383
  > `recording.json` is a port readiness recording, and no file of this pack, so it is recorded here rather than in the
10384
- > table above: the tool-pack's `recording.lock` names it and a GitHub release holds the bytes (docs/port-readiness.md).
10385
- > It carries excerpts of this upstream's tests (`tests/lib/rules/*.js`: the `code` of each RuleTester case),
10386
- > redistributed under the licence above, together with Rerail's Apache-2.0; the LICENSE beside this file is this
10387
- > upstream's own, at the pinned commit.
10384
+ > table above: the tool-pack's `recording.lock` names it by its sha256, and the bytes are an object in S3, not a file in
10385
+ > git (docs/port-readiness.md). It carries excerpts of this upstream's tests (`tests/lib/rules/*.js`: the `code` of each
10386
+ > RuleTester case), redistributed under the licence above, together with Rerail's Apache-2.0; `LICENSE` beside this file
10387
+ > is this upstream's own, at the pinned commit.
10388
10388
 
@@ -11,7 +11,7 @@ Each copied file is the `code` of one of the rule's own `valid` or `invalid` tes
11
11
  recorder: cases for another parser or file type are left out, and identical cases are written once. The port readiness gates'
12
12
  recorder (`npm run port-readiness:record`) reuses those files and writes every other case the gates read, the same verbatim
13
13
  `code`, as `upstream/eslint-plugin-unicorn/fixtures/<rule>/<sha256 prefix>.<ext>`. Its recording (`recording.json`,
14
- which `upstream/eslint-plugin-unicorn/recording.lock` names and a GitHub release holds) also holds the `code` of every
14
+ which `upstream/eslint-plugin-unicorn/recording.lock` names by its sha256; it is cached, not committed) also holds the `code` of every
15
15
  test case of the plugin's rule tests, verbatim, as the words `not-overfit` reads.
16
16
 
17
17
  Paths are relative to the pack directory, `packs/javascript/`.
@@ -327,8 +327,8 @@ Paths are relative to the pack directory, `packs/javascript/`.
327
327
  | `upstream/eslint-plugin-unicorn/fixtures/prefer-node-protocol/065.ts` | `test/prefer-node-protocol.js` | derived |
328
328
 
329
329
  > `recording.json` is a port readiness recording, and no file of this pack, so it is recorded here rather than in the
330
- > table above: the tool-pack's `recording.lock` names it and a GitHub release holds the bytes (docs/port-readiness.md).
331
- > It carries excerpts of this upstream's tests (`test/*.js`: the `code` of each RuleTester case), redistributed under
332
- > the licence above, together with Rerail's Apache-2.0; the LICENSE beside this file is this upstream's own, at the
333
- > pinned commit.
330
+ > table above: the tool-pack's `recording.lock` names it by its sha256, and the bytes are an object in S3, not a file in
331
+ > git (docs/port-readiness.md). It carries excerpts of this upstream's tests (`test/*.js`: the `code` of each RuleTester
332
+ > case), redistributed under the licence above, together with Rerail's Apache-2.0; `LICENSE` beside this file is this
333
+ > upstream's own, at the pinned commit.
334
334
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neralabs/rerail-pack-javascript",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Rerail rule pack: ESLint core rules ported to Rerail code rules.",
5
5
  "license": "Apache-2.0 AND MIT",
6
6
  "repository": {