cuke-dedup 0.3.0 → 0.5.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
@@ -5,6 +5,70 @@ All notable changes to CukeDedup are documented in this file. The project follow
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.5.0] - 2026-09-16
9
+
10
+ ### Added
11
+
12
+ - Interactive terminal reports show the tool version, selective color, a finding-count footer, and detection time. `NO_COLOR` disables ANSI styling; redirected output remains plain text.
13
+
14
+ ### Changed
15
+
16
+ - Terminal findings have a blank line after each rule heading and between findings instead of divider lines.
17
+ - `obj['name']` and `obj.name` read the same property, so two handlers that differ only in that
18
+ spelling are now recognised as the same handler. This applies to every property access in a
19
+ handler, not only assertions: `page['locator']('x')` matches `page.locator('x')`. Only a static
20
+ string literal whose decoded value is a valid identifier is folded — a dynamic key, a template
21
+ literal, or a name with no dot spelling such as `['not.resolves']` keeps its own identity.
22
+ Optional access is preserved, so `a?.['b']` matches `a?.b` and neither matches `a.b`.
23
+ **Reports can gain findings on upgrade**, because pairs that were previously distinguished only
24
+ by access spelling are now duplicates.
25
+
26
+ ### Fixed
27
+
28
+ - The regular-expression `v` flag is part of a matcher's identity. It enables Unicode set notation
29
+ and changes character-class semantics, so `/^a gauge$/v` and `/^a gauge$/` match different inputs
30
+ and are no longer reported as `normalized-matcher`. Flags that only affect how a match is executed
31
+ — `g`, `y` and `d` — are still ignored for identity, and two matchers carrying `v` still compare
32
+ as the same matcher.
33
+ - Replacing the assertion factory through a second `require()` of the same module now revokes
34
+ assertion trust. Two `require()` calls for one module return the same cached object, so
35
+ `other.expect = replacement` replaces the factory that a separate `api.expect(...)` call uses.
36
+ Previously only a local alias (`const other = api`) propagated, so handlers relying on a factory
37
+ replaced through the second binding were still reported as duplicates.
38
+ - A `for (const x of xs)` or `for (const x in xs)` head binds `x` for the loop, so a reference to
39
+ `x` in the body is the loop variable rather than an outer constant of the same name. The binding
40
+ was not registered, so the outer constant's value was substituted into the loop body. This was
41
+ wrong in both directions: identical loop handlers with different unrelated outer constants were
42
+ reported as distinct, and different loop bodies sharing an outer constant could be reported as
43
+ duplicates. `class`, `function`, `catch` and classic `for (let i = …)` bindings were already
44
+ handled.
45
+
46
+ ## [0.4.0] - 2026-09-15
47
+
48
+ ### Changed
49
+
50
+ - Static computed property access resolves the same way dot access does at every position of an
51
+ assertion chain, so `expect(x)['not'].toBe(y)` now carries the semantics of
52
+ `expect(x).not.toBe(y)`. Conflicting expected values behind a computed modifier are no longer
53
+ collapsed into a `parameterization-candidate`, and a dotted and a computed spelling of the same
54
+ assertion can now be reported as near-duplicates where previously neither was. Reports can
55
+ therefore change in both directions on upgrade.
56
+ - A property name resolves only when it is written as a static string literal. A concatenation, a
57
+ template literal, a runtime value, or an escape the decoder does not support stays unresolved
58
+ rather than resolving to a name the source never spells, which keeps the handler non-comparable
59
+ instead of claiming an assertion.
60
+
61
+ ### Fixed
62
+
63
+ - Writing through an alias of a matcher builder revokes assertion trust for every spelling of that
64
+ alias, not only the flat one. Nested destructuring, shorthand bindings, shorthand bindings
65
+ carrying a default, and object rest bindings are now treated like `const negated =
66
+ api.expect.not`. Handlers that rely on a matcher replaced through one of those aliases are no
67
+ longer reported as duplicates.
68
+ - Object rest bindings are treated as the shallow copies they are. `copy.not.objectContaining = x`
69
+ reaches the object the source still references and revokes trust, while `copy.not = x` replaces a
70
+ slot on the copy alone and leaves trust intact. Previously neither revoked it.
71
+
8
72
  ## [0.3.0] - 2026-09-14
9
73
 
10
74
  ### Added
@@ -159,6 +223,8 @@ Initial public release.
159
223
  - Native Cargo and npm distributions for eight supported targets.
160
224
  - A checksum-verified GitHub Action and an agent-oriented CukeDedup skill.
161
225
 
226
+ [0.5.0]: https://github.com/figueiredoluiz/cuke-dedup/compare/v0.4.0...v0.5.0
227
+ [0.4.0]: https://github.com/figueiredoluiz/cuke-dedup/compare/v0.3.0...v0.4.0
162
228
  [0.3.0]: https://github.com/figueiredoluiz/cuke-dedup/compare/v0.2.1...v0.3.0
163
229
  [0.2.1]: https://github.com/figueiredoluiz/cuke-dedup/compare/v0.2.0...v0.2.1
164
230
  [0.2.0]: https://github.com/figueiredoluiz/cuke-dedup/compare/v0.1.1...v0.2.0
package/README.md CHANGED
@@ -23,7 +23,7 @@ With Cargo:
23
23
  cargo install cuke-dedup
24
24
  ```
25
25
 
26
- Or in a JavaScript project:
26
+ Or in a JavaScript project, using Node.js 24 LTS (recommended):
27
27
 
28
28
  ```sh
29
29
  npm install --save-dev cuke-dedup
@@ -136,7 +136,7 @@ steps:
136
136
  with:
137
137
  fetch-depth: 0
138
138
  persist-credentials: false
139
- - uses: figueiredoluiz/cuke-dedup@v0.3.0
139
+ - uses: figueiredoluiz/cuke-dedup@v0.5.0
140
140
  with:
141
141
  path: .
142
142
  threshold: 5
@@ -185,7 +185,7 @@ and is distributed independently from the Cargo and npm packages.
185
185
 
186
186
  ## Compatibility
187
187
 
188
- - Rust 1.90 or newer is required. The npm launcher is tested on Node.js 20 and 24.
188
+ - Building from source requires Rust 1.90 or newer. Node.js 24 LTS is recommended for the npm launcher; Node.js 20 remains the minimum compatible version and is tested in CI.
189
189
  - Definition extraction currently supports JavaScript and TypeScript, including JSX and common
190
190
  module variants.
191
191
  - Static analysis cannot safely resolve every dynamic configuration, matcher, wrapper, or imported
@@ -18,7 +18,7 @@ steps:
18
18
  fetch-depth: 0
19
19
  persist-credentials: false
20
20
 
21
- - uses: figueiredoluiz/cuke-dedup@v0.3.0
21
+ - uses: figueiredoluiz/cuke-dedup@v0.5.0
22
22
  id: cuke-dedup
23
23
  with:
24
24
  path: .
package/docs/reports.md CHANGED
@@ -17,6 +17,10 @@ file-only run prints the generated paths to stdout.
17
17
  Terminal and JSONL both own stdout and cannot be selected together. JSONL can be combined with
18
18
  file reporters without contaminating the stream.
19
19
 
20
+ The terminal report shows the tool version, leaves a blank line after each rule heading and between findings, and ends with the total number of active findings and detection time. Timing covers discovery, parsing, and analysis; `--no-metrics` omits it.
21
+
22
+ Rule headings are bold cyan, paths are blue, error/warning labels are red/yellow, and footer details are gray only when stdout is a terminal. Set `NO_COLOR` to a nonempty value to disable color. Piped output and the other report formats contain no ANSI color codes.
23
+
20
24
  ## JSON and HTML
21
25
 
22
26
  JSON schema version `2` contains:
@@ -7,7 +7,7 @@ resource limits keep failures visible and bound the work performed.
7
7
  ## Compatibility
8
8
 
9
9
  - The minimum supported Rust version is 1.90.
10
- - The npm launcher is tested on Node.js 20 and 24.
10
+ - Node.js 24 LTS is recommended for the npm launcher. CI also tests Node.js 20 as the minimum compatible version; Node.js 20 has reached end of life upstream.
11
11
  - Source adapters cover JavaScript and TypeScript, including JSX and common module variants.
12
12
  - Unsupported source languages are rejected rather than guessed.
13
13
  - Classic Gherkin and Gherkin Markdown are supported, including declared Gherkin dialects.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cuke-dedup",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "description": "Static analysis for duplicate and reusable Cucumber step definitions",
5
5
  "type": "module",
6
6
  "bin": {
@@ -47,13 +47,13 @@
47
47
  "npm/platforms/*"
48
48
  ],
49
49
  "optionalDependencies": {
50
- "cuke-dedup-darwin-arm64": "0.3.0",
51
- "cuke-dedup-darwin-x64": "0.3.0",
52
- "cuke-dedup-linux-arm64-gnu": "0.3.0",
53
- "cuke-dedup-linux-arm64-musl": "0.3.0",
54
- "cuke-dedup-linux-x64-gnu": "0.3.0",
55
- "cuke-dedup-linux-x64-musl": "0.3.0",
56
- "cuke-dedup-windows-arm64-msvc": "0.3.0",
57
- "cuke-dedup-windows-x64-msvc": "0.3.0"
50
+ "cuke-dedup-darwin-arm64": "0.5.0",
51
+ "cuke-dedup-darwin-x64": "0.5.0",
52
+ "cuke-dedup-linux-arm64-gnu": "0.5.0",
53
+ "cuke-dedup-linux-arm64-musl": "0.5.0",
54
+ "cuke-dedup-linux-x64-gnu": "0.5.0",
55
+ "cuke-dedup-linux-x64-musl": "0.5.0",
56
+ "cuke-dedup-windows-arm64-msvc": "0.5.0",
57
+ "cuke-dedup-windows-x64-msvc": "0.5.0"
58
58
  }
59
59
  }