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 use of peerDependencies #421

Merged
merged 3 commits into from
Apr 2, 2019

Conversation

RomainMuller
Copy link
Contributor

Any direct dependency to another jsii module must be recorded as a
peerDependency as well, guaranteeing a consistent behavior of
dependencies across all possible jsii runtimes.

BREAKING CHANGE: All direct dependencies must be duplicated in
peerDependencies unless they are in bundledDependencies.

Fixes #361

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Any direct dependency to another jsii module must be recorded as a
peerDependency as well, guaranteeing a consistent behavior of
dependencies across all possible jsii runtimes.

BREAKING CHANGE: All direct dependencies must be duplicated in
                 peerDependencies unless they are in bundledDependencies.

Fixes #361
@RomainMuller RomainMuller requested a review from a team as a code owner April 2, 2019 10:56
@@ -38,23 +38,55 @@ export interface ProjectInfo {
readonly projectReferences?: boolean;
}

export async function loadProjectInfo(projectRoot: string): Promise<ProjectInfo> {
const pkg = require(path.join(projectRoot, 'package.json'));
export async function loadProjectInfo(projectRoot: string, fixPeerDependencies: boolean): Promise<ProjectInfo> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use keyword arguments for fixPeerDeps

@RomainMuller RomainMuller added the pr/breaking-change This PR is a breaking change. It needs to be modified to be allowed in the current major version. label Apr 2, 2019
@RomainMuller RomainMuller requested a review from costleya as a code owner April 2, 2019 12:50
@RomainMuller RomainMuller merged commit e72fea5 into master Apr 2, 2019
@RomainMuller RomainMuller deleted the rmuller/enforce-peer-dependencies branch April 2, 2019 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr/breaking-change This PR is a breaking change. It needs to be modified to be allowed in the current major version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants