Skip to content

Commit fab663e

Browse files
MajorTalclaude
andcommitted
Fix CLI auth crash: pin @noble/curves v2 in CLI, add e2e tests to CI
The CLI's core-dist imports @noble/curves/secp256k1.js (with .js extension), which requires v2's exports map. viem was pulling in v1.2.0 transitively into cli/node_modules, which only exports ./secp256k1 (no .js) — causing ERR_PACKAGE_PATH_NOT_EXPORTED on every authenticated command. - Add @noble/curves and @noble/hashes ^2.0.1 as direct CLI dependencies - Add e2e tests to npm test and CI workflow so this class of bug is caught Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 83f9571 commit fab663e

4 files changed

Lines changed: 57 additions & 12 deletions

File tree

.github/workflows/test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ jobs:
2121
- run: npm run test:skill
2222
- run: npm run test:sync
2323
- run: node --test --import tsx src/**/*.test.ts
24+
- run: npm run test:e2e

cli/package-lock.json

Lines changed: 53 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"core-dist/"
1616
],
1717
"dependencies": {
18+
"@noble/curves": "^2.0.1",
19+
"@noble/hashes": "^2.0.1",
1820
"@x402/evm": "^2.6.0",
1921
"@x402/fetch": "^2.6.0",
2022
"viem": "^2.47.1"

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"start": "node dist/index.js",
2020
"test:skill": "node --test --import tsx SKILL.test.ts",
2121
"test:sync": "node --test --import tsx sync.test.ts",
22-
"test": "node --experimental-test-module-mocks --test --import tsx SKILL.test.ts sync.test.ts core/src/**/*.test.ts src/**/*.test.ts",
22+
"test": "node --experimental-test-module-mocks --test --import tsx SKILL.test.ts sync.test.ts core/src/**/*.test.ts src/**/*.test.ts && node --test cli-e2e.test.mjs",
2323
"test:e2e": "node --test cli-e2e.test.mjs"
2424
},
2525
"keywords": [

0 commit comments

Comments
 (0)