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

[Bug]: @oclif/core dependency is duplicated when using NPM #3506

Closed
2 tasks done
frandiox opened this issue Mar 1, 2024 · 5 comments
Closed
2 tasks done

[Bug]: @oclif/core dependency is duplicated when using NPM #3506

frandiox opened this issue Mar 1, 2024 · 5 comments
Labels
Type: Bug Something isn't working

Comments

@frandiox
Copy link
Contributor

frandiox commented Mar 1, 2024

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Other

Expected behavior

The @oclif/core dependency should be unique.

Actual behavior

In latest versions, we can find both @oclif/core@2 and @oclif/core@3 versions installed when using NPM.


The @oclif/core dependency has been recently bumped to v3. However, the following dependencies in @shopify/cli are still 1 version behind and they internally rely on v2, so it also gets installed:

"@oclif/plugin-commands": "2.2.24",
"@oclif/plugin-help": "5.2.18",
"@oclif/plugin-plugins": "3.1.8",

This is not a problem in this monorepo because PNPM is overwriting the @oclif/core version:

'@oclif/core': 3.15.1

However, when using NPM to install @shopify/cli@3.56.2, we end up with the two versions installed.

It looks like the following versions of the packages are aligned with @oclif/core@3.15.1:

    "@oclif/plugin-commands": "3.1.0",
    "@oclif/plugin-help": "6.0.9",
    "@oclif/plugin-plugins": "4.2.6",

I've added this in Hydrogen to fix inconsistencies:
https://github.com/Shopify/hydrogen/blob/5c054f0bc09d73cab9d9977c035feac01e4b43a2/package.json#L94-L99

However, I'm not very familiar with the dependencies to know if we can bump them without creating other issues.


Reproduction steps

  1. npm i
  2. npm why @oclif/core should show 2 versions installed

Operating System

Mac latest

Shopify CLI version (check your project's package.json if you're not sure)

3.56.2

Shell

zsh

Node version (run node -v if you're not sure)

No response

What language and version are you using in your application?

No response

@isaacroldan
Copy link
Contributor

Hi @frandiox !

You are right, i'm working on upgrading oclif dependencies but we are waiting for a new version of some of those packages with some changes we need. After that i'll update all of them :)

Copy link
Contributor

This issue seems inactive. If it's still relevant, please add a comment saying so. Otherwise, take no action.
→ If there's no activity within a week, then a bot will automatically close this.
Thanks for helping to improve Shopify's dev tooling and experience.

P.S. You can learn more about why we stale issues here.

@frandiox
Copy link
Contributor Author

Still relevant (I think?) -- @isaacroldan I see the version of @oclif/core is still overwritten in this repo but the dependencies have been updated. Is still needed to overwrite the oclif version?

@isaacroldan
Copy link
Contributor

I'll check it and make sure all plugins use the same version we do

@isaacroldan
Copy link
Contributor

All oclif dependencies have been updated to use the same version of core

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants