Skip to content

Commit

Permalink
[MONOREPO] package updates (#1176)
Browse files Browse the repository at this point in the history
* package updates

* package updates for packages
* subgraph client file fixed (from @kasparkallas)

Co-Authored-By: Kaspar Kallas <kaspar@superfluid.finance>

* updated sdk-redux package

* package updates

- update `eslint`
- remove `chai` and `@types/chai` as these conflict with `hardhat-chai-matchers` types

* De-duplicate dependencies in yarn.lock

Co-authored-by: Kaspar Kallas <kaspar@superfluid.finance>
  • Loading branch information
0xdavinchee and kasparkallas authored Nov 21, 2022
1 parent a55fca9 commit 05f4cba
Show file tree
Hide file tree
Showing 6 changed files with 1,560 additions and 2,567 deletions.
55 changes: 26 additions & 29 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,46 +27,43 @@
"shell:full": "nix develop .#full"
},
"devDependencies": {
"@nomicfoundation/hardhat-chai-matchers": "^1.0.3",
"@nomiclabs/hardhat-ethers": "^2.0.6",
"@nomicfoundation/hardhat-chai-matchers": "^1.0.4",
"@nomiclabs/hardhat-ethers": "^2.2.1",
"@nomiclabs/hardhat-web3": "^2.0.0",
"@openzeppelin/test-helpers": "^0.5.15",
"@truffle/hdwallet-provider": "^2.0.14",
"@typechain/ethers-v5": "^10.1.0",
"@typechain/hardhat": "^6.1.2",
"@types/chai": "^4.3.3",
"@types/lodash": "^4.14.184",
"@types/mocha": "^9.1.1 ",
"@types/node": "^18.0.1",
"@typescript-eslint/eslint-plugin": "^5.30.4",
"@typescript-eslint/parser": "^5.30.4",
"chai": "^4.3.6",
"chai-ethers": "^0.0.1",
"@openzeppelin/test-helpers": "^0.5.16",
"@truffle/hdwallet-provider": "^2.1.1",
"@typechain/ethers-v5": "^10.1.1",
"@typechain/hardhat": "^6.1.4",
"@types/lodash": "^4.14.189",
"@types/mocha": "^10.0.0",
"@types/node": "^18.11.9",
"@typescript-eslint/eslint-plugin": "^5.43.0",
"@typescript-eslint/parser": "^5.43.0",
"cloc": "^2.10.0",
"copyfiles": "^2.4.1",
"dotenv": "^16.0.2",
"eslint": "^8.23.0",
"dotenv": "^16.0.3",
"eslint": "^8.28.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.2.1",
"ethers": "^5.7.0",
"hardhat": "^2.11.0",
"husky": "^8.0.1",
"lerna": "^5.4.3",
"node-jq": "^2.3.3",
"nodemon": "^2.0.19",
"ethers": "^5.7.2",
"hardhat": "^2.12.2",
"husky": "^8.0.2",
"lerna": "^6.0.3",
"node-jq": "^2.3.4",
"nodemon": "^2.0.20",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"prettier": "^2.7.1",
"prettier-eslint": "^15.0.1",
"syncpack": "^8.2.4",
"truffle": "^5.5.28",
"ts-node": "^10.8.2",
"typechain": "^8.1.0",
"typedoc": "^0.23.15",
"typescript": "^4.7.4",
"web3": "^1.7.5"
"syncpack": "^8.3.9",
"truffle": "^5.6.6",
"ts-node": "^10.9.1",
"typechain": "^8.1.1",
"typedoc": "^0.23.21",
"typescript": "^4.9.3",
"web3": "^1.8.1"
},
"workspaces": {
"packages": [
Expand Down
8 changes: 4 additions & 4 deletions packages/ethereum-contracts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
},
"dependencies": {
"@decentral.ee/web3-helpers": "0.5.3",
"@openzeppelin/contracts": "4.7.3",
"@openzeppelin/contracts": "4.8.0",
"@superfluid-finance/js-sdk": "0.6.3",
"@truffle/contract": "4.5.23",
"ethereumjs-tx": "2.1.2",
Expand All @@ -85,9 +85,9 @@
"mochawesome": "^7.1.3",
"readline": "1.3.0",
"solhint": "3.3.7",
"solidity-coverage": "0.8.0",
"solidity-docgen": "^0.6.0-beta.25",
"solidity-coverage": "0.8.2",
"solidity-docgen": "^0.6.0-beta.30",
"truffle-flattener": "^1.6.0",
"truffle-plugin-verify": "0.5.31"
"truffle-plugin-verify": "0.6.0"
}
}
14 changes: 7 additions & 7 deletions packages/sdk-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@
"tsify": "^5.0.4"
},
"devDependencies": {
"@graphql-codegen/cli": "^2.12.0",
"@graphql-codegen/cli": "^2.13.12",
"@graphql-codegen/introspection": "^2.2.1",
"@graphql-codegen/near-operation-file-preset": "^2.4.1",
"@graphql-codegen/typed-document-node": "^2.3.3",
"@graphql-codegen/typescript": "^2.7.3",
"@graphql-codegen/typescript-operations": "^2.5.3",
"@graphql-codegen/near-operation-file-preset": "^2.4.4",
"@graphql-codegen/typed-document-node": "^2.3.7",
"@graphql-codegen/typescript": "^2.8.2",
"@graphql-codegen/typescript-operations": "^2.5.7",
"@graphql-typed-document-node/core": "^3.1.1",
"ajv": "^8.11.0",
"ajv": "^8.11.2",
"get-graphql-schema": "^2.1.2",
"mocha": "^10.0.0"
"mocha": "^10.1.0"
},
"peerDependencies": {
"ethers": "^5.6.9",
Expand Down
8 changes: 4 additions & 4 deletions packages/sdk-core/src/subgraph/SubgraphClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,21 @@ export declare type BatchRequestDocument<V = Variables> = {
export class SubgraphClient {
constructor(readonly subgraphUrl: string) {}

async request<T = unknown, V = Variables>(
async request<T = unknown, V extends Variables = Variables>(
document: RequestDocument | TypedDocumentNode<T, V>,
variables?: V
): Promise<T> {
return await request<T, V>(
this.subgraphUrl,
document,
cleanVariables(variables)
variables ? cleanVariables<V>(variables) : undefined
);
}
}

// Inspired by: https://stackoverflow.com/a/38340730
// Remove properties with null, undefined, empty string values.
function cleanVariables<V = Variables>(variables: V): V {
function cleanVariables<V extends Variables = Variables>(variables: V): V {
return Object.fromEntries(
Object.entries(variables)
.filter(
Expand All @@ -40,7 +40,7 @@ function cleanVariables<V = Variables>(variables: V): V {
.map(([key, value]) => [
key,
value === Object(value) && !Array.isArray(value)
? cleanVariables(value)
? cleanVariables(value as Variables)
: value,
])
) as V;
Expand Down
4 changes: 2 additions & 2 deletions packages/sdk-redux/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"node": ">=12"
},
"dependencies": {
"graphql-request": "^4.3.0",
"graphql-request": "^5.0.0",
"lodash": "^4.17.21",
"promise-retry": "^2.0.1"
},
Expand All @@ -48,7 +48,7 @@
"@types/react-dom": "^18",
"react": "^18",
"react-dom": "^18",
"react-redux": "^8.0.2"
"react-redux": "^8.0.5"
},
"peerDependencies": {
"@reduxjs/toolkit": "^1.7.0 || ^1.8.0 || ^1.9.0",
Expand Down
Loading

0 comments on commit 05f4cba

Please sign in to comment.