diff --git a/.all-contributorsrc b/.all-contributorsrc index ae888416e5..ca64019365 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -1366,6 +1366,24 @@ "contributions": [ "doc" ] + }, + { + "login": "nathannaveen", + "name": "nathannaveen", + "avatar_url": "https://avatars.githubusercontent.com/u/42319948?v=4", + "profile": "https://github.com/nathannaveen", + "contributions": [ + "maintenance" + ] + }, + { + "login": "jusdino", + "name": "Justin Frahm", + "avatar_url": "https://avatars.githubusercontent.com/u/11840575?v=4", + "profile": "https://github.com/jusdino", + "contributions": [ + "bug" + ] } ], "repoType": "github", diff --git a/.devcontainer.json b/.devcontainer.json index 96182dcfe2..556ed10a20 100644 --- a/.devcontainer.json +++ b/.devcontainer.json @@ -1,21 +1,19 @@ { - "name": "Dev Container Definition - AWS JSII", + "name": "Dev Container - aws/jsii", "build": { "dockerfile": "superchain/Dockerfile", "context": ".", "target": "superchain", "args": { - "BUILDPLATFORM": "linux/amd64", - "TARGETPLATFORM": "linux/amd64", "BUILD_TIMESTAMP": "unknown", + "COMMIT_ID": "HEAD", "REGISTRY": "docker.io/library", - "COMMIT_ID": "head" - } + }, }, - "containerUser": "root", - "remoteUser": "root", + "containerUser": "superchain", + "remoteUser": "superchain", "postCreateCommand": "yarn install && yarn build", "extensions": [ - "dbaeumer.vscode-eslint@2.1.5" - ] + "dbaeumer.vscode-eslint@2.1.5", + ], } diff --git a/.gitattributes b/.gitattributes index bd2acce6f6..cd1d488e62 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15,4 +15,5 @@ # Github Linguist configuration (https://github.com/github/linguist) yarn.lock linguist-generated *.snap linguist-generated +packages/@jsii/benchmarks/fixtures/** linguist-vendored docs/** linguist-documentation diff --git a/.github/semantic.yml b/.github/semantic.yml deleted file mode 100644 index ffca2a1ad3..0000000000 --- a/.github/semantic.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Configuration for Semantic Pull Requests -titleOnly: true - -types: - - feat - - fix - - docs - - style - - refactor - - perf - - test - - build - - ci - - chore - - revert - - release diff --git a/.github/workflows/docker-images.yml b/.github/workflows/docker-images.yml index 666c2fc284..fa974bfb38 100644 --- a/.github/workflows/docker-images.yml +++ b/.github/workflows/docker-images.yml @@ -18,10 +18,10 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: ['12', '14', '16'] + node: ['12', '14', '16', '18'] env: # Node version whose images will be aliased without the -nodeXX segment - DEFAULT_NODE_MAJOR_VERSION: 12 + DEFAULT_NODE_MAJOR_VERSION: 14 steps: - name: Check out uses: actions/checkout@v3 diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index bb2a9b7e40..5b7af8dc56 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -73,7 +73,7 @@ jobs: git config user.email "aws-cdk+automation@amazon.com" - name: Prepare Commit run: |- - rsync --delete --exclude=.git --recursive ${{ runner.temp }}/site/ ./ + rsync --delete --exclude=.git --exclude=dev --recursive ${{ runner.temp }}/site/ ./ touch .nojekyll git add . git diff --cached --exit-code >/dev/null || ( diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ff96c368e4..6401688655 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,10 +45,10 @@ jobs: with: cache: yarn node-version: '12' - - name: Set up Python 3.6 + - name: Set up Python 3.7 uses: actions/setup-python@v3 with: - python-version: '3.6' + python-version: '3.7' - name: Install python3-venv run: sudo apt install -y python3-venv - name: Locate Caches @@ -69,9 +69,9 @@ jobs: !~/.m2/repository/software/amazon/jsii/ ~/.nuget/packages !~/.nuget/packages/amazon.jsii.* - key: ${{ runner.os }}-node@12-python@3.6-${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }} + key: ${{ runner.os }}-node@12-python@3.7-${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }} restore-keys: |- - ${{ runner.os }}-node@12-python@3.6- + ${{ runner.os }}-node@12-python@3.7- ${{ runner.os }}-node@12- ${{ runner.os }}- # Prepare dependencies and build @@ -139,10 +139,10 @@ jobs: with: cache: yarn node-version: '12' - - name: Set up Python 3.6 + - name: Set up Python 3.7 uses: actions/setup-python@v3 with: - python-version: '3.6' + python-version: '3.7' - name: Install python3-venv run: sudo apt install -y python3-venv - name: Locate Caches @@ -163,9 +163,9 @@ jobs: !~/.m2/repository/software/amazon/jsii/ ~/.nuget/packages !~/.nuget/packages/amazon.jsii.* - key: ${{ runner.os }}-node@12-python@3.6-${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }} + key: ${{ runner.os }}-node@12-python@3.7-${{ hashFiles('**/yarn.lock', '**/Directory.Build.targets') }} restore-keys: |- - ${{ runner.os }}-node@12-python@3.6- + ${{ runner.os }}-node@12-python@3.7- ${{ runner.os }}-node@12- ${{ runner.os }}- # Prepare dependencies and build @@ -204,6 +204,8 @@ jobs: path: ${{ github.workspace }}/dist/ test: + permissions: + contents: none name: Test (${{ matrix.os }} / dotnet ${{ matrix.dotnet }} / java ${{ matrix.java }} / node ${{ matrix.node }} / python ${{ matrix.python }}) needs: build strategy: @@ -213,9 +215,14 @@ jobs: dotnet: ['3.1.x'] go: ['1.16'] java: ['8'] - node: ['12', '14', '16', '17'] + node: + - '12' # EOL 2022-04-30 + - '14' # EOL 2023-04-30 + - '16' # EOL 2024-04-30 + - '17' # EOL 2022-06-01 + - '18' # EOL 2025-04-30 os: [ubuntu-latest] - python: ['3.6'] + python: ['3.7'] # Add specific combinations to be tested against "node 12" (to restrict cardinality) include: # Test using Windows @@ -224,48 +231,48 @@ jobs: go: '1.16' java: '8' node: '12' - python: '3.6' + python: '3.7' # Test using macOS - os: macos-latest dotnet: '3.1.x' go: '1.16' java: '8' node: '12' - python: '3.6' + python: '3.7' # Test alternate .NETs - java: '8' dotnet: '5.0.x' go: '1.16' node: '12' os: ubuntu-latest - python: '3.6' + python: '3.7' - java: '8' dotnet: '6.0.x' go: '1.16' node: '12' os: ubuntu-latest - python: '3.6' + python: '3.7' # Test alternate Javas - java: '11' dotnet: '3.1.x' go: '1.16' node: '12' os: ubuntu-latest - python: '3.6' + python: '3.7' # Test alternate Pythons - - python: '3.7' + - python: '3.8' dotnet: '3.1.x' go: '1.16' java: '8' node: '12' os: ubuntu-latest - - python: '3.8' + - python: '3.9' dotnet: '3.1.x' go: '1.16' java: '8' node: '12' os: ubuntu-latest - - python: '3.9' + - python: '3.10' dotnet: '3.1.x' go: '1.16' java: '8' @@ -358,3 +365,51 @@ jobs: && echo "Untracked files: ${untracked:-}" \ && test -z "${untracked}" shell: bash + benchmark: + name: Run benchmark suite + runs-on: ubuntu-latest + permissions: + contents: write + needs: build + steps: + # Check out the code + - name: Download Artifact + uses: actions/download-artifact@v3 + with: + name: built-tree + - name: Extract Artifact + run: |- + echo "::group::Untar Archive" + tar zxvf built-tree.tgz + echo "::endgroup" + + rm built-tree.tgz + - name: Set up Node + uses: actions/setup-node@v3 + with: + cache: yarn + node-version: '14' + - name: Install Dependencies + run: yarn install --frozen-lockfile + - name: Run Benchmark + working-directory: packages/@jsii/benchmarks + run: yarn bench --output ${{ runner.temp }}/bench-output.json + - name: Compare Benchmark Results + if: github.event_name == 'pull_request' + uses: benchmark-action/github-action-benchmark@v1 + with: + name: jsii Benchmark Regression + tool: 'customSmallerIsBetter' + output-file-path: ${{ runner.temp }}/bench-output.json + comment-always: true + github-token: ${{ secrets.PROJEN_GITHUB_TOKEN }} + fail-on-alert: true + - name: Upload Benchmark Results + if: github.event_name == 'push' + uses: benchmark-action/github-action-benchmark@v1 + with: + name: jsii Benchmark + tool: 'customSmallerIsBetter' + output-file-path: ${{ runner.temp }}/bench-output.json + github-token: ${{ secrets.PROJEN_GITHUB_TOKEN }} + auto-push: true diff --git a/.github/workflows/pull-request-lint.yml b/.github/workflows/pull-request-lint.yml new file mode 100644 index 0000000000..6ef370020e --- /dev/null +++ b/.github/workflows/pull-request-lint.yml @@ -0,0 +1,34 @@ +name: pull-request-lint +on: + pull_request_target: + types: + - labeled + - opened + - synchronize + - reopened + - ready_for_review + - edited +jobs: + validate: + name: Validate PR Title + runs-on: ubuntu-latest + permissions: + pull-requests: write + steps: + - uses: amannn/action-semantic-pull-request@v4 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: |- + feat + fix + chore + docs + style + refactor + perf + test + build + ci + revert + requireScope: false diff --git a/.mergify/config.yml b/.mergify/config.yml index f31ef19350..6fe83ab87e 100644 --- a/.mergify/config.yml +++ b/.mergify/config.yml @@ -12,17 +12,18 @@ queue_rules: - status-success~=^Test \(.* node 14 .*$ - status-success~=^Test \(.* node 16 .*$ - status-success~=^Test \(.* node 17 .*$ + - status-success~=^Test \(.* node 18 .*$ # One test for each supported dotnet version - status-success~=^Test \(.* dotnet 3\.1\.x .*$ - status-success~=^Test \(.* dotnet 5\.0\.x .*$ # One test for Java 8 and 11 - status-success~=^Test \(.* java 8 .*$ - status-success~=^Test \(.* java 11 .*$ - # One test for Python 3.6 through 3.9 - - status-success~=^Test \(.* python 3\.6[ )].*$ + # One test for Python 3.7 through 3.10 - status-success~=^Test \(.* python 3\.7[ )].*$ - status-success~=^Test \(.* python 3\.8[ )].*$ - status-success~=^Test \(.* python 3\.9[ )].*$ + - status-success~=^Test \(.* python 3\.10[ )].*$ pull_request_rules: - name: label core @@ -30,7 +31,7 @@ pull_request_rules: label: add: [contribution/core] conditions: - - author~=^(eladb|RomainMuller|garnaat|nija-at|skinny85|rix0rrr|NGL321|Jerry-AWS|SomayaB|MrArnoldPalmer|NetaNir|iliapolo|njlynch|madeline-k|BenChaimberg|comcalvi|kaizen3031593|Chriscbr|corymhall|otaviomacedo|yuth|TheRealAmazonKendra)$ + - author~=^(eladb|RomainMuller|garnaat|nija-at|skinny85|rix0rrr|NGL321|Jerry-AWS|SomayaB|MrArnoldPalmer|NetaNir|iliapolo|njlynch|madeline-k|BenChaimberg|comcalvi|kaizen3031593|Chriscbr|corymhall|otaviomacedo|yuth|TheRealAmazonKendra|vinayak-kukreja)$ - -label~="contribution/core" - name: Tell them we're good now actions: @@ -50,7 +51,7 @@ pull_request_rules: - '#approved-reviews-by>=1' - '#review-requested=0' - '#changes-requested-reviews-by=0' - - status-success=Semantic Pull Request + - status-success=Validate PR Title # Docker image validation - status-success~=^jsii/superchain # One test for each OS @@ -62,17 +63,18 @@ pull_request_rules: - status-success~=^Test \(.* node 14 .*$ - status-success~=^Test \(.* node 16 .*$ - status-success~=^Test \(.* node 17 .*$ + - status-success~=^Test \(.* node 18 .*$ # One test for each supported dotnet version - status-success~=^Test \(.* dotnet 3\.1\.x .*$ - status-success~=^Test \(.* dotnet 5\.0\.x .*$ # One test for Java 8 and 11 - status-success~=^Test \(.* java 8 .*$ - status-success~=^Test \(.* java 11 .*$ - # One test for Python 3.6 through 3.9 - - status-success~=^Test \(.* python 3\.6[ )].*$ + # One test for Python 3.7 through 3.10 - status-success~=^Test \(.* python 3\.7[ )].*$ - status-success~=^Test \(.* python 3\.8[ )].*$ - status-success~=^Test \(.* python 3\.9[ )].*$ + - status-success~=^Test \(.* python 3\.10[ )].*$ - name: Synchronize that PR to upstream and merge it (squash) actions: @@ -100,7 +102,7 @@ pull_request_rules: - '#approved-reviews-by>=1' - '#review-requested=0' - '#changes-requested-reviews-by=0' - - status-success=Semantic Pull Request + - status-success=Validate PR Title # Docker image validation - status-success~=^jsii/superchain # One test for each OS @@ -112,17 +114,18 @@ pull_request_rules: - status-success~=^Test \(.* node 14 .*$ - status-success~=^Test \(.* node 16 .*$ - status-success~=^Test \(.* node 17 .*$ + - status-success~=^Test \(.* node 18 .*$ # One test for each supported dotnet version - status-success~=^Test \(.* dotnet 3\.1\.x .*$ - status-success~=^Test \(.* dotnet 5\.0\.x .*$ # One test for Java 8 and 11 - status-success~=^Test \(.* java 8 .*$ - status-success~=^Test \(.* java 11 .*$ - # One test for Python 3.6 through 3.9 - - status-success~=^Test \(.* python 3\.6[ )].*$ + # One test for Python 3.7 through 3.10 - status-success~=^Test \(.* python 3\.7[ )].*$ - status-success~=^Test \(.* python 3\.8[ )].*$ - status-success~=^Test \(.* python 3\.9[ )].*$ + - status-success~=^Test \(.* python 3\.10[ )].*$ - name: Synchronize that PR to upstream and merge it (no-squash) actions: @@ -150,7 +153,7 @@ pull_request_rules: - '#approved-reviews-by>=1' - '#review-requested=0' - '#changes-requested-reviews-by=0' - - status-success=Semantic Pull Request + - status-success=Validate PR Title # Docker image validation - status-success~=^jsii/superchain # One test for each OS @@ -162,17 +165,18 @@ pull_request_rules: - status-success~=^Test \(.* node 14 .*$ - status-success~=^Test \(.* node 16 .*$ - status-success~=^Test \(.* node 17 .*$ + - status-success~=^Test \(.* node 18 .*$ # One test for each supported dotnet version - status-success~=^Test \(.* dotnet 3\.1\.x .*$ - status-success~=^Test \(.* dotnet 5\.0\.x .*$ # One test for Java 8 and 11 - status-success~=^Test \(.* java 8 .*$ - status-success~=^Test \(.* java 11 .*$ - # One test for Python 3.6 through 3.9 - - status-success~=^Test \(.* python 3\.6[ )].*$ + # One test for Python 3.7 through 3.10 - status-success~=^Test \(.* python 3\.7[ )].*$ - status-success~=^Test \(.* python 3\.8[ )].*$ - status-success~=^Test \(.* python 3\.9[ )].*$ + - status-success~=^Test \(.* python 3\.10[ )].*$ - name: Clean branch up actions: @@ -206,4 +210,4 @@ pull_request_rules: [Conventional Commits]: https://www.conventionalcommits.org conditions: - - status-failure=Semantic Pull Request + - status-failure=Validate PR Title diff --git a/CHANGELOG.md b/CHANGELOG.md index b6ffb5a852..73b87ba0d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,35 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +## [1.58.0](https://github.com/aws/jsii/compare/v1.57.0...v1.58.0) (2022-05-06) + + +### ⚠ BREAKING CHANGES + +* `jsii-pacmak` and the libraries it generates for Python +targets now require a minimum Python version of 3.7, instead of 3.6 +previously. We recommend users upgrade to the latest supported Python +release (Python 3.10). + +### Features + +* compiler benchmarks and gh action ([#3503](https://github.com/aws/jsii/issues/3503)) ([4a91cf0](https://github.com/aws/jsii/commit/4a91cf0d3032a988d20049ab9fffc25747ed9c47)), closes [/github.com/MrArnoldPalmer/jsii/pull/417#commitcomment-72358212](https://github.com/aws//github.com/MrArnoldPalmer/jsii/pull/417/issues/commitcomment-72358212) +* **go:** add tag to denote required/optional properties ([#3486](https://github.com/aws/jsii/issues/3486)) ([3d7c310](https://github.com/aws/jsii/commit/3d7c310dcb66f1d61ab4c6a8530be06870d577b3)), closes [#2536](https://github.com/aws/jsii/issues/2536) [#2672](https://github.com/aws/jsii/issues/2672) + + +### Bug Fixes + +* **go:** object type not recognized ([#3485](https://github.com/aws/jsii/issues/3485)) ([fe2fa94](https://github.com/aws/jsii/commit/fe2fa947891ab5d517efbec37998b9b57203aa8d)), closes [#2880](https://github.com/aws/jsii/issues/2880) +* incorrect token for benchmark action ([#3517](https://github.com/aws/jsii/issues/3517)) ([3648117](https://github.com/aws/jsii/commit/3648117811c1edb40c047b2df3adf11a28452b3d)) +* **jsii:** some submodules are not exported from `aws-cdk-lib` ([#3491](https://github.com/aws/jsii/issues/3491)) ([47f70a2](https://github.com/aws/jsii/commit/47f70a26383f401a8b3df700787d6ce7934f66f9)) +* make jsii --watch work ([#3487](https://github.com/aws/jsii/issues/3487)) ([4a46f7d](https://github.com/aws/jsii/commit/4a46f7d7db3e6f9f1cf2730b02f4af0c1da9f237)), closes [#3467](https://github.com/aws/jsii/issues/3467) +* **pacmak:** missing python artifacts when using relative -o path ([#3518](https://github.com/aws/jsii/issues/3518)) ([cc9b561](https://github.com/aws/jsii/commit/cc9b561b7ee847c78bbc6c8514a74a7e48ed3ef4)), closes [aws/aws-cdk#20041](https://github.com/aws/aws-cdk/issues/20041) +* **rosetta:** attempts transliteraiton to unsupported languages ([#3478](https://github.com/aws/jsii/issues/3478)) ([db2d62e](https://github.com/aws/jsii/commit/db2d62e563432ddb99df273107e182d5fbaf7173)) +* **rosetta:** incorrect transliteration for selective imports ([#3508](https://github.com/aws/jsii/issues/3508)) ([8eec086](https://github.com/aws/jsii/commit/8eec0868c02730dd22009c841e25034144b2e86f)) + + +* drop support for Python 3.6 (EOL as of 2021-12-23) ([#3472](https://github.com/aws/jsii/issues/3472)) ([abf7415](https://github.com/aws/jsii/commit/abf741545cc07a6aa85c74a12b7e0271ad8a531d)) + ## [1.57.0](https://github.com/aws/jsii/compare/v1.56.0...v1.57.0) (2022-04-19) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c9d7b0151..792c74f5ef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ in your development environment. + [`maven >= 3.0.5`](https://maven.apache.org) - [.NET Core `3.1`] or later + *Recommended:* [`mono >= 5`](https://www.mono-project.com) -- [Python `3.6.5`] or later +- [Python `3.7.3`] or later + [`pip`](https://pip.pypa.io/en/stable/installing/) + [`setuptools >= 38.6.0`](https://pypi.org/project/setuptools/) + [`wheel`](https://pypi.org/project/wheel/) @@ -56,7 +56,7 @@ in your development environment. [Oracle's OpenJDK8]: http://openjdk.java.net/install/ [Amazon Corretto 8]: https://aws.amazon.com/corretto/ [.NET Core `3.1`]: https://www.microsoft.com/net/download -[Python `3.6.5`]: https://www.python.org/downloads/release/python-365/ +[Python `3.7.3`]: https://www.python.org/downloads/release/python-373/ ## Getting Started ### Bootstrapping diff --git a/README.md b/README.md index f8dd3174f5..4d7272f5bf 100644 --- a/README.md +++ b/README.md @@ -140,93 +140,95 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
Joseph Lawson

👀
Joseph Martin

🐛
Junix

🐛 +
Justin Frahm

🐛
Justin Taylor

🐛
Kaizen Conroy

💻 🐛 -
Kaushik Borra

🐛 +
Kaushik Borra

🐛
Kyle Thomson

💻 👀
Leandro Padua

🐛
Liang Zhou

🐛 💻
Madeline Kusters

💻 🐛
Maja S Bratseth

🐛
Marcos Diez

🐛 -
Mark Nielsen

💻 +
Mark Nielsen

💻
Matthew Bonig

🐛 📝
Matthew Pirocchi

💻 🤔 👀
Meng Xin Zhu

🐛
Michael Neil

🚧
Mike Lane

🐛
Mitch Garnaat

🐛 💻 🤔 👀 -
Mitchell Valine

🐛 💻 🤔 🚧 👀 +
Mitchell Valine

🐛 💻 🤔 🚧 👀
Mohamad Soufan

📖
Mykola Mogylenko

🐛
Neta Nir

💻 🤔 🚧 👀
Nick Lynch

🐛 💻 🚧 👀
Niranjan Jayakar

🐛 💻 🤔 🚧 👀
Noah Litov

💻 🚧 👀 -
Otavio Macedo

💻 🐛 +
Otavio Macedo

💻 🐛
PIDZ - Bart

🤔
Peter Woodworth

🚧
Petr Kacer

🐛
Petra Barus

💻
Philip Cali

🤔
Quentin Loos

🤔 -
Raphael

🐛 +
Raphael

🐛
Richard H Boyd

🐛
Rico Huijbers

🐛 💻 🤔 🚧 👀
Romain Marcadier

🐛 💻 🎨 🤔 🚧 👀 📝
SADIK KUZU

👀
SK

🤔
Sam Fink

💻 👀 -
Sam Goodwin

👀 +
Sam Goodwin

👀
Sebastian Korfmann

🐛 💻 🤔
Shane Witbeck

🤔
Shiv Lakshminarayan

💻 🚧 👀
Somaya

💻 🤔 🚧 👀
The Gitter Badger

💻 🚧
Thomas Poignant

🐛 -
Thomas Steinbach

🐛 +
Thomas Steinbach

🐛
Thorsten Hoeger

💻
Tim Wagner

🐛 🤔
Tobias Lidskog

💻
Ty Coghlan

🐛
Tyler van Hensbergen

🤔
Vlad Hrybok

🐛 -
Vladimir Shchur

🐛 +
Vladimir Shchur

🐛
Yan Zhulanow

💻
Yigong Liu

🐛 🤔
Zach Bienenfeld

🐛
ajnarang

🤔
aniljava

💻
arnogeurts-sqills

🐛 💻 -
deccy-mcc

🐛 +
deccy-mcc

🐛
dependabot-preview[bot]

🐛 🚧
dependabot[bot]

🚧
dheffx

🐛
gregswdl

🐛
guyroberts21

📖
mattBrzezinski

📖 -
mergify

🚧 +
mergify

🚧
mergify[bot]

🚧 +
nathannaveen

🚧
seiyashima42

🐛 💻 📖
sullis

💻
vaneek

🐛 diff --git a/gh-pages/content/user-guides/language-support/index.md b/gh-pages/content/user-guides/language-support/index.md index 6bad2ebf33..f53ad0cd72 100644 --- a/gh-pages/content/user-guides/language-support/index.md +++ b/gh-pages/content/user-guides/language-support/index.md @@ -69,7 +69,7 @@ in significant re-engineering effort: - How are dependencies modeled? If [semantic versioning] is not the norm, what is the strategy to correctly represent semantic version ranges? - What are the toolchain and platform requirements? - - For example, **Java** requires an OpenJDK 8 distribution and `maven`, **Python** requires `python` 3.6 or above, + - For example, **Java** requires an OpenJDK 8 distribution and `maven`, **Python** requires `python` 3.7 or above, etc... ## Code Generation diff --git a/gh-pages/content/user-guides/lib-author/configuration/targets/python.md b/gh-pages/content/user-guides/lib-author/configuration/targets/python.md index 669ba7f4e6..ab5eb8098a 100644 --- a/gh-pages/content/user-guides/lib-author/configuration/targets/python.md +++ b/gh-pages/content/user-guides/lib-author/configuration/targets/python.md @@ -16,10 +16,10 @@ The `python` target requires two configuration entries: - Additionally, the following `Programming Language ::` classifiers are already set (more could be added by the user if relevant): - `Programming Language :: Python :: 3 :: Only` - - `Programming Language :: Python :: 3.6` - `Programming Language :: Python :: 3.7` - `Programming Language :: Python :: 3.8` - `Programming Language :: Python :: 3.9` + - `Programming Language :: Python :: 3.10` Example: diff --git a/gh-pages/content/user-guides/lib-author/index.md b/gh-pages/content/user-guides/lib-author/index.md index 4793d37bd3..c7beba1298 100644 --- a/gh-pages/content/user-guides/lib-author/index.md +++ b/gh-pages/content/user-guides/lib-author/index.md @@ -17,9 +17,9 @@ to produce releasable artifacts. | Language/Platform | SDK Requirement | | ----------------- | ---------------------------- | | .NET | .NET Core ≥ 3.1 / .NET ≥ 5.0 | -| Go | Go ≥ 1.15 | +| Go | Go ≥ 1.16 | | Java | JDK ≥ 8 *and* Maven ≥ 3.6 | -| Python | Python ≥ 3.6 | +| Python | Python ≥ 3.7 | ## :octicons-desktop-download-24: Download Locations diff --git a/gh-pages/partials/node-support-table.md b/gh-pages/partials/node-support-table.md index 276a08e125..48a1188f70 100644 --- a/gh-pages/partials/node-support-table.md +++ b/gh-pages/partials/node-support-table.md @@ -1,23 +1,28 @@ -| Release | Status | -| --------- | ---------------------------- | -| `<12.7.0` | :x: Defunct | -| `^12.7.0` | :white_check_mark: Supported | -| `^13.0.0` | :x: Defunct | -| `^14.0.0` | :white_check_mark: Supported | -| `^15.0.0` | :x: Defunct | -| `^16.0.0` | :white_check_mark: Supported | +!!! info "The following node releases are part of our test matrix:" -??? question "Status Definitions" - - **:white_check_mark: Supported**: Long Term Support (LTS) releases (those with an even major version) are - supported and bugs specific to those releases are addressed with the highest priority. Every `jsii` release is - automatically tested against those releases. - - **:test_tube: Best effort**: Development releases (those with an odd major version) are supported on a best-effort - basis. No automated testing is performed against those releases. - - **:warning: Unsupported**: End-of-Life releases are not supported. Bugs affecting those may not be fixed, and - users are strongly advised to migrate to more recent releases. - - **:x: Defunct**: Very old releases (these have been End-of-Live for a while now) are unlikely to work at all. + | Release | Status | End-of-Life | + | --------- | ---------------------------- | ------------ | + | `^12.7.0` | :white_check_mark: Supported | `2022-04-30` | + | `^14.5.0` | :white_check_mark: Supported | `2023-04-30` | + | `^16.3.0` | :white_check_mark: Supported | `2024-04-30` | + | `^17.3.0` | :test_tube: Best effort | `2022-06-01` | + | `^18.0.0` | :white_check_mark: Supported | `2025-04-30` | + + ??? question "Status Definitions" + - **:white_check_mark: Supported**: Long Term Support (LTS) releases (those with an even major version) are + supported and bugs specific to those releases are addressed with the highest priority. Every `jsii` release is + automatically tested against those releases. + - **:test_tube: Best effort**: Development releases (those with an odd major version) are supported on a + best-effort basis. Some of these releases may include breaking changes or bugs that may cause runtime errors + that we may not be able to fix. + + Releases not in the matrix might work, but are not guaranteed to: they can be considered to fall under the + **:test_tube: Best Effort** umbrella, unless they are end-of-life. Releases past end-of-life are unlikely to work, + or may stop working with any future release. The [node releases schedule][node-releases] provides up-to-date information on the current status of all active releases, and indicates the timelines for support (including planned End-of-Life dates for each). [node-releases]: https://nodejs.org/en/about/releases/ + + diff --git a/gh-pages/requirements-dev.txt b/gh-pages/requirements-dev.txt index cb825a4a84..bc96bb9cf9 100644 --- a/gh-pages/requirements-dev.txt +++ b/gh-pages/requirements-dev.txt @@ -1,4 +1,4 @@ mkdocs~=1.3.0 mkdocs-awesome-pages-plugin~=2.7.0 -mkdocs-material~=8.2.9 +mkdocs-material~=8.2.13 mkdocs-git-revision-date-plugin~=0.3.2 diff --git a/lerna.json b/lerna.json index 55fef948ea..e0d6e372c4 100644 --- a/lerna.json +++ b/lerna.json @@ -10,5 +10,5 @@ "rejectCycles": true } }, - "version": "1.57.0" + "version": "1.58.0" } diff --git a/package.json b/package.json index 5ac28efed4..73832efe3c 100644 --- a/package.json +++ b/package.json @@ -16,10 +16,10 @@ }, "devDependencies": { "@jest/types": "^27.5.1", - "@typescript-eslint/eslint-plugin": "^5.18.0", - "@typescript-eslint/parser": "^5.18.0", + "@typescript-eslint/eslint-plugin": "^5.20.0", + "@typescript-eslint/parser": "^5.20.0", "all-contributors-cli": "^6.20.0", - "eslint": "^8.12.0", + "eslint": "^8.13.0", "eslint-config-prettier": "^8.5.0", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^2.7.1", diff --git a/packages/@jsii/benchmarks/.eslintrc.yaml b/packages/@jsii/benchmarks/.eslintrc.yaml new file mode 100644 index 0000000000..18ccbb678d --- /dev/null +++ b/packages/@jsii/benchmarks/.eslintrc.yaml @@ -0,0 +1,9 @@ +--- +extends: ../../../eslint-config.yaml +ignorePatterns: + - fixtures + +rules: + 'import/no-extraneous-dependencies': + - error + - devDependencies: ['**/scripts/**'] diff --git a/packages/@jsii/benchmarks/.gitignore b/packages/@jsii/benchmarks/.gitignore new file mode 100644 index 0000000000..6c6558b43c --- /dev/null +++ b/packages/@jsii/benchmarks/.gitignore @@ -0,0 +1,3 @@ +output.txt +*.d.ts +*.js diff --git a/packages/@jsii/benchmarks/README.md b/packages/@jsii/benchmarks/README.md new file mode 100644 index 0000000000..9dbd300c1f --- /dev/null +++ b/packages/@jsii/benchmarks/README.md @@ -0,0 +1,25 @@ +# jsii Benchmarks + +This package is meant to collect benchmarks for `jsii`, `jsii-pacmak`, and any other jsii packages sourced in TS. It +contains a basic benchmark runner in [`benchmark.ts`](lib/benchmark.ts) that uses the `perf_hooks` module in order to +time synchronous functions. + +## Usage + +There is a small CLI app wrapping calls to the benchmarks defined. To call the benchmarks: + +``` +yarn benchmark +``` + +To output benchmark run results to a json file, pass the `--output` option + +``` +yarn benchmark --output my-file.json +``` + +## Output Format + +The output format is JSON and is used by the +[continous benchmark action](https://github.com/benchmark-action/github-action-benchmark) which tracks the results of +benchmarks over time. diff --git a/packages/@jsii/benchmarks/bin/benchmark.ts b/packages/@jsii/benchmarks/bin/benchmark.ts new file mode 100644 index 0000000000..0d555540d7 --- /dev/null +++ b/packages/@jsii/benchmarks/bin/benchmark.ts @@ -0,0 +1,86 @@ +import * as fs from 'fs-extra'; +import * as yargs from 'yargs'; + +import { benchmarks } from '../lib'; +import { Benchmark } from '../lib/benchmark'; + +/** + * Format of benchmark output used by continous benchmarking action. + * See [documentation](https://github.com/benchmark-action/github-action-benchmark/blob/master/README.md) for details + */ +interface ResultsJson { + /** + * The name of the benchmark + */ + name: string; + + /** + * The unit of measure, usually seconds + */ + unit: string; + + /** + * The result of the measurement, usually an average over x iterations + */ + value: number; + + /** + * The variance of all runs + */ + range: number; + + /** + * Extra information about the benchmark, displayed in a tooltip + */ + extra: string; +} + +(async () => { + /* eslint-disable-next-line @typescript-eslint/await-thenable */ + const argv = await yargs + .command('$0', 'Runs jsii benchmark tests and displays results', (argv) => + argv.option('output', { + type: 'string', + desc: 'location of benchmark results json file, does not output to file if not specified.', + }), + ) + .help().argv; + + // Run list of benchmarks in sequence + const resultsJson: ResultsJson[] = await benchmarks.reduce( + async ( + accum: Promise, + benchmark: Benchmark, + ): Promise => { + const prev = await accum; + const result = await benchmark.run(); + const extra = `${result.name} averaged ${result.average} milliseconds over ${result.iterations.length} runs`; + console.log(extra); + return [ + ...prev, + { + name: result.name, + unit: 'milliseconds', + value: result.average, + range: result.variance, + extra, + }, + ]; + }, + Promise.resolve([]), + ); + + if (argv.output) { + await fs.writeJson(argv.output, resultsJson, { spaces: 2 }); + console.log(`results written to ${argv.output}`); + } + + return resultsJson; +})() + .then((results) => { + console.log(`successfully completed ${results.length} benchmarks`); + }) + .catch((e) => { + console.error(`Error: ${e.stack}`); + process.exitCode = -1; + }); diff --git a/packages/@jsii/benchmarks/fixtures/aws-cdk-lib@v2-21-1.tgz b/packages/@jsii/benchmarks/fixtures/aws-cdk-lib@v2-21-1.tgz new file mode 100644 index 0000000000..4722f5ff82 Binary files /dev/null and b/packages/@jsii/benchmarks/fixtures/aws-cdk-lib@v2-21-1.tgz differ diff --git a/packages/@jsii/benchmarks/lib/benchmark.ts b/packages/@jsii/benchmarks/lib/benchmark.ts new file mode 100644 index 0000000000..5fc5b4b314 --- /dev/null +++ b/packages/@jsii/benchmarks/lib/benchmark.ts @@ -0,0 +1,158 @@ +import { performance, PerformanceObserver, PerformanceEntry } from 'perf_hooks'; + +/** + * Result of a benchmark run + */ +interface Result { + /** + * The name of the benchmark + */ + readonly name: string; + + /** + * The average duration across all iterations + */ + readonly average: number; + + /** + * Maximum duration across all iteraions + */ + readonly max: number; + + /** + * Minimum duration across all iterations + */ + readonly min: number; + + /** + * max - min + */ + readonly variance: number; + + /** + * Results of individual runs + */ + readonly iterations: readonly PerformanceEntry[]; +} + +/** + * A simple benchmark for measuring synchronous functions. Uses the `perf_hooks` + * module to measure how long a subject takes to execute and averages the result + * over all runs. Runs `setup`, `beforeEach`, `afterEach`, and `teardown` + * lifecycle hooks before, between, and after runs. These functions, and the + * subject function, have access to an optionally defined `context` object that + * can be returned from the `setup` function. This allows referencing shared + * state across benchmark runs and lifecycle hooks to do things like setup, + * teardown, stubbing, etc. + */ +export class Benchmark { + /** + * How many times to run the subject + */ + #iterations = 5; + + /** + * Results of individual runs + */ + #results: PerformanceEntry[] = []; + + public constructor(private readonly name: string) {} + #setup: () => C | Promise = () => ({} as C); + #subject: (ctx: C) => void = () => undefined; + #beforeEach: (ctx: C) => void = () => undefined; + #afterEach: (ctx: C) => void = () => undefined; + #teardown: (ctx: C) => void = () => undefined; + + /** + * Create a setup function to be run once before the benchmark, optionally + * return a context object to be used across runs and lifecycle functions. + */ + public setup(fn: () => T | Promise) { + this.#setup = fn; + return this as unknown as Benchmark; + } + + /** + * Create a teardown function to be run once after all benchmark runs. Use to + * clean up your mess. + */ + public teardown(fn: (ctx: C) => void) { + this.#teardown = fn; + return this; + } + + /** + * Create a beforeEach function to be run before each iteration. Use to reset + * state the subject may have changed. + */ + public beforeEach(fn: (ctx: C) => void) { + this.#beforeEach = fn; + return this; + } + + /** + * Create an afterEach function to be run after each iteration. Use to reset + * state the subject may have changed. + */ + public afterEach(fn: (ctx: C) => void) { + this.#afterEach = fn; + return this; + } + + /** + * Setup the subject to be measured. + */ + public subject(fn: (ctx: C) => void) { + this.#subject = fn; + return this; + } + + /** + * Set the number of iterations to be run. + */ + public iterations(i: number) { + this.#iterations = i; + return this; + } + + /** + * Run and measure the benchmark + */ + public async run(): Promise { + const c = await this.#setup?.(); + return new Promise((ok) => { + const wrapped = performance.timerify(this.#subject); + const obs = new PerformanceObserver((list, observer) => { + this.#results = list.getEntries(); + performance.clearMarks(); + observer.disconnect(); + const durations = this.#results.map((i) => i.duration); + const max = Math.max(...durations); + const min = Math.min(...durations); + const variance = max - min; + + return ok({ + name: this.name, + average: + durations.reduce((accum, duration) => accum + duration, 0) / + durations.length, + max, + min, + variance, + iterations: this.#results, + }); + }); + obs.observe({ entryTypes: ['function'] }); + + try { + for (let i = 0; i < this.#iterations; i++) { + this.#beforeEach(c); + wrapped(c); + this.#afterEach(c); + } + } finally { + this.#teardown(c); + } + }); + } +} diff --git a/packages/@jsii/benchmarks/lib/constants.ts b/packages/@jsii/benchmarks/lib/constants.ts new file mode 100644 index 0000000000..9e9eaf87ea --- /dev/null +++ b/packages/@jsii/benchmarks/lib/constants.ts @@ -0,0 +1,9 @@ +import * as path from 'path'; + +export const fixturesDir = path.resolve(__dirname, '..', 'fixtures'); + +export const cdkTagv2_21_1 = 'v2.21.1'; +export const cdkv2_21_1 = path.resolve( + fixturesDir, + `aws-cdk-lib@${cdkTagv2_21_1.replace(/\./g, '-')}.tgz`, +); diff --git a/packages/@jsii/benchmarks/lib/index.ts b/packages/@jsii/benchmarks/lib/index.ts new file mode 100644 index 0000000000..bcf5319021 --- /dev/null +++ b/packages/@jsii/benchmarks/lib/index.ts @@ -0,0 +1,46 @@ +import * as cp from 'child_process'; +import * as fs from 'fs-extra'; +import { Compiler } from 'jsii/lib/compiler'; +import { loadProjectInfo } from 'jsii/lib/project-info'; +import * as os from 'os'; +import * as path from 'path'; + +import { Benchmark } from './benchmark'; +import { cdkv2_21_1, cdkTagv2_21_1 } from './constants'; +import { streamUntar } from './util'; + +// Always run against the same version of CDK source +const cdk = new Benchmark(`Compile aws-cdk-lib@${cdkTagv2_21_1}`) + .setup(async () => { + const sourceDir = fs.mkdtempSync( + path.join(os.tmpdir(), 'jsii-cdk-bench-snapshot'), + ); + await streamUntar(cdkv2_21_1, { cwd: sourceDir }); + cp.execSync('npm ci', { cwd: sourceDir }); + + // Working directory for benchmark + const workingDir = fs.mkdtempSync( + path.join(os.tmpdir(), `jsii-cdk-bench@${cdkTagv2_21_1}`), + ); + + return { + workingDir, + sourceDir, + } as const; + }) + .beforeEach(({ workingDir, sourceDir }) => { + fs.removeSync(workingDir); + fs.copySync(sourceDir, workingDir); + }) + .subject(({ workingDir }) => { + const { projectInfo } = loadProjectInfo(workingDir); + const compiler = new Compiler({ projectInfo }); + + compiler.emit(); + }) + .teardown(({ workingDir, sourceDir }) => { + fs.removeSync(workingDir); + fs.removeSync(sourceDir); + }); + +export const benchmarks = [cdk]; diff --git a/packages/@jsii/benchmarks/lib/util.ts b/packages/@jsii/benchmarks/lib/util.ts new file mode 100644 index 0000000000..6a121dee03 --- /dev/null +++ b/packages/@jsii/benchmarks/lib/util.ts @@ -0,0 +1,11 @@ +import * as fs from 'fs-extra'; +import * as tar from 'tar'; + +export async function streamUntar(file: string, config: tar.ExtractOptions) { + const stream = fs.createReadStream(file).pipe(tar.x(config)); + + return new Promise((ok, ko) => { + stream.on('end', ok); + stream.on('error', (error: Error) => ko(error)); + }); +} diff --git a/packages/@jsii/benchmarks/package.json b/packages/@jsii/benchmarks/package.json new file mode 100644 index 0000000000..6f4ad3d3c3 --- /dev/null +++ b/packages/@jsii/benchmarks/package.json @@ -0,0 +1,35 @@ +{ + "name": "@jsii/benchmarks", + "version": "0.0.0", + "private": true, + "description": "the jsii benchmark suite", + "main": "index.js", + "dependencies": { + "fs-extra": "^10.0.1", + "jsii": "^0.0.0", + "tar": "^6.1.11", + "yargs": "^16.2.0" + }, + "devDependencies": { + "@types/glob": "^7.2.0", + "eslint": "^8.13.0", + "glob": "^8.0.1", + "jsii-calc": "^3.20.120", + "prettier": "^2.6.2", + "typescript": "~3.9.10" + }, + "scripts": { + "build": "tsc --build && npm run lint", + "watch": "tsc -w", + "bench": "node bin/benchmark.js", + "snapshot": "node scripts/snapshot-package.js", + "lint": "eslint . --ext .ts --ignore-path=.gitignore", + "lint:fix": "yarn lint --fix" + }, + "bin": { + "benchmark": "bin/benchmark.js" + }, + "keywords": [], + "author": "Amazon Web Services, Inc.", + "license": "Apache-2.0" +} diff --git a/packages/@jsii/benchmarks/scripts/snapshot-package.ts b/packages/@jsii/benchmarks/scripts/snapshot-package.ts new file mode 100644 index 0000000000..44b828698e --- /dev/null +++ b/packages/@jsii/benchmarks/scripts/snapshot-package.ts @@ -0,0 +1,95 @@ +import * as cp from 'child_process'; +import * as fs from 'fs-extra'; +import * as glob from 'glob'; +import * as os from 'os'; +import * as path from 'path'; +import * as tar from 'tar'; + +import { cdkTagv2_21_1, cdkv2_21_1 } from '../lib/constants'; + +function snapshotAwsCdk(tag: string, file: string) { + // Directory of aws-cdk repository + const repoDir = fs.mkdtempSync( + path.join(os.tmpdir(), `jsii-cdk-bench@${tag}`), + ); + // Directory for snapshot of aws-cdk-lib source + const intermediate = fs.mkdtempSync( + path.join(os.tmpdir(), `jsii-cdk-bench-inter@${tag}`), + ); + + // Clone aws/aws-cdk + cp.execSync( + `git clone --depth=1 -b ${tag} https://github.com/aws/aws-cdk.git .`, + { + cwd: repoDir, + }, + ); + + // Install/link dependencies + cp.execSync('yarn install --frozen-lockfile', { cwd: repoDir }); + + // build aws-cdk-lib and dependencies + cp.execSync( + `npx lerna run --scope aws-cdk-lib --include-dependencies build`, + { cwd: repoDir }, + ); + + // Copy built package to intermediate directory + fs.copySync(path.resolve(repoDir, 'packages', 'aws-cdk-lib'), intermediate); + + // Remove build artifacts so we can rebuild + const artifacts = glob.sync( + path.join(intermediate, '**/*@(.js|.js.map|.d.ts|.tsbuildinfo)'), + ); + artifacts.forEach(fs.removeSync); + + // Remove node_modules from monorepo setup + fs.removeSync(path.resolve(intermediate, 'node_modules')); + + // Remove @aws-cdk/* deps from package.json so we can npm install to get hoisted dependencies + // into local node_modules + const packageJsonPath = path.resolve(intermediate, 'package.json'); + const { devDependencies, ...pkgJson } = fs.readJsonSync(packageJsonPath); + const newDevDependencies = Object.entries(devDependencies).reduce( + (accum, [pkg, version]) => { + if (pkg.startsWith('@aws-cdk/')) return accum; + + return { + ...accum, + [pkg]: version, + }; + }, + {}, + ); + + fs.writeFileSync( + packageJsonPath, + JSON.stringify( + { ...pkgJson, devDependencies: newDevDependencies }, + undefined, + 2, + ), + ); + + // Run npm install to get package-lock.json for reproducible dependency tree + cp.execSync(`npm install`, { cwd: intermediate }); + fs.removeSync(path.resolve(intermediate, 'node_modules')); + tar.c( + { + file, + cwd: intermediate, + sync: true, + gzip: true, + }, + ['.'], + ); + + fs.removeSync(intermediate); + fs.removeSync(repoDir); +} + +function main() { + snapshotAwsCdk(cdkTagv2_21_1, cdkv2_21_1); +} + +main(); diff --git a/packages/@jsii/benchmarks/tsconfig.json b/packages/@jsii/benchmarks/tsconfig.json new file mode 100644 index 0000000000..b190a5dff6 --- /dev/null +++ b/packages/@jsii/benchmarks/tsconfig.json @@ -0,0 +1,5 @@ +{ + "extends": "../../../tsconfig-base", + "include": ["**/*.ts"], + "exclude": ["fixtures"] +} diff --git a/packages/@jsii/check-node/package.json b/packages/@jsii/check-node/package.json index 19a1defe8d..b123296cb3 100644 --- a/packages/@jsii/check-node/package.json +++ b/packages/@jsii/check-node/package.json @@ -17,7 +17,7 @@ "directory": "packages/@jsii/check-node" }, "engines": { - "node": ">= 10.3.0" + "node": ">= 12.7.0" }, "main": "lib/index.js", "types": "lib/index.d.ts", @@ -37,12 +37,12 @@ }, "dependencies": { "chalk": "^4.1.2", - "semver": "^7.3.5" + "semver": "^7.3.7" }, "devDependencies": { "@types/chalk": "^2.2.0", "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "jest": "^27.5.1" } } diff --git a/packages/@jsii/check-node/src/constants.test.ts b/packages/@jsii/check-node/src/constants.test.ts new file mode 100644 index 0000000000..1555bc774c --- /dev/null +++ b/packages/@jsii/check-node/src/constants.test.ts @@ -0,0 +1,74 @@ +import { NodeRelease } from './constants'; + +test('supported release', () => { + const endOfLife = new Date(Date.now() + 31 * 86_400_000); + const subject = new NodeRelease(42, { endOfLife }); + + expect(subject).toMatchObject({ + deprecated: false, + endOfLife: false, + endOfLifeDate: endOfLife, + untested: false, + supported: true, + supportedRange: expect.objectContaining({ raw: '^42.0.0' }), + }); +}); + +test('supported release with range', () => { + const endOfLife = new Date(Date.now() + 31 * 86_400_000); + const subject = new NodeRelease(42, { + endOfLife, + supportedRange: '^42.1337.0', + }); + + expect(subject).toMatchObject({ + deprecated: false, + endOfLife: false, + endOfLifeDate: endOfLife, + untested: false, + supported: true, + supportedRange: expect.objectContaining({ raw: '^42.1337.0' }), + }); +}); + +test('untested release', () => { + const endOfLife = new Date(Date.now() + 31 * 86_400_000); + const subject = new NodeRelease(42, { endOfLife, untested: true }); + + expect(subject).toMatchObject({ + deprecated: false, + endOfLife: false, + endOfLifeDate: endOfLife, + untested: true, + supported: false, + supportedRange: expect.objectContaining({ raw: '^42.0.0' }), + }); +}); + +test('deprecated release', () => { + const endOfLife = new Date(Date.now() + 25 * 86_400_000); + const subject = new NodeRelease(42, { endOfLife }); + + expect(subject).toMatchObject({ + deprecated: true, + endOfLife: false, + endOfLifeDate: endOfLife, + untested: false, + supported: true, + supportedRange: expect.objectContaining({ raw: '^42.0.0' }), + }); +}); + +test('EOL release', () => { + const endOfLife = new Date(); + const subject = new NodeRelease(42, { endOfLife }); + + expect(subject).toMatchObject({ + deprecated: false, + endOfLife: true, + endOfLifeDate: endOfLife, + untested: false, + supported: false, + supportedRange: expect.objectContaining({ raw: '^42.0.0' }), + }); +}); diff --git a/packages/@jsii/check-node/src/constants.ts b/packages/@jsii/check-node/src/constants.ts index a0a3e84306..d91a0d794c 100644 --- a/packages/@jsii/check-node/src/constants.ts +++ b/packages/@jsii/check-node/src/constants.ts @@ -1,69 +1,176 @@ -export const enum SupportLevel { +import * as process from 'process'; +import { Range, SemVer } from 'semver'; + +const ONE_DAY_IN_MILLISECONDS = 86_400_000; + +/** + * The support information for a given node release range. + * + * @see https://nodejs.org/en/about/releases/ + */ +export class NodeRelease { /** - * Soft-deprecated, removed as of releases made starting at DEADLINE. This - * will output a yellow warning to the console, until the DEADLINE has been - * reached, at which point it'll be a SCARY RED WARNING. + * How long before enf-of-life do we start warning customers? Expressed in + * milliseconds to make it easier to deal with JS dates. */ - DEPRECATED = 'deprecated', + private static readonly DEPRECATION_WINDOW_MS = 30 * ONE_DAY_IN_MILLISECONDS; /** - * Supported releases, nothing to see. No message will be output. + * All registered node releases. */ - SUPPORTED = 'supported', + public static readonly ALL_RELEASES: readonly NodeRelease[] = [ + // Historical releases (not relevant at time of writing this as they're all EOL now...) + ...([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] as const).map( + (majorVersion) => new NodeRelease(majorVersion, { endOfLife: true }), + ), + + // Past end-of-life releases + new NodeRelease(13, { endOfLife: new Date('2020-06-01') }), + new NodeRelease(15, { endOfLife: new Date('2021-06-01') }), + + // Deprecated releases + new NodeRelease(12, { + endOfLife: new Date('2022-04-30'), + supportedRange: '^12.7.0', + }), + + // Currently active releases + new NodeRelease(14, { + endOfLife: new Date('2023-04-30'), + supportedRange: '^14.5.0', + }), + new NodeRelease(16, { + endOfLife: new Date('2024-04-30'), + supportedRange: '^16.3.0', + }), + new NodeRelease(17, { + endOfLife: new Date('2022-06-01'), + supportedRange: '^17.3.0', + }), + new NodeRelease(18, { endOfLife: new Date('2025-04-30') }), + + // Future (planned releases) + new NodeRelease(19, { endOfLife: new Date('2023-06-01'), untested: true }), + new NodeRelease(20, { endOfLife: new Date('2026-04-30'), untested: true }), + ]; /** - * EOL releases are unsupported, so this will emit a SCARY RED WARNING. + * @returns the `NodeRelease` corresponding to the version of the node runtime + * executing this code (as provided by `process.version`), and a + * boolean indicating whether this version is known to be broken. If + * the runtime does not correspond to a known node major, this + * returns an `undefined` release object. */ - END_OF_LIFE = 'end-of-life', + public static forThisRuntime(): { + nodeRelease: NodeRelease | undefined; + knownBroken: boolean; + } { + const semver = new SemVer(process.version); + const majorVersion = semver.major; + + for (const nodeRelease of this.ALL_RELEASES) { + if (nodeRelease.majorVersion === majorVersion) { + return { + nodeRelease, + knownBroken: !nodeRelease.supportedRange.test(semver), + }; + } + } + + return { nodeRelease: undefined, knownBroken: false }; + } /** - * Not end-of-life, but also not supported. This is usually the case for early - * releases on a new major train, where some of the features are not available - * yet. These emit a SCARY RED WARNING, but the messaging is slightly - * different than that of END_OF_LIFE. + * The major version of this node release. */ - UNSUPPORTED = 'unsupported', + public readonly majorVersion: number; /** - * Those releases are newer than the current software package, so we have not - * tested with it. People may encounter all kinds of weird bugs, especially - * early in the release cycle... So we'll issue a yellow warning here. + * The date on which this release range starts to be considered end-of-life. + * May be `undefined` for "ancient" releases (before Node 12). */ - UNTESTED = 'untested', -} + public readonly endOfLifeDate: Date | undefined; -/** - * The deadline after which deprecated releases will move to - * `SupportLevel.END_OF_LIFE`. - */ -export const DEADLINE = '2021-09-01'; -/** - * The DEADLINE, expressed in milliseconds since the epoch. - */ -export const DEADLINE_EPOCH_MS = new Date( - `${DEADLINE}T00:00:00.000Z`, -).getTime(); + /** + * Determines whether this release is currently considered end-of-life. + */ + public readonly endOfLife: boolean; -/** - * For each SemVer range, what is the support level for such versions of Node. - * The ranges are checked in declaration order (so it is a good idea to keep the - * left-open ranges at the beginning, and the right-open ranges at the end. - * First match wins. - * - * Also, if you are setting a new entry to `SupportLevel.DEPRECATED`, do not - * forget to also change the `DEADLINE` value. - */ -export const VERSION_SUPPORT: { readonly [range: string]: SupportLevel } = { - '<12.0.0-0': SupportLevel.END_OF_LIFE, - '<12.7.0': SupportLevel.UNSUPPORTED, - '^12.7.0': SupportLevel.SUPPORTED, - '^13.0.0-0': SupportLevel.END_OF_LIFE, - '<14.5.0': SupportLevel.UNSUPPORTED, - '^14.5.0': SupportLevel.SUPPORTED, - '^15.0.0-0': SupportLevel.END_OF_LIFE, - '<16.3.0': SupportLevel.UNSUPPORTED, - '^16.3.0': SupportLevel.SUPPORTED, - '<17.3.0': SupportLevel.UNSUPPORTED, - '^17.3.0': SupportLevel.SUPPORTED, - // Anything else will be treated as SupportLevel.UNTESTED. -}; + /** + * Determines whether this release is within the deprecation window ahead of + * it's end-of-life date. + */ + public readonly deprecated: boolean; + + /** + * If `true` denotes that this version of node has not been added to the test + * matrix yet. This is used when adding not-yet-released versions of node that + * are already planned (typically one or two years out). + * + * @default false + */ + public readonly untested: boolean; + + /** + * The range of versions from this release line that are supported (early + * releases in a new line often lack essential features, and some have known + * bugs). + */ + public readonly supportedRange: Range; + + /** + * Determines whether this major version line is currently "in support", + * meaning it is not end-of-life nor pending. + */ + public readonly supported: boolean; + + /** @internal visible for testing */ + public constructor( + majorVersion: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11, + opts: { endOfLife: true }, + ); + /** @internal visible for testing */ + public constructor( + majorVersion: number, + opts: { + endOfLife: Date; + untested?: boolean; + supportedRange?: string; + }, + ); + /** @internal visible for testing */ + public constructor( + majorVersion: number, + opts: { + endOfLife: Date | true; + untested?: boolean; + supportedRange?: string; + }, + ) { + this.majorVersion = majorVersion; + this.endOfLifeDate = opts.endOfLife === true ? undefined : opts.endOfLife; + this.untested = opts.untested ?? false; + this.supportedRange = new Range( + opts.supportedRange ?? `^${majorVersion}.0.0`, + ); + + this.endOfLife = + opts.endOfLife === true || opts.endOfLife.getTime() <= Date.now(); + this.deprecated = + !this.endOfLife && + opts.endOfLife !== true && + opts.endOfLife.getTime() - NodeRelease.DEPRECATION_WINDOW_MS <= + Date.now(); + + this.supported = !this.untested && !this.endOfLife; + } + + public toString(): string { + const eolInfo = this.endOfLifeDate + ? ` (Planned end-of-life: ${this.endOfLifeDate + .toISOString() + .slice(0, 10)})` + : ''; + return `${this.supportedRange.raw}${eolInfo}`; + } +} diff --git a/packages/@jsii/check-node/src/index.test.ts b/packages/@jsii/check-node/src/index.test.ts index a6067b7f78..fcb1255fbb 100644 --- a/packages/@jsii/check-node/src/index.test.ts +++ b/packages/@jsii/check-node/src/index.test.ts @@ -1,16 +1,19 @@ -import { DEADLINE_EPOCH_MS, SupportLevel, VERSION_SUPPORT } from './constants'; +import { NodeRelease } from './constants'; -// This test is there to ensure house-keeping happens when it should. Deprecated -// node releases should move to `SupportLevel.END_OF_LIFE` once the `DEADLINE` -// has been reached. -test('no deprecated version is past deadline', () => { - const deprecated = Object.entries(VERSION_SUPPORT).filter( - ([, supportLevel]) => supportLevel === SupportLevel.DEPRECATED, +// This test is there to ensure house-keeping happens when it should. If we are +// testing a given node release, it must be registered in constants.ts, and it +// must not be a "known broken" release. +test('tested node releases are correctly registered & supported', () => { + const { nodeRelease, knownBroken } = NodeRelease.forThisRuntime(); + expect(nodeRelease).toBeDefined(); + expect(knownBroken).toBeFalsy(); +}); + +// This test is there to ensure house-keeping happens when it should. If we are +// testing a given node release, it must not have been EOL for over 30 days. +test('tested node release have not ben EOL for more than 30 days', () => { + const { nodeRelease } = NodeRelease.forThisRuntime(); + expect(nodeRelease?.endOfLifeDate?.getTime()).toBeGreaterThan( + Date.now() - 30 * 86_400_000, ); - expect( - // Either there are no deprecated ranges - deprecated.length === 0 || - // Or the deadline is in the future - DEADLINE_EPOCH_MS > Date.now(), - ).toBeTruthy(); }); diff --git a/packages/@jsii/check-node/src/index.ts b/packages/@jsii/check-node/src/index.ts index 012b233e5a..51c3f0f368 100644 --- a/packages/@jsii/check-node/src/index.ts +++ b/packages/@jsii/check-node/src/index.ts @@ -1,14 +1,8 @@ import { Chalk, bgYellow, bgYellowBright, bgRed } from 'chalk'; import { error } from 'console'; import { version } from 'process'; -import { Range, SemVer } from 'semver'; -import { - DEADLINE, - DEADLINE_EPOCH_MS, - SupportLevel, - VERSION_SUPPORT, -} from './constants'; +import { NodeRelease } from './constants'; /** * Checks the current process' node runtime version against the release support @@ -16,46 +10,34 @@ import { * supported (i.e: it is deprecated, end-of-life, or untested). */ export function checkNode(): void { - const runtimeVersion = new SemVer(version); - let versionSupportLevel = SupportLevel.UNTESTED; - for (const [rangeExpr, supportLevel] of Object.entries(VERSION_SUPPORT)) { - const range = new Range(rangeExpr); - if (range.test(runtimeVersion)) { - versionSupportLevel = supportLevel; - break; - } - } + const { nodeRelease, knownBroken } = NodeRelease.forThisRuntime(); - switch (versionSupportLevel) { - case SupportLevel.DEPRECATED: - const deadlinePast = Date.now() > DEADLINE_EPOCH_MS; - veryVisibleMessage( - deadlinePast ? bgRed.white.bold : bgYellowBright.black, - `Node ${version} has reached end-of-life and will no longer be supported in new releases after ${DEADLINE}.`, - `Please upgrade to a supported node version as soon as possible.`, - ); - break; - case SupportLevel.END_OF_LIFE: - veryVisibleMessage( - bgRed.white.bold, - `Node ${version} has reached end-of-life and is not supported.`, - ); - break; - case SupportLevel.UNSUPPORTED: - veryVisibleMessage( - bgRed.white.bold, - `Node ${version} is not supported. Early releases a node major often lack essential features of that line.`, - ); - break; - case SupportLevel.SUPPORTED: - // Nothing to do - break; - case SupportLevel.UNTESTED: - veryVisibleMessage( - bgYellow.black, - `This software has not been tested with node ${version}.`, - ); - break; + if (nodeRelease?.endOfLife) { + const qualifier = nodeRelease.endOfLifeDate + ? ` on ${nodeRelease.endOfLifeDate.toISOString().slice(0, 10)}` + : ''; + veryVisibleMessage( + bgRed.white.bold, + `Node ${nodeRelease.majorVersion} has reached end-of-life${qualifier} and is not supported.`, + `Please upgrade to a supported node version as soon as possible.`, + ); + } else if (knownBroken) { + veryVisibleMessage( + bgRed.white.bold, + `Node ${version} is unsupported and has known compatibility issues with this software.`, + ); + } else if (!nodeRelease || nodeRelease.untested) { + veryVisibleMessage( + bgYellow.black, + `This software has not been tested with node ${version}.`, + ); + } else if (nodeRelease?.deprecated) { + const deadline = nodeRelease.endOfLifeDate!.toISOString().slice(0, 10); + veryVisibleMessage( + bgYellowBright.black, + `Node ${nodeRelease.majorVersion} is approaching end-of-life and will no longer be supported in new releases after ${deadline}.`, + `Please upgrade to a supported node version as soon as possible.`, + ); } function veryVisibleMessage( @@ -67,10 +49,21 @@ export function checkNode(): void { message, callToAction, '', - 'As of the current release, supported versions of node are:', - ...Object.entries(VERSION_SUPPORT) - .filter(([, supportLevel]) => supportLevel === SupportLevel.SUPPORTED) - .map(([rangeExpr]) => `- ${rangeExpr}`), + `This software is currently running on node ${version}.`, + 'As of the current release of this software, supported node releases are:', + ...NodeRelease.ALL_RELEASES.filter((release) => release.supported) + // We display those from longest remaining support to shortest (to incitate people to be ahead of future derepcations). + .sort( + (l, r) => + (r.endOfLifeDate?.getTime() ?? 0) - + (l.endOfLifeDate?.getTime() ?? 0), + ) + .map( + (release) => + `- ${release.toString()}${ + release.deprecated ? ' [DEPRECATED]' : '' + }`, + ), ]; const len = Math.max(...lines.map((l) => l.length)); const border = chalk('!'.repeat(len + 8)); diff --git a/packages/@jsii/dotnet-runtime-test/package.json b/packages/@jsii/dotnet-runtime-test/package.json index cb55eaf90d..6896ff44f4 100644 --- a/packages/@jsii/dotnet-runtime-test/package.json +++ b/packages/@jsii/dotnet-runtime-test/package.json @@ -31,7 +31,7 @@ }, "devDependencies": { "@jsii/dotnet-runtime": "^0.0.0", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "jsii-calc": "^3.20.120", "jsii-pacmak": "^0.0.0", "typescript": "~3.9.10" diff --git a/packages/@jsii/dotnet-runtime/package.json b/packages/@jsii/dotnet-runtime/package.json index c8fb76d1a3..acf8792618 100644 --- a/packages/@jsii/dotnet-runtime/package.json +++ b/packages/@jsii/dotnet-runtime/package.json @@ -39,10 +39,10 @@ }, "devDependencies": { "@jsii/runtime": "^0.0.0", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "@types/semver": "^7.3.9", "jsii-build-tools": "^0.0.0", - "semver": "^7.3.5", + "semver": "^7.3.7", "typescript": "~3.9.10" } } diff --git a/packages/@jsii/go-runtime/jsii-runtime-go/internal/kernel/conversions.go b/packages/@jsii/go-runtime/jsii-runtime-go/internal/kernel/conversions.go index aa3eae82e5..56ad32a7ad 100644 --- a/packages/@jsii/go-runtime/jsii-runtime-go/internal/kernel/conversions.go +++ b/packages/@jsii/go-runtime/jsii-runtime-go/internal/kernel/conversions.go @@ -1,6 +1,7 @@ package kernel import ( + "fmt" "reflect" "time" @@ -178,6 +179,10 @@ func (c *Client) CastPtrToRef(dataVal reflect.Value) interface{} { for _, field := range fields { fieldVal := elemVal.FieldByIndex(field.Index) if (fieldVal.Kind() == reflect.Ptr || fieldVal.Kind() == reflect.Interface) && fieldVal.IsNil() { + // If there is the "field" tag, and it's "required", then panic since the value is nil. + if requiredOrOptional, found := field.Tag.Lookup("field"); found && requiredOrOptional == "required" { + panic(fmt.Sprintf("Field %v.%v is required, but has nil value", field.Type, field.Name)) + } continue } key := field.Tag.Get("json") diff --git a/packages/@jsii/go-runtime/package.json b/packages/@jsii/go-runtime/package.json index 37b13f0eaa..a488578c1a 100644 --- a/packages/@jsii/go-runtime/package.json +++ b/packages/@jsii/go-runtime/package.json @@ -24,9 +24,9 @@ }, "devDependencies": { "@types/fs-extra": "^9.0.13", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "codemaker": "^0.0.0", - "eslint": "^8.12.0", + "eslint": "^8.13.0", "fs-extra": "^9.1.0", "jsii-build-tools": "^0.0.0", "jsii-calc": "^3.20.120", diff --git a/packages/@jsii/integ-test/package.json b/packages/@jsii/integ-test/package.json index 14b307216d..98ca1cff0c 100644 --- a/packages/@jsii/integ-test/package.json +++ b/packages/@jsii/integ-test/package.json @@ -30,9 +30,9 @@ "@types/dotenv": "^8.2.0", "@types/fs-extra": "^9.0.13", "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "@types/tar": "^6.1.1", - "eslint": "^8.12.0", + "eslint": "^8.13.0", "prettier": "^2.6.2", "typescript": "~3.9.10" } diff --git a/packages/@jsii/java-runtime/package.json b/packages/@jsii/java-runtime/package.json index 4de9935178..4dfb2a8b5b 100644 --- a/packages/@jsii/java-runtime/package.json +++ b/packages/@jsii/java-runtime/package.json @@ -33,7 +33,7 @@ }, "devDependencies": { "@jsii/runtime": "^0.0.0", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "jsii-build-tools": "^0.0.0", "typescript": "~3.9.10" } diff --git a/packages/@jsii/kernel/package.json b/packages/@jsii/kernel/package.json index cafd88ab1f..29ac834574 100644 --- a/packages/@jsii/kernel/package.json +++ b/packages/@jsii/kernel/package.json @@ -40,9 +40,9 @@ "@scope/jsii-calc-lib": "^0.0.0", "@types/fs-extra": "^9.0.13", "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "@types/tar": "^6.1.1", - "eslint": "^8.12.0", + "eslint": "^8.13.0", "jest": "^27.5.1", "jest-expect-message": "^1.0.2", "jsii-build-tools": "^0.0.0", diff --git a/packages/@jsii/python-runtime/build-tools/deps.ts b/packages/@jsii/python-runtime/build-tools/deps.ts index 8646a311f3..637f71f9ed 100644 --- a/packages/@jsii/python-runtime/build-tools/deps.ts +++ b/packages/@jsii/python-runtime/build-tools/deps.ts @@ -6,7 +6,11 @@ import { venv, runCommand } from './_constants'; const python = join(venv.bin, 'python'); -runCommand('python3', ['-m', 'venv', venv.root]); +// On Windows, there is usually no python3.exe (the GitHub action workers will have a python3 +// shim, but using this actually results in a WinError with Python 3.7 and 3.8 where venv will +// fail to copy the python binary if it's not invoked as python.exe). More on this particular +// issue can be read here: https://bugs.python.org/issue43749 +runCommand(process.platform === 'win32' ? 'python' : 'python3', ['-m', 'venv', venv.root]); const env = { ...process.env, diff --git a/packages/@jsii/python-runtime/pyproject.toml b/packages/@jsii/python-runtime/pyproject.toml index 12bd6ac191..bb3a114b3c 100644 --- a/packages/@jsii/python-runtime/pyproject.toml +++ b/packages/@jsii/python-runtime/pyproject.toml @@ -1,9 +1,9 @@ [build-system] -requires = ["pip~=20.2", "setuptools~=50.3", "wheel~=0.35"] +requires = ["pip~=22.0", "setuptools~=62.1", "wheel~=0.37"] build-backend = 'setuptools.build_meta' [tool.black] -target-version = ['py36', 'py37', 'py38'] +target-version = ['py37', 'py38', 'py39', 'py310'] include = '\.pyi?$' exclude = '\.(git|mypy_cache|env)' diff --git a/packages/@jsii/python-runtime/requirements.txt b/packages/@jsii/python-runtime/requirements.txt index 19a7bcad39..35bb021571 100644 --- a/packages/@jsii/python-runtime/requirements.txt +++ b/packages/@jsii/python-runtime/requirements.txt @@ -1,11 +1,9 @@ black~=22.3 mypy==0.812 -pip~=21.3 ; python_version < '3.7' -pip~=22.0 ; python_version >= '3.7' -pytest~=7.0 ; python_version < '3.7' -pytest~=7.1 ; python_version >= '3.7' +pip~=22.0 +pytest~=7.1 pytest-mypy~=0.9 -setuptools~=59.6 +setuptools~=62.1 wheel~=0.37 -e . diff --git a/packages/@jsii/python-runtime/setup.py b/packages/@jsii/python-runtime/setup.py index e61844806e..43c088ce50 100644 --- a/packages/@jsii/python-runtime/setup.py +++ b/packages/@jsii/python-runtime/setup.py @@ -31,23 +31,21 @@ }, install_requires=[ "attrs~=21.2", - "cattrs~=1.0.0 ; python_version < '3.7'", - "cattrs>=1.8,<22.2 ; python_version >= '3.7'", - "importlib_resources ; python_version < '3.7'", + "cattrs>=1.8,<22.2", "python-dateutil", "typing_extensions>=3.7,<5.0", ], - python_requires="~=3.6", + python_requires="~=3.7", classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Topic :: Software Development :: Libraries", "Topic :: Utilities", "Typing :: Typed", diff --git a/packages/@jsii/runtime/package.json b/packages/@jsii/runtime/package.json index d62c8c4ac2..1709646078 100644 --- a/packages/@jsii/runtime/package.json +++ b/packages/@jsii/runtime/package.json @@ -42,8 +42,8 @@ "@scope/jsii-calc-base": "^0.0.0", "@scope/jsii-calc-lib": "^0.0.0", "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", - "eslint": "^8.12.0", + "@types/node": "^12.20.48", + "eslint": "^8.13.0", "jest": "^27.5.1", "jsii-build-tools": "^0.0.0", "jsii-calc": "^3.20.120", @@ -51,7 +51,7 @@ "source-map-loader": "^3.0.1", "ts-jest": "^27.1.4", "typescript": "~3.9.10", - "webpack": "^5.71.0", + "webpack": "^5.72.0", "webpack-cli": "^4.9.2" } } diff --git a/packages/@jsii/spec/package.json b/packages/@jsii/spec/package.json index eade316882..d953b5f687 100644 --- a/packages/@jsii/spec/package.json +++ b/packages/@jsii/spec/package.json @@ -35,8 +35,8 @@ }, "devDependencies": { "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", - "eslint": "^8.12.0", + "@types/node": "^12.20.48", + "eslint": "^8.13.0", "jest": "^27.5.1", "jsii-build-tools": "^0.0.0", "prettier": "^2.6.2", diff --git a/packages/@scope/jsii-calc-base-of-base/package.json b/packages/@scope/jsii-calc-base-of-base/package.json index 55627d2f54..0f706a084c 100644 --- a/packages/@scope/jsii-calc-base-of-base/package.json +++ b/packages/@scope/jsii-calc-base-of-base/package.json @@ -30,7 +30,7 @@ "test:update": "npm run build && UPDATE_DIFF=1 npm run test" }, "devDependencies": { - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", diff --git a/packages/@scope/jsii-calc-base/package.json b/packages/@scope/jsii-calc-base/package.json index 9352f4435c..e696356aca 100644 --- a/packages/@scope/jsii-calc-base/package.json +++ b/packages/@scope/jsii-calc-base/package.json @@ -35,7 +35,7 @@ "@scope/jsii-calc-base-of-base": "^2.1.1" }, "devDependencies": { - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", diff --git a/packages/@scope/jsii-calc-lib/package.json b/packages/@scope/jsii-calc-lib/package.json index eb0f3a1a53..eb4be83ee7 100644 --- a/packages/@scope/jsii-calc-lib/package.json +++ b/packages/@scope/jsii-calc-lib/package.json @@ -39,7 +39,7 @@ "@scope/jsii-calc-base-of-base": "^2.1.1" }, "devDependencies": { - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", diff --git a/packages/codemaker/package.json b/packages/codemaker/package.json index 49ba8c09f5..00b0dea6b2 100644 --- a/packages/codemaker/package.json +++ b/packages/codemaker/package.json @@ -38,8 +38,8 @@ "devDependencies": { "@types/fs-extra": "^9.0.13", "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", - "eslint": "^8.12.0", + "@types/node": "^12.20.48", + "eslint": "^8.13.0", "jest": "^27.5.1", "prettier": "^2.6.2", "typescript": "~3.9.10" diff --git a/packages/jsii-calc/package.json b/packages/jsii-calc/package.json index a3ddebb5d3..d0d11f9a5c 100644 --- a/packages/jsii-calc/package.json +++ b/packages/jsii-calc/package.json @@ -51,8 +51,8 @@ "@scope/jsii-calc-lib": "^0.0.0" }, "devDependencies": { - "@types/node": "^12.20.47", - "eslint": "^8.12.0", + "@types/node": "^12.20.48", + "eslint": "^8.13.0", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", "jsii-rosetta": "^0.0.0", diff --git a/packages/jsii-config/package.json b/packages/jsii-config/package.json index 520bd55728..be7ddf7ad7 100644 --- a/packages/jsii-config/package.json +++ b/packages/jsii-config/package.json @@ -21,9 +21,9 @@ "devDependencies": { "@types/inquirer": "^8.2.1", "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "@types/yargs": "^17.0.10", - "eslint": "^8.12.0", + "eslint": "^8.13.0", "jest": "^27.5.1", "jest-expect-message": "^1.0.2", "prettier": "^2.6.2", diff --git a/packages/jsii-diff/package.json b/packages/jsii-diff/package.json index 16c68444a6..ac76318c37 100644 --- a/packages/jsii-diff/package.json +++ b/packages/jsii-diff/package.json @@ -37,16 +37,16 @@ "@jsii/spec": "^0.0.0", "fs-extra": "^9.1.0", "jsii-reflect": "^0.0.0", - "log4js": "^6.4.4", + "log4js": "^6.4.5", "typescript": "~3.9.10", "yargs": "^16.2.0" }, "devDependencies": { "@types/fs-extra": "^9.0.13", "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "@types/tar-fs": "^2.0.1", - "eslint": "^8.12.0", + "eslint": "^8.13.0", "jest": "^27.5.1", "jest-expect-message": "^1.0.2", "jsii": "^0.0.0", diff --git a/packages/jsii-pacmak/lib/index.ts b/packages/jsii-pacmak/lib/index.ts index 8f7dea3b30..b4b34d571b 100644 --- a/packages/jsii-pacmak/lib/index.ts +++ b/packages/jsii-pacmak/lib/index.ts @@ -1,5 +1,7 @@ import { TypeSystem } from 'jsii-reflect'; import { Rosetta, UnknownSnippetMode } from 'jsii-rosetta'; +import { resolve } from 'path'; +import { cwd } from 'process'; import * as logging from './logging'; import { findJsiiModules, updateAllNpmIgnores } from './npm-modules'; @@ -57,8 +59,11 @@ export async function pacmak({ } if (outputDirectory) { + // Ensure this is consistently interpreted as relative to cwd(). This is transparent for absolute + // paths, as those would be returned unmodified. + const absoluteOutputDirectory = resolve(cwd(), outputDirectory); for (const mod of modulesToPackageFlat) { - mod.outputDirectory = outputDirectory; + mod.outputDirectory = absoluteOutputDirectory; } } else if (updateNpmIgnoreFiles) { // if outdir is coming from package.json, verify it is excluded by .npmignore. if it is explicitly diff --git a/packages/jsii-pacmak/lib/targets/go/documentation.ts b/packages/jsii-pacmak/lib/targets/go/documentation.ts index 497878f2b5..99291ab226 100644 --- a/packages/jsii-pacmak/lib/targets/go/documentation.ts +++ b/packages/jsii-pacmak/lib/targets/go/documentation.ts @@ -75,6 +75,22 @@ export class Documentation { } } + public emitReadme(moduleFqn: string, readme: string, directory: string) { + const goReadme = this.rosetta.translateSnippetsInMarkdown( + { api: 'moduleReadme', moduleFqn }, + readme, + TargetLanguage.GO, + false, + ); + + const readmeFile = `${directory}/README.md`; + this.code.openFile(readmeFile); + for (const line of goReadme.split('\n')) { + this.code.line(line); + } + this.code.closeFile(readmeFile); + } + private emitComment(text = '') { const lines = text.trim().split('\n'); diff --git a/packages/jsii-pacmak/lib/targets/go/package.ts b/packages/jsii-pacmak/lib/targets/go/package.ts index d5acbe5972..36c86198b3 100644 --- a/packages/jsii-pacmak/lib/targets/go/package.ts +++ b/packages/jsii-pacmak/lib/targets/go/package.ts @@ -1,5 +1,10 @@ import { CodeMaker } from 'codemaker'; -import { Assembly, Type, Submodule as JsiiSubmodule } from 'jsii-reflect'; +import { + Assembly, + ModuleLike as JsiiModuleLike, + Type, + Submodule as JsiiSubmodule, +} from 'jsii-reflect'; import { basename, dirname, join } from 'path'; import * as semver from 'semver'; @@ -42,10 +47,10 @@ export abstract class Package { public readonly types: GoType[]; private readonly embeddedTypes = new Map(); + private readonly readmeFile?: ReadmeFile; public constructor( - private readonly typeSpec: readonly Type[], - private readonly submoduleSpec: readonly JsiiSubmodule[], + private readonly jsiiModule: JsiiModuleLike, public readonly packageName: string, public readonly filePath: string, public readonly moduleName: string, @@ -56,11 +61,11 @@ export abstract class Package { this.directory = filePath; this.file = `${this.directory}/${packageName}.go`; this.root = root ?? this; - this.submodules = this.submoduleSpec.map( + this.submodules = this.jsiiModule.submodules.map( (sm) => new InternalPackage(this.root, this, sm), ); - this.types = this.typeSpec.map((type: Type): GoType => { + this.types = this.jsiiModule.types.map((type: Type): GoType => { if (type.isInterfaceType() && type.datatype) { return new Struct(this, type); } else if (type.isInterfaceType()) { @@ -74,6 +79,14 @@ export abstract class Package { `Type: ${type.name} with kind ${type.kind} is not a supported type`, ); }); + + if (this.jsiiModule.readme?.markdown) { + this.readmeFile = new ReadmeFile( + this.jsiiModule.fqn, + this.jsiiModule.readme.markdown, + this.directory, + ); + } } /* @@ -121,6 +134,8 @@ export abstract class Package { this.emitTypes(context); code.closeFile(this.file); + this.readmeFile?.emit(context); + this.emitGoInitFunction(context); this.emitSubmodules(context); @@ -318,7 +333,6 @@ export abstract class Package { export class RootPackage extends Package { public readonly assembly: Assembly; public readonly version: string; - private readonly readme?: ReadmeFile; private readonly versionFile: VersionFile; // This cache of root packages is shared across all root packages derived created by this one (via dependencies). @@ -334,14 +348,7 @@ export class RootPackage extends Package { const moduleName = goConfig.moduleName ?? ''; const version = `${assembly.version}${goConfig.versionSuffix ?? ''}`; - super( - assembly.types, - assembly.submodules, - packageName, - filePath, - moduleName, - version, - ); + super(assembly, packageName, filePath, moduleName, version); this.rootPackageCache = rootPackageCache; this.rootPackageCache.set(assembly.name, this); @@ -349,19 +356,11 @@ export class RootPackage extends Package { this.assembly = assembly; this.version = version; this.versionFile = new VersionFile(this.version); - - if (this.assembly.readme?.markdown) { - this.readme = new ReadmeFile( - this.packageName, - this.assembly.readme.markdown, - ); - } } public emit(context: EmitContext): void { super.emit(context); this.emitJsiiPackage(context); - this.readme?.emit(context); this.emitGomod(context.code); this.versionFile.emit(context.code); @@ -517,15 +516,7 @@ export class InternalPackage extends Package { const filePath = parent === root ? packageName : `${parent.filePath}/${packageName}`; - super( - assembly.types, - assembly.submodules, - packageName, - filePath, - root.moduleName, - root.version, - root, - ); + super(assembly, packageName, filePath, root.moduleName, root.version, root); this.parent = parent; } diff --git a/packages/jsii-pacmak/lib/targets/go/readme-file.ts b/packages/jsii-pacmak/lib/targets/go/readme-file.ts index 2ad5b4c21c..c8a94b3661 100644 --- a/packages/jsii-pacmak/lib/targets/go/readme-file.ts +++ b/packages/jsii-pacmak/lib/targets/go/readme-file.ts @@ -1,44 +1,16 @@ -import { join } from 'path'; - import { EmitContext } from './emit-context'; -// import { Translation } from 'jsii-rosetta'; -// import { INCOMPLETE_DISCLAIMER_COMPILING, INCOMPLETE_DISCLAIMER_NONCOMPILING } from '..'; export class ReadmeFile { public constructor( private readonly packageName: string, private readonly document: string, + private readonly directory: string, ) {} - public emit({ code /*, rosetta */ }: EmitContext) { - const nameParts = this.packageName.split('.'); - const file = join( - ...nameParts.slice(0, nameParts.length - 11), - 'README.md', - ); - - code.openFile(file); - const translated = this.document; // rosetta.translateSnippetsInMarkdown(this.document, 'go', prependDisclaimer); - for (const line of translated.split('\n')) { - code.line(line); - } - code.closeFile(file); - } - - /* - function prependDisclaimer(translation: Translation) { - const source = addDisclaimerIfNeeded(); - return { language: translation.language, source }; - - function addDisclaimerIfNeeded(): string { - if (translation.didCompile && INCOMPLETE_DISCLAIMER_COMPILING) { - return `// ${INCOMPLETE_DISCLAIMER_COMPILING}\n\n${translation.source}`; - } - if (!translation.didCompile && INCOMPLETE_DISCLAIMER_NONCOMPILING) { - return `// ${INCOMPLETE_DISCLAIMER_NONCOMPILING}\n\n${translation.source}`; - } - return translation.source; + public emit({ documenter }: EmitContext) { + if (!this.document) { + return; } + documenter.emitReadme(this.packageName, this.document, this.directory); } - */ } diff --git a/packages/jsii-pacmak/lib/targets/go/types/type-member.ts b/packages/jsii-pacmak/lib/targets/go/types/type-member.ts index 3305967997..e81b03fe8c 100644 --- a/packages/jsii-pacmak/lib/targets/go/types/type-member.ts +++ b/packages/jsii-pacmak/lib/targets/go/types/type-member.ts @@ -90,9 +90,11 @@ export class GoProperty implements GoTypeMember { ? `*${this.returnType}` : this.returnType; + const requiredOrOptional = this.property.optional ? 'optional' : 'required'; + // Adds json and yaml tags for easy deserialization code.line( - `${this.name} ${memberType} \`json:"${this.property.name}" yaml:"${this.property.name}"\``, + `${this.name} ${memberType} \`field:"${requiredOrOptional}" json:"${this.property.name}" yaml:"${this.property.name}"\``, ); // TODO add newline if not the last member } diff --git a/packages/jsii-pacmak/lib/targets/python.ts b/packages/jsii-pacmak/lib/targets/python.ts index 97413da2ee..8b560e27a5 100644 --- a/packages/jsii-pacmak/lib/targets/python.ts +++ b/packages/jsii-pacmak/lib/targets/python.ts @@ -64,7 +64,11 @@ export default class Python extends Target { venv, process.platform === 'win32' ? 'Scripts' : 'bin', ); - await shell('python3', [ + // On Windows, there is usually no python3.exe (the GitHub action workers will have a python3 + // shim, but using this actually results in a WinError with Python 3.7 and 3.8 where venv will + // fail to copy the python binary if it's not invoked as python.exe). More on this particular + // issue can be read here: https://bugs.python.org/issue43749 + await shell(process.platform === 'win32' ? 'python' : 'python3', [ '-m', 'venv', '--system-site-packages', // Allow using globally installed packages (saves time & disk space) @@ -2000,7 +2004,7 @@ class Package { package_dir: { '': 'src' }, packages: modules.map((m) => m.pythonName), package_data: packageData, - python_requires: '>=3.6', + python_requires: '~=3.7', install_requires: [ `jsii${toPythonVersionRange(`^${jsiiVersionSimple}`)}`, 'publication>=0.0.3', @@ -2012,10 +2016,10 @@ class Package { 'Operating System :: OS Independent', 'Programming Language :: JavaScript', 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Typing :: Typed', ], scripts, diff --git a/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt b/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt index 23614b89c5..93a4104fc7 100644 --- a/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt +++ b/packages/jsii-pacmak/lib/targets/python/requirements-dev.txt @@ -3,8 +3,7 @@ # be installed in the virtual environment used for building the distribution # package (wheel, sdist), but not declared as build-system dependencies. -setuptools~=59.6.0 # build-system +setuptools~=62.1.0 # build-system wheel~=0.37.1 # build-system -twine~=3.8.0 ; python_version < '3.7' -twine~=4.0.0 ; python_version >= '3.7' +twine~=4.0.0 diff --git a/packages/jsii-pacmak/package.json b/packages/jsii-pacmak/package.json index 353c1f469d..6d386dbc04 100644 --- a/packages/jsii-pacmak/package.json +++ b/packages/jsii-pacmak/package.json @@ -46,7 +46,7 @@ "fs-extra": "^9.1.0", "jsii-reflect": "^0.0.0", "jsii-rosetta": "^0.0.0", - "semver": "^7.3.5", + "semver": "^7.3.7", "spdx-license-list": "^6.5.0", "xmlbuilder": "^15.1.1", "yargs": "^16.2.0" @@ -60,9 +60,9 @@ "@types/commonmark": "^0.27.5", "@types/fs-extra": "^9.0.13", "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "@types/semver": "^7.3.9", - "eslint": "^8.12.0", + "eslint": "^8.13.0", "jest": "^27.5.1", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", diff --git a/packages/jsii-pacmak/test/build-test.sh b/packages/jsii-pacmak/test/build-test.sh index 2c2bef47be..ab42ff1464 100755 --- a/packages/jsii-pacmak/test/build-test.sh +++ b/packages/jsii-pacmak/test/build-test.sh @@ -7,11 +7,12 @@ cd $(dirname $0) # # The following list of packages must be toposorted, like a monorepo # manager would order the individual builds. +pacmak=${PWD}/../bin/jsii-pacmak packagedirs="\ - ../../@scope/jsii-calc-base-of-base \ - ../../@scope/jsii-calc-base \ - ../../@scope/jsii-calc-lib \ - ../../jsii-calc \ + ${PWD}/../../@scope/jsii-calc-base-of-base \ + ${PWD}/../../@scope/jsii-calc-base \ + ${PWD}/../../@scope/jsii-calc-lib \ + ${PWD}/../../jsii-calc \ " clean_dists() { for dir in $packagedirs; do rm -rf $dir/dist; done @@ -24,15 +25,28 @@ final_cleanup() { trap final_cleanup EXIT # Prepare Python venv to avoid depending on system stuff +case "${OSTYPE}" in +"msys" | "cygwin" | "win32") + # On Windows, there is usually no python3.exe (the GitHub action workers will have a python3 + # shim, but using this actually results in a WinError with Python 3.7 and 3.8 where venv will + # fail to copy the python binary if it's not invoked as python.exe). More on this particular + # issue can be read here: https://bugs.python.org/issue43749 + PYTHON='python' + ;; +*) + PYTHON='python3' + ;; +esac + venv="${outdir}/.env" -python3 -m venv ${venv} +${PYTHON} -m venv ${venv} if [ -f ${venv}/bin/activate ]; then . ${venv}/bin/activate else # Hello Windows! . ${venv}/Scripts/activate fi -python3 -m pip install --upgrade pip~=20.2 twine~=3.2 +${PYTHON} -m pip install --upgrade pip~=22.0 twine~=4.0 # Provision a specific NuGet package cache NUGET_CACHE=${outdir}/.nuget/packages @@ -41,16 +55,29 @@ OPTS="--dotnet-nuget-global-packages-folder=${NUGET_CACHE}" # Single target, recursive build to a certain location clean_dists echo "Testing SINGLE TARGET, RECURSIVE build." -../bin/jsii-pacmak ${OPTS} -v -o ${outdir} --recurse ../../jsii-calc +( + # Run from the ${outdir} and use a relative --outdir value... + calcdir=${PWD}/../../jsii-calc + cd ${outdir} + ${pacmak} ${OPTS} -v -o dist --recurse ${calcdir} +) +for tgt in dotnet go java python; do + # Ensure the target artifacts have been created as expected... + if [ ! -d "${outdir}/dist/${tgt}" ]; then + echo "Assertion Failure: Expected a ${tgt} directory to exist in ${outdir}, but none found..." + exit 1 + fi +done +rm -rf "${outdir}/dist" # Multiple targets, build one-by-one into own directory clean_dists echo "Testing ONE-BY-ONE build." for dir in $packagedirs; do - ../bin/jsii-pacmak ${OPTS} -v $dir + ${pacmak} ${OPTS} -v $dir done # Multiple targets, build all at once into own directory clean_dists echo "Testing ALL-AT-ONCE build." -../bin/jsii-pacmak ${OPTS} -v --no-parallel $packagedirs +${pacmak} ${OPTS} -v --no-parallel $packagedirs diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.ts.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.ts.snap index 07b399c846..f6f9375dec 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.ts.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/examples.test.ts.snap @@ -421,9 +421,9 @@ import ( ) type Baz struct { - Foo *float64 \`json:"foo" yaml:"foo"\` - Bar *string \`json:"bar" yaml:"bar"\` - Baz *bool \`json:"baz" yaml:"baz"\` + Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` + Bar *string \`field:"optional" json:"bar" yaml:"bar"\` + Baz *bool \`field:"required" json:"baz" yaml:"baz"\` } type Consumer interface { @@ -445,12 +445,12 @@ func Consumer_ConsumeBaz(baz *Baz) { } type Foo struct { - Foo *float64 \`json:"foo" yaml:"foo"\` + Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` } type FooBar struct { - Foo *float64 \`json:"foo" yaml:"foo"\` - Bar *string \`json:"bar" yaml:"bar"\` + Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` + Bar *string \`field:"optional" json:"bar" yaml:"bar"\` } @@ -1147,7 +1147,7 @@ testpkg.FooBar=example.test.demo.FooBar exports[`diamond-struct-parameter.ts: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=59.6.0", "wheel~=0.37.1"] +requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" `; @@ -1187,7 +1187,7 @@ kwargs = json.loads( "py.typed" ] }, - "python_requires": ">=3.6", + "python_requires": "~=3.7", "install_requires": [ "jsii<0.0.1", "publication>=0.0.3" @@ -1197,10 +1197,10 @@ kwargs = json.loads( "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Typing :: Typed", "License :: OSI Approved" ], @@ -1796,7 +1796,7 @@ func (n *jsiiProxy_Namespace1) Foo() { } type Namespace1_Foo struct { - Bar *string \`json:"bar" yaml:"bar"\` + Bar *string \`field:"required" json:"bar" yaml:"bar"\` } type Namespace1_IBar interface { @@ -2447,7 +2447,7 @@ testpkg.Namespace2.Foo.Final=example.test.demo.Namespace2$Foo.Final exports[`nested-types.ts: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=59.6.0", "wheel~=0.37.1"] +requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" `; @@ -2487,7 +2487,7 @@ kwargs = json.loads( "py.typed" ] }, - "python_requires": ">=3.6", + "python_requires": "~=3.7", "install_requires": [ "jsii<0.0.1", "publication>=0.0.3" @@ -2497,10 +2497,10 @@ kwargs = json.loads( "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Typing :: Typed", "License :: OSI Approved" ], diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.ts.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.ts.snap index 721d8977b2..92839c496f 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.ts.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/prerelease-identifiers.test.ts.snap @@ -416,7 +416,7 @@ foo exports[`foo@1.2.3 depends on bar@^2.0.0-rc.42: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=59.6.0", "wheel~=0.37.1"] +requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" `; @@ -452,7 +452,7 @@ kwargs = json.loads( "foo@1.2.3.jsii.tgz" ] }, - "python_requires": ">=3.6", + "python_requires": "~=3.7", "install_requires": [ "bar>=2.0.0.rc42, <3.0.0", "jsii>=1337.42.1337, <1338.0.0", @@ -463,10 +463,10 @@ kwargs = json.loads( "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Typing :: Typed" ], "scripts": [] @@ -925,7 +925,7 @@ foo exports[`foo@1.2.3 depends on bar@^4.5.6-pre.1337: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=59.6.0", "wheel~=0.37.1"] +requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" `; @@ -961,7 +961,7 @@ kwargs = json.loads( "foo@1.2.3.jsii.tgz" ] }, - "python_requires": ">=3.6", + "python_requires": "~=3.7", "install_requires": [ "bar>=4.5.6.dev1337, <5.0.0", "jsii>=1337.42.1337, <1338.0.0", @@ -972,10 +972,10 @@ kwargs = json.loads( "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Typing :: Typed" ], "scripts": [] @@ -1414,7 +1414,7 @@ foo exports[`foo@2.0.0-rc.42: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=59.6.0", "wheel~=0.37.1"] +requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" `; @@ -1450,7 +1450,7 @@ kwargs = json.loads( "foo@2.0.0-rc.42.jsii.tgz" ] }, - "python_requires": ">=3.6", + "python_requires": "~=3.7", "install_requires": [ "jsii>=1337.42.1337, <1338.0.0", "publication>=0.0.3" @@ -1460,10 +1460,10 @@ kwargs = json.loads( "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Typing :: Typed" ], "scripts": [] @@ -1900,7 +1900,7 @@ foo exports[`foo@4.5.6-pre.1337: /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=59.6.0", "wheel~=0.37.1"] +requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" `; @@ -1936,7 +1936,7 @@ kwargs = json.loads( "foo@4.5.6-pre.1337.jsii.tgz" ] }, - "python_requires": ">=3.6", + "python_requires": "~=3.7", "install_requires": [ "jsii>=1337.42.1337, <1338.0.0", "publication>=0.0.3" @@ -1946,10 +1946,10 @@ kwargs = json.loads( "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Typing :: Typed" ], "scripts": [] diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap index d8c02202d6..634e7178da 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-go.test.ts.snap @@ -296,8 +296,8 @@ func (b *jsiiProxy_Base) TypeName() interface{} { } type BaseProps struct { - Foo scopejsiicalcbaseofbase.Very \`json:"foo" yaml:"foo"\` - Bar *string \`json:"bar" yaml:"bar"\` + Foo scopejsiicalcbaseofbase.Very \`field:"required" json:"foo" yaml:"foo"\` + Bar *string \`field:"required" json:"bar" yaml:"bar"\` } type IBaseInterface interface { @@ -820,7 +820,7 @@ func (v *jsiiProxy_Very) Hey() *float64 { } type VeryBaseProps struct { - Foo Very \`json:"foo" yaml:"foo"\` + Foo Very \`field:"required" json:"foo" yaml:"foo"\` } @@ -883,7 +883,8 @@ exports[`Generated code for "@scope/jsii-calc-lib": / 1`] = ` ┗━ 📁 scopejsiicalclib ┣━ 📁 customsubmodulename ┃ ┣━ 📄 customsubmodulename.go - ┃ ┗━ 📄 customsubmodulename.init.go + ┃ ┣━ 📄 customsubmodulename.init.go + ┃ ┗━ 📄 README.md ┣━ 📄 go.mod ┣━ 📁 internal ┃ ┗━ 📄 types.go @@ -1108,6 +1109,13 @@ Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. `; +exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/README.md 1`] = ` +# Submodule Readme + +This is a submodule readme. + +`; + exports[`Generated code for "@scope/jsii-calc-lib": /go/scopejsiicalclib/customsubmodulename/customsubmodulename.go 1`] = ` package customsubmodulename @@ -1202,15 +1210,15 @@ func NewNestingClass_NestedClass_Override(n NestingClass_NestedClass) { // Deprecated. type NestingClass_NestedStruct struct { // Deprecated. - Name *string \`json:"name" yaml:"name"\` + Name *string \`field:"required" json:"name" yaml:"name"\` } // Deprecated. type ReflectableEntry struct { // Deprecated. - Key *string \`json:"key" yaml:"key"\` + Key *string \`field:"required" json:"key" yaml:"key"\` // Deprecated. - Value interface{} \`json:"value" yaml:"value"\` + Value interface{} \`field:"required" json:"value" yaml:"value"\` } // Deprecated. @@ -1451,17 +1459,17 @@ func (b *jsiiProxy_BaseFor2647) Foo(obj jcb.IBaseInterface) { // Deprecated. type DiamondLeft struct { // Deprecated. - HoistedTop *string \`json:"hoistedTop" yaml:"hoistedTop"\` + HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\` // Deprecated. - Left *float64 \`json:"left" yaml:"left"\` + Left *float64 \`field:"optional" json:"left" yaml:"left"\` } // Deprecated. type DiamondRight struct { // Deprecated. - HoistedTop *string \`json:"hoistedTop" yaml:"hoistedTop"\` + HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\` // Deprecated. - Right *bool \`json:"right" yaml:"right"\` + Right *bool \`field:"optional" json:"right" yaml:"right"\` } // Check that enums from \\@scoped packages can be references. @@ -1557,12 +1565,12 @@ func (i *jsiiProxy_IThreeLevelsInterface) Baz() { type MyFirstStruct struct { // An awesome number value. // Deprecated. - Anumber *float64 \`json:"anumber" yaml:"anumber"\` + Anumber *float64 \`field:"required" json:"anumber" yaml:"anumber"\` // A string value. // Deprecated. - Astring *string \`json:"astring" yaml:"astring"\` + Astring *string \`field:"required" json:"astring" yaml:"astring"\` // Deprecated. - FirstOptional *[]*string \`json:"firstOptional" yaml:"firstOptional"\` + FirstOptional *[]*string \`field:"optional" json:"firstOptional" yaml:"firstOptional"\` } // Represents a concrete number. @@ -1806,11 +1814,11 @@ func (o *jsiiProxy_Operation) TypeName() interface{} { type StructWithOnlyOptionals struct { // The first optional! // Deprecated. - Optional1 *string \`json:"optional1" yaml:"optional1"\` + Optional1 *string \`field:"optional" json:"optional1" yaml:"optional1"\` // Deprecated. - Optional2 *float64 \`json:"optional2" yaml:"optional2"\` + Optional2 *float64 \`field:"optional" json:"optional2" yaml:"optional2"\` // Deprecated. - Optional3 *bool \`json:"optional3" yaml:"optional3"\` + Optional3 *bool \`field:"optional" json:"optional3" yaml:"optional3"\` } @@ -2050,7 +2058,8 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┃ ┗━ 📄 types.go ┃ ┣━ 📁 isolated ┃ ┃ ┣━ 📄 isolated.go - ┃ ┃ ┗━ 📄 isolated.init.go + ┃ ┃ ┣━ 📄 isolated.init.go + ┃ ┃ ┗━ 📄 README.md ┃ ┣━ 📁 nestedsubmodule ┃ ┃ ┣━ 📁 deeplynested ┃ ┃ ┃ ┣━ 📄 deeplynested.go @@ -2062,6 +2071,7 @@ exports[`Generated code for "jsii-calc": / 1`] = ` ┃ ┣━ 📁 param ┃ ┃ ┣━ 📄 param.go ┃ ┃ ┗━ 📄 param.init.go + ┃ ┣━ 📄 README.md ┃ ┣━ 📁 returnsparam ┃ ┃ ┣━ 📄 returnsparam.go ┃ ┃ ┗━ 📄 returnsparam.init.go @@ -2290,25 +2300,23 @@ This library is used to demonstrate and test the features of JSII First, create a calculator: -\`\`\`ts -const calculator = new calc.Calculator(); +\`\`\`go +calculator := calc.NewCalculator() \`\`\` Then call some operations: - -\`\`\`ts fixture=with-calculator -calculator.add(10); +\`\`\`go +calculator.add(jsii.Number(10)) \`\`\` ## Code Samples -\`\`\`ts +\`\`\`go /* This is totes a magic comment in here, just you wait! */ -const foo = 'bar'; +foo := "bar" \`\`\` - `; exports[`Generated code for "jsii-calc": /go/jsiicalc/cdk16625/cdk16625.go 1`] = ` @@ -2941,7 +2949,7 @@ func (j *jsiiProxy_Foo) SetBar(val *string) { } type Hello struct { - Foo *float64 \`json:"foo" yaml:"foo"\` + Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` } @@ -2980,7 +2988,7 @@ package interfaceinnamespaceonlyinterface type Hello struct { - Foo *float64 \`json:"foo" yaml:"foo"\` + Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` } @@ -4862,14 +4870,14 @@ type CalculatorProps struct { // The initial value of the calculator. // // NOTE: Any number works here, it's fine. - InitialValue *float64 \`json:"initialValue" yaml:"initialValue"\` + InitialValue *float64 \`field:"optional" json:"initialValue" yaml:"initialValue"\` // The maximum value the calculator can store. - MaximumValue *float64 \`json:"maximumValue" yaml:"maximumValue"\` + MaximumValue *float64 \`field:"optional" json:"maximumValue" yaml:"maximumValue"\` } type ChildStruct982 struct { - Foo *string \`json:"foo" yaml:"foo"\` - Bar *float64 \`json:"bar" yaml:"bar"\` + Foo *string \`field:"required" json:"foo" yaml:"foo"\` + Bar *float64 \`field:"required" json:"bar" yaml:"bar"\` } type ClassThatImplementsTheInternalInterface interface { @@ -5593,7 +5601,7 @@ func ConfusingToJackson_MakeStructInstance() *ConfusingToJacksonStruct { } type ConfusingToJacksonStruct struct { - UnionProperty interface{} \`json:"unionProperty" yaml:"unionProperty"\` + UnionProperty interface{} \`field:"optional" json:"unionProperty" yaml:"unionProperty"\` } type ConstructorPassesThisOut interface { @@ -6048,9 +6056,9 @@ func (c *jsiiProxy_ConsumersOfThisCrazyTypeSystem) ConsumeNonInternalInterface(o } type ContainerProps struct { - ArrayProp *[]*DummyObj \`json:"arrayProp" yaml:"arrayProp"\` - ObjProp *map[string]*DummyObj \`json:"objProp" yaml:"objProp"\` - RecordProp *map[string]*DummyObj \`json:"recordProp" yaml:"recordProp"\` + ArrayProp *[]*DummyObj \`field:"required" json:"arrayProp" yaml:"arrayProp"\` + ObjProp *map[string]*DummyObj \`field:"required" json:"objProp" yaml:"objProp"\` + RecordProp *map[string]*DummyObj \`field:"required" json:"recordProp" yaml:"recordProp"\` } // Verifies proper type handling through dynamic overrides. @@ -6399,58 +6407,58 @@ const ( // Deprecated: it just wraps a string. type DeprecatedStruct struct { // Deprecated: well, yeah. - ReadonlyProperty *string \`json:"readonlyProperty" yaml:"readonlyProperty"\` + ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` } // A struct which derives from another struct. type DerivedStruct struct { // An awesome number value. // Deprecated. - Anumber *float64 \`json:"anumber" yaml:"anumber"\` + Anumber *float64 \`field:"required" json:"anumber" yaml:"anumber"\` // A string value. // Deprecated. - Astring *string \`json:"astring" yaml:"astring"\` + Astring *string \`field:"required" json:"astring" yaml:"astring"\` // Deprecated. - FirstOptional *[]*string \`json:"firstOptional" yaml:"firstOptional"\` - AnotherRequired *time.Time \`json:"anotherRequired" yaml:"anotherRequired"\` - Bool *bool \`json:"bool" yaml:"bool"\` + FirstOptional *[]*string \`field:"optional" json:"firstOptional" yaml:"firstOptional"\` + AnotherRequired *time.Time \`field:"required" json:"anotherRequired" yaml:"anotherRequired"\` + Bool *bool \`field:"required" json:"bool" yaml:"bool"\` // An example of a non primitive property. - NonPrimitive DoubleTrouble \`json:"nonPrimitive" yaml:"nonPrimitive"\` + NonPrimitive DoubleTrouble \`field:"required" json:"nonPrimitive" yaml:"nonPrimitive"\` // This is optional. - AnotherOptional *map[string]scopejsiicalclib.NumericValue \`json:"anotherOptional" yaml:"anotherOptional"\` - OptionalAny interface{} \`json:"optionalAny" yaml:"optionalAny"\` - OptionalArray *[]*string \`json:"optionalArray" yaml:"optionalArray"\` + AnotherOptional *map[string]scopejsiicalclib.NumericValue \`field:"optional" json:"anotherOptional" yaml:"anotherOptional"\` + OptionalAny interface{} \`field:"optional" json:"optionalAny" yaml:"optionalAny"\` + OptionalArray *[]*string \`field:"optional" json:"optionalArray" yaml:"optionalArray"\` } type DiamondBottom struct { // Deprecated. - HoistedTop *string \`json:"hoistedTop" yaml:"hoistedTop"\` + HoistedTop *string \`field:"optional" json:"hoistedTop" yaml:"hoistedTop"\` // Deprecated. - Left *float64 \`json:"left" yaml:"left"\` + Left *float64 \`field:"optional" json:"left" yaml:"left"\` // Deprecated. - Right *bool \`json:"right" yaml:"right"\` - Bottom *time.Time \`json:"bottom" yaml:"bottom"\` + Right *bool \`field:"optional" json:"right" yaml:"right"\` + Bottom *time.Time \`field:"optional" json:"bottom" yaml:"bottom"\` } type DiamondInheritanceBaseLevelStruct struct { - BaseLevelProperty *string \`json:"baseLevelProperty" yaml:"baseLevelProperty"\` + BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` } type DiamondInheritanceFirstMidLevelStruct struct { - BaseLevelProperty *string \`json:"baseLevelProperty" yaml:"baseLevelProperty"\` - FirstMidLevelProperty *string \`json:"firstMidLevelProperty" yaml:"firstMidLevelProperty"\` + BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` + FirstMidLevelProperty *string \`field:"required" json:"firstMidLevelProperty" yaml:"firstMidLevelProperty"\` } type DiamondInheritanceSecondMidLevelStruct struct { - BaseLevelProperty *string \`json:"baseLevelProperty" yaml:"baseLevelProperty"\` - SecondMidLevelProperty *string \`json:"secondMidLevelProperty" yaml:"secondMidLevelProperty"\` + BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` + SecondMidLevelProperty *string \`field:"required" json:"secondMidLevelProperty" yaml:"secondMidLevelProperty"\` } type DiamondInheritanceTopLevelStruct struct { - BaseLevelProperty *string \`json:"baseLevelProperty" yaml:"baseLevelProperty"\` - FirstMidLevelProperty *string \`json:"firstMidLevelProperty" yaml:"firstMidLevelProperty"\` - SecondMidLevelProperty *string \`json:"secondMidLevelProperty" yaml:"secondMidLevelProperty"\` - TopLevelProperty *string \`json:"topLevelProperty" yaml:"topLevelProperty"\` + BaseLevelProperty *string \`field:"required" json:"baseLevelProperty" yaml:"baseLevelProperty"\` + FirstMidLevelProperty *string \`field:"required" json:"firstMidLevelProperty" yaml:"firstMidLevelProperty"\` + SecondMidLevelProperty *string \`field:"required" json:"secondMidLevelProperty" yaml:"secondMidLevelProperty"\` + TopLevelProperty *string \`field:"required" json:"topLevelProperty" yaml:"topLevelProperty"\` } // Verifies that null/undefined can be returned for optional collections. @@ -6788,7 +6796,7 @@ func (d *jsiiProxy_DoubleTrouble) Next() *float64 { } type DummyObj struct { - Example *string \`json:"example" yaml:"example"\` + Example *string \`field:"required" json:"example" yaml:"example"\` } // Ensures we can override a dynamic property that was inherited. @@ -7143,8 +7151,8 @@ func EraseUndefinedHashValues_Prop2IsUndefined() *map[string]interface{} { } type EraseUndefinedHashValuesOptions struct { - Option1 *string \`json:"option1" yaml:"option1"\` - Option2 *string \`json:"option2" yaml:"option2"\` + Option1 *string \`field:"optional" json:"option1" yaml:"option1"\` + Option2 *string \`field:"optional" json:"option2" yaml:"option2"\` } // Experimental. @@ -7240,7 +7248,7 @@ const ( // Experimental. type ExperimentalStruct struct { // Experimental. - ReadonlyProperty *string \`json:"readonlyProperty" yaml:"readonlyProperty"\` + ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` } type ExportedBaseClass interface { @@ -7288,8 +7296,8 @@ func NewExportedBaseClass_Override(e ExportedBaseClass, success *bool) { } type ExtendsInternalInterface struct { - Boom *bool \`json:"boom" yaml:"boom"\` - Prop *string \`json:"prop" yaml:"prop"\` + Boom *bool \`field:"required" json:"boom" yaml:"boom"\` + Prop *string \`field:"required" json:"prop" yaml:"prop"\` } type ExternalClass interface { @@ -7373,7 +7381,7 @@ const ( ) type ExternalStruct struct { - ReadonlyProperty *string \`json:"readonlyProperty" yaml:"readonlyProperty"\` + ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` } type FullCombo interface { @@ -7505,7 +7513,7 @@ func (g *jsiiProxy_GiveMeStructs) ReadFirstNumber(first *scopejsiicalclib.MyFirs // These are some arguments you can pass to a method. type Greetee struct { // The name of the greetee. - Name *string \`json:"name" yaml:"name"\` + Name *string \`field:"optional" json:"name" yaml:"name"\` } type GreetingAugmenter interface { @@ -8841,9 +8849,9 @@ func (j *jsiiProxy_ImplementsPrivateInterface) SetPrivate(val *string) { } type ImplictBaseOfBase struct { - Foo scopejsiicalcbaseofbase.Very \`json:"foo" yaml:"foo"\` - Bar *string \`json:"bar" yaml:"bar"\` - Goo *time.Time \`json:"goo" yaml:"goo"\` + Foo scopejsiicalcbaseofbase.Very \`field:"required" json:"foo" yaml:"foo"\` + Bar *string \`field:"required" json:"bar" yaml:"bar"\` + Goo *time.Time \`field:"required" json:"goo" yaml:"goo"\` } type InbetweenClass interface { @@ -10353,15 +10361,15 @@ func NewLevelOne_Override(l LevelOne, props *LevelOneProps) { } type LevelOne_PropBooleanValue struct { - Value *bool \`json:"value" yaml:"value"\` + Value *bool \`field:"required" json:"value" yaml:"value"\` } type LevelOne_PropProperty struct { - Prop *LevelOne_PropBooleanValue \`json:"prop" yaml:"prop"\` + Prop *LevelOne_PropBooleanValue \`field:"required" json:"prop" yaml:"prop"\` } type LevelOneProps struct { - Prop *LevelOne_PropProperty \`json:"prop" yaml:"prop"\` + Prop *LevelOne_PropProperty \`field:"required" json:"prop" yaml:"prop"\` } // jsii#298: show default values in sphinx documentation, and respect newlines. @@ -10369,7 +10377,7 @@ type LoadBalancedFargateServiceProps struct { // The container port of the application load balancer attached to your Fargate service. // // Corresponds to container port mapping. - ContainerPort *float64 \`json:"containerPort" yaml:"containerPort"\` + ContainerPort *float64 \`field:"optional" json:"containerPort" yaml:"containerPort"\` // The number of cpu units used by the task. // // Valid values, which determines your range of valid values for the memory parameter: @@ -10380,7 +10388,7 @@ type LoadBalancedFargateServiceProps struct { // 4096 (4 vCPU) - Available memory values: Between 8GB and 30GB in 1GB increments // // This default is set in the underlying FargateTaskDefinition construct. - Cpu *string \`json:"cpu" yaml:"cpu"\` + Cpu *string \`field:"optional" json:"cpu" yaml:"cpu"\` // The amount (in MiB) of memory used by the task. // // This field is required and you must use one of the following values, which determines your range of valid values @@ -10397,11 +10405,11 @@ type LoadBalancedFargateServiceProps struct { // Between 8GB and 30GB in 1GB increments - Available cpu values: 4096 (4 vCPU) // // This default is set in the underlying FargateTaskDefinition construct. - MemoryMiB *string \`json:"memoryMiB" yaml:"memoryMiB"\` + MemoryMiB *string \`field:"optional" json:"memoryMiB" yaml:"memoryMiB"\` // Determines whether the Application Load Balancer will be internet-facing. - PublicLoadBalancer *bool \`json:"publicLoadBalancer" yaml:"publicLoadBalancer"\` + PublicLoadBalancer *bool \`field:"optional" json:"publicLoadBalancer" yaml:"publicLoadBalancer"\` // Determines whether your Fargate Service will be assigned a public IP address. - PublicTasks *bool \`json:"publicTasks" yaml:"publicTasks"\` + PublicTasks *bool \`field:"optional" json:"publicTasks" yaml:"publicTasks"\` } type MethodNamedProperty interface { @@ -10789,7 +10797,7 @@ func NestedClassInstance_MakeInstance() customsubmodulename.NestingClass_NestedC type NestedStruct struct { // When provided, must be > 0. - NumberProp *float64 \`json:"numberProp" yaml:"numberProp"\` + NumberProp *float64 \`field:"required" json:"numberProp" yaml:"numberProp"\` } // Test fixture to verify that jsii modules can use the node standard library. @@ -10971,8 +10979,8 @@ func (n *jsiiProxy_NullShouldBeTreatedAsUndefined) VerifyPropertyIsUndefined() { } type NullShouldBeTreatedAsUndefinedData struct { - ArrayWithThreeElementsAndUndefinedAsSecondArgument *[]interface{} \`json:"arrayWithThreeElementsAndUndefinedAsSecondArgument" yaml:"arrayWithThreeElementsAndUndefinedAsSecondArgument"\` - ThisShouldBeUndefined interface{} \`json:"thisShouldBeUndefined" yaml:"thisShouldBeUndefined"\` + ArrayWithThreeElementsAndUndefinedAsSecondArgument *[]interface{} \`field:"required" json:"arrayWithThreeElementsAndUndefinedAsSecondArgument" yaml:"arrayWithThreeElementsAndUndefinedAsSecondArgument"\` + ThisShouldBeUndefined interface{} \`field:"optional" json:"thisShouldBeUndefined" yaml:"thisShouldBeUndefined"\` } // This allows us to test that a reference can be stored for objects that implement interfaces. @@ -11311,7 +11319,7 @@ func NewOptionalConstructorArgument_Override(o OptionalConstructorArgument, arg1 } type OptionalStruct struct { - Field *string \`json:"field" yaml:"field"\` + Field *string \`field:"optional" json:"field" yaml:"field"\` } type OptionalStructConsumer interface { @@ -11520,7 +11528,7 @@ func (o *jsiiProxy_OverrideReturnsObject) Test(obj IReturnsNumber) *float64 { // https://github.com/aws/jsii/issues/982. type ParentStruct982 struct { - Foo *string \`json:"foo" yaml:"foo"\` + Foo *string \`field:"required" json:"foo" yaml:"foo"\` } type PartiallyInitializedThisConsumer interface { @@ -12330,8 +12338,8 @@ func NewReturnsPrivateImplementationOfInterface_Override(r ReturnsPrivateImpleme // idiomatic" way for Pythonists. type RootStruct struct { // May not be empty. - StringProp *string \`json:"stringProp" yaml:"stringProp"\` - NestedStruct *NestedStruct \`json:"nestedStruct" yaml:"nestedStruct"\` + StringProp *string \`field:"required" json:"stringProp" yaml:"stringProp"\` + NestedStruct *NestedStruct \`field:"optional" json:"nestedStruct" yaml:"nestedStruct"\` } type RootStructValidator interface { @@ -12414,9 +12422,9 @@ func (r *jsiiProxy_RuntimeTypeChecking) MethodWithOptionalArguments(arg1 *float6 type SecondLevelStruct struct { // It's long and required. - DeeperRequiredProp *string \`json:"deeperRequiredProp" yaml:"deeperRequiredProp"\` + DeeperRequiredProp *string \`field:"required" json:"deeperRequiredProp" yaml:"deeperRequiredProp"\` // It's long, but you'll almost never pass it. - DeeperOptionalProp *string \`json:"deeperOptionalProp" yaml:"deeperOptionalProp"\` + DeeperOptionalProp *string \`field:"optional" json:"deeperOptionalProp" yaml:"deeperOptionalProp"\` } // Test that a single instance can be returned under two different FQNs. @@ -12551,8 +12559,8 @@ const ( ) type SmellyStruct struct { - Property *string \`json:"property" yaml:"property"\` - YetAnoterOne *bool \`json:"yetAnoterOne" yaml:"yetAnoterOne"\` + Property *string \`field:"required" json:"property" yaml:"property"\` + YetAnoterOne *bool \`field:"required" json:"yetAnoterOne" yaml:"yetAnoterOne"\` } type SomeTypeJsii976 interface { @@ -12698,7 +12706,7 @@ const ( ) type StableStruct struct { - ReadonlyProperty *string \`json:"readonlyProperty" yaml:"readonlyProperty"\` + ReadonlyProperty *string \`field:"required" json:"readonlyProperty" yaml:"readonlyProperty"\` } // This is used to validate the ability to use \`this\` from within a static context. @@ -13056,24 +13064,24 @@ func (j *jsiiProxy_StripInternal) SetYouSeeMe(val *string) { // We can serialize and deserialize structs without silently ignoring optional fields. type StructA struct { - RequiredString *string \`json:"requiredString" yaml:"requiredString"\` - OptionalNumber *float64 \`json:"optionalNumber" yaml:"optionalNumber"\` - OptionalString *string \`json:"optionalString" yaml:"optionalString"\` + RequiredString *string \`field:"required" json:"requiredString" yaml:"requiredString"\` + OptionalNumber *float64 \`field:"optional" json:"optionalNumber" yaml:"optionalNumber"\` + OptionalString *string \`field:"optional" json:"optionalString" yaml:"optionalString"\` } // This intentionally overlaps with StructA (where only requiredString is provided) to test htat the kernel properly disambiguates those. type StructB struct { - RequiredString *string \`json:"requiredString" yaml:"requiredString"\` - OptionalBoolean *bool \`json:"optionalBoolean" yaml:"optionalBoolean"\` - OptionalStructA *StructA \`json:"optionalStructA" yaml:"optionalStructA"\` + RequiredString *string \`field:"required" json:"requiredString" yaml:"requiredString"\` + OptionalBoolean *bool \`field:"optional" json:"optionalBoolean" yaml:"optionalBoolean"\` + OptionalStructA *StructA \`field:"optional" json:"optionalStructA" yaml:"optionalStructA"\` } // Verifies that, in languages that do keyword lifting (e.g: Python), having a struct member with the same name as a positional parameter results in the correct code being emitted. // // See: https://github.com/aws/aws-cdk/issues/4302 type StructParameterType struct { - Scope *string \`json:"scope" yaml:"scope"\` - Props *bool \`json:"props" yaml:"props"\` + Scope *string \`field:"required" json:"scope" yaml:"scope"\` + Props *bool \`field:"optional" json:"props" yaml:"props"\` } // Just because we can. @@ -13184,16 +13192,16 @@ func StructUnionConsumer_IsStructB(struct_ interface{}) *bool { type StructWithEnum struct { // An enum value. - Foo StringEnum \`json:"foo" yaml:"foo"\` + Foo StringEnum \`field:"required" json:"foo" yaml:"foo"\` // Optional enum value (of type integer). - Bar AllTypesEnum \`json:"bar" yaml:"bar"\` + Bar AllTypesEnum \`field:"optional" json:"bar" yaml:"bar"\` } type StructWithJavaReservedWords struct { - Default *string \`json:"default" yaml:"default"\` - Assert *string \`json:"assert" yaml:"assert"\` - Result *string \`json:"result" yaml:"result"\` - That *string \`json:"that" yaml:"that"\` + Default *string \`field:"required" json:"default" yaml:"default"\` + Assert *string \`field:"optional" json:"assert" yaml:"assert"\` + Result *string \`field:"optional" json:"result" yaml:"result"\` + That *string \`field:"optional" json:"that" yaml:"that"\` } // An operation that sums multiple values. @@ -13462,11 +13470,11 @@ func NewSupportsNiceJavaBuilder_Override(s SupportsNiceJavaBuilder, id *float64, type SupportsNiceJavaBuilderProps struct { // Some number, like 42. - Bar *float64 \`json:"bar" yaml:"bar"\` + Bar *float64 \`field:"required" json:"bar" yaml:"bar"\` // An \`id\` field here is terrible API design, because the constructor of \`SupportsNiceJavaBuilder\` already has a parameter named \`id\`. // // But here we are, doing it like we didn't care. - Id *string \`json:"id" yaml:"id"\` + Id *string \`field:"optional" json:"id" yaml:"id"\` } // We can generate fancy builders in Java for classes which take a mix of positional & struct parameters. @@ -13936,11 +13944,11 @@ func (t *jsiiProxy_Thrower) ThrowError() { type TopLevelStruct struct { // This is a required field. - Required *string \`json:"required" yaml:"required"\` + Required *string \`field:"required" json:"required" yaml:"required"\` // A union to really stress test our serialization. - SecondLevel interface{} \`json:"secondLevel" yaml:"secondLevel"\` + SecondLevel interface{} \`field:"required" json:"secondLevel" yaml:"secondLevel"\` // You don't have to pass this. - Optional *string \`json:"optional" yaml:"optional"\` + Optional *string \`field:"optional" json:"optional" yaml:"optional"\` } // In TypeScript it is possible to have two methods with the same name but different capitalization. @@ -14150,8 +14158,8 @@ func (u *jsiiProxy_UnaryOperation) TypeName() interface{} { } type UnionProperties struct { - Bar interface{} \`json:"bar" yaml:"bar"\` - Foo interface{} \`json:"foo" yaml:"foo"\` + Bar interface{} \`field:"required" json:"bar" yaml:"bar"\` + Foo interface{} \`field:"optional" json:"foo" yaml:"foo"\` } // Ensures submodule-imported types from dependencies can be used correctly. @@ -17531,8 +17539,8 @@ import ( ) type MyStruct struct { - BaseMap *map[string]*jcb.BaseProps \`json:"baseMap" yaml:"baseMap"\` - Numbers *[]scopejsiicalclib.Number \`json:"numbers" yaml:"numbers"\` + BaseMap *map[string]*jcb.BaseProps \`field:"required" json:"baseMap" yaml:"baseMap"\` + Numbers *[]scopejsiicalclib.Number \`field:"required" json:"numbers" yaml:"numbers"\` } @@ -17568,7 +17576,7 @@ package submodule1 type Bar struct { - Bar1 *string \`json:"bar1" yaml:"bar1"\` + Bar1 *string \`field:"required" json:"bar1" yaml:"bar1"\` } @@ -17597,13 +17605,13 @@ package submodule2 type Bar struct { - Bar2 *string \`json:"bar2" yaml:"bar2"\` + Bar2 *string \`field:"required" json:"bar2" yaml:"bar2"\` } type Foo struct { - Bar2 *string \`json:"bar2" yaml:"bar2"\` - Bar1 *string \`json:"bar1" yaml:"bar1"\` - Foo2 *string \`json:"foo2" yaml:"foo2"\` + Bar2 *string \`field:"required" json:"bar2" yaml:"bar2"\` + Bar1 *string \`field:"required" json:"bar1" yaml:"bar1"\` + Foo2 *string \`field:"required" json:"foo2" yaml:"foo2"\` } @@ -18903,7 +18911,7 @@ func (i *jsiiProxy_IInterfaceWithSelf) Method(self *float64) *string { } type StructWithSelf struct { - Self *string \`json:"self" yaml:"self"\` + Self *string \`field:"required" json:"self" yaml:"self"\` } @@ -18958,6 +18966,13 @@ func init() { `; +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/README.md 1`] = ` +# Read you, read me + +This is the readme of the \`jsii-calc.submodule\` module. + +`; + exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/backreferences/backreferences.go 1`] = ` package backreferences @@ -18966,7 +18981,7 @@ import ( ) type MyClassReference struct { - Reference submodule.MyClass \`json:"reference" yaml:"reference"\` + Reference submodule.MyClass \`field:"required" json:"reference" yaml:"reference"\` } @@ -19060,8 +19075,8 @@ func InnerClass_StaticProp() *SomeStruct { } type KwargsProps struct { - Prop SomeEnum \`json:"prop" yaml:"prop"\` - Extra *string \`json:"extra" yaml:"extra"\` + Prop SomeEnum \`field:"required" json:"prop" yaml:"prop"\` + Extra *string \`field:"optional" json:"extra" yaml:"extra"\` } // Checks that classes can self-reference during initialization. @@ -19118,11 +19133,11 @@ const ( ) type SomeStruct struct { - Prop SomeEnum \`json:"prop" yaml:"prop"\` + Prop SomeEnum \`field:"required" json:"prop" yaml:"prop"\` } type Structure struct { - Bool *bool \`json:"bool" yaml:"bool"\` + Bool *bool \`field:"required" json:"bool" yaml:"bool"\` } @@ -19204,6 +19219,13 @@ type Type__deeplynestedINamespaced = deeplynested.INamespaced `; +exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/README.md 1`] = ` +# Read you, read me + +This is the readme of the \`jsii-calc.submodule.isolated\` module. + +`; + exports[`Generated code for "jsii-calc": /go/jsiicalc/submodule/isolated/isolated.go 1`] = ` package isolated @@ -19403,7 +19425,7 @@ package param type SpecialParameter struct { - Value *string \`json:"value" yaml:"value"\` + Value *string \`field:"required" json:"value" yaml:"value"\` } @@ -19528,7 +19550,7 @@ import ( // See: https://github.com/aws/jsii/issues/2637 // type Default struct { - Foo *float64 \`json:"foo" yaml:"foo"\` + Foo *float64 \`field:"required" json:"foo" yaml:"foo"\` } type MyClass interface { diff --git a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap index 355489723e..9dc5df4093 100644 --- a/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap +++ b/packages/jsii-pacmak/test/generated-code/__snapshots__/target-python.test.ts.snap @@ -243,7 +243,7 @@ scope.jsii-calc-base exports[`Generated code for "@scope/jsii-calc-base": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=59.6.0", "wheel~=0.37.1"] +requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" `; @@ -283,7 +283,7 @@ kwargs = json.loads( "py.typed" ] }, - "python_requires": ">=3.6", + "python_requires": "~=3.7", "install_requires": [ "jsii<0.0.1", "publication>=0.0.3", @@ -294,10 +294,10 @@ kwargs = json.loads( "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Typing :: Typed", "License :: OSI Approved" ], @@ -723,7 +723,7 @@ scope.jsii-calc-base-of-base exports[`Generated code for "@scope/jsii-calc-base-of-base": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=59.6.0", "wheel~=0.37.1"] +requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" `; @@ -763,7 +763,7 @@ kwargs = json.loads( "py.typed" ] }, - "python_requires": ">=3.6", + "python_requires": "~=3.7", "install_requires": [ "jsii<0.0.1", "publication>=0.0.3" @@ -773,10 +773,10 @@ kwargs = json.loads( "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Typing :: Typed", "License :: OSI Approved" ], @@ -1176,7 +1176,7 @@ scope.jsii-calc-lib exports[`Generated code for "@scope/jsii-calc-lib": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=59.6.0", "wheel~=0.37.1"] +requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" `; @@ -1217,7 +1217,7 @@ kwargs = json.loads( "py.typed" ] }, - "python_requires": ">=3.6", + "python_requires": "~=3.7", "install_requires": [ "jsii<0.0.1", "publication>=0.0.3", @@ -1229,10 +1229,10 @@ kwargs = json.loads( "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Typing :: Typed", "Development Status :: 7 - Inactive", "License :: OSI Approved" @@ -2409,7 +2409,7 @@ foo = "bar" exports[`Generated code for "jsii-calc": /python/pyproject.toml 1`] = ` [build-system] -requires = ["setuptools~=59.6.0", "wheel~=0.37.1"] +requires = ["setuptools~=62.1.0", "wheel~=0.37.1"] build-backend = "setuptools.build_meta" `; @@ -2481,7 +2481,7 @@ kwargs = json.loads( "py.typed" ] }, - "python_requires": ">=3.6", + "python_requires": "~=3.7", "install_requires": [ "jsii<0.0.1", "publication>=0.0.3", @@ -2493,10 +2493,10 @@ kwargs = json.loads( "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Typing :: Typed", "Development Status :: 5 - Production/Stable", "License :: OSI Approved", diff --git a/packages/jsii-pacmak/test/generated-code/harness.ts b/packages/jsii-pacmak/test/generated-code/harness.ts index 1aec8536dd..f9b24330f4 100644 --- a/packages/jsii-pacmak/test/generated-code/harness.ts +++ b/packages/jsii-pacmak/test/generated-code/harness.ts @@ -169,7 +169,11 @@ async function runMypy(pythonRoot: string): Promise { // Create a Python virtual environment await expect( - shell('python3', [ + // On Windows, there is usually no python3.exe (the GitHub action workers will have a python3 + // shim, but using this actually results in a WinError with Python 3.7 and 3.8 where venv will + // fail to copy the python binary if it's not invoked as python.exe). More on this particular + // issue can be read here: https://bugs.python.org/issue43749 + shell(process.platform === 'win32' ? 'python' : 'python3', [ '-m', 'venv', '--system-site-packages', // Allow using globally installed packages (saves time & disk space) diff --git a/packages/jsii-pacmak/test/generated-code/requirements-dev.txt b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt index 2f3b421b72..bfea1f84c0 100644 --- a/packages/jsii-pacmak/test/generated-code/requirements-dev.txt +++ b/packages/jsii-pacmak/test/generated-code/requirements-dev.txt @@ -1 +1 @@ -mypy==0.942 +mypy==0.950 diff --git a/packages/jsii-reflect/package.json b/packages/jsii-reflect/package.json index 9f6c1f7593..19a6fe7949 100644 --- a/packages/jsii-reflect/package.json +++ b/packages/jsii-reflect/package.json @@ -45,8 +45,8 @@ "@scope/jsii-calc-lib": "^0.0.0", "@types/fs-extra": "^9.0.13", "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", - "eslint": "^8.12.0", + "@types/node": "^12.20.48", + "eslint": "^8.13.0", "jest": "^27.5.1", "jsii": "^0.0.0", "jsii-build-tools": "^0.0.0", diff --git a/packages/jsii-rosetta/lib/commands/transliterate.ts b/packages/jsii-rosetta/lib/commands/transliterate.ts index 5f7c6e87f9..45daec7333 100644 --- a/packages/jsii-rosetta/lib/commands/transliterate.ts +++ b/packages/jsii-rosetta/lib/commands/transliterate.ts @@ -3,6 +3,7 @@ import { readJson, writeJson } from 'fs-extra'; import { resolve } from 'path'; import { TargetLanguage } from '../languages'; +import { targetName } from '../languages/target-language'; import { debug } from '../logging'; import { RosettaTabletReader, UnknownSnippetMode } from '../rosetta-reader'; import { typeScriptSnippetFromVisibleSource, ApiLocation } from '../snippet'; @@ -99,6 +100,12 @@ export async function transliterateAssembly( const now = new Date().getTime(); // eslint-disable-next-line no-await-in-loop const result = await loadAssembly(); + + if (result.targets?.[targetName(language)] == null) { + // This language is not supported by the assembly, so we skip it... + continue; + } + if (result.readme?.markdown) { result.readme.markdown = rosetta.translateSnippetsInMarkdown( { api: 'moduleReadme', moduleFqn: result.name }, diff --git a/packages/jsii-rosetta/lib/languages/go.ts b/packages/jsii-rosetta/lib/languages/go.ts index bb0b80743b..9fcb50632d 100644 --- a/packages/jsii-rosetta/lib/languages/go.ts +++ b/packages/jsii-rosetta/lib/languages/go.ts @@ -7,7 +7,7 @@ import { analyzeObjectLiteral, determineJsiiType, JsiiType, ObjectLiteralStruct import { OTree } from '../o-tree'; import { AstRenderer } from '../renderer'; import { isExported, isPublic, isPrivate, isReadOnly, isStatic } from '../typescript/ast-utils'; -import { ImportStatement } from '../typescript/imports'; +import { analyzeImportDeclaration, ImportStatement } from '../typescript/imports'; import { determineReturnType, inferMapElementType, @@ -156,6 +156,32 @@ export class GoVisitor extends DefaultVisitor { public identifier(node: ts.Identifier | ts.StringLiteral | ts.NoSubstitutionTemplateLiteral, renderer: GoRenderer) { const symbol = renderer.typeChecker.getSymbolAtLocation(node); + + // If the identifier corresponds to a renamed imported symbol, we need to use the original symbol name, qualified + // with the import package name, since Go does not allow generalized symbol aliasing (we *could* alias types, but + // not static functions or constructors). + const declaration = symbol?.valueDeclaration ?? symbol?.declarations?.[0]; + if (declaration && ts.isImportSpecifier(declaration)) { + const importInfo = analyzeImportDeclaration(declaration.parent.parent.parent, renderer); + const packageName = + importInfo.moduleSymbol?.sourceAssembly?.packageJson.jsii?.targets?.go?.packageName ?? + this.goName(importInfo.packageName, renderer, undefined); + + const importedSymbol = declaration.propertyName + ? renderer.typeChecker.getSymbolAtLocation(declaration.propertyName) + : symbol; + // Note: imported members are (by nature) always exported by the module they are imported from. + return new OTree([ + packageName, + '.', + this.goName( + (declaration.propertyName ?? declaration.name).text, + renderer.updateContext({ isExported: true }), + importedSymbol, + ), + ]); + } + return new OTree([this.goName(node.text, renderer, symbol)]); } @@ -174,6 +200,26 @@ export class GoVisitor extends DefaultVisitor { function determineClassName(this: GoVisitor, expr: ts.Expression): { classNamespace?: OTree; className: string } { if (ts.isIdentifier(expr)) { + // Imported names are referred to by the original (i.e: exported) name, qualified with the source module's go + // package name. + const symbol = renderer.typeChecker.getSymbolAtLocation(expr); + const declaration = symbol?.valueDeclaration ?? symbol?.declarations?.[0]; + if (declaration && ts.isImportSpecifier(declaration)) { + const importInfo = analyzeImportDeclaration(declaration.parent.parent.parent, renderer); + const packageName = + importInfo.moduleSymbol?.sourceAssembly?.packageJson.jsii?.targets?.go?.packageName ?? + this.goName(importInfo.packageName, renderer, undefined); + + return { + classNamespace: new OTree([packageName]), + className: this.goName( + (declaration.propertyName ?? declaration.name).text, + renderer.updateContext({ isExported: true }), + symbol, + ), + }; + } + return { className: ucFirst(expr.text) }; } if (ts.isPropertyAccessExpression(expr)) { @@ -761,34 +807,19 @@ export class GoVisitor extends DefaultVisitor { : `github.com/aws-samples/dummy/${packageName}`; if (node.imports.import === 'full') { - return new OTree(['import ', this.goName(node.imports.alias, renderer, undefined), ' "', moduleName, '"']); - } - - // We'll just create local type aliases for all imported types. This is not very go-idiomatic, but simplifies things elsewhere... - const elements = node.imports.elements - .filter((element) => element.importedSymbol?.symbolType === 'type') - .map( - (element) => - new OTree(['type ', element.alias ?? element.sourceName, ' ', packageName, '.', element.sourceName]), - ); - - const submodules = node.imports.elements - .filter((element) => element.importedSymbol?.symbolType === 'module') - .map( - (element) => - new OTree(['import ', element.alias ?? element.sourceName, ' "', moduleName, '/', element.sourceName, '"']), + return new OTree( + ['import ', this.goName(node.imports.alias, renderer, undefined), ' "', moduleName, '"'], + undefined, + { canBreakLine: true }, ); + } - if (elements.length === 0 && submodules.length === 0) { + if (node.imports.elements.length === 0) { // This is a blank import (for side-effects only) - return new OTree(['import _ "', moduleName, '"']); + return new OTree(['import _ "', moduleName, '"'], undefined, { canBreakLine: true }); } - const mainImport = new OTree(['import ', packageName, ' "', moduleName, '"'], elements, { - canBreakLine: true, - separator: '\n', - }); - return new OTree([mainImport, ...submodules]); + return new OTree(['import "', moduleName, '"'], undefined, { canBreakLine: true }); } public variableDeclaration(node: ts.VariableDeclaration, renderer: AstRenderer): OTree { diff --git a/packages/jsii-rosetta/lib/languages/target-language.ts b/packages/jsii-rosetta/lib/languages/target-language.ts index b4a977150e..d39b09e290 100644 --- a/packages/jsii-rosetta/lib/languages/target-language.ts +++ b/packages/jsii-rosetta/lib/languages/target-language.ts @@ -1,6 +1,37 @@ +import * as assert from 'assert'; + export enum TargetLanguage { PYTHON = 'python', CSHARP = 'csharp', JAVA = 'java', GO = 'go', } + +const VALID_TARGET_LANGUAGES = new Set(Object.values(TargetLanguage)); + +export function targetName(language: TargetLanguage.PYTHON): 'python'; +export function targetName(language: TargetLanguage.CSHARP): 'dotnet'; +export function targetName(language: TargetLanguage.JAVA): 'java'; +export function targetName(language: TargetLanguage.GO): 'go'; +export function targetName(language: TargetLanguage): 'python' | 'dotnet' | 'java' | 'go'; +/** + * @param language a possible value for `TargetLanguage`. + * + * @returns the name of the target configuration block for the given language. + */ +export function targetName(language: TargetLanguage): 'python' | 'dotnet' | 'java' | 'go' { + // The TypeScript compiler should guarantee the below `switch` statement covers all possible + // values of the TargetLanguage enum, but we add an assert here for clarity of intent. + assert(VALID_TARGET_LANGUAGES.has(language), `Invalid/unexpected target language identifier: ${language}`); + + switch (language) { + case TargetLanguage.PYTHON: + return 'python'; + case TargetLanguage.CSHARP: + return 'dotnet'; + case TargetLanguage.JAVA: + return 'java'; + case TargetLanguage.GO: + return 'go'; + } +} diff --git a/packages/jsii-rosetta/package.json b/packages/jsii-rosetta/package.json index 7ebfe9d65d..afe3446c0f 100644 --- a/packages/jsii-rosetta/package.json +++ b/packages/jsii-rosetta/package.json @@ -20,10 +20,10 @@ "@types/fs-extra": "^9.0.13", "@types/jest": "^27.4.1", "@types/mock-fs": "^4.13.1", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "@types/workerpool": "^6.1.0", "@types/semver": "^7.3.9", - "eslint": "^8.12.0", + "eslint": "^8.13.0", "jest": "^27.5.1", "jsii-build-tools": "0.0.0", "memory-streams": "^0.1.3", @@ -38,9 +38,9 @@ "typescript": "~3.9.10", "sort-json": "^2.0.1", "@xmldom/xmldom": "^0.8.2", - "workerpool": "^6.2.0", + "workerpool": "^6.2.1", "yargs": "^16.2.0", - "semver": "^7.3.5", + "semver": "^7.3.7", "semver-intersect": "^1.4.0", "fast-glob": "^3.2.11", "jsii": "0.0.0" diff --git a/packages/jsii-rosetta/test/commands/transliterate.test.ts b/packages/jsii-rosetta/test/commands/transliterate.test.ts index c6797f4cbd..b7358984a5 100644 --- a/packages/jsii-rosetta/test/commands/transliterate.test.ts +++ b/packages/jsii-rosetta/test/commands/transliterate.test.ts @@ -5,12 +5,18 @@ import * as path from 'path'; import { extractSnippets } from '../../lib/commands/extract'; import { transliterateAssembly } from '../../lib/commands/transliterate'; -import { TargetLanguage } from '../../lib/languages/target-language'; +import { TargetLanguage, targetName } from '../../lib/languages/target-language'; import { TabletSchema } from '../../lib/tablets/schema'; import { withTemporaryDirectory, TestJsiiModule, DUMMY_JSII_CONFIG } from '../testutil'; jest.setTimeout(60_000); +// A targets configuration block with ALL targets enabled (although with phony configuration). +const targets = Object.values(TargetLanguage).reduce((tgt, lang) => { + tgt[targetName(lang)] = { phony: true }; + return tgt; +}, {} as Record); + test('single assembly, all languages', () => withTemporaryDirectory(async (tmpDir) => { // GIVEN @@ -90,9 +96,13 @@ export class ClassName implements IInterface { } }`, }); - fs.writeJsonSync(path.join(tmpDir, SPEC_FILE_NAME), compilationResult.assembly, { - spaces: 2, - }); + fs.writeJsonSync( + path.join(tmpDir, SPEC_FILE_NAME), + { ...compilationResult.assembly, targets }, + { + spaces: 2, + }, + ); for (const [file, content] of Object.entries(compilationResult.files)) { fs.writeFileSync(path.resolve(tmpDir, file), content, 'utf-8'); } @@ -115,6 +125,7 @@ export class ClassName implements IInterface { { fingerprint: expect.any(String), jsiiVersion: expect.any(String), + targets: expect.any(Object), }, ` Object { @@ -153,11 +164,7 @@ export class ClassName implements IInterface { "url": "https://github.com/aws/jsii.git", }, "schema": "jsii/0.10.0", - "targets": Object { - "js": Object { - "npm": "testpkg", - }, - }, + "targets": Any, "types": Object { "testpkg.ClassName": Object { "assembly": "testpkg", @@ -373,6 +380,7 @@ export class ClassName implements IInterface { { fingerprint: expect.any(String), jsiiVersion: expect.any(String), + targets: expect.any(Object), }, ` Object { @@ -411,11 +419,7 @@ export class ClassName implements IInterface { "url": "https://github.com/aws/jsii.git", }, "schema": "jsii/0.10.0", - "targets": Object { - "js": Object { - "npm": "testpkg", - }, - }, + "targets": Any, "types": Object { "testpkg.ClassName": Object { "assembly": "testpkg", @@ -631,6 +635,7 @@ export class ClassName implements IInterface { { fingerprint: expect.any(String), jsiiVersion: expect.any(String), + targets: expect.any(Object), }, ` Object { @@ -669,11 +674,7 @@ export class ClassName implements IInterface { "url": "https://github.com/aws/jsii.git", }, "schema": "jsii/0.10.0", - "targets": Object { - "js": Object { - "npm": "testpkg", - }, - }, + "targets": Any, "types": Object { "testpkg.ClassName": Object { "assembly": "testpkg", @@ -933,9 +934,13 @@ import { SampleClass } from './index'; new SampleClass('omitted-literate'); `, }); - fs.writeJsonSync(path.join(tmpDir, SPEC_FILE_NAME), compilationResult.assembly, { - spaces: 2, - }); + fs.writeJsonSync( + path.join(tmpDir, SPEC_FILE_NAME), + { ...compilationResult.assembly, targets }, + { + spaces: 2, + }, + ); for (const [file, content] of Object.entries(compilationResult.files)) { if (file.startsWith('omit-')) { continue; @@ -955,6 +960,7 @@ new SampleClass('omitted-literate'); { fingerprint: expect.any(String), jsiiVersion: expect.any(String), + targets: expect.any(Object), }, ` Object { @@ -1008,11 +1014,7 @@ new SampleClass('omitted-literate'); "url": "https://github.com/aws/jsii.git", }, "schema": "jsii/0.10.0", - "targets": Object { - "js": Object { - "npm": "testpkg", - }, - }, + "targets": Any, "types": Object { "testpkg.SampleClass": Object { "assembly": "testpkg", @@ -1053,6 +1055,7 @@ new SampleClass('omitted-literate'); { fingerprint: expect.any(String), jsiiVersion: expect.any(String), + targets: expect.any(Object), }, ` Object { @@ -1106,11 +1109,7 @@ new SampleClass('omitted-literate'); "url": "https://github.com/aws/jsii.git", }, "schema": "jsii/0.10.0", - "targets": Object { - "js": Object { - "npm": "testpkg", - }, - }, + "targets": Any, "types": Object { "testpkg.SampleClass": Object { "assembly": "testpkg", @@ -1151,6 +1150,7 @@ new SampleClass('omitted-literate'); { fingerprint: expect.any(String), jsiiVersion: expect.any(String), + targets: expect.any(Object), }, ` Object { @@ -1204,11 +1204,7 @@ new SampleClass('omitted-literate'); "url": "https://github.com/aws/jsii.git", }, "schema": "jsii/0.10.0", - "targets": Object { - "js": Object { - "npm": "testpkg", - }, - }, + "targets": Any, "types": Object { "testpkg.SampleClass": Object { "assembly": "testpkg", @@ -1322,9 +1318,13 @@ export class ClassName implements IInterface { } }`, }); - fs.writeJsonSync(path.join(tmpDir, SPEC_FILE_NAME), compilationResult.assembly, { - spaces: 2, - }); + fs.writeJsonSync( + path.join(tmpDir, SPEC_FILE_NAME), + { ...compilationResult.assembly, targets }, + { + spaces: 2, + }, + ); for (const [file, content] of Object.entries(compilationResult.files)) { fs.writeFileSync(path.resolve(tmpDir, file), content, 'utf-8'); } @@ -1471,9 +1471,14 @@ export class ClassName implements IInterface { } }`, }); - fs.writeJsonSync(path.join(tmpDir, SPEC_FILE_NAME), compilationResult.assembly, { - spaces: 2, - }); + + fs.writeJsonSync( + path.join(tmpDir, SPEC_FILE_NAME), + { ...compilationResult.assembly, targets }, + { + spaces: 2, + }, + ); for (const [file, content] of Object.entries(compilationResult.files)) { fs.writeFileSync(path.resolve(tmpDir, file), content, 'utf-8'); } @@ -1500,3 +1505,121 @@ export class ClassName implements IInterface { expect(fs.statSync(path.join(outdir, `${SPEC_FILE_NAME}.${lang}`)).isFile()).toBe(true); }); })); + +test('will not attempt to produce output for an unsupported language', async () => + withTemporaryDirectory(async (tmpDir) => { + // GIVEN + const compilationResult = jsii.compileJsiiForTest({ + 'README.md': ` +# README +\`\`\`ts +const object: IInterface = new ClassName('this', 1337, { foo: 'bar' }); +object.property = EnumType.OPTION_A; +object.methodCall(); + +ClassName.staticMethod(EnumType.OPTION_B); +\`\`\` +`, + 'index.ts': ` +/** + * @example new ClassName('this', 1337, { property: EnumType.OPTION_B }); + */ +export enum EnumType { + /** + * @example new ClassName('this', 1337, { property: EnumType.OPTION_A }); + */ + OPTION_A = 1, + + /** + * @example new ClassName('this', 1337, { property: EnumType.OPTION_B }); + */ + OPTION_B = 2, +} + +export interface IInterface { + /** + * A property value. + * + * @example + * iface.property = EnumType.OPTION_B; + */ + property: EnumType; + + /** + * An instance method call. + * + * @example + * iface.methodCall(); + */ + methodCall(): void; +} + +export interface ClassNameProps { + readonly property?: EnumType; + readonly foo?: string; +} + +export class ClassName implements IInterface { + /** + * A static method. It can be invoked easily. + * + * @example ClassName.staticMethod(); + */ + public static staticMethod(_enm?: EnumType): void { + // ... + } + + public property: EnumType; + + /** + * Create a new instance of ClassName. + * + * @example new ClassName('this', 1337, { property: EnumType.OPTION_B }); + */ + public constructor(_this: string, _elite: number, props: ClassNameProps) { + this.property = props.property ?? EnumType.OPTION_A; + } + + public methodCall(): void { + // ... + } +}`, + }); + + fs.writeJsonSync( + path.join(tmpDir, SPEC_FILE_NAME), + { ...compilationResult.assembly, targets: { ...targets, [targetName(TargetLanguage.GO)]: undefined } }, + { + spaces: 2, + }, + ); + for (const [file, content] of Object.entries(compilationResult.files)) { + fs.writeFileSync(path.resolve(tmpDir, file), content, 'utf-8'); + } + fs.mkdirSync(path.resolve(tmpDir, 'rosetta')); + fs.writeFileSync( + path.resolve(tmpDir, 'rosetta', 'default.ts-fixture'), + `import { EnumType, IInterface, ClassName } from '.';\ndeclare const iface: IInterface\n/// here`, + 'utf-8', + ); + + // WHEN + // create outdir + const outdir = path.resolve(tmpDir, 'out'); + fs.mkdirSync(outdir); + + await expect( + transliterateAssembly([tmpDir], Object.values(TargetLanguage), { + strict: true, + outdir, + }), + ).resolves.not.toThrow(); + + Object.values(TargetLanguage).forEach((lang) => { + if (lang === TargetLanguage.GO) { + expect(fs.pathExistsSync(path.join(outdir, `${SPEC_FILE_NAME}.${lang}`))).toBe(false); + } else { + expect(fs.statSync(path.join(outdir, `${SPEC_FILE_NAME}.${lang}`)).isFile()).toBe(true); + } + }); + })); diff --git a/packages/jsii-rosetta/test/translations/imports/multiple-imports.cs b/packages/jsii-rosetta/test/translations/imports/multiple-imports.cs new file mode 100644 index 0000000000..4fa24d9a94 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/imports/multiple-imports.cs @@ -0,0 +1,2 @@ +using Aws.Cdk.Lib; +using Constructs; diff --git a/packages/jsii-rosetta/test/translations/imports/multiple-imports.go b/packages/jsii-rosetta/test/translations/imports/multiple-imports.go new file mode 100644 index 0000000000..b7eef4802c --- /dev/null +++ b/packages/jsii-rosetta/test/translations/imports/multiple-imports.go @@ -0,0 +1,2 @@ +import cdk "github.com/aws-samples/dummy/awscdklib" +import "github.com/aws-samples/dummy/constructs" diff --git a/packages/jsii-rosetta/test/translations/imports/multiple-imports.java b/packages/jsii-rosetta/test/translations/imports/multiple-imports.java new file mode 100644 index 0000000000..98da2d9413 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/imports/multiple-imports.java @@ -0,0 +1,3 @@ +import aws.cdk.lib.*; +import constructs.Construct; +import constructs.IConstruct; diff --git a/packages/jsii-rosetta/test/translations/imports/multiple-imports.py b/packages/jsii-rosetta/test/translations/imports/multiple-imports.py new file mode 100644 index 0000000000..77648bf309 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/imports/multiple-imports.py @@ -0,0 +1,2 @@ +import aws_cdk_lib as cdk +from constructs import Construct, IConstruct diff --git a/packages/jsii-rosetta/test/translations/imports/multiple-imports.ts b/packages/jsii-rosetta/test/translations/imports/multiple-imports.ts new file mode 100644 index 0000000000..70076f6880 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/imports/multiple-imports.ts @@ -0,0 +1,2 @@ +import * as cdk from 'aws-cdk-lib'; +import { Construct, IConstruct } from 'constructs'; diff --git a/packages/jsii-rosetta/test/translations/imports/selective_import.go b/packages/jsii-rosetta/test/translations/imports/selective_import.go new file mode 100644 index 0000000000..e617f3d5a9 --- /dev/null +++ b/packages/jsii-rosetta/test/translations/imports/selective_import.go @@ -0,0 +1,3 @@ +import "github.com/aws-samples/dummy/scopesomemodule" +scopesomemodule.NewTwo() +scopesomemodule.Four() diff --git a/packages/jsii/lib/project-info.ts b/packages/jsii/lib/project-info.ts index 9c0af8a8ef..dbed6415c8 100644 --- a/packages/jsii/lib/project-info.ts +++ b/packages/jsii/lib/project-info.ts @@ -250,7 +250,15 @@ class DependencyResolver { const ret: Record = {}; for (const [name, declaration] of Object.entries(dependencies)) { // eslint-disable-next-line no-await-in-loop - const resolved = this.resolveDependency(root, name, declaration); + let resolved; + try { + resolved = this.resolveDependency(root, name, declaration); + } catch (e) { + LOG.error( + `Unable to find a JSII dependency named "${name}" as "${declaration}". If you meant to include a non-JSII dependency, try adding it to bundledDependencies instead.`, + ); + throw e; + } const actualVersion = resolved.dependencyInfo.assembly.version; if (!semver.satisfies(actualVersion, declaration)) { diff --git a/packages/jsii/package.json b/packages/jsii/package.json index f36a13a236..2cd3116474 100644 --- a/packages/jsii/package.json +++ b/packages/jsii/package.json @@ -41,8 +41,8 @@ "chalk": "^4", "deep-equal": "^2.0.5", "fs-extra": "^9.1.0", - "log4js": "^6.4.4", - "semver": "^7.3.5", + "log4js": "^6.4.5", + "semver": "^7.3.7", "semver-intersect": "^1.4.0", "sort-json": "^2.0.1", "spdx-license-list": "^6.5.0", @@ -54,10 +54,10 @@ "@types/deep-equal": "^1.0.1", "@types/fs-extra": "^9.0.13", "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", + "@types/node": "^12.20.48", "@types/semver": "^7.3.9", "clone": "^2.1.2", - "eslint": "^8.12.0", + "eslint": "^8.13.0", "jest": "^27.5.1", "jest-expect-message": "^1.0.2", "jsii-build-tools": "^0.0.0", diff --git a/packages/oo-ascii-tree/package.json b/packages/oo-ascii-tree/package.json index da2c6a9512..8b72c95e0e 100644 --- a/packages/oo-ascii-tree/package.json +++ b/packages/oo-ascii-tree/package.json @@ -32,8 +32,8 @@ }, "devDependencies": { "@types/jest": "^27.4.1", - "@types/node": "^12.20.47", - "eslint": "^8.12.0", + "@types/node": "^12.20.48", + "eslint": "^8.13.0", "jest": "^27.5.1", "jsii-build-tools": "^0.0.0", "prettier": "^2.6.2", diff --git a/superchain/Dockerfile b/superchain/Dockerfile index 9a3455bdac..5afa337cff 100644 --- a/superchain/Dockerfile +++ b/superchain/Dockerfile @@ -24,6 +24,10 @@ FROM --platform=${BUILDPLATFORM} public.ecr.aws/debian/debian:10 as bindist ARG BUILDPLATFORM ARG TARGETPLATFORM +# Setting defaults for backwards compatibility with "docker build" (see https://github.com/docker/buildx/issues/510) +ENV BUILDPLATFORM=${BUILDPLATFORM:-linux/amd64} \ + TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} + # We require a couple of tools to be available in order to work here... RUN echo "deb http://deb.debian.org/debian buster-backports main" > /etc/apt/sources.list.d/buster-backports.list \ && apt-get update \ @@ -85,6 +89,10 @@ FROM public.ecr.aws/debian/debian:10-slim as staging ARG BUILDPLATFORM ARG TARGETPLATFORM +# Setting defaults for backwards compatibility with "docker build" (see https://github.com/docker/buildx/issues/510) +ENV BUILDPLATFORM=${BUILDPLATFORM:-linux/amd64} \ + TARGETPLATFORM=${TARGETPLATFORM:-linux/amd64} + SHELL ["/bin/bash", "-c"] # Set locale and some other interesting environment variables @@ -191,10 +199,10 @@ COPY superchain/m2-settings.xml /root/.m2/settings.xml # Install Go COPY --from=bindist /opt/golang/go ${GOROOT} -# Install Node 10+ (configurable with '--build-arg NODE_MAJOR_VERSION=xxx') and yarn +# Install Node 12+ (configurable with '--build-arg NODE_MAJOR_VERSION=xxx') and yarn # (Put this as late as possible in the Dockerfile so we get to reuse the layer cache # for most of the multiple builds). -ARG NODE_MAJOR_VERSION="12" +ARG NODE_MAJOR_VERSION="14" COPY superchain/gpg/nodesource.asc /tmp/nodesource.asc COPY superchain/gpg/yarn.asc /tmp/yarn.asc RUN apt-key add /tmp/nodesource.asc && rm /tmp/nodesource.asc \ diff --git a/superchain/README.md b/superchain/README.md index 93e386bb08..bfe2d9f3c7 100644 --- a/superchain/README.md +++ b/superchain/README.md @@ -31,19 +31,21 @@ jsii/superchain:-(-node)(-nightly) - `` is the base image tag (e.g: `buster-slim`) - The only supported value is `buster-slim` - `` is the major version of node contained in the image - - `10` corresponds to node 10.x - - `12` corresponds to node 12.x, this is the default - - `14` corresponds to node 14.x - - `10` corresponds to node 12.x + - `12` corresponds to node 12.x + - `14` corresponds to node 14.x, this is the default + - `16` corresponds to node 16.x + - `18` corresponds to node 18.x - `-nightly` images are released from the `HEAD` of the [`aws/jsii`][jsii] repository and should typically not be used for production workloads -The previous image tags are no longer updated and should no longer be used: +The previous image tags have been discontinued: - `:latest` (users should migrate to `:1-buster-slim`) - `:nightly` (users should migrate to `:1-buster-slim-nightly`) -- `:node10` (users should migrate to `:1-buster-slim-node10`) -- `:node10-nightly` (users should migrate to `:1-buster-slim-node10-nightly`) +- `:node10` (users should migrate to `:1-buster-slim-node12`) +- `:node10-nightly` (users should migrate to `:1-buster-slim-node12-nightly`) +- `:node12` (users shoudl migrate to `:1-buster-slim-node12`) +- `:node12-nightly` (users shoudl migrate to `:1-buster-slim-node12-nightly`) - `:node14` (users shoudl migrate to `:1-buster-slim-node14`) - `:node14-nightly` (users shoudl migrate to `:1-buster-slim-node14-nightly`) @@ -51,13 +53,10 @@ The previous image tags are no longer updated and should no longer be used: We build multiple versions of this image, for different versions of Node. They are available as: -* `jsii/superchain:node10(-buster-slim|-nightly)` -* `jsii/superchain:node14(-buster-slim|-nightly)` - -The following labels are also available, and are aliases for the Node 12 images: - -* `jsii/superchain:nightly` -* `jsii/superchain:latest-buster-slim` +* `jsii/superchain:1-buster-slim-node12(-nightly)` +* `jsii/superchain:1-buster-slim-node14(-nightly)` +* `jsii/superchain:1-buster-slim-node16(-nightly)` +* `jsii/superchain:1-buster-slim-node18(-nightly)` If you are building this image from source, you can control the Node version with the `NODE_MAJOR_VERSION` build argument: diff --git a/tools/jsii-compliance/package.json b/tools/jsii-compliance/package.json index 6b4e3caee2..159eeddce1 100644 --- a/tools/jsii-compliance/package.json +++ b/tools/jsii-compliance/package.json @@ -16,8 +16,8 @@ "tablemark": "^2.0.0" }, "devDependencies": { - "@types/node": "^12.20.47", - "eslint": "^8.12.0", + "@types/node": "^12.20.48", + "eslint": "^8.13.0", "prettier": "^2.6.2", "ts-node": "^10.7.0", "typescript": "~3.9.10" diff --git a/yarn.lock b/yarn.lock index 000674d993..55affa47be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22,30 +22,30 @@ integrity sha512-p8pdE6j0a29TNGebNm7NzYZWB3xVZJBZ7XGs42uAKzQo8VQ3F0By/cQCtUEABwIqw5zo6WA4NbmxsfzADzMKnQ== "@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.2", "@babel/core@^7.8.0": - version "7.17.8" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.8.tgz#3dac27c190ebc3a4381110d46c80e77efe172e1a" - integrity sha512-OdQDV/7cRBtJHLSOBqqbYNkOcydOgnX59TZx4puf41fzcVtN3e/4yqY8lMQsK+5X2lJtAdmA+6OHqsj1hBJ4IQ== + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.9.tgz#6bae81a06d95f4d0dec5bb9d74bbc1f58babdcfe" + integrity sha512-5ug+SfZCpDAkVp9SFIZAzlW18rlzsOcJGaetCjkySnrXXDUw9AR8cDUm1iByTmdWM6yxX6/zycaV76w3YTF2gw== dependencies: "@ampproject/remapping" "^2.1.0" "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.7" + "@babel/generator" "^7.17.9" "@babel/helper-compilation-targets" "^7.17.7" "@babel/helper-module-transforms" "^7.17.7" - "@babel/helpers" "^7.17.8" - "@babel/parser" "^7.17.8" + "@babel/helpers" "^7.17.9" + "@babel/parser" "^7.17.9" "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.3" + "@babel/traverse" "^7.17.9" "@babel/types" "^7.17.0" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" - json5 "^2.1.2" + json5 "^2.2.1" semver "^6.3.0" -"@babel/generator@^7.17.3", "@babel/generator@^7.17.7", "@babel/generator@^7.7.2": - version "7.17.7" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.7.tgz#8da2599beb4a86194a3b24df6c085931d9ee45ad" - integrity sha512-oLcVCTeIFadUoArDTwpluncplrYBmTCCZZgXCbgNGvOBBiSDDK3eWO4b/+eOTli5tKv1lg+a5/NAXg+nTcei1w== +"@babel/generator@^7.17.9", "@babel/generator@^7.7.2": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.9.tgz#f4af9fd38fa8de143c29fce3f71852406fc1e2fc" + integrity sha512-rAdDousTwxbIxbz5I7GEQ3lUip+xVCXooZNbsydCWs3xA7ZsYOv+CFRdzGxRX78BmQHu9B1Eso59AOZQOJDEdQ== dependencies: "@babel/types" "^7.17.0" jsesc "^2.5.1" @@ -68,21 +68,13 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-function-name@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz#f1ec51551fb1c8956bc8dd95f38523b6cf375f8f" - integrity sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA== +"@babel/helper-function-name@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" + integrity sha512-7cRisGlVtiVqZ0MW0/yFB4atgpGLWEHUVYnb448hZK4x+vih0YO5UoS11XIYtZYqHd0dIPMdUSv8q5K4LdMnIg== dependencies: - "@babel/helper-get-function-arity" "^7.16.7" "@babel/template" "^7.16.7" - "@babel/types" "^7.16.7" - -"@babel/helper-get-function-arity@^7.16.7": - version "7.16.7" - resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz#ea08ac753117a669f1508ba06ebcc49156387419" - integrity sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw== - dependencies: - "@babel/types" "^7.16.7" + "@babel/types" "^7.17.0" "@babel/helper-hoist-variables@^7.16.7": version "7.16.7" @@ -141,28 +133,28 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== -"@babel/helpers@^7.17.8": - version "7.17.8" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.8.tgz#288450be8c6ac7e4e44df37bcc53d345e07bc106" - integrity sha512-QcL86FGxpfSJwGtAvv4iG93UL6bmqBdmoVY0CMCU2g+oD2ezQse3PT5Pa+jiD6LJndBQi0EDlpzOWNlLuhz5gw== +"@babel/helpers@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.9.tgz#b2af120821bfbe44f9907b1826e168e819375a1a" + integrity sha512-cPCt915ShDWUEzEp3+UNRktO2n6v49l5RSnG9M5pS24hA+2FAc5si+Pn1i4VVbQQ+jh+bIZhPFQOJOzbrOYY1Q== dependencies: "@babel/template" "^7.16.7" - "@babel/traverse" "^7.17.3" + "@babel/traverse" "^7.17.9" "@babel/types" "^7.17.0" "@babel/highlight@^7.16.7": - version "7.16.10" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.10.tgz#744f2eb81579d6eea753c227b0f570ad785aba88" - integrity sha512-5FnTQLSLswEj6IkgVw5KusNUUFY9ZGqe/TRFnP/BKYHYgfh7tc+C7mwiy95/yNP7Dh9x580Vv8r7u7ZfTBFxdw== + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.9.tgz#61b2ee7f32ea0454612def4fccdae0de232b73e3" + integrity sha512-J9PfEKCbFIv2X5bjTMiZu6Vf341N05QIY+d6FvVKynkG1S7G0j3I0QoRtWIrXhZ+/Nlb5Q0MzqL7TokEJ5BNHg== dependencies: "@babel/helper-validator-identifier" "^7.16.7" chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.3", "@babel/parser@^7.17.8": - version "7.17.8" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.8.tgz#2817fb9d885dd8132ea0f8eb615a6388cca1c240" - integrity sha512-BoHhDJrJXqcg+ZL16Xv39H9n+AqJ4pcDrQBGZN+wHxIysrLZ3/ECwCBUch/1zUNhnsXULcONU3Ei5Hmkfk6kiQ== +"@babel/parser@^7.1.0", "@babel/parser@^7.14.7", "@babel/parser@^7.16.7", "@babel/parser@^7.17.9": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.9.tgz#9c94189a6062f0291418ca021077983058e171ef" + integrity sha512-vqUSBLP8dQHFPdPi9bc5GK9vRkYHJ49fsZdtoJ8EQ8ibpwk5rPKfvNIwChB0KVXcIjcepEBBd2VHC5r9Gy8ueg== "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" @@ -256,9 +248,9 @@ "@babel/helper-plugin-utils" "^7.16.7" "@babel/runtime@^7.14.6", "@babel/runtime@^7.7.6": - version "7.17.8" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.8.tgz#3e56e4aff81befa55ac3ac6a0967349fd1c5bca2" - integrity sha512-dQpEpK0O9o6lj6oPu0gRDbbnk+4LeHlNcBpspf6Olzt3GIX4P1lWF1gS+pHLDFlaJvbR6q7jCfQ08zA4QJBnmA== + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.17.9.tgz#d19fbf802d01a8cb6cf053a64e472d42c434ba72" + integrity sha512-lSiBBvodq29uShpWGNbgFdKYNiFDo5/HIYsaCEY9ff4sb10x9jizo2+pRrSyF4jKZCXqgzuqBOQKbUm90gQwJg== dependencies: regenerator-runtime "^0.13.4" @@ -271,18 +263,18 @@ "@babel/parser" "^7.16.7" "@babel/types" "^7.16.7" -"@babel/traverse@^7.17.3", "@babel/traverse@^7.7.2": - version "7.17.3" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.3.tgz#0ae0f15b27d9a92ba1f2263358ea7c4e7db47b57" - integrity sha512-5irClVky7TxRWIRtxlh2WPUUOLhcPN06AGgaQSB8AEwuyEBgJVuJ5imdHm5zxk8w0QS5T+tDfnDxAlhWjpb7cw== +"@babel/traverse@^7.17.3", "@babel/traverse@^7.17.9", "@babel/traverse@^7.7.2": + version "7.17.9" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.17.9.tgz#1f9b207435d9ae4a8ed6998b2b82300d83c37a0d" + integrity sha512-PQO8sDIJ8SIwipTPiR71kJQCKQYB5NGImbOviK8K+kg5xkNSYXLBupuX9QhatFowrsvo9Hj8WgArg3W7ijNAQw== dependencies: "@babel/code-frame" "^7.16.7" - "@babel/generator" "^7.17.3" + "@babel/generator" "^7.17.9" "@babel/helper-environment-visitor" "^7.16.7" - "@babel/helper-function-name" "^7.16.7" + "@babel/helper-function-name" "^7.17.9" "@babel/helper-hoist-variables" "^7.16.7" "@babel/helper-split-export-declaration" "^7.16.7" - "@babel/parser" "^7.17.3" + "@babel/parser" "^7.17.9" "@babel/types" "^7.17.0" debug "^4.1.0" globals "^11.1.0" @@ -555,9 +547,9 @@ integrity sha512-Fg32GrJo61m+VqYSdRSjRXMjQ06j8YIYfcTqndLYVAaHmroZHLJZCydsWBOTDqXS2v+mjxohBWEMfg97GXmYQg== "@jridgewell/trace-mapping@^0.3.0": - version "0.3.4" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.4.tgz#f6a0832dffd5b8a6aaa633b7d9f8e8e94c83a0c3" - integrity sha512-vFv9ttIedivx0ux3QSjhgtCVjPZd5l46ZOMDSCwnH1yUO2e964gO8LZGyv2QkqcgR6TnBU1v+1IFqmeoG+0UJQ== + version "0.3.7" + resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.7.tgz#941982134e9b7fad031c857ccfc4a0634fc6a471" + integrity sha512-8XC0l0PwCbdg2Uc8zIIf6djNX3lYiz9GqQlC1LJ9WQvTYvcfP8IA9K2IKRnPm5tAX6X/+orF+WwKZ0doGcgJlg== dependencies: "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" @@ -1491,9 +1483,9 @@ "@babel/types" "^7.0.0" "@types/babel__traverse@*", "@types/babel__traverse@^7.0.4", "@types/babel__traverse@^7.0.6": - version "7.14.2" - resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.14.2.tgz#ffcd470bbb3f8bf30481678fb5502278ca833a43" - integrity sha512-K2waXdXBi2302XUdcHcR1jCeU0LL4TD9HRs/gk0N2Xvrht+G/BfJa4QObBQZfhMdxiCpV3COl5Nfq4uKTeTnJA== + version "7.17.0" + resolved "https://registry.yarnpkg.com/@types/babel__traverse/-/babel__traverse-7.17.0.tgz#7a9b80f712fe2052bc20da153ff1e552404d8e4b" + integrity sha512-r8aveDbd+rzGP+ykSdF3oPuTVRWRfbBiHl0rVDM2yNEmSMXfkObQLV46b4RnCv3Lra51OlfnZhkkFaDl2MIRaA== dependencies: "@babel/types" "^7.3.0" @@ -1554,6 +1546,14 @@ dependencies: "@types/node" "*" +"@types/glob@^7.2.0": + version "7.2.0" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" + integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== + dependencies: + "@types/minimatch" "*" + "@types/node" "*" + "@types/graceful-fs@^4.1.2": version "4.1.5" resolved "https://registry.yarnpkg.com/@types/graceful-fs/-/graceful-fs-4.1.5.tgz#21ffba0d98da4350db64891f92a9e5db3cdb4e15" @@ -1606,7 +1606,7 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/minimatch@^3.0.3": +"@types/minimatch@*", "@types/minimatch@^3.0.3": version "3.0.5" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== @@ -1631,19 +1631,19 @@ "@types/node" "*" "@types/node@*": - version "17.0.23" - resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.23.tgz#3b41a6e643589ac6442bdbd7a4a3ded62f33f7da" - integrity sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw== + version "17.0.25" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.25.tgz#527051f3c2f77aa52e5dc74e45a3da5fb2301448" + integrity sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w== -"@types/node@^12.20.47": - version "12.20.47" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.47.tgz#ca9237d51f2a2557419688511dab1c8daf475188" - integrity sha512-BzcaRsnFuznzOItW1WpQrDHM7plAa7GIDMZ6b5pnMbkqEtM/6WCOhvZar39oeMQP79gwvFUWjjptE7/KGcNqFg== +"@types/node@^12.20.48": + version "12.20.48" + resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.48.tgz#55f70bd432b6515828c0298689776861b90ca4fa" + integrity sha512-4kxzqkrpwYtn6okJUcb2lfUu9ilnb3yhUOH6qX3nug8D2DupZ2drIkff2yJzYcNJVl3begnlcaBJ7tqiTTzjnQ== "@types/node@^16.9.2": - version "16.11.26" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.26.tgz#63d204d136c9916fb4dcd1b50f9740fe86884e47" - integrity sha512-GZ7bu5A6+4DtG7q9GsoHXy3ALcgeIHP4NnL0Vv2wu0uUB/yQex26v0tf6/na1mm0+bS9Uw+0DFex7aaKr2qawQ== + version "16.11.27" + resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.27.tgz#5da19383bdbeda99bc0d09cfbb88cab7297ebc51" + integrity sha512-C1pD3kgLoZ56Uuy5lhfOxie4aZlA3UMGLX9rXteq4WitEZH6Rl80mwactt9QG0w0gLFlN/kLBTFnGXtDVWvWQw== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -1656,9 +1656,9 @@ integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== "@types/prettier@^2.1.5": - version "2.4.4" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.4.tgz#5d9b63132df54d8909fce1c3f8ca260fdd693e17" - integrity sha512-ReVR2rLTV1kvtlWFyuot+d1pkpG2Fw/XKE3PDAdj57rbM97ttSp9JZ2UsP+2EHTylra9cUf6JA7tGwW1INzUrA== + version "2.6.0" + resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.6.0.tgz#efcbd41937f9ae7434c714ab698604822d890759" + integrity sha512-G/AdOadiZhnJp0jXCaBQU449W2h716OW/EoXeYkCytxKL06X1WCXB4DZpp8TpZ8eyIJVS1cw4lrlkkSYU21cDw== "@types/semver@^7.3.9": version "7.3.9" @@ -1726,14 +1726,14 @@ dependencies: "@types/yargs-parser" "*" -"@typescript-eslint/eslint-plugin@^5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.18.0.tgz#950df411cec65f90d75d6320a03b2c98f6c3af7d" - integrity sha512-tzrmdGMJI/uii9/V6lurMo4/o+dMTKDH82LkNjhJ3adCW22YQydoRs5MwTiqxGF9CSYxPxQ7EYb4jLNlIs+E+A== +"@typescript-eslint/eslint-plugin@^5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.20.0.tgz#022531a639640ff3faafaf251d1ce00a2ef000a1" + integrity sha512-fapGzoxilCn3sBtC6NtXZX6+P/Hef7VDbyfGqTTpzYydwhlkevB+0vE0EnmHPVTVSy68GUncyJ/2PcrFBeCo5Q== dependencies: - "@typescript-eslint/scope-manager" "5.18.0" - "@typescript-eslint/type-utils" "5.18.0" - "@typescript-eslint/utils" "5.18.0" + "@typescript-eslint/scope-manager" "5.20.0" + "@typescript-eslint/type-utils" "5.20.0" + "@typescript-eslint/utils" "5.20.0" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -1741,69 +1741,69 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/parser@^5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.18.0.tgz#2bcd4ff21df33621df33e942ccb21cb897f004c6" - integrity sha512-+08nYfurBzSSPndngnHvFw/fniWYJ5ymOrn/63oMIbgomVQOvIDhBoJmYZ9lwQOCnQV9xHGvf88ze3jFGUYooQ== +"@typescript-eslint/parser@^5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.20.0.tgz#4991c4ee0344315c2afc2a62f156565f689c8d0b" + integrity sha512-UWKibrCZQCYvobmu3/N8TWbEeo/EPQbS41Ux1F9XqPzGuV7pfg6n50ZrFo6hryynD8qOTTfLHtHjjdQtxJ0h/w== dependencies: - "@typescript-eslint/scope-manager" "5.18.0" - "@typescript-eslint/types" "5.18.0" - "@typescript-eslint/typescript-estree" "5.18.0" + "@typescript-eslint/scope-manager" "5.20.0" + "@typescript-eslint/types" "5.20.0" + "@typescript-eslint/typescript-estree" "5.20.0" debug "^4.3.2" -"@typescript-eslint/scope-manager@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.18.0.tgz#a7d7b49b973ba8cebf2a3710eefd457ef2fb5505" - integrity sha512-C0CZML6NyRDj+ZbMqh9FnPscg2PrzSaVQg3IpTmpe0NURMVBXlghGZgMYqBw07YW73i0MCqSDqv2SbywnCS8jQ== +"@typescript-eslint/scope-manager@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.20.0.tgz#79c7fb8598d2942e45b3c881ced95319818c7980" + integrity sha512-h9KtuPZ4D/JuX7rpp1iKg3zOH0WNEa+ZIXwpW/KWmEFDxlA/HSfCMhiyF1HS/drTICjIbpA6OqkAhrP/zkCStg== dependencies: - "@typescript-eslint/types" "5.18.0" - "@typescript-eslint/visitor-keys" "5.18.0" + "@typescript-eslint/types" "5.20.0" + "@typescript-eslint/visitor-keys" "5.20.0" -"@typescript-eslint/type-utils@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.18.0.tgz#62dbfc8478abf36ba94a90ddf10be3cc8e471c74" - integrity sha512-vcn9/6J5D6jtHxpEJrgK8FhaM8r6J1/ZiNu70ZUJN554Y3D9t3iovi6u7JF8l/e7FcBIxeuTEidZDR70UuCIfA== +"@typescript-eslint/type-utils@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.20.0.tgz#151c21cbe9a378a34685735036e5ddfc00223be3" + integrity sha512-WxNrCwYB3N/m8ceyoGCgbLmuZwupvzN0rE8NBuwnl7APgjv24ZJIjkNzoFBXPRCGzLNkoU/WfanW0exvp/+3Iw== dependencies: - "@typescript-eslint/utils" "5.18.0" + "@typescript-eslint/utils" "5.20.0" debug "^4.3.2" tsutils "^3.21.0" -"@typescript-eslint/types@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.18.0.tgz#4f0425d85fdb863071680983853c59a62ce9566e" - integrity sha512-bhV1+XjM+9bHMTmXi46p1Led5NP6iqQcsOxgx7fvk6gGiV48c6IynY0apQb7693twJDsXiVzNXTflhplmaiJaw== +"@typescript-eslint/types@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.20.0.tgz#fa39c3c2aa786568302318f1cb51fcf64258c20c" + integrity sha512-+d8wprF9GyvPwtoB4CxBAR/s0rpP25XKgnOvMf/gMXYDvlUC3rPFHupdTQ/ow9vn7UDe5rX02ovGYQbv/IUCbg== -"@typescript-eslint/typescript-estree@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.18.0.tgz#6498e5ee69a32e82b6e18689e2f72e4060986474" - integrity sha512-wa+2VAhOPpZs1bVij9e5gyVu60ReMi/KuOx4LKjGx2Y3XTNUDJgQ+5f77D49pHtqef/klglf+mibuHs9TrPxdQ== +"@typescript-eslint/typescript-estree@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.20.0.tgz#ab73686ab18c8781bbf249c9459a55dc9417d6b0" + integrity sha512-36xLjP/+bXusLMrT9fMMYy1KJAGgHhlER2TqpUVDYUQg4w0q/NW/sg4UGAgVwAqb8V4zYg43KMUpM8vV2lve6w== dependencies: - "@typescript-eslint/types" "5.18.0" - "@typescript-eslint/visitor-keys" "5.18.0" + "@typescript-eslint/types" "5.20.0" + "@typescript-eslint/visitor-keys" "5.20.0" debug "^4.3.2" globby "^11.0.4" is-glob "^4.0.3" semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.18.0.tgz#27fc84cf95c1a96def0aae31684cb43a37e76855" - integrity sha512-+hFGWUMMri7OFY26TsOlGa+zgjEy1ssEipxpLjtl4wSll8zy85x0GrUSju/FHdKfVorZPYJLkF3I4XPtnCTewA== +"@typescript-eslint/utils@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.20.0.tgz#b8e959ed11eca1b2d5414e12417fd94cae3517a5" + integrity sha512-lHONGJL1LIO12Ujyx8L8xKbwWSkoUKFSO+0wDAqGXiudWB2EO7WEUT+YZLtVbmOmSllAjLb9tpoIPwpRe5Tn6w== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.18.0" - "@typescript-eslint/types" "5.18.0" - "@typescript-eslint/typescript-estree" "5.18.0" + "@typescript-eslint/scope-manager" "5.20.0" + "@typescript-eslint/types" "5.20.0" + "@typescript-eslint/typescript-estree" "5.20.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/visitor-keys@5.18.0": - version "5.18.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.18.0.tgz#c7c07709823804171d569017f3b031ced7253e60" - integrity sha512-Hf+t+dJsjAKpKSkg3EHvbtEpFFb/1CiOHnvI8bjHgOD4/wAw3gKrA0i94LrbekypiZVanJu3McWJg7rWDMzRTg== +"@typescript-eslint/visitor-keys@5.20.0": + version "5.20.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.20.0.tgz#70236b5c6b67fbaf8b2f58bf3414b76c1e826c2a" + integrity sha512-1flRpNF+0CAQkMNlTJ6L/Z5jiODG/e5+7mk6XwtPOUS3UrTz3UOiAg9jG2VtKsWI6rZQfy4C6a232QNRZTRGlg== dependencies: - "@typescript-eslint/types" "5.18.0" + "@typescript-eslint/types" "5.20.0" eslint-visitor-keys "^3.0.0" "@webassemblyjs/ast@1.11.1": @@ -1968,9 +1968,9 @@ JSONStream@^1.0.4: through ">=2.2.7 <3" abab@^2.0.3, abab@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.5.tgz#c0b678fb32d60fc1219c784d6a826fe385aeb79a" - integrity sha512-9IK9EadsbHo6jLWIpxpR6pL0sazTXV6+SQv25ZB+F7Bj9mJNaOc4nCRabwd5M/JwmUa8idz6Eci6eKfJryPs6Q== + version "2.0.6" + resolved "https://registry.yarnpkg.com/abab/-/abab-2.0.6.tgz#41b80f2c871d19686216b82309231cfd3cb3d291" + integrity sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA== abbrev@1: version "1.1.1" @@ -2181,13 +2181,14 @@ array-union@^2.1.0: integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== array.prototype.flat@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.2.5.tgz#07e0975d84bbc7c48cd1879d609e682598d33e13" - integrity sha512-KaYU+S+ndVqyUnignHftkwc58o3uVU1jzczILJ1tN2YaIZpFIKBiP/x/j97E5MVPsaCloPbqWLB/8qCTVvT2qg== + version "1.3.0" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.0.tgz#0b0c1567bf57b38b56b4c97b8aa72ab45e4adc7b" + integrity sha512-12IUEkHsAhA4DY5s0FPgNXIdc8VRSqD9Zp78a5au9abH/SOBrsp082JOWFNTjkMozh8mqcdiKuaLGhPeYztxSw== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" - es-abstract "^1.19.0" + es-abstract "^1.19.2" + es-shim-unscopables "^1.0.0" arrify@^1.0.1: version "1.0.1" @@ -2332,6 +2333,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" @@ -2446,9 +2454,9 @@ camelcase@^6.2.0, camelcase@^6.3.0: integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA== caniuse-lite@^1.0.30001317: - version "1.0.30001325" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001325.tgz#2b4ad19b77aa36f61f2eaf72e636d7481d55e606" - integrity sha512-sB1bZHjseSjDtijV1Hb7PB2Zd58Kyx+n/9EotvZ4Qcz2K3d0lWB8dB4nb8wN/TsOGFq3UuAm0zQZNQ4SoR7TrQ== + version "1.0.30001332" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz#39476d3aa8d83ea76359c70302eafdd4a1d727dd" + integrity sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw== case@^1.6.3: version "1.6.3" @@ -2950,17 +2958,17 @@ data-urls@^2.0.0: whatwg-mimetype "^2.3.0" whatwg-url "^8.0.0" -date-format@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.6.tgz#f6138b8f17968df9815b3d101fc06b0523f066c5" - integrity sha512-B9vvg5rHuQ8cbUXE/RMWMyX2YA5TecT3jKF5fLtGNlzPlU7zblSPmAm2OImDbWL+LDOQ6pUm+4LOFz+ywS41Zw== +date-format@^4.0.7: + version "4.0.7" + resolved "https://registry.yarnpkg.com/date-format/-/date-format-4.0.7.tgz#aa1cf4400badfe693c8462bbfcba43ab821d7d14" + integrity sha512-k5xqlzDGIfv2N/DHR/BR8Kc4N9CRy9ReuDkmdxeX/jNfit94QXd36emWMm40ZOEDKNm/c91yV9EO3uGPkR7wWQ== dateformat@^3.0.0: version "3.0.3" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -3058,11 +3066,12 @@ defaults@^1.0.3: clone "^1.0.2" define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== + version "1.1.4" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.4.tgz#0b14d7bd7fbeb2f3572c3a7eda80ea5d57fb05b1" + integrity sha512-uckOqKcfaVvtBdsVkdPv3XjveQJsNQqmhXgRi8uhvWWuPYZCNlzT8qAyblUgNoXdHdjMTzAqeGjAoli8f+bzPA== dependencies: - object-keys "^1.0.12" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" delayed-stream@~1.0.0: version "1.0.0" @@ -3105,9 +3114,9 @@ detect-newline@^3.0.0, detect-newline@^3.1.0: integrity sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA== dezalgo@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456" - integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY= + version "1.0.4" + resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.4.tgz#751235260469084c132157dfa857f386d4c33d81" + integrity sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig== dependencies: asap "^2.0.0" wrappy "1" @@ -3206,9 +3215,9 @@ ecc-jsbn@~0.1.1: safer-buffer "^2.1.0" electron-to-chromium@^1.4.84: - version "1.4.104" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.104.tgz#60973b0a7d398efa877196e8ccb0c93d48b918d8" - integrity sha512-2kjoAyiG7uMyGRM9mx25s3HAzmQG2ayuYXxsFmYugHSDcwxREgLtscZvbL1JcW9S/OemeQ3f/SG6JhDwpnCclQ== + version "1.4.114" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.114.tgz#d85ec0808dd50b0cf6e6b262480ffd385f71c873" + integrity sha512-gRwLpVYWHGbERPU6o8pKfR168V6enWEXzZc6zQNNXbgJ7UJna+9qzAIHY94+9KOv71D/CH+QebLA9pChD2q8zA== emittery@^0.8.1: version "0.8.1" @@ -3228,9 +3237,9 @@ encoding@^0.1.12: iconv-lite "^0.6.2" enhanced-resolve@^5.9.2: - version "5.9.2" - resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.2.tgz#0224dcd6a43389ebfb2d55efee517e5466772dd9" - integrity sha512-GIm3fQfwLJ8YZx2smuHpBKkXC1yOk+OBEmKckVyL0i/ea8mqDEykK3ld5dgH1QYPNyT/lIllxV2LULnxCHaHkA== + version "5.9.3" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.9.3.tgz#44a342c012cbc473254af5cc6ae20ebd0aae5d88" + integrity sha512-Bq9VSor+kjvW3f9/MiiR4eE3XYgOl7/rS8lnSxbRbF3kS0B2r+Y9w5krBWxZgDxASVZbdYrn5wT4j/Wb0J9qow== dependencies: graceful-fs "^4.2.4" tapable "^2.2.0" @@ -3262,10 +3271,10 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.18.5, es-abstract@^1.19.0, es-abstract@^1.19.1: - version "1.19.2" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.2.tgz#8f7b696d8f15b167ae3640b4060670f3d054143f" - integrity sha512-gfSBJoZdlL2xRiOCy0g8gLMryhoe1TlimjzU99L/31Z8QEGIhVQI+EWwt5lT+AuU9SnorVupXFqqOGqGfsyO6w== +es-abstract@^1.18.5, es-abstract@^1.19.1, es-abstract@^1.19.2: + version "1.19.5" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.19.5.tgz#a2cb01eb87f724e815b278b0dd0d00f36ca9a7f1" + integrity sha512-Aa2G2+Rd3b6kxEUKTF4TaW67czBLyAv3z7VOhYRU50YBx+bbsYZ9xQP4lMNazePuFlybXI0V4MruPos7qUo5fA== dependencies: call-bind "^1.0.2" es-to-primitive "^1.2.1" @@ -3278,7 +3287,7 @@ es-abstract@^1.18.5, es-abstract@^1.19.0, es-abstract@^1.19.1: is-callable "^1.2.4" is-negative-zero "^2.0.2" is-regex "^1.1.4" - is-shared-array-buffer "^1.0.1" + is-shared-array-buffer "^1.0.2" is-string "^1.0.7" is-weakref "^1.0.2" object-inspect "^1.12.0" @@ -3307,6 +3316,13 @@ es-module-lexer@^0.9.0: resolved "https://registry.yarnpkg.com/es-module-lexer/-/es-module-lexer-0.9.3.tgz#6f13db00cc38417137daf74366f535c8eb438f19" integrity sha512-1HQ2M2sPtxwnvOvT1ZClHyQDiggdNjURWpY2we6aMKCQiUVxTmVs2UYPLIrD84sS+kMdUwfBSylbJPwNnBrnHQ== +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + es-to-primitive@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" @@ -3439,10 +3455,10 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.12.0: - version "8.12.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.12.0.tgz#c7a5bd1cfa09079aae64c9076c07eada66a46e8e" - integrity sha512-it1oBL9alZg1S8UycLm5YDMAkIhtH6FtAzuZs6YvoGVldWjbS08BkAdb/ymP9LlAyq8koANu32U7Ib/w+UNh8Q== +eslint@^8.13.0: + version "8.13.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.13.0.tgz#6fcea43b6811e655410f5626cfcf328016badcd7" + integrity sha512-D+Xei61eInqauAyTJ6C0q6x9mx7kTUC1KZ0m0LSEexR0V+e94K12LmWX076ZIsldwfQ2RONdaJe0re0TRGQbRQ== dependencies: "@eslint/eslintrc" "^1.2.1" "@humanwhocodes/config-array" "^0.9.2" @@ -3742,9 +3758,9 @@ fs-access@^1.0.1: null-check "^1.0.0" fs-extra@^10.0.1: - version "10.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.1.tgz#27de43b4320e833f6867cc044bfce29fdf0ef3b8" - integrity sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag== + version "10.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" + integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== dependencies: graceful-fs "^4.2.0" jsonfile "^6.0.1" @@ -3794,6 +3810,11 @@ functional-red-black-tree@^1.0.1: resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= +functions-have-names@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== + gauge@~2.7.3: version "2.7.4" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7" @@ -3952,6 +3973,18 @@ glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, gl once "^1.3.0" path-is-absolute "^1.0.0" +glob@^8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.1.tgz#00308f5c035aa0b2a447cd37ead267ddff1577d3" + integrity sha512-cF7FYZZ47YzmCu7dDy50xSRRfO3ErRfrXuLZcNIuyiJEco0XSrGtuilG19L5xp3NcwTx7Gn+X6Tv3fmsUPTbow== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^5.0.1" + once "^1.3.0" + path-is-absolute "^1.0.0" + globals@^11.1.0: version "11.12.0" resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" @@ -4012,9 +4045,9 @@ hard-rejection@^2.1.0: integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== has-bigints@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" - integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== has-flag@^3.0.0: version "3.0.0" @@ -4026,6 +4059,13 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + has-symbols@^1.0.1, has-symbols@^1.0.2, has-symbols@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" @@ -4098,9 +4138,9 @@ http-signature@~1.2.0: sshpk "^1.7.0" https-proxy-agent@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" - integrity sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA== + version "5.0.1" + resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz#c59ef224a04fe8b754f3db0063a25ea30d0005d6" + integrity sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA== dependencies: agent-base "6" debug "4" @@ -4284,9 +4324,9 @@ is-ci@^2.0.0: ci-info "^2.0.0" is-core-module@^2.5.0, is-core-module@^2.8.1: - version "2.8.1" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" - integrity sha512-SdNCUs284hr40hFTFP6l0IfZ/RSrMXF3qgoRHd3/79unUTvrFO/JoXwkGm+5J/Oe3E/b5GsnG330uUNgRpu1PA== + version "2.9.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.9.0.tgz#e1c34429cd51c6dd9e09e0799e396e27b19a9c69" + integrity sha512-+5FPy5PnwmO3lvfMb0AsoPaBG+5KHUI0wYFXOtYPnVVVspTFUuMZNfNaNVRt3FZadstu2c8x23vykRW/NBoU6A== dependencies: has "^1.0.3" @@ -4398,7 +4438,7 @@ is-set@^2.0.1, is-set@^2.0.2: resolved "https://registry.yarnpkg.com/is-set/-/is-set-2.0.2.tgz#90755fa4c2562dc1c5d4024760d6119b94ca18ec" integrity sha512-+2cnTEZeY5z/iXGbLhPrOAaK/Mau5k5eXq9j14CpRTftq0pAJu2MwVRSZhyZWBzx3o6X795Lz6Bpb6R0GKf37g== -is-shared-array-buffer@^1.0.1: +is-shared-array-buffer@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== @@ -5058,7 +5098,7 @@ json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@2.x, json5@^2.1.2: +json5@2.x, json5@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c" integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA== @@ -5201,9 +5241,9 @@ load-json-file@^6.2.0: type-fest "^0.6.0" loader-runner@^4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.2.0.tgz#d7022380d66d14c5fb1d496b89864ebcfd478384" - integrity sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw== + version "4.3.0" + resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-4.3.0.tgz#c1b4a163b99f614830353b16755e7149ac2314e1" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== locate-path@^2.0.0: version "2.0.0" @@ -5275,16 +5315,16 @@ lodash@^4.11.2, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.7.0: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log4js@^6.4.4: - version "6.4.4" - resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.4.4.tgz#c9bc75569f3f40bba22fe1bd0677afa7a6a13bac" - integrity sha512-ncaWPsuw9Vl1CKA406hVnJLGQKy1OHx6buk8J4rE2lVW+NW5Y82G5/DIloO7NkqLOUtNPEANaWC1kZYVjXssPw== +log4js@^6.4.5: + version "6.4.5" + resolved "https://registry.yarnpkg.com/log4js/-/log4js-6.4.5.tgz#5cca31b29ece65a625efbc3df6fcbd9cecb9ee7b" + integrity sha512-43RJcYZ7nfUxpPO2woTl8CJ0t5+gucLJZ43mtp2PlInT+LygCp/bl6hNJtKulCJ+++fQsjIv4EO3Mp611PfeLQ== dependencies: - date-format "^4.0.6" + date-format "^4.0.7" debug "^4.3.4" flatted "^3.2.5" rfdc "^1.3.0" - streamroller "^3.0.6" + streamroller "^3.0.7" lower-case@^1.1.1: version "1.1.4" @@ -5454,6 +5494,13 @@ minimatch@^3.0.4, minimatch@^3.1.2: dependencies: brace-expansion "^1.1.7" +minimatch@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.0.1.tgz#fb9022f7528125187c92bd9e9b6366be1cf3415b" + integrity sha512-nLDxIFRyhDblz3qMuq+SoRZED4+miJ/G+tdDrjkkkRnjAsBexeGpgjLEQ0blJy7rHhR2b93rhQY4SvyWu9v03g== + dependencies: + brace-expansion "^2.0.1" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -5675,9 +5722,9 @@ node-int64@^0.4.0: integrity sha1-h6kGXNs1XTGC2PlM4RGIuCXGijs= node-releases@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.2.tgz#7139fe71e2f4f11b47d4d2986aaf8c48699e0c01" - integrity sha512-XxYDdcQ6eKqp/YjI+tb2C5WM2LgjnZrfYg4vgQt49EK268b6gYCHsBLrK2qvJo4FmCtqmKezb0WZFK4fkrZNsg== + version "2.0.3" + resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.3.tgz#225ee7488e4a5e636da8da52854844f9d716ca96" + integrity sha512-maHFz6OLqYxz+VQyCAtA3PTX4UP/53pa05fyDNc9CwjvJ0yEh6+xBwKsgCxMNhS8taUKBFYxfuiaD9U/55iFaw== nopt@^4.0.1: version "4.0.3" @@ -5867,7 +5914,7 @@ object-is@^1.1.4: call-bind "^1.0.2" define-properties "^1.1.3" -object-keys@^1.0.12, object-keys@^1.1.1: +object-keys@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== @@ -6519,12 +6566,13 @@ regenerator-runtime@^0.13.4: integrity sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA== regexp.prototype.flags@^1.3.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz#b3f4c0059af9e47eca9f3f660e51d81307e72307" - integrity sha512-pMR7hBVUUGI7PMA37m2ofIdQCsomVnas+Jn5UPGAHQ+/LlwKm/aTLJHdasmHRzlfeZwHiAOaRSo2rbBDm3nNUQ== + version "1.4.3" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.4.3.tgz#87cab30f80f66660181a3bb7bf5981a872b367ac" + integrity sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA== dependencies: call-bind "^1.0.2" define-properties "^1.1.3" + functions-have-names "^1.2.2" regexpp@^3.2.0: version "3.2.0" @@ -6709,10 +6757,10 @@ semver-intersect@^1.4.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5: - version "7.3.5" - resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7" - integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ== +semver@7.x, semver@^7.1.1, semver@^7.1.3, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.3.7: + version "7.3.7" + resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f" + integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g== dependencies: lru-cache "^6.0.0" @@ -6804,15 +6852,15 @@ socks-proxy-agent@^5.0.0: socks "^2.3.3" socks-proxy-agent@^6.0.0: - version "6.1.1" - resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.1.1.tgz#e664e8f1aaf4e1fb3df945f09e3d94f911137f87" - integrity sha512-t8J0kG3csjA4g6FTbsMOWws+7R7vuRC8aQ/wy3/1OWmsgwA68zs/+cExQ0koSitUDXqhufF/YJr9wtNMZHw5Ew== + version "6.2.0" + resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-6.2.0.tgz#f6b5229cc0cbd6f2f202d9695f09d871e951c85e" + integrity sha512-wWqJhjb32Q6GsrUqzuFkukxb/zzide5quXYcMVpIjxalDBBYy2nqKCFQ/9+Ie4dvOYSQdOk3hUlZSdzZOd3zMQ== dependencies: agent-base "^6.0.2" - debug "^4.3.1" - socks "^2.6.1" + debug "^4.3.3" + socks "^2.6.2" -socks@^2.3.3, socks@^2.6.1: +socks@^2.3.3, socks@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/socks/-/socks-2.6.2.tgz#ec042d7960073d40d94268ff3bb727dc685f111a" integrity sha512-zDZhHhZRY9PxRruRMR7kMhnf3I8hDs4S3f9RecfnGxvcBHQcKcIH/oUcEWffsfl1XxdYlA7nnlGbbTvPz9D8gA== @@ -6993,12 +7041,12 @@ standard-version@^9.3.2: stringify-package "^1.0.1" yargs "^16.0.0" -streamroller@^3.0.6: - version "3.0.6" - resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.0.6.tgz#52823415800ded79a49aa3f7712f50a422b97493" - integrity sha512-Qz32plKq/MZywYyhEatxyYc8vs994Gz0Hu2MSYXXLD233UyPeIeRBZARIIGwFer4Mdb8r3Y2UqKkgyDghM6QCg== +streamroller@^3.0.7: + version "3.0.7" + resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-3.0.7.tgz#d566353d3d8b5d2f3d813d2df557c08083b414cf" + integrity sha512-kh68kwiDGuIPiPDWwRbEC5us+kfARP1e9AsQiaLaSqGrctOvMn0mtL8iNY3r4/o5nIoYi3gPI1jexguZsXDlxw== dependencies: - date-format "^4.0.6" + date-format "^4.0.7" debug "^4.3.4" fs-extra "^10.0.1" @@ -7509,9 +7557,9 @@ typescript@~4.5.0: integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== uglify-js@^3.1.4: - version "3.15.3" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.3.tgz#9aa82ca22419ba4c0137642ba0df800cb06e0471" - integrity sha512-6iCVm2omGJbsu3JWac+p6kUiOpg3wFO2f8lIXjfEb8RrmLjzog1wTPMmwKB7swfzzqxj9YM+sGUM++u1qN4qJg== + version "3.15.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.15.4.tgz#fa95c257e88f85614915b906204b9623d4fa340d" + integrity sha512-vMOPGDuvXecPs34V74qDKk4iJ/SN4vL3Ow/23ixafENYvtrNvtbcgUeugTcUGRGsOF/5fU8/NYSL5Hyb3l1OJA== uid-number@0.0.6: version "0.0.6" @@ -7604,9 +7652,9 @@ uuid@^3.3.2: integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== v8-compile-cache-lib@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.0.tgz#0582bcb1c74f3a2ee46487ceecf372e46bce53e8" - integrity sha512-mpSYqfsFvASnSn5qMiwrr4VKfumbPyONLCOPmsR3A6pTY/r0+tSaVbgPWSAIuzbk3lCTa+FForeTiO+wBQGkjA== + version "3.0.1" + resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" + integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== v8-compile-cache@^2.0.3: version "2.3.0" @@ -7728,10 +7776,10 @@ webpack-sources@^3.2.3: resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-3.2.3.tgz#2d4daab8451fd4b240cc27055ff6a0c2ccea0cde" integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== -webpack@^5.71.0: - version "5.71.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.71.0.tgz#b01fcf379570b8c5ee06ca06c829ca168c951884" - integrity sha512-g4dFT7CFG8LY0iU5G8nBL6VlkT21Z7dcYDpJAEJV5Q1WLb9UwnFbrem1k7K52ILqEmomN7pnzWFxxE6SlDY56A== +webpack@^5.72.0: + version "5.72.0" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.72.0.tgz#f8bc40d9c6bb489a4b7a8a685101d6022b8b6e28" + integrity sha512-qmSmbspI0Qo5ld49htys8GY9XhS9CGqFoHTsOVAnjBdg0Zn79y135R+k4IR4rKK6+eKaabMhJwiVB7xw0SJu5w== dependencies: "@types/eslint-scope" "^3.7.3" "@types/estree" "^0.0.51" @@ -7861,10 +7909,10 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus= -workerpool@^6.2.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.0.tgz#827d93c9ba23ee2019c3ffaff5c27fccea289e8b" - integrity sha512-Rsk5qQHJ9eowMH28Jwhe8HEbmdYDX4lwoMWshiCXugjtHqMD9ZbiqSDLxcsfdqsETPzVUtX5s1Z5kStiIM6l4A== +workerpool@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.2.1.tgz#46fc150c17d826b86a008e5a4508656777e9c343" + integrity sha512-ILEIE97kDZvF9Wb9f6h5aXK4swSlKGUcOEGiIYb2OOu/IrDU9iwj0fD//SsA6E5ibwJxpEvhullJY4Sl4GcpAw== wrap-ansi@^6.2.0: version "6.2.0" @@ -8045,9 +8093,9 @@ yargs@^16.0.0, yargs@^16.2.0: yargs-parser "^20.2.2" yargs@^17.1.1: - version "17.4.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.4.0.tgz#9fc9efc96bd3aa2c1240446af28499f0e7593d00" - integrity sha512-WJudfrk81yWFSOkZYpAZx4Nt7V4xp7S/uJkX0CnxovMCt1wCE8LNftPpNuF9X/u9gN5nsD7ycYtRcDf2pL3UiA== + version "17.4.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.4.1.tgz#ebe23284207bb75cee7c408c33e722bfb27b5284" + integrity sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g== dependencies: cliui "^7.0.2" escalade "^3.1.1"