Skip to content

Commit

Permalink
chore: enable api compatibility check (aws#3062)
Browse files Browse the repository at this point in the history
Enable jsii-diff to protect us from breaking changes. At the moment, we enabled it for all modules, including experimental
  • Loading branch information
Elad Ben-Israel committed Jun 26, 2019
1 parent a6175be commit edc70b4
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@
*.zip binary
*.png binary
*.jpg binary
*.tgz binary
*.tar.gz binary
9 changes: 4 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -euo pipefail

bail="--bail"
run_tests="true"
runtarget="build+test"
while [[ "${1:-}" != "" ]]; do
case $1 in
-h|--help)
Expand All @@ -16,7 +16,7 @@ while [[ "${1:-}" != "" ]]; do
export CDK_BUILD="--force"
;;
--skip-test|--skip-tests)
run_tests="false"
runtarget="build"
;;
*)
echo "Unrecognized parameter: $1"
Expand Down Expand Up @@ -53,9 +53,8 @@ trap "rm -rf $MERKLE_BUILD_CACHE" EXIT

echo "============================================================================================="
echo "building..."
time lerna run $bail --stream build+test || fail
time lerna run $bail --stream $runtarget || fail

#TEMPORARILY DISABLED (benisrae)
#/bin/bash scripts/check-api-compatibility.sh
/bin/bash scripts/check-api-compatibility.sh

touch $BUILD_INDICATOR
19 changes: 9 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@types/nodeunit": "^0.0.30",
"conventional-changelog-cli": "^2.0.21",
"jest": "^24.8.0",
"jsii-diff": "^0.12.1",
"jsii-diff": "file:vendored_deps/jsii-diff-0.12.x.tgz",
"lerna": "^3.15.0",
"nodeunit": "^0.11.3",
"nyc": "^14.1.1",
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-api-compatibility.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ success=true
for i in ${!package_dirs[*]}; do
if [[ ! -d $tmpdir/node_modules/${package_names[$i]} ]]; then continue; fi
echo -n "${package_names[$i]}... "
if npx jsii-diff $tmpdir/node_modules/${package_names[$i]} ${package_dirs[$i]} 2>$tmpdir/output.txt; then
if npx jsii-diff --experimental-errors $tmpdir/node_modules/${package_names[$i]} ${package_dirs[$i]} 2>$tmpdir/output.txt; then
echo "OK."
else
success=false
Expand Down
Binary file added vendored_deps/jsii-diff-0.12.x.tgz
Binary file not shown.

0 comments on commit edc70b4

Please sign in to comment.