Skip to content

Commit

Permalink
Upgrade/ Remove Deps (#134)
Browse files Browse the repository at this point in the history
* Bump cross-fetch from 3.0.6 to 3.1.5 in /packages/identity

Bumps [cross-fetch](https://github.com/lquixada/cross-fetch) from 3.0.6 to 3.1.5.
- [Release notes](https://github.com/lquixada/cross-fetch/releases)
- [Changelog](https://github.com/lquixada/cross-fetch/blob/v4.x/CHANGELOG.md)
- [Commits](lquixada/cross-fetch@v3.0.6...v3.1.5)

---
updated-dependencies:
- dependency-name: cross-fetch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix lock, add cs, remove unused jest formatter

* add cs

* remove some leftover imports from celo base and phone utils

* cross-fetch 3.1.5 breaks

* add more changesets

* remove jest-circus; now default in jest

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aaron <[email protected]>
  • Loading branch information
dependabot[bot] and aaronmgdr authored Nov 8, 2023
1 parent 5da10a4 commit 8638c3a
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 89 deletions.
6 changes: 6 additions & 0 deletions .changeset/cold-roses-compete.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@celo/phone-number-privacy-common': patch
'@celo/phone-number-privacy-combiner': patch
---

Remove erroneos imports / dependent of @celo/phone-utils
5 changes: 5 additions & 0 deletions .changeset/good-oranges-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@celo/identity': patch
---

Upgrade cross-fetch dep
1 change: 0 additions & 1 deletion apps/combiner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
},
"devDependencies": {
"@celo/phone-number-privacy-signer": "workspace:^",
"@celo/phone-utils": "^5.0.5",
"@celo/utils": "^5.0.5",
"jest": "^29.7.0",
"knex": "^2.1.0",
Expand Down
3 changes: 0 additions & 3 deletions apps/combiner/test/end-to-end/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
WalletKeySigner,
} from '@celo/identity/lib/odis/query'
import { AuthenticationMethod } from '@celo/phone-number-privacy-common'
import { PhoneNumberUtils } from '@celo/phone-utils'
import {
ensureLeading0x,
normalizeAddressWith0x,
Expand Down Expand Up @@ -49,8 +48,6 @@ export const BLINDING_FACTOR = Buffer.from('0IsBvRfkBrkKCIW6HV0/T1zrzjQSe8wRyU3P
export const BLINDED_PHONE_NUMBER =
'hZXDhpC5onzBSFa1agZ9vfHzqwJ/QeJg77NGvWiQG/sFWsvHETzZvdWr2GpF3QkB'

export const PHONE_HASH_IDENTIFIER = PhoneNumberUtils.getPhoneHash(PHONE_NUMBER)

export const CONTACT_PHONE_NUMBER = '+14155559999'
export const CONTACT_PHONE_NUMBERS = [CONTACT_PHONE_NUMBER]

Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@
"eslint-plugin-prettier": "^5.0.1",
"husky": "^8.0.0",
"jest": "^29.7.0",
"jest-circus": "^29.7.0",
"jest-junit": "^14.0.1",
"jest-snapshot": "^29.7.0",
"lint-staged": "^15.0.2",
"patch-package": "^6.2.2",
Expand Down
1 change: 0 additions & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"dependencies": {
"@celo/base": "^5.0.5",
"@celo/contractkit": "^5.1.0",
"@celo/phone-utils": "^5.0.5",
"@celo/utils": "^5.0.5",
"@opentelemetry/api": "^1.6.0",
"@opentelemetry/auto-instrumentations-node": "^0.39.4",
Expand Down
2 changes: 0 additions & 2 deletions packages/common/src/test/values.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { PhoneNumberUtils } from '@celo/phone-utils'
import { normalizeAddressWith0x, privateKeyToAddress } from '@celo/utils/lib/address'

export const mockAccount = '0x0000000000000000000000000000000000007E57'
Expand All @@ -12,7 +11,6 @@ export const ACCOUNT_ADDRESS2 = privateKeyToAddress(PRIVATE_KEY2)
export const PRIVATE_KEY3 = '0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890fffff1d'
export const ACCOUNT_ADDRESS3 = normalizeAddressWith0x(privateKeyToAddress(PRIVATE_KEY3))
export const PHONE_NUMBER = '+15555555555'
export const IDENTIFIER = PhoneNumberUtils.getPhoneHash(PHONE_NUMBER)
export const BLINDING_FACTOR = Buffer.from('0IsBvRfkBrkKCIW6HV0/T1zrzjQSe8wRyU3PKojCnww=', 'base64')
// BLINDED_PHONE_NUMBER value dependent on PHONE_NUMBER AND BLINDING_FACTOR
// hardcoding to avoid importing blind_threshols_bls library
Expand Down
3 changes: 2 additions & 1 deletion packages/identity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@types/debug": "^4.1.10",
"bignumber.js": "^9.1.2",
"blind-threshold-bls": "npm:@celo/[email protected]",
"cross-fetch": "3.0.6",
"cross-fetch": "3.1.4",
"debug": "^4.1.1",
"elliptic": "^6.5.4",
"ethereum-cryptography": "1.2.0",
Expand All @@ -46,6 +46,7 @@
"fetch-mock": "9.11.0",
"ganache": "npm:@celo/[email protected]",
"jest": "^29.7.0",
"old-celo-base": "npm:@celo/[email protected]",
"old-identity-sdk": "npm:@celo/[email protected]"
},
"engines": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getPhoneHash } from '@celo/base'
import { getPhoneHash } from 'old-celo-base'
import { soliditySha3 } from '@celo/utils/lib/solidity'
import { OdisUtils as OdisUtilsOld } from 'old-identity-sdk'
import { OdisUtils } from '../../lib'
Expand Down
6 changes: 0 additions & 6 deletions packages/odis-identifiers/src/identifier.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// These functions were moved from the identity SDK because the protocol package
// and @celo/phone-utils both need these core identifier generation functions as well.
// The protocol package cannot depend on the identity SDK as is since this creates
// a non-trivial dependency cycle (currently, if A->B means "A depends on B",
// identity -> phone-number-privacy-common -> contractkit -> protocol).

export const PEPPER_SEPARATOR = '__'

// Docstring is duplicated in @celo/identity; make sure to update in both places.
Expand Down
90 changes: 18 additions & 72 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1850,7 +1850,7 @@ __metadata:
"@types/elliptic": "npm:^6.4.16"
bignumber.js: "npm:^9.1.2"
blind-threshold-bls: "npm:@celo/[email protected]"
cross-fetch: "npm:3.0.6"
cross-fetch: "npm:3.1.4"
debug: "npm:^4.1.1"
elliptic: "npm:^6.5.4"
ethereum-cryptography: "npm:1.2.0"
Expand All @@ -1859,6 +1859,7 @@ __metadata:
ganache: "npm:@celo/[email protected]"
io-ts: "npm:2.0.1"
jest: "npm:^29.7.0"
old-celo-base: "npm:@celo/[email protected]"
old-identity-sdk: "npm:@celo/[email protected]"
languageName: unknown
linkType: soft
Expand All @@ -1881,7 +1882,6 @@ __metadata:
"@celo/identity": "npm:^5.0.4"
"@celo/phone-number-privacy-common": "npm:^3.1.0"
"@celo/phone-number-privacy-signer": "workspace:^"
"@celo/phone-utils": "npm:^5.0.5"
"@celo/poprf": "npm:^0.1.9"
"@celo/utils": "npm:^5.0.5"
"@opentelemetry/api": "npm:^1.6.0"
Expand Down Expand Up @@ -1942,7 +1942,6 @@ __metadata:
dependencies:
"@celo/base": "npm:^5.0.5"
"@celo/contractkit": "npm:^5.1.0"
"@celo/phone-utils": "npm:^5.0.5"
"@celo/poprf": "npm:^0.1.9"
"@celo/utils": "npm:^5.0.5"
"@celo/wallet-local": "npm:^5.1.0"
Expand Down Expand Up @@ -2044,24 +2043,6 @@ __metadata:
languageName: unknown
linkType: soft

"@celo/phone-utils@npm:^5.0.5":
version: 5.0.5
resolution: "@celo/phone-utils@npm:5.0.5"
dependencies:
"@celo/base": "npm:^5.0.5"
"@celo/utils": "npm:^5.0.5"
"@types/country-data": "npm:^0.0.0"
"@types/google-libphonenumber": "npm:^7.4.23"
"@types/node": "npm:^18.7.16"
country-data: "npm:^0.0.31"
fp-ts: "npm:2.1.1"
google-libphonenumber: "npm:^3.2.27"
io-ts: "npm:2.0.1"
web3-utils: "npm:^1.10.0"
checksum: 9076c10ca5a163b32abdc629b0358341e3414e6a5074c00c7a26707cb5071e011189f668d92f8e3306b50a4b0e0dc9b7fc2d56a6069eae4444e3b0a51948087d
languageName: node
linkType: hard

"@celo/poprf@npm:^0.1.9":
version: 0.1.9
resolution: "@celo/poprf@npm:0.1.9"
Expand Down Expand Up @@ -5970,13 +5951,6 @@ __metadata:
languageName: node
linkType: hard

"@types/google-libphonenumber@npm:^7.4.23":
version: 7.4.23
resolution: "@types/google-libphonenumber@npm:7.4.23"
checksum: ddee3da7b945fbfa23d5a905be1af6911c9ae526b63d8dde2f8a3d64fc1692d096314dcac022c52cf6a14bc25e463913492204aa34cf59e6ac0a4750c292cdc0
languageName: node
linkType: hard

"@types/graceful-fs@npm:^4.1.3":
version: 4.1.6
resolution: "@types/graceful-fs@npm:4.1.6"
Expand Down Expand Up @@ -9594,6 +9568,15 @@ __metadata:
languageName: node
linkType: hard

"cross-fetch@npm:3.1.4":
version: 3.1.4
resolution: "cross-fetch@npm:3.1.4"
dependencies:
node-fetch: "npm:2.6.1"
checksum: adca8962668c00ba47bcb979c24184e58f0ed1d034f1cd9ca1886ac84fa6443cb22eab0c3469afb293f3ba70e9f6e27a6bdd69b4935b1da1810cd06964d828e3
languageName: node
linkType: hard

"cross-fetch@npm:^3.0.6":
version: 3.1.8
resolution: "cross-fetch@npm:3.1.8"
Expand Down Expand Up @@ -12677,13 +12660,6 @@ __metadata:
languageName: node
linkType: hard

"google-libphonenumber@npm:^3.2.27":
version: 3.2.32
resolution: "google-libphonenumber@npm:3.2.32"
checksum: 81f07d4f308170800a2b1d4e49d1fb401287e490242e43def95e1f0807ebdbcbce293247a95ba43c44ad32c04fb56c79dca8ac1b11eccd51a4fc90a78644016e
languageName: node
linkType: hard

"google-p12-pem@npm:^3.1.3":
version: 3.1.4
resolution: "google-p12-pem@npm:3.1.4"
Expand Down Expand Up @@ -14325,18 +14301,6 @@ __metadata:
languageName: node
linkType: hard

"jest-junit@npm:^14.0.1":
version: 14.0.1
resolution: "jest-junit@npm:14.0.1"
dependencies:
mkdirp: "npm:^1.0.4"
strip-ansi: "npm:^6.0.1"
uuid: "npm:^8.3.2"
xml: "npm:^1.0.1"
checksum: a3a960c233d3be178327be1d34a52b97f90177d0aee0be5c92d060a97aefc0e0b18ef26cbdb96a8305ecd7b5b9e033a9ee1eab4223af2a6cc316bffb51387598
languageName: node
linkType: hard

"jest-leak-detector@npm:^29.7.0":
version: 29.7.0
resolution: "jest-leak-detector@npm:29.7.0"
Expand Down Expand Up @@ -17564,8 +17528,6 @@ __metadata:
eslint-plugin-prettier: "npm:^5.0.1"
husky: "npm:^8.0.0"
jest: "npm:^29.7.0"
jest-circus: "npm:^29.7.0"
jest-junit: "npm:^14.0.1"
jest-snapshot: "npm:^29.7.0"
lint-staged: "npm:^15.0.2"
patch-package: "npm:^6.2.2"
Expand All @@ -17581,6 +17543,13 @@ __metadata:
languageName: unknown
linkType: soft

"old-celo-base@npm:@celo/[email protected]":
version: 5.0.0
resolution: "@celo/base@npm:5.0.0"
checksum: 5679cad0541cb07afda2c58b16a5195db8b9e6e24fa06c3be2cd40e5b4f148c2b35b9034f9a853676f6f50019f83304ee45ebbcaa988470870b3405ef6148193
languageName: node
linkType: hard

"old-identity-sdk@npm:@celo/[email protected]":
version: 1.5.2
resolution: "@celo/identity@npm:1.5.2"
Expand Down Expand Up @@ -23220,22 +23189,6 @@ __metadata:
languageName: node
linkType: hard

"web3-utils@npm:^1.10.0":
version: 1.10.3
resolution: "web3-utils@npm:1.10.3"
dependencies:
"@ethereumjs/util": "npm:^8.1.0"
bn.js: "npm:^5.2.1"
ethereum-bloom-filters: "npm:^1.0.6"
ethereum-cryptography: "npm:^2.1.2"
ethjs-unit: "npm:0.1.6"
number-to-bn: "npm:1.7.0"
randombytes: "npm:^2.1.0"
utf8: "npm:3.0.0"
checksum: 7303919fbea2be4a720eb7688a51edb84f993e481bf08ac482c0e3a8f100300ce9a1b51b2775a8356fd397aa2a64fa016d9621d9ced05bdbfe1013d6b5ea90ef
languageName: node
linkType: hard

"web3@npm:1.10.0":
version: 1.10.0
resolution: "web3@npm:1.10.0"
Expand Down Expand Up @@ -23739,13 +23692,6 @@ __metadata:
languageName: node
linkType: hard

"xml@npm:^1.0.1":
version: 1.0.1
resolution: "xml@npm:1.0.1"
checksum: 6c4c31a1308e45732e5ac6b50edbca0e8f7abe5cb5de10215d8e3c688819fe7c7706e056f6fb59b1a23fdf1000c2d7a8bba0a89e94aa1796cd2376d9a5ba401e
languageName: node
linkType: hard

"xmlbuilder@npm:~11.0.0":
version: 11.0.1
resolution: "xmlbuilder@npm:11.0.1"
Expand Down

0 comments on commit 8638c3a

Please sign in to comment.