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

npm warning requiring peer of solium #33

Open
zachlysobey opened this issue Jan 25, 2019 · 7 comments
Open

npm warning requiring peer of solium #33

zachlysobey opened this issue Jan 25, 2019 · 7 comments

Comments

@zachlysobey
Copy link

zachlysobey commented Jan 25, 2019

When installing ethlint you get a npm warning message:

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

I expect this is because solium has now been renamed to ethlint, but this project still lists solium as a peer dependency

  "peerDependencies": {
    "solium": "^1.0.0"
  },

https://github.com/duaraghav8/solium-plugin-security/blob/master/package.json#L29-L31

I'm happy to open a PR to address this, but I'm not super familiar with how peerDependencies work.

I think ideally it'd specify that it could have a peer depednecy of solium@^1.0.0 OR ethlint@^1.0.0?

@duaraghav8
Copy link
Owner

duaraghav8 commented Jan 26, 2019

Great point @zachlysobey
I just confirmed from docs and the actual code that there is unfortunately no way to specify an OR condition in peer deps.

I'll open up an issue with NPM. Until an OR is possible, I'll add this caveat to the Docs.

I don't want to change the peer dep from solium to ethlint right now because it could be breaking for anyone who treats warnings as errors too.

I'm open to hearing any suggestions you have on solving this problem.
Please ignore the warning for now.

@duaraghav8
Copy link
Owner

duaraghav8 commented Jan 26, 2019

(This comment is for my own future reference)

Issue has been added to Blocked Tasks.

Once OR is available:

  • Modify security plugin to use it
  • Remove caveat from plugin's doc as well as Ethlint docs
  • Modify Ethlint Dev doc to inform reader to use this OR feature in peer deps to specify both solium and ethlint.

duaraghav8 pushed a commit that referenced this issue Jan 27, 2019
duaraghav8 pushed a commit that referenced this issue Jan 27, 2019
duaraghav8 pushed a commit that referenced this issue Jan 27, 2019
duaraghav8 pushed a commit that referenced this issue Jan 27, 2019
duaraghav8 pushed a commit to duaraghav8/Ethlint that referenced this issue Jan 27, 2019
duaraghav8 pushed a commit to duaraghav8/Ethlint that referenced this issue Jan 27, 2019
@duaraghav8
Copy link
Owner

Discussion opened at https://npm.community/t/allow-any-one-of-specified-packages-in-peerdependencies/4933

@pcowgill
Copy link

pcowgill commented Jun 6, 2019

@duaraghav8 What about renaming this repo to ethlint-plugin-security and publishing to npm from the main feature branch a new package named ethlint-plugin-security with a peer deep of ethlint, and from a legacy feature branch publishing the old package named solium-plugin-security with the existing peer dep?

@pcowgill
Copy link

@duaraghav8 What about renaming this repo to ethlint-plugin-security and publishing to npm from the main feature branch a new package named ethlint-plugin-security with a peer deep of ethlint, and from a legacy feature branch publishing the old package named solium-plugin-security with the existing peer dep?

Do you think this would be a workable solution? Thanks!

@duaraghav8
Copy link
Owner

Hey @pcowgill sorry for late response, yes this is the ideal solution, but unfortunately I don't have the bandwidth to change this, because this requires huge changes in this repo as well as some changes & tests in core ethlint (to allow reading npm modules prefixed with ethlint-plugin-, currently it can only read solium-plugin-)

@pcowgill
Copy link

@duaraghav8 Totally understandable. Thanks for getting back to me!

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

3 participants