Commit 961eb02
authored
Modernize: Node 24, jscpd 5, .NET 10, Biome, node:test (#116)
* feat: bump action runtime to node24
GitHub Actions removed the node16 runtime, so the action no longer
starts on current runners. Move runs.using to node24.
Claude-Session: https://claude.ai/code/session_01JxEe85CyGm5rCeoLFdUZed
* build: modernize toolchain to Node 24, Biome, node:test, ESM
- Move to ESM ("type": "module") with nodenext + rewriteRelativeImportExtensions
and verbatimModuleSyntax so the source runs under node --test natively.
- Replace ESLint 8 + Prettier with Biome (biome.json mirrors prior style).
- Replace Jest/ts-jest/babel with Node's built-in test runner.
- Bump @types/node 24, TypeScript 5.9, @vercel/ncc 0.44; devcontainer node 24
+ .NET 10; CI setup-node 24. finalize-dist.mjs copies the problem matcher.
Claude-Session: https://claude.ai/code/session_01JxEe85CyGm5rCeoLFdUZed
* refactor: run jscpd 5 via CLI instead of the removed Node API
jscpd 5 is a Rust CLI with no in-process Node API and @jscpd/* libs stopped
exposing detectClones. duplicated.ts now prefers a jscpd/cpd binary on PATH and
falls back to `npx --yes jscpd@5`, then parses the JSON report (same schema).
@jscpd/core types are replaced with local interfaces in modals.ts.
Claude-Session: https://claude.ai/code/session_01JxEe85CyGm5rCeoLFdUZed
* fix: ESM source, native fetch, io.rmRF, and config/arg bug fixes
- Drop node-fetch (native fetch); replace shelled rm -rf with io.rmRF.
- Accept both isEnabled and legacy isEabled; resolve defaults without masking.
- Fix --include builder (no literal "undefined"); drop duplicate git status.
- ESM: .ts import extensions, import.meta.url for __dirname, enum (not const enum).
Claude-Session: https://claude.ai/code/session_01JxEe85CyGm5rCeoLFdUZed
* test: convert suite to node:test
Rewrite the four test files for node:test + node:assert. Avoid module mocking:
readConfig uses real temp files; dotnet captures stdout for the setFailed case.
Adds a legacy-isEabled backward-compat case.
Claude-Session: https://claude.ai/code/session_01JxEe85CyGm5rCeoLFdUZed
* feat: target .NET 10 in fixtures and tests
Bump test projects to net10.0, pin the SDK via global.json, and add
actions/setup-dotnet@v4 (10.0.x) to the test workflow. Read the real
hasChanges/hasDuplicates outputs via env vars.
Claude-Session: https://claude.ai/code/session_01JxEe85CyGm5rCeoLFdUZed
* docs: add modernization walkthrough and update README
Document Node 24 / jscpd 5 / .NET 10 requirements, the isEnabled key, and the
Biome + node:test dev workflow. Fix the "Aknowledgements" typo.
Claude-Session: https://claude.ai/code/session_01JxEe85CyGm5rCeoLFdUZed
* chore: rebuild dist bundle
Regenerate the ncc ESM bundle for the modernized source and remove stale
jscpd-v3 reporter assets (main.pug, public/, code-split chunk).
Claude-Session: https://claude.ai/code/session_01JxEe85CyGm5rCeoLFdUZed1 parent 9e8dc26 commit 961eb02
45 files changed
Lines changed: 122892 additions & 202556 deletions
File tree
- .devcontainer
- .github/workflows
- .vscode
- __tests__
- dotnet
- ConfigConsoleApp
- Console
- dist
- public
- js
- styles
- scripts
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | | - | |
| 21 | + | |
23 | 22 | | |
24 | 23 | | |
25 | 24 | | |
| |||
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
32 | | - | |
| 31 | + | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | 36 | | |
41 | 37 | | |
42 | 38 | | |
| |||
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| |||
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
31 | 40 | | |
32 | 41 | | |
33 | 42 | | |
34 | 43 | | |
35 | 44 | | |
36 | 45 | | |
37 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
38 | 51 | | |
39 | 52 | | |
40 | 53 | | |
| |||
46 | 59 | | |
47 | 60 | | |
48 | 61 | | |
49 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
4 | 16 | | |
5 | | - | |
6 | | - | |
7 | 17 | | |
8 | 18 | | |
9 | 19 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
17 | 30 | | |
18 | 31 | | |
19 | 32 | | |
| |||
38 | 51 | | |
39 | 52 | | |
40 | 53 | | |
41 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
42 | 77 | | |
43 | 78 | | |
44 | 79 | | |
| |||
0 commit comments