From f2147c52562ab1aa2040fbf8dad8af06595b4173 Mon Sep 17 00:00:00 2001 From: Hunter Thompson Date: Wed, 1 Dec 2021 14:08:36 +0530 Subject: [PATCH] feat: upgrade cdk8s to v1.2.0 --- .eslintrc.json | 5 +- .gitattributes | 36 +- .github/workflows/build.yml | 4 +- .github/workflows/pull-request-lint.yml | 28 ++ .github/workflows/release.yml | 19 +- .../{upgrade.yml => upgrade-master.yml} | 36 +- .gitignore | 86 ++--- .npmignore | 35 +- .projen/deps.json | 20 +- .projen/tasks.json | 326 ++++++++++-------- .projenrc.js | 5 +- package.json | 45 ++- tsconfig.eslint.json => tsconfig.dev.json | 5 +- tsconfig.jest.json | 35 -- yarn.lock | 69 ++-- 15 files changed, 388 insertions(+), 366 deletions(-) create mode 100644 .github/workflows/pull-request-lint.yml rename .github/workflows/{upgrade.yml => upgrade-master.yml} (70%) rename tsconfig.eslint.json => tsconfig.dev.json (92%) delete mode 100644 tsconfig.jest.json diff --git a/.eslintrc.json b/.eslintrc.json index af1765b..f7cd225 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -12,7 +12,7 @@ "parserOptions": { "ecmaVersion": 2018, "sourceType": "module", - "project": "./tsconfig.eslint.json" + "project": "./tsconfig.dev.json" }, "extends": [ "plugin:import/typescript" @@ -27,7 +27,8 @@ "import/resolver": { "node": {}, "typescript": { - "project": "./tsconfig.eslint.json" + "project": "./tsconfig.dev.json", + "alwaysTryTypes": true } } }, diff --git a/.gitattributes b/.gitattributes index f5254c6..8923d2c 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,20 +1,20 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". -*.snap linguist-generated -/.eslintrc.json linguist-generated -/.gitattributes linguist-generated -/.github/workflows/build.yml linguist-generated -/.github/workflows/release.yml linguist-generated -/.github/workflows/stale.yml linguist-generated -/.github/workflows/upgrade.yml linguist-generated -/.gitignore linguist-generated -/.mergify.yml linguist-generated -/.npmignore linguist-generated -/.projen/** linguist-generated -/.projen/deps.json linguist-generated -/.projen/tasks.json linguist-generated -/LICENSE linguist-generated -/package.json linguist-generated -/tsconfig.eslint.json linguist-generated -/tsconfig.jest.json linguist-generated -/yarn.lock linguist-generated \ No newline at end of file +*.snap linguist-generated +/.eslintrc.json linguist-generated +/.gitattributes linguist-generated +/.github/workflows/build.yml linguist-generated +/.github/workflows/pull-request-lint.yml linguist-generated +/.github/workflows/release.yml linguist-generated +/.github/workflows/stale.yml linguist-generated +/.github/workflows/upgrade-master.yml linguist-generated +/.gitignore linguist-generated +/.mergify.yml linguist-generated +/.npmignore linguist-generated +/.projen/** linguist-generated +/.projen/deps.json linguist-generated +/.projen/tasks.json linguist-generated +/LICENSE linguist-generated +/package.json linguist-generated +/tsconfig.dev.json linguist-generated +/yarn.lock linguist-generated \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4a786f9..b0633df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: repository: ${{ github.event.pull_request.head.repo.full_name }} - name: Set git identity run: |- - git config user.name "Automation" + git config user.name "github-actions" git config user.email "github-actions@github.com" - name: Install dependencies run: yarn install --check-files --frozen-lockfile @@ -52,4 +52,4 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} container: - image: jsii/superchain + image: jsii/superchain:1-buster-slim diff --git a/.github/workflows/pull-request-lint.yml b/.github/workflows/pull-request-lint.yml new file mode 100644 index 0000000..2945378 --- /dev/null +++ b/.github/workflows/pull-request-lint.yml @@ -0,0 +1,28 @@ +# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". + +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@v3.4.6 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + types: |- + feat + fix + chore + requireScope: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d551dbd..eeec95b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: fetch-depth: 0 - name: Set git identity run: |- - git config user.name "Automation" + git config user.name "github-actions" git config user.email "github-actions@github.com" - name: Install dependencies run: yarn install --check-files --frozen-lockfile @@ -39,7 +39,7 @@ jobs: name: dist path: dist container: - image: jsii/superchain + image: jsii/superchain:1-buster-slim release_github: name: Publish to GitHub Releases needs: release @@ -54,10 +54,15 @@ jobs: name: dist path: dist - name: Release - run: gh release create v$(cat dist/version.txt) -R ${{ github.repository }} -F - dist/changelog.md -t v$(cat dist/version.txt) + run: errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R + $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) + --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode + -ne 0 ] && ! grep -q "Release.tag_name already exists" $errout; then + cat $errout; exit $exitcode; fi env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_REPOSITORY: ${{ github.repository }} + GITHUB_REF: ${{ github.ref }} release_npm: name: Publish to npm needs: release @@ -78,7 +83,7 @@ jobs: NPM_REGISTRY: registry.npmjs.org NPM_TOKEN: ${{ secrets.NPM_TOKEN }} container: - image: jsii/superchain + image: jsii/superchain:1-buster-slim-node14 release_pypi: name: Publish to PyPI needs: release @@ -98,7 +103,7 @@ jobs: TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }} TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }} container: - image: jsii/superchain + image: jsii/superchain:1-buster-slim-node14 release_golang: name: Publish to GitHub needs: release @@ -119,4 +124,4 @@ jobs: GIT_USER_EMAIL: aatman@auroville.org.in GITHUB_TOKEN: ${{ secrets.GO_GITHUB_TOKEN }} container: - image: jsii/superchain + image: jsii/superchain:1-buster-slim-node14 diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade-master.yml similarity index 70% rename from .github/workflows/upgrade.yml rename to .github/workflows/upgrade-master.yml index cf00bce..f7b3e2d 100644 --- a/.github/workflows/upgrade.yml +++ b/.github/workflows/upgrade-master.yml @@ -1,6 +1,6 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". -name: upgrade +name: upgrade-master on: workflow_dispatch: {} schedule: @@ -16,6 +16,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + ref: master + - name: Set git identity + run: |- + git config user.name "github-actions" + git config user.email "github-actions@github.com" - name: Install dependencies run: yarn install --check-files --frozen-lockfile - name: Upgrade dependencies @@ -34,7 +40,7 @@ jobs: name: .upgrade.tmp.patch path: .upgrade.tmp.patch container: - image: jsii/superchain + image: jsii/superchain:1-buster-slim pr: name: Create Pull Request needs: upgrade @@ -46,6 +52,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + with: + ref: master + - name: Set git identity + run: |- + git config user.name "github-actions" + git config user.email "github-actions@github.com" - name: Download patch uses: actions/download-artifact@v2 with: @@ -72,8 +84,8 @@ jobs: ------ - *Automatically created by projen via the "upgrade" workflow* - branch: github-actions/upgrade + *Automatically created by projen via the "upgrade-master" workflow* + branch: github-actions/upgrade-master title: "chore(deps): upgrade dependencies" body: >- Upgrades project dependencies. See details in [workflow run]. @@ -85,16 +97,20 @@ jobs: ------ - *Automatically created by projen via the "upgrade" workflow* + *Automatically created by projen via the "upgrade-master" workflow* + author: github-actions + committer: github-actions + signoff: true - name: Update status check if: steps.create-pr.outputs.pull-request-url != '' run: "curl -i --fail -X POST -H \"Accept: application/vnd.github.v3+json\" -H \"Authorization: token ${GITHUB_TOKEN}\" https://api.github.com/repos/${{ github.repository }}/check-runs -d - '{\"name\":\"build\",\"head_sha\":\"github-actions/upgrade\",\"status\ - \":\"completed\",\"conclusion\":\"${{ needs.upgrade.outputs.conclusion - }}\",\"output\":{\"title\":\"Created via the upgrade - workflow.\",\"summary\":\"Action run URL: https://github.com/${{ - github.repository }}/actions/runs/${{ github.run_id }}\"}}'" + '{\"name\":\"build\",\"head_sha\":\"github-actions/upgrade-master\",\ + \"status\":\"completed\",\"conclusion\":\"${{ + needs.upgrade.outputs.conclusion }}\",\"output\":{\"title\":\"Created + via the upgrade-master workflow.\",\"summary\":\"Action run URL: + https://github.com/${{ github.repository }}/actions/runs/${{ + github.run_id }}\"}}'" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 4f56f01..11649ce 100644 --- a/.gitignore +++ b/.gitignore @@ -1,56 +1,56 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". -*.lcov +!/.gitattributes +!/.projen/tasks.json +!/.projen/deps.json +!/.github/workflows/pull-request-lint.yml +!/.github/workflows/stale.yml +!/package.json +!/LICENSE +!/.npmignore +logs *.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +lerna-debug.log* +report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json +pids *.pid -*.pid.lock *.seed -*.tgz +*.pid.lock +lib-cov +*.lcov +.nyc_output +build/Release +node_modules/ +jspm_packages/ *.tsbuildinfo -.DS_Store -.cache .eslintcache -.idea -.jsii -.nyc_output -.vs_code +*.tgz .yarn-integrity -/coverage -/dist -/dist/changelog.md -/dist/version.txt -/lib +.cache +!/.projenrc.js /test-reports/ -build/Release -cdk.out -coverage -jspm_packages/ junit.xml -lerna-debug.log* -lib-cov -logs -node_modules/ -npm-debug.log* -pids -report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json -tsconfig.json -yarn-debug.log* -yarn-error.log -yarn-error.log* -!/.eslintrc.json -!/.gitattributes +/coverage/ !/.github/workflows/build.yml +/dist/changelog.md +/dist/version.txt !/.github/workflows/release.yml -!/.github/workflows/stale.yml -!/.github/workflows/upgrade.yml !/.mergify.yml -!/.npmignore -!/.projen/deps.json -!/.projen/tasks.json -!/.projenrc.js +!/test/ +!/tsconfig.dev.json +!/src/ +/lib +/dist/ +!/.eslintrc.json +.jsii +tsconfig.json !/API.md -!/LICENSE -!/package.json -!/src -!/test -!/tsconfig.eslint.json -!/tsconfig.jest.json +cdk.out +yarn-error.log +coverage +.DS_Store +.idea +.vs_code +!/.github/workflows/upgrade-master.yml diff --git a/.npmignore b/.npmignore index 471eeaa..efe7d67 100644 --- a/.npmignore +++ b/.npmignore @@ -1,24 +1,23 @@ # ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen". -/.eslintrc.json -/.github -/.idea -/.mergify.yml -/.projen -/.projenrc.js -/.vscode -/coverage +/.projen/ +/test-reports/ +junit.xml +/coverage/ /dist/changelog.md /dist/version.txt -/src -/test -/test-reports/ -/tsconfig.eslint.json -/tsconfig.jest.json -/tsconfig.json +/.mergify.yml +/test/ +/tsconfig.dev.json +/src/ +!/lib/ +!/lib/**/*.js +!/lib/**/*.d.ts dist -junit.xml +/tsconfig.json +/.github/ +/.vscode/ +/.idea/ +/.projenrc.js tsconfig.tsbuildinfo +/.eslintrc.json !.jsii -!/lib -!/lib/**/*.d.ts -!/lib/**/*.js diff --git a/.projen/deps.json b/.projen/deps.json index fd07a51..8a28a43 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -6,7 +6,7 @@ }, { "name": "@types/node", - "version": "^10.17.0", + "version": "^14.17.0", "type": "build" }, { @@ -17,19 +17,14 @@ "name": "@typescript-eslint/parser", "type": "build" }, - { - "name": "cdk8s-plus-17", - "version": "1.0.0-beta.50", - "type": "build" - }, { "name": "cdk8s", - "version": "1.0.0-beta.27", + "version": "1.2.0", "type": "build" }, { "name": "constructs", - "version": "3.3.120", + "version": "3.3.161", "type": "build" }, { @@ -104,19 +99,14 @@ "name": "typescript", "type": "build" }, - { - "name": "cdk8s-plus-17", - "version": "^1.0.0-beta.50", - "type": "peer" - }, { "name": "cdk8s", - "version": "^1.0.0-beta.27", + "version": "^1.2.0", "type": "peer" }, { "name": "constructs", - "version": "^3.3.120", + "version": "^3.3.161", "type": "peer" } ], diff --git a/.projen/tasks.json b/.projen/tasks.json index fae667a..db865c2 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -1,87 +1,37 @@ { "tasks": { - "compile": { - "name": "compile", - "description": "Only compile", - "steps": [ - { - "exec": "jsii --silence-warnings=reserved-word --no-fix-peer-dependencies" - }, - { - "spawn": "docgen" - } - ] - }, - "test:compile": { - "name": "test:compile", - "description": "compiles the test code", - "steps": [ - { - "exec": "tsc --noEmit --project tsconfig.jest.json" - } - ] - }, - "test": { - "name": "test", - "description": "Run tests", + "build": { + "name": "build", + "description": "Full release build", "steps": [ { - "exec": "rm -fr lib/" + "spawn": "default" }, { - "spawn": "test:compile" + "spawn": "pre-compile" }, { - "exec": "jest --passWithNoTests --all --updateSnapshot" + "spawn": "compile" }, { - "spawn": "eslint" - } - ] - }, - "build": { - "name": "build", - "description": "Full release build (test+compile)", - "steps": [ - { - "exec": "npx projen" + "spawn": "post-compile" }, { "spawn": "test" }, - { - "spawn": "compile" - }, { "spawn": "package" } ] }, - "test:watch": { - "name": "test:watch", - "description": "Run jest in watch mode", - "steps": [ - { - "exec": "jest --watch" - } - ] - }, - "test:update": { - "name": "test:update", - "description": "Update jest snapshots", - "steps": [ - { - "exec": "jest --updateSnapshot" - } - ] - }, "bump": { "name": "bump", "description": "Bumps version based on latest git tag and generates a changelog entry", "env": { "OUTFILE": "package.json", "CHANGELOG": "dist/changelog.md", - "BUMPFILE": "dist/version.txt" + "BUMPFILE": "dist/version.txt", + "RELEASETAG": "dist/releasetag.txt" }, "steps": [ { @@ -90,115 +40,100 @@ ], "condition": "! git log --oneline -1 | grep -q \"chore(release):\"" }, - "unbump": { - "name": "unbump", - "description": "Restores version to 0.0.0", - "env": { - "OUTFILE": "package.json", - "CHANGELOG": "dist/changelog.md", - "BUMPFILE": "dist/version.txt" - }, + "compat": { + "name": "compat", + "description": "Perform API compatibility check against latest version", "steps": [ { - "builtin": "release/reset-version" + "exec": "jsii-diff npm:$(node -p \"require('./package.json').name\") -k --ignore-file .compatignore || (echo \"\nUNEXPECTED BREAKING CHANGES: add keys such as 'removed:constructs.Node.of' to .compatignore to skip.\n\" && exit 1)" } ] }, - "publish:github": { - "name": "publish:github", - "description": "Publish this package to GitHub Releases", - "requiredEnv": [ - "GITHUB_TOKEN" - ], + "compile": { + "name": "compile", + "description": "Only compile", "steps": [ { - "exec": "gh release create v$(cat dist/version.txt) -R ${{ github.repository }} -F dist/changelog.md -t v$(cat dist/version.txt)" + "exec": "jsii --silence-warnings=reserved-word --no-fix-peer-dependencies" } ] }, - "upgrade": { - "name": "upgrade", - "description": "upgrade dependencies", - "env": { - "CI": "0" - }, + "default": { + "name": "default", + "description": "Synthesize project files", "steps": [ { - "exec": "npm-check-updates --upgrade --target=minor --reject='projen'" - }, - { - "exec": "yarn install --check-files" - }, - { - "exec": "yarn upgrade @types/jest @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser cdk8s-plus-17 cdk8s constructs eslint eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import jest jest-junit jsii jsii-diff jsii-docgen jsii-pacmak json-schema npm-check-updates prettier standard-version ts-jest typescript cdk8s-plus-17 cdk8s constructs" - }, - { - "exec": "npx projen" + "exec": "node .projenrc.js" } ] }, - "upgrade-projen": { - "name": "upgrade-projen", - "description": "upgrade projen", - "env": { - "CI": "0" - }, + "docgen": { + "name": "docgen", + "description": "Generate API.md from .jsii manifest", "steps": [ { - "exec": "npm-check-updates --upgrade --target=minor --filter='projen'" - }, - { - "exec": "yarn install --check-files" - }, - { - "exec": "yarn upgrade projen" - }, - { - "exec": "npx projen" + "exec": "jsii-docgen" } ] }, - "default": { - "name": "default", + "eslint": { + "name": "eslint", + "description": "Runs eslint against the codebase", "steps": [ { - "exec": "node .projenrc.js" + "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools .projenrc.js" } ] }, - "watch": { - "name": "watch", - "description": "Watch & compile in the background", + "package": { + "name": "package", + "description": "Creates the distribution package", "steps": [ { - "exec": "jsii -w --silence-warnings=reserved-word --no-fix-peer-dependencies" + "exec": "jsii-pacmak" } ] }, - "package": { - "name": "package", - "description": "Create an npm tarball", + "post-compile": { + "name": "post-compile", + "description": "Runs after successful compilation", "steps": [ { - "exec": "jsii-pacmak" + "spawn": "docgen" } ] }, - "eslint": { - "name": "eslint", - "description": "Runs eslint against the codebase", + "pre-compile": { + "name": "pre-compile", + "description": "Prepare the project for compilation" + }, + "publish:github": { + "name": "publish:github", + "description": "Publish this package to GitHub Releases", + "requiredEnv": [ + "GITHUB_TOKEN", + "GITHUB_REPOSITORY", + "GITHUB_REF" + ], "steps": [ { - "exec": "eslint --ext .ts,.tsx --fix --no-error-on-unmatched-pattern src test build-tools .projenrc.js" + "exec": "errout=$(mktemp); gh release create $(cat dist/releasetag.txt) -R $GITHUB_REPOSITORY -F dist/changelog.md -t $(cat dist/releasetag.txt) --target $GITHUB_REF 2> $errout && true; exitcode=$?; if [ $exitcode -ne 0 ] && ! grep -q \"Release.tag_name already exists\" $errout; then cat $errout; exit $exitcode; fi" } ] }, - "compat": { - "name": "compat", - "description": "Perform API compatibility check against latest version", + "publish:golang": { + "name": "publish:golang", + "description": "Publish this package to GitHub", + "env": { + "GIT_USER_NAME": "Hunter-Thompson", + "GIT_USER_EMAIL": "aatman@auroville.org.in" + }, + "requiredEnv": [ + "GITHUB_TOKEN" + ], "steps": [ { - "exec": "jsii-diff npm:$(node -p \"require('./package.json').name\") -k --ignore-file .compatignore || (echo \"\nUNEXPECTED BREAKING CHANGES: add keys such as 'removed:constructs.Node.of' to .compatignore to skip.\n\" && exit 1)" + "exec": "npx -p jsii-release@latest jsii-release-golang" } ] }, @@ -231,52 +166,147 @@ } ] }, - "publish:golang": { - "name": "publish:golang", - "description": "Publish this package to GitHub", + "release": { + "name": "release", + "description": "Prepare a release from \"master\" branch", "env": { - "GIT_USER_NAME": "Hunter-Thompson", - "GIT_USER_EMAIL": "aatman@auroville.org.in" + "RELEASE": "true" }, - "requiredEnv": [ - "GITHUB_TOKEN" - ], "steps": [ { - "exec": "npx -p jsii-release@latest jsii-release-golang" + "exec": "rm -fr dist" + }, + { + "spawn": "bump" + }, + { + "spawn": "build" + }, + { + "spawn": "unbump" + }, + { + "exec": "git diff --ignore-space-at-eol --exit-code" } ] }, - "docgen": { - "name": "docgen", - "description": "Generate API.md from .jsii manifest", + "test": { + "name": "test", + "description": "Run tests", "steps": [ { - "exec": "jsii-docgen" + "exec": "jest --passWithNoTests --all --updateSnapshot" + }, + { + "spawn": "eslint" } ] }, - "release": { - "name": "release", - "description": "Prepare a release from \"master\" branch", + "test:update": { + "name": "test:update", + "description": "Update jest snapshots", + "steps": [ + { + "exec": "jest --updateSnapshot" + } + ] + }, + "test:watch": { + "name": "test:watch", + "description": "Run jest in watch mode", + "steps": [ + { + "exec": "jest --watch" + } + ] + }, + "unbump": { + "name": "unbump", + "description": "Restores version to 0.0.0", "env": { - "RELEASE": "true" + "OUTFILE": "package.json", + "CHANGELOG": "dist/changelog.md", + "BUMPFILE": "dist/version.txt", + "RELEASETAG": "dist/releasetag.txt" }, "steps": [ { - "exec": "rm -fr dist" + "builtin": "release/reset-version" + } + ] + }, + "upgrade": { + "name": "upgrade", + "description": "upgrade dependencies", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npm-check-updates --dep dev --upgrade --target=minor --reject='projen'" }, { - "spawn": "bump" + "exec": "npm-check-updates --dep optional --upgrade --target=minor --reject='projen'" }, { - "spawn": "build" + "exec": "npm-check-updates --dep peer --upgrade --target=minor --reject='projen'" }, { - "spawn": "unbump" + "exec": "npm-check-updates --dep prod --upgrade --target=minor --reject='projen'" }, { - "exec": "git diff --ignore-space-at-eol --exit-code" + "exec": "npm-check-updates --dep bundle --upgrade --target=minor --reject='projen'" + }, + { + "exec": "yarn install --check-files" + }, + { + "exec": "yarn upgrade @types/jest @types/node @typescript-eslint/eslint-plugin @typescript-eslint/parser cdk8s constructs eslint eslint-import-resolver-node eslint-import-resolver-typescript eslint-plugin-import jest jest-junit jsii jsii-diff jsii-docgen jsii-pacmak json-schema npm-check-updates prettier standard-version ts-jest typescript cdk8s constructs" + }, + { + "exec": "npx projen" + } + ] + }, + "upgrade-projen": { + "name": "upgrade-projen", + "description": "upgrade projen", + "env": { + "CI": "0" + }, + "steps": [ + { + "exec": "npm-check-updates --dep dev --upgrade --target=minor --filter='projen'" + }, + { + "exec": "npm-check-updates --dep optional --upgrade --target=minor --filter='projen'" + }, + { + "exec": "npm-check-updates --dep peer --upgrade --target=minor --filter='projen'" + }, + { + "exec": "npm-check-updates --dep prod --upgrade --target=minor --filter='projen'" + }, + { + "exec": "npm-check-updates --dep bundle --upgrade --target=minor --filter='projen'" + }, + { + "exec": "yarn install --check-files" + }, + { + "exec": "yarn upgrade projen" + }, + { + "exec": "npx projen" + } + ] + }, + "watch": { + "name": "watch", + "description": "Watch & compile in the background", + "steps": [ + { + "exec": "jsii -w --silence-warnings=reserved-word --no-fix-peer-dependencies" } ] } diff --git a/.projenrc.js b/.projenrc.js index 13cfe47..06ae4cd 100644 --- a/.projenrc.js +++ b/.projenrc.js @@ -3,9 +3,8 @@ const { ConstructLibraryCdk8s } = require('projen'); const project = new ConstructLibraryCdk8s({ author: 'Sumit Agarwal', authorAddress: 'sa.sumit@outlook.com', - cdk8sVersion: '1.0.0-beta.27', - cdk8sPlusVersion: '1.0.0-beta.50', - constructsVersion: '3.3.120', + cdk8sVersion: '1.2.0', + constructsVersion: '3.3.161', defaultReleaseBranch: 'master', stability: 'experimental', jsiiFqn: 'projen.ConstructLibraryCdk8s', diff --git a/package.json b/package.json index d327511..74ea528 100644 --- a/package.json +++ b/package.json @@ -5,27 +5,28 @@ "url": "https://github.com/opencdk8s/cdk8s-argo-rollout" }, "scripts": { - "compile": "npx projen compile", - "test:compile": "npx projen test:compile", - "test": "npx projen test", "build": "npx projen build", - "test:watch": "npx projen test:watch", - "test:update": "npx projen test:update", "bump": "npx projen bump", - "unbump": "npx projen unbump", - "publish:github": "npx projen publish:github", - "upgrade": "npx projen upgrade", - "upgrade-projen": "npx projen upgrade-projen", + "compat": "npx projen compat", + "compile": "npx projen compile", "default": "npx projen default", - "watch": "npx projen watch", - "package": "npx projen package", + "docgen": "npx projen docgen", "eslint": "npx projen eslint", - "compat": "npx projen compat", + "package": "npx projen package", + "post-compile": "npx projen post-compile", + "pre-compile": "npx projen pre-compile", + "publish:github": "npx projen publish:github", + "publish:golang": "npx projen publish:golang", "publish:npm": "npx projen publish:npm", "publish:pypi": "npx projen publish:pypi", - "publish:golang": "npx projen publish:golang", - "docgen": "npx projen docgen", "release": "npx projen release", + "test": "npx projen test", + "test:update": "npx projen test:update", + "test:watch": "npx projen test:watch", + "unbump": "npx projen unbump", + "upgrade": "npx projen upgrade", + "upgrade-projen": "npx projen upgrade-projen", + "watch": "npx projen watch", "projen": "npx projen" }, "author": { @@ -35,12 +36,11 @@ }, "devDependencies": { "@types/jest": "^26.0.24", - "@types/node": "^10.17.0", + "@types/node": "^14.17.0", "@typescript-eslint/eslint-plugin": "^4.31.1", "@typescript-eslint/parser": "^4.31.1", - "cdk8s": "1.0.0-beta.27", - "cdk8s-plus-17": "1.0.0-beta.50", - "constructs": "3.3.120", + "cdk8s": "1.2.0", + "constructs": "3.3.161", "eslint": "^7.32.0", "eslint-import-resolver-node": "^0.3.6", "eslint-import-resolver-typescript": "^2.5.0", @@ -54,15 +54,14 @@ "json-schema": "^0.3.0", "npm-check-updates": "^11", "prettier": "^2.2.1", - "projen": "^0.27.28", + "projen": "^0.36.0", "standard-version": "^9", "ts-jest": "^26.5.6", "typescript": "^3.9.10" }, "peerDependencies": { - "cdk8s": "^1.0.0-beta.27", - "cdk8s-plus-17": "^1.0.0-beta.50", - "constructs": "^3.3.120" + "cdk8s": "^1.2.0", + "constructs": "^3.3.161" }, "bundledDependencies": [], "keywords": [ @@ -109,7 +108,7 @@ "preset": "ts-jest", "globals": { "ts-jest": { - "tsconfig": "tsconfig.jest.json" + "tsconfig": "tsconfig.dev.json" } } }, diff --git a/tsconfig.eslint.json b/tsconfig.dev.json similarity index 92% rename from tsconfig.eslint.json rename to tsconfig.dev.json index 06833d1..2e29dba 100644 --- a/tsconfig.eslint.json +++ b/tsconfig.dev.json @@ -2,11 +2,12 @@ "compilerOptions": { "alwaysStrict": true, "declaration": true, + "esModuleInterop": true, "experimentalDecorators": true, "inlineSourceMap": true, "inlineSources": true, "lib": [ - "es2018" + "es2019" ], "module": "CommonJS", "noEmitOnError": false, @@ -21,7 +22,7 @@ "strictNullChecks": true, "strictPropertyInitialization": true, "stripInternal": true, - "target": "ES2018" + "target": "ES2019" }, "include": [ ".projenrc.js", diff --git a/tsconfig.jest.json b/tsconfig.jest.json deleted file mode 100644 index 06833d1..0000000 --- a/tsconfig.jest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "compilerOptions": { - "alwaysStrict": true, - "declaration": true, - "experimentalDecorators": true, - "inlineSourceMap": true, - "inlineSources": true, - "lib": [ - "es2018" - ], - "module": "CommonJS", - "noEmitOnError": false, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noImplicitThis": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "resolveJsonModule": true, - "strict": true, - "strictNullChecks": true, - "strictPropertyInitialization": true, - "stripInternal": true, - "target": "ES2018" - }, - "include": [ - ".projenrc.js", - "src/**/*.ts", - "test/**/*.ts" - ], - "exclude": [ - "node_modules" - ], - "//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\"." -} diff --git a/yarn.lock b/yarn.lock index e019e4b..c2e1a48 100644 --- a/yarn.lock +++ b/yarn.lock @@ -784,10 +784,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708" integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g== -"@types/node@^10.17.0": - version "10.17.60" - resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" - integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== +"@types/node@^14.17.0": + version "14.17.34" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.34.tgz#fe4b38b3f07617c0fa31ae923fca9249641038f0" + integrity sha512-USUftMYpmuMzeWobskoPfzDi+vkpe0dvcOBRNOscFrGxVp4jomnRxWuVohgqBow2xyIPC0S3gjxV/5079jhmDg== "@types/normalize-package-data@^2.4.0": version "2.4.1" @@ -1463,21 +1463,14 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -cdk8s-plus-17@1.0.0-beta.50: - version "1.0.0-beta.50" - resolved "https://registry.yarnpkg.com/cdk8s-plus-17/-/cdk8s-plus-17-1.0.0-beta.50.tgz#d454f95c12bbc15a1083ae339d6059b729cd325c" - integrity sha512-LC4vj11AMWkUTokqbndcwX2mmmHTQ0KLS4kDfTFjvmxTvWkLWan7qPgmlkUU3Knch+zIo+FQax5s0wTWixFPBA== - dependencies: - minimatch "^3.0.4" - -cdk8s@1.0.0-beta.27: - version "1.0.0-beta.27" - resolved "https://registry.yarnpkg.com/cdk8s/-/cdk8s-1.0.0-beta.27.tgz#3bd1d8bef14dfffaa46022ab7b465599b4a2863c" - integrity sha512-6WGhwIQ0zRrJfGDIxfpqwCsj6Varuds90xp3dEwym68ZLfROn/sq8Kdwr8QlMWf50qbcja+TLdqKgAt185a/ig== +cdk8s@1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/cdk8s/-/cdk8s-1.2.0.tgz#c1b024488fcb375035bbfbe0be62041d76d30d1a" + integrity sha512-oEWFKc5ELBr9Yv78dDaraAzIKSUG6E4MC12bfmZKLGL/NceZeJvOpCLTVRoz721MeGW8g5eqoftWQkiAeN21ww== dependencies: fast-json-patch "^2.2.1" - follow-redirects "^1.14.1" - yaml "2.0.0-5" + follow-redirects "^1.14.5" + yaml "2.0.0-7" chalk@^2.0.0, chalk@^2.4.2: version "2.4.2" @@ -1716,10 +1709,10 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0: resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" integrity sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4= -constructs@3.3.120: - version "3.3.120" - resolved "https://registry.yarnpkg.com/constructs/-/constructs-3.3.120.tgz#bc0bb45e5b06dededada45191236a4434d9d3766" - integrity sha512-BNMjRXLZ98jrxhKJFOUN7NSgZS1BhFeIplPwXQrQ3nyTyF3ndtAk9YQLldrHKtnRbLXGE8IM+/85kwlnmfxJzA== +constructs@3.3.161: + version "3.3.161" + resolved "https://registry.yarnpkg.com/constructs/-/constructs-3.3.161.tgz#9726b1d450f3b9aca7907230f2248e3fd4058ce4" + integrity sha512-/27vW3fo0iyb3py4vKI1BduEYmv8vv8uJgLXvI+5F0Jbnn0/E+As2wkGMa7bumhzCd0Ckv/USkAXstGYVXTYQA== conventional-changelog-angular@^5.0.12: version "5.0.13" @@ -1743,7 +1736,7 @@ conventional-changelog-codemirror@^2.0.8: dependencies: q "^1.5.1" -conventional-changelog-config-spec@2.1.0: +conventional-changelog-config-spec@2.1.0, conventional-changelog-config-spec@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/conventional-changelog-config-spec/-/conventional-changelog-config-spec-2.1.0.tgz#874a635287ef8b581fd8558532bf655d4fb59f2d" integrity sha512-IpVePh16EbbB02V+UA+HQnnPIohgXvJRxHcS5+Uwk4AT5LjzCZJm5sp/yqs5C6KZJ1jMsV4paEV13BN1pvDuxQ== @@ -2027,11 +2020,6 @@ decamelize@^1.1.0, decamelize@^1.2.0: resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - decamelize@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-5.0.0.tgz#88358157b010ef133febfd27c18994bd80c6215b" @@ -2784,10 +2772,10 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== -follow-redirects@^1.14.1: - version "1.14.3" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.3.tgz#6ada78118d8d24caee595595accdc0ac6abd022e" - integrity sha512-3MkHxknWMUtb23apkgz/83fDoe+y+qr0TdgacGIA7bew+QLBo3vdgEN2xEsuXNivpFy4CyDhBBZnNZOtalmenw== +follow-redirects@^1.14.5: + version "1.14.5" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.5.tgz#f09a5848981d3c772b5392309778523f8d85c381" + integrity sha512-wtphSXy7d4/OR+MvIFbCVBDzZ5520qV8XfPklSN5QtxuMUJZ+b0Wnst1e1lCDocfzuCkHqj8k0FpZqO+UIaKNA== for-in@^1.0.2: version "1.0.2" @@ -5516,14 +5504,15 @@ progress@^2.0.0, progress@^2.0.3: resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== -projen@^0.27.28: - version "0.27.28" - resolved "https://registry.yarnpkg.com/projen/-/projen-0.27.28.tgz#331f5196dd3e191531a2a340c83b2d766292890d" - integrity sha512-MCMvePcuwfKwt27FBNwwODECcqXs6bKbU1gW4iqt7yOfmawfmAO+NAm1nc1AG48M7Ec22ZyvTU7r+vjZgaamrA== +projen@^0.36.0: + version "0.36.0" + resolved "https://registry.yarnpkg.com/projen/-/projen-0.36.0.tgz#e3201f2963a50bb1be16ce37d7a0aa03f5f9907f" + integrity sha512-j8bN/CnvuBHDVri2We3lssMHJLWDO2r9lLi2e7RQeYz1UGYu4hu445SEyoi8inkf0D4TZrVFjNk3gLbCslMVBQ== dependencies: "@iarna/toml" "^2.2.5" + case "^1.6.3" chalk "^4.1.2" - decamelize "^4.0.0" + conventional-changelog-config-spec "^2.1.0" fs-extra "^9.1.0" glob "^7" ini "^2.0.0" @@ -7101,10 +7090,10 @@ yallist@^4.0.0: resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== -yaml@2.0.0-5: - version "2.0.0-5" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.0.0-5.tgz#00906046dc119427b2b4f7cf9041d34682d1480b" - integrity sha512-qH5L5eqW8cyv/N1U6rkK/O0M7kOK3BSo48d05Ptm03ITNsVFwg6TQ47wR72Db/ULWH5RfNJv+CqnG17Pyn8eqQ== +yaml@2.0.0-7: + version "2.0.0-7" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.0.0-7.tgz#9799d9d85dfc8f01e4cc425e18e09215364beef1" + integrity sha512-RbI2Tm3hl9AoHY4wWyWvGvJfFIbHOzuzaxum6ez1A0vve+uXgNor03Wys4t+2sgjJSVSe+B2xerd1/dnvqHlOA== yaml@^1.10.2: version "1.10.2"