superfluid-finance / protocol-monorepo

Superfluid Protocol Monorepo: the specification, implementations, peripherals and development kits.
https://www.superfluid.finance
Other
875 stars 239 forks source link

Update dependencies #2011

Closed hellwolf closed 3 months ago

hellwolf commented 3 months ago

Dependencies left not updated to new major versions

◉ @nomicfoundation/hardhat-chai-matchers 1.0.6 → 2.0.7 - https://github.com/nomicfoundation/hardhat ◉ eslint 8.57.0 → 9.9.1 - https://github.com/eslint/eslint ◉ web3 ^1.10.4 → 4.12.1 - https://github.com/ChainSafe/web3.js ◉ @openzeppelin/contracts 4.9.6 → 5.0.2 - https://github.com/OpenZeppelin/openzeppelin-contracts ◉ ethers ^5.7.2 → 6.13.2 - https://github.com/ethers-io/ethers.js ◉ auto-bind 4.0.0 → 5.0.1 - https://github.com/sindresorhus/auto-bind ◉ node-fetch 2.7.0 → 3.3.2 - https://github.com/node-fetch/node-fetch ◉ graphql-request ^6.1.0 → 7.1.0 - https://github.com/jasonkuhrt/graphql-request ◉ @reduxjs/toolkit ^1.9.7 → 2.2.7 - https://github.com/reduxjs/redux-toolkit ◉ react-redux ^8.1.3 → 9.1.2 - https://github.com/reduxjs/react-redux

github-actions[bot] commented 3 months ago

Changelog Reminder

Reminder to update the CHANGELOG.md for any of the modified packages in this PR.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.36%. Comparing base (3d5df70) to head (ff9ed76). Report is 1 commits behind head on dev.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #2011 +/- ## ========================================== - Coverage 88.45% 88.36% -0.09% ========================================== Files 111 111 Lines 6971 6999 +28 Branches 933 962 +29 ========================================== + Hits 6166 6185 +19 - Misses 803 812 +9 Partials 2 2 ``` | [Flag](https://app.codecov.io/gh/superfluid-finance/protocol-monorepo/pull/2011/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=superfluid-finance) | Coverage Δ | | |---|---|---| | [ethereum-contracts](https://app.codecov.io/gh/superfluid-finance/protocol-monorepo/pull/2011/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=superfluid-finance) | `94.51% <ø> (ø)` | | | [sdk-core](https://app.codecov.io/gh/superfluid-finance/protocol-monorepo/pull/2011/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=superfluid-finance) | `88.36% <ø> (-0.09%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=superfluid-finance#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

d10r commented 3 months ago

getting this when committing in ethereum-contracts:

husky - DEPRECATED

Please remove the following two lines from .husky/pre-commit:

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

They WILL FAIL in v10.0.0
d10r commented 3 months ago

new behaviour:

Versions
= Pin stack-trace to the same version, since newer version starts to use ES module 
     1 ✓ already valid
= Default Version Group ========================================================
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/ethereum-contracts/package.json > devDependencies [LocalPackageMismatch]
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/js-sdk/package.json > dependencies [LocalPackageMismatch]
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/sdk-core/package.json > dependencies [LocalPackageMismatch]
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/subgraph/package.json > devDependencies [LocalPackageMismatch]
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/automation-contracts/scheduler/package.json > devDependencies [LocalPackageMismatch]
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/automation-contracts/autowrap/package.json > devDependencies [LocalPackageMismatch]
   117 ✓ already valid
     6 ✓ can be auto-fixed
Semver Ranges
= the version property of package.json files must always be exact ==============
✓ 11 valid
= Use looser ranges for metadata and ethereum-contracts local packages =========
✓ 11 valid
= Use exact version for prod dependencies ======================================
✓ 23 valid
= Use looser range by default ==================================================
✓ 79 valid
husky - pre-commit script failed (code 1)

I used yarn manage-versions to fix, which had this side effect:

+++ b/packages/subgraph/package.json
@@ -5,11 +5,11 @@
     "dependencies": {
         "@graphprotocol/graph-cli": "0.80.1",
         "@graphprotocol/graph-ts": "0.35.1",
-        "@superfluid-finance/sdk-core": "0.8.0",
+        "@superfluid-finance/sdk-core": "^0.8.0",

probably not intended (?)

hellwolf commented 3 months ago

getting this when committing in ethereum-contracts:

husky - DEPRECATED

Please remove the following two lines from .husky/pre-commit:

#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

They WILL FAIL in v10.0.0

fixed

hellwolf commented 3 months ago

new behaviour:

Versions
= Pin stack-trace to the same version, since newer version starts to use ES module 
     1 ✓ already valid
= Default Version Group ========================================================
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/ethereum-contracts/package.json > devDependencies [LocalPackageMismatch]
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/js-sdk/package.json > dependencies [LocalPackageMismatch]
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/sdk-core/package.json > dependencies [LocalPackageMismatch]
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/subgraph/package.json > devDependencies [LocalPackageMismatch]
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/automation-contracts/scheduler/package.json > devDependencies [LocalPackageMismatch]
✘ @superfluid-finance/metadata ^1.4.1 → ^1.5.0 packages/automation-contracts/autowrap/package.json > devDependencies [LocalPackageMismatch]
   117 ✓ already valid
     6 ✓ can be auto-fixed
Semver Ranges
= the version property of package.json files must always be exact ==============
✓ 11 valid
= Use looser ranges for metadata and ethereum-contracts local packages =========
✓ 11 valid
= Use exact version for prod dependencies ======================================
✓ 23 valid
= Use looser range by default ==================================================
✓ 79 valid
husky - pre-commit script failed (code 1)

I used yarn manage-versions to fix, which had this side effect:

+++ b/packages/subgraph/package.json
@@ -5,11 +5,11 @@
     "dependencies": {
         "@graphprotocol/graph-cli": "0.80.1",
         "@graphprotocol/graph-ts": "0.35.1",
-        "@superfluid-finance/sdk-core": "0.8.0",
+        "@superfluid-finance/sdk-core": "^0.8.0",

probably not intended (?)

Our rules for semvers of packages is coded in .syncpackrc.yml, this currently requires 'exact' version for prod packages except metadata and ethereum-contracts:

semverGroups:
  # Note: rule priority is top (high) to bottom (low)
  - label: Use looser ranges for metadata and ethereum-contracts local packages
    dependencies:
      - "@superfluid-finance/metadata"
      - "@superfluid-finance/ethereum-contracts"
    range: "^"
  - label: Use exact version for prod dependencies
    dependencyTypes: ["prod"]
    range: ""
  - label: Use looser range by default
    range: "^"

Lerna has a option --exact when managing versions.

But I'd like to review the semverGroups rule before closing the PR, since I find the exceptions "fishy".

github-actions[bot] commented 3 months ago

XKCD Comic Relif

Link: https://xkcd.com/2011 https://xkcd.com/2011