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

Add support to peerDependenciesMeta #11

Merged
merged 1 commit into from Oct 11, 2020
Merged

Conversation

abdonrd
Copy link
Contributor

@abdonrd abdonrd commented May 5, 2020

This PR contains:

  • bugfix
  • feature
  • refactor
  • tests
  • documentation
  • metadata

Breaking Changes?

  • yes
  • no

If yes, please describe the breakage.

Please Describe Your Changes

Fix #10

@shellscape
Copy link
Owner

Please provide a link to NPM documentation or an NPM specification that details the peerDependenciesMeta property. Please note that it must be for NPM proper, and not a third party package manager.

@abdonrd
Copy link
Contributor Author

abdonrd commented May 5, 2020

@shellscape I found it here at the npm blog:

https://blog.npmjs.org/post/186983646370/npm-cli-roadmap-summer-2019

New features likely to land on the 6.x branch:

Add support for the peerDependenciesMeta field. (#224)

Also here in the changelog:

https://github.com/npm/cli/releases/tag/v6.11.0

Also the release announcement:

https://npm.community/t/release-6-11-0/9572

But I can't find it in the docs.

@abdonrd
Copy link
Contributor Author

abdonrd commented May 5, 2020

I just created an issue to request docs: npm/cli#1247

@shellscape
Copy link
Owner

👍 Let's wait to see what they say about updating the docs.

@abdonrd
Copy link
Contributor Author

abdonrd commented May 5, 2020

Ok! But isn't the blog and changelog enough to support it? I say this because seeing the issues they have, it seems that they take a long time to respond...

Thanks in advance and thank for the plugin!

@shellscape
Copy link
Owner

shellscape commented May 5, 2020

I'll see what I can do to get eyes on that through back channels. NPM supports a ton of properties so things don't break, but the list of properties that are first-class official NPM properties that are the baseline for an NPM package is pretty short.

It's a bit of a rabbit hole to support all possible properties in this plugin, so a baseline is needed, which is why I go from the docs or accepted spec from NPM itself.

@abdonrd
Copy link
Contributor Author

abdonrd commented May 5, 2020

Got it, thanks again!

@abdonrd
Copy link
Contributor Author

abdonrd commented May 5, 2020

In case this information helps you, we have just started using that property to avoid the warnings that the official NPM CLI gives when you do not install all the peer dependencies.

If we do not use this property, it is the official NPM CLI that shows us the warning.

@abdonrd
Copy link
Contributor Author

abdonrd commented May 5, 2020

More info, also the package-lock.json changes with this:

Screenshot 2020-05-05 at 15 20 51

You can see how the requires object is different now.

@abdonrd
Copy link
Contributor Author

abdonrd commented Oct 11, 2020

@shellscape official documentation is coming! npm/cli#1822

@shellscape
Copy link
Owner

that's great. since it's got acknowledgement from NPM, we can add support here. Please do update the README and we should be good.

@abdonrd
Copy link
Contributor Author

abdonrd commented Oct 11, 2020

@shellscape done!

@shellscape shellscape merged commit 6235554 into shellscape:master Oct 11, 2020
@abdonrd abdonrd deleted the patch-1 branch October 11, 2020 18:51
maxmilton added a commit to maxmilton/prettier-plugin-package2 that referenced this pull request Apr 17, 2021
* upstream/master:
  chore(release): 1.3.0
  test: add tests for file negations
  chore: update devDeps (shellscape#18)
  docs: update README to match recent additions. fixes shellscape#16.
  fix: move the negations (!) to the bottom in files (shellscape#17)
  feat: add support for peerDependenciesMeta (shellscape#11)
  chore(release): 1.2.0
  feat: add support for exports (shellscape#15)
  chore: npm audit fix
  chore(release): 1.1.0
  feat: add support for `type` (shellscape#14)
  chore(release): 1.0.0
  fix: prettier v2 compat
  chore: npm audit fix
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.

Add support for peerDependenciesMeta
2 participants