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

Deps issues due to major bump of ajv #23

Closed
majapw opened this issue Feb 13, 2018 · 4 comments
Closed

Deps issues due to major bump of ajv #23

majapw opened this issue Feb 13, 2018 · 4 comments

Comments

@majapw
Copy link

majapw commented Feb 13, 2018

Hello!

Recently #22 was released as part of a patch update. Unfortunately, bumping a peer dep a major version causes all sorts of deps 🔥s up the tree and my tests are now all failing on npm ls.

Can we undo this change and republish as a major?

@ljharb @gabergg @airbnb/webinfra

@backwardok
Copy link

as one example, eslint is pegged to version 5: https://github.com/eslint/eslint/blob/master/package.json#L37

@michael-ciniawsky
Copy link
Member

michael-ciniawsky commented Feb 13, 2018

While ajv released a major, for schema-utils it's still a patch (no breaking changes). What exactly is breaking setups atm ? Normally node_modules should simply contain two versions of ajv if other dependencies require different major versions of the package

@majapw
Copy link
Author

majapw commented Feb 13, 2018

Ahh, you're totally right. I thought that ajv was a peer dep of this package but it is a direct dep. I'm super sorry! This is a problem elsewhere in my tree. :|

Sorry for the red flag!

@filipesilva
Copy link

Heya, I'm also looking into this as part of angular/angular-cli#9691 and I'm not too sure what to make of it.

At the moment I think this is a npm bug.

I added a reproduction in https://github.com/filipesilva/ajv-peerdep-issue and reported it in npm/npm#19877.


ajv-peerdep-issue

This repo shows a problem with how [email protected] hoists dependencies that have peer dependencies.

Running npm install will show the following warning:

npm WARN [email protected] requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.

The following dependencies are relevant:

When npm resolves these dependencies they end up looking like this:

This is a problem because the hoisted [email protected] will not have its peer dependency on ajv@^6.0.0 met.

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

4 participants