From bef68ee081ec27c338b20e5a7da522e4f6944ac1 Mon Sep 17 00:00:00 2001 From: weboko Date: Fri, 23 Dec 2022 00:17:46 +0100 Subject: [PATCH 1/4] add lint rule to warn about missing deps in workspaces --- .eslintrc.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.eslintrc.json b/.eslintrc.json index c708935886..21b37c369e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -28,6 +28,10 @@ { "newlines-between": "always", "alphabetize": { "order": "asc" } } ], "no-constant-condition": ["error", { "checkLoops": false }], + "import/no-extraneous-dependencies": [ + "error", + { "devDependencies": false } + ], "sort-imports": [ "error", { "ignoreDeclarationSort": true, "ignoreCase": true } From ae764bc31ed3485282c679cf8cc07d276d8a937b Mon Sep 17 00:00:00 2001 From: weboko Date: Fri, 23 Dec 2022 00:18:16 +0100 Subject: [PATCH 2/4] add missing deps to workspaces --- package-lock.json | 34 +++++++++++++++++++++--- packages/enr/package.json | 1 + packages/libp2p-utils/package.json | 1 + packages/message-encryption/package.json | 1 + packages/peer-exchange/package.json | 2 ++ packages/tests/package.json | 7 +++++ 6 files changed, 43 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index a1e412e8b3..db38a07e8e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,11 +6,11 @@ "": { "name": "@waku/root", "workspaces": [ - "packages/proto", "packages/byte-utils", - "packages/enr", - "packages/interfaces", "packages/libp2p-utils", + "packages/proto", + "packages/interfaces", + "packages/enr", "packages/peer-exchange", "packages/core", "packages/dns-discovery", @@ -27271,6 +27271,7 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", + "@waku/interfaces": "*", "chai": "^4.3.4", "cspell": "^6.17.0", "eslint": "^8.6.0", @@ -27309,8 +27310,10 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", + "@waku/interfaces": "*", "chai": "^4.3.6", "cspell": "^6.17.0", + "debug": "^4.3.4", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", @@ -27377,6 +27380,7 @@ "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", "cspell": "^6.17.0", + "debug": "^4.3.4", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", @@ -27412,6 +27416,7 @@ "@typescript-eslint/parser": "^5.8.1", "chai": "^4.3.6", "cspell": "^6.17.0", + "debug": "^4.3.4", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", @@ -27443,6 +27448,8 @@ "@waku/core": "*", "@waku/enr": "*", "@waku/interfaces": "*", + "@waku/libp2p-utils": "*", + "@waku/proto": "*", "debug": "^4.3.4", "it-all": "^1.0.6", "it-length-prefixed": "^8.0.2", @@ -27521,15 +27528,22 @@ "@libp2p/bootstrap": "^5.0.0", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", + "app-root-path": "^3.0.0", + "chai": "^4.3.6", "cspell": "^6.17.0", + "debug": "^4.3.4", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-functional": "^4.0.2", "eslint-plugin-import": "^2.25.3", "eslint-plugin-prettier": "^4.0.0", + "mocha": "^9.1.3", "npm-run-all": "^4.1.5", + "p-timeout": "^6.0.0", + "portfinder": "^1.0.28", "prettier": "^2.1.1", + "tail": "^2.2.0", "typescript": "^4.6.3" }, "engines": { @@ -31340,6 +31354,7 @@ "@typescript-eslint/parser": "^5.8.1", "@waku/byte-utils": "*", "@waku/enr": "*", + "@waku/interfaces": "*", "@waku/libp2p-utils": "*", "chai": "^4.3.4", "cspell": "^6.17.0", @@ -31375,8 +31390,10 @@ "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", "@waku/byte-utils": "*", + "@waku/interfaces": "*", "chai": "^4.3.6", "cspell": "^6.17.0", + "debug": "^4.3.4", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", @@ -31430,6 +31447,7 @@ "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", "cspell": "^6.17.0", + "debug": "^4.3.4", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", @@ -31457,6 +31475,7 @@ "@waku/proto": "*", "chai": "^4.3.6", "cspell": "^6.17.0", + "debug": "^4.3.4", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", @@ -31490,6 +31509,8 @@ "@waku/core": "*", "@waku/enr": "*", "@waku/interfaces": "*", + "@waku/libp2p-utils": "*", + "@waku/proto": "*", "chai": "^4.3.6", "cspell": "^6.17.0", "debug": "^4.3.4", @@ -31546,15 +31567,22 @@ "@waku/enr": "*", "@waku/interfaces": "*", "@waku/message-encryption": "*", + "app-root-path": "^3.0.0", + "chai": "^4.3.6", "cspell": "^6.17.0", + "debug": "^4.3.4", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-functional": "^4.0.2", "eslint-plugin-import": "^2.25.3", "eslint-plugin-prettier": "^4.0.0", + "mocha": "^9.1.3", "npm-run-all": "^4.1.5", + "p-timeout": "^6.0.0", + "portfinder": "^1.0.28", "prettier": "^2.1.1", + "tail": "^2.2.0", "typescript": "^4.6.3" } }, diff --git a/packages/enr/package.json b/packages/enr/package.json index 9629746196..85b0d9e6fe 100644 --- a/packages/enr/package.json +++ b/packages/enr/package.json @@ -72,6 +72,7 @@ "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", "chai": "^4.3.6", + "debug": "^4.3.4", "cspell": "^6.17.0", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", diff --git a/packages/libp2p-utils/package.json b/packages/libp2p-utils/package.json index 466ce4c318..c8473b3880 100644 --- a/packages/libp2p-utils/package.json +++ b/packages/libp2p-utils/package.json @@ -65,6 +65,7 @@ "@typescript-eslint/parser": "^5.8.1", "cspell": "^6.17.0", "eslint": "^8.6.0", + "debug": "^4.3.4", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-functional": "^4.0.2", diff --git a/packages/message-encryption/package.json b/packages/message-encryption/package.json index 4f35eeb6a7..86310fc751 100644 --- a/packages/message-encryption/package.json +++ b/packages/message-encryption/package.json @@ -87,6 +87,7 @@ "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", "chai": "^4.3.6", + "debug": "^4.3.4", "cspell": "^6.17.0", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", diff --git a/packages/peer-exchange/package.json b/packages/peer-exchange/package.json index 70947f0bf0..82091bdc3f 100644 --- a/packages/peer-exchange/package.json +++ b/packages/peer-exchange/package.json @@ -59,6 +59,8 @@ "@waku/core": "*", "@waku/enr": "*", "@waku/interfaces": "*", + "@waku/proto": "*", + "@waku/libp2p-utils": "*", "debug": "^4.3.4", "it-all": "^1.0.6", "it-length-prefixed": "^8.0.2", diff --git a/packages/tests/package.json b/packages/tests/package.json index 5821372abf..1a1cbc5378 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -67,6 +67,13 @@ "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", "cspell": "^6.17.0", + "chai": "^4.3.6", + "debug": "^4.3.4", + "app-root-path": "^3.0.0", + "portfinder": "^1.0.28", + "mocha": "^9.1.3", + "p-timeout": "^6.0.0", + "tail": "^2.2.0", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", From fb9bb35042293f58a8015bba2ba3b31054633252 Mon Sep 17 00:00:00 2001 From: weboko Date: Fri, 23 Dec 2022 00:24:38 +0100 Subject: [PATCH 3/4] fix: move deps from dev deps --- packages/core/package.json | 4 ++-- packages/dns-discovery/package.json | 2 +- packages/enr/package.json | 4 ++-- packages/libp2p-utils/package.json | 4 ++-- packages/message-encryption/package.json | 8 ++++---- packages/tests/package.json | 14 +++++++------- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/core/package.json b/packages/core/package.json index 546aec6468..2cd18de16d 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -98,6 +98,8 @@ "it-length-prefixed": "^8.0.2", "it-pipe": "^2.0.4", "libp2p": "0.40.0", + "chai": "^4.3.4", + "fast-check": "^2.14.0", "p-event": "^5.0.1", "uint8arraylist": "^2.3.2", "uint8arrays": "^4.0.2", @@ -117,7 +119,6 @@ "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", "app-root-path": "^3.0.0", - "chai": "^4.3.4", "cspell": "^6.17.0", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", @@ -125,7 +126,6 @@ "eslint-plugin-functional": "^4.0.2", "eslint-plugin-import": "^2.25.3", "eslint-plugin-prettier": "^4.0.0", - "fast-check": "^2.14.0", "gh-pages": "^3.2.3", "ignore-loader": "^0.1.2", "isomorphic-fetch": "^3.0.0", diff --git a/packages/dns-discovery/package.json b/packages/dns-discovery/package.json index 6dcd444e31..8fdce32bb6 100644 --- a/packages/dns-discovery/package.json +++ b/packages/dns-discovery/package.json @@ -61,6 +61,7 @@ "@waku/byte-utils": "*", "@waku/libp2p-utils": "*", "hi-base32": "^0.5.1", + "chai": "^4.3.4", "debug": "^4.3.4", "dns-query": "^0.11.2", "uint8arrays": "^4.0.2", @@ -73,7 +74,6 @@ "@waku/interfaces": "*", "@multiformats/multiaddr": "^11.0.6", "@libp2p/peer-id-factory": "^1.0.15", - "chai": "^4.3.4", "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^13.3.0", diff --git a/packages/enr/package.json b/packages/enr/package.json index 85b0d9e6fe..65b031b820 100644 --- a/packages/enr/package.json +++ b/packages/enr/package.json @@ -60,6 +60,8 @@ "@multiformats/multiaddr": "^11.0.6", "@noble/secp256k1": "^1.3.4", "@waku/byte-utils": "*", + "chai": "^4.3.6", + "debug": "^4.3.4", "js-sha3": "^0.8.0" }, "devDependencies": { @@ -71,8 +73,6 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", - "chai": "^4.3.6", - "debug": "^4.3.4", "cspell": "^6.17.0", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", diff --git a/packages/libp2p-utils/package.json b/packages/libp2p-utils/package.json index c8473b3880..790d4621e3 100644 --- a/packages/libp2p-utils/package.json +++ b/packages/libp2p-utils/package.json @@ -55,7 +55,8 @@ "@libp2p/peer-id": "^1.1.10", "@libp2p/interface-connection": "^3.0.3", "@libp2p/interface-peer-id": "^1.0.6", - "@libp2p/interface-peer-store": "^1.2.3" + "@libp2p/interface-peer-store": "^1.2.3", + "debug": "^4.3.4" }, "devDependencies": { "@rollup/plugin-commonjs": "^22.0.0", @@ -65,7 +66,6 @@ "@typescript-eslint/parser": "^5.8.1", "cspell": "^6.17.0", "eslint": "^8.6.0", - "debug": "^4.3.4", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-functional": "^4.0.2", diff --git a/packages/message-encryption/package.json b/packages/message-encryption/package.json index 86310fc751..6f2066c5ac 100644 --- a/packages/message-encryption/package.json +++ b/packages/message-encryption/package.json @@ -78,7 +78,10 @@ "@waku/core": "*", "@waku/interfaces": "*", "@waku/proto": "*", - "js-sha3": "^0.8.0" + "js-sha3": "^0.8.0", + "chai": "^4.3.6", + "debug": "^4.3.4", + "fast-check": "^2.14.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^22.0.0", @@ -86,8 +89,6 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", - "chai": "^4.3.6", - "debug": "^4.3.4", "cspell": "^6.17.0", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", @@ -95,7 +96,6 @@ "eslint-plugin-functional": "^4.0.2", "eslint-plugin-import": "^2.25.3", "eslint-plugin-prettier": "^4.0.0", - "fast-check": "^2.14.0", "npm-run-all": "^4.1.5", "prettier": "^2.1.1", "rollup": "^2.75.0", diff --git a/packages/tests/package.json b/packages/tests/package.json index 1a1cbc5378..f0baa07c73 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -55,6 +55,13 @@ "node": ">=16" }, "dependencies": { + "chai": "^4.3.6", + "debug": "^4.3.4", + "app-root-path": "^3.0.0", + "portfinder": "^1.0.28", + "mocha": "^9.1.3", + "p-timeout": "^6.0.0", + "tail": "^2.2.0", "@waku/byte-utils": "*", "@waku/core": "*", "@waku/create": "*", @@ -67,13 +74,6 @@ "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", "cspell": "^6.17.0", - "chai": "^4.3.6", - "debug": "^4.3.4", - "app-root-path": "^3.0.0", - "portfinder": "^1.0.28", - "mocha": "^9.1.3", - "p-timeout": "^6.0.0", - "tail": "^2.2.0", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-eslint-comments": "^3.2.0", From 93b12e59c9de470f41ba9b0bd1178680e26e11be Mon Sep 17 00:00:00 2001 From: danisharora099 Date: Thu, 5 Jan 2023 12:54:29 +0530 Subject: [PATCH 4/4] fix: failing CI check add `@waku/peer-exchange` as a dependency to `tests` --- packages/tests/package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/tests/package.json b/packages/tests/package.json index f0baa07c73..d705346ac6 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -67,7 +67,8 @@ "@waku/create": "*", "@waku/enr": "*", "@waku/interfaces": "*", - "@waku/message-encryption": "*" + "@waku/message-encryption": "*", + "@waku/peer-exchange": "*" }, "devDependencies": { "@libp2p/bootstrap": "^5.0.0",