-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pacmak): support jsii-rosetta 5.7 (#4718)
Adds support for jsii-rosetta 5.7 to jsii-pacmak. This also changes the peer dependency to simply state the minimal required version. This will make it less urgent for us to actually release a new version of jsii-pacmak. Also includes a new script to fully automate the uprade. A future extension would be to run this script from a workflow. --- By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license]. [Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
- Loading branch information
Showing
17 changed files
with
2,419 additions
and
1,196 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#!/bin/bash | ||
#------------------------------------------------------------------------ | ||
# updates all package.json files to the latest jsii | ||
# and jsii-rosetta versions | ||
# updates the jsii-pacmak peer dep to the latest supported version | ||
# updates the build matrix in the .github/workflows/main.yml file | ||
#------------------------------------------------------------------------ | ||
set -euo pipefail | ||
scriptdir=$(cd $(dirname $0) && pwd) | ||
|
||
# go to repo root | ||
cd ${scriptdir}/.. | ||
|
||
# load version data | ||
tomorrow=$(date -v+1d +%s) | ||
supported=$(curl -sS https://raw.githubusercontent.com/aws/jsii-rosetta/refs/heads/main/releases.json |\ | ||
jq "(.maintenance | to_entries | sort_by(.value) | .[] | select(.value | .[0:19] +\"Z\" | fromdateiso8601 >= $tomorrow) | .key), .current") | ||
latest=$(echo $supported | jq -sr '.[-1]') | ||
oldest=$(echo $supported | jq -sr '.[0]') | ||
|
||
echo "Latest supported jsii & jsii-rosetta version: $latest" | ||
echo "Oldest supported jsii & jsii-rosetta version: $oldest" | ||
echo "" | ||
|
||
# Set jsii-pacmak minimal dependency | ||
echo "Updating jsii-pacmak peerDependency to >=$oldest.0" | ||
echo "" | ||
npm --prefix packages/jsii-pacmak pkg set peerDependencies.jsii-rosetta=">=$oldest.0" | ||
|
||
# GitHub Actions | ||
matrix=$(echo $supported | jq -rs '["latest"] + map(. + ".x") | @csv') | ||
echo "Updating GitHub Actions workflow to run jsii-pacmak integration tests for $matrix" | ||
echo "" | ||
yq -i ".jobs.pacmak-integration-test.strategy.matrix.rosetta = [$matrix]" .github/workflows/main.yml | ||
|
||
# update jsii and jsii-rosetta versions | ||
echo "Upgrading jsii & jsii-rosetta to latest" | ||
echo "" | ||
npx lerna exec --parallel ncu -- --upgrade --target=latest --dep=prod,dev --filter=jsii,jsii-rosetta |
Oops, something went wrong.