Skip to content

Commit

Permalink
chore: npm-check-updates && yarn upgrade (aws#17294)
Browse files Browse the repository at this point in the history
Ran npm-check-updates and yarn upgrade to keep the `yarn.lock` file up-to-date.
  • Loading branch information
aws-cdk-automation authored and TikiTDO committed Feb 21, 2022
1 parent 07ce790 commit 09bb9ad
Show file tree
Hide file tree
Showing 43 changed files with 564 additions and 522 deletions.
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
"fs-extra": "^9.1.0",
"graceful-fs": "^4.2.8",
"jest-junit": "^12.3.0",
"jsii-diff": "^1.41.0",
"jsii-pacmak": "^1.41.0",
"jsii-reflect": "^1.41.0",
"jsii-rosetta": "^1.41.0",
"jsii-diff": "^1.42.0",
"jsii-pacmak": "^1.42.0",
"jsii-reflect": "^1.42.0",
"jsii-rosetta": "^1.42.0",
"lerna": "^4.0.0",
"patch-package": "^6.4.7",
"standard-version": "^9.3.1",
"standard-version": "^9.3.2",
"typescript": "~3.9.10"
},
"resolutions": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/app-delivery/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^26.0.24",
"fast-check": "^2.18.0",
"fast-check": "^2.19.0",
"jest": "^26.6.3"
},
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/jest": "^26.0.24"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-applicationautoscaling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^26.0.24",
"fast-check": "^2.18.0",
"fast-check": "^2.19.0",
"jest": "^26.6.3"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-autoscaling-common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^26.0.24",
"fast-check": "^2.18.0",
"fast-check": "^2.19.0",
"jest": "^26.6.3"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/sinon": "^9.0.11",
"@aws-cdk/cdk-build-tools": "0.0.0",
"aws-sdk": "^2.596.0",
Expand All @@ -43,7 +43,7 @@
"jest": "^26.6.3",
"lambda-tester": "^3.6.0",
"sinon": "^9.2.4",
"nock": "^13.1.3",
"nock": "^13.1.4",
"ts-jest": "^26.5.6"
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloudformation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/jest": "^26.0.24",
"jest": "^26.6.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codepipeline-actions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"@aws-cdk/cx-api": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^26.0.24",
"@types/lodash": "^4.14.175",
"@types/lodash": "^4.14.176",
"jest": "^26.6.3",
"lodash": "^4.17.21"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@
"eslint-plugin-standard": "^4.1.0",
"jest": "^26.6.3",
"lambda-tester": "^3.6.0",
"nock": "^13.1.3"
"nock": "^13.1.4"
}
}
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-dynamodb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/jest": "^26.0.24",
"@types/sinon": "^9.0.11",
"aws-sdk": "^2.848.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ec2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"@aws-cdk/cloud-assembly-schema": "0.0.0",
"@aws-cdk/cx-api": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/jest": "^26.0.24",
"jest": "^26.6.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-eks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/jest": "^26.0.24",
"@types/sinon": "^9.0.11",
"@types/yaml": "1.9.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iam/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/jest": "^26.0.24",
"@types/sinon": "^9.0.11",
"jest": "^26.6.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-nodejs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^26.0.24",
"delay": "5.0.0",
"esbuild": "^0.13.5"
"esbuild": "^0.13.12"
},
"dependencies": {
"@aws-cdk/aws-lambda": "0.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-lambda/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,9 @@
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/cfnspec": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/jest": "^26.0.24",
"@types/lodash": "^4.14.175",
"@types/lodash": "^4.14.176",
"jest": "^26.6.3",
"lodash": "^4.17.21"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-logs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/jest": "^26.0.24",
"@types/sinon": "^9.0.11",
"aws-sdk": "^2.848.0",
"aws-sdk-mock": "^5.4.0",
"jest": "^26.6.3",
"nock": "^13.1.3",
"nock": "^13.1.4",
"sinon": "^9.2.4"
},
"dependencies": {
Expand Down
10 changes: 9 additions & 1 deletion packages/@aws-cdk/aws-route53-targets/jest.config.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
const baseConfig = require('@aws-cdk/cdk-build-tools/config/jest.config');
module.exports = baseConfig;
module.exports = {
...baseConfig,
coverageThreshold: {
global: {
branches: 70,
statements: 80,
}
}
};
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-route53/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/jest": "^26.0.24",
"aws-sdk": "^2.848.0",
"jest": "^26.6.3"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/jest": "^26.0.24",
"jest": "^26.6.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ses/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/jest": "^26.0.24",
"jest": "^26.6.3"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cloud-assembly-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^26.0.24",
"@types/mock-fs": "^4.13.1",
"@types/semver": "^7.3.8",
"@types/semver": "^7.3.9",
"jest": "^26.6.3",
"mock-fs": "^4.14.0",
"typescript-json-schema": "^0.51.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cloudformation-diff/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^26.0.24",
"@types/string-width": "^4.0.1",
"fast-check": "^2.18.0",
"fast-check": "^2.19.0",
"jest": "^26.6.3",
"ts-jest": "^26.5.6"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,14 @@
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/fs-extra": "^8.1.2",
"@types/jest": "^26.0.24",
"@types/lodash": "^4.14.175",
"@types/lodash": "^4.14.176",
"@types/minimatch": "^3.0.5",
"@types/node": "^10.17.60",
"@types/sinon": "^9.0.11",
"fast-check": "^2.18.0",
"fast-check": "^2.19.0",
"jest": "^26.6.3",
"lodash": "^4.17.21",
"sinon": "^9.2.4",
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/custom-resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@
"@aws-cdk/cdk-integ-tools": "0.0.0",
"@aws-cdk/cfn2ts": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/aws-lambda": "^8.10.84",
"@types/aws-lambda": "^8.10.85",
"@types/fs-extra": "^8.1.2",
"@types/jest": "^26.0.24",
"@types/sinon": "^9.0.11",
"aws-sdk": "^2.848.0",
"aws-sdk-mock": "^5.4.0",
"fs-extra": "^9.1.0",
"nock": "^13.1.3",
"nock": "^13.1.4",
"sinon": "^9.2.4"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cx-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^26.0.24",
"@types/mock-fs": "^4.13.1",
"@types/semver": "^7.3.8",
"@types/semver": "^7.3.9",
"jest": "^26.6.3",
"mock-fs": "^4.14.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export interface IExampleResource extends
* The details of which metric methods you should have of course depends on the
* resource that is being modeled.
*/
metricCount(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric;
metricCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric;
}

/**
Expand Down Expand Up @@ -212,12 +212,12 @@ abstract class ExampleResourceBase extends core.Resource implements IExampleReso
}

/** Implement the {@link IExampleResource.metricCount} method. */
public metricCount(metricName: string, props?: cloudwatch.MetricOptions): cloudwatch.Metric {
public metricCount(props?: cloudwatch.MetricOptions): cloudwatch.Metric {
return new cloudwatch.Metric({
// of course, you would put your resource-specific values here
namespace: 'AWS/ExampleResource',
metricName: 'Count',
dimensions: { ExampleResource: this.exampleResourceName },
metricName,
...props,
}).attachTo(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@

import { Match, Template } from '@aws-cdk/assertions';

import * as cloudwatch from '@aws-cdk/aws-cloudwatch';
import * as ec2 from '@aws-cdk/aws-ec2';
import * as iam from '@aws-cdk/aws-iam';
import * as core from '@aws-cdk/core';

// Always import the module you're testing qualified -
// don't import individual classes from it!
// Importing it qualified tests whether everything that needs to be exported
Expand All @@ -18,6 +20,12 @@ import * as er from '../lib';
/* We allow quotes in the object keys used for CloudFormation template assertions */
/* eslint-disable quote-props */

const EXAMPLE_RESOURCE_NAME = {
'Fn::Select': [1, {
'Fn::Split': ['/', { 'Ref': 'ExampleResourceAC53F4AE' }],
}],
};

describe('Example Resource', () => {
let stack: core.Stack;

Expand Down Expand Up @@ -111,6 +119,40 @@ describe('Example Resource', () => {
},
});
});

test('onEvent adds an Event Rule', () => {
exampleResource.onEvent('MyEvent');

Template.fromStack(stack).hasResourceProperties('AWS::Events::Rule', {
EventPattern: {
detail: {
'example-resource-name': [EXAMPLE_RESOURCE_NAME],
},
},
});
});

test('metricCount returns a metric with correct dimensions', () => {
const countMetric = exampleResource.metricCount();

new cloudwatch.Alarm(stack, 'Alarm', {
metric: countMetric,
threshold: 10,
evaluationPeriods: 2,
});

Template.fromStack(stack).hasResourceProperties('AWS::CloudWatch::Alarm', {
EvaluationPeriods: 2,
Dimensions: [
{
Name: 'ExampleResource',
Value: EXAMPLE_RESOURCE_NAME,
},
],
MetricName: 'Count',
Namespace: 'AWS/ExampleResource',
});
});
});

describe('created with a VPC', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@monocdk-experiment/rewrite-imports/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"typescript": "~3.9.10"
},
"devDependencies": {
"@types/glob": "^7.1.4",
"@types/glob": "^7.2.0",
"@types/jest": "^26.0.24",
"@types/node": "^10.17.60",
"@aws-cdk/cdk-build-tools": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-migration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"typescript": "~3.9.10"
},
"devDependencies": {
"@types/glob": "^7.1.4",
"@types/glob": "^7.2.0",
"@types/jest": "^26.0.24",
"@types/node": "^10.17.60",
"@aws-cdk/cdk-build-tools": "0.0.0",
Expand Down
Loading

0 comments on commit 09bb9ad

Please sign in to comment.