From 5684b22f976cec9bad42b997869753b3d737635d Mon Sep 17 00:00:00 2001 From: Ben Date: Mon, 16 Oct 2023 09:12:26 +0200 Subject: [PATCH] Clean up tsconfig files --- packages/massa-web3/tsconfig.commonjs.json | 8 ------- packages/massa-web3/tsconfig.esm.json | 9 -------- packages/massa-web3/tsconfig.json | 4 ++++ packages/web3-utils/tsconfig.commonjs.json | 27 ++++++++-------------- packages/web3-utils/tsconfig.esm.json | 20 +--------------- packages/web3-utils/tsconfig.json | 4 ++++ tsconfig.base.json | 2 +- 7 files changed, 19 insertions(+), 55 deletions(-) diff --git a/packages/massa-web3/tsconfig.commonjs.json b/packages/massa-web3/tsconfig.commonjs.json index 695ccb00..5e676ddf 100644 --- a/packages/massa-web3/tsconfig.commonjs.json +++ b/packages/massa-web3/tsconfig.commonjs.json @@ -2,8 +2,6 @@ // Extends base TypeScript configuration from 'tsconfig.json' "extends": "./tsconfig.json", "compilerOptions": { - // If enabled (true), generates corresponding '.d.ts' file alongside the output file. - "declaration": true, // Specifies the module system for the output bundle. "commonjs" is a standard for structuring and organizing JavaScript code. "module": "commonjs", // The location where the output files will be placed. @@ -12,10 +10,4 @@ "sourceMap": true, "inlineSources": true }, - // A list of glob patterns that exclude certain files from the compilation. - // Here, it's set to exclude all the files in 'node_modules' and any file ending in '.spec.ts'. - "exclude": [ - "node_modules", - "**/*.spec.ts" - ] } \ No newline at end of file diff --git a/packages/massa-web3/tsconfig.esm.json b/packages/massa-web3/tsconfig.esm.json index fb60be3d..dd4a65c5 100644 --- a/packages/massa-web3/tsconfig.esm.json +++ b/packages/massa-web3/tsconfig.esm.json @@ -2,20 +2,11 @@ // Extends base TypeScript configuration from 'tsconfig.json' "extends": "./tsconfig.json", "compilerOptions": { - // Specifies the module system for the output bundle. "ESNext" refers to the latest version of ECMAScript (JavaScript). - "module": "ESNext", - // The version of JavaScript that the compiler will output. "ESNext" means the latest version. - "target": "ESNext", // The location where the output files will be placed. "outDir": "./dist/esm/", - // If enabled (true), generates corresponding '.d.ts' file alongside the output file. - "declaration": true, // Source map options "sourceMap": true, "inlineSources": true - // If enabled, only declaration files will be emitted and no JavaScript files will be output. - // Currently commented out, so JavaScript files are being output as well. - // "emitDeclarationOnly": true }, // A list of glob patterns that exclude certain files from the compilation. // Here, it's set to exclude all the files in 'node_modules' and any file ending in '.spec.ts'. diff --git a/packages/massa-web3/tsconfig.json b/packages/massa-web3/tsconfig.json index 4d409be1..0acccb47 100644 --- a/packages/massa-web3/tsconfig.json +++ b/packages/massa-web3/tsconfig.json @@ -5,5 +5,9 @@ }, "include": [ "./src/**/*.ts" + ], + "exclude": [ + "node_modules", + "**/*.spec.ts" ] } \ No newline at end of file diff --git a/packages/web3-utils/tsconfig.commonjs.json b/packages/web3-utils/tsconfig.commonjs.json index 53e384c0..6434050a 100644 --- a/packages/web3-utils/tsconfig.commonjs.json +++ b/packages/web3-utils/tsconfig.commonjs.json @@ -1,19 +1,10 @@ { - // Extends base TypeScript configuration from 'tsconfig.json' - "extends": "./tsconfig.json", - - "compilerOptions": { - // If enabled (true), generates corresponding '.d.ts' file alongside the output file. - "declaration": true, - - // Specifies the module system for the output bundle. "commonjs" is a standard for structuring and organizing JavaScript code. - "module": "commonjs", - - // The location where the output files will be placed. - "outDir": "./dist/cmd/" - }, - - // A list of glob patterns that exclude certain files from the compilation. - // Here, it's set to exclude all the files in 'node_modules' and any file ending in '.spec.ts'. - "exclude": ["node_modules", "**/*.spec.ts"] - } \ No newline at end of file + // Extends base TypeScript configuration from 'tsconfig.json' + "extends": "./tsconfig.json", + "compilerOptions": { + // Specifies the module system for the output bundle. "commonjs" is a standard for structuring and organizing JavaScript code. + "module": "commonjs", + // The location where the output files will be placed. + "outDir": "./dist/cmd/" + }, +} \ No newline at end of file diff --git a/packages/web3-utils/tsconfig.esm.json b/packages/web3-utils/tsconfig.esm.json index daa7eab9..81a2fe26 100644 --- a/packages/web3-utils/tsconfig.esm.json +++ b/packages/web3-utils/tsconfig.esm.json @@ -1,26 +1,8 @@ { // Extends base TypeScript configuration from 'tsconfig.json' "extends": "./tsconfig.json", - "compilerOptions": { - // Specifies the module system for the output bundle. "ESNext" refers to the latest version of ECMAScript (JavaScript). - "module": "ESNext", - - // The version of JavaScript that the compiler will output. "ESNext" means the latest version. - "target": "ESNext", - // The location where the output files will be placed. "outDir": "./dist/esm/", - - // If enabled (true), generates corresponding '.d.ts' file alongside the output file. - "declaration": true, - - // If enabled, only declaration files will be emitted and no JavaScript files will be output. - // Currently commented out, so JavaScript files are being output as well. - // "emitDeclarationOnly": true }, - - // A list of glob patterns that exclude certain files from the compilation. - // Here, it's set to exclude all the files in 'node_modules' and any file ending in '.spec.ts'. - "exclude": ["node_modules", "**/*.spec.ts"] - } \ No newline at end of file +} \ No newline at end of file diff --git a/packages/web3-utils/tsconfig.json b/packages/web3-utils/tsconfig.json index 4d409be1..0acccb47 100644 --- a/packages/web3-utils/tsconfig.json +++ b/packages/web3-utils/tsconfig.json @@ -5,5 +5,9 @@ }, "include": [ "./src/**/*.ts" + ], + "exclude": [ + "node_modules", + "**/*.spec.ts" ] } \ No newline at end of file diff --git a/tsconfig.base.json b/tsconfig.base.json index fdacab6a..ffef08c5 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -1,7 +1,7 @@ { "compilerOptions": { "target": "ESNext", - "module": "commonjs", + "module": "ESNext", "declaration": true, "moduleResolution": "node", "allowSyntheticDefaultImports": true,