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

Update peer dependency semvers to allow Electron 28 prereleases #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MichaelJCole
Copy link

@MichaelJCole MichaelJCole commented Nov 17, 2023

Description

Hi, my project needs an ESM only module, and luckily the first Electron 28 beta dropped today on NPM.

This PR resolves peer dependency issues allowing for Electron 28's pre-release version to be valid peers.

Additional context

For these packages in package.json:

"electron": "^28.0.0-beta.6",
"@electron-toolkit/utils": "^2.0.1",

This PR should fix this problem in NPM:

> $ npm install  
npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR! 
npm ERR! While resolving: @electron-toolkit/utils@2.0.1
npm ERR! Found: electron@28.0.0-beta.6
npm ERR! node_modules/electron
npm ERR!   dev electron@"^28.0.0-beta.6" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer electron@">=13.0.0" from @electron-toolkit/utils@2.0.1
npm ERR! node_modules/@electron-toolkit/utils
npm ERR!   @electron-toolkit/utils@"^2.0.1" from the root project
npm ERR! 
npm ERR! Conflicting peer dependency: electron@27.1.0
npm ERR! node_modules/electron
npm ERR!   peer electron@">=13.0.0" from @electron-toolkit/utils@2.0.1
npm ERR!   node_modules/@electron-toolkit/utils
npm ERR!     @electron-toolkit/utils@"^2.0.1" from the root project

This update changes the peer dependency semvers to

  "peerDependencies": {
    "electron": ">=13.0.0 || >=28.0.0-0"
  }

It could be simplified to ">=13.0.0-0" to include any prerelease version, or however you like.

The semver calculator will show which packages are included/excluded in the expression.

Note that the calculator's database is at least 10 hours behind, so I used this expression as a test: >=13.0.0 || >= 27.0.0-0


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

Sorry I missed the commit convention naming. Feel free to rename the commits.

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

Successfully merging this pull request may close these issues.

1 participant