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

feat(jsii): enforce peer dependencies #294

Merged
merged 2 commits into from
Nov 6, 2018
Merged

feat(jsii): enforce peer dependencies #294

merged 2 commits into from
Nov 6, 2018

Commits on Nov 6, 2018

  1. feat(jsii): enforce peer dependencies

    If a jsii module exposes a type from a dependency in it's public API,
    jsii now enforces that this dependency is also defined as a "peer"
    instead of a normal dependency.
    
    This tells npm that if a user of this module already
    installed a compatible verison of this dependency in their
    closure, npm will pick the one installed by the user (as a peer)
    instead of fetching another version.
    
    jsii will also flag these dependencies as "peer" in the jsii spec. At the
    moment, this won't have implications on generated language packages,
    but in environments that have support for peer dependencies, we should
    make sure the module's metadata reflects this idea as well.
    
    A utility called "jsii-fix-peers" is included. It will inspect .jsii
    and package.json and will add "peerDependencies" to package.json
    for all dependencies that have types in the public API.
    Elad Ben-Israel committed Nov 6, 2018
    Configuration menu
    Copy the full SHA
    b85cc09 View commit details
    Browse the repository at this point in the history
  2. Rebase

    Elad Ben-Israel committed Nov 6, 2018
    Configuration menu
    Copy the full SHA
    6d5c43d View commit details
    Browse the repository at this point in the history