Skip to content

Commit

Permalink
Merge branch 'master' into epolon/runtime-info-empty-module-paths
Browse files Browse the repository at this point in the history
  • Loading branch information
iliapolo committed Apr 29, 2020
2 parents bbff37a + e869a0d commit eb89c91
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 33 deletions.
1 change: 0 additions & 1 deletion .gitignore
@@ -1,5 +1,4 @@
# VSCode extension
.vscode/
/.favorites.json

# TypeScript incremental build states
Expand Down
8 changes: 8 additions & 0 deletions .vscode/settings.json
@@ -0,0 +1,8 @@
{
"eslint.workingDirectories": [
{ "pattern": "./packages/@aws-cdk/*" },
{ "pattern": "./packages/@monocdk-experiment/*" },
{ "pattern": "./packages/*" },
{ "pattern": "./tools/*" }
]
}
16 changes: 3 additions & 13 deletions CONTRIBUTING.md
Expand Up @@ -287,19 +287,9 @@ All packages in the repo use a standard base configuration found at [eslintrc.js
This can be customized for any package by modifying the `.eslintrc` file found at its root.

If you're using the VS Code and would like to see eslint violations on it, install the [eslint
extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint).

The following additional [VS Code setting](https://code.visualstudio.com/docs/getstarted/settings) is required when the
entire project is opened (not required if only a specific module is opened) -

```json
"eslint.workingDirectories": [
{ "pattern": "./packages/@aws-cdk/*" },
{ "pattern": "./packages/@monocdk-experiment/*" },
{ "pattern": "./packages/*" },
{ "pattern": "./tools/*" },
],
```
extension](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint). The VS Code setting [needed for
the extension to work](https://github.com/Microsoft/vscode-eslint#settings-options) on the monorepo is configured in
the [folder settings](https://code.visualstudio.com/docs/editor/multi-root-workspaces#_settings).

#### pkglint

Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ec2/lib/instance.ts
Expand Up @@ -291,7 +291,7 @@ export class Instance extends Resource implements IInstance {
if (selected.length === 1) {
subnet = selected[0];
} else {
throw new Error('When specifying AZ there has to be exactly one subnet of the given type in this az');
throw new Error(`Need exactly 1 subnet to match AZ '${props.availabilityZone}', found ${selected.length}. Use a different availabilityZone.`);
}
} else {
subnet = subnets[0];
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-ec2/lib/vpc.ts
Expand Up @@ -1910,13 +1910,13 @@ const DUMMY_VPC_PROPS: cxapi.VpcContextResponse = {
type: cxapi.VpcSubnetGroupType.PUBLIC,
subnets: [
{
availabilityZone: 'dummy-1a',
availabilityZone: 'dummy1a',
subnetId: 's-12345',
routeTableId: 'rtb-12345s',
cidr: '1.2.3.4/5',
},
{
availabilityZone: 'dummy-1b',
availabilityZone: 'dummy1b',
subnetId: 's-67890',
routeTableId: 'rtb-67890s',
cidr: '1.2.3.4/5',
Expand All @@ -1928,13 +1928,13 @@ const DUMMY_VPC_PROPS: cxapi.VpcContextResponse = {
type: cxapi.VpcSubnetGroupType.PRIVATE,
subnets: [
{
availabilityZone: 'dummy-1a',
availabilityZone: 'dummy1a',
subnetId: 'p-12345',
routeTableId: 'rtb-12345p',
cidr: '1.2.3.4/5',
},
{
availabilityZone: 'dummy-1b',
availabilityZone: 'dummy1b',
subnetId: 'p-67890',
routeTableId: 'rtb-57890p',
cidr: '1.2.3.4/5',
Expand Down
16 changes: 16 additions & 0 deletions packages/@aws-cdk/aws-ec2/test/test.vpc.from-lookup.ts
Expand Up @@ -172,6 +172,22 @@ export = {
restoreContextProvider(previous);
test.done();
},

'AZ in dummy lookup VPC matches AZ in Stack'(test: Test) {
// GIVEN
const stack = new Stack(undefined, 'MyTestStack', { env: { account: '1234567890', region: 'dummy' } });
const vpc = Vpc.fromLookup(stack, 'vpc', { isDefault: true });

// WHEN
const subnets = vpc.selectSubnets({
availabilityZones: stack.availabilityZones,
});

// THEN
test.equals(subnets.subnets.length, 2);

test.done();
},
},
};

Expand Down
7 changes: 0 additions & 7 deletions packages/@aws-cdk/cloud-assembly-schema/package.json
Expand Up @@ -40,13 +40,6 @@
"compat": "cdk-compat",
"update-schema": "bash scripts/update-schema.sh"
},
"cdk-build": {
"eslint": {
"ignore-pattern": [
"scripts/*"
]
}
},
"author": {
"name": "Amazon Web Services",
"url": "https://aws.amazon.com",
Expand Down
7 changes: 0 additions & 7 deletions tools/cfn2ts/package.json
Expand Up @@ -43,13 +43,6 @@
"jest": "^25.5.0",
"pkglint": "0.0.0"
},
"cdk-build": {
"eslint": {
"ignore-pattern": [
"test/enrichments/*.ts"
]
}
},
"keywords": [
"aws",
"cdk"
Expand Down

0 comments on commit eb89c91

Please sign in to comment.