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: define range of near-api-js versions as peerDependency instead of an exact one #1272

Merged
merged 5 commits into from
Jan 7, 2025

Conversation

denbite
Copy link
Contributor

@denbite denbite commented Dec 30, 2024

This PR addresses the problem that occurs when installing dependencies over npm, particularly in the case of using another version of near-api-js, which npm believes isn't compatible according to a version specified in peerDependencies

Example

{
  "name": "guest-book",
  "version": "1.0.0",
  "private": true,
  "engines": {
    "node": ">=18"
  },
  "dependencies": {
    "@near-wallet-selector/bitte-wallet": "^8.9.15",
    "@near-wallet-selector/core": "^8.9.15",
    "@near-wallet-selector/here-wallet": "^8.9.15",
    "@near-wallet-selector/meteor-wallet": "^8.9.15",
    "@near-wallet-selector/mintbase-wallet": "^8.9.15",
    "@near-wallet-selector/modal-ui": "^8.9.15",
    "@near-wallet-selector/my-near-wallet": "^8.9.15",
    "near-api-js": "^5.0.1",
    "next": "14.2.5",
    "react": "^18",
    "react-dom": "^18"
  }
}

The package above is going to fail while installing dependencies with the following error
image

Additional Info

The problem doesn't seem to occur while using yarn, or pnpm, at least the error message doesn't appear.
npm version is 10.8.2

gagdiez
gagdiez previously approved these changes Jan 6, 2025
@gtsonevv
Copy link
Collaborator

gtsonevv commented Jan 7, 2025

Hey @denbite, create the PR against the dev branch, please.

@gagdiez gagdiez changed the base branch from main to dev January 7, 2025 09:11
@gagdiez gagdiez dismissed their stale review January 7, 2025 09:11

The base branch was changed.

@gagdiez
Copy link

gagdiez commented Jan 7, 2025

@gtsonevv I changed the target branch

@denbite denbite merged commit 93ae2de into dev Jan 7, 2025
12 checks passed
@denbite denbite deleted the update_peer_dependencies branch January 7, 2025 14:47
@denbite
Copy link
Contributor Author

denbite commented Jan 7, 2025

@gtsonevv I merged this into dev branch, but releases seem to happen only from main branch
do you have an ETA for when it's going to be released?

@trechriron
Copy link
Collaborator

trechriron commented Jan 17, 2025

I will make a release tomorrow.

Actually, these will be tested next week. We will release after a test of the dev branch (next week).

Copy link
Collaborator

@trechriron trechriron left a comment

Choose a reason for hiding this comment

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

LGTM

@gtsonevv
Copy link
Collaborator

Hey, we need to review 1 more PR and then we can make a release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: NEW❗
Development

Successfully merging this pull request may close these issues.

5 participants