From 2a8a54a24b2c7ac7c6c76fc3c1cf8e7241b8c1f5 Mon Sep 17 00:00:00 2001 From: Matt Ellis Date: Mon, 6 Aug 2018 10:33:06 -0700 Subject: [PATCH] Remove need for tsconfig.json Set the following compiler defaults: ``` "target": "es6", "module": "commonjs", "moduleResolution": "node", "sourceMap": true, ``` Which allows us to not even include a tsconfig.json file. If one is present, `ts-node` will use its options, but the above settings will override any settings in a local tsconfig.json file. This means if you want full control over the target, you'll need to go back to the raw tsc workflow where you explicitly build ahead of time. --- .../derived-inputs/tsconfig.json | 22 ------------------- .../multiple-turns-2/tsconfig.json | 22 ------------------- .../multiple-turns/tsconfig.json | 22 ------------------- .../dynamic-provider/simple/tsconfig.json | 22 ------------------- examples/formattable/tsconfig.json | 22 ------------------- sdk/nodejs/cmd/run/index.ts | 6 +++++ .../config_basic/nodejs/tsconfig.json | 21 ------------------ .../delete_before_create/step1/tsconfig.json | 21 ------------------ .../dependency_steps/step1/tsconfig.json | 22 ------------------- tests/integration/diff/step1/tsconfig.json | 22 ------------------- .../double_pending_delete/step1/tsconfig.json | 21 ------------------ .../duplicate_urns/step1/tsconfig.json | 21 ------------------ tests/integration/empty/nodejs/tsconfig.json | 21 ------------------ .../partial_state/step1/tsconfig.json | 22 ------------------- .../project_main/a/path/to/main/tsconfig.json | 22 ------------------- .../protect_resources/step1/tsconfig.json | 22 ------------------- .../step1/tsconfig.json | 21 ------------------ .../stack_bad_parenting/tsconfig.json | 22 ------------------- .../stack_dependencies/tsconfig.json | 22 ------------------- tests/integration/stack_outputs/tsconfig.json | 22 ------------------- .../integration/stack_parenting/tsconfig.json | 22 ------------------- .../stack_project_name/tsconfig.json | 22 ------------------- tests/integration/steps/step1/tsconfig.json | 22 ------------------- 23 files changed, 6 insertions(+), 478 deletions(-) delete mode 100644 examples/dynamic-provider/derived-inputs/tsconfig.json delete mode 100644 examples/dynamic-provider/multiple-turns-2/tsconfig.json delete mode 100644 examples/dynamic-provider/multiple-turns/tsconfig.json delete mode 100644 examples/dynamic-provider/simple/tsconfig.json delete mode 100644 examples/formattable/tsconfig.json delete mode 100644 tests/integration/config_basic/nodejs/tsconfig.json delete mode 100644 tests/integration/delete_before_create/step1/tsconfig.json delete mode 100644 tests/integration/dependency_steps/step1/tsconfig.json delete mode 100644 tests/integration/diff/step1/tsconfig.json delete mode 100644 tests/integration/double_pending_delete/step1/tsconfig.json delete mode 100644 tests/integration/duplicate_urns/step1/tsconfig.json delete mode 100644 tests/integration/empty/nodejs/tsconfig.json delete mode 100644 tests/integration/partial_state/step1/tsconfig.json delete mode 100644 tests/integration/project_main/a/path/to/main/tsconfig.json delete mode 100644 tests/integration/protect_resources/step1/tsconfig.json delete mode 100644 tests/integration/recreate_resource_check/step1/tsconfig.json delete mode 100644 tests/integration/stack_bad_parenting/tsconfig.json delete mode 100644 tests/integration/stack_dependencies/tsconfig.json delete mode 100644 tests/integration/stack_outputs/tsconfig.json delete mode 100644 tests/integration/stack_parenting/tsconfig.json delete mode 100644 tests/integration/stack_project_name/tsconfig.json delete mode 100644 tests/integration/steps/step1/tsconfig.json diff --git a/examples/dynamic-provider/derived-inputs/tsconfig.json b/examples/dynamic-provider/derived-inputs/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/examples/dynamic-provider/derived-inputs/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/examples/dynamic-provider/multiple-turns-2/tsconfig.json b/examples/dynamic-provider/multiple-turns-2/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/examples/dynamic-provider/multiple-turns-2/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/examples/dynamic-provider/multiple-turns/tsconfig.json b/examples/dynamic-provider/multiple-turns/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/examples/dynamic-provider/multiple-turns/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/examples/dynamic-provider/simple/tsconfig.json b/examples/dynamic-provider/simple/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/examples/dynamic-provider/simple/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/examples/formattable/tsconfig.json b/examples/formattable/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/examples/formattable/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/sdk/nodejs/cmd/run/index.ts b/sdk/nodejs/cmd/run/index.ts index 2d35113f0..3116af5a3 100644 --- a/sdk/nodejs/cmd/run/index.ts +++ b/sdk/nodejs/cmd/run/index.ts @@ -209,6 +209,12 @@ export function main(args: string[]): void { if (typeScript) { tsnode.register({ typeCheck: true, + compilerOptions: { + target: "es6", + module: "commonjs", + moduleResolution: "node", + sourceMap: "true", + }, }); } diff --git a/tests/integration/config_basic/nodejs/tsconfig.json b/tests/integration/config_basic/nodejs/tsconfig.json deleted file mode 100644 index 3086b63ab..000000000 --- a/tests/integration/config_basic/nodejs/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} diff --git a/tests/integration/delete_before_create/step1/tsconfig.json b/tests/integration/delete_before_create/step1/tsconfig.json deleted file mode 100644 index dfe565ed0..000000000 --- a/tests/integration/delete_before_create/step1/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/dependency_steps/step1/tsconfig.json b/tests/integration/dependency_steps/step1/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/tests/integration/dependency_steps/step1/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/diff/step1/tsconfig.json b/tests/integration/diff/step1/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/tests/integration/diff/step1/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/double_pending_delete/step1/tsconfig.json b/tests/integration/double_pending_delete/step1/tsconfig.json deleted file mode 100644 index dfe565ed0..000000000 --- a/tests/integration/double_pending_delete/step1/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/duplicate_urns/step1/tsconfig.json b/tests/integration/duplicate_urns/step1/tsconfig.json deleted file mode 100644 index dfe565ed0..000000000 --- a/tests/integration/duplicate_urns/step1/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/empty/nodejs/tsconfig.json b/tests/integration/empty/nodejs/tsconfig.json deleted file mode 100644 index 3086b63ab..000000000 --- a/tests/integration/empty/nodejs/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} diff --git a/tests/integration/partial_state/step1/tsconfig.json b/tests/integration/partial_state/step1/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/tests/integration/partial_state/step1/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/project_main/a/path/to/main/tsconfig.json b/tests/integration/project_main/a/path/to/main/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/tests/integration/project_main/a/path/to/main/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/protect_resources/step1/tsconfig.json b/tests/integration/protect_resources/step1/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/tests/integration/protect_resources/step1/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/recreate_resource_check/step1/tsconfig.json b/tests/integration/recreate_resource_check/step1/tsconfig.json deleted file mode 100644 index dfe565ed0..000000000 --- a/tests/integration/recreate_resource_check/step1/tsconfig.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/stack_bad_parenting/tsconfig.json b/tests/integration/stack_bad_parenting/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/tests/integration/stack_bad_parenting/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/stack_dependencies/tsconfig.json b/tests/integration/stack_dependencies/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/tests/integration/stack_dependencies/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/stack_outputs/tsconfig.json b/tests/integration/stack_outputs/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/tests/integration/stack_outputs/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/stack_parenting/tsconfig.json b/tests/integration/stack_parenting/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/tests/integration/stack_parenting/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/stack_project_name/tsconfig.json b/tests/integration/stack_project_name/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/tests/integration/stack_project_name/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} - diff --git a/tests/integration/steps/step1/tsconfig.json b/tests/integration/steps/step1/tsconfig.json deleted file mode 100644 index 5dacccbd4..000000000 --- a/tests/integration/steps/step1/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "compilerOptions": { - "outDir": "bin", - "target": "es6", - "module": "commonjs", - "moduleResolution": "node", - "declaration": true, - "sourceMap": true, - "stripInternal": true, - "experimentalDecorators": true, - "pretty": true, - "noFallthroughCasesInSwitch": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "forceConsistentCasingInFileNames": true, - "strictNullChecks": true - }, - "files": [ - "index.ts" - ] -} -