diff --git a/.gitattributes b/.gitattributes index 3d86cfbd40b..18677abbcfc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -13,7 +13,6 @@ /.github/workflows/build.yml linguist-generated /.github/workflows/force-release.yml linguist-generated /.github/workflows/lock.yml linguist-generated -/.github/workflows/next-cdktf-version-pr.yml linguist-generated /.github/workflows/provider-upgrade.yml linguist-generated /.github/workflows/pull-request-lint.yml linguist-generated /.github/workflows/release.yml linguist-generated diff --git a/.github/workflows/force-release.yml b/.github/workflows/force-release.yml index 34dac3b24a9..d5ff3939fa4 100644 --- a/.github/workflows/force-release.yml +++ b/.github/workflows/force-release.yml @@ -94,6 +94,17 @@ jobs: run: cd .repo/dist/go && copywrite headers - name: Remove copywrite hcl file run: rm -f .repo/dist/go/.copywrite.hcl + - name: Move the README file up a directory + run: mv .repo/dist/go/*/README.md .repo/dist/go/README.md + continue-on-error: true + - name: Remove some text from the README that doesn't apply to Go + run: |- + sed -i 's/# CDKTF prebuilt bindings for/# CDKTF Go bindings for/' .repo/dist/go/README.md + sed -i -e '/## Available Packages/,/### Go/!b' -e '/### Go/!d;p; s/### Go/## Go Package/' -e 'd' .repo/dist/go/README.md + sed -i 's/### Go/## Go Package/' .repo/dist/go/README.md + sed -i -e '/API.typescript.md/,/You can also visit a hosted version/!b' -e 'd' .repo/dist/go/README.md + sed -i 's|Find auto-generated docs for this provider here:|Find auto-generated docs for this provider [here](https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/API.go.md).|' .repo/dist/go/README.md + continue-on-error: true - name: Collect go Artifact run: mv .repo/dist dist - name: Release diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 863f91158a4..976b393791b 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -11,7 +11,7 @@ jobs: pull-requests: write issues: write steps: - - uses: dessant/lock-threads@d42e5f49803f3c4e14ffee0378e31481265dda22 + - uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 with: issue-comment: I'm going to lock this issue because it has been closed for at least 7 days. This helps our maintainers find and focus on the active issues. If you've found a problem that seems similar to this, please [open a new issue](https://github.com/cdktf/cdktf-provider-project/issues/new) so we can investigate further. issue-inactive-days: 7 diff --git a/.github/workflows/next-cdktf-version-pr.yml b/.github/workflows/next-cdktf-version-pr.yml deleted file mode 100644 index c3748b620fb..00000000000 --- a/.github/workflows/next-cdktf-version-pr.yml +++ /dev/null @@ -1,52 +0,0 @@ -# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". - -name: next-cdktf-version-pr -on: - workflow_dispatch: {} -jobs: - pr-against-next: - runs-on: ubuntu-latest - permissions: - contents: write - pull-requests: write - env: - CI: "true" - CHECKPOINT_DISABLE: "1" - steps: - - name: Checkout - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - with: - ref: ${{ github.event.pull_request.head.ref }} - repository: ${{ github.event.pull_request.head.repo.full_name }} - - name: Remove old PR - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: |- - PR_NUMBER_TO_CLOSE=$(gh pr list | grep "cdktf-next-pr" | awk '{ print $1 }') - if [ -z "$PR_NUMBER_TO_CLOSE" ]; then - echo "No PR to close" - else - gh pr close $PR_NUMBER_TO_CLOSE - fi - - name: Install - run: yarn install - - name: Upgrade CDKTF - run: |- - CDKTF_VERSION=$(yarn info cdktf --json | jq -r '.data | .["dist-tags"] | .next') - sed -i "s/cdktfVersion: ".*",/cdktfVersion: \"$CDKTF_VERSION\",/" .projenrc.js - cat .projenrc.js - - name: Run projen - run: yarn run upgrade - - name: Regenerate bindings - run: yarn run fetch && yarn run compile && yarn run docgen - - name: Create PR - uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 - with: - token: ${{ secrets.GITHUB_TOKEN }} - branch: cdktf-next-pr - branch-suffix: random - commit-message: "chore: upgrade CDKTF to @next preview version" - title: "chore: preview upgrading CDKTF to @next version" - delete-branch: true - draft: true - body: DO NOT MERGE! This is an automated PR that tests the pre-built provider generation against preview builds of CDKTF diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e30ca4f90b..2ad74f3c948 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -347,6 +347,17 @@ jobs: run: cd .repo/dist/go && copywrite headers - name: Remove copywrite hcl file run: rm -f .repo/dist/go/.copywrite.hcl + - name: Move the README file up a directory + run: mv .repo/dist/go/*/README.md .repo/dist/go/README.md + continue-on-error: true + - name: Remove some text from the README that doesn't apply to Go + run: |- + sed -i 's/# CDKTF prebuilt bindings for/# CDKTF Go bindings for/' .repo/dist/go/README.md + sed -i -e '/## Available Packages/,/### Go/!b' -e '/### Go/!d;p; s/### Go/## Go Package/' -e 'd' .repo/dist/go/README.md + sed -i 's/### Go/## Go Package/' .repo/dist/go/README.md + sed -i -e '/API.typescript.md/,/You can also visit a hosted version/!b' -e 'd' .repo/dist/go/README.md + sed -i 's|Find auto-generated docs for this provider here:|Find auto-generated docs for this provider [here](https://github.com/cdktf/cdktf-provider-azurerm/blob/main/docs/API.go.md).|' .repo/dist/go/README.md + continue-on-error: true - name: Collect go Artifact run: mv .repo/dist dist - name: Release diff --git a/.gitignore b/.gitignore index e3679ef5775..5333a8dd383 100644 --- a/.gitignore +++ b/.gitignore @@ -58,7 +58,6 @@ package-lock.json !/.github/workflows/auto-close-community-prs.yml !/.github/workflows/automerge.yml !/.github/workflows/lock.yml -!/.github/workflows/next-cdktf-version-pr.yml !/.github/workflows/alert-open-prs.yml !/.github/workflows/force-release.yml !/.github/CODEOWNERS diff --git a/.npmignore b/.npmignore index 88d99b10a0f..3f107723bfd 100644 --- a/.npmignore +++ b/.npmignore @@ -25,4 +25,3 @@ docs scripts .projenrc.js .copywrite.hcl -.mergify.yml diff --git a/.projen/deps.json b/.projen/deps.json index 19e2edb7444..9da0cb5a232 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -50,7 +50,7 @@ }, { "name": "jsii-rosetta", - "version": "~5.1.2", + "version": "~5.2.0", "type": "build" }, { @@ -62,6 +62,11 @@ "name": "projen", "type": "build" }, + { + "name": "semver", + "version": "^7.5.3", + "type": "build" + }, { "name": "standard-version", "version": "^9", diff --git a/.projen/files.json b/.projen/files.json index 24d5d19e8ab..f54cf9774c8 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -13,7 +13,6 @@ ".github/workflows/build.yml", ".github/workflows/force-release.yml", ".github/workflows/lock.yml", - ".github/workflows/next-cdktf-version-pr.yml", ".github/workflows/provider-upgrade.yml", ".github/workflows/pull-request-lint.yml", ".github/workflows/release.yml", diff --git a/.projen/tasks.json b/.projen/tasks.json index aed1c1b1f63..c1c082a40b7 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -316,6 +316,10 @@ "MIN_MAJOR": "1" }, "steps": [ + { + "name": "Clear the changelog so that it doesn't get published twice", + "exec": "rm -f $CHANGELOG" + }, { "builtin": "release/bump-version" } @@ -329,13 +333,13 @@ }, "steps": [ { - "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@actions/core,@cdktf/provider-project,@types/node,cdktf-cli,cdktf,constructs,dot-prop,jsii-diff,jsii-docgen,jsii-pacmak,projen,standard-version" + "exec": "npx npm-check-updates@16 --upgrade --target=minor --peer --dep=dev,peer,prod,optional --filter=@actions/core,@cdktf/provider-project,@types/node,cdktf-cli,cdktf,constructs,dot-prop,jsii-diff,jsii-docgen,jsii-pacmak,projen,semver,standard-version" }, { "exec": "yarn install --check-files" }, { - "exec": "yarn upgrade @actions/core @cdktf/provider-project @types/node cdktf-cli cdktf constructs dot-prop jsii-diff jsii-docgen jsii-pacmak projen standard-version" + "exec": "yarn upgrade @actions/core @cdktf/provider-project @types/node cdktf-cli cdktf constructs dot-prop jsii-diff jsii-docgen jsii-pacmak projen semver standard-version" }, { "exec": "npx projen" diff --git a/package.json b/package.json index af9dd2be716..519d718eb81 100644 --- a/package.json +++ b/package.json @@ -55,8 +55,9 @@ "jsii-diff": "^1.93.0", "jsii-docgen": "^10.2.3", "jsii-pacmak": "^1.93.0", - "jsii-rosetta": "~5.1.2", + "jsii-rosetta": "~5.2.0", "projen": "^0.77.6", + "semver": "^7.5.3", "standard-version": "^9", "typescript": "~5.2.0" }, diff --git a/yarn.lock b/yarn.lock index b8f4f8e6cd9..82833003ff0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -201,9 +201,9 @@ jsii-srcmak "^0.1.954" "@cdktf/provider-project@^0.4.0": - version "0.4.8" - resolved "https://registry.yarnpkg.com/@cdktf/provider-project/-/provider-project-0.4.8.tgz#6cdca6ab326071e347e3fadcd9bcab37668cff46" - integrity sha512-VBdWJ/BXrWApD3qRyCaat3pCAXe0bPztT3YFPJXFk35Q5zo/YYRkvg4thfiYT4s2baaYDf9wUS7S2hvBPkgxGg== + version "0.4.12" + resolved "https://registry.yarnpkg.com/@cdktf/provider-project/-/provider-project-0.4.12.tgz#bbdaf0d80856b85eec594c2e3519eff735d35007" + integrity sha512-W9x/v2Jj3zj2KHf8KtaPJfgg1wGPISdCfB8FTub8XbZuaGbh1hWDnQpSW8M9bRAJaBi3EOFEwFeEbhQI9AlcSw== dependencies: change-case "^4.1.2" fs-extra "^10.1.0" @@ -414,22 +414,6 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@jsii/check-node@1.85.0": - version "1.85.0" - resolved "https://registry.yarnpkg.com/@jsii/check-node/-/check-node-1.85.0.tgz#548d03f3f98d8b0edd9f4aeac7e128940dfd290d" - integrity sha512-dOrye7NuafkHADt3jk0TxMu/2sOHXxOYTwAuKj9L1/Te1xFfw2fzni80J12rTBQeVQxLVFNgDynsl2J7cuFFtQ== - dependencies: - chalk "^4.1.2" - semver "^7.5.1" - -"@jsii/check-node@1.88.0": - version "1.88.0" - resolved "https://registry.yarnpkg.com/@jsii/check-node/-/check-node-1.88.0.tgz#fa20e012230c692ad36976cde29301be1ed28c67" - integrity sha512-AveFyqkJIb8qZvGk5nZal/8mEJB6lWhwqvAQLodHmqE3WzpmZD5+h+aspBVt0El5cEFRJ1k1mrQqhAnJCVpvxg== - dependencies: - chalk "^4.1.2" - semver "^7.5.4" - "@jsii/check-node@1.92.0": version "1.92.0" resolved "https://registry.yarnpkg.com/@jsii/check-node/-/check-node-1.92.0.tgz#e05908d2c0875a728db14d73bb30459a73bd008e" @@ -453,20 +437,6 @@ dependencies: ajv "^8.12.0" -"@jsii/spec@^1.85.0": - version "1.87.0" - resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.87.0.tgz#99b9dd12ed92120e79e645538620db0526a7ad7b" - integrity sha512-fhTT3IYmjyRKvUUWffBIuGDVVfyKC+QfE1cMyExSHl7l6wk6unrxS8qsU23kaJ5bNQAnlc2+CE1HteY2SLbepg== - dependencies: - ajv "^8.12.0" - -"@jsii/spec@^1.88.0": - version "1.91.0" - resolved "https://registry.yarnpkg.com/@jsii/spec/-/spec-1.91.0.tgz#91d624357a66148ab9a2d8b5fb26331fc7b01932" - integrity sha512-Ir01bk5CwIFAApRJjRC+JG/f9db5dACEYFSxsHyvXRMu+J/LIANdwD4OPSelWrhbRiQdY6U16BKsRO63uaNRqg== - dependencies: - ajv "^8.12.0" - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -1727,7 +1697,7 @@ fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== -fast-glob@^3.3.1, fast-glob@^3.3.2: +fast-glob@^3.3.2: version "3.3.2" resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.2.tgz#a904501e57cfdd2ffcded45e99a54fef55e46129" integrity sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow== @@ -2589,23 +2559,23 @@ jsii-rosetta@^5.1.9: workerpool "^6.5.1" yargs "^17.7.2" -jsii-rosetta@~5.1.2: - version "5.1.9" - resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-5.1.9.tgz#7307a562f0b51aa6922b137bb51ab9e6da172bbd" - integrity sha512-GgSLaxn9N0xnYBXkK8DIXrp1CWNSz2f7Q04kQW4n2htsLd3diPI3HNbbmJL5V+wwUIZhOpBe++5r1a7T7vFlqg== +jsii-rosetta@~5.2.0: + version "5.2.6" + resolved "https://registry.yarnpkg.com/jsii-rosetta/-/jsii-rosetta-5.2.6.tgz#a5c6d37cff1992f7089f0766c22aea3e33c1c46c" + integrity sha512-HCXeAIUzU2Z1nJ9GFDQ1PMpGKbktJmZ+9upOw10zbV7WPT/4QUF6NPNfRIikk3bwPWTdFmsEtfjAO96UbubnbA== dependencies: - "@jsii/check-node" "1.85.0" - "@jsii/spec" "^1.85.0" + "@jsii/check-node" "1.93.0" + "@jsii/spec" "^1.93.0" "@xmldom/xmldom" "^0.8.10" chalk "^4" commonmark "^0.30.0" - fast-glob "^3.3.1" - jsii "~5.1.5" + fast-glob "^3.3.2" + jsii "~5.2.5" semver "^7.5.4" - semver-intersect "^1.4.0" + semver-intersect "^1.5.0" stream-json "^1.8.0" - typescript "~5.1.6" - workerpool "^6.4.0" + typescript "~5.2.2" + workerpool "^6.5.1" yargs "^17.7.2" jsii-srcmak@^0.1.951, jsii-srcmak@^0.1.954: @@ -2657,25 +2627,6 @@ jsii@^5.1.10, jsii@~5.2.38, jsii@~5.2.5: typescript "~5.2" yargs "^17.7.2" -jsii@~5.1.5: - version "5.1.12" - resolved "https://registry.yarnpkg.com/jsii/-/jsii-5.1.12.tgz#0ac6d92d52c6732a6e0e3e27f9f07453318715f2" - integrity sha512-iY3zLosUEKbeua6IAGJXjFxibiiI0xHFjyYPyewOc56MBRHC7nczWSVGRP+Jgwyo7HWXs4TvJKLG6w8zSuAZrg== - dependencies: - "@jsii/check-node" "1.88.0" - "@jsii/spec" "^1.88.0" - case "^1.6.3" - chalk "^4" - downlevel-dts "^0.11.0" - fast-deep-equal "^3.1.3" - log4js "^6.9.1" - semver "^7.5.4" - semver-intersect "^1.4.0" - sort-json "^2.0.1" - spdx-license-list "^6.6.0" - typescript "~5.1.6" - yargs "^17.7.2" - jsii@~5.2.0: version "5.2.35" resolved "https://registry.yarnpkg.com/jsii/-/jsii-5.2.35.tgz#d56a9cb8f01f709250df28b61b365c5978652538" @@ -3657,7 +3608,7 @@ semver@^6.0.0, semver@^6.3.0: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.5.1, semver@^7.5.3, semver@^7.5.4: +semver@^7.1.1, semver@^7.3.2, semver@^7.3.4, semver@^7.3.5, semver@^7.5.3, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -3821,7 +3772,7 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz#a14f64e0954f6e25cc6587bd4f392522db0d998f" integrity sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw== -spdx-license-list@^6.6.0, spdx-license-list@^6.8.0: +spdx-license-list@^6.8.0: version "6.8.0" resolved "https://registry.yarnpkg.com/spdx-license-list/-/spdx-license-list-6.8.0.tgz#92a99cd6c8b97fe98ae83c54deaffd4d9d503f74" integrity sha512-5UdM7r9yJ1EvsPQZWfa41AZjLQngl9iMMysm9XBW7Lqhq7aF8cllfqjS+rFCHB8FFMGSM0yFWue2LUV9mR0QzQ== @@ -4139,11 +4090,6 @@ typescript@~3.9.10: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== -typescript@~5.1.6: - version "5.1.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" - integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== - typescript@~5.2, typescript@~5.2.0, typescript@~5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" @@ -4289,11 +4235,6 @@ wordwrap@^1.0.0: resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -workerpool@^6.4.0: - version "6.4.2" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.4.2.tgz#5d086f6fef89adbc4300ca24fcafb7082330e960" - integrity sha512-MrDWwemtC4xNV22kbbZDQQQmxNX+yLm790sgYl2wVD3CWnK7LJY1youI/11wHorAjHjK+GEjUxUh74XoPU71uQ== - workerpool@^6.5.1: version "6.5.1" resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.5.1.tgz#060f73b39d0caf97c6db64da004cd01b4c099544"