Skip to content

Commit

Permalink
Merge branch 'main' into fix/fix-is-construct-check
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgrain authored Oct 5, 2023
2 parents 3909319 + c68ea44 commit 6f567e3
Show file tree
Hide file tree
Showing 948 changed files with 347,968 additions and 15,819 deletions.
1 change: 1 addition & 0 deletions .gitallowed
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ account: '924023996002'
account: '919366029133' #cn-north-1
account: '919830735681' #cn-northwest-1
account: '909464085924' #ap-southeast-3
account: '564877687649' #il-central-1

# The account IDs of password rotation applications of Serverless Application Repository
# https://docs.aws.amazon.com/secretsmanager/latest/userguide/enable-rotation-rds.html
Expand Down
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,8 @@
*.jpg binary
*.tgz binary
*.tar.gz binary

# Hide snapshots from GitHub UI, except for the actual templates
**/*.snapshot/** linguist-generated
**/*.snapshot/**/*.template.json -linguist-generated
**/*.snapshot/**/*DeployAssert*.template.json linguist-generated
2 changes: 1 addition & 1 deletion .github/workflows/request-cli-integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
persist-credentials: false
- name: Find changed cli files
id: changed-cli-files
uses: tj-actions/changed-files@76c4d81a6acd339b55bd7407a016981c853eb702
uses: tj-actions/changed-files@8238a4103220c636f2dad328ead8a7c8dbe316a3
with:
base_sha: ${{ github.event.pull_request.base.sha }}
files_yaml: |
Expand Down
35 changes: 35 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,41 @@

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.

## [2.99.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.99.0-alpha.0...v2.99.1-alpha.0) (2023-09-29)

## [2.99.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.98.0-alpha.0...v2.99.0-alpha.0) (2023-09-27)


### Features

* **apprunner:** add HealthCheckConfiguration property in Service ([#27029](https://github.com/aws/aws-cdk/issues/27029)) ([4e8c9c4](https://github.com/aws/aws-cdk/commit/4e8c9c4dfdae690d9f6650bbc57bacdb83dec68c)), closes [#26972](https://github.com/aws/aws-cdk/issues/26972)


### Bug Fixes

* **appconfig:** allow multiple environment monitor roles to be created ([#27243](https://github.com/aws/aws-cdk/issues/27243)) ([9312c97](https://github.com/aws/aws-cdk/commit/9312c9763813af4ac6d2be96e78f6aeaefeeb32c))

## [2.98.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.97.1-alpha.0...v2.98.0-alpha.0) (2023-09-26)


### Features

* **scheduler:** disable Schedule on creation ([#27236](https://github.com/aws/aws-cdk/issues/27236)) ([193cd3f](https://github.com/aws/aws-cdk/commit/193cd3f575974e4058fcec957640a3d28d114fd1))

## [2.97.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.97.0-alpha.0...v2.97.1-alpha.0) (2023-09-25)

## [2.97.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.96.2-alpha.0...v2.97.0-alpha.0) (2023-09-22)


### Features

* **cli-lib-alpha:** support hotswap deployments ([#26786](https://github.com/aws/aws-cdk/issues/26786)) ([e01faff](https://github.com/aws/aws-cdk/commit/e01faffcf7228fd1a7632ff32617c77547bd8c7b)), closes [#26785](https://github.com/aws/aws-cdk/issues/26785)


### Bug Fixes

* **synthetics:** synth-time failure for canary assets in nested stages ([#27167](https://github.com/aws/aws-cdk/issues/27167)) ([7a04a5a](https://github.com/aws/aws-cdk/commit/7a04a5a280a3946692e3c4120061bd4e57ab1d6c)), closes [#27089](https://github.com/aws/aws-cdk/issues/27089) [#26291](https://github.com/aws/aws-cdk/issues/26291)

## [2.96.2-alpha.0](https://github.com/aws/aws-cdk/compare/v2.96.1-alpha.0...v2.96.2-alpha.0) (2023-09-14)

## [2.96.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.96.0-alpha.0...v2.96.1-alpha.0) (2023-09-14)
Expand Down
71 changes: 71 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,77 @@

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.

## [2.99.1](https://github.com/aws/aws-cdk/compare/v2.99.0...v2.99.1) (2023-09-29)


### Bug Fixes

* load time regression ([#27314](https://github.com/aws/aws-cdk/issues/27314)) ([fca5a73](https://github.com/aws/aws-cdk/commit/fca5a7344d2e205663873b577d5d91f203dd9d14))

## [2.99.0](https://github.com/aws/aws-cdk/compare/v2.98.0...v2.99.0) (2023-09-27)


### Features

* **s3:** specify minimum TLS version ([#27297](https://github.com/aws/aws-cdk/issues/27297)) ([f47d09c](https://github.com/aws/aws-cdk/commit/f47d09c08871517f06c1895a5ed262c8e87ee05b)), closes [#27279](https://github.com/aws/aws-cdk/issues/27279)
* **synthetics:** graduate to stable 🚀 ([#27305](https://github.com/aws/aws-cdk/issues/27305)) ([dd00d05](https://github.com/aws/aws-cdk/commit/dd00d05c07cb3c6efd505e9f7ab577a5eec5070b))


### Bug Fixes

* **batch:** make `instanceType` optional on multinode jobs ([#27223](https://github.com/aws/aws-cdk/issues/27223)) ([6616026](https://github.com/aws/aws-cdk/commit/6616026d3879f0271b7813ed00f0899c666da1e3)), closes [#27185](https://github.com/aws/aws-cdk/issues/27185)

## [2.98.0](https://github.com/aws/aws-cdk/compare/v2.97.1...v2.98.0) (2023-09-26)


### Features

* update AWS Service Spec ([#27276](https://github.com/aws/aws-cdk/issues/27276)) ([3d9ca8d](https://github.com/aws/aws-cdk/commit/3d9ca8dad29e6e6f813ab2340da7639c24ba5494))
* **aws-cdk-lib:** reduce load time of JavaScript library ([#27217](https://github.com/aws/aws-cdk/issues/27217)) ([faffce0](https://github.com/aws/aws-cdk/commit/faffce06c3f1d543600f7e8dc430a5105c73ac5a))


### Bug Fixes

* **rds:** prevent rendering deprecated credentials when creating a database cluster from a snapshot (under feature flag) ([#27174](https://github.com/aws/aws-cdk/issues/27174)) ([1fd22a7](https://github.com/aws/aws-cdk/commit/1fd22a7498223ae5d2faf1799056e81be4f71f5c)), closes [#23815](https://github.com/aws/aws-cdk/issues/23815)

## [2.97.1](https://github.com/aws/aws-cdk/compare/v2.97.0...v2.97.1) (2023-09-25)


### Reverts

* "feat(core): `Schedule` class" ([#27284](https://github.com/aws/aws-cdk/issues/27284)) ([e2fc724](https://github.com/aws/aws-cdk/commit/e2fc7240672b5c26394b2fe420531d62fe74189b)), closes [aws/aws-cdk#27105](https://github.com/aws/aws-cdk/issues/27105) [#27259](https://github.com/aws/aws-cdk/issues/27259)

## [2.97.0](https://github.com/aws/aws-cdk/compare/v2.96.2...v2.97.0) (2023-09-22)


### Features

* update AWS Service Spec ([#27224](https://github.com/aws/aws-cdk/issues/27224)) ([a2a4f68](https://github.com/aws/aws-cdk/commit/a2a4f6860ce3e5794b443cd810882bbd60b2455f))
* **appsync:** Standalone L2 construct for SourceApiAssociation ([#27121](https://github.com/aws/aws-cdk/issues/27121)) ([7b9652e](https://github.com/aws/aws-cdk/commit/7b9652ead250c0942bbf6058b89ae7f86182c9c6)), closes [#27025](https://github.com/aws/aws-cdk/issues/27025) [#26986](https://github.com/aws/aws-cdk/issues/26986)
* **cloudwatch:** add verticalAnnotations property to GraphWidget ([#26819](https://github.com/aws/aws-cdk/issues/26819)) ([d41005e](https://github.com/aws/aws-cdk/commit/d41005e79b959aaca3ac56d669d4f6c28cea3a06)), closes [#7622](https://github.com/aws/aws-cdk/issues/7622)
* **core:** `Schedule` class ([#27105](https://github.com/aws/aws-cdk/issues/27105)) ([a8f0a71](https://github.com/aws/aws-cdk/commit/a8f0a71e8d55ff9abb72013bd41a71a64475e2ab)), closes [#19197](https://github.com/aws/aws-cdk/issues/19197) [#27052](https://github.com/aws/aws-cdk/issues/27052) [#27012](https://github.com/aws/aws-cdk/issues/27012)
* update AWS Service Spec ([#27218](https://github.com/aws/aws-cdk/issues/27218)) ([2855da6](https://github.com/aws/aws-cdk/commit/2855da66c7b8fd2def86ff0aa15b524894fd11e1))
* **cloudwatch:** validate Dashboards with an `end` time must also have a `start` time ([#27124](https://github.com/aws/aws-cdk/issues/27124)) ([097bd0f](https://github.com/aws/aws-cdk/commit/097bd0fc3e98045a622b9455e6da391c831068ca)), closes [/github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-cloudwatch/lib/graph.ts#L245-L247](https://github.com/aws//github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-cloudwatch/lib/graph.ts/issues/L245-L247)
* **cloudwatch:** Widgets can define `start` and `end` times, including relative values ([#26969](https://github.com/aws/aws-cdk/issues/26969)) ([2866240](https://github.com/aws/aws-cdk/commit/28662406d29529c826d174cf925b3eddb954a82b)), closes [#26945](https://github.com/aws/aws-cdk/issues/26945)
* **core:** add setter for termination protection on stack ([#26992](https://github.com/aws/aws-cdk/issues/26992)) ([54083de](https://github.com/aws/aws-cdk/commit/54083de9e8faef8b62a2004941647d9cd4984a0b)), closes [#14463](https://github.com/aws/aws-cdk/issues/14463) [#21304](https://github.com/aws/aws-cdk/issues/21304)
* **ec2:** support of m7i and m7i-flex ec2-instancetypes ([#27156](https://github.com/aws/aws-cdk/issues/27156)) ([fe0955f](https://github.com/aws/aws-cdk/commit/fe0955fffb17da7a9043e636cbb1e075233628b2)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html#aws-properties-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-instance.html/issues/aws-properties-ec2)
* **ecr:** make `validateRepositoryName` errors human readable ([#27186](https://github.com/aws/aws-cdk/issues/27186)) ([e15d0c0](https://github.com/aws/aws-cdk/commit/e15d0c057ac9ee5d0a8cbca72f1256bac2f8282a)), closes [#26715](https://github.com/aws/aws-cdk/issues/26715)
* **rds:** support CA certificate for cluster instances ([#27138](https://github.com/aws/aws-cdk/issues/27138)) ([f5a5a08](https://github.com/aws/aws-cdk/commit/f5a5a08af8563052f874c61cbe18f61064c00191)), closes [#26865](https://github.com/aws/aws-cdk/issues/26865)
* **stepfunctions:** add comment ability for when condition ([#27010](https://github.com/aws/aws-cdk/issues/27010)) ([70006ab](https://github.com/aws/aws-cdk/commit/70006abcdbbf2be0a1eb043cc854e6349e92f0e5)), closes [#27005](https://github.com/aws/aws-cdk/issues/27005)
* update AWS Service Spec ([#27163](https://github.com/aws/aws-cdk/issues/27163)) ([0634c68](https://github.com/aws/aws-cdk/commit/0634c68dfee43e5472a8aeb883704b28daf34e42))


### Bug Fixes

* **apigateway:** CORS response body has unexpected space ([#27219](https://github.com/aws/aws-cdk/issues/27219)) ([abf21c9](https://github.com/aws/aws-cdk/commit/abf21c9503b8d337e21bd78109c48c40365bc5da))
* **cli:** equals sign in a tag value is dropped ([#27130](https://github.com/aws/aws-cdk/issues/27130)) ([b7eeda6](https://github.com/aws/aws-cdk/commit/b7eeda67b99ecdb9aaeae143ce767f7a4e6b9d29)), closes [#5773](https://github.com/aws/aws-cdk/issues/5773) [#21003](https://github.com/aws/aws-cdk/issues/21003)
* **custom-resources:** does not accept strings where numbers are expected, skips recursive types ([#27112](https://github.com/aws/aws-cdk/issues/27112)) ([8e21b2c](https://github.com/aws/aws-cdk/commit/8e21b2cb58f70c1a438a330b3ca6db90f2c573df))
* **ec2:** restrictDefaultSecurityGroup fails when default rules are not present ([#27039](https://github.com/aws/aws-cdk/issues/27039)) ([1e67f9d](https://github.com/aws/aws-cdk/commit/1e67f9df1e9ba7ee0a1e177b8c51004481d55584)), closes [#26390](https://github.com/aws/aws-cdk/issues/26390)
* **eks:** use Python 3.10 runtime for kubectl-provider ([#27031](https://github.com/aws/aws-cdk/issues/27031)) ([55859c9](https://github.com/aws/aws-cdk/commit/55859c929d9b4db0af09d30d6fe9bad535ec0e68)), closes [#26994](https://github.com/aws/aws-cdk/issues/26994)
* **rds:** cluster.instanceIdentifiers does not container writer instance ID ([#26929](https://github.com/aws/aws-cdk/issues/26929)) ([d3789ab](https://github.com/aws/aws-cdk/commit/d3789ab005d59307834147cddd0ec8bbada97332)), closes [#25947](https://github.com/aws/aws-cdk/issues/25947)
* **rds:** unable to create cluster with per-instance parameters (under feature flag) ([#27040](https://github.com/aws/aws-cdk/issues/27040)) ([1be9894](https://github.com/aws/aws-cdk/commit/1be9894682c13bbed46f725f4ee349b86fbc25fa)), closes [#27035](https://github.com/aws/aws-cdk/issues/27035)
* **sample-app:** exclude all __pycache__ in cdk.json ([#27191](https://github.com/aws/aws-cdk/issues/27191)) ([d9f1f09](https://github.com/aws/aws-cdk/commit/d9f1f0908a1f7ec0bfcb0df4f9dd1b45c86b0144))

## [2.96.2](https://github.com/aws/aws-cdk/compare/v2.96.1...v2.96.2) (2023-09-14)


Expand Down
10 changes: 5 additions & 5 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ Shout out to our top contributors!
- [otaviomacedo](https://github.com/otaviomacedo)
- [madeline-k](https://github.com/madeline-k)
- [NetaNir](https://github.com/NetaNir)
- [robertd](https://github.com/robertd)
- [comcalvi](https://github.com/comcalvi)
- [robertd](https://github.com/robertd)
- [pahud](https://github.com/pahud)
- [peterwoodworth](https://github.com/peterwoodworth)
- [MrArnoldPalmer](https://github.com/MrArnoldPalmer)
- [mrgrain](https://github.com/mrgrain)
- [MrArnoldPalmer](https://github.com/MrArnoldPalmer)
- [peterwoodworth](https://github.com/peterwoodworth)
- [TheRealAmazonKendra](https://github.com/TheRealAmazonKendra)
- [nija-at](https://github.com/nija-at)
- [hoegertn](https://github.com/hoegertn)
- [nmussy](https://github.com/nmussy)
- [lpizzinidev](https://github.com/lpizzinidev)
- [jumic](https://github.com/jumic)
- [SoManyHs](https://github.com/SoManyHs)
- [watany-dev](https://github.com/watany-dev)


_Last updated: Fri, 01 Sep 23 00:09:05 +0000_
_Last updated: Sun, 01 Oct 23 00:09:32 +0000_
38 changes: 38 additions & 0 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,41 @@ removed:aws-cdk-lib.aws_ec2.CfnNetworkInterfaceProps.enablePrimaryIpv6

# Changed type from GraphqlApi to IGraphqlApi to support import from a different stack, should not matter.
weakened:aws-cdk-lib.aws_appsync.SourceApi

# Due to https://github.com/aws/aws-cdk/issues/27259, none of these could have worked
# When reimplemented, we can remove this entry entirely
removed:aws-cdk-lib.Schedule
removed:aws-cdk-lib.aws_backup.Schedule
removed:aws-cdk-lib.CronOptions
base-types:aws-cdk-lib.aws_applicationautoscaling.Schedule
removed:aws-cdk-lib.aws_applicationautoscaling.Schedule.protectedAt
removed:aws-cdk-lib.aws_applicationautoscaling.Schedule.protectedCron
removed:aws-cdk-lib.aws_applicationautoscaling.Schedule.protectedExpression
removed:aws-cdk-lib.aws_applicationautoscaling.Schedule.protectedRate
removed-argument:aws-cdk-lib.aws_applicationautoscaling.Schedule.at
incompatible-argument:aws-cdk-lib.aws_applicationautoscaling.Schedule.cron
removed-argument:aws-cdk-lib.aws_applicationautoscaling.Schedule.expression
removed:aws-cdk-lib.aws_applicationautoscaling.Schedule.timeZone
base-types:aws-cdk-lib.aws_autoscaling.Schedule
removed:aws-cdk-lib.aws_autoscaling.Schedule.protectedAt
removed:aws-cdk-lib.aws_autoscaling.Schedule.protectedCron
removed:aws-cdk-lib.aws_autoscaling.Schedule.protectedExpression
removed:aws-cdk-lib.aws_autoscaling.Schedule.protectedRate
incompatible-argument:aws-cdk-lib.aws_autoscaling.Schedule.cron
removed-argument:aws-cdk-lib.aws_autoscaling.Schedule.expression
removed:aws-cdk-lib.aws_autoscaling.Schedule.timeZone
base-types:aws-cdk-lib.aws_events.Schedule
removed:aws-cdk-lib.aws_events.Schedule.protectedAt
removed:aws-cdk-lib.aws_events.Schedule.protectedCron
removed:aws-cdk-lib.aws_events.Schedule.protectedExpression
removed:aws-cdk-lib.aws_events.Schedule.protectedRate
removed:aws-cdk-lib.aws_events.Schedule.timeZone
base-types:aws-cdk-lib.aws_applicationautoscaling.CronOptions
removed:aws-cdk-lib.aws_applicationautoscaling.CronOptions.timeZone
base-types:aws-cdk-lib.aws_autoscaling.CronOptions
removed:aws-cdk-lib.aws_autoscaling.CronOptions.timeZone
removed:aws-cdk-lib.aws_autoscaling.CronOptions.year
removed:aws-cdk-lib.aws_backup.BackupPlanRuleProps.schedule

# This data identifer was added by mistake; it had never worked.
removed:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER
1 change: 1 addition & 0 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"tools/@aws-cdk/prlint",
"tools/@aws-cdk/spec2cdk",
"tools/@aws-cdk/yarn-cling",
"tools/@aws-cdk/lazify",
"scripts/@aws-cdk/script-tests"
],
"rejectCycles": true,
Expand Down
3 changes: 2 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"outputs": [
"{projectRoot}/**/*.integ.*.js.snapshot/*",
"{projectRoot}/tsconfig.json",
"{projectRoot}/**/lib/aws-custom-resource/sdk-api-metadata.json",
"{projectRoot}/**/lib/aws-custom-resource/sdk-v2-to-v3.json",
"{projectRoot}/**/lib/aws-custom-resource/sdk-v3-metadata.json",
"{projectRoot}/**/build-info.json",
"{projectRoot}/**/*.js",
"{projectRoot}/**/*.js.map",
Expand Down
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,22 @@
"build-all": "tsc -b"
},
"devDependencies": {
"@nx/workspace": "^16.8.1",
"@nx/workspace": "^16.9.1",
"@types/node": "18.11.19",
"@types/prettier": "2.6.0",
"@yarnpkg/lockfile": "^1.1.0",
"aws-sdk-js-codemod": "^0.18.3",
"cdk-generate-synthetic-examples": "^0.1.291",
"conventional-changelog-cli": "^2.2.2",
"fs-extra": "^9.1.0",
"graceful-fs": "^4.2.11",
"jest-junit": "^13.2.0",
"jsii-diff": "1.88.0",
"jsii-pacmak": "1.88.0",
"jsii-reflect": "1.88.0",
"jsii-diff": "1.89.0",
"jsii-pacmak": "1.89.0",
"jsii-reflect": "1.89.0",
"jsii-rosetta": "~5.1.13",
"lerna": "^7.3.0",
"nx": "^16.8.1",
"nx": "^16.9.1",
"patch-package": "^6.5.1",
"semver": "^7.5.4",
"standard-version": "^9.5.0",
Expand Down Expand Up @@ -75,7 +76,6 @@
"packages/cdk-assets",
"packages/@aws-cdk/*",
"packages/awslint",
"packages/@aws-cdk-containers/*",
"packages/@aws-cdk-testing/*",
"packages/@aws-cdk/*/lambda-packages/*",
"tools/@aws-cdk/cdk-build-tools",
Expand All @@ -88,6 +88,7 @@
"tools/@aws-cdk/prlint",
"tools/@aws-cdk/spec2cdk",
"tools/@aws-cdk/yarn-cling",
"tools/@aws-cdk/lazify",
"scripts/@aws-cdk/script-tests"
],
"nohoist": [
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk-testing/cli-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@types/semver": "^7.5.2",
"@types/yargs": "^15.0.15",
"@types/semver": "^7.5.3",
"@types/yargs": "^15.0.16",
"@types/fs-extra": "^9.0.13",
"@types/glob": "^7.2.0",
"@types/npm": "^7.19.0",
"@types/npm": "^7.19.1",
"@aws-cdk/pkglint": "0.0.0"
},
"dependencies": {
"@octokit/rest": "^18.12.0",
"aws-sdk": "^2.1461.0",
"aws-sdk": "^2.1466.0",
"axios": "^0.27.2",
"fs-extra": "^9.1.0",
"glob": "^7.2.3",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import * as path from 'path';
import * as fs from 'fs-extra';
import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '../../lib';

['app', 'sample-app'].forEach(template => {
Expand All @@ -13,3 +15,45 @@ import { integTest, withTemporaryDirectory, ShellHelper, withPackages } from '..
await shell.shell(['cdk', 'synth']);
})));
});

integTest('Test importing CDK from ESM', withTemporaryDirectory(withPackages(async (context) => {
// Use 'cdk init -l=javascript' to get set up, but use a different file
const shell = ShellHelper.fromContext(context);
await context.packages.makeCliAvailable();

await shell.shell(['cdk', 'init', '-l', 'javascript', 'app']);

// Rewrite some files
await fs.writeFile(path.join(context.integTestDir, 'new-entrypoint.mjs'), `
// Test multiple styles of imports
import { Stack, aws_sns as sns } from 'aws-cdk-lib';
import { SqsSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';
import * as sqs from 'aws-cdk-lib/aws-sqs';
import * as cdk from 'aws-cdk-lib';
class TestjsStack extends Stack {
constructor(scope, id, props) {
super(scope, id, props);
const queue = new sqs.Queue(this, 'TestjsQueue', {
visibilityTimeout: cdk.Duration.seconds(300)
});
const topic = new sns.Topic(this, 'TestjsTopic');
topic.addSubscription(new SqsSubscription(queue));
}
}
const app = new cdk.App();
new TestjsStack(app, 'TestjsStack');
`, { encoding: 'utf-8' });

// Rewrite 'cdk.json' to use new entrypoint
const cdkJson = await fs.readJson(path.join(context.integTestDir, 'cdk.json'));
cdkJson.app = 'node new-entrypoint.mjs';
await fs.writeJson(path.join(context.integTestDir, 'cdk.json'), cdkJson);

await shell.shell(['cdk', 'synth']);

})));
3 changes: 3 additions & 0 deletions packages/@aws-cdk-testing/framework-integ/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ junit.xml
coverage
nyc.config.js

!test/aws-synthetics/test/canaries/**/*


!**/*.snapshot/**/asset.*/*.js
!**/*.snapshot/**/asset.*/*.d.ts

Expand Down
Loading

0 comments on commit 6f567e3

Please sign in to comment.