Skip to content

Commit 440e249

Browse files
vveerrggclaude
andcommitted
chore(deps): upgrade to Noble 2.0, vitest 4, nostr-crypto-utils 0.6.0
- @noble/curves ^1.9.7 → ^2.0.1, @noble/hashes ^1.8.0 → ^2.0.1 - Remove standalone @noble/secp256k1 (unused directly) - vitest ^3.2.4 → ^4.0.18, @vitest/coverage-v8 ^3.2.4 → ^4.0.18 - nostr-crypto-utils ^0.5.1 → ^0.6.0 - Fix browser build: externalize jsonwebtoken, alias nostr-crypto-utils to CJS - 8/8 tests pass, 0 vulnerabilities Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bc323c0 commit 440e249

3 files changed

Lines changed: 357 additions & 1833 deletions

File tree

esbuild.browser.mjs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import { build } from 'esbuild';
22
import path from 'path';
33

44
// Plugin to replace Node builtins with empty modules (same as webpack fallback: false)
5-
// Exclude 'buffer' — nostr-crypto-utils uses the npm `buffer` polyfill package
5+
// Stub Node builtins that aren't needed in browser
6+
// Keep 'buffer' — still used by bech32 encoding in nostr-crypto-utils nip-19
67
const emptyNodeBuiltins = {
78
name: 'empty-node-builtins',
89
setup(build) {
@@ -35,9 +36,10 @@ const result = await build({
3536
outfile: 'dist/browser/nostr-auth-middleware.min.js',
3637
target: ['es2020'],
3738
platform: 'browser',
38-
external: ['express', 'winston'],
39+
external: ['express', 'winston', 'jsonwebtoken'],
3940
alias: {
4041
'@': path.resolve('src'),
42+
'nostr-crypto-utils': path.resolve('node_modules/nostr-crypto-utils/dist/cjs/index.js'),
4143
},
4244
plugins: [emptyNodeBuiltins],
4345
metafile: true,

0 commit comments

Comments
 (0)