Skip to content

Commit

Permalink
build: fix @peculiar/webcrypto is no peer dependencies but dev depend…
Browse files Browse the repository at this point in the history
…encies (#959)

* build: peculiar/webcrypto is no peer dependencies but dev dependencies

Signed-off-by: David Dal Busco <[email protected]>

* fix: crypto polyfill type check

---------

Signed-off-by: David Dal Busco <[email protected]>
Co-authored-by: Kai Peacock <[email protected]>
  • Loading branch information
peterpeterparker and krpeacock authored Dec 11, 2024
1 parent d1644db commit 2e8d15a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 5 deletions.
27 changes: 25 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@
},
"peerDependencies": {
"@dfinity/agent": "^2.1.3",
"@dfinity/principal": "^2.1.3",
"@peculiar/webcrypto": "^1.4.0"
"@dfinity/principal": "^2.1.3"
},
"dependencies": {
"@noble/curves": "^1.2.0",
"@noble/hashes": "^1.3.1",
"borc": "^2.1.1"
},
"devDependencies": {
"@peculiar/webcrypto": "^1.4.0",
"@types/jest": "^29.5.5",
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.30.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/identity/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// Node.js in a similar way.

import { Crypto } from '@peculiar/webcrypto';
global.crypto = new Crypto();
global.crypto = new Crypto() as globalThis.Crypto;
global.TextEncoder = require('text-encoding').TextEncoder;
global.TextDecoder = require('text-encoding').TextDecoder;
global.MessageChannel = require('worker_threads').MessageChannel;
Expand Down

0 comments on commit 2e8d15a

Please sign in to comment.