Commit e172c79
Switch to bun, add unit + integration tests
Replaces ts-node / ts-node-dev with bun for both running and watching.
Bun runs the existing TypeScript directly with no transpile step, and
its built-in test runner is what the new tests use.
- npm scripts rewritten in terms of `bun run` / `bun --watch run`
- Removed unused `node`, `@types/node`, `ts-node`, `ts-node-dev` deps
- Added `@types/bun` for `bun:test` types
- Dropped `package-lock.json` in favor of `bun.lock`
- `engines` now asks for bun >= 1.0
Tests live alongside source under `src/*.test.ts`:
- `encode.test.ts` covers `headerFor` and `inferOutFile` helpers (those
are now exported from `encode.ts` so they're testable in isolation).
- `roundtrip.test.ts` writes a fixture XML to a temp dir, encodes it,
decodes the result, and asserts byte-identical recovery — for both
`.ewprj` and `.ms14` headers, for a payload large enough to span more
than one PKWare section, and for an empty payload.
`bun test` runs all 11 tests; README documents `bun install` /
`bun run ewd` / `bun run ewe` / `bun test`.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 0e8b20c commit e172c79
7 files changed
Lines changed: 846 additions & 8639 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
16 | 18 | | |
17 | | - | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
23 | | - | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | | - | |
| 39 | + | |
38 | 40 | | |
39 | | - | |
| 41 | + | |
40 | 42 | | |
41 | 43 | | |
42 | 44 | | |
| |||
59 | 61 | | |
60 | 62 | | |
61 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
62 | 74 | | |
63 | 75 | | |
64 | 76 | | |
65 | | - | |
66 | | - | |
| 77 | + | |
| 78 | + | |
67 | 79 | | |
68 | 80 | | |
69 | | - | |
| 81 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments