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

Extend monaco-editor peerDependency range to include current monaco-editor@next #450

Closed
thom4parisot opened this issue Feb 3, 2023 · 1 comment

Comments

@thom4parisot
Copy link

thom4parisot commented Feb 3, 2023

Is your feature request related to a problem? Please describe.

I am trying to install monaco-editor npm package to test a version that potentially includes a bugfix, not available through the CDN at the day I'm writing this issue:

npm install monaco-editor@next

The command adds "monaco-editor": "^0.35.0-dev.20230202" in package.json BUT, npm clean-install fails:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE could not resolve
npm ERR!
npm ERR! While resolving: @monaco-editor/react@4.4.6
npm ERR! Found: monaco-editor@0.35.0-dev.20230202
npm ERR! node_modules/monaco-editor
npm ERR!   monaco-editor@"^0.35.0-dev.20230202" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer monaco-editor@">= 0.25.0 < 1" from @monaco-editor/react@4.4.6
npm ERR! node_modules/@monaco-editor/react
npm ERR!   @monaco-editor/react@"^4.4.1" from the root project

The semver simulator indeed surfaces the peerDependency range does not include any -dev.xxx suffixed/unstable version

Describe the solution you'd like

Beta versions cannot be as nicely expressed as stable versions, as the range can only applies to a minor version in our case.

What do you think of having this instead?

- "monaco-editor": ">= 0.25.0 < 1",
+ "monaco-editor": ">= 0.25.0 >= 0.35.0-dev.0 < 1 ",

Describe alternatives you've considered

Another alternative I consider is adding extra flags to my project npm command (--legacy-peer-deps or --force) until monaco-editor@0.35.0 is published, thus picked up by the current peerDependency setup of @monaco-editor/react.

@thom4parisot thom4parisot changed the title Extend monaco-editor peerDependency range to include Extend monaco-editor peerDependency range to include current monaco-editor@next Feb 3, 2023
@suren-atoyan
Copy link
Owner

in the latest version 4.5.0-beta.0 (soon I'll release v4.5.0) it uses monaco-editor@0.36.1

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

No branches or pull requests

2 participants