Skip to content

Commit

Permalink
Merge pull request #541 from xmtp/rygine/deps
Browse files Browse the repository at this point in the history
Upgrade some dependencies, remove `js-sha3`
  • Loading branch information
rygine committed Feb 26, 2024
2 parents 845d6f1 + 8e7252d commit fe3b5d1
Show file tree
Hide file tree
Showing 7 changed files with 609 additions and 738 deletions.
78 changes: 37 additions & 41 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"build": "yarn clean:dist && rollup -c",
"build:bench": "rollup -c rollup.config.bench.js",
"build:docs": "yarn clean:docs && mkdir -p tmp && cp README.md tmp/ && sed -i.bak '/badge.svg/d' tmp/README.md && typedoc --excludePrivate --readme tmp/README.md src/index.ts",
"clean": "yarn clean:artifacts && yarn clean:dist && yarn clean:deps && yarn clean:docs",
"clean": "yarn clean:artifacts && yarn clean:dist && yarn clean:docs && yarn clean:deps",
"clean:artifacts": "rm -rf docs tmp package.tgz",
"clean:deps": "rm -rf node_modules",
"clean:dist": "rm -rf dist",
Expand Down Expand Up @@ -102,56 +102,52 @@
}
]
},
"resolutions": {
"long": "5.2.0"
},
"dependencies": {
"@noble/secp256k1": "1.7.1",
"@xmtp/proto": "3.34.0",
"@xmtp/user-preferences-bindings-wasm": "0.3.6",
"async-mutex": "0.4.0",
"elliptic": "6.5.4",
"ethers": "5.5.3",
"js-sha3": "0.9.3",
"long": "5.2.0"
"@xmtp/user-preferences-bindings-wasm": "^0.3.6",
"async-mutex": "^0.4.1",
"elliptic": "^6.5.4",
"ethers": "^5.7.2",
"long": "^5.2.3"
},
"devDependencies": {
"@commitlint/cli": "17.8.1",
"@commitlint/config-conventional": "16.2.4",
"@metamask/providers": "11.1.2",
"@rollup/plugin-json": "6.1.0",
"@rollup/plugin-terser": "0.4.4",
"@rollup/plugin-typescript": "11.1.6",
"@types/benchmark": "2.1.5",
"@types/bl": "5.0.2",
"@types/callback-to-async-iterator": "1.1.7",
"@types/elliptic": "6.4.18",
"@types/node": "18.19.17",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
"@metamask/providers": "^14.0.2",
"@rollup/plugin-json": "^6.1.0",
"@rollup/plugin-terser": "^0.4.4",
"@rollup/plugin-typescript": "^11.1.6",
"@types/benchmark": "^2.1.5",
"@types/bl": "^5.1.0",
"@types/callback-to-async-iterator": "^1.1.7",
"@types/elliptic": "^6.4.18",
"@types/node": "^18.19.18",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"@xmtp/rollup-plugin-resolve-extensions": "1.0.1",
"benny": "3.7.1",
"dd-trace": "5.5.0",
"eslint": "8.56.0",
"eslint-config-prettier": "9.1.0",
"eslint-config-standard": "17.1.0",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsdoc": "46.10.1",
"benny": "^3.7.1",
"dd-trace": "^5.5.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-config-standard": "^17.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.2.0",
"eslint-plugin-n": "^16.6.2",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-promise": "6.1.1",
"happy-dom": "^13.5.0",
"husky": "7.0.4",
"prettier": "3.2.5",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"happy-dom": "^13.6.2",
"husky": "^7.0.4",
"prettier": "^3.2.5",
"prettier-plugin-packagejson": "^2.4.12",
"rollup": "4.12.0",
"rollup-plugin-dts": "6.1.0",
"rollup-plugin-filesize": "10.0.0",
"semantic-release": "21.1.2",
"typedoc": "0.25.8",
"typescript": "^5.2.2",
"viem": "1.21.4",
"rollup": "^4.12.0",
"rollup-plugin-dts": "^6.1.0",
"rollup-plugin-filesize": "^10.0.0",
"semantic-release": "^21.1.2",
"typedoc": "^0.25.9",
"typescript": "^5.3.3",
"viem": "^1.21.4",
"vite": "^5.1.4",
"vitest": "^1.3.1"
},
Expand Down
1 change: 0 additions & 1 deletion rollup.config.bench.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const external = [
'crypto',
'elliptic',
'ethers',
'js-sha3',
'long',
]

Expand Down
1 change: 0 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const external = [
'crypto',
'elliptic',
'ethers',
'js-sha3',
'long',
]

Expand Down
4 changes: 1 addition & 3 deletions src/authn/LocalAuthenticator.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import sha3 from 'js-sha3'
import { authn, signature, publicKey } from '@xmtp/proto'
import AuthData from './AuthData'
import { PrivateKey } from '../crypto'
import { hexToBytes } from '../crypto/utils'
import Token from './Token'

const { keccak256 } = sha3
import { keccak256 } from 'viem'

export default class LocalAuthenticator {
private identityKey: PrivateKey
Expand Down
4 changes: 1 addition & 3 deletions test/authn/Authn.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sha3 from 'js-sha3'
import Long from 'long'
import { PrivateKey, PrivateKeyBundleV1, Signature } from '../../src/crypto'
import Authenticator from '../../src/authn/LocalAuthenticator'
Expand All @@ -7,8 +6,7 @@ import { hexToBytes } from '../../src/crypto/utils'
import { newWallet, sleep } from '../helpers'
import { Wallet } from 'ethers'
import AuthCache from '../../src/authn/AuthCache'

const { keccak256 } = sha3
import { keccak256 } from 'viem'

describe('authn', () => {
let authenticator: Authenticator
Expand Down
4 changes: 2 additions & 2 deletions vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
globals: true,
testTimeout: 30000,
hookTimeout: 30000,
testTimeout: 60000,
hookTimeout: 60000,
},
})
Loading

0 comments on commit fe3b5d1

Please sign in to comment.