Commit 4cc0ffc
authored
v2.0.0: Full TypeScript modernization (#10)
* chore: setup modern toolchain
Replace Gulp/Browserify/Mocha with tsup/Vitest/Biome.
package.json v2.0.0, ESM+CJS dual exports, Node 20+.
tsconfig.json strict, ES2022 target.
Assisted-by: 🤖 claude-opus-4-6@default
* refactor: migrate source to TypeScript
Eid, exceptions, preconditions rewritten as typed classes.
ES2022 Error.cause support in all exception constructors.
tryToExecute preserves original error as cause.
Assisted-by: 🤖 claude-opus-4-6@default
* refactor: migrate tests to Vitest
59 tests, 100% coverage. Mocha+expect.js replaced with Vitest.
Added cause chaining tests for exceptions and tryToExecute.
Assisted-by: 🤖 claude-opus-4-6@default
* ci: replace Travis with GitHub Actions
Node 20+22 matrix, lint/test/build jobs.
Concurrency control, timeout protection.
Assisted-by: 🤖 claude-opus-4-6@default
* chore: remove legacy files
Drop gulp/, bower.json, .travis.yml, dist/, gulpfile.js.
Drop old lib/ and test/ (replaced by src/).
Assisted-by: 🤖 claude-opus-4-6@default
* docs: update README for v2
Defensive programming framing, ESM/CJS/browser examples.
Error.cause docs, rewritten EidPreconditions section.
Drop Bower, update badges to GitHub Actions.
Assisted-by: 🤖 claude-opus-4-6@default
* fix: address review feedback
CI: add permissions: contents: read, persist-credentials: false.
package.json: nested types in exports for CJS/ESM, add typecheck script.
eid.ts: fix %s injection in JFormatter (single-pass replace).
preconditions.ts: fix off-by-one in checkElementIndex (index >= size).
index.ts: remove misleading backward compat block.
Assisted-by: 🤖 claude-opus-4-6@default
* fix: restore Eid.preconditions and Eid.exceptions for backward compat
Attach preconditions and exceptions as static properties on Eid class.
Legacy consumers using Eid.preconditions.checkNotNull() still work.
Assisted-by: 🤖 claude-opus-4-6@default1 parent e4c8df6 commit 4cc0ffc
36 files changed
Lines changed: 4559 additions & 2615 deletions
File tree
- .github/workflows
- dist/browser
- toplevel
- gulp
- build
- lib
- eid
- src
- __tests__
- test
- eid
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
1 | 10 | | |
2 | | - | |
3 | 11 | | |
4 | 12 | | |
5 | 13 | | |
6 | | - | |
7 | 14 | | |
8 | 15 | | |
9 | 16 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
21 | 20 | | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 27 | + | |
| 28 | + | |
This file was deleted.
0 commit comments