Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(library-legacy/deps): rpc-websockets@^7.11.0->^7.11.1 #2758

Merged
merged 5 commits into from
Jun 3, 2024

Conversation

legobeat
Copy link
Contributor

@legobeat legobeat commented Jun 2, 2024

rpc-websockets@7.11.0 is broken and deprecated. This upgrades to fixed 7.11.1.

Copy link

changeset-bot bot commented Jun 2, 2024

⚠️ No Changeset found

Latest commit: c8474bc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@mergify mergify bot added the community label Jun 2, 2024
@mergify mergify bot requested a review from a team June 2, 2024 22:55
Copy link

socket-security bot commented Jun 2, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@changesets/cli@2.27.5 environment, filesystem, shell Transitive: eval, unsafe +41 13.3 MB changesets-release-bot
npm/@types/node@18.19.33 None 0 1.97 MB types
npm/agadoo@3.0.0 None +2 548 kB rich_harris
npm/chalk@2.4.2 environment +4 79.2 kB sindresorhus
npm/dataloader@1.4.0 None 0 46.7 kB leebyron
npm/eslint-config-turbo@1.13.3 None 0 18.1 kB turbobot
npm/eslint-plugin-jest@27.9.0 filesystem Transitive: environment +10 1.81 MB simenb
npm/eslint-plugin-react-hooks@4.6.2 environment 0 118 kB react-bot
npm/eslint-plugin-simple-import-sort@10.0.0 None 0 37.3 kB lydell
npm/eslint-plugin-sort-keys-fix@1.1.2 None +5 780 kB leo-buneev
npm/eslint-plugin-typescript-sort-keys@3.2.0 None 0 43.3 kB infctr
npm/eslint@8.57.0 environment, filesystem Transitive: eval, shell +34 8.29 MB eslintbot
npm/jest-environment-jsdom@30.0.0-alpha.5 None 0 0 B
npm/jest-runner-eslint@2.2.0 None 0 25.3 kB simenb
npm/jest-runner-prettier@1.0.0 None +1 54.1 kB keplersj
npm/jest-watch-master@1.0.0 None 0 126 kB rickhanlonii
npm/jest-watch-select-projects@2.0.0 None 0 8.5 kB simenb
npm/jest-watch-typeahead@2.2.2 None 0 19.1 kB simenb
npm/jest@30.0.0-alpha.5 None 0 0 B
npm/node-fetch@2.7.0 network 0 162 kB node-fetch-bot
npm/prettier@3.3.0 environment, filesystem, unsafe 0 8.25 MB prettier-bot
npm/rollup@3.29.4 environment, filesystem 0 2.52 MB lukastaegert
npm/ts-node@10.9.2 environment, filesystem, unsafe Transitive: shell +13 432 MB blakeembrey
npm/tsup@8.0.2 environment, eval, filesystem Transitive: shell, unsafe +16 432 MB egoist
npm/turbo@1.13.3 None 0 30.6 kB turbobot
npm/typescript@5.4.5 None 0 32.4 MB typescript-bot

🚮 Removed packages: npm/commander@4.1.1, npm/tslib@2.6.2

View full report↗︎

@uafrontender
Copy link

@legobeat please check this issue #2762

In elpheria/rpc-websockets#161 they renamed files and now imports in solana-web3 package work incorrect. We should or update imports or set fixed version of "rpc-websockets": "7.11.0"

@legobeat
Copy link
Contributor Author

legobeat commented Jun 3, 2024

@uafrontender Indeed. That's what this PR fixes.

@uafrontender
Copy link

uafrontender commented Jun 3, 2024

@uafrontender Indeed. That's what this PR fixes.

Can you explain how does it fix? The problem arose because solana-web3 does not use a strict version of rpc-websockets, like 7.11.0. Instead, it uses ^7.11.0, which allows npm to install last compatible version, including 7.11.1. The 7.11.1 version of rpc-websockets was updated yesterday and is not compatible with the current code of solana-web3.

@legobeat actually your PR changes nothing because now after I run npm install @solana/web3.js its dependencies already include rpc-websockets: "^7.11.1"

@legobeat
Copy link
Contributor Author

legobeat commented Jun 3, 2024

@uafrontender Indeed. That's what this PR fixes.

Can you explain how does it fix? The problem arose because solana-web3 does not use a strict version of rpc-websockets, like 7.11.0. Instead, it uses ^7.11.0, which allows npm to install last compatible version, including 7.11.1. The 7.11.1 version of rpc-websockets was updated yesterday and is not compatible with the current code of solana-web3.

Sorry for the dismissiveness 🤦

Pushed again with the actual fix.

actually your PR changes nothing because now after I run npm install @solana/web3.jsits dependencies already includerpc-websockets: "^7.11.1"`

Actually, actually not (look at the lockfile) ;). From a perspective of user of the package; it depends which of the two you end up with. But that's kind of besides the main point of making sure the actual issue fixed, which you rightly addressed!

@uafrontender
Copy link

Pushed again with the actual fix.

Thanks!

Copy link
Collaborator

@steveluscher steveluscher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching this problem that I caused, then fixed, then caused again, then you fixed.

image

@softwarecurator
Copy link

pls fix

@steveluscher steveluscher merged commit 5527b0e into solana-labs:master Jun 3, 2024
6 checks passed
Copy link
Contributor

github-actions bot commented Jun 3, 2024

🎉 This PR is included in version 1.91.9 🎉

The release is available on:

Your semantic-release bot 📦🚀

@plustokens
Copy link

Please consider using a fixed version from rpc-websockets to prevent any upcoming breaking changes again.
Use rpc-websockets version "7.11.1" instead "^7.11.1"

Can we have the workaround in description?

  • Fix rpc-websockets version to avoid using the latest one retrieved by solana web3js:
npm install rpc-websockets@7.11.0

@nvm-delete
Copy link

@steveluscher This issue still persists in my Nextjs Pages router project, what should I do?

@steveluscher
Copy link
Collaborator

Do you have a repro you can send me?

@legobeat
Copy link
Contributor Author

legobeat commented Jun 8, 2024

Upstream later deprecated 7.11.1 as well due to another issue... The fix involved advertising the package ESM only in 8.0.1: https://github.com/elpheria/rpc-websockets/commits/c4cb8372b37402e04e95008a6bcd808e7ccaef2a/

@steveluscher
Copy link
Collaborator

Ironically, it’s not actually ESM only in 8.0.1 either. See my comment here, and this follow up.

Copy link
Contributor

Because there has been no activity on this PR for 14 days since it was merged, it has been automatically locked. Please open a new issue if it requires a follow up.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants