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: update cross-tab-copy-paste plugin peer dependency to support minor and patch updates to Blockly version 8 #1147

Merged

Conversation

johnnyoshika
Copy link
Contributor

Problem

When installing @blockly/plugin-cross-tab-copy-paste into a project with blockly@8.0.1 or blockly@8.0.2, npm throws this error:

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: blockly-paste@0.1.0
npm ERR! Found: blockly@8.0.2
npm ERR! node_modules/blockly
npm ERR!   blockly@"^8.0.2" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer blockly@"^7 - 8" from @blockly/plugin-cross-tab-copy-paste@1.0.5
npm ERR! node_modules/@blockly/plugin-cross-tab-copy-paste
npm ERR!   @blockly/plugin-cross-tab-copy-paste@"*" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

A temporary workaround is to use the --legacy-peer-deps flag:

npm install @blockly/plugin-cross-tab-copy-paste --legacy-peer-deps

Solution

This PR fixes this problem by replacing this peer dependency:

  "peerDependencies": {
    "blockly": "^7 - 8"
  },

...with this:

  "peerDependencies": {
    "blockly": "^7 || ^8"
  },

I'm not proficient with npm version dependency ranges, so if there's a better way to set this range, please feel free to change it. I tried ^7 - ^8 to be more consistent with the original code, but it didn't work.

@johnnyoshika johnnyoshika requested a review from a team as a code owner May 26, 2022 19:44
@johnnyoshika johnnyoshika requested review from rachel-fenichel and removed request for a team May 26, 2022 19:44
@rachel-fenichel rachel-fenichel requested a review from BeksOmega May 26, 2022 21:43
@BeksOmega BeksOmega removed the request for review from rachel-fenichel May 26, 2022 21:50
Copy link
Contributor

@BeksOmega BeksOmega left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! Based on this range documentation, I think we actually want >=7 <9, which is equivalent to what you have, but matches what we need next time we update.

Could you also update your commit message to use conventional commits? Then this should be good to merge :D

And I'll file an issue about updating the other packages.

@johnnyoshika johnnyoshika force-pushed the cross-tab-copy-paste-peer-dependencies branch from b08e678 to 7d25a87 Compare May 27, 2022 01:24
@johnnyoshika
Copy link
Contributor Author

@BeksOmega Thank you! I updated the peer dependency range and corrected my commit message to follow conventional commits.

@johnnyoshika johnnyoshika requested a review from BeksOmega May 27, 2022 01:27
@johnnyoshika johnnyoshika changed the title fix: cross-tab-copy-paste plugin peer dependency to support upgraded versions of Blockly 8 fix: update cross-tab-copy-paste plugin peer dependency to support minor and patch updates to Blockly version 8 May 27, 2022
Copy link
Contributor

@BeksOmega BeksOmega 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 the change! And thank you again for your contribution :D LGTM!

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.

When I try to install plugin-cross-tab-copy-paste from npm, I get a "cannot resolve dependency tree" error.
3 participants