diff --git a/.gitignore b/.gitignore index 055b85911775d..0e1cd6f4100ab 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ yarn-error.log # Parcel default cache directory .parcel-cache +nozem.json # Cloud9 .c9 diff --git a/package.json b/package.json index bd0b765867870..13d51a4e68913 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,9 @@ "build-all": "tsc -b" }, "devDependencies": { + "@types/jest": "^26.0.10", + "@types/node": "^10.17.25", + "@typescript-eslint/parser": "^2.19.2", "conventional-changelog-cli": "^2.1.0", "fs-extra": "^9.0.1", "graceful-fs": "^4.2.4", diff --git a/packages/@aws-cdk/assert/lib/index.ts b/packages/@aws-cdk/assert/lib/index.ts index 902a5c222f003..c18a97db68d7a 100644 --- a/packages/@aws-cdk/assert/lib/index.ts +++ b/packages/@aws-cdk/assert/lib/index.ts @@ -1,6 +1,7 @@ export * from './assertion'; export * from './canonicalize-assets'; export * from './expect'; +export * from './canonicalize-assets'; export * from './inspector'; export * from './synth-utils'; diff --git a/packages/@aws-cdk/assets/package.json b/packages/@aws-cdk/assets/package.json index 1c6288a584c9f..a44084f74b736 100644 --- a/packages/@aws-cdk/assets/package.json +++ b/packages/@aws-cdk/assets/package.json @@ -93,6 +93,9 @@ "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" }, + "nozem": { + "ostools": ["rm", "tar"] + }, "stability": "deprecated", "maturity": "deprecated", "awscdkio": { diff --git a/packages/@aws-cdk/aws-certificatemanager/jest.config.js b/packages/@aws-cdk/aws-certificatemanager/jest.config.js index cd664e1d069e5..54e28beb9798b 100644 --- a/packages/@aws-cdk/aws-certificatemanager/jest.config.js +++ b/packages/@aws-cdk/aws-certificatemanager/jest.config.js @@ -1,2 +1,2 @@ -const baseConfig = require('../../../tools/cdk-build-tools/config/jest.config'); +const baseConfig = require('cdk-build-tools/config/jest.config'); module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/.eslintrc.js b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/.eslintrc.js new file mode 100644 index 0000000000000..61dd8dd001f63 --- /dev/null +++ b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/.eslintrc.js @@ -0,0 +1,3 @@ +const baseConfig = require('cdk-build-tools/config/eslintrc'); +baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; +module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/jest.config.js b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/jest.config.js deleted file mode 100644 index a9acbf03c2b7a..0000000000000 --- a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/jest.config.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = { - "roots": [ - "/lib", - "/test" - ], - "transform": { - "^.+\\.tsx?$": "ts-jest" - }, - "testRegex": "(/test/.*|(\\.|/)(test|spec))\\.(ts|js)x?$", - "moduleFileExtensions": [ - "ts", - "tsx", - "js", - "jsx", - "json", - "node" - ], - "testEnvironment": "node" -} diff --git a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json index 648a622e525ce..fb5c943c6fd26 100644 --- a/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json +++ b/packages/@aws-cdk/aws-certificatemanager/lambda-packages/dns_validated_certificate_handler/package.json @@ -27,8 +27,10 @@ }, "license": "Apache-2.0", "devDependencies": { + "cdk-build-tools": "0.0.0", "aws-sdk": "^2.596.0", "aws-sdk-mock": "^5.1.0", + "sinon": "^9.0.2", "eslint": "^7.9.0", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.22.0", diff --git a/packages/@aws-cdk/aws-codedeploy/.gitignore b/packages/@aws-cdk/aws-codedeploy/.gitignore index 018c65919d67c..b18ad9f8f39a0 100644 --- a/packages/@aws-cdk/aws-codedeploy/.gitignore +++ b/packages/@aws-cdk/aws-codedeploy/.gitignore @@ -14,5 +14,5 @@ nyc.config.js .LAST_PACKAGE *.snk !.eslintrc.js - -junit.xml \ No newline at end of file +!test/lambda/*/*.js +junit.xml diff --git a/packages/@aws-cdk/aws-codeguruprofiler/package.json b/packages/@aws-cdk/aws-codeguruprofiler/package.json index 8140b965fec4a..39f2972443eb2 100644 --- a/packages/@aws-cdk/aws-codeguruprofiler/package.json +++ b/packages/@aws-cdk/aws-codeguruprofiler/package.json @@ -80,6 +80,7 @@ "pkglint": "0.0.0" }, "dependencies": { + "constructs": "^3.0.4", "@aws-cdk/aws-iam": "0.0.0", "@aws-cdk/core": "0.0.0", "constructs": "^3.0.4" diff --git a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json index b8a0e149587ad..c200e99733122 100644 --- a/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json +++ b/packages/@aws-cdk/aws-dynamodb-global/lambda-packages/aws-global-table-coordinator/package.json @@ -30,6 +30,7 @@ "aws-sdk": "^2.596.0", "aws-sdk-mock": "^5.1.0", "eslint": "^7.9.0", + "sinon": "^9.0.2", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.22.0", "eslint-plugin-node": "^11.1.0", diff --git a/packages/@aws-cdk/aws-dynamodb/package.json b/packages/@aws-cdk/aws-dynamodb/package.json index 402328d6cf997..8f52367af6beb 100644 --- a/packages/@aws-cdk/aws-dynamodb/package.json +++ b/packages/@aws-cdk/aws-dynamodb/package.json @@ -71,6 +71,7 @@ "@aws-cdk/assert": "0.0.0", "@types/jest": "^26.0.14", "aws-sdk": "^2.739.0", + "@types/sinon": "^9.0.4", "aws-sdk-mock": "^5.1.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", diff --git a/packages/@aws-cdk/aws-ec2/test/userdata.test.ts b/packages/@aws-cdk/aws-ec2/test/userdata.test.ts index bda3c6cc71ddc..37964916b2bfc 100644 --- a/packages/@aws-cdk/aws-ec2/test/userdata.test.ts +++ b/packages/@aws-cdk/aws-ec2/test/userdata.test.ts @@ -1,6 +1,6 @@ import { Bucket } from '@aws-cdk/aws-s3'; +import { Stack } from '@aws-cdk/core'; import { nodeunitShim, Test } from 'nodeunit-shim'; -import { Stack } from '../../core/lib'; import * as ec2 from '../lib'; nodeunitShim({ diff --git a/packages/@aws-cdk/aws-ecr-assets/package.json b/packages/@aws-cdk/aws-ecr-assets/package.json index a71af02e87eaa..1d9d180d1e3b0 100644 --- a/packages/@aws-cdk/aws-ecr-assets/package.json +++ b/packages/@aws-cdk/aws-ecr-assets/package.json @@ -64,6 +64,7 @@ }, "license": "Apache-2.0", "devDependencies": { + "@types/minimatch": "^3.0.3", "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "@types/proxyquire": "^1.3.28", diff --git a/packages/@aws-cdk/aws-eks/package.json b/packages/@aws-cdk/aws-eks/package.json index 57aee0952b133..3d2f7e7bbed41 100644 --- a/packages/@aws-cdk/aws-eks/package.json +++ b/packages/@aws-cdk/aws-eks/package.json @@ -68,6 +68,7 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", + "@types/sinon": "^9.0.4", "@types/nodeunit": "^0.0.31", "@types/yaml": "1.9.6", "aws-sdk": "^2.739.0", diff --git a/packages/@aws-cdk/aws-events-targets/.gitignore b/packages/@aws-cdk/aws-events-targets/.gitignore index 2ed02868c78fb..47d785dc4d7de 100644 --- a/packages/@aws-cdk/aws-events-targets/.gitignore +++ b/packages/@aws-cdk/aws-events-targets/.gitignore @@ -15,6 +15,8 @@ nyc.config.js *.snk .cdk.staging +!build-tools/* + lib/sdk-api-metadata.json !.eslintrc.js !jest.config.js diff --git a/packages/@aws-cdk/aws-glue/jest.config.js b/packages/@aws-cdk/aws-glue/jest.config.js index cd664e1d069e5..54e28beb9798b 100644 --- a/packages/@aws-cdk/aws-glue/jest.config.js +++ b/packages/@aws-cdk/aws-glue/jest.config.js @@ -1,2 +1,2 @@ -const baseConfig = require('../../../tools/cdk-build-tools/config/jest.config'); +const baseConfig = require('cdk-build-tools/config/jest.config'); module.exports = baseConfig; diff --git a/packages/@aws-cdk/aws-iam/package.json b/packages/@aws-cdk/aws-iam/package.json index 06752ea376812..a3489a1221866 100644 --- a/packages/@aws-cdk/aws-iam/package.json +++ b/packages/@aws-cdk/aws-iam/package.json @@ -72,11 +72,14 @@ "license": "Apache-2.0", "devDependencies": { "@aws-cdk/assert": "0.0.0", + "@types/aws-lambda": "^8.10.39", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "cfn2ts": "0.0.0", "jest": "^26.4.2", "pkglint": "0.0.0", + "aws-sdk": "^2.739.0", + "@types/sinon": "^9.0.4", "sinon": "^9.0.3" }, "dependencies": { diff --git a/packages/@aws-cdk/aws-lambda-nodejs/package.json b/packages/@aws-cdk/aws-lambda-nodejs/package.json index da8d647f1301c..6c07c9e9d84d7 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/package.json +++ b/packages/@aws-cdk/aws-lambda-nodejs/package.json @@ -63,10 +63,13 @@ }, "license": "Apache-2.0", "devDependencies": { + "@types/fs-extra": "^8.1.0", "@aws-cdk/assert": "0.0.0", + "aws-sdk": "^2.713.0", "cdk-build-tools": "0.0.0", "cdk-integ-tools": "0.0.0", "delay": "4.4.0", + "@babel/core": "^7.7.5", "parcel": "2.0.0-beta.1", "pkglint": "0.0.0" }, @@ -89,6 +92,10 @@ "awscdkio": { "announce": false }, + "nozem": { + "ostools": ["docker", "bash", "mv", "cp", "yarn", "npm"], + "copyAllSourcesForTest": true + }, "cdk-build": { "jest": true } diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts index 12d9e07e44382..d23c403b6fb4e 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/function.test.ts @@ -7,6 +7,10 @@ import { Stack } from '@aws-cdk/core'; import { NodejsFunction } from '../lib'; import { Bundling } from '../lib/bundling'; +const PROJECT_ROOT = process.env.NZM_SOURCE_PACKAGE + ? process.env.NZM_SOURCE_PACKAGE + : path.join(__dirname, '..'); + jest.mock('../lib/bundling', () => { return { Bundling: { @@ -28,10 +32,12 @@ beforeEach(() => { test('NodejsFunction with .ts handler', () => { // WHEN - new NodejsFunction(stack, 'handler1'); + new NodejsFunction(stack, 'handler1', { + projectRoot: PROJECT_ROOT, + }); expect(Bundling.parcel).toHaveBeenCalledWith(expect.objectContaining({ - entry: expect.stringContaining('function.test.handler1.ts'), // Automatically finds .ts handler file + entry: expect.stringContaining('function.test.handler1.'), // Automatically finds .ts handler file })); expect(stack).toHaveResource('AWS::Lambda::Function', { @@ -41,7 +47,9 @@ test('NodejsFunction with .ts handler', () => { test('NodejsFunction with .js handler', () => { // WHEN - new NodejsFunction(stack, 'handler2'); + new NodejsFunction(stack, 'handler2', { + projectRoot: PROJECT_ROOT, + }); // THEN expect(Bundling.parcel).toHaveBeenCalledWith(expect.objectContaining({ @@ -52,6 +60,7 @@ test('NodejsFunction with .js handler', () => { test('NodejsFunction with container env vars', () => { // WHEN new NodejsFunction(stack, 'handler1', { + projectRoot: PROJECT_ROOT, parcelEnvironment: { KEY: 'VALUE', }, @@ -67,6 +76,7 @@ test('NodejsFunction with container env vars', () => { test('throws when entry is not js/ts', () => { expect(() => new NodejsFunction(stack, 'Fn', { entry: 'handler.py', + projectRoot: PROJECT_ROOT, })).toThrow(/Only JavaScript or TypeScript entry files are supported/); }); @@ -85,15 +95,19 @@ test('accepts tsx', () => { test('throws when entry does not exist', () => { expect(() => new NodejsFunction(stack, 'Fn', { entry: 'notfound.ts', + projectRoot: PROJECT_ROOT, })).toThrow(/Cannot find entry file at/); }); test('throws when entry cannot be automatically found', () => { - expect(() => new NodejsFunction(stack, 'Fn')).toThrow(/Cannot find entry file./); + expect(() => new NodejsFunction(stack, 'Fn', { + projectRoot: PROJECT_ROOT, + })).toThrow(/Cannot find entry file./); }); test('throws with the wrong runtime family', () => { expect(() => new NodejsFunction(stack, 'handler1', { + projectRoot: PROJECT_ROOT, runtime: Runtime.PYTHON_3_8, })).toThrow(/Only `NODEJS` runtimes are supported/); }); @@ -105,7 +119,7 @@ test('resolves entry to an absolute path', () => { }); expect(Bundling.parcel).toHaveBeenCalledWith(expect.objectContaining({ - entry: expect.stringMatching(/@aws-cdk\/aws-lambda-nodejs\/lib\/index.ts$/), + entry: path.resolve(__dirname, '..', 'lib', 'index.ts'), })); }); diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts index 58c9dfa7eb425..b4a5bce9e99c0 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.dependencies.ts @@ -9,6 +9,7 @@ class TestStack extends Stack { // This function uses aws-sdk but it will not be included new lambda.NodejsFunction(this, 'external', { + projectRoot: path.resolve(__dirname, '..'), entry: path.join(__dirname, 'integ-handlers/dependencies.ts'), runtime: Runtime.NODEJS_12_X, minify: true, @@ -16,7 +17,6 @@ class TestStack extends Stack { // (delay is a zero dependency package and its version is fixed // in the package.json to ensure a stable hash for this integ test) nodeModules: ['delay'], - forceDockerBundling: true, }); } } diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts index 2299dafbc5c9b..04a6240867587 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/integ.function.ts @@ -8,12 +8,14 @@ class TestStack extends Stack { super(scope, id, props); new lambda.NodejsFunction(this, 'ts-handler', { + projectRoot: path.resolve(__dirname, '..'), entry: path.join(__dirname, 'integ-handlers/ts-handler.ts'), runtime: Runtime.NODEJS_12_X, minify: true, }); new lambda.NodejsFunction(this, 'js-handler', { + projectRoot: path.resolve(__dirname, '..'), entry: path.join(__dirname, 'integ-handlers/js-handler.js'), runtime: Runtime.NODEJS_12_X, }); diff --git a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts index a85b0064cef85..6252b82a1d247 100644 --- a/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts +++ b/packages/@aws-cdk/aws-lambda-nodejs/test/util.test.ts @@ -3,17 +3,17 @@ import { findUp } from '../lib/util'; test('findUp', () => { // Starting at process.cwd() - expect(findUp('README.md')).toMatch(/aws-lambda-nodejs$/); + expect(findUp('README.md')).toEqual(path.resolve(__dirname, '..')); // Non existing file expect(findUp('non-existing-file.unknown')).toBe(undefined); // Starting at a specific path - expect(findUp('util.test.ts', path.join(__dirname, 'integ-handlers'))).toMatch(/aws-lambda-nodejs\/test$/); + expect(findUp('util.test.ts', path.join(__dirname, 'integ-handlers'))).toEqual(__dirname); // Non existing file starting at a non existing relative path expect(findUp('not-to-be-found.txt', 'non-existing/relative/path')).toBe(undefined); // Starting at a relative path - expect(findUp('util.test.ts', 'test/integ-handlers')).toMatch(/aws-lambda-nodejs\/test$/); + expect(findUp('util.test.ts', 'test/integ-handlers')).toEqual(__dirname); }); diff --git a/packages/@aws-cdk/aws-lambda-python/package.json b/packages/@aws-cdk/aws-lambda-python/package.json index a3398d486d7c7..aa25527676a65 100644 --- a/packages/@aws-cdk/aws-lambda-python/package.json +++ b/packages/@aws-cdk/aws-lambda-python/package.json @@ -89,6 +89,10 @@ "awscdkio": { "announce": false }, + "nozem": { + "ostools": ["docker"], + "copyAllSourcesForTest": true + }, "cdk-build": { "jest": true } diff --git a/packages/@aws-cdk/aws-lambda-python/test/function.test.ts b/packages/@aws-cdk/aws-lambda-python/test/function.test.ts index 9bc69a7757946..0160a81af6dbd 100644 --- a/packages/@aws-cdk/aws-lambda-python/test/function.test.ts +++ b/packages/@aws-cdk/aws-lambda-python/test/function.test.ts @@ -27,7 +27,7 @@ test('PythonFunction with defaults', () => { }); expect(bundle).toHaveBeenCalledWith(expect.objectContaining({ - entry: expect.stringMatching(/@aws-cdk\/aws-lambda-python\/test\/lambda-handler$/), + entry: expect.stringMatching(/\/test\/lambda-handler$/), })); expect(stack).toHaveResource('AWS::Lambda::Function', { @@ -43,7 +43,7 @@ test('PythonFunction with index in a subdirectory', () => { }); expect(bundle).toHaveBeenCalledWith(expect.objectContaining({ - entry: expect.stringMatching(/@aws-cdk\/aws-lambda-python\/test\/lambda-handler-sub$/), + entry: expect.stringMatching(/\/test\/lambda-handler-sub$/), })); expect(stack).toHaveResource('AWS::Lambda::Function', { diff --git a/packages/@aws-cdk/aws-lambda/package.json b/packages/@aws-cdk/aws-lambda/package.json index 331234b9f47dc..2e0dfd1ebda79 100644 --- a/packages/@aws-cdk/aws-lambda/package.json +++ b/packages/@aws-cdk/aws-lambda/package.json @@ -178,6 +178,9 @@ ] }, "stability": "stable", + "nozem": { + "ostools": ["docker"] + }, "awscdkio": { "announce": false }, diff --git a/packages/@aws-cdk/aws-lambda/test/integ.current-version.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.current-version.expected.json index bf269c8f6d555..1e18686602c93 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.current-version.expected.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.current-version.expected.json @@ -36,7 +36,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3BucketB47CCF1E" + "Ref": "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cS3BucketE8900D83" }, "S3Key": { "Fn::Join": [ @@ -49,7 +49,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B" + "Ref": "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cS3VersionKeyFD066EB8" } ] } @@ -62,7 +62,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B" + "Ref": "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cS3VersionKeyFD066EB8" } ] } @@ -85,7 +85,7 @@ "MyLambdaServiceRole4539ECB6" ] }, - "MyLambdaCurrentVersionE7A382CC721de083c6b4b6360a9c534b79eb610e": { + "MyLambdaCurrentVersionE7A382CCb7c238f989d002b7da7b2be4b3efd6c4": { "Type": "AWS::Lambda::Version", "Properties": { "FunctionName": { @@ -103,7 +103,7 @@ }, "Qualifier": { "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CC721de083c6b4b6360a9c534b79eb610e", + "MyLambdaCurrentVersionE7A382CCb7c238f989d002b7da7b2be4b3efd6c4", "Version" ] }, @@ -118,7 +118,7 @@ }, "FunctionVersion": { "Fn::GetAtt": [ - "MyLambdaCurrentVersionE7A382CC721de083c6b4b6360a9c534b79eb610e", + "MyLambdaCurrentVersionE7A382CCb7c238f989d002b7da7b2be4b3efd6c4", "Version" ] }, @@ -127,17 +127,17 @@ } }, "Parameters": { - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3BucketB47CCF1E": { + "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cS3BucketE8900D83": { "Type": "String", - "Description": "S3 bucket for asset \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" + "Description": "S3 bucket for asset \"5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3c\"" }, - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B": { + "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cS3VersionKeyFD066EB8": { "Type": "String", - "Description": "S3 key for asset version \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" + "Description": "S3 key for asset version \"5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3c\"" }, - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34ArtifactHash70E274C4": { + "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cArtifactHashD5562C20": { "Type": "String", - "Description": "Artifact hash for asset \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" + "Description": "Artifact hash for asset \"5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3c\"" } } } \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.layer-version.lit.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.layer-version.lit.expected.json index 93687882379f7..05662aa9dd3ae 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.layer-version.lit.expected.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.layer-version.lit.expected.json @@ -5,7 +5,7 @@ "Properties": { "Content": { "S3Bucket": { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3BucketB47CCF1E" + "Ref": "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cS3BucketE8900D83" }, "S3Key": { "Fn::Join": [ @@ -18,7 +18,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B" + "Ref": "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cS3VersionKeyFD066EB8" } ] } @@ -31,7 +31,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B" + "Ref": "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cS3VersionKeyFD066EB8" } ] } @@ -117,17 +117,17 @@ } }, "Parameters": { - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3BucketB47CCF1E": { + "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cS3BucketE8900D83": { "Type": "String", - "Description": "S3 bucket for asset \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" + "Description": "S3 bucket for asset \"5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3c\"" }, - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34S3VersionKey80D7B84B": { + "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cS3VersionKeyFD066EB8": { "Type": "String", - "Description": "S3 key for asset version \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" + "Description": "S3 key for asset version \"5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3c\"" }, - "AssetParameters8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34ArtifactHash70E274C4": { + "AssetParameters5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3cArtifactHashD5562C20": { "Type": "String", - "Description": "Artifact hash for asset \"8811a2632ac5564a08fd269e159298f7e497f259578b0dc5e927a1f48ab24d34\"" + "Description": "Artifact hash for asset \"5bfcc5e85793015838d125d6e30f1a931da22ebe768a9bad5cd1b17fd6bd0a3c\"" } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/integ.log-retention.expected.json b/packages/@aws-cdk/aws-lambda/test/integ.log-retention.expected.json index f123d24edf60a..3e45c9ce6d65d 100644 --- a/packages/@aws-cdk/aws-lambda/test/integ.log-retention.expected.json +++ b/packages/@aws-cdk/aws-lambda/test/integ.log-retention.expected.json @@ -133,7 +133,7 @@ "Properties": { "Code": { "S3Bucket": { - "Ref": "AssetParameters11aa2ce8971716ca7c8d28d472ab5e937131e78e136d0de8f4997fb11c4de847S3Bucket46EF559D" + "Ref": "AssetParameters3974ceb096f16a0d6c372c0c821ca2ab0333112497b2d3bc462ccaf2fc6037c3S3Bucket21D86049" }, "S3Key": { "Fn::Join": [ @@ -146,7 +146,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters11aa2ce8971716ca7c8d28d472ab5e937131e78e136d0de8f4997fb11c4de847S3VersionKey68B7BF84" + "Ref": "AssetParameters3974ceb096f16a0d6c372c0c821ca2ab0333112497b2d3bc462ccaf2fc6037c3S3VersionKey1F67C4C1" } ] } @@ -159,7 +159,7 @@ "Fn::Split": [ "||", { - "Ref": "AssetParameters11aa2ce8971716ca7c8d28d472ab5e937131e78e136d0de8f4997fb11c4de847S3VersionKey68B7BF84" + "Ref": "AssetParameters3974ceb096f16a0d6c372c0c821ca2ab0333112497b2d3bc462ccaf2fc6037c3S3VersionKey1F67C4C1" } ] } @@ -331,17 +331,17 @@ } }, "Parameters": { - "AssetParameters11aa2ce8971716ca7c8d28d472ab5e937131e78e136d0de8f4997fb11c4de847S3Bucket46EF559D": { + "AssetParameters3974ceb096f16a0d6c372c0c821ca2ab0333112497b2d3bc462ccaf2fc6037c3S3Bucket21D86049": { "Type": "String", - "Description": "S3 bucket for asset \"11aa2ce8971716ca7c8d28d472ab5e937131e78e136d0de8f4997fb11c4de847\"" + "Description": "S3 bucket for asset \"3974ceb096f16a0d6c372c0c821ca2ab0333112497b2d3bc462ccaf2fc6037c3\"" }, - "AssetParameters11aa2ce8971716ca7c8d28d472ab5e937131e78e136d0de8f4997fb11c4de847S3VersionKey68B7BF84": { + "AssetParameters3974ceb096f16a0d6c372c0c821ca2ab0333112497b2d3bc462ccaf2fc6037c3S3VersionKey1F67C4C1": { "Type": "String", - "Description": "S3 key for asset version \"11aa2ce8971716ca7c8d28d472ab5e937131e78e136d0de8f4997fb11c4de847\"" + "Description": "S3 key for asset version \"3974ceb096f16a0d6c372c0c821ca2ab0333112497b2d3bc462ccaf2fc6037c3\"" }, - "AssetParameters11aa2ce8971716ca7c8d28d472ab5e937131e78e136d0de8f4997fb11c4de847ArtifactHash27BA7171": { + "AssetParameters3974ceb096f16a0d6c372c0c821ca2ab0333112497b2d3bc462ccaf2fc6037c3ArtifactHash31AA1F7C": { "Type": "String", - "Description": "Artifact hash for asset \"11aa2ce8971716ca7c8d28d472ab5e937131e78e136d0de8f4997fb11c4de847\"" + "Description": "Artifact hash for asset \"3974ceb096f16a0d6c372c0c821ca2ab0333112497b2d3bc462ccaf2fc6037c3\"" } } -} +} \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/layer-code/layer-code-here.txt b/packages/@aws-cdk/aws-lambda/test/layer-code/layer-code-here.txt new file mode 100644 index 0000000000000..e7c347b3510f5 --- /dev/null +++ b/packages/@aws-cdk/aws-lambda/test/layer-code/layer-code-here.txt @@ -0,0 +1,2 @@ +Have this directory not contain .js/.ts files +because the hash matters and I don't want it changing. \ No newline at end of file diff --git a/packages/@aws-cdk/aws-lambda/test/layer-code/layer.ts b/packages/@aws-cdk/aws-lambda/test/layer-code/layer.ts deleted file mode 100644 index de36deb9a37a2..0000000000000 --- a/packages/@aws-cdk/aws-lambda/test/layer-code/layer.ts +++ /dev/null @@ -1,3 +0,0 @@ -export async function main(_event: any, _context: any) { - return 'Done!'; -} diff --git a/packages/@aws-cdk/aws-logs/package.json b/packages/@aws-cdk/aws-logs/package.json index c2551e40f7b8e..0d844a3446e1d 100644 --- a/packages/@aws-cdk/aws-logs/package.json +++ b/packages/@aws-cdk/aws-logs/package.json @@ -70,6 +70,8 @@ }, "license": "Apache-2.0", "devDependencies": { + "@types/aws-lambda": "^8.10.61", + "@types/sinon": "^9.0.5", "@aws-cdk/assert": "0.0.0", "@types/nodeunit": "^0.0.31", "aws-sdk": "^2.739.0", diff --git a/packages/@aws-cdk/aws-s3-assets/package.json b/packages/@aws-cdk/aws-s3-assets/package.json index 389e186eae655..a449fbd99cd1a 100644 --- a/packages/@aws-cdk/aws-s3-assets/package.json +++ b/packages/@aws-cdk/aws-s3-assets/package.json @@ -106,6 +106,9 @@ "docs-public-apis:@aws-cdk/aws-s3-assets.AssetProps" ] }, + "nozem": { + "ostools": ["docker"] + }, "awscdkio": { "announce": false } diff --git a/packages/@aws-cdk/aws-s3-deployment/package.json b/packages/@aws-cdk/aws-s3-deployment/package.json index 429991c20e751..a5f369619d60e 100644 --- a/packages/@aws-cdk/aws-s3-deployment/package.json +++ b/packages/@aws-cdk/aws-s3-deployment/package.json @@ -116,6 +116,9 @@ }, "stability": "experimental", "maturity": "experimental", + "nozem": { + "ostools": ["dirname", "rm", "mktemp", "rsync", "pip3", "bash", "cut", "sed", "mkdir", "cat", "chmod", "mv", "zip", "cp", "sort", "uniq", "python3"] + }, "awslint": { "exclude": [ "docs-public-apis:@aws-cdk/aws-s3-deployment.Expires.fromString", diff --git a/packages/@aws-cdk/aws-synthetics/.gitignore b/packages/@aws-cdk/aws-synthetics/.gitignore index 5aa413b898780..0e6de8cf09dbd 100644 --- a/packages/@aws-cdk/aws-synthetics/.gitignore +++ b/packages/@aws-cdk/aws-synthetics/.gitignore @@ -18,3 +18,4 @@ nyc.config.js !jest.config.js junit.xml +!test/canaries/**/* diff --git a/packages/@aws-cdk/cdk-assets-schema/package.json b/packages/@aws-cdk/cdk-assets-schema/package.json index a2f6e7a88f7e8..4d485f8b094f2 100644 --- a/packages/@aws-cdk/cdk-assets-schema/package.json +++ b/packages/@aws-cdk/cdk-assets-schema/package.json @@ -51,6 +51,7 @@ }, "license": "Apache-2.0", "devDependencies": { + "@types/semver": "^7.2.0", "@types/jest": "^26.0.14", "cdk-build-tools": "0.0.0", "jest": "^26.4.2", diff --git a/packages/@aws-cdk/cloud-assembly-schema/package.json b/packages/@aws-cdk/cloud-assembly-schema/package.json index 330990684ae18..98878dc8177f6 100644 --- a/packages/@aws-cdk/cloud-assembly-schema/package.json +++ b/packages/@aws-cdk/cloud-assembly-schema/package.json @@ -52,6 +52,7 @@ }, "license": "Apache-2.0", "devDependencies": { + "@types/semver": "^7.2.0", "@types/jest": "^26.0.14", "@types/mock-fs": "^4.10.0", "cdk-build-tools": "0.0.0", diff --git a/packages/@aws-cdk/cloudformation-include/build.js b/packages/@aws-cdk/cloudformation-include/build.js index ab36ffd345d7f..a8449a8cc3222 100644 --- a/packages/@aws-cdk/cloudformation-include/build.js +++ b/packages/@aws-cdk/cloudformation-include/build.js @@ -10,25 +10,34 @@ const fs = require('fs'); const path = require('path'); -const jsii_reflect = require('jsii-reflect'); +// Use the jsii-reflect from cdk-build-tools +const cdkBuildToolsPath = require.resolve('cdk-build-tools/package.json'); +const jsiiReflectPath = require.resolve('jsii-reflect', { paths: [cdkBuildToolsPath] }); +const jsii_reflect = require(jsiiReflectPath); const packageJson = require('./package.json'); const dependencies = packageJson.dependencies || {}; const peerDependencies = packageJson.peerDependencies || {}; async function main() { - const constructLibrariesRoot = path.resolve('..'); + await validatePackageJsonCompleteness(); + await buildL1Catalog(); +} + +/** + * Validate that we have all requires packages in package.json + */ +async function validatePackageJsonCompleteness() { + const sourcePath = path.resolve(process.env.NZM_PACKAGE_SOURCE || __dirname); + + const constructLibrariesRoot = path.resolve(sourcePath, '..'); const constructLibrariesDirs = fs.readdirSync(constructLibrariesRoot); let errors = false; - const typeSystem = new jsii_reflect.TypeSystem(); - const cfnType2L1Class = {}; - // load the @aws-cdk/core assembly first, to find the CfnResource class - await typeSystem.load(path.resolve(constructLibrariesRoot, 'core'), { validate: false }); - const cfnResourceClass = typeSystem.findClass('@aws-cdk/core.CfnResource'); - for (const constructLibraryDir of constructLibrariesDirs) { const absConstructLibraryDir = path.resolve(constructLibrariesRoot, constructLibraryDir); + if (!fs.statSync(absConstructLibraryDir).isDirectory()) { continue; } + const libraryPackageJson = require(path.join(absConstructLibraryDir, 'package.json')); const libraryDependencyVersion = dependencies[libraryPackageJson.name]; @@ -63,10 +72,37 @@ async function main() { dependencies[libraryPackageJson.name] = libraryVersion; // dependencies need to be in both sections to satisfy pkglint peerDependencies[libraryPackageJson.name] = libraryVersion; + } + + fs.writeFileSync(path.join(sourcePath, 'package.json'), + JSON.stringify(packageJson, undefined, 2) + '\n'); + + if (errors) { + console.error('errors found. updated package.json'); + process.exit(1); + } +} + +/** + * Build a catalog of resources types based on dependencies in package.json + */ +async function buildL1Catalog() { + const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, 'package.json'), { encoding: 'utf-8' })); + + const typeSystem = new jsii_reflect.TypeSystem(); + const cfnType2L1Class = {}; + // load the @aws-cdk/core assembly first, to find the CfnResource class + await typeSystem.load(dependencyDir('@aws-cdk/core'), { validate: false }); + const cfnResourceClass = typeSystem.findClass('@aws-cdk/core.CfnResource'); + + for (const packageName of Object.keys(packageJson.dependencies || {})) { + const depDir = dependencyDir(packageName); + const depPJ = require(`${depDir}/package.json`); + if (!depPJ.jsii) { continue; } // Skip non-jsii dependencies // load the assembly of this package, // and find all subclasses of CfnResource to put them in cfnType2L1Class - const assembly = await typeSystem.load(absConstructLibraryDir, { validate: false }); + const assembly = await typeSystem.load(depDir, { validate: false }); for (let i = 0; i < assembly.classes.length; i++) { const classs = assembly.classes[i]; if (classs.extends(cfnResourceClass)) { @@ -82,15 +118,12 @@ async function main() { } } - fs.writeFileSync(path.join(__dirname, 'package.json'), - JSON.stringify(packageJson, undefined, 2) + '\n'); fs.writeFileSync(path.join(__dirname, 'cfn-types-2-classes.json'), JSON.stringify(cfnType2L1Class, undefined, 2) + '\n'); +} - if (errors) { - console.error('errors found. updated package.json'); - process.exit(1); - } +function dependencyDir(packageName) { + return path.dirname(require.resolve(`${packageName}/package.json`)); } (async () => { diff --git a/packages/@aws-cdk/cloudformation-include/package.json b/packages/@aws-cdk/cloudformation-include/package.json index ee082f18e4322..90211eae4e246 100644 --- a/packages/@aws-cdk/cloudformation-include/package.json +++ b/packages/@aws-cdk/cloudformation-include/package.json @@ -186,6 +186,7 @@ "@aws-cdk/aws-wafv2": "0.0.0", "@aws-cdk/aws-workspaces": "0.0.0", "@aws-cdk/core": "0.0.0", + "constructs": "^3.0.4", "@aws-cdk/yaml-cfn": "0.0.0" }, "peerDependencies": { @@ -345,6 +346,9 @@ ] }, "stability": "experimental", + "nozem": { + "skipTsApiOptimization": true + }, "maturity": "developer-preview", "awscdkio": { "announce": false diff --git a/packages/@aws-cdk/core/.gitignore b/packages/@aws-cdk/core/.gitignore index 5960e89add3c9..bb45f686bf544 100644 --- a/packages/@aws-cdk/core/.gitignore +++ b/packages/@aws-cdk/core/.gitignore @@ -14,4 +14,7 @@ nyc.config.js *.snk !.eslintrc.js -junit.xml \ No newline at end of file +# codepipeline looses symlinks so we bundled fixtures into a tarball +# and unpack in pre-build script (yak) +test/fs/fixtures/** +junit.xml diff --git a/packages/@aws-cdk/core/package.json b/packages/@aws-cdk/core/package.json index d3cf4a0a1c656..f71bd1e75d540 100644 --- a/packages/@aws-cdk/core/package.json +++ b/packages/@aws-cdk/core/package.json @@ -163,9 +163,11 @@ "devDependencies": { "@types/lodash": "^4.14.161", "@types/minimatch": "^3.0.3", + "@types/sinon": "^9.0.5", + "@types/fs-extra": "^8.1.0", + "@types/aws-lambda": "^8.10.39", "@types/node": "^10.17.35", "@types/nodeunit": "^0.0.31", - "@types/sinon": "^9.0.5", "cdk-build-tools": "0.0.0", "cfn2ts": "0.0.0", "fast-check": "^2.3.0", @@ -198,6 +200,9 @@ "node": ">= 10.13.0 <13 || >=13.7.0" }, "stability": "stable", + "nozem": { + "ostools": ["rm", "tar", "grep", "xargs", "head", "cut", "touch", "diff", "echo"] + }, "awscdkio": { "announce": false }, diff --git a/packages/@aws-cdk/core/test/fs/.gitignore b/packages/@aws-cdk/core/test/fs/.gitignore deleted file mode 100644 index b13de5858771b..0000000000000 --- a/packages/@aws-cdk/core/test/fs/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -# codepipeline looses symlinks so we bundled fixtures into a tarball -# and unpack in pre-build script (yak) -fixtures/** diff --git a/packages/@aws-cdk/custom-resources/lib/provider-framework/types.d.ts b/packages/@aws-cdk/custom-resources/lib/provider-framework/types.d.ts index 33a125a971cca..1610e4bd5d09a 100644 --- a/packages/@aws-cdk/custom-resources/lib/provider-framework/types.d.ts +++ b/packages/@aws-cdk/custom-resources/lib/provider-framework/types.d.ts @@ -1,10 +1,12 @@ +import * as AWSLambda from 'aws-lambda'; + // this is a type definition file that exports ambiant types that can be used // to implement async custom resource handler and enjoy the comfort of type safety. /** * these types can be accessed without needing to `import` the module. * e.g. `AWSCDKAsyncCustomResource.OnEventRequest` - */ + */ export as namespace AWSCDKAsyncCustomResource; /** diff --git a/packages/@aws-cdk/custom-resources/package.json b/packages/@aws-cdk/custom-resources/package.json index 511c490dae19b..027ca53f7abc7 100644 --- a/packages/@aws-cdk/custom-resources/package.json +++ b/packages/@aws-cdk/custom-resources/package.json @@ -119,6 +119,9 @@ "construct-ctor-props-optional:@aws-cdk/custom-resources.AwsCustomResource" ] }, + "nozem": { + "ostools": ["cp", "rm", "npm"] + }, "awscdkio": { "announce": false }, diff --git a/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts b/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts index 05210ed891eed..5a775306e6423 100644 --- a/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts +++ b/packages/@aws-cdk/cx-api/lib/cloud-assembly.ts @@ -267,7 +267,6 @@ export class CloudAssemblyBuilder { * @param options */ public buildAssembly(options: AssemblyBuildOptions = { }): CloudAssembly { - // explicitly initializing this type will help us detect // breaking changes. (For example adding a required property will break compilation). let manifest: cxschema.AssemblyManifest = { diff --git a/packages/@aws-cdk/region-info/package.json b/packages/@aws-cdk/region-info/package.json index 5ea296f02297d..852bd48293ce7 100644 --- a/packages/@aws-cdk/region-info/package.json +++ b/packages/@aws-cdk/region-info/package.json @@ -34,7 +34,7 @@ }, "cdk-build": { "pre": [ - "npm run gen" + "yarn gen" ], "jest": true }, @@ -85,6 +85,9 @@ "docs-public-apis:@aws-cdk/region-info.RegionInfo.name" ] }, + "nozem": { + "ostools": ["yarn", "bash"] + }, "awscdkio": { "announce": false } diff --git a/packages/@monocdk-experiment/assert/clone.sh b/packages/@monocdk-experiment/assert/clone.sh index 9cf4731c69f64..4e4d22a8fd9f0 100755 --- a/packages/@monocdk-experiment/assert/clone.sh +++ b/packages/@monocdk-experiment/assert/clone.sh @@ -3,11 +3,12 @@ scriptdir=$(cd $(dirname $0) && pwd) cd $scriptdir set -euo pipefail -src="../../@aws-cdk/assert" +src=$(node -p 'path.dirname(require.resolve("@aws-cdk/assert/package.json"))') +# src="../../@aws-cdk/assert" rsync -av $src/lib/ lib/ rsync -av $src/test/ test/ -files="README.md LICENSE NOTICE .npmignore jest.ts" +files="README.md LICENSE NOTICE .npmignore jest.?s" for file in ${files}; do cp $src/$file . diff --git a/packages/@monocdk-experiment/assert/package.json b/packages/@monocdk-experiment/assert/package.json index a1e3296b4f3d0..0368970d79c1e 100644 --- a/packages/@monocdk-experiment/assert/package.json +++ b/packages/@monocdk-experiment/assert/package.json @@ -33,6 +33,7 @@ }, "license": "Apache-2.0", "devDependencies": { + "@aws-cdk/assert": "0.0.0", "@monocdk-experiment/rewrite-imports": "0.0.0", "@types/jest": "^26.0.14", "@types/node": "^10.17.35", @@ -44,7 +45,11 @@ "ts-jest": "^26.3.0" }, "dependencies": { - "@aws-cdk/cloudformation-diff": "0.0.0" + "@aws-cdk/cloudformation-diff": "0.0.0", + "@aws-cdk/core": "0.0.0", + "@aws-cdk/cx-api": "0.0.0", + "@aws-cdk/cloud-assembly-schema": "0.0.0", + "constructs": "^3.0.2" }, "peerDependencies": { "constructs": "^3.0.4", @@ -64,6 +69,10 @@ "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" }, + "nozem": { + "ostools": ["dirname", "rsync", "cp", "npx"], + "skipTsApiOptimization": true + }, "stability": "experimental", "maturity": "developer-preview" } diff --git a/packages/aws-cdk-lib/package.json b/packages/aws-cdk-lib/package.json index e60a75e06db76..8fc46cc3d6926 100644 --- a/packages/aws-cdk-lib/package.json +++ b/packages/aws-cdk-lib/package.json @@ -275,6 +275,9 @@ "aws", "cdk" ], + "nozem": { + "ostools": ["npm"] + }, "awscdkio": { "announce": false } diff --git a/packages/aws-cdk/generate.sh b/packages/aws-cdk/generate.sh index e5ea04d12acd8..43270cd616abd 100755 --- a/packages/aws-cdk/generate.sh +++ b/packages/aws-cdk/generate.sh @@ -5,7 +5,7 @@ commit=${CODEBUILD_RESOLVED_SOURCE_VERSION:-} # CODEBUILD_RESOLVED_SOURCE_VERSION is not defined (i.e. local build or CodePipeline build), # use the HEAD commit hash if [ -z "${commit}" ]; then - commit="$(git rev-parse --verify HEAD)" + commit="$(cd ${NZM_PACKAGE_SOURCE:-.} && git rev-parse --verify HEAD)" fi cat > build-info.json < build-info.json <= 10.13.0 <13 || >=13.7.0" }, diff --git a/packages/awslint/.eslintrc.js b/packages/awslint/.eslintrc.js index 61dd8dd001f63..9046b753a51d3 100644 --- a/packages/awslint/.eslintrc.js +++ b/packages/awslint/.eslintrc.js @@ -1,3 +1,169 @@ -const baseConfig = require('cdk-build-tools/config/eslintrc'); -baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; -module.exports = baseConfig; +// This cannot reference the build rules from cdk-build-tools as this +// package is itself used by cdk-build-tools. +// +/** + * JavaScript and generic rules: + * + * https://eslint.org/docs/rules/ + * + * TypeScript-specific rules (including migrations from TSlint), see here: + * + * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/ROADMAP.md + */ +module.exports = { + env: { + jest: true, + node: true + }, + plugins: [ + '@typescript-eslint', + 'import' + ], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: '2018', + sourceType: 'module', + project: './tsconfig.json', + }, + extends: [ + 'plugin:import/typescript' + ], + settings: { + 'import/parsers': { + '@typescript-eslint/parser': ['.ts', '.tsx'] + }, + 'import/resolver': { + node: {}, + typescript: { + directory: './tsconfig.json' + } + } + }, + ignorePatterns: [ '*.js', '*.d.ts', 'node_modules/', '*.generated.ts' ], + rules: { + // Require use of the `import { foo } from 'bar';` form instead of `import foo = require('bar');` + '@typescript-eslint/no-require-imports': [ 'error' ], + '@typescript-eslint/indent': [ 'error', 2 ], + + // Style + 'quotes': [ 'error', 'single', { avoidEscape: true } ], + 'comma-dangle': [ 'error', 'always-multiline' ], // ensures clean diffs, see https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8 + + // Require all imported dependencies are actually declared in package.json + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: [ // Only allow importing devDependencies from: + '**/build-tools/**', // --> Build tools + '**/test/**' // --> Unit tests + ], + optionalDependencies: false, // Disallow importing optional dependencies (those shouldn't be in use in the project) + peerDependencies: false // Disallow importing peer dependencies (that aren't also direct dependencies) + } + ], + + // Require all imported libraries actually resolve (!!required for import/no-extraneous-dependencies to work!!) + 'import/no-unresolved': [ 'error' ], + + // Require an ordering on all imports -- unfortunately a different ordering than TSLint used to + // enforce, but there are no compatible ESLint rules as far as I can tell :( + // + // WARNING for now, otherwise this will mess up all open PRs. Make it into an error after a transitionary period. + 'import/order': ['warn', { + groups: ['builtin', 'external'], + alphabetize: { order: 'asc', caseInsensitive: true }, + }], + + // Cannot import from the same module twice + 'no-duplicate-imports': ['error'], + + // Cannot shadow names + 'no-shadow': ['off'], + '@typescript-eslint/no-shadow': ['error'], + + // Required spacing in property declarations (copied from TSLint, defaults are good) + 'key-spacing': ['error'], + + // Require semicolons + 'semi': ['error', 'always'], + + // Don't unnecessarily quote properties + 'quote-props': ['error', 'consistent-as-needed'], + + // No multiple empty lines + 'no-multiple-empty-lines': ['error'], + + // Max line lengths + 'max-len': ['error', { + code: 150, + ignoreUrls: true, // Most common reason to disable it + ignoreStrings: true, // These are not fantastic but necessary for error messages + ignoreTemplateLiterals: true, + ignoreComments: true, + ignoreRegExpLiterals: true, + }], + + // One of the easiest mistakes to make + '@typescript-eslint/no-floating-promises': ['error'], + + // Don't leave log statements littering the premises! + 'no-console': ['error'], + + // Useless diff results + 'no-trailing-spaces': ['error'], + + // Must use foo.bar instead of foo['bar'] if possible + 'dot-notation': ['error'], + + // Must use 'import' statements (disabled because it doesn't add a lot over no-require-imports) + // '@typescript-eslint/no-var-requires': ['error'], + + // Are you sure | is not a typo for || ? + 'no-bitwise': ['error'], + + // Oh ho ho naming. Everyone's favorite topic! + // FIXME: there's no way to do this properly. The proposed tslint replacement + // works very differently, also checking names in object literals, which we use all over the + // place for configs, mockfs, nodeunit tests, etc. + // + // The maintainer does not want to change behavior. + // https://github.com/typescript-eslint/typescript-eslint/issues/1483 + // + // There is no good replacement for tslint's name checking, currently. We will have to make do + // with jsii's validation. + /* + '@typescript-eslint/naming-convention': ['error', + + // We could maybe be more specific in a number of these but I didn't want to + // spend too much effort. Knock yourself out if you feel like it. + { selector: 'enumMember', format: ['PascalCase', 'UPPER_CASE'] }, + { selector: 'variableLike', format: ['camelCase', 'UPPER_CASE'], leadingUnderscore: 'allow' }, + { selector: 'typeLike', format: ['PascalCase'], leadingUnderscore: 'allow' }, + { selector: 'memberLike', format: ['camelCase', 'PascalCase', 'UPPER_CASE'], leadingUnderscore: 'allow' }, + + // FIXME: there's no way to disable name checking in object literals. Maintainer won't have it + // https://github.com/typescript-eslint/typescript-eslint/issues/1483 + ], + */ + + // Member ordering + '@typescript-eslint/member-ordering': ['error', { + default: [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + + "field", + + // Constructors + "constructor", // = ["public-constructor", "protected-constructor", "private-constructor"] + + // Methods + "method", + ] + }], + }, +} diff --git a/packages/awslint/lib/rules/docs.ts b/packages/awslint/lib/rules/docs.ts index fda92170bd80a..b5c624e7f9471 100644 --- a/packages/awslint/lib/rules/docs.ts +++ b/packages/awslint/lib/rules/docs.ts @@ -97,6 +97,6 @@ function isCfnType(ctx: DocsLinterContext) { } } -function flatMap(array: readonly T[], callbackfn: (value: T, index: number, array: readonly T[]) => U[]): U[] { +function flatMap(array: readonly T[], callbackfn: (value: T, index: number, arr: readonly T[]) => U[]): U[] { return Array.prototype.concat(...array.map(callbackfn)); } diff --git a/packages/awslint/lib/rules/resource.ts b/packages/awslint/lib/rules/resource.ts index 24df37d0160fc..339b1c32c0652 100644 --- a/packages/awslint/lib/rules/resource.ts +++ b/packages/awslint/lib/rules/resource.ts @@ -10,17 +10,16 @@ const GRANT_RESULT_FQN = '@aws-cdk/aws-iam.Grant'; export const resourceLinter = new Linter(a => ResourceReflection.findAll(a)); +export enum AttributeSite { + Interface = 'interface', + Class = 'class' +} export interface Attribute { site: AttributeSite; property: reflect.Property; cfnAttributeNames: string[]; // bucketArn } -export enum AttributeSite { - Interface = 'interface', - Class = 'class' -} - export class ResourceReflection { /** diff --git a/packages/awslint/package.json b/packages/awslint/package.json index 10371217cdce3..47b3b84d30128 100644 --- a/packages/awslint/package.json +++ b/packages/awslint/package.json @@ -3,7 +3,7 @@ "version": "0.0.0", "description": "Enforces the AWS Construct Library guidelines", "scripts": { - "build": "tsc -b && npm run lint && chmod +x bin/awslint", + "build": "tsc -b && eslint . --ext=.ts && pkglint && chmod +x bin/awslint", "lint": "eslint . --ext=.ts && pkglint", "test": "echo ok", "watch": "tsc -b -w", @@ -27,7 +27,13 @@ "@types/fs-extra": "^8.1.1", "@types/yargs": "^15.0.5", "pkglint": "0.0.0", - "typescript": "~3.9.7" + "typescript": "~3.9.7", + "@typescript-eslint/eslint-plugin": "^4.1.1", + "@typescript-eslint/parser": "^4.1.1", + "eslint": "^6.8.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-import-resolver-typescript": "^2.0.0", + "eslint-plugin-import": "^2.22.0" }, "repository": { "type": "git", @@ -45,6 +51,9 @@ "aws", "cdk" ], + "nozem": { + "ostools": ["chmod", "npm"] + }, "maturity": "developer-preview", "stability": "experimental", "engines": { diff --git a/packages/cdk-assets/package.json b/packages/cdk-assets/package.json index cde9251f3232d..7d5ee2bb3956b 100644 --- a/packages/cdk-assets/package.json +++ b/packages/cdk-assets/package.json @@ -67,6 +67,9 @@ "cdk-package": { "shrinkWrap": true }, + "nozem": { + "ostools": ["unzip", "diff"] + }, "stability": "experimental", "maturity": "experimental" } diff --git a/packages/cdk-dasm/.gitignore b/packages/cdk-dasm/.gitignore index 88e6bb7a9196f..870e5568df789 100644 --- a/packages/cdk-dasm/.gitignore +++ b/packages/cdk-dasm/.gitignore @@ -3,3 +3,4 @@ !deps.js test/fixture/.jsii cdk.schema.json +!jest.config.js diff --git a/packages/cdk-dasm/jest.config.js b/packages/cdk-dasm/jest.config.js index 31ffb09bc460e..1b2d773cbac18 100644 --- a/packages/cdk-dasm/jest.config.js +++ b/packages/cdk-dasm/jest.config.js @@ -1,180 +1,29 @@ -// For a detailed explanation regarding each configuration property, visit: -// https://jestjs.io/docs/en/configuration.html - module.exports = { - // All imported modules in your tests should be mocked automatically - // automock: false, - - // Stop running tests after `n` failures - // bail: 0, - - // Respect "browser" field in package.json when resolving modules - // browser: false, - - // The directory where Jest should store its cached dependency information - // cacheDirectory: "/private/var/folders/n2/6v4_tbz97ws0h4bn5gbyvzb0m8vcjb/T/jest_b92skr", - - // Automatically clear mock calls and instances between every test - // clearMocks: false, - - // Indicates whether the coverage information should be collected while executing the test - // collectCoverage: false, - - // An array of glob patterns indicating a set of files for which coverage information should be collected - // collectCoverageFrom: null, - - // The directory where Jest should output its coverage files - coverageDirectory: "coverage", - - // An array of regexp pattern strings used to skip coverage collection - // coveragePathIgnorePatterns: [ - // "/node_modules/" - // ], - - // A list of reporter names that Jest uses when writing coverage reports - // coverageReporters: [ - // "json", - // "text", - // "lcov", - // "clover" - // ], - - // An object that configures minimum threshold enforcement for coverage results - // coverageThreshold: null, - - // A path to a custom dependency extractor - // dependencyExtractor: null, - - // Make calling deprecated APIs throw helpful error messages - // errorOnDeprecated: false, - - // Force coverage collection from ignored files using an array of glob patterns - // forceCoverageMatch: [], - - // A path to a module which exports an async function that is triggered once before all test suites - // globalSetup: null, - - // A path to a module which exports an async function that is triggered once after all test suites - // globalTeardown: null, - - // A set of global variables that need to be available in all test environments - // globals: {}, - - // An array of directory names to be searched recursively up from the requiring module's location - // moduleDirectories: [ - // "node_modules" - // ], - - // An array of file extensions your modules use - moduleFileExtensions: [ - "js" - ], - - // A map from regular expressions to module names that allow to stub out resources with a single module - // moduleNameMapper: {}, - - // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader - // modulePathIgnorePatterns: [], - - // Activates notifications for test results - // notify: false, - - // An enum that specifies notification mode. Requires { notify: true } - // notifyMode: "failure-change", - - // A preset that is used as a base for Jest's configuration - // preset: null, - - // Run tests from one or more projects - // projects: null, - - // Use this configuration option to add custom reporters to Jest - // reporters: undefined, - - // Automatically reset mock state between every test - // resetMocks: false, - - // Reset the module registry before running each individual test - // resetModules: false, - - // A path to a custom resolver - // resolver: null, - - // Automatically restore mock state between every test - // restoreMocks: false, - - // The root directory that Jest should scan for tests and modules within - // rootDir: null, - - // A list of paths to directories that Jest should use to search for files in - // roots: [ - // "" - // ], - - // Allows you to use a custom runner instead of Jest's default test runner - // runner: "jest-runner", - - // The paths to modules that run some code to configure or set up the testing environment before each test - // setupFiles: [], - - // A list of paths to modules that run some code to configure or set up the testing framework before each test - // setupFilesAfterEnv: [], - - // A list of paths to snapshot serializer modules Jest should use for snapshot testing - // snapshotSerializers: [], - - // The test environment that will be used for testing - testEnvironment: "node", - - // Options that will be passed to the testEnvironment - // testEnvironmentOptions: {}, - - // Adds a location field to test results - // testLocationInResults: false, - - // The glob patterns Jest uses to detect test files - // testMatch: [ - // "**/__tests__/**/*.[jt]s?(x)", - // "**/?(*.)+(spec|test).[tj]s?(x)" - // ], - - // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped - // testPathIgnorePatterns: [ - // "/node_modules/" - // ], - - // The regexp pattern or array of patterns that Jest uses to detect test files - // testRegex: [], - - // This option allows the use of a custom results processor - // testResultsProcessor: null, - - // This option allows use of a custom test runner - // testRunner: "jasmine2", - - // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href - // testURL: "http://localhost", - - // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout" - // timers: "real", - - // A map from regular expressions to paths to transformers - // transform: null, - - // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation - // transformIgnorePatterns: [ - // "/node_modules/" - // ], - - // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them - // unmockedModulePathPatterns: undefined, - - // Indicates whether each individual test should be reported during the run - // verbose: null, - - // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode - // watchPathIgnorePatterns: [], - - // Whether to use watchman for file crawling - // watchman: true, + moduleFileExtensions: [ + "js", + ], + testMatch: [ + "**/?(*.)+(test).js", + ], + testEnvironment: "node", + coverageThreshold: { + global: { + branches: 70, + statements: 80, + }, + }, + collectCoverage: true, + coverageReporters: [ + "lcov", + "html", + "text-summary", + ], + coveragePathIgnorePatterns: [ + "/lib/.*\\.generated\\.[jt]s", + "/test/.*\\.[jt]s", + ], + reporters: [ + "default", + [ "jest-junit", { suiteName: "jest tests" } ] + ] }; diff --git a/packages/cdk-dasm/package.json b/packages/cdk-dasm/package.json index 0a27c4a75f87e..91ff20609aa14 100644 --- a/packages/cdk-dasm/package.json +++ b/packages/cdk-dasm/package.json @@ -32,12 +32,16 @@ "devDependencies": { "@types/jest": "^26.0.14", "@types/yaml": "1.9.7", + "typescript": "~3.8.3", "jest": "^26.4.2" }, "keywords": [ "aws", "cdk" ], + "nozem": { + "ostools": ["chmod"] + }, "homepage": "https://github.com/aws/aws-cdk", "engines": { "node": ">= 8.10.0" diff --git a/packages/decdk/deps.js b/packages/decdk/deps.js index c7b66f27d0827..6c0525b75f5d6 100644 --- a/packages/decdk/deps.js +++ b/packages/decdk/deps.js @@ -8,12 +8,13 @@ const path = require('path'); const pkg = require('./package.json'); const deps = pkg.dependencies || (pkg.dependencies = {}); -const root = path.resolve('..', '..', 'packages', '@aws-cdk'); +const root = path.resolve(process.env.NZM_PACKAGE_SOURCE || '.', '..', '..', 'packages', '@aws-cdk'); const modules = fs.readdirSync(root); let errors = false; for (const dir of modules) { const module = path.resolve(root, dir); + if (!fs.statSync(module).isDirectory()) { continue; } const meta = require(path.join(module, 'package.json')); // skip non-jsii modules diff --git a/packages/decdk/jest.config.js b/packages/decdk/jest.config.js index f4cc833bdc324..7729c38da5c40 100644 --- a/packages/decdk/jest.config.js +++ b/packages/decdk/jest.config.js @@ -1,183 +1,2 @@ -// For a detailed explanation regarding each configuration property, visit: -// https://jestjs.io/docs/en/configuration.html - -module.exports = { - // All imported modules in your tests should be mocked automatically - // automock: false, - - // Stop running tests after `n` failures - // bail: 0, - - // Respect "browser" field in package.json when resolving modules - // browser: false, - - // The directory where Jest should store its cached dependency information - // cacheDirectory: "/private/var/folders/n2/6v4_tbz97ws0h4bn5gbyvzb0m8vcjb/T/jest_b92skr", - - // Automatically clear mock calls and instances between every test - clearMocks: true, - - // Indicates whether the coverage information should be collected while executing the test - // collectCoverage: false, - - // An array of glob patterns indicating a set of files for which coverage information should be collected - // collectCoverageFrom: null, - - // The directory where Jest should output its coverage files - coverageDirectory: "coverage", - - // An array of regexp pattern strings used to skip coverage collection - // coveragePathIgnorePatterns: [ - // "/node_modules/" - // ], - - // A list of reporter names that Jest uses when writing coverage reports - // coverageReporters: [ - // "json", - // "text", - // "lcov", - // "clover" - // ], - - // An object that configures minimum threshold enforcement for coverage results - // coverageThreshold: null, - - // A path to a custom dependency extractor - // dependencyExtractor: null, - - // Make calling deprecated APIs throw helpful error messages - // errorOnDeprecated: false, - - // Force coverage collection from ignored files usin a array of glob patterns - // forceCoverageMatch: [], - - // A path to a module which exports an async function that is triggered once before all test suites - // globalSetup: null, - - // A path to a module which exports an async function that is triggered once after all test suites - // globalTeardown: null, - - // A set of global variables that need to be available in all test environments - // globals: {}, - - // An array of directory names to be searched recursively up from the requiring module's location - // moduleDirectories: [ - // "node_modules" - // ], - - // An array of file extensions your modules use - moduleFileExtensions: [ - "js", - "json", - "jsx", - "node" - ], - - // A map from regular expressions to module names that allow to stub out resources with a single module - // moduleNameMapper: {}, - - // An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader - // modulePathIgnorePatterns: [], - - // Activates notifications for test results - // notify: false, - - // An enum that specifies notification mode. Requires { notify: true } - // notifyMode: "failure-change", - - // A preset that is used as a base for Jest's configuration - // preset: null, - - // Run tests from one or more projects - // projects: null, - - // Use this configuration option to add custom reporters to Jest - // reporters: undefined, - - // Automatically reset mock state between every test - // resetMocks: false, - - // Reset the module registry before running each individual test - // resetModules: false, - - // A path to a custom resolver - // resolver: null, - - // Automatically restore mock state between every test - // restoreMocks: false, - - // The root directory that Jest should scan for tests and modules within - // rootDir: null, - - // A list of paths to directories that Jest should use to search for files in - // roots: [ - // "" - // ], - - // Allows you to use a custom runner instead of Jest's default test runner - // runner: "jest-runner", - - // The paths to modules that run some code to configure or set up the testing environment before each test - // setupFiles: [], - - // A list of paths to modules that run some code to configure or set up the testing framework before each test - // setupFilesAfterEnv: [], - - // A list of paths to snapshot serializer modules Jest should use for snapshot testing - // snapshotSerializers: [], - - // The test environment that will be used for testing - testEnvironment: "node", - - // Options that will be passed to the testEnvironment - // testEnvironmentOptions: {}, - - // Adds a location field to test results - // testLocationInResults: false, - - // The glob patterns Jest uses to detect test files - // testMatch: [ - // "**/__tests__/**/*.[jt]s?(x)", - // "**/?(*.)+(spec|test).[tj]s?(x)" - // ], - - // An array of regexp pattern strings that are matched against all test paths, matched tests are skipped - // testPathIgnorePatterns: [ - // "/node_modules/" - // ], - - // The regexp pattern or array of patterns that Jest uses to detect test files - // testRegex: [], - - // This option allows the use of a custom results processor - // testResultsProcessor: null, - - // This option allows use of a custom test runner - // testRunner: "jasmine2", - - // This option sets the URL for the jsdom environment. It is reflected in properties such as location.href - // testURL: "http://localhost", - - // Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout" - // timers: "real", - - // A map from regular expressions to paths to transformers - // transform: null, - - // An array of regexp pattern strings that are matched against all source file paths, matched files will skip transformation - // transformIgnorePatterns: [ - // "/node_modules/" - // ], - - // An array of regexp pattern strings that are matched against all modules before the module loader will automatically return a mock for them - // unmockedModulePathPatterns: undefined, - - // Indicates whether each individual test should be reported during the run - // verbose: null, - - // An array of regexp patterns that are matched against all source file paths before re-running tests in watch mode - // watchPathIgnorePatterns: [], - - // Whether to use watchman for file crawling - // watchman: true, -}; +const baseConfig = require('cdk-build-tools/config/jest.config'); +module.exports = baseConfig; \ No newline at end of file diff --git a/packages/decdk/package.json b/packages/decdk/package.json index e6497ee5372e6..cb2a3cbebcc70 100644 --- a/packages/decdk/package.json +++ b/packages/decdk/package.json @@ -15,7 +15,7 @@ "scripts": { "build": "node ./deps.js && tsc -b && chmod +x bin/decdk && chmod +x bin/decdk-schema && bin/decdk-schema > cdk.schema.json", "watch": "tsc -b -w", - "test": "jest", + "test": "cdk-test", "package": "mkdir -p dist/js && cd dist/js && npm pack ../../", "build+test": "npm run build && npm test", "build+test+package": "npm run build+test && npm run package" @@ -27,6 +27,7 @@ }, "license": "Apache-2.0", "dependencies": { + "colors": "^1.4.0", "@aws-cdk/alexa-ask": "0.0.0", "@aws-cdk/app-delivery": "0.0.0", "@aws-cdk/assets": "0.0.0", @@ -196,6 +197,7 @@ "@types/jest": "^26.0.14", "@types/yaml": "1.9.7", "@types/yargs": "^15.0.5", + "cdk-build-tools": "0.0.0", "jest": "^26.4.2", "jsii": "^1.12.0" }, @@ -203,6 +205,14 @@ "aws", "cdk" ], + "cdk-build": { + "jest": true + }, + "nozem": { + "ostools": ["chmod"], + "skipTsApiOptimization": true, + "copyAllSourcesForTest": true + }, "homepage": "https://github.com/aws/aws-cdk", "engines": { "node": ">= 8.10.0" diff --git a/packages/monocdk-experiment/package.json b/packages/monocdk-experiment/package.json index 601234c3ae67f..0ae9ff860930f 100644 --- a/packages/monocdk-experiment/package.json +++ b/packages/monocdk-experiment/package.json @@ -33,7 +33,7 @@ "disable": true }, "pre": [ - "npm run gen" + "yarn gen" ] }, "pkglint": { @@ -96,6 +96,7 @@ "yaml": "1.10.0" }, "devDependencies": { + "aws-sdk": "^2.691.0", "@aws-cdk/alexa-ask": "0.0.0", "@aws-cdk/app-delivery": "0.0.0", "@aws-cdk/assets": "0.0.0", @@ -254,6 +255,10 @@ "@aws-cdk/region-info": "0.0.0", "@aws-cdk/yaml-cfn": "0.0.0", "@types/fs-extra": "^8.1.1", + "@types/minimatch": "^3.0.3", + "@types/aws-lambda": "^8.10.39", + "@types/semver": "^7.2.0", + "typescript-json-schema": "^0.42.0", "@types/node": "^10.17.35", "cdk-build-tools": "0.0.0", "constructs": "^3.0.4", @@ -274,6 +279,13 @@ "aws", "cdk" ], + "nozem": { + "ostools": [ + "yarn", + "dirname", + "rsync" + ] + }, "awscdkio": { "announce": false } diff --git a/tools/cdk-build-tools/.gitignore b/tools/cdk-build-tools/.gitignore index 19127ac2d8966..479d7077dcc4a 100644 --- a/tools/cdk-build-tools/.gitignore +++ b/tools/cdk-build-tools/.gitignore @@ -5,4 +5,5 @@ dist *.snk !.eslintrc.js -junit.xml \ No newline at end of file +!config/*.js +junit.xml diff --git a/tools/cdk-build-tools/config/.gitignore b/tools/cdk-build-tools/config/.gitignore deleted file mode 100644 index d4aa116a26c73..0000000000000 --- a/tools/cdk-build-tools/config/.gitignore +++ /dev/null @@ -1 +0,0 @@ -!*.js diff --git a/tools/cdk-build-tools/config/jest.config.js b/tools/cdk-build-tools/config/jest.config.js index a71d55e8d0089..b8e056af3c8a3 100644 --- a/tools/cdk-build-tools/config/jest.config.js +++ b/tools/cdk-build-tools/config/jest.config.js @@ -3,7 +3,7 @@ module.exports = { "js", ], testMatch: [ - "**/?(*.)+(test).js", + "/test/**/?(*.)+(test).js", ], testEnvironment: "node", coverageThreshold: { diff --git a/tools/cdk-build-tools/package.json b/tools/cdk-build-tools/package.json index 6e6698cdebe34..30dd88aab284d 100644 --- a/tools/cdk-build-tools/package.json +++ b/tools/cdk-build-tools/package.json @@ -51,6 +51,7 @@ "jest": "^26.4.2", "jsii": "^1.12.0", "jsii-pacmak": "^1.12.0", + "jsii-reflect": "^1.12.0", "nodeunit": "^0.11.3", "nyc": "^15.1.0", "ts-jest": "^26.3.0", @@ -62,6 +63,9 @@ "aws", "cdk" ], + "nozem": { + "ostools": ["chmod"] + }, "homepage": "https://github.com/aws/aws-cdk", "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/tools/cdk-integ-tools/bin/cdk-integ-assert.ts b/tools/cdk-integ-tools/bin/cdk-integ-assert.ts index 758a8288fb0d6..13c19ff19cd62 100644 --- a/tools/cdk-integ-tools/bin/cdk-integ-assert.ts +++ b/tools/cdk-integ-tools/bin/cdk-integ-assert.ts @@ -27,7 +27,7 @@ async function main() { actual = canonicalizeTemplate(actual); } - const diff = diffTemplate(expected, actual); + const diff = diffTemplate(canonicalizeTemplate(expected), canonicalizeTemplate(actual)); if (!diff.isEmpty) { failures.push(test.name); diff --git a/tools/cdk-integ-tools/lib/integ-helpers.ts b/tools/cdk-integ-tools/lib/integ-helpers.ts index fb262278deb1e..bbbf667050ce7 100644 --- a/tools/cdk-integ-tools/lib/integ-helpers.ts +++ b/tools/cdk-integ-tools/lib/integ-helpers.ts @@ -1,8 +1,8 @@ // Helper functions for integration tests import { spawnSync } from 'child_process'; import * as path from 'path'; +import { AVAILABILITY_ZONE_FALLBACK_CONTEXT_KEY } from '@aws-cdk/cx-api'; import * as fs from 'fs-extra'; -import { AVAILABILITY_ZONE_FALLBACK_CONTEXT_KEY } from '../../../packages/@aws-cdk/cx-api/lib'; const CDK_OUTDIR = 'cdk-integ.out'; diff --git a/tools/pkglint/.eslintrc.js b/tools/pkglint/.eslintrc.js index 61dd8dd001f63..8bebab2ae6725 100644 --- a/tools/pkglint/.eslintrc.js +++ b/tools/pkglint/.eslintrc.js @@ -1,3 +1,168 @@ -const baseConfig = require('cdk-build-tools/config/eslintrc'); -baseConfig.parserOptions.project = __dirname + '/tsconfig.json'; -module.exports = baseConfig; +// This cannot reference the build rules from cdk-build-tools as this +// package is itself used by cdk-build-tools. + +/** + * JavaScript and generic rules: + * + * https://eslint.org/docs/rules/ + * + * TypeScript-specific rules (including migrations from TSlint), see here: + * + * https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/ROADMAP.md + */ +module.exports = { + env: { + jest: true, + node: true + }, + plugins: [ + '@typescript-eslint', + 'import' + ], + parser: '@typescript-eslint/parser', + parserOptions: { + ecmaVersion: '2018', + sourceType: 'module', + project: './tsconfig.json', + }, + extends: [ + 'plugin:import/typescript' + ], + settings: { + 'import/parsers': { + '@typescript-eslint/parser': ['.ts', '.tsx'] + }, + 'import/resolver': { + node: {}, + typescript: { + directory: './tsconfig.json' + } + } + }, + ignorePatterns: [ '*.js', '*.d.ts', 'node_modules/', '*.generated.ts' ], + rules: { + // Require use of the `import { foo } from 'bar';` form instead of `import foo = require('bar');` + '@typescript-eslint/no-require-imports': [ 'error' ], + '@typescript-eslint/indent': [ 'error', 2 ], + + // Style + 'quotes': [ 'error', 'single', { avoidEscape: true } ], + 'comma-dangle': [ 'error', 'always-multiline' ], // ensures clean diffs, see https://medium.com/@nikgraf/why-you-should-enforce-dangling-commas-for-multiline-statements-d034c98e36f8 + + // Require all imported dependencies are actually declared in package.json + 'import/no-extraneous-dependencies': [ + 'error', + { + devDependencies: [ // Only allow importing devDependencies from: + '**/build-tools/**', // --> Build tools + '**/test/**' // --> Unit tests + ], + optionalDependencies: false, // Disallow importing optional dependencies (those shouldn't be in use in the project) + peerDependencies: false // Disallow importing peer dependencies (that aren't also direct dependencies) + } + ], + + // Require all imported libraries actually resolve (!!required for import/no-extraneous-dependencies to work!!) + 'import/no-unresolved': [ 'error' ], + + // Require an ordering on all imports -- unfortunately a different ordering than TSLint used to + // enforce, but there are no compatible ESLint rules as far as I can tell :( + // + // WARNING for now, otherwise this will mess up all open PRs. Make it into an error after a transitionary period. + 'import/order': ['warn', { + groups: ['builtin', 'external'], + alphabetize: { order: 'asc', caseInsensitive: true }, + }], + + // Cannot import from the same module twice + 'no-duplicate-imports': ['error'], + + // Cannot shadow names + 'no-shadow': ['error'], + + // Required spacing in property declarations (copied from TSLint, defaults are good) + 'key-spacing': ['error'], + + // Require semicolons + 'semi': ['error', 'always'], + + // Don't unnecessarily quote properties + 'quote-props': ['error', 'consistent-as-needed'], + + // No multiple empty lines + 'no-multiple-empty-lines': ['error'], + + // Max line lengths + 'max-len': ['error', { + code: 150, + ignoreUrls: true, // Most common reason to disable it + ignoreStrings: true, // These are not fantastic but necessary for error messages + ignoreTemplateLiterals: true, + ignoreComments: true, + ignoreRegExpLiterals: true, + }], + + // One of the easiest mistakes to make + '@typescript-eslint/no-floating-promises': ['error'], + + // Don't leave log statements littering the premises! + 'no-console': ['error'], + + // Useless diff results + 'no-trailing-spaces': ['error'], + + // Must use foo.bar instead of foo['bar'] if possible + 'dot-notation': ['error'], + + // Must use 'import' statements (disabled because it doesn't add a lot over no-require-imports) + // '@typescript-eslint/no-var-requires': ['error'], + + // Are you sure | is not a typo for || ? + 'no-bitwise': ['error'], + + // Oh ho ho naming. Everyone's favorite topic! + // FIXME: there's no way to do this properly. The proposed tslint replacement + // works very differently, also checking names in object literals, which we use all over the + // place for configs, mockfs, nodeunit tests, etc. + // + // The maintainer does not want to change behavior. + // https://github.com/typescript-eslint/typescript-eslint/issues/1483 + // + // There is no good replacement for tslint's name checking, currently. We will have to make do + // with jsii's validation. + /* + '@typescript-eslint/naming-convention': ['error', + + // We could maybe be more specific in a number of these but I didn't want to + // spend too much effort. Knock yourself out if you feel like it. + { selector: 'enumMember', format: ['PascalCase', 'UPPER_CASE'] }, + { selector: 'variableLike', format: ['camelCase', 'UPPER_CASE'], leadingUnderscore: 'allow' }, + { selector: 'typeLike', format: ['PascalCase'], leadingUnderscore: 'allow' }, + { selector: 'memberLike', format: ['camelCase', 'PascalCase', 'UPPER_CASE'], leadingUnderscore: 'allow' }, + + // FIXME: there's no way to disable name checking in object literals. Maintainer won't have it + // https://github.com/typescript-eslint/typescript-eslint/issues/1483 + ], + */ + + // Member ordering + '@typescript-eslint/member-ordering': ['error', { + default: [ + "public-static-field", + "public-static-method", + "protected-static-field", + "protected-static-method", + "private-static-field", + "private-static-method", + + "field", + + // Constructors + "constructor", // = ["public-constructor", "protected-constructor", "private-constructor"] + + // Methods + "method", + ] + }], + }, +} diff --git a/tools/pkglint/package.json b/tools/pkglint/package.json index 7581aa694dc49..b75eb936deb15 100644 --- a/tools/pkglint/package.json +++ b/tools/pkglint/package.json @@ -37,9 +37,20 @@ "devDependencies": { "@types/fs-extra": "^8.1.1", "@types/semver": "^7.3.4", + "@types/glob": "^7.1.2", "@types/yargs": "^15.0.5", + "tslint": "^5.20.1", "jest": "^26.4.2", - "typescript": "~3.9.7" + "typescript": "~3.9.7", + "@typescript-eslint/eslint-plugin": "^4.1.1", + "@typescript-eslint/parser": "^4.1.1", + "eslint": "^6.8.0", + "eslint-import-resolver-node": "^0.3.4", + "eslint-import-resolver-typescript": "^2.0.0", + "eslint-plugin-import": "^2.22.0" + }, + "nozem": { + "ostools": ["chmod"] }, "dependencies": { "case": "^1.6.3", diff --git a/tools/ubergen/bin/ubergen.ts b/tools/ubergen/bin/ubergen.ts index 2500c05377c27..8dc6259af69d7 100644 --- a/tools/ubergen/bin/ubergen.ts +++ b/tools/ubergen/bin/ubergen.ts @@ -54,14 +54,20 @@ interface PackageJson { readonly [key: string]: unknown; } +/** + * This finds and recompiles all package sources, not artifacts + */ async function findLibrariesToPackage(): Promise { console.log('🔍 Discovering libraries that need packaging...'); + const packageRoot = process.env.NZM_PACKAGE_SOURCE || path.join(__dirname, '..'); const result = new Array(); - const librariesRoot = path.resolve(process.cwd(), '..', '..', 'packages', '@aws-cdk'); + const librariesRoot = path.resolve(packageRoot, '..', '..', 'packages', '@aws-cdk'); for (const dir of await fs.readdir(librariesRoot)) { - const packageJson = await fs.readJson(path.resolve(librariesRoot, dir, 'package.json')); + const pjPath = path.resolve(librariesRoot, dir, 'package.json'); + if (!await fs.pathExists(pjPath)) { continue; } + const packageJson = await fs.readJson(pjPath); if (packageJson.private) { console.log(`\t⚠️ Skipping (private): ${packageJson.name}`); @@ -74,9 +80,23 @@ async function findLibrariesToPackage(): Promise { continue; } + let sourcePath = path.resolve(pjPath, '..'); + + // If this is a "Nazel" build, we actually need to grab the sources from a different + // directory than the source tree, because we also need the .ts files that got + // generated as part of the build step. + if (process.env.NZM_PACKAGE_SOURCE) { + try { + const outPath = path.resolve(require.resolve(`${dir}/package.json`), '..'); + sourcePath = path.resolve(outPath, '..', 'src'); + } catch (e) { + // Should have been a dependency, but apparently wasn't. A different part of gen will fix this. + } + } + result.push({ packageJson, - root: path.join(librariesRoot, dir), + root: sourcePath, shortName: packageJson.name.substr('@aws-cdk/'.length), }); } @@ -88,7 +108,8 @@ async function findLibrariesToPackage(): Promise { async function verifyDependencies(libraries: readonly LibraryReference[]): Promise { console.log('🧐 Verifying dependencies are complete...'); - const packageJsonPath = path.resolve(process.cwd(), 'package.json'); + const packageRoot = process.env.NZM_PACKAGE_SOURCE || path.join(__dirname, '..'); + const packageJsonPath = path.resolve(packageRoot, 'package.json'); const packageJson = await fs.readJson(packageJsonPath); let changed = false; @@ -122,7 +143,7 @@ async function verifyDependencies(libraries: readonly LibraryReference[]): Promi }); } - const workspacePath = path.resolve(process.cwd(), '..', '..', 'package.json'); + const workspacePath = path.resolve(packageRoot, '..', '..', 'package.json'); const workspace = await fs.readJson(workspacePath); let workspaceChanged = false; diff --git a/tools/ubergen/package.json b/tools/ubergen/package.json index 8e2e2e0eaa5a9..3759b7085ad1c 100644 --- a/tools/ubergen/package.json +++ b/tools/ubergen/package.json @@ -12,8 +12,8 @@ "ubergen": "bin/ubergen" }, "scripts": { - "build": "tsc -b && chmod +x bin/ubergen && eslint . --ext=.ts", - "watch": "tsc -b -w", + "build": "cdk-build", + "watch": "cdk-watch", "pkglint": "pkglint -f", "test": "echo success", "build+test+package": "npm run build+test", @@ -38,6 +38,14 @@ "aws", "cdk" ], + "nozem": { + "ostools": [ + "chmod", + "yarn", + "dirname", + "rsync" + ] + }, "homepage": "https://github.com/aws/aws-cdk", "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" diff --git a/tools/yarn-cling/.gitignore b/tools/yarn-cling/.gitignore index f12543313a31d..fd4c09153649f 100644 --- a/tools/yarn-cling/.gitignore +++ b/tools/yarn-cling/.gitignore @@ -11,4 +11,5 @@ dist coverage nyc.config.js !.eslintrc.js -junit.xml \ No newline at end of file +!test/test-fixture/package1/node_modules/ +junit.xml diff --git a/tools/yarn-cling/package.json b/tools/yarn-cling/package.json index 4a5e222dc7e28..d63f5cc10e5e1 100644 --- a/tools/yarn-cling/package.json +++ b/tools/yarn-cling/package.json @@ -53,6 +53,9 @@ "cdk" ], "homepage": "https://github.com/aws/aws-cdk", + "nozem": { + "ostools": ["ln"] + }, "engines": { "node": ">= 10.13.0 <13 || >=13.7.0" } diff --git a/yarn.lock b/yarn.lock index e128716a844cf..831ed5717fdf6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3051,6 +3051,11 @@ dependencies: "@types/glob" "*" +"@types/aws-lambda@^8.10.39", "@types/aws-lambda@^8.10.61": + version "8.10.61" + resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.61.tgz#7471e08843dbdcf09b2494ac5b34c4d1a391e6d0" + integrity sha512-+FeZ/52VG4rBSJ0cRE/aB6hMKQzjIgpiSQrGq0eR8ZrXWee7Z2zoGeJzTHVcOeZNawLb+5zvwZNIRGC7X+kQ7Q== + "@types/aws-lambda@^8.10.62": version "8.10.62" resolved "https://registry.yarnpkg.com/@types/aws-lambda/-/aws-lambda-8.10.62.tgz#857de3f73ab503136f2eefe965b1b67e5f397b62" @@ -3094,14 +3099,19 @@ resolved "https://registry.yarnpkg.com/@types/color-name/-/color-name-1.1.1.tgz#1c1261bbeaa10a8055bbc5d8ab84b7b2afc846a0" integrity sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ== -"@types/fs-extra@^8.1.1": +"@types/eslint-visitor-keys@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#1ee30d79544ca84d68d4b3cdb0af4f205663dd2d" + integrity sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag== + +"@types/fs-extra@^8.1.0", "@types/fs-extra@^8.1.1": version "8.1.1" resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-8.1.1.tgz#1e49f22d09aa46e19b51c0b013cb63d0d923a068" integrity sha512-TcUlBem321DFQzBNuz8p0CLLKp0VvF/XH9E4KHNmgwyp4E3AfgI5cjiIVZWlbfThBop2qxFIh4+LeY6hVWWZ2w== dependencies: "@types/node" "*" -"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.3": +"@types/glob@*", "@types/glob@^7.1.1", "@types/glob@^7.1.2", "@types/glob@^7.1.3": version "7.1.3" resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.3.tgz#e6ba80f36b7daad2c685acd9266382e68985c183" integrity sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w== @@ -3220,6 +3230,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.6.0.tgz#7d4411bf5157339337d7cff864d9ff45f177b499" integrity sha512-mikldZQitV94akrc4sCcSjtJfsTKt4p+e/s0AGscVA6XArQ9kFclP+ZiYUMnq987rc6QlYxXv/EivqlfSLxpKA== +"@types/node@^10.17.25": + version "10.17.26" + resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.26.tgz#a8a119960bff16b823be4c617da028570779bcfd" + integrity sha512-myMwkO2Cr82kirHY8uknNRHEVtn0wV3DTQfkrjx17jmkstDRZ24gNUdl8AHXVyVclTYI/bNjgTPTAWvWLqXqkw== + "@types/node@^10.17.35": version "10.17.35" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.35.tgz#58058f29b870e6ae57b20e4f6e928f02b7129f56" @@ -3267,12 +3282,19 @@ resolved "https://registry.yarnpkg.com/@types/q/-/q-1.5.4.tgz#15925414e0ad2cd765bfef58842f7e26a7accb24" integrity sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug== +"@types/semver@^7.2.0": + version "7.3.1" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.1.tgz#7a9a5d595b6d873f338c867dcef64df289468cfa" + integrity sha512-ooD/FJ8EuwlDKOI6D9HWxgIgJjMg2cuziXm/42npDC8y4NjxplBUn9loewZiBNCt44450lHAU0OSb51/UqXeag== + dependencies: + "@types/node" "*" + "@types/semver@^7.3.4": version "7.3.4" resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.3.4.tgz#43d7168fec6fa0988bb1a513a697b29296721afb" integrity sha512-+nVsLKlcUCeMzD2ufHEYuJ9a2ovstb6Dp52A5VsoKxDXgvE051XgHI/33I1EymwkRGQkwnA0LkhnUzituGs4EQ== -"@types/sinon@^9.0.5": +"@types/sinon@^9.0.4", "@types/sinon@^9.0.5": version "9.0.5" resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-9.0.5.tgz#56b2a12662dd8c7d081cdc511af5f872cb37377f" integrity sha512-4CnkGdM/5/FXDGqL32JQ1ttVrGvhOoesLLF7VnTh4KdjK5N5VQOtxaylFqqTjnHx55MnD9O02Nbk5c1ELC8wlQ== @@ -3355,6 +3377,16 @@ semver "^7.3.2" tsutils "^3.17.1" +"@typescript-eslint/experimental-utils@2.34.0": + version "2.34.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz#d3524b644cdb40eebceca67f8cf3e4cc9c8f980f" + integrity sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA== + dependencies: + "@types/json-schema" "^7.0.3" + "@typescript-eslint/typescript-estree" "2.34.0" + eslint-scope "^5.0.0" + eslint-utils "^2.0.0" + "@typescript-eslint/experimental-utils@4.1.1": version "4.1.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.1.1.tgz#52ff4e37c93113eb96385a4e6d075abece1ea72d" @@ -3367,6 +3399,16 @@ eslint-scope "^5.0.0" eslint-utils "^2.0.0" +"@typescript-eslint/parser@^2.19.2": + version "2.34.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-2.34.0.tgz#50252630ca319685420e9a39ca05fe185a256bc8" + integrity sha512-03ilO0ucSD0EPTw2X4PntSIRFtDPWjrVq7C3/Z3VQHRC7+13YB55rcJI3Jt+YgeHbjUdJPcPa7b23rXCBokuyA== + dependencies: + "@types/eslint-visitor-keys" "^1.0.0" + "@typescript-eslint/experimental-utils" "2.34.0" + "@typescript-eslint/typescript-estree" "2.34.0" + eslint-visitor-keys "^1.1.0" + "@typescript-eslint/parser@^4.1.1": version "4.1.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.1.1.tgz#324b4b35e314075adbc92bd8330cf3ef0c88cf3e" @@ -3390,6 +3432,19 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.1.1.tgz#57500c4a86b28cb47094c1a62f1177ea279a09cb" integrity sha512-zrBiqOKYerMTllKcn+BP+i1b7LW/EbMMYytroXMxUTvFPn1smkCu0D7lSAx29fTUO4jnwV0ljSvYQtn2vNrNxA== +"@typescript-eslint/typescript-estree@2.34.0": + version "2.34.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz#14aeb6353b39ef0732cc7f1b8285294937cf37d5" + integrity sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg== + dependencies: + debug "^4.1.1" + eslint-visitor-keys "^1.1.0" + glob "^7.1.6" + is-glob "^4.0.1" + lodash "^4.17.15" + semver "^7.3.2" + tsutils "^3.17.1" + "@typescript-eslint/typescript-estree@4.1.1": version "4.1.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.1.1.tgz#2015a84d71303ecdb6f46efd807ac19a51aab490" @@ -3934,6 +3989,36 @@ aws-sdk@^2.637.0, aws-sdk@^2.739.0: uuid "3.3.2" xml2js "0.4.19" +aws-sdk@^2.691.0: + version "2.702.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.702.0.tgz#c5bb9a6caeb7d938b803095073fe981ff29e4244" + integrity sha512-FKRve3NOKeUKxFXeD6VfiIhXpIhym/yFdy7higxUObmsj2ssM/e7Iud79gUHRAKJW5fzusdtkBCAVBjotRGxew== + dependencies: + buffer "4.9.2" + events "1.1.1" + ieee754 "1.1.13" + jmespath "0.15.0" + querystring "0.2.0" + sax "1.2.1" + url "0.10.3" + uuid "3.3.2" + xml2js "0.4.19" + +aws-sdk@^2.713.0: + version "2.713.0" + resolved "https://registry.yarnpkg.com/aws-sdk/-/aws-sdk-2.713.0.tgz#e87404ddcba093d36afafb48f119ec66f654a83f" + integrity sha512-axR1eOVn134KXJc1IT+Au2TXcK6oswY+4nvGe5GfU3pXeehhe0xNeP9Bw9yF36TRBxuvu4IJ2hRHDKma05smgA== + dependencies: + buffer "4.9.2" + events "1.1.1" + ieee754 "1.1.13" + jmespath "0.15.0" + querystring "0.2.0" + sax "1.2.1" + url "0.10.3" + uuid "3.3.2" + xml2js "0.4.19" + aws-sign2@~0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" @@ -4288,6 +4373,11 @@ buffer@^5.1.0, buffer@^5.5.0: base64-js "^1.0.2" ieee754 "^1.1.4" +builtin-modules@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + integrity sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8= + builtin-status-codes@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz#85982878e21b98e1c66425e03d0174788f569ee8" @@ -4492,7 +4582,7 @@ chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" -chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.1, chalk@^2.4.0, chalk@^2.4.1, chalk@^2.4.2: +chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.4.0, chalk@^2.4.1, chalk@^2.4.2: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -4616,6 +4706,11 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.1.tgz#b0433d0b4e9c847ef18868a4ef16fd5fc8271c48" integrity sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw== +cli-width@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-3.0.0.tgz#a2f48437a2caa9a22436e794bf071ec9e61cedf6" + integrity sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw== + cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -4778,7 +4873,7 @@ command-exists@^1.2.6: resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== -commander@^2.19.0, commander@^2.20.0: +commander@^2.12.1, commander@^2.19.0, commander@^2.20.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -4889,6 +4984,11 @@ constants-browserify@^1.0.0: resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75" integrity sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U= +constructs@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/constructs/-/constructs-3.0.2.tgz#49432ba2ef765445bddd5fcc5b3948903ec5210b" + integrity sha512-Q4SkOFaRH2D65kvcGrDZ/FgJwk59HwUohbdCbeIueas+8RJhd9N4j6QgvHnMfTOmQWDPXCn1IGwteTLC0OK1NA== + constructs@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/constructs/-/constructs-3.0.4.tgz#eb1ed5b80f6600b8d50de83971357ae0fe8e29a2" @@ -5248,7 +5348,7 @@ cross-spawn@^4: lru-cache "^4.0.1" which "^1.2.9" -cross-spawn@^6.0.0, cross-spawn@^6.0.4: +cross-spawn@^6.0.0, cross-spawn@^6.0.4, cross-spawn@^6.0.5: version "6.0.5" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== @@ -6176,6 +6276,17 @@ eslint-import-resolver-node@^0.3.3, eslint-import-resolver-node@^0.3.4: debug "^2.6.9" resolve "^1.13.1" +eslint-import-resolver-typescript@^2.0.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.2.1.tgz#4b9bdfb51af7e14947ebc40ffdd6c32d5924b905" + integrity sha512-wxlVdwuWY6R5+CoesIy6n8EZX4k9lEeZGWTVBoX9g//8Xma8JMtL/p3AGnG43rRyXmIrX+/0IN8lpOPzrw1fSw== + dependencies: + debug "^4.1.1" + glob "^7.1.6" + is-glob "^4.0.1" + resolve "^1.17.0" + tsconfig-paths "^3.9.0" + eslint-import-resolver-typescript@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-2.3.0.tgz#0870988098bc6c6419c87705e6b42bee89425445" @@ -6260,6 +6371,13 @@ eslint-scope@^5.1.0: esrecurse "^4.3.0" estraverse "^4.1.1" +eslint-utils@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.4.3.tgz#74fec7c54d0776b6f67e0251040b5806564e981f" + integrity sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q== + dependencies: + eslint-visitor-keys "^1.1.0" + eslint-utils@^2.0.0, eslint-utils@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" @@ -6277,6 +6395,49 @@ eslint-visitor-keys@^2.0.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz#21fdc8fbcd9c795cc0321f0563702095751511a8" integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ== +eslint@^6.8.0: + version "6.8.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.8.0.tgz#62262d6729739f9275723824302fb227c8c93ffb" + integrity sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig== + dependencies: + "@babel/code-frame" "^7.0.0" + ajv "^6.10.0" + chalk "^2.1.0" + cross-spawn "^6.0.5" + debug "^4.0.1" + doctrine "^3.0.0" + eslint-scope "^5.0.0" + eslint-utils "^1.4.3" + eslint-visitor-keys "^1.1.0" + espree "^6.1.2" + esquery "^1.0.1" + esutils "^2.0.2" + file-entry-cache "^5.0.1" + functional-red-black-tree "^1.0.1" + glob-parent "^5.0.0" + globals "^12.1.0" + ignore "^4.0.6" + import-fresh "^3.0.0" + imurmurhash "^0.1.4" + inquirer "^7.0.0" + is-glob "^4.0.0" + js-yaml "^3.13.1" + json-stable-stringify-without-jsonify "^1.0.1" + levn "^0.3.0" + lodash "^4.17.14" + minimatch "^3.0.4" + mkdirp "^0.5.1" + natural-compare "^1.4.0" + optionator "^0.8.3" + progress "^2.0.0" + regexpp "^2.0.1" + semver "^6.1.2" + strip-ansi "^5.2.0" + strip-json-comments "^3.0.1" + table "^5.2.3" + text-table "^0.2.0" + v8-compile-cache "^2.0.3" + eslint@^7.9.0: version "7.9.0" resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.9.0.tgz#522aeccc5c3a19017cf0cb46ebfd660a79acf337" @@ -6325,6 +6486,15 @@ esm@^3.2.5: resolved "https://registry.yarnpkg.com/esm/-/esm-3.2.25.tgz#342c18c29d56157688ba5ce31f8431fbb795cc10" integrity sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA== +espree@^6.1.2: + version "6.2.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-6.2.1.tgz#77fc72e1fd744a2052c20f38a5b575832e82734a" + integrity sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw== + dependencies: + acorn "^7.1.1" + acorn-jsx "^5.2.0" + eslint-visitor-keys "^1.1.0" + espree@^7.3.0: version "7.3.0" resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.0.tgz#dc30437cf67947cf576121ebd780f15eeac72348" @@ -6344,7 +6514,7 @@ esprima@^4.0.0, esprima@^4.0.1: resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.2.0: +esquery@^1.0.1, esquery@^1.2.0: version "1.3.1" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57" integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ== @@ -6669,7 +6839,7 @@ figures@^2.0.0: dependencies: escape-string-regexp "^1.0.5" -figures@^3.1.0, figures@^3.2.0: +figures@^3.0.0, figures@^3.1.0, figures@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== @@ -7149,7 +7319,7 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= -glob@^7.0.0, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.6: +glob@^7.0.0, glob@^7.0.5, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@~7.1.4, glob@~7.1.6: version "7.1.6" resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== @@ -7691,6 +7861,25 @@ inquirer@^6.2.0: strip-ansi "^5.1.0" through "^2.3.6" +inquirer@^7.0.0: + version "7.3.3" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-7.3.3.tgz#04d176b2af04afc157a83fd7c100e98ee0aad003" + integrity sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.0" + cli-cursor "^3.1.0" + cli-width "^3.0.0" + external-editor "^3.0.3" + figures "^3.0.0" + lodash "^4.17.19" + mute-stream "0.0.8" + run-async "^2.4.0" + rxjs "^6.6.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + through "^2.3.6" + interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -9416,6 +9605,14 @@ levenary@^1.1.1: dependencies: leven "^3.1.0" +levn@^0.3.0, levn@~0.3.0: + version "0.3.0" + resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" + integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= + dependencies: + prelude-ls "~1.1.2" + type-check "~0.3.2" + levn@^0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/levn/-/levn-0.4.1.tgz#ae4562c007473b932a6200d403268dd2fffc6ade" @@ -9424,14 +9621,6 @@ levn@^0.4.1: prelude-ls "^1.2.1" type-check "~0.4.0" -levn@~0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee" - integrity sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4= - dependencies: - prelude-ls "~1.1.2" - type-check "~0.3.2" - lie@~3.3.0: version "3.3.0" resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" @@ -10663,7 +10852,7 @@ opener@^1.5.1: resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed" integrity sha512-goYSy5c2UXE4Ra1xixabeVh1guIX/ZV/YokJksb6q2lubWu6UbvPQ20p542/sFIll1nl8JnCyK9oBaOcCWXwvA== -optionator@^0.8.1: +optionator@^0.8.1, optionator@^0.8.3: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" integrity sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA== @@ -12094,6 +12283,11 @@ regexp.prototype.flags@^1.3.0: define-properties "^1.1.3" es-abstract "^1.17.0-next.1" +regexpp@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f" + integrity sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw== + regexpp@^3.0.0, regexpp@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.1.0.tgz#206d0ad0a5648cffbdb8ae46438f3dc51c9f78e2" @@ -12335,7 +12529,7 @@ rsvp@^4.8.4: resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-4.8.5.tgz#c8f155311d167f68f21e168df71ec5b083113734" integrity sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA== -run-async@^2.2.0: +run-async@^2.2.0, run-async@^2.4.0: version "2.4.1" resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ== @@ -12359,6 +12553,13 @@ rxjs@^6.4.0, rxjs@^6.6.2: dependencies: tslib "^1.9.0" +rxjs@^6.6.0: + version "6.6.3" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.3.tgz#8ca84635c4daa900c0d3967a6ee7ac60271ee552" + integrity sha512-trsQc+xYYXZ3urjOiJOuCOa5N3jAZ3eiSpQB5hIT8zGlL2QfnHLJ2r7GMkBGuIausdJN1OneaI6gQlsqNHHmZQ== + dependencies: + tslib "^1.9.0" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -12432,7 +12633,7 @@ semver-intersect@^1.4.0: dependencies: semver "^5.0.0" -"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.0.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: +"semver@2 || 3 || 4 || 5", "semver@2.x || 3.x || 4 || 5", semver@^5.0.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0, semver@^5.5.1, semver@^5.6.0, semver@^5.7.0, semver@^5.7.1: version "5.7.1" resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== @@ -12447,7 +12648,7 @@ semver@7.x, semver@^7.1.1, semver@^7.2.1, semver@^7.3.2: resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938" integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ== -semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.2.0, semver@^6.3.0: +semver@^6.0.0, semver@^6.1.0, semver@^6.1.1, semver@^6.1.2, semver@^6.2.0, semver@^6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== @@ -12560,7 +12761,7 @@ simple-swizzle@^0.2.2: dependencies: is-arrayish "^0.3.1" -sinon@^9.0.1, sinon@^9.0.3: +sinon@^9.0.1, sinon@^9.0.2, sinon@^9.0.3: version "9.0.3" resolved "https://registry.yarnpkg.com/sinon/-/sinon-9.0.3.tgz#bffc3ec28c936332cd2a41833547b9eed201ecff" integrity sha512-IKo9MIM111+smz9JGwLmw5U1075n1YXeAq8YeSFlndCLhAL5KGn6bLgu7b/4AYHTV/LcEMcRm2wU2YiL55/6Pg== @@ -13108,7 +13309,7 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@^3.0.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -13645,7 +13846,7 @@ tsconfig-paths@^3.9.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@^1.8.1, tslib@^1.9.0: +tslib@^1.8.0, tslib@^1.8.1, tslib@^1.9.0: version "1.13.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043" integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q== @@ -13655,6 +13856,32 @@ tslib@^2.0.1: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.0.1.tgz#410eb0d113e5b6356490eec749603725b021b43e" integrity sha512-SgIkNheinmEBgx1IUNirK0TUD4X9yjjBRTqqjggWCU3pUEqIk3/Uwl3yRixYKT6WjQuGiwDv4NomL3wqRCj+CQ== +tslint@^5.20.1: + version "5.20.1" + resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.20.1.tgz#e401e8aeda0152bc44dd07e614034f3f80c67b7d" + integrity sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg== + dependencies: + "@babel/code-frame" "^7.0.0" + builtin-modules "^1.1.1" + chalk "^2.3.0" + commander "^2.12.1" + diff "^4.0.1" + glob "^7.1.1" + js-yaml "^3.13.1" + minimatch "^3.0.4" + mkdirp "^0.5.1" + resolve "^1.3.2" + semver "^5.3.0" + tslib "^1.8.0" + tsutils "^2.29.0" + +tsutils@^2.29.0: + version "2.29.0" + resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99" + integrity sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA== + dependencies: + tslib "^1.8.1" + tsutils@^3.17.1: version "3.17.1" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.17.1.tgz#ed719917f11ca0dee586272b2ac49e015a2dd759" @@ -13735,6 +13962,17 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript-json-schema@^0.42.0: + version "0.42.0" + resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.42.0.tgz#695f212a72d91d47c0605371dc697597b7817c1b" + integrity sha512-9WO+lVmlph7Ecb7lPd9tU84XFUQh44kpAf3cWe/Ym4G5EKw/SS6XGpi1DZDthvxqkIdNSDlWi7FhKfxuIV/3yw== + dependencies: + "@types/json-schema" "^7.0.3" + glob "~7.1.4" + json-stable-stringify "^1.0.1" + typescript "^3.5.3" + yargs "^14.0.0" + typescript-json-schema@^0.43.0: version "0.43.0" resolved "https://registry.yarnpkg.com/typescript-json-schema/-/typescript-json-schema-0.43.0.tgz#8bd9c832f1f15f006ff933907ce192222fdfd92f" @@ -13746,7 +13984,7 @@ typescript-json-schema@^0.43.0: typescript "~4.0.2" yargs "^15.4.1" -typescript@^3.3.3, typescript@~3.9.7: +typescript@^3.3.3, typescript@^3.5.3, typescript@~3.9.7: version "3.9.7" resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa" integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw== @@ -14443,7 +14681,7 @@ yargs@^13.2.2: y18n "^4.0.0" yargs-parser "^13.1.2" -yargs@^14.2.2: +yargs@^14.0.0, yargs@^14.2.2: version "14.2.3" resolved "https://registry.yarnpkg.com/yargs/-/yargs-14.2.3.tgz#1a1c3edced1afb2a2fea33604bc6d1d8d688a414" integrity sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==