diff --git a/.backportrc.json b/.backportrc.json index 358c26a0..464a447a 100644 --- a/.backportrc.json +++ b/.backportrc.json @@ -9,7 +9,8 @@ "targetBranchChoices": [ "main", "maintenance/v5.4", - "maintenance/v5.5" + "maintenance/v5.5", + "maintenance/v5.6" ], "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." } diff --git a/.gitattributes b/.gitattributes index 0a695bae..316848e3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -10,9 +10,11 @@ /.github/workflows/auto-merge.yml linguist-generated /.github/workflows/auto-tag-dev-v5.4.yml linguist-generated /.github/workflows/auto-tag-dev-v5.5.yml linguist-generated +/.github/workflows/auto-tag-dev-v5.6.yml linguist-generated /.github/workflows/auto-tag-dev.yml linguist-generated /.github/workflows/auto-tag-releases-v5.4.yml linguist-generated /.github/workflows/auto-tag-releases-v5.5.yml linguist-generated +/.github/workflows/auto-tag-releases-v5.6.yml linguist-generated /.github/workflows/auto-tag-releases.yml linguist-generated /.github/workflows/backport.yml linguist-generated /.github/workflows/build.yml linguist-generated @@ -21,6 +23,7 @@ /.github/workflows/upgrade-main.yml linguist-generated /.github/workflows/upgrade-maintenance-v5.4.yml linguist-generated /.github/workflows/upgrade-maintenance-v5.5.yml linguist-generated +/.github/workflows/upgrade-maintenance-v5.6.yml linguist-generated /.gitignore linguist-generated /.npmignore linguist-generated /.prettierrc.json linguist-generated diff --git a/.github/workflows/auto-tag-dev-v5.6.yml b/.github/workflows/auto-tag-dev-v5.6.yml new file mode 100644 index 00000000..755b3802 --- /dev/null +++ b/.github/workflows/auto-tag-dev-v5.6.yml @@ -0,0 +1,59 @@ +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". + +name: auto-tag-dev-v5.6 +run-name: Auto-Tag Prerelease (v5.6) +on: + schedule: + - cron: 0 15 * * 0,2-6 + workflow_dispatch: {} +jobs: + pre-flight: + name: Pre-Flight Checks + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + sha: ${{ steps.git.outputs.sha }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + repository: ${{ github.repository }} + ref: maintenance/v5.6 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version: "18" + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Build + run: yarn build + - name: Identify git SHA + id: git + run: echo sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT + auto-tag: + name: Auto-Tag Release + needs: pre-flight + runs-on: ubuntu-latest + permissions: {} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + repository: ${{ github.repository }} + token: ${{ secrets.PROJEN_GITHUB_TOKEN }} + ref: ${{ needs.pre-flight.outputs.sha }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version: "18" + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Set git identity + run: |- + git config user.name "github-actions" + git config user.email "github-actions@github.com" + - name: Tag PreRelease + run: yarn tag-release --idempotent --no-sign --push --prerelease=dev --release-line=5.6 diff --git a/.github/workflows/auto-tag-dev.yml b/.github/workflows/auto-tag-dev.yml index b4d42cb2..13bdc686 100644 --- a/.github/workflows/auto-tag-dev.yml +++ b/.github/workflows/auto-tag-dev.yml @@ -56,4 +56,4 @@ jobs: git config user.name "github-actions" git config user.email "github-actions@github.com" - name: Tag PreRelease - run: yarn tag-release --idempotent --no-sign --push --prerelease=dev --release-line=5.6 + run: yarn tag-release --idempotent --no-sign --push --prerelease=dev --release-line=5.7 diff --git a/.github/workflows/auto-tag-releases-v5.6.yml b/.github/workflows/auto-tag-releases-v5.6.yml new file mode 100644 index 00000000..a11d391a --- /dev/null +++ b/.github/workflows/auto-tag-releases-v5.6.yml @@ -0,0 +1,59 @@ +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". + +name: auto-tag-releases-v5.6 +run-name: Auto-Tag Release (v5.6) +on: + schedule: + - cron: 0 15 * * 1 + workflow_dispatch: {} +jobs: + pre-flight: + name: Pre-Flight Checks + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + sha: ${{ steps.git.outputs.sha }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + repository: ${{ github.repository }} + ref: maintenance/v5.6 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version: "18" + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Build + run: yarn build + - name: Identify git SHA + id: git + run: echo sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT + auto-tag: + name: Auto-Tag Release + needs: pre-flight + runs-on: ubuntu-latest + permissions: {} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + repository: ${{ github.repository }} + token: ${{ secrets.PROJEN_GITHUB_TOKEN }} + ref: ${{ needs.pre-flight.outputs.sha }} + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + cache: yarn + node-version: "18" + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Set git identity + run: |- + git config user.name "github-actions" + git config user.email "github-actions@github.com" + - name: Tag Release + run: yarn tag-release --idempotent --no-sign --push --release-line=5.6 diff --git a/.github/workflows/auto-tag-releases.yml b/.github/workflows/auto-tag-releases.yml index efce2a93..b395e680 100644 --- a/.github/workflows/auto-tag-releases.yml +++ b/.github/workflows/auto-tag-releases.yml @@ -56,4 +56,4 @@ jobs: git config user.name "github-actions" git config user.email "github-actions@github.com" - name: Tag Release - run: yarn tag-release --idempotent --no-sign --push --release-line=5.6 + run: yarn tag-release --idempotent --no-sign --push --release-line=5.7 diff --git a/.github/workflows/upgrade-maintenance-v5.6.yml b/.github/workflows/upgrade-maintenance-v5.6.yml new file mode 100644 index 00000000..3671992e --- /dev/null +++ b/.github/workflows/upgrade-maintenance-v5.6.yml @@ -0,0 +1,97 @@ +# ~~ Generated by projen. To modify, edit .projenrc.ts and run "npx projen". + +name: upgrade-maintenance-v5.6 +on: + workflow_dispatch: {} + schedule: + - cron: 0 0 * * * +jobs: + upgrade: + name: Upgrade + runs-on: ubuntu-latest + permissions: + contents: read + outputs: + patch_created: ${{ steps.create_patch.outputs.patch_created }} + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: maintenance/v5.6 + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: lts/* + - name: Install dependencies + run: yarn install --check-files --frozen-lockfile + - name: Back-port projenrc changes from main + env: + CI: "false" + run: git fetch origin main && git checkout FETCH_HEAD -- README.md && yarn projen + - name: Upgrade dependencies + run: npx projen upgrade + - name: Find mutations + id: create_patch + run: |- + git add . + git diff --staged --patch --exit-code > repo.patch || echo "patch_created=true" >> $GITHUB_OUTPUT + working-directory: ./ + - name: Upload patch + if: steps.create_patch.outputs.patch_created + uses: actions/upload-artifact@v4.4.0 + with: + name: repo.patch + path: repo.patch + overwrite: true + pr: + name: Create Pull Request + needs: upgrade + runs-on: ubuntu-latest + permissions: + contents: read + if: ${{ needs.upgrade.outputs.patch_created }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + ref: maintenance/v5.6 + - name: Download patch + uses: actions/download-artifact@v4 + with: + name: repo.patch + path: ${{ runner.temp }} + - name: Apply patch + run: '[ -s ${{ runner.temp }}/repo.patch ] && git apply ${{ runner.temp }}/repo.patch || echo "Empty patch. Skipping."' + - name: Set git identity + run: |- + git config user.name "github-actions" + git config user.email "github-actions@github.com" + - name: Create Pull Request + id: create-pr + uses: peter-evans/create-pull-request@v6 + with: + token: ${{ secrets.PROJEN_GITHUB_TOKEN }} + commit-message: |- + chore(deps): upgrade dependencies + + Upgrades project dependencies. See details in [workflow run]. + + [Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + + ------ + + *Automatically created by projen via the "upgrade-maintenance-v5.6" workflow* + branch: github-actions/upgrade-maintenance-v5.6 + title: "chore(deps): upgrade dependencies" + labels: auto-approve + body: |- + Upgrades project dependencies. See details in [workflow run]. + + [Workflow Run]: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} + + ------ + + *Automatically created by projen via the "upgrade-maintenance-v5.6" workflow* + author: github-actions + committer: github-actions + signoff: true diff --git a/.gitignore b/.gitignore index 2e0ac6a3..7475af89 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ jspm_packages/ !/.github/workflows/upgrade-main.yml !/.github/workflows/upgrade-maintenance-v5.4.yml !/.github/workflows/upgrade-maintenance-v5.5.yml +!/.github/workflows/upgrade-maintenance-v5.6.yml /build-tools/tsconfig.json /projenrc/tsconfig.json /test/tsconfig.json @@ -63,6 +64,8 @@ jspm_packages/ !/.github/workflows/auto-tag-releases-v5.4.yml !/.github/workflows/auto-tag-dev-v5.5.yml !/.github/workflows/auto-tag-releases-v5.5.yml +!/.github/workflows/auto-tag-dev-v5.6.yml +!/.github/workflows/auto-tag-releases-v5.6.yml !/.backportrc.json !/.github/workflows/backport.yml !/.projenrc.ts diff --git a/.projen/deps.json b/.projen/deps.json index b0159208..20bfbb50 100644 --- a/.projen/deps.json +++ b/.projen/deps.json @@ -182,7 +182,7 @@ }, { "name": "typescript", - "version": "~5.6", + "version": "~5.7", "type": "runtime" }, { diff --git a/.projen/files.json b/.projen/files.json index 124bfbb6..131a036b 100644 --- a/.projen/files.json +++ b/.projen/files.json @@ -8,9 +8,11 @@ ".github/workflows/auto-merge.yml", ".github/workflows/auto-tag-dev-v5.4.yml", ".github/workflows/auto-tag-dev-v5.5.yml", + ".github/workflows/auto-tag-dev-v5.6.yml", ".github/workflows/auto-tag-dev.yml", ".github/workflows/auto-tag-releases-v5.4.yml", ".github/workflows/auto-tag-releases-v5.5.yml", + ".github/workflows/auto-tag-releases-v5.6.yml", ".github/workflows/auto-tag-releases.yml", ".github/workflows/backport.yml", ".github/workflows/build.yml", @@ -19,6 +21,7 @@ ".github/workflows/upgrade-main.yml", ".github/workflows/upgrade-maintenance-v5.4.yml", ".github/workflows/upgrade-maintenance-v5.5.yml", + ".github/workflows/upgrade-maintenance-v5.6.yml", ".gitignore", ".npmignore", ".prettierrc.json", diff --git a/.projenrc.ts b/.projenrc.ts index 93792e00..c7b08d7c 100644 --- a/.projenrc.ts +++ b/.projenrc.ts @@ -11,20 +11,18 @@ import { UpgradeDependencies } from './projenrc/upgrade-dependencies'; // 1. Fork the current `main` to a maintenance branch: // `git switch main && git fetch --all && git pull` // `git push origin main:maintenance/vX.Y` (X.Y is the TS version that is about to be replaced by a new release) -// 2. Add a branch protection rule for the new maintenance branch. -// Copy the settings from the most recent maintenance branch. -// 3. Edit `projenrc/support.ts`, set maintenance EOL date for the new maintenance version to be 6 months from +// 2. Edit `projenrc/support.ts`, set maintenance EOL date for the new maintenance version to be 6 months from // today (round up to the mid-point or end of month), make the new version current. -// 4. Update `minNodeVersion` to the oldest LTS version of Node (i.e. dropping support for EOL versions of Node) -// 5. Update the version list in the README (remember to remove EOS versions) -// 6. If any versions dropped into EOS, change the respective branch protection rule to include "Lock branch" -// 7. `npx projen` -// 8. `npx projen build` and resolve any new test failures that might be introduced by the new TS version -// 9. Create a PR, with title "feat: TypeScript X.Y" -// 10. Note that merging the PR doesn't trigger a release. Release are performed on a weekly schedule. +// 3. Update `minNodeVersion` to the oldest LTS version of Node (i.e. dropping support for EOL versions of Node) +// 4. Update the version list in the README (remember to remove EOS versions) +// 5. If any versions dropped into EOS, add the respective branch to the "end-of-support" ruleset. +// 6. `npx projen` +// 7. `npx projen build` and resolve any new test failures that might be introduced by the new TS version +// 8. Create a PR, with title "feat: TypeScript X.Y" +// 9. Note that merging the PR doesn't trigger a release. Release are performed on a weekly schedule. // You need to manually create a release by triggering this workflow: // https://github.com/aws/jsii-compiler/actions/workflows/auto-tag-releases.yml -// 11. Perform new version steps for `jsii-rosetta` +// 10. Perform new version steps for `jsii-rosetta` const project = new typescript.TypeScriptProject({ projenrcTs: true, diff --git a/README.md b/README.md index 3925e5ea..3707fdc7 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,8 @@ The current status of `jsii` compiler releases is: | Release | Status | EOS | Comment | | ------- | ----------- | ---------- | --------------------------------------------------------------------------------------- | -| `5.6.x` | Current | TBD | ![npm](https://img.shields.io/npm/v/jsii/v5.6-latest?label=jsii%40v5.6-latest&logo=npm) | +| `5.7.x` | Current | TBD | ![npm](https://img.shields.io/npm/v/jsii/v5.7-latest?label=jsii%40v5.7-latest&logo=npm) | +| `5.6.x` | Maintenance | 2025-07-01 | ![npm](https://img.shields.io/npm/v/jsii/v5.6-latest?label=jsii%40v5.6-latest&logo=npm) | | `5.5.x` | Maintenance | 2025-05-15 | ![npm](https://img.shields.io/npm/v/jsii/v5.5-latest?label=jsii%40v5.5-latest&logo=npm) | | `5.4.x` | Maintenance | 2025-02-28 | ![npm](https://img.shields.io/npm/v/jsii/v5.4-latest?label=jsii%40v5.4-latest&logo=npm) | diff --git a/package.json b/package.json index 9793403a..78ce4987 100644 --- a/package.json +++ b/package.json @@ -80,7 +80,7 @@ "semver-intersect": "^1.5.0", "sort-json": "^2.0.1", "spdx-license-list": "^6.9.0", - "typescript": "~5.6", + "typescript": "~5.7", "yargs": "^17.7.2" }, "engines": { diff --git a/projenrc/support.ts b/projenrc/support.ts index db5c38aa..42893610 100644 --- a/projenrc/support.ts +++ b/projenrc/support.ts @@ -2,7 +2,7 @@ import { JsonFile, Project } from 'projen'; import type { ReleasesDocument } from '../src/support'; export const SUPPORT_POLICY: ReleasesDocument = { - current: '5.6', + current: '5.7', maintenance: { // version: End-of-support date '5.0': new Date('2024-01-31'), @@ -11,6 +11,7 @@ export const SUPPORT_POLICY: ReleasesDocument = { '5.3': new Date('2024-10-15'), '5.4': new Date('2025-02-28'), '5.5': new Date('2025-05-15'), + '5.6': new Date('2025-07-01'), }, }; diff --git a/releases.json b/releases.json index 1cac1b0c..0e80b551 100644 --- a/releases.json +++ b/releases.json @@ -1,12 +1,13 @@ { - "current": "5.6", + "current": "5.7", "maintenance": { "5.0": "2024-01-31T00:00:00.000Z", "5.1": "2024-02-28T00:00:00.000Z", "5.2": "2024-06-30T00:00:00.000Z", "5.3": "2024-10-15T00:00:00.000Z", "5.4": "2025-02-28T00:00:00.000Z", - "5.5": "2025-05-15T00:00:00.000Z" + "5.5": "2025-05-15T00:00:00.000Z", + "5.6": "2025-07-01T00:00:00.000Z" }, "//": "~~ Generated by projen. To modify, edit .projenrc.ts and run \"npx projen\"." } diff --git a/src/tsconfig/validator.ts b/src/tsconfig/validator.ts index 33f08637..9a32d201 100644 --- a/src/tsconfig/validator.ts +++ b/src/tsconfig/validator.ts @@ -192,6 +192,12 @@ function wrapMatcher(matcher: Matcher, message: (actual: any) => string, allowed */ function looseEqual(a: any, b: any): boolean { try { + // if one of the values is an object (or array), but the other isn't - never consider them the same + if ([typeof a, typeof b].filter((t) => t === 'object').length === 1) { + return false; + } + // if both values are the same object + // or if both values are loose equal return Object.is(a, b) || a == b; } catch { return false; diff --git a/test/compiler.test.ts b/test/compiler.test.ts index aeeb2507..d257a28a 100644 --- a/test/compiler.test.ts +++ b/test/compiler.test.ts @@ -107,7 +107,7 @@ describe(Compiler, () => { } finally { rmSync(sourceDir, { force: true, recursive: true }); } - }, 15_000); + }, 25_000); test('rootDir is added to assembly', () => { const outDir = 'jsii-outdir'; @@ -336,7 +336,7 @@ describe(Compiler, () => { } finally { rmSync(sourceDir, { force: true, recursive: true }); } - }, 15_000); + }, 25_000); }); describe('compressed assembly option', () => { diff --git a/test/tsconfig/helpers.ts b/test/tsconfig/helpers.ts index 9987d508..64a67ab7 100644 --- a/test/tsconfig/helpers.ts +++ b/test/tsconfig/helpers.ts @@ -192,6 +192,8 @@ export function fcTsconfig( isolatedDeclarations: fc.boolean(), strictBuiltinIteratorReturn: fc.boolean(), noUncheckedSideEffectImports: fc.boolean(), + noCheck: fc.boolean(), + rewriteRelativeImportExtensions: fc.boolean(), }; // limit to only allowed keys diff --git a/yarn.lock b/yarn.lock index f226dc9e..d58f2d6b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6491,10 +6491,10 @@ typescript@~3.9.10: resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.10.tgz#70f3910ac7a51ed6bef79da7800690b19bf778b8" integrity sha512-w6fIxVE/H1PkLKcCPsFqKE7Kv7QUwhU8qQY2MueZXWx5cPZdwFupLgKK3vntcK98BtNHZtAF4LA/yl2a7k8R6Q== -typescript@~5.6: - version "5.6.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" - integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw== +typescript@~5.7: + version "5.7.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.2.tgz#3169cf8c4c8a828cde53ba9ecb3d2b1d5dd67be6" + integrity sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg== unbox-primitive@^1.0.2: version "1.0.2"