mirror of
https://github.com/nbd-wtf/nostr-tools.git
synced 2026-09-13 22:05:07 +00:00
Make nostr-wasm an optional peer dependency
A default npm install of nostr-tools pulled in nostr-wasm@0.1.0 and its WASM artifacts even for consumers using only the pure JavaScript implementation. The WASM adapter already takes an instance supplied by the caller through setNostrWasm, and the built JavaScript never imports nostr-wasm at runtime. Move nostr-wasm to an optional peer dependency, keeping the exact version as a development dependency for builds and benchmarks. Applications that select the WASM backend install nostr-wasm@0.1.0 explicitly.
This commit is contained in:
+6
-2
@@ -302,13 +302,16 @@
|
||||
"@noble/hashes": "2.0.1",
|
||||
"@scure/base": "2.0.0",
|
||||
"@scure/bip32": "2.0.1",
|
||||
"@scure/bip39": "2.0.1",
|
||||
"nostr-wasm": "0.1.0"
|
||||
"@scure/bip39": "2.0.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"nostr-wasm": "0.1.0",
|
||||
"typescript": ">=5.0.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"nostr-wasm": {
|
||||
"optional": true
|
||||
},
|
||||
"typescript": {
|
||||
"optional": true
|
||||
}
|
||||
@@ -333,6 +336,7 @@
|
||||
"mitata": "^0.1.6",
|
||||
"mock-socket": "^9.3.1",
|
||||
"node-fetch": "^2.6.9",
|
||||
"nostr-wasm": "0.1.0",
|
||||
"prettier": "^3.0.3",
|
||||
"typescript": "^5.8.2"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user