Skip to content

Commit

Permalink
chore: compat script will now also install peer dependencies (aws#12142)
Browse files Browse the repository at this point in the history
In cdkv2, the package `aws-cdk-lib` has changed its dependency model to
move to use peerDependencies + devDependencies, instead of regular
dependencies.

As part of this, the `constructs` package is now a peer dependency.
jsii-diff requires this package to also be installed to load the jsii
assembly.

Change the check-api-compatibility.sh to use npm7 which installs all
declared peer dependencies as part of `npm install`.


----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
Niranjan Jayakar authored Dec 18, 2020
1 parent 4e1d951 commit 23d10df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/check-api-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ if ! ${SKIP_DOWNLOAD:-false}; then
mkdir -p $tmpdir

echo "Installing from NPM..." >&2
(cd $tmpdir && npm install --prefix $tmpdir $existing_names)
# use npm7 to automatically install peer dependencies
(cd $tmpdir && npx npm@^7.0.0 install --prefix $tmpdir $existing_names)
fi

#----------------------------------------------------------------------
Expand Down

0 comments on commit 23d10df

Please sign in to comment.