Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: upgrade to jsii 0.20.7 #5103

Merged
merged 8 commits into from
Nov 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/@aws-cdk/assets/test/fs/test.fs-copy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export = {
};

function tree(dir: string, depth = ''): string[] {
const lines = [];
const lines = new Array<string>();
for (const file of fs.readdirSync(dir).sort()) {
const filePath = path.join(dir, file);
const stat = fs.lstatSync(filePath);
Expand All @@ -143,4 +143,4 @@ function tree(dir: string, depth = ''): string[] {
}
}
return lines;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -425,15 +425,14 @@ export class ServerDeploymentGroup extends ServerDeploymentGroupBase {
return {
onPremisesTagSetList: tagSet.instanceTagGroups.map(tagGroup => {
return {
onPremisesTagGroup: this.tagGroup2TagsArray(tagGroup) as
CfnDeploymentGroup.TagFilterProperty[],
onPremisesTagGroup: this.tagGroup2TagsArray(tagGroup),
};
}),
};
}

private tagGroup2TagsArray(tagGroup: InstanceTagGroup): any[] {
const tagsInGroup = [];
private tagGroup2TagsArray(tagGroup: InstanceTagGroup): CfnDeploymentGroup.TagFilterProperty[] {
const tagsInGroup = new Array<CfnDeploymentGroup.TagFilterProperty>();
for (const tagKey in tagGroup) {
if (tagGroup.hasOwnProperty(tagKey)) {
const tagValues = tagGroup[tagKey];
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ec2/lib/network-util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class NetworkUtils {
public static numToIp(ipNum: number): string {
// this all because bitwise math is signed
let remaining = ipNum;
const address = [];
const address = new Array<number>();
for (let i = 0; i < 4; i++) {
if (remaining !== 0) {
address.push(Math.floor(remaining / 256 ** (3 - i)));
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ec2/lib/vpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1661,7 +1661,7 @@ class CompositeDependable implements IDependable {
const self = this;
DependableTrait.implement(this, {
get dependencyRoots() {
const ret = [];
const ret = new Array<IConstruct>();
for (const dep of self.dependables) {
ret.push(...DependableTrait.get(dep).dependencyRoots);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-ecs/lib/container-definition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,8 +614,8 @@ export interface HealthCheck {
readonly timeout?: cdk.Duration;
}

function renderKV(env: { [key: string]: string }, keyName: string, valueName: string): any {
const ret = [];
function renderKV(env: { [key: string]: string }, keyName: string, valueName: string): any[] {
const ret = new Array();
for (const [key, value] of Object.entries(env)) {
ret.push({ [keyName]: key, [valueName]: value });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class AppMeshProxyConfiguration extends ProxyConfiguration {
}

function renderProperties(props: AppMeshProxyConfigurationProps): CfnTaskDefinition.KeyValuePairProperty[] {
const ret = [];
const ret = new Array<CfnTaskDefinition.KeyValuePairProperty>();
for (const [k, v] of Object.entries(props)) {
const key = String(k);
const value = String(v);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export class ApplicationListenerRule extends cdk.Construct {
* Render the conditions for this rule
*/
private renderConditions() {
const ret = [];
const ret = new Array<{ field: string, values: string[] }>();
for (const [field, values] of Object.entries(this.conditions)) {
if (values !== undefined) {
ret.push({ field, values });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ export interface ILoadBalancerV2 extends IResource {
/**
* The canonical hosted zone ID of this load balancer
*
* @example Z2P70J7EXAMPLE
* @attribute
* @example Z2P70J7EXAMPLE
*/
readonly loadBalancerCanonicalHostedZoneId: string;

/**
* The DNS name of this load balancer
*
* @example my-load-balancer-424835706.us-west-2.elb.amazonaws.com
* @attribute
* @example my-load-balancer-424835706.us-west-2.elb.amazonaws.com
*/
readonly loadBalancerDnsName: string;
}
Expand All @@ -66,40 +66,40 @@ export abstract class BaseLoadBalancer extends Resource {
/**
* The canonical hosted zone ID of this load balancer
*
* @example Z2P70J7EXAMPLE
* @attribute
* @example Z2P70J7EXAMPLE
*/
public readonly loadBalancerCanonicalHostedZoneId: string;

/**
* The DNS name of this load balancer
*
* @example my-load-balancer-424835706.us-west-2.elb.amazonaws.com
* @attribute
* @example my-load-balancer-424835706.us-west-2.elb.amazonaws.com
*/
public readonly loadBalancerDnsName: string;

/**
* The full name of this load balancer
*
* @example app/my-load-balancer/50dc6c495c0c9188
* @attribute
* @example app/my-load-balancer/50dc6c495c0c9188
*/
public readonly loadBalancerFullName: string;

/**
* The name of this load balancer
*
* @example my-load-balancer
* @attribute
* @example my-load-balancer
*/
public readonly loadBalancerName: string;

/**
* The ARN of this load balancer
*
* @example arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-internal-load-balancer/50dc6c495c0c9188
* @attribute
* @example arn:aws:elasticloadbalancing:us-west-2:123456789012:loadbalancer/app/my-internal-load-balancer/50dc6c495c0c9188
*/
public readonly loadBalancerArn: string;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, haveResource, MatchStyle } from '@aws-cdk/assert';
import { Metric } from '@aws-cdk/aws-cloudwatch';
import ec2 = require('@aws-cdk/aws-ec2');
import cdk = require('@aws-cdk/core');
import { ConstructNode, Duration } from '@aws-cdk/core';
Expand Down Expand Up @@ -469,7 +470,7 @@ export = {
});

// WHEN
const metrics = [];
const metrics = new Array<Metric>();
metrics.push(group.metricHttpCodeTarget(elbv2.HttpCodeTarget.TARGET_3XX_COUNT));
metrics.push(group.metricIpv6RequestCount());
metrics.push(group.metricUnhealthyHostCount());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { expect, haveResource, ResourcePart } from '@aws-cdk/assert';
import { Metric } from '@aws-cdk/aws-cloudwatch';
import ec2 = require('@aws-cdk/aws-ec2');
import s3 = require('@aws-cdk/aws-s3');
import cdk = require('@aws-cdk/core');
Expand Down Expand Up @@ -217,7 +218,7 @@ export = {
const lb = new elbv2.ApplicationLoadBalancer(stack, 'LB', { vpc });

// WHEN
const metrics = [];
const metrics = new Array<Metric>();
metrics.push(lb.metricActiveConnectionCount());
metrics.push(lb.metricClientTlsNegotiationErrorCount());
metrics.push(lb.metricConsumedLCUs());
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-sns/lib/subscription-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export class SubscriptionFilter {
* Returns a subscription filter for a string attribute.
*/
public static stringFilter(stringConditions: StringConditions) {
const conditions = [];
const conditions = new Array<any>();

if (stringConditions.whitelist) {
conditions.push(...stringConditions.whitelist);
Expand All @@ -102,7 +102,7 @@ export class SubscriptionFilter {
* Returns a subscription filter for a numeric attribute.
*/
public static numericFilter(numericConditions: NumericConditions) {
const conditions = [];
const conditions = new Array<any>();

if (numericConditions.whitelist) {
conditions.push(...numericConditions.whitelist.map(v => ({ numeric: ['=', v] })));
Expand Down
6 changes: 3 additions & 3 deletions packages/decdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"@aws-cdk/cx-api": "1.16.1",
"@aws-cdk/region-info": "1.16.1",
"fs-extra": "^8.1.0",
"jsii-reflect": "^0.20.3",
"jsii-reflect": "0.20.7",
"jsonschema": "^1.2.4",
"yaml": "1.7.2",
"yargs": "^15.0.1"
Expand All @@ -165,7 +165,7 @@
"@types/yaml": "1.2.0",
"@types/yargs": "^13.0.3",
"jest": "^24.9.0",
"jsii": "^0.20.6"
"jsii": "0.20.7"
},
"keywords": [
"aws",
Expand All @@ -175,4 +175,4 @@
"engines": {
"node": ">= 8.10.0"
}
}
}
6 changes: 3 additions & 3 deletions tools/awslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"camelcase": "^5.3.1",
"colors": "^1.4.0",
"fs-extra": "^8.1.0",
"jsii-reflect": "^0.20.3",
"jsii-spec": "^0.20.5",
"jsii-reflect": "0.20.7",
"jsii-spec": "0.20.7",
"yargs": "^15.0.1"
},
"devDependencies": {
Expand All @@ -47,4 +47,4 @@
"engines": {
"node": ">= 10.3.0"
}
}
}
6 changes: 3 additions & 3 deletions tools/cdk-build-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
"colors": "^1.4.0",
"fs-extra": "^8.1.0",
"jest": "^24.9.0",
"jsii": "^0.20.6",
"jsii-pacmak": "^0.20.6",
"jsii": "0.20.7",
"jsii-pacmak": "0.20.7",
"nodeunit": "^0.11.3",
"nyc": "^14.1.1",
"ts-jest": "^24.1.0",
Expand All @@ -58,4 +58,4 @@
"engines": {
"node": ">= 10.3.0"
}
}
}
Loading