Skip to content

Commit

Permalink
refactor: clean up dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
icidasset committed Dec 13, 2023
1 parent 60aab2e commit d0e2eea
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 32 deletions.
12 changes: 5 additions & 7 deletions packages/nest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"type": "module",
"version": "0.0.1",
"description": "Example package description.",
"author": "Hugo Dias <hugomrdias@gmail.com> (hugodias.me)",
"author": "Steven Vandevelde <icid.asset@gmail.com> (tokono.ma)",
"license": "(Apache-2.0 AND MIT)",
"homepage": "https://github.com/fission-codes/js-template/tree/main/packages/package1",
"homepage": "https://github.com/wnfs-wg/nest/tree/main/packages/nest",
"repository": {
"url": "fission-codes/js-template",
"directory": "packages/package1"
"url": "wnfs-wg/nest",
"directory": "packages/nest"
},
"exports": {
".": {
Expand Down Expand Up @@ -41,7 +41,6 @@
"test:browser": "playwright-test 'test/**/!(*.node).test.ts' --timeout 30000"
},
"dependencies": {
"@ipld/dag-cbor": "^9.0.6",
"@ipld/dag-pb": "^4.0.6",
"compare-versions": "^6.1.0",
"debounce": "^2.0.0",
Expand All @@ -50,11 +49,10 @@
"ipfs-unixfs": "^11.1.0",
"ipfs-unixfs-exporter": "^13.2.2",
"ipfs-unixfs-importer": "^15.2.1",
"iso-base": "^2.0.1",
"it-all": "^3.0.4",
"multiformats": "^12.1.3",
"uint8arrays": "^5.0.0",
"wnfs": "^0.1.27"
"wnfs": "0.1.27"
},
"devDependencies": {
"@types/assert": "^1.5.9",
Expand Down
1 change: 1 addition & 0 deletions packages/nest/src/crypto-browser.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export const webcrypto = globalThis.crypto
3 changes: 3 additions & 0 deletions packages/nest/src/crypto.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import crypto from 'crypto'

export const webcrypto = /** @type {Crypto} */ crypto.webcrypto
2 changes: 1 addition & 1 deletion packages/nest/src/rng.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { webcrypto } from 'iso-base/crypto'
import { webcrypto } from './crypto.js'

export interface Rng {
randomBytes: (count: number) => Uint8Array
Expand Down
2 changes: 1 addition & 1 deletion packages/nest/src/root-tree/basic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import * as DagPB from '@ipld/dag-pb'
import * as Raw from 'multiformats/codecs/raw'
import * as Uint8Arrays from 'uint8arrays'

import { webcrypto } from 'iso-base/crypto'
import { CID } from 'multiformats/cid'
import { PrivateForest, PublicDirectory } from 'wnfs'

Expand All @@ -20,6 +19,7 @@ import type { FileSystemChange } from '../types.js'

import { RootBranch } from '../path.js'
import { makeRngInterface } from '../rng.js'
import { webcrypto } from '../crypto.js'

// CLASS

Expand Down
24 changes: 1 addition & 23 deletions pnpm-lock.yaml

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

0 comments on commit d0e2eea

Please sign in to comment.