Skip to content

Commit

Permalink
Merge branch 'main' into merge-back/2.97.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Sep 22, 2023
2 parents d7cf3be + 5ae9099 commit 78a0106
Show file tree
Hide file tree
Showing 132 changed files with 4,702 additions and 643 deletions.
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
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
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,43 @@ 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 two styles of imports
import { Stack, aws_sns as sns, aws_sns_subscriptions as subs, aws_sqs as sqs } from 'aws-cdk-lib';
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 subs.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-entrypoing.mjs';
await fs.writeJson(path.join(context.integTestDir, 'cdk.json'), cdkJson);

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

})));
6 changes: 6 additions & 0 deletions packages/@aws-cdk/app-staging-synthesizer-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"exclude": [
"construct-ctor:@aws-cdk/app-staging-synthesizer-alpha.DefaultStagingStack.<initializer>.params[0]",
"props-no-arn-refs:@aws-cdk/app-staging-synthesizer-alpha.DefaultStagingStackProps.deployRoleArn"
]
}
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-amplify-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-amplify-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,6 @@
},
"stability": "experimental",
"maturity": "experimental",
"awslint": {
"exclude": [
"*:*"
]
},
"awscdkio": {
"announce": false
},
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-apigatewayv2-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-apigatewayv2-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@
"engines": {
"node": ">= 14.15.0"
},
"awslint": {
"exclude": [
"*:*"
]
},
"stability": "experimental",
"maturity": "experimental",
"features": [
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@
"tag": "latest"
},
"private": false,
"awslint": {
"exclude": [
"*:*"
]
},
"pkglint": {
"exclude": [
"naming/package-matches-directory",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,6 @@
"publishConfig": {
"tag": "latest"
},
"awslint": {
"exclude": [
"*:*"
]
},
"pkglint": {
"exclude": [
"naming/package-matches-directory",
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-appconfig-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-appconfig-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,6 @@
},
"stability": "experimental",
"maturity": "experimental",
"awslint": {
"exclude": [
"*:*"
]
},
"awscdkio": {
"announce": false
},
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-apprunner-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-apprunner-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,6 @@
"tag": "latest"
},
"private": false,
"awslint": {
"exclude": [
"*:*"
]
},
"pkglint": {
"exclude": [
"naming/package-matches-directory",
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-cloud9-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-cloud9-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@
"engines": {
"node": ">= 14.15.0"
},
"awslint": {
"exclude": [
"*:*"
]
},
"stability": "experimental",
"maturity": "experimental",
"awscdkio": {
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-codestar-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-codestar-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@
"engines": {
"node": ">= 14.15.0"
},
"awslint": {
"exclude": [
"*:*"
]
},
"stability": "experimental",
"maturity": "experimental",
"awscdkio": {
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-cognito-identitypool-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-cognito-identitypool-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,6 @@
"engines": {
"node": ">= 14.15.0"
},
"awslint": {
"exclude": [
"*:*"
]
},
"stability": "experimental",
"maturity": "experimental",
"awscdkio": {
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-gamelift-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-gamelift-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@
"engines": {
"node": ">= 14.15.0"
},
"awslint": {
"exclude": [
"*:*"
]
},
"stability": "experimental",
"maturity": "experimental",
"awscdkio": {
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-glue-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-glue-alpha/lib/external-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface ExternalTableProps extends TableBaseProps {

/**
* A Glue table that targets an external data location (e.g. A table in a Redshift Cluster).
* @resource AWS::Glue::Table
*/
export class ExternalTable extends TableBase {
/**
Expand Down
1 change: 1 addition & 0 deletions packages/@aws-cdk/aws-glue-alpha/lib/s3-table.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export interface S3TableProps extends TableBaseProps {

/**
* A Glue table that targets a S3 dataset.
* @resource AWS::Glue::Table
*/
export class S3Table extends TableBase {
/**
Expand Down
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-glue-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@
},
"stability": "experimental",
"maturity": "experimental",
"awslint": {
"exclude": [
"*:*"
]
},
"awscdkio": {
"announce": false
},
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-iot-actions-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-iot-actions-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@
"tag": "latest"
},
"private": false,
"awslint": {
"exclude": [
"*:*"
]
},
"pkglint": {
"exclude": [
"naming/package-matches-directory",
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-iot-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-iot-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,11 +99,6 @@
"engines": {
"node": ">= 14.15.0"
},
"awslint": {
"exclude": [
"*:*"
]
},
"stability": "experimental",
"maturity": "experimental",
"awscdkio": {
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-iotevents-actions-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-iotevents-actions-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,6 @@
"tag": "latest"
},
"private": false,
"awslint": {
"exclude": [
"*:*"
]
},
"pkglint": {
"exclude": [
"naming/package-matches-directory",
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-iotevents-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-iotevents-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,6 @@
"engines": {
"node": ">= 14.15.0"
},
"awslint": {
"exclude": [
"*:*"
]
},
"stability": "experimental",
"maturity": "experimental",
"awscdkio": {
Expand Down
5 changes: 5 additions & 0 deletions packages/@aws-cdk/aws-ivs-alpha/awslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
5 changes: 0 additions & 5 deletions packages/@aws-cdk/aws-ivs-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@
}
}
},
"awslint": {
"exclude": [
"*:*"
]
},
"repository": {
"type": "git",
"url": "https://github.com/aws/aws-cdk.git",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"exclude": [
"*:*"
]
}
Loading

0 comments on commit 78a0106

Please sign in to comment.