Skip to content

Commit

Permalink
chore: standardise dependencies
Browse files Browse the repository at this point in the history
- Use pnpm workspace dependency versions in packages (where possible without major modifications)
- Update some error message snapshots for workspace vitest version
- Add overrides for package dependencies that exist in the workspace (or are otherwise commonly used in packages)
  • Loading branch information
JamesLefrere committed Jan 19, 2025
1 parent 0327b3b commit 87ba900
Show file tree
Hide file tree
Showing 26 changed files with 1,127 additions and 1,886 deletions.
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,11 @@
"engines": {
"node": "18.x || 20.x",
"pnpm": "^9.6.0"
},
"pnpm": {
"overrides": {
"permissionless>viem": "*",
"vite-plugin-externalize-deps>vite": "^6.0.7"
}
}
}
10 changes: 5 additions & 5 deletions packages/abi-ts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@
"test:ci": "pnpm run test"
},
"dependencies": {
"chalk": "^5.3.0",
"chalk": "*",
"debug": "^4.3.4",
"execa": "^7.0.0",
"glob": "^10.4.2",
"execa": "*",
"glob": "*",
"yargs": "^17.7.1"
},
"devDependencies": {
"@types/debug": "^4.1.7",
"@types/yargs": "^17.0.10",
"tsup": "^6.7.0",
"vitest": "0.34.6"
"tsup": "*",
"vitest": "*"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 2 additions & 2 deletions packages/block-logs-stream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
},
"devDependencies": {
"@types/debug": "^4.1.7",
"viem": "2.21.19",
"vitest": "0.34.6"
"viem": "*",
"vitest": "*"
},
"peerDependencies": {
"viem": "2.x"
Expand Down
10 changes: 5 additions & 5 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,21 @@
"@latticexyz/world-module-metadata": "workspace:*",
"abitype": "1.0.6",
"asn1.js": "^5.4.1",
"chalk": "^5.0.1",
"chalk": "*",
"chokidar": "^3.5.3",
"debug": "^4.3.4",
"dotenv": "^16.0.3",
"execa": "^7.0.0",
"execa": "*",
"find-up": "^6.3.0",
"glob": "^10.4.2",
"glob": "*",
"openurl": "^1.1.1",
"p-queue": "^7.4.1",
"p-retry": "^5.1.2",
"path": "^0.12.7",
"rxjs": "7.5.5",
"throttle-debounce": "^5.0.0",
"toposort": "^2.0.2",
"viem": "2.21.19",
"viem": "*",
"yargs": "^17.7.1",
"zod": "3.23.8",
"zod-validation-error": "^1.3.0"
Expand All @@ -83,6 +83,6 @@
"@types/yargs": "^17.0.10",
"ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0",
"forge-std": "https://github.com/foundry-rs/forge-std.git#74cfb77e308dd188d2f58864aaf44963ae6b88b1",
"vitest": "0.34.6"
"vitest": "*"
}
}
10 changes: 5 additions & 5 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@
"execa": "^7.0.0",
"p-queue": "^7.4.1",
"p-retry": "^5.1.2",
"prettier": "3.2.5",
"prettier-plugin-solidity": "1.3.1"
"prettier": "*",
"prettier-plugin-solidity": "*"
},
"devDependencies": {
"@types/debug": "^4.1.7",
"@viem/anvil": "^0.0.7",
"viem": "2.21.19",
"vitest": "0.34.6"
"@viem/anvil": "*",
"viem": "*",
"vitest": "*"
},
"peerDependencies": {
"@aws-sdk/client-kms": "3.x",
Expand Down
6 changes: 3 additions & 3 deletions packages/common/src/codegen/render-solidity/common.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ describe("renderTableId", () => {
it("returns Solidity code to compute table ID", () => {
expect(renderTableId({ namespace: "somewhere", name: "Player", offchainOnly: false })).toMatchInlineSnapshot(`
"
// Hex below is the result of \`WorldResourceIdLib.encode({ namespace: \\"somewhere\\", name: \\"Player\\", typeId: RESOURCE_TABLE });\`
ResourceId constant _tableId = ResourceId.wrap(0x7462736f6d6577686572650000000000506c6179657200000000000000000000);
// Hex below is the result of \`WorldResourceIdLib.encode({ namespace: "somewhere", name: "Player", typeId: RESOURCE_TABLE });\`
ResourceId constant _tableId = ResourceId.wrap(0x7462736f6d6577686572650000000000506c6179657200000000000000000000);
"
`);
});

it("returns Solidity code to compute offchain table ID", () => {
expect(renderTableId({ namespace: "somewhere", name: "Player", offchainOnly: true })).toMatchInlineSnapshot(`
"
// Hex below is the result of \`WorldResourceIdLib.encode({ namespace: \\"somewhere\\", name: \\"Player\\", typeId: RESOURCE_OFFCHAIN_TABLE });\`
// Hex below is the result of \`WorldResourceIdLib.encode({ namespace: "somewhere", name: "Player", typeId: RESOURCE_OFFCHAIN_TABLE });\`
ResourceId constant _tableId = ResourceId.wrap(0x6f74736f6d6577686572650000000000506c6179657200000000000000000000);
"
`);
Expand Down
2 changes: 1 addition & 1 deletion packages/common/src/resourceToHex.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe("resourceToHex", () => {
name: "name",
}),
).toThrowErrorMatchingInlineSnapshot(
'"Namespaces must fit into `bytes14`, but \\"AVeryLongNamespace\\" is too long."',
'[Error: Namespaces must fit into `bytes14`, but "AVeryLongNamespace" is too long.]',
);
});

Expand Down
4 changes: 2 additions & 2 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
"@latticexyz/common": "workspace:*",
"@latticexyz/schema-type": "workspace:*",
"find-up": "^6.3.0",
"tsx": "^4.19.1"
"tsx": "*"
},
"devDependencies": {
"viem": "2.21.19"
"viem": "*"
},
"peerDependencies": {
"viem": "2.x"
Expand Down
12 changes: 6 additions & 6 deletions packages/dev-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,17 @@
"rxjs": "7.5.5",
"tailwind-merge": "^1.12.0",
"use-local-storage-state": "^18.3.2",
"zustand": "^4.3.7"
"zustand": "^4.5.2"
},
"devDependencies": {
"@types/react": "18.2.22",
"@types/react-dom": "18.2.7",
"@types/ws": "^8.5.4",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.23",
"tailwindcss": "^3.3.2",
"viem": "2.21.19",
"vitest": "0.34.6"
"autoprefixer": "^10.4.20",
"postcss": "^8.4.47",
"tailwindcss": "^3.4.13",
"viem": "*",
"vitest": "*"
},
"peerDependencies": {
"@latticexyz/common": "2.x",
Expand Down
10 changes: 5 additions & 5 deletions packages/entrykit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@latticexyz/store": "workspace:*",
"@latticexyz/world": "workspace:*",
"@latticexyz/world-modules": "workspace:*",
"@radix-ui/react-dialog": "^1.0.5",
"@radix-ui/react-dialog": "^1.1.1",
"@rainbow-me/rainbowkit": "2.1.7",
"debug": "^4.3.4",
"dotenv": "^16.0.3",
Expand All @@ -68,7 +68,7 @@
"@types/react": "18.2.22",
"@types/react-dom": "18.2.7",
"@types/ws": "^8.5.4",
"@vitejs/plugin-react": "^4.3.1",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "4.6.0",
Expand All @@ -77,11 +77,11 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "^3.4.13",
"viem": "2.21.19",
"vite": "^5.4.1",
"viem": "*",
"vite": "^6.0.7",
"vite-plugin-dts": "^4.2.4",
"vite-plugin-externalize-deps": "^0.8.0",
"vitest": "0.34.6",
"vitest": "*",
"wagmi": "2.12.11"
},
"peerDependencies": {
Expand Down
14 changes: 7 additions & 7 deletions packages/explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
"@radix-ui/react-slot": "^1.1.0",
"@radix-ui/react-tooltip": "^1.1.6",
"@radix-ui/themes": "^3.0.5",
"@rainbow-me/rainbowkit": "^2.1.5",
"@tanstack/react-query": "^5.51.3",
"@rainbow-me/rainbowkit": "^2.1.7",
"@tanstack/react-query": "^5.56.2",
"@tanstack/react-table": "^8.19.3",
"better-sqlite3": "^8.6.0",
"class-variance-authority": "^0.7.0",
Expand All @@ -79,7 +79,7 @@
"wagmi": "2.12.11",
"yargs": "^17.7.1",
"zod": "3.23.8",
"zustand": "^4.3.7"
"zustand": "^4.5.2"
},
"devDependencies": {
"@trivago/prettier-plugin-sort-imports": "^4.3.0",
Expand All @@ -90,12 +90,12 @@
"@types/yargs": "^17.0.10",
"eslint-config-next": "14.2.3",
"knip": "^5.30.2",
"postcss": "^8",
"prettier": "3.2.5",
"postcss": "^8.4.47",
"prettier": "*",
"prettier-plugin-tailwindcss": "^0.6.5",
"tailwindcss": "^3.4.1",
"tailwindcss": "^3.4.13",
"tailwindcss-animate": "^1.0.7",
"viem": "2.21.19"
"viem": "*"
},
"peerDependencies": {
"viem": "2.x"
Expand Down
4 changes: 2 additions & 2 deletions packages/faucet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
},
"devDependencies": {
"@types/debug": "^4.1.7",
"viem": "2.21.19",
"vitest": "0.34.6"
"viem": "*",
"vitest": "*"
},
"peerDependencies": {
"viem": "2.x"
Expand Down
6 changes: 3 additions & 3 deletions packages/gas-report/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
"test:ci": "pnpm run test"
},
"dependencies": {
"chalk": "^5.3.0",
"chalk": "*",
"dotenv": "^16.0.3",
"execa": "^7.0.0",
"execa": "*",
"stream-to-array": "^2.3.0",
"strip-ansi": "^7.1.0",
"table": "^6.8.1",
Expand All @@ -49,6 +49,6 @@
"@types/yargs": "^17.0.10",
"ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0",
"forge-std": "https://github.com/foundry-rs/forge-std.git#74cfb77e308dd188d2f58864aaf44963ae6b88b1",
"vitest": "0.34.6"
"vitest": "*"
}
}
4 changes: 2 additions & 2 deletions packages/protocol-parser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"abitype": "1.0.6"
},
"devDependencies": {
"viem": "2.21.19",
"vitest": "0.34.6"
"viem": "*",
"vitest": "*"
},
"peerDependencies": {
"viem": "2.x"
Expand Down
4 changes: 2 additions & 2 deletions packages/protocol-parser/src/hexToEncodedLengths.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ describe("hexToEncodedLengths", () => {

it("throws if schema hex data is not bytes32", () => {
expect(() => hexToEncodedLengths("0x01234")).toThrowErrorMatchingInlineSnapshot(
'"Hex value \\"0x01234\\" has length of 5, but expected length of 64 for encoded lengths."',
'[InvalidHexLengthForEncodedLengthsError: Hex value "0x01234" has length of 5, but expected length of 64 for encoded lengths.]',
);
});

Expand All @@ -29,7 +29,7 @@ describe("hexToEncodedLengths", () => {
hexToEncodedLengths("0x0000000000000000000000000000400000000020000000002000000000000040"),
).toThrowErrorMatchingInlineSnapshot(
// eslint-disable-next-line max-len
'"EncodedLengths \\"0x0000000000000000000000000000400000000020000000002000000000000040\\" total bytes length (64) did not match the summed length of all field byte lengths (128)."',
'[EncodedLengthsLengthMismatchError: EncodedLengths "0x0000000000000000000000000000400000000020000000002000000000000040" total bytes length (64) did not match the summed length of all field byte lengths (128).]',
);
});
});
6 changes: 3 additions & 3 deletions packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@
"devDependencies": {
"@testing-library/react-hooks": "^8.0.1",
"@types/react": "18.2.22",
"@vitejs/plugin-react": "^4.0.0",
"@vitejs/plugin-react": "^4.3.4",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "4.6.0",
"jsdom": "^22.1.0",
"react-test-renderer": "^18.2.0",
"vite": "^4.3.6",
"vitest": "0.34.6"
"vite": "^6.0.7",
"vitest": "*"
}
}
4 changes: 2 additions & 2 deletions packages/schema-type/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@
"@latticexyz/gas-report": "workspace:*",
"ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0",
"forge-std": "https://github.com/foundry-rs/forge-std.git#74cfb77e308dd188d2f58864aaf44963ae6b88b1",
"viem": "2.21.19",
"vitest": "0.34.6"
"viem": "*",
"vitest": "*"
},
"peerDependencies": {
"viem": "2.x"
Expand Down
2 changes: 1 addition & 1 deletion packages/stash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"fast-deep-equal": "^3.1.3",
"react": "18.2.0",
"react-dom": "18.2.0",
"viem": "2.21.19"
"viem": "*"
},
"peerDependencies": {
"react": "18.x",
Expand Down
4 changes: 2 additions & 2 deletions packages/store-indexer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@
"@types/koa__cors": "^4.0.3",
"@types/koa__router": "^12.0.4",
"concurrently": "^8.2.2",
"viem": "2.21.19",
"vitest": "0.34.6"
"viem": "*",
"vitest": "*"
},
"peerDependencies": {
"viem": "2.x"
Expand Down
11 changes: 5 additions & 6 deletions packages/store-sync/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,22 +96,21 @@
"sql.js": "^1.8.0",
"superjson": "^1.12.4",
"zod": "3.23.8",
"zustand": "^4.3.7"
"zustand": "^4.5.2"
},
"devDependencies": {
"@tanstack/react-query": "^5.56.2",
"@testing-library/react": "^16.0.0",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/react": "^16.2.0",
"@types/debug": "^4.1.7",
"@types/react": "18.2.22",
"@types/sql.js": "^1.4.4",
"@viem/anvil": "^0.0.7",
"@viem/anvil": "*",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "4.6.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"viem": "2.21.19",
"vitest": "0.34.6",
"viem": "*",
"vitest": "*",
"wagmi": "2.12.11"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/store/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0",
"forge-std": "https://github.com/foundry-rs/forge-std.git#74cfb77e308dd188d2f58864aaf44963ae6b88b1",
"solhint": "^3.3.7",
"viem": "2.21.19"
"viem": "*"
},
"peerDependencies": {
"viem": "2.x"
Expand Down
2 changes: 1 addition & 1 deletion packages/world-module-erc20/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0",
"forge-std": "https://github.com/foundry-rs/forge-std.git#74cfb77e308dd188d2f58864aaf44963ae6b88b1",
"solhint": "^3.3.7",
"vitest": "0.34.6"
"vitest": "*"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/world-module-metadata/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"ds-test": "https://github.com/dapphub/ds-test.git#e282159d5170298eb2455a6c05280ab5a73a4ef0",
"forge-std": "https://github.com/foundry-rs/forge-std.git#74cfb77e308dd188d2f58864aaf44963ae6b88b1",
"solhint": "^3.3.7",
"vitest": "0.34.6"
"vitest": "*"
},
"publishConfig": {
"access": "public"
Expand Down
Loading

0 comments on commit 87ba900

Please sign in to comment.