From 76bfe17c7b8fb9271b78907ba8a838eea7e930b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Aug 2022 09:09:03 +0000 Subject: [PATCH 1/3] fix(deps): bump @relaycorp/relaynet-core from 1.81.7 to 1.81.16 Bumps [@relaycorp/relaynet-core](https://github.com/relaycorp/relaynet-core-js) from 1.81.7 to 1.81.16. - [Release notes](https://github.com/relaycorp/relaynet-core-js/releases) - [Commits](https://github.com/relaycorp/relaynet-core-js/compare/v1.81.7...v1.81.16) --- updated-dependencies: - dependency-name: "@relaycorp/relaynet-core" dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package-lock.json | 69 +++++++++++++++++++++++------------------------ package.json | 2 +- 2 files changed, 34 insertions(+), 37 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0a34fae..5c035d5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@relaycorp/relaynet-core": "^1.81.7", + "@relaycorp/relaynet-core": "^1.81.16", "abort-controller": "^3.0.0", "axios": "^0.27.2", "buffer-to-arraybuffer": "0.0.6", @@ -39,9 +39,6 @@ }, "engines": { "node": ">=14" - }, - "peerDependencies": { - "@relaycorp/relaynet-core": "^1.60.0" } }, "node_modules/@ampproject/remapping": { @@ -1902,22 +1899,22 @@ } }, "node_modules/@relaycorp/relaynet-core": { - "version": "1.81.7", - "resolved": "https://registry.npmjs.org/@relaycorp/relaynet-core/-/relaynet-core-1.81.7.tgz", - "integrity": "sha512-nbcgITIO9Re3QTLre7Vs2Xd/wf3pso+yeeVJZE9F0/D0InrZmxm/L1LMnfoYOp0ONcdiALUIgIqh0GrLTX+zIA==", + "version": "1.81.16", + "resolved": "https://registry.npmjs.org/@relaycorp/relaynet-core/-/relaynet-core-1.81.16.tgz", + "integrity": "sha512-2KtWBF9vk1M1+BEceU3iEaLOzPSGRddqLuCmNAUt80b95O7y9OfXMbrkkexgITxDRAQpnLpeIjIIgUSDEjJMjQ==", "dependencies": { "@peculiar/webcrypto": "^1.4.0", "@stablelib/aes-kw": "^1.0.1", - "@types/verror": "^1.10.5", + "@types/verror": "^1.10.6", "asn1js": "^3.0.5", "buffer-to-arraybuffer": "0.0.6", - "date-fns": "^2.28.0", + "date-fns": "^2.29.1", "dohdec": "^3.1.0", "is-valid-domain": "^0.1.6", "moment": "^2.29.4", - "pkijs": "^3.0.5", + "pkijs": "^3.0.7", "smart-buffer": "^4.2.0", - "uuid4": "^2.0.2", + "uuid4": "^2.0.3", "verror": "^1.10.1", "webcrypto-core": "^1.7.5" }, @@ -3080,9 +3077,9 @@ } }, "node_modules/date-fns": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz", - "integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==", + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.1.tgz", + "integrity": "sha512-dlLD5rKaKxpFdnjrs+5azHDFOPEu4ANy/LTh04A1DTzMM7qoajmKCBc8pkKRFT41CNzw+4gQh79X5C+Jq27HAw==", "engines": { "node": ">=0.11" }, @@ -8449,9 +8446,9 @@ } }, "node_modules/pkijs": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.0.5.tgz", - "integrity": "sha512-J6P30yzU7qSbuJIBaclwN93WbyoxjVlkYMgjQmE9wWkPUTHVu2cH6lkjWcIr2WAub5KH38BA1Eyeb4s9apUPTg==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.0.7.tgz", + "integrity": "sha512-QPV44vMDqHAbf3nmiz68NCfYCgZlLFboV0DT5mErSqCMz4CiYtACagGS1Z8Fsb+8yyEp4G3ctQEAktXwA34bRQ==", "dependencies": { "asn1js": "^3.0.5", "bytestreamjs": "^2.0.0", @@ -9597,9 +9594,9 @@ } }, "node_modules/uuid4": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/uuid4/-/uuid4-2.0.2.tgz", - "integrity": "sha512-TzsQS8sN1B2m9WojyNp0X/3JL8J2RScnrAJnooNPL6lq3lA02/XdoWysyUgI6rAif0DzkkWk51N6OggujPy2RA==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/uuid4/-/uuid4-2.0.3.tgz", + "integrity": "sha512-CTpAkEVXMNJl2ojgtpLXHgz23dh8z81u6/HEPiQFOvBc/c2pde6TVHmH4uwY0d/GLF3tb7+VDAj4+2eJaQSdZQ==" }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", @@ -11353,22 +11350,22 @@ } }, "@relaycorp/relaynet-core": { - "version": "1.81.7", - "resolved": "https://registry.npmjs.org/@relaycorp/relaynet-core/-/relaynet-core-1.81.7.tgz", - "integrity": "sha512-nbcgITIO9Re3QTLre7Vs2Xd/wf3pso+yeeVJZE9F0/D0InrZmxm/L1LMnfoYOp0ONcdiALUIgIqh0GrLTX+zIA==", + "version": "1.81.16", + "resolved": "https://registry.npmjs.org/@relaycorp/relaynet-core/-/relaynet-core-1.81.16.tgz", + "integrity": "sha512-2KtWBF9vk1M1+BEceU3iEaLOzPSGRddqLuCmNAUt80b95O7y9OfXMbrkkexgITxDRAQpnLpeIjIIgUSDEjJMjQ==", "requires": { "@peculiar/webcrypto": "^1.4.0", "@stablelib/aes-kw": "^1.0.1", - "@types/verror": "^1.10.5", + "@types/verror": "^1.10.6", "asn1js": "^3.0.5", "buffer-to-arraybuffer": "0.0.6", - "date-fns": "^2.28.0", + "date-fns": "^2.29.1", "dohdec": "^3.1.0", "is-valid-domain": "^0.1.6", "moment": "^2.29.4", - "pkijs": "^3.0.5", + "pkijs": "^3.0.7", "smart-buffer": "^4.2.0", - "uuid4": "^2.0.2", + "uuid4": "^2.0.3", "verror": "^1.10.1", "webcrypto-core": "^1.7.5" } @@ -12311,9 +12308,9 @@ } }, "date-fns": { - "version": "2.28.0", - "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.28.0.tgz", - "integrity": "sha512-8d35hViGYx/QH0icHYCeLmsLmMUheMmTyV9Fcm6gvNwdw31yXXH+O85sOBJ+OLnLQMKZowvpKb6FgMIQjcpvQw==" + "version": "2.29.1", + "resolved": "https://registry.npmjs.org/date-fns/-/date-fns-2.29.1.tgz", + "integrity": "sha512-dlLD5rKaKxpFdnjrs+5azHDFOPEu4ANy/LTh04A1DTzMM7qoajmKCBc8pkKRFT41CNzw+4gQh79X5C+Jq27HAw==" }, "debug": { "version": "4.3.3", @@ -16283,9 +16280,9 @@ } }, "pkijs": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.0.5.tgz", - "integrity": "sha512-J6P30yzU7qSbuJIBaclwN93WbyoxjVlkYMgjQmE9wWkPUTHVu2cH6lkjWcIr2WAub5KH38BA1Eyeb4s9apUPTg==", + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/pkijs/-/pkijs-3.0.7.tgz", + "integrity": "sha512-QPV44vMDqHAbf3nmiz68NCfYCgZlLFboV0DT5mErSqCMz4CiYtACagGS1Z8Fsb+8yyEp4G3ctQEAktXwA34bRQ==", "requires": { "asn1js": "^3.0.5", "bytestreamjs": "^2.0.0", @@ -17081,9 +17078,9 @@ "dev": true }, "uuid4": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/uuid4/-/uuid4-2.0.2.tgz", - "integrity": "sha512-TzsQS8sN1B2m9WojyNp0X/3JL8J2RScnrAJnooNPL6lq3lA02/XdoWysyUgI6rAif0DzkkWk51N6OggujPy2RA==" + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/uuid4/-/uuid4-2.0.3.tgz", + "integrity": "sha512-CTpAkEVXMNJl2ojgtpLXHgz23dh8z81u6/HEPiQFOvBc/c2pde6TVHmH4uwY0d/GLF3tb7+VDAj4+2eJaQSdZQ==" }, "v8-compile-cache-lib": { "version": "3.0.1", diff --git a/package.json b/package.json index ef7ba6e..719c687 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "node": ">=14" }, "dependencies": { - "@relaycorp/relaynet-core": "^1.81.7", + "@relaycorp/relaynet-core": "^1.81.16", "abort-controller": "^3.0.0", "axios": "^0.27.2", "buffer-to-arraybuffer": "0.0.6", From 21c487becd4bd09c40c20087e2b1a45ca9bc3222 Mon Sep 17 00:00:00 2001 From: Gus Narea Date: Thu, 18 Aug 2022 14:17:43 +0100 Subject: [PATCH 2/3] fix deps --- package-lock.json | 23 +++++++++++++---------- package.json | 6 +++--- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5c035d5..d5abece 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "1.0.0", "license": "MIT", "dependencies": { - "@relaycorp/relaynet-core": "^1.81.16", + "@relaycorp/relaynet-core": "< 2.0", "abort-controller": "^3.0.0", "axios": "^0.27.2", "buffer-to-arraybuffer": "0.0.6", @@ -19,7 +19,7 @@ "ws": "^7.5.3" }, "devDependencies": { - "@relaycorp/relaynet-testing": "^2.2.22", + "@relaycorp/relaynet-testing": "^2.2.26", "@relaycorp/shared-config": "^1.8.0", "@relaycorp/ws-mock": "^5.2.2", "@types/jest": "^27.4.1", @@ -39,6 +39,9 @@ }, "engines": { "node": ">=14" + }, + "peerDependencies": { + "@relaycorp/relaynet-core": "< 2.0" } }, "node_modules/@ampproject/remapping": { @@ -1927,12 +1930,12 @@ } }, "node_modules/@relaycorp/relaynet-testing": { - "version": "2.2.22", - "resolved": "https://registry.npmjs.org/@relaycorp/relaynet-testing/-/relaynet-testing-2.2.22.tgz", - "integrity": "sha512-AODICjYrDnaMn9T8LkZpG+5MhQGqfhd8Hvckz9sNFT5jdgUFCx+oZImc2aAksVD6TL0YN/vyNjpgqP/SDQbZhg==", + "version": "2.2.26", + "resolved": "https://registry.npmjs.org/@relaycorp/relaynet-testing/-/relaynet-testing-2.2.26.tgz", + "integrity": "sha512-TH+f1XyDS249ArTry1FO3gm4/O8gwetJOf/2ZMYcQvmK1nkf/3AvkpvuGm4zlA2arqYFZgKmxJ9vOdTdotm7Yw==", "dev": true, "dependencies": { - "@relaycorp/relaynet-core": "^1.81.7" + "@relaycorp/relaynet-core": "^1.81.16" }, "engines": { "node": ">=12" @@ -11371,12 +11374,12 @@ } }, "@relaycorp/relaynet-testing": { - "version": "2.2.22", - "resolved": "https://registry.npmjs.org/@relaycorp/relaynet-testing/-/relaynet-testing-2.2.22.tgz", - "integrity": "sha512-AODICjYrDnaMn9T8LkZpG+5MhQGqfhd8Hvckz9sNFT5jdgUFCx+oZImc2aAksVD6TL0YN/vyNjpgqP/SDQbZhg==", + "version": "2.2.26", + "resolved": "https://registry.npmjs.org/@relaycorp/relaynet-testing/-/relaynet-testing-2.2.26.tgz", + "integrity": "sha512-TH+f1XyDS249ArTry1FO3gm4/O8gwetJOf/2ZMYcQvmK1nkf/3AvkpvuGm4zlA2arqYFZgKmxJ9vOdTdotm7Yw==", "dev": true, "requires": { - "@relaycorp/relaynet-core": "^1.81.7" + "@relaycorp/relaynet-core": "^1.81.16" } }, "@relaycorp/shared-config": { diff --git a/package.json b/package.json index 719c687..959aa3e 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,7 @@ "node": ">=14" }, "dependencies": { - "@relaycorp/relaynet-core": "^1.81.16", + "@relaycorp/relaynet-core": "< 2.0", "abort-controller": "^3.0.0", "axios": "^0.27.2", "buffer-to-arraybuffer": "0.0.6", @@ -50,7 +50,7 @@ "ws": "^7.5.3" }, "devDependencies": { - "@relaycorp/relaynet-testing": "^2.2.22", + "@relaycorp/relaynet-testing": "^2.2.26", "@relaycorp/shared-config": "^1.8.0", "@relaycorp/ws-mock": "^5.2.2", "@types/jest": "^27.4.1", @@ -69,7 +69,7 @@ "typescript": "^4.7.4" }, "peerDependencies": { - "@relaycorp/relaynet-core": "^1.60.0" + "@relaycorp/relaynet-core": "< 2.0" }, "prettier": "@relaycorp/shared-config/.prettierrc.json", "publishConfig": { From 4119d9ac6150952bf9f92a93b943cae06a36ed5c Mon Sep 17 00:00:00 2001 From: Gus Narea Date: Thu, 18 Aug 2022 14:19:55 +0100 Subject: [PATCH 3/3] fix --- src/lib/PoWebClient.spec.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib/PoWebClient.spec.ts b/src/lib/PoWebClient.spec.ts index 83f0e70..9885094 100644 --- a/src/lib/PoWebClient.spec.ts +++ b/src/lib/PoWebClient.spec.ts @@ -272,7 +272,8 @@ describe('registerNode', () => { expectedRegistration = new PrivateNodeRegistration( certificationPath.privateGateway, - certificationPath.publicGateway, + certificationPath.internetGateway, + 'braavos.relaycorp.cloud', ); expectedRegistrationSerialized = Buffer.from(await expectedRegistration.serialize()); }); @@ -287,9 +288,7 @@ describe('registerNode', () => { expect(mockAxios.history.post).toHaveLength(1); expect(mockAxios.history.post[0].url).toEqual('/nodes'); expect(mockAxios.history.post[0].headers).toHaveProperty('Content-Type', PNRR_CONTENT_TYPE); - expect( - Buffer.from(mockAxios.history.post[0].data).equals(Buffer.from(pnraSerialized)), - ).toBeTruthy(); + expect(Buffer.from(mockAxios.history.post[0].data)).toEqual(Buffer.from(pnraSerialized)); }); test('An invalid response content type should be refused', async () => { @@ -350,7 +349,7 @@ describe('deliverParcel', () => { certificationPath.privateGateway, nodeKeyPairs.privateGateway.privateKey, ); - verifier = new ParcelDeliveryVerifier([certificationPath.publicGateway]); + verifier = new ParcelDeliveryVerifier([certificationPath.internetGateway]); }); let client: PoWebClient;