From fc6b9ddfce1447b708074fecd64f5c34c7553bce Mon Sep 17 00:00:00 2001 From: Pranita Jain B Date: Thu, 20 Feb 2025 20:54:28 +0530 Subject: [PATCH 01/11] initial --- package.json | 3 +++ packages/client/tsconfig.json | 22 ++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 packages/client/tsconfig.json diff --git a/package.json b/package.json index 359da9a51..3b9c9e26f 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,9 @@ ], "scripts": { "foreach": "yarn workspaces foreach --no-private --parallel --verbose", + "build": "yarn build:tsc --build --verbose", + "build:watch": "concurrently --raw --kill-others 'tsc --build --verbose --watch --inlineSourceMap'", + "build:clean": "tsc --build --clean && yarn foreach clean", "version": "yarn changeset version && yarn install --mode=update-lockfile", "publish": "yarn foreach npm publish --tolerate-republish", "postinstall": "yarn foreach run prepack", diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json new file mode 100644 index 000000000..505120f3f --- /dev/null +++ b/packages/client/tsconfig.json @@ -0,0 +1,22 @@ +{ + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "incremental": true, + "module": "ESNext", + "moduleResolution": "Node", + "noEmit": false, + "outDir": "dist/esm", + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "target": "ESNext", + "types": ["node", "vitest"] + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"] + } + \ No newline at end of file From 47d0b0508e1dab703ae9f8519ad144e952e1978f Mon Sep 17 00:00:00 2001 From: Lint Action Date: Thu, 20 Feb 2025 15:33:28 +0000 Subject: [PATCH 02/11] Fix code style issues with Prettier --- packages/client/tsconfig.json | 41 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index 505120f3f..5987f626c 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -1,22 +1,21 @@ { - "compilerOptions": { - "composite": true, - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "incremental": true, - "module": "ESNext", - "moduleResolution": "Node", - "noEmit": false, - "outDir": "dist/esm", - "resolveJsonModule": true, - "skipLibCheck": true, - "strict": true, - "target": "ESNext", - "types": ["node", "vitest"] - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"] - } - \ No newline at end of file + "compilerOptions": { + "composite": true, + "declaration": true, + "declarationMap": true, + "esModuleInterop": true, + "forceConsistentCasingInFileNames": true, + "incremental": true, + "module": "ESNext", + "moduleResolution": "Node", + "noEmit": false, + "outDir": "dist/esm", + "resolveJsonModule": true, + "skipLibCheck": true, + "strict": true, + "target": "ESNext", + "types": ["node", "vitest"] + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"] +} From b7e8bfebe68e09a4a64326c3002f8ec065a429cd Mon Sep 17 00:00:00 2001 From: Pranita Jain B Date: Fri, 21 Feb 2025 17:35:09 +0530 Subject: [PATCH 03/11] added config at root level also --- packages/client/tsconfig.json | 69 ++++++++++++++----- packages/export/tsconfig.json | 57 +++++++++++++++ packages/provider-elasticsearch/tsconfig.json | 57 +++++++++++++++ packages/provider-mongo/tsconfig.json | 57 +++++++++++++++ packages/server/tsconfig.json | 57 +++++++++++++++ packages/util/tsconfig.json | 57 +++++++++++++++ tsconfig.all.jsonc | 19 +++++ tsconfig.json | 15 ++++ 8 files changed, 371 insertions(+), 17 deletions(-) create mode 100644 packages/export/tsconfig.json create mode 100644 packages/provider-elasticsearch/tsconfig.json create mode 100644 packages/provider-mongo/tsconfig.json create mode 100644 packages/server/tsconfig.json create mode 100644 packages/util/tsconfig.json create mode 100644 tsconfig.all.jsonc create mode 100644 tsconfig.json diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index 5987f626c..965e27b9a 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -1,21 +1,56 @@ { + //Inherits settings from ../tsconfig.all.jsonc which is at root level + "extends": ["../../tsconfig.all.jsonc"], + + //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. + //It includes .ts, .tsx, .js, and .jsx + "include": ["src/**/*"], + + //compilerOptions inherited from tsconfig.all.jsonc are overridden here. + // i have taken reference from spark/web compilerOptions.In that also we are overridding "compilerOptions": { - "composite": true, - "declaration": true, - "declarationMap": true, - "esModuleInterop": true, - "forceConsistentCasingInFileNames": true, - "incremental": true, - "module": "ESNext", - "moduleResolution": "Node", - "noEmit": false, - "outDir": "dist/esm", - "resolveJsonModule": true, - "skipLibCheck": true, + +//Provides Node.js global types and includes types for Vitest which is used by test files + "types": ["node", "vitest"], + + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. + //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all + "noEmit": true, + + //Allow Importing TypeScript Extensions, for future support + "allowImportingTsExtensions": true, + + //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'client' + "tsBuildInfoFile": "../../node_modules/.buildinfo/client", + + //Allows TypeScript to compile JavaScript files + "allowJs": true, + + //Disables type checking on .js files. + "checkJs": false, + + //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, + //then it will throw Error: Not all code paths return a value. + "noImplicitReturns": true, + + //Forces explicit undefined checks when accessing arrays or objects. + //for example let x = arr[0]; // Error: x might be undefined. + //to fix this let x: number[] | undefined or let x = arr[0] as number; + "noUncheckedIndexedAccess": true, + + //Ensures function parameters are used.// Error: 'name' is unused. + "noUnusedParameters": true, + + //strict it self holds 6 different type of checks + //strictNullChecks-Error: Type 'null' is not assignable to 'string' + //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type + //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' + //strictBindCallApply- + //strictPropertyInitialization- + //noImplicitThis- "strict": true, - "target": "ESNext", - "types": ["node", "vitest"] - }, - "include": ["src/**/*"], - "exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"] + + "isolatedModules": true + } } diff --git a/packages/export/tsconfig.json b/packages/export/tsconfig.json new file mode 100644 index 000000000..3922aff7f --- /dev/null +++ b/packages/export/tsconfig.json @@ -0,0 +1,57 @@ +{ + //Inherits settings from ../tsconfig.all.jsonc which is at root level + "extends": ["../../tsconfig.all.jsonc"], + + //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. + //It includes .ts, .tsx, .js, and .jsx + "include": ["src/**/*"], + + //compilerOptions inherited from tsconfig.all.jsonc are overridden here. + // i have taken reference from spark/web compilerOptions.In that also we are overridding + "compilerOptions": { + + //Provides Node.js global types and includes types for Vitest which is used by test files + "types": ["node", "vitest"], + + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. + //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all + "noEmit": true, + + //Allow Importing TypeScript Extensions, for future support + "allowImportingTsExtensions": true, + + //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'export' + "tsBuildInfoFile": "../../node_modules/.buildinfo/export", + + //Allows TypeScript to compile JavaScript files + "allowJs": true, + + //Disables type checking on .js files. + "checkJs": false, + + //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, + //then it will throw Error: Not all code paths return a value. + "noImplicitReturns": true, + + //Forces explicit undefined checks when accessing arrays or objects. + //for example let x = arr[0]; // Error: x might be undefined. + //to fix this let x: number[] | undefined or let x = arr[0] as number; + "noUncheckedIndexedAccess": true, + + //Ensures function parameters are used.// Error: 'name' is unused. + "noUnusedParameters": true, + + //strict it self holds 6 different type of checks + //strictNullChecks-Error: Type 'null' is not assignable to 'string' + //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type + //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' + //strictBindCallApply- + //strictPropertyInitialization- + //noImplicitThis- + "strict": true, + + "isolatedModules": true + } + } + \ No newline at end of file diff --git a/packages/provider-elasticsearch/tsconfig.json b/packages/provider-elasticsearch/tsconfig.json new file mode 100644 index 000000000..3e4193fcf --- /dev/null +++ b/packages/provider-elasticsearch/tsconfig.json @@ -0,0 +1,57 @@ +{ + //Inherits settings from ../tsconfig.all.jsonc which is at root level + "extends": ["../../tsconfig.all.jsonc"], + + //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. + //It includes .ts, .tsx, .js, and .jsx + "include": ["src/**/*"], + + //compilerOptions inherited from tsconfig.all.jsonc are overridden here. + // i have taken reference from spark/web compilerOptions.In that also we are overridding + "compilerOptions": { + + //Provides Node.js global types and includes types for Vitest which is used by test files + "types": ["node", "vitest"], + + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. + //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all + "noEmit": true, + + //Allow Importing TypeScript Extensions, for future support + "allowImportingTsExtensions": true, + + //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'provider-elasticsearch' + "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-elasticsearch", + + //Allows TypeScript to compile JavaScript files + "allowJs": true, + + //Disables type checking on .js files. + "checkJs": false, + + //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, + //then it will throw Error: Not all code paths return a value. + "noImplicitReturns": true, + + //Forces explicit undefined checks when accessing arrays or objects. + //for example let x = arr[0]; // Error: x might be undefined. + //to fix this let x: number[] | undefined or let x = arr[0] as number; + "noUncheckedIndexedAccess": true, + + //Ensures function parameters are used.// Error: 'name' is unused. + "noUnusedParameters": true, + + //strict it self holds 6 different type of checks + //strictNullChecks-Error: Type 'null' is not assignable to 'string' + //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type + //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' + //strictBindCallApply- + //strictPropertyInitialization- + //noImplicitThis- + "strict": true, + + "isolatedModules": true + } + } + \ No newline at end of file diff --git a/packages/provider-mongo/tsconfig.json b/packages/provider-mongo/tsconfig.json new file mode 100644 index 000000000..4e43bf930 --- /dev/null +++ b/packages/provider-mongo/tsconfig.json @@ -0,0 +1,57 @@ +{ + //Inherits settings from ../tsconfig.all.jsonc which is at root level + "extends": ["../../tsconfig.all.jsonc"], + + //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. + //It includes .ts, .tsx, .js, and .jsx + "include": ["src/**/*"], + + //compilerOptions inherited from tsconfig.all.jsonc are overridden here. + // i have taken reference from spark/web compilerOptions.In that also we are overridding + "compilerOptions": { + + //Provides Node.js global types and includes types for Vitest which is used by test files + "types": ["node", "vitest"], + + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. + //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all + "noEmit": true, + + //Allow Importing TypeScript Extensions, for future support + "allowImportingTsExtensions": true, + + //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'provider-mongo' + "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-mongo", + + //Allows TypeScript to compile JavaScript files + "allowJs": true, + + //Disables type checking on .js files. + "checkJs": false, + + //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, + //then it will throw Error: Not all code paths return a value. + "noImplicitReturns": true, + + //Forces explicit undefined checks when accessing arrays or objects. + //for example let x = arr[0]; // Error: x might be undefined. + //to fix this let x: number[] | undefined or let x = arr[0] as number; + "noUncheckedIndexedAccess": true, + + //Ensures function parameters are used.// Error: 'name' is unused. + "noUnusedParameters": true, + + //strict it self holds 6 different type of checks + //strictNullChecks-Error: Type 'null' is not assignable to 'string' + //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type + //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' + //strictBindCallApply- + //strictPropertyInitialization- + //noImplicitThis- + "strict": true, + + "isolatedModules": true + } + } + \ No newline at end of file diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json new file mode 100644 index 000000000..83a901940 --- /dev/null +++ b/packages/server/tsconfig.json @@ -0,0 +1,57 @@ +{ + //Inherits settings from ../tsconfig.all.jsonc which is at root level + "extends": ["../../tsconfig.all.jsonc"], + + //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. + //It includes .ts, .tsx, .js, and .jsx + "include": ["src/**/*"], + + //compilerOptions inherited from tsconfig.all.jsonc are overridden here. + // i have taken reference from spark/web compilerOptions.In that also we are overridding + "compilerOptions": { + + //Provides Node.js global types and includes types for Vitest which is used by test files + "types": ["node", "vitest"], + + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. + //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all + "noEmit": true, + + //Allow Importing TypeScript Extensions, for future support + "allowImportingTsExtensions": true, + + //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'server' + "tsBuildInfoFile": "../../node_modules/.buildinfo/server", + + //Allows TypeScript to compile JavaScript files + "allowJs": true, + + //Disables type checking on .js files. + "checkJs": false, + + //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, + //then it will throw Error: Not all code paths return a value. + "noImplicitReturns": true, + + //Forces explicit undefined checks when accessing arrays or objects. + //for example let x = arr[0]; // Error: x might be undefined. + //to fix this let x: number[] | undefined or let x = arr[0] as number; + "noUncheckedIndexedAccess": true, + + //Ensures function parameters are used.// Error: 'name' is unused. + "noUnusedParameters": true, + + //strict it self holds 6 different type of checks + //strictNullChecks-Error: Type 'null' is not assignable to 'string' + //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type + //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' + //strictBindCallApply- + //strictPropertyInitialization- + //noImplicitThis- + "strict": true, + + "isolatedModules": true + } + } + \ No newline at end of file diff --git a/packages/util/tsconfig.json b/packages/util/tsconfig.json new file mode 100644 index 000000000..80bec5d72 --- /dev/null +++ b/packages/util/tsconfig.json @@ -0,0 +1,57 @@ +{ + //Inherits settings from ../tsconfig.all.jsonc which is at root level + "extends": ["../../tsconfig.all.jsonc"], + + //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. + //It includes .ts, .tsx, .js, and .jsx + "include": ["src/**/*"], + + //compilerOptions inherited from tsconfig.all.jsonc are overridden here. + // i have taken reference from spark/web compilerOptions.In that also we are overridding + "compilerOptions": { + + //Provides Node.js global types and includes types for Vitest which is used by test files + "types": ["node", "vitest"], + + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. + //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all + "noEmit": true, + + //Allow Importing TypeScript Extensions, for future support + "allowImportingTsExtensions": true, + + //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'util' + "tsBuildInfoFile": "../../node_modules/.buildinfo/util", + + //Allows TypeScript to compile JavaScript files + "allowJs": true, + + //Disables type checking on .js files. + "checkJs": false, + + //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, + //then it will throw Error: Not all code paths return a value. + "noImplicitReturns": true, + + //Forces explicit undefined checks when accessing arrays or objects. + //for example let x = arr[0]; // Error: x might be undefined. + //to fix this let x: number[] | undefined or let x = arr[0] as number; + "noUncheckedIndexedAccess": true, + + //Ensures function parameters are used.// Error: 'name' is unused. + "noUnusedParameters": true, + + //strict it self holds 6 different type of checks + //strictNullChecks-Error: Type 'null' is not assignable to 'string' + //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type + //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' + //strictBindCallApply- + //strictPropertyInitialization- + //noImplicitThis- + "strict": true, + + "isolatedModules": true + } + } + \ No newline at end of file diff --git a/tsconfig.all.jsonc b/tsconfig.all.jsonc new file mode 100644 index 000000000..7ea1cd530 --- /dev/null +++ b/tsconfig.all.jsonc @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "allowUnreachableCode": false, // Prevents accidental execution of unreachable code. + "allowUnusedLabels": false, // Disallows unused labels to avoid confusion in code. + "noFallthroughCasesInSwitch": true, // Ensures every switch case explicitly handles its execution flow. + "noUnusedLocals": true, // Reports unused local variables to keep the code clean. + "noErrorTruncation": true, // Prevents truncation of error messages for better debugging. + "isolatedModules": true, // Ensures each module can be transpiled independently for better tooling support. + "verbatimModuleSyntax": true, // Enforces explicit use of `type` imports for type-only dependencies. + "module": "nodenext", // Uses the ES module system compatible with Node.js. + "moduleResolution": "nodenext", // Resolves modules as per Node.js ESM standards. + "resolveJsonModule": true, // Allows importing JSON files as modules. + "types": ["vite/client", "vitest/globals"], // Restricts the global scope to these type definitions. + "jsx": "react", // Specifies JSX transformation method for React applications. + "noEmitOnError": true, // Prevents output generation if there are TypeScript errors. + "incremental": true, // Enables incremental builds for better performance. + "skipLibCheck": true // Skips type checking of library declaration files to speed up compilation. + } +} diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..fe050eaf7 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,15 @@ +// Good reference for project references in a monorepo setting +// https://moonrepo.dev/docs/guides/javascript/typescript-project-refs +{ + // Do not doubly build files (they're already being built via references). + "files": [], + "references": [ + { "path": "./packages/client/tsconfig.json" }, + { "path": "./packages/export/tsconfig.json" }, + { "path": "./packages/provider-elasticsearch/tsconfig.json" }, + { "path": "./packages/provider-mongo/tsconfig.json" }, + { "path": "./packages/server/tsconfig.json" }, + { "path": "./packages/util/tsconfig.json" } + ] + } + \ No newline at end of file From e04e7087c92311dbae5a72229851ba2605e7056d Mon Sep 17 00:00:00 2001 From: Lint Action Date: Fri, 21 Feb 2025 12:09:07 +0000 Subject: [PATCH 04/11] Fix code style issues with Prettier --- packages/client/tsconfig.json | 9 +- packages/export/tsconfig.json | 108 +++++++++--------- packages/provider-elasticsearch/tsconfig.json | 108 +++++++++--------- packages/provider-mongo/tsconfig.json | 108 +++++++++--------- packages/server/tsconfig.json | 108 +++++++++--------- packages/util/tsconfig.json | 108 +++++++++--------- tsconfig.json | 23 ++-- 7 files changed, 280 insertions(+), 292 deletions(-) diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index 965e27b9a..57f84004a 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -9,12 +9,11 @@ //compilerOptions inherited from tsconfig.all.jsonc are overridden here. // i have taken reference from spark/web compilerOptions.In that also we are overridding "compilerOptions": { - -//Provides Node.js global types and includes types for Vitest which is used by test files + //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all "noEmit": true, @@ -42,7 +41,7 @@ //Ensures function parameters are used.// Error: 'name' is unused. "noUnusedParameters": true, - //strict it self holds 6 different type of checks + //strict it self holds 6 different type of checks //strictNullChecks-Error: Type 'null' is not assignable to 'string' //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' diff --git a/packages/export/tsconfig.json b/packages/export/tsconfig.json index 3922aff7f..4aacc7b68 100644 --- a/packages/export/tsconfig.json +++ b/packages/export/tsconfig.json @@ -1,57 +1,55 @@ { - //Inherits settings from ../tsconfig.all.jsonc which is at root level - "extends": ["../../tsconfig.all.jsonc"], - - //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. - //It includes .ts, .tsx, .js, and .jsx - "include": ["src/**/*"], - - //compilerOptions inherited from tsconfig.all.jsonc are overridden here. - // i have taken reference from spark/web compilerOptions.In that also we are overridding - "compilerOptions": { - - //Provides Node.js global types and includes types for Vitest which is used by test files - "types": ["node", "vitest"], - - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. - //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all - "noEmit": true, - - //Allow Importing TypeScript Extensions, for future support - "allowImportingTsExtensions": true, - - //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'export' - "tsBuildInfoFile": "../../node_modules/.buildinfo/export", - - //Allows TypeScript to compile JavaScript files - "allowJs": true, - - //Disables type checking on .js files. - "checkJs": false, - - //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, - //then it will throw Error: Not all code paths return a value. - "noImplicitReturns": true, - - //Forces explicit undefined checks when accessing arrays or objects. - //for example let x = arr[0]; // Error: x might be undefined. - //to fix this let x: number[] | undefined or let x = arr[0] as number; - "noUncheckedIndexedAccess": true, - - //Ensures function parameters are used.// Error: 'name' is unused. - "noUnusedParameters": true, - - //strict it self holds 6 different type of checks - //strictNullChecks-Error: Type 'null' is not assignable to 'string' - //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type - //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' - //strictBindCallApply- - //strictPropertyInitialization- - //noImplicitThis- - "strict": true, - - "isolatedModules": true - } + //Inherits settings from ../tsconfig.all.jsonc which is at root level + "extends": ["../../tsconfig.all.jsonc"], + + //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. + //It includes .ts, .tsx, .js, and .jsx + "include": ["src/**/*"], + + //compilerOptions inherited from tsconfig.all.jsonc are overridden here. + // i have taken reference from spark/web compilerOptions.In that also we are overridding + "compilerOptions": { + //Provides Node.js global types and includes types for Vitest which is used by test files + "types": ["node", "vitest"], + + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. + //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all + "noEmit": true, + + //Allow Importing TypeScript Extensions, for future support + "allowImportingTsExtensions": true, + + //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'export' + "tsBuildInfoFile": "../../node_modules/.buildinfo/export", + + //Allows TypeScript to compile JavaScript files + "allowJs": true, + + //Disables type checking on .js files. + "checkJs": false, + + //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, + //then it will throw Error: Not all code paths return a value. + "noImplicitReturns": true, + + //Forces explicit undefined checks when accessing arrays or objects. + //for example let x = arr[0]; // Error: x might be undefined. + //to fix this let x: number[] | undefined or let x = arr[0] as number; + "noUncheckedIndexedAccess": true, + + //Ensures function parameters are used.// Error: 'name' is unused. + "noUnusedParameters": true, + + //strict it self holds 6 different type of checks + //strictNullChecks-Error: Type 'null' is not assignable to 'string' + //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type + //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' + //strictBindCallApply- + //strictPropertyInitialization- + //noImplicitThis- + "strict": true, + + "isolatedModules": true } - \ No newline at end of file +} diff --git a/packages/provider-elasticsearch/tsconfig.json b/packages/provider-elasticsearch/tsconfig.json index 3e4193fcf..aa9b0db43 100644 --- a/packages/provider-elasticsearch/tsconfig.json +++ b/packages/provider-elasticsearch/tsconfig.json @@ -1,57 +1,55 @@ { - //Inherits settings from ../tsconfig.all.jsonc which is at root level - "extends": ["../../tsconfig.all.jsonc"], - - //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. - //It includes .ts, .tsx, .js, and .jsx - "include": ["src/**/*"], - - //compilerOptions inherited from tsconfig.all.jsonc are overridden here. - // i have taken reference from spark/web compilerOptions.In that also we are overridding - "compilerOptions": { - - //Provides Node.js global types and includes types for Vitest which is used by test files - "types": ["node", "vitest"], - - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. - //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all - "noEmit": true, - - //Allow Importing TypeScript Extensions, for future support - "allowImportingTsExtensions": true, - - //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'provider-elasticsearch' - "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-elasticsearch", - - //Allows TypeScript to compile JavaScript files - "allowJs": true, - - //Disables type checking on .js files. - "checkJs": false, - - //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, - //then it will throw Error: Not all code paths return a value. - "noImplicitReturns": true, - - //Forces explicit undefined checks when accessing arrays or objects. - //for example let x = arr[0]; // Error: x might be undefined. - //to fix this let x: number[] | undefined or let x = arr[0] as number; - "noUncheckedIndexedAccess": true, - - //Ensures function parameters are used.// Error: 'name' is unused. - "noUnusedParameters": true, - - //strict it self holds 6 different type of checks - //strictNullChecks-Error: Type 'null' is not assignable to 'string' - //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type - //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' - //strictBindCallApply- - //strictPropertyInitialization- - //noImplicitThis- - "strict": true, - - "isolatedModules": true - } + //Inherits settings from ../tsconfig.all.jsonc which is at root level + "extends": ["../../tsconfig.all.jsonc"], + + //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. + //It includes .ts, .tsx, .js, and .jsx + "include": ["src/**/*"], + + //compilerOptions inherited from tsconfig.all.jsonc are overridden here. + // i have taken reference from spark/web compilerOptions.In that also we are overridding + "compilerOptions": { + //Provides Node.js global types and includes types for Vitest which is used by test files + "types": ["node", "vitest"], + + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. + //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all + "noEmit": true, + + //Allow Importing TypeScript Extensions, for future support + "allowImportingTsExtensions": true, + + //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'provider-elasticsearch' + "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-elasticsearch", + + //Allows TypeScript to compile JavaScript files + "allowJs": true, + + //Disables type checking on .js files. + "checkJs": false, + + //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, + //then it will throw Error: Not all code paths return a value. + "noImplicitReturns": true, + + //Forces explicit undefined checks when accessing arrays or objects. + //for example let x = arr[0]; // Error: x might be undefined. + //to fix this let x: number[] | undefined or let x = arr[0] as number; + "noUncheckedIndexedAccess": true, + + //Ensures function parameters are used.// Error: 'name' is unused. + "noUnusedParameters": true, + + //strict it self holds 6 different type of checks + //strictNullChecks-Error: Type 'null' is not assignable to 'string' + //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type + //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' + //strictBindCallApply- + //strictPropertyInitialization- + //noImplicitThis- + "strict": true, + + "isolatedModules": true } - \ No newline at end of file +} diff --git a/packages/provider-mongo/tsconfig.json b/packages/provider-mongo/tsconfig.json index 4e43bf930..e7b2e4088 100644 --- a/packages/provider-mongo/tsconfig.json +++ b/packages/provider-mongo/tsconfig.json @@ -1,57 +1,55 @@ { - //Inherits settings from ../tsconfig.all.jsonc which is at root level - "extends": ["../../tsconfig.all.jsonc"], - - //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. - //It includes .ts, .tsx, .js, and .jsx - "include": ["src/**/*"], - - //compilerOptions inherited from tsconfig.all.jsonc are overridden here. - // i have taken reference from spark/web compilerOptions.In that also we are overridding - "compilerOptions": { - - //Provides Node.js global types and includes types for Vitest which is used by test files - "types": ["node", "vitest"], - - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. - //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all - "noEmit": true, - - //Allow Importing TypeScript Extensions, for future support - "allowImportingTsExtensions": true, - - //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'provider-mongo' - "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-mongo", - - //Allows TypeScript to compile JavaScript files - "allowJs": true, - - //Disables type checking on .js files. - "checkJs": false, - - //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, - //then it will throw Error: Not all code paths return a value. - "noImplicitReturns": true, - - //Forces explicit undefined checks when accessing arrays or objects. - //for example let x = arr[0]; // Error: x might be undefined. - //to fix this let x: number[] | undefined or let x = arr[0] as number; - "noUncheckedIndexedAccess": true, - - //Ensures function parameters are used.// Error: 'name' is unused. - "noUnusedParameters": true, - - //strict it self holds 6 different type of checks - //strictNullChecks-Error: Type 'null' is not assignable to 'string' - //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type - //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' - //strictBindCallApply- - //strictPropertyInitialization- - //noImplicitThis- - "strict": true, - - "isolatedModules": true - } + //Inherits settings from ../tsconfig.all.jsonc which is at root level + "extends": ["../../tsconfig.all.jsonc"], + + //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. + //It includes .ts, .tsx, .js, and .jsx + "include": ["src/**/*"], + + //compilerOptions inherited from tsconfig.all.jsonc are overridden here. + // i have taken reference from spark/web compilerOptions.In that also we are overridding + "compilerOptions": { + //Provides Node.js global types and includes types for Vitest which is used by test files + "types": ["node", "vitest"], + + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. + //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all + "noEmit": true, + + //Allow Importing TypeScript Extensions, for future support + "allowImportingTsExtensions": true, + + //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'provider-mongo' + "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-mongo", + + //Allows TypeScript to compile JavaScript files + "allowJs": true, + + //Disables type checking on .js files. + "checkJs": false, + + //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, + //then it will throw Error: Not all code paths return a value. + "noImplicitReturns": true, + + //Forces explicit undefined checks when accessing arrays or objects. + //for example let x = arr[0]; // Error: x might be undefined. + //to fix this let x: number[] | undefined or let x = arr[0] as number; + "noUncheckedIndexedAccess": true, + + //Ensures function parameters are used.// Error: 'name' is unused. + "noUnusedParameters": true, + + //strict it self holds 6 different type of checks + //strictNullChecks-Error: Type 'null' is not assignable to 'string' + //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type + //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' + //strictBindCallApply- + //strictPropertyInitialization- + //noImplicitThis- + "strict": true, + + "isolatedModules": true } - \ No newline at end of file +} diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index 83a901940..a69cfb8fa 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -1,57 +1,55 @@ { - //Inherits settings from ../tsconfig.all.jsonc which is at root level - "extends": ["../../tsconfig.all.jsonc"], - - //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. - //It includes .ts, .tsx, .js, and .jsx - "include": ["src/**/*"], - - //compilerOptions inherited from tsconfig.all.jsonc are overridden here. - // i have taken reference from spark/web compilerOptions.In that also we are overridding - "compilerOptions": { - - //Provides Node.js global types and includes types for Vitest which is used by test files - "types": ["node", "vitest"], - - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. - //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all - "noEmit": true, - - //Allow Importing TypeScript Extensions, for future support - "allowImportingTsExtensions": true, - - //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'server' - "tsBuildInfoFile": "../../node_modules/.buildinfo/server", - - //Allows TypeScript to compile JavaScript files - "allowJs": true, - - //Disables type checking on .js files. - "checkJs": false, - - //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, - //then it will throw Error: Not all code paths return a value. - "noImplicitReturns": true, - - //Forces explicit undefined checks when accessing arrays or objects. - //for example let x = arr[0]; // Error: x might be undefined. - //to fix this let x: number[] | undefined or let x = arr[0] as number; - "noUncheckedIndexedAccess": true, - - //Ensures function parameters are used.// Error: 'name' is unused. - "noUnusedParameters": true, - - //strict it self holds 6 different type of checks - //strictNullChecks-Error: Type 'null' is not assignable to 'string' - //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type - //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' - //strictBindCallApply- - //strictPropertyInitialization- - //noImplicitThis- - "strict": true, - - "isolatedModules": true - } + //Inherits settings from ../tsconfig.all.jsonc which is at root level + "extends": ["../../tsconfig.all.jsonc"], + + //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. + //It includes .ts, .tsx, .js, and .jsx + "include": ["src/**/*"], + + //compilerOptions inherited from tsconfig.all.jsonc are overridden here. + // i have taken reference from spark/web compilerOptions.In that also we are overridding + "compilerOptions": { + //Provides Node.js global types and includes types for Vitest which is used by test files + "types": ["node", "vitest"], + + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. + //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all + "noEmit": true, + + //Allow Importing TypeScript Extensions, for future support + "allowImportingTsExtensions": true, + + //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'server' + "tsBuildInfoFile": "../../node_modules/.buildinfo/server", + + //Allows TypeScript to compile JavaScript files + "allowJs": true, + + //Disables type checking on .js files. + "checkJs": false, + + //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, + //then it will throw Error: Not all code paths return a value. + "noImplicitReturns": true, + + //Forces explicit undefined checks when accessing arrays or objects. + //for example let x = arr[0]; // Error: x might be undefined. + //to fix this let x: number[] | undefined or let x = arr[0] as number; + "noUncheckedIndexedAccess": true, + + //Ensures function parameters are used.// Error: 'name' is unused. + "noUnusedParameters": true, + + //strict it self holds 6 different type of checks + //strictNullChecks-Error: Type 'null' is not assignable to 'string' + //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type + //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' + //strictBindCallApply- + //strictPropertyInitialization- + //noImplicitThis- + "strict": true, + + "isolatedModules": true } - \ No newline at end of file +} diff --git a/packages/util/tsconfig.json b/packages/util/tsconfig.json index 80bec5d72..1e990b4fb 100644 --- a/packages/util/tsconfig.json +++ b/packages/util/tsconfig.json @@ -1,57 +1,55 @@ { - //Inherits settings from ../tsconfig.all.jsonc which is at root level - "extends": ["../../tsconfig.all.jsonc"], - - //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. - //It includes .ts, .tsx, .js, and .jsx - "include": ["src/**/*"], - - //compilerOptions inherited from tsconfig.all.jsonc are overridden here. - // i have taken reference from spark/web compilerOptions.In that also we are overridding - "compilerOptions": { - - //Provides Node.js global types and includes types for Vitest which is used by test files - "types": ["node", "vitest"], - - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. - //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all - "noEmit": true, - - //Allow Importing TypeScript Extensions, for future support - "allowImportingTsExtensions": true, - - //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'util' - "tsBuildInfoFile": "../../node_modules/.buildinfo/util", - - //Allows TypeScript to compile JavaScript files - "allowJs": true, - - //Disables type checking on .js files. - "checkJs": false, - - //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, - //then it will throw Error: Not all code paths return a value. - "noImplicitReturns": true, - - //Forces explicit undefined checks when accessing arrays or objects. - //for example let x = arr[0]; // Error: x might be undefined. - //to fix this let x: number[] | undefined or let x = arr[0] as number; - "noUncheckedIndexedAccess": true, - - //Ensures function parameters are used.// Error: 'name' is unused. - "noUnusedParameters": true, - - //strict it self holds 6 different type of checks - //strictNullChecks-Error: Type 'null' is not assignable to 'string' - //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type - //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' - //strictBindCallApply- - //strictPropertyInitialization- - //noImplicitThis- - "strict": true, - - "isolatedModules": true - } + //Inherits settings from ../tsconfig.all.jsonc which is at root level + "extends": ["../../tsconfig.all.jsonc"], + + //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. + //It includes .ts, .tsx, .js, and .jsx + "include": ["src/**/*"], + + //compilerOptions inherited from tsconfig.all.jsonc are overridden here. + // i have taken reference from spark/web compilerOptions.In that also we are overridding + "compilerOptions": { + //Provides Node.js global types and includes types for Vitest which is used by test files + "types": ["node", "vitest"], + + //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , + //and those dist files are further consumed by other packages like web etc. + //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all + "noEmit": true, + + //Allow Importing TypeScript Extensions, for future support + "allowImportingTsExtensions": true, + + //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'util' + "tsBuildInfoFile": "../../node_modules/.buildinfo/util", + + //Allows TypeScript to compile JavaScript files + "allowJs": true, + + //Disables type checking on .js files. + "checkJs": false, + + //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, + //then it will throw Error: Not all code paths return a value. + "noImplicitReturns": true, + + //Forces explicit undefined checks when accessing arrays or objects. + //for example let x = arr[0]; // Error: x might be undefined. + //to fix this let x: number[] | undefined or let x = arr[0] as number; + "noUncheckedIndexedAccess": true, + + //Ensures function parameters are used.// Error: 'name' is unused. + "noUnusedParameters": true, + + //strict it self holds 6 different type of checks + //strictNullChecks-Error: Type 'null' is not assignable to 'string' + //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type + //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' + //strictBindCallApply- + //strictPropertyInitialization- + //noImplicitThis- + "strict": true, + + "isolatedModules": true } - \ No newline at end of file +} diff --git a/tsconfig.json b/tsconfig.json index fe050eaf7..8f01daf35 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,14 @@ // Good reference for project references in a monorepo setting // https://moonrepo.dev/docs/guides/javascript/typescript-project-refs { - // Do not doubly build files (they're already being built via references). - "files": [], - "references": [ - { "path": "./packages/client/tsconfig.json" }, - { "path": "./packages/export/tsconfig.json" }, - { "path": "./packages/provider-elasticsearch/tsconfig.json" }, - { "path": "./packages/provider-mongo/tsconfig.json" }, - { "path": "./packages/server/tsconfig.json" }, - { "path": "./packages/util/tsconfig.json" } - ] - } - \ No newline at end of file + // Do not doubly build files (they're already being built via references). + "files": [], + "references": [ + { "path": "./packages/client/tsconfig.json" }, + { "path": "./packages/export/tsconfig.json" }, + { "path": "./packages/provider-elasticsearch/tsconfig.json" }, + { "path": "./packages/provider-mongo/tsconfig.json" }, + { "path": "./packages/server/tsconfig.json" }, + { "path": "./packages/util/tsconfig.json" } + ] +} From 17911b2646d9272b7dcc240114e06238f684c6ad Mon Sep 17 00:00:00 2001 From: Pranita Jain B Date: Fri, 28 Feb 2025 17:28:41 +0530 Subject: [PATCH 05/11] typescript tsx concurrently added into dev dependencies: --- package.json | 3 + yarn.lock | 390 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 393 insertions(+) diff --git a/package.json b/package.json index 3b9c9e26f..64215f934 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "@changesets/cli": "^2.26.0", "@flex-development/toggle-pkg-type": "^1.0.1", "@vitest/coverage-v8": "^2.1.1", + "concurrently": "^9.1.2", "danger": "^11.2.3", "duti": "^0.15.2", "esbuild": "^0.17.5", @@ -28,6 +29,8 @@ "glob": "^8.1.0", "minimist": "^1.2.7", "prettier": "^2.8.3", + "tsx": "^4.19.3", + "typescript": "^5.7.3", "vitest": "^2.1.1" }, "packageManager": "yarn@3.3.1" diff --git a/yarn.lock b/yarn.lock index 17ef864cb..ec76887d9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -379,6 +379,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/aix-ppc64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/aix-ppc64@npm:0.25.0" + conditions: os=aix & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/android-arm64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/android-arm64@npm:0.17.5" @@ -393,6 +400,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/android-arm64@npm:0.25.0" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/android-arm@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/android-arm@npm:0.17.5" @@ -407,6 +421,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-arm@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/android-arm@npm:0.25.0" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + "@esbuild/android-x64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/android-x64@npm:0.17.5" @@ -421,6 +442,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/android-x64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/android-x64@npm:0.25.0" + conditions: os=android & cpu=x64 + languageName: node + linkType: hard + "@esbuild/darwin-arm64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/darwin-arm64@npm:0.17.5" @@ -435,6 +463,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-arm64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/darwin-arm64@npm:0.25.0" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/darwin-x64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/darwin-x64@npm:0.17.5" @@ -449,6 +484,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/darwin-x64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/darwin-x64@npm:0.25.0" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + "@esbuild/freebsd-arm64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/freebsd-arm64@npm:0.17.5" @@ -463,6 +505,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-arm64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/freebsd-arm64@npm:0.25.0" + conditions: os=freebsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/freebsd-x64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/freebsd-x64@npm:0.17.5" @@ -477,6 +526,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/freebsd-x64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/freebsd-x64@npm:0.25.0" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/linux-arm64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/linux-arm64@npm:0.17.5" @@ -491,6 +547,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/linux-arm64@npm:0.25.0" + conditions: os=linux & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/linux-arm@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/linux-arm@npm:0.17.5" @@ -505,6 +568,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-arm@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/linux-arm@npm:0.25.0" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + "@esbuild/linux-ia32@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/linux-ia32@npm:0.17.5" @@ -519,6 +589,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ia32@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/linux-ia32@npm:0.25.0" + conditions: os=linux & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/linux-loong64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/linux-loong64@npm:0.17.5" @@ -533,6 +610,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-loong64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/linux-loong64@npm:0.25.0" + conditions: os=linux & cpu=loong64 + languageName: node + linkType: hard + "@esbuild/linux-mips64el@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/linux-mips64el@npm:0.17.5" @@ -547,6 +631,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-mips64el@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/linux-mips64el@npm:0.25.0" + conditions: os=linux & cpu=mips64el + languageName: node + linkType: hard + "@esbuild/linux-ppc64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/linux-ppc64@npm:0.17.5" @@ -561,6 +652,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-ppc64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/linux-ppc64@npm:0.25.0" + conditions: os=linux & cpu=ppc64 + languageName: node + linkType: hard + "@esbuild/linux-riscv64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/linux-riscv64@npm:0.17.5" @@ -575,6 +673,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-riscv64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/linux-riscv64@npm:0.25.0" + conditions: os=linux & cpu=riscv64 + languageName: node + linkType: hard + "@esbuild/linux-s390x@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/linux-s390x@npm:0.17.5" @@ -589,6 +694,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-s390x@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/linux-s390x@npm:0.25.0" + conditions: os=linux & cpu=s390x + languageName: node + linkType: hard + "@esbuild/linux-x64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/linux-x64@npm:0.17.5" @@ -603,6 +715,20 @@ __metadata: languageName: node linkType: hard +"@esbuild/linux-x64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/linux-x64@npm:0.25.0" + conditions: os=linux & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/netbsd-arm64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/netbsd-arm64@npm:0.25.0" + conditions: os=netbsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/netbsd-x64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/netbsd-x64@npm:0.17.5" @@ -617,6 +743,20 @@ __metadata: languageName: node linkType: hard +"@esbuild/netbsd-x64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/netbsd-x64@npm:0.25.0" + conditions: os=netbsd & cpu=x64 + languageName: node + linkType: hard + +"@esbuild/openbsd-arm64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/openbsd-arm64@npm:0.25.0" + conditions: os=openbsd & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/openbsd-x64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/openbsd-x64@npm:0.17.5" @@ -631,6 +771,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/openbsd-x64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/openbsd-x64@npm:0.25.0" + conditions: os=openbsd & cpu=x64 + languageName: node + linkType: hard + "@esbuild/sunos-x64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/sunos-x64@npm:0.17.5" @@ -645,6 +792,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/sunos-x64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/sunos-x64@npm:0.25.0" + conditions: os=sunos & cpu=x64 + languageName: node + linkType: hard + "@esbuild/win32-arm64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/win32-arm64@npm:0.17.5" @@ -659,6 +813,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-arm64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/win32-arm64@npm:0.25.0" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + "@esbuild/win32-ia32@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/win32-ia32@npm:0.17.5" @@ -673,6 +834,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-ia32@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/win32-ia32@npm:0.25.0" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + "@esbuild/win32-x64@npm:0.17.5": version: 0.17.5 resolution: "@esbuild/win32-x64@npm:0.17.5" @@ -687,6 +855,13 @@ __metadata: languageName: node linkType: hard +"@esbuild/win32-x64@npm:0.25.0": + version: 0.25.0 + resolution: "@esbuild/win32-x64@npm:0.25.0" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + "@eslint/eslintrc@npm:^1.4.1": version: 1.4.1 resolution: "@eslint/eslintrc@npm:1.4.1" @@ -2173,6 +2348,24 @@ __metadata: languageName: node linkType: hard +"concurrently@npm:^9.1.2": + version: 9.1.2 + resolution: "concurrently@npm:9.1.2" + dependencies: + chalk: ^4.1.2 + lodash: ^4.17.21 + rxjs: ^7.8.1 + shell-quote: ^1.8.1 + supports-color: ^8.1.1 + tree-kill: ^1.2.2 + yargs: ^17.7.2 + bin: + conc: dist/bin/concurrently.js + concurrently: dist/bin/concurrently.js + checksum: 9e25e8ee6272ada26739aff1fb43e96ac458fafca82f45b8360bdd9115d60bbc679d282dfc52001b861b6e9f32b3063aed975691d8dec9e62807a9679763a1d8 + languageName: node + linkType: hard + "console-control-strings@npm:^1.1.0": version: 1.1.0 resolution: "console-control-strings@npm:1.1.0" @@ -2247,6 +2440,7 @@ __metadata: "@changesets/cli": ^2.26.0 "@flex-development/toggle-pkg-type": ^1.0.1 "@vitest/coverage-v8": ^2.1.1 + concurrently: ^9.1.2 danger: ^11.2.3 duti: ^0.15.2 esbuild: ^0.17.5 @@ -2256,6 +2450,8 @@ __metadata: glob: ^8.1.0 minimist: ^1.2.7 prettier: ^2.8.3 + tsx: ^4.19.3 + typescript: ^5.7.3 vitest: ^2.1.1 languageName: unknown linkType: soft @@ -2967,6 +3163,92 @@ __metadata: languageName: node linkType: hard +"esbuild@npm:~0.25.0": + version: 0.25.0 + resolution: "esbuild@npm:0.25.0" + dependencies: + "@esbuild/aix-ppc64": 0.25.0 + "@esbuild/android-arm": 0.25.0 + "@esbuild/android-arm64": 0.25.0 + "@esbuild/android-x64": 0.25.0 + "@esbuild/darwin-arm64": 0.25.0 + "@esbuild/darwin-x64": 0.25.0 + "@esbuild/freebsd-arm64": 0.25.0 + "@esbuild/freebsd-x64": 0.25.0 + "@esbuild/linux-arm": 0.25.0 + "@esbuild/linux-arm64": 0.25.0 + "@esbuild/linux-ia32": 0.25.0 + "@esbuild/linux-loong64": 0.25.0 + "@esbuild/linux-mips64el": 0.25.0 + "@esbuild/linux-ppc64": 0.25.0 + "@esbuild/linux-riscv64": 0.25.0 + "@esbuild/linux-s390x": 0.25.0 + "@esbuild/linux-x64": 0.25.0 + "@esbuild/netbsd-arm64": 0.25.0 + "@esbuild/netbsd-x64": 0.25.0 + "@esbuild/openbsd-arm64": 0.25.0 + "@esbuild/openbsd-x64": 0.25.0 + "@esbuild/sunos-x64": 0.25.0 + "@esbuild/win32-arm64": 0.25.0 + "@esbuild/win32-ia32": 0.25.0 + "@esbuild/win32-x64": 0.25.0 + dependenciesMeta: + "@esbuild/aix-ppc64": + optional: true + "@esbuild/android-arm": + optional: true + "@esbuild/android-arm64": + optional: true + "@esbuild/android-x64": + optional: true + "@esbuild/darwin-arm64": + optional: true + "@esbuild/darwin-x64": + optional: true + "@esbuild/freebsd-arm64": + optional: true + "@esbuild/freebsd-x64": + optional: true + "@esbuild/linux-arm": + optional: true + "@esbuild/linux-arm64": + optional: true + "@esbuild/linux-ia32": + optional: true + "@esbuild/linux-loong64": + optional: true + "@esbuild/linux-mips64el": + optional: true + "@esbuild/linux-ppc64": + optional: true + "@esbuild/linux-riscv64": + optional: true + "@esbuild/linux-s390x": + optional: true + "@esbuild/linux-x64": + optional: true + "@esbuild/netbsd-arm64": + optional: true + "@esbuild/netbsd-x64": + optional: true + "@esbuild/openbsd-arm64": + optional: true + "@esbuild/openbsd-x64": + optional: true + "@esbuild/sunos-x64": + optional: true + "@esbuild/win32-arm64": + optional: true + "@esbuild/win32-ia32": + optional: true + "@esbuild/win32-x64": + optional: true + bin: + esbuild: bin/esbuild + checksum: 4d1e0cb7c059a373ea3edb20ca5efcea29efada03e4ea82b2b8ab1f2f062e4791e9744213308775d26e07a0225a7d8250da93da5c8e07ef61bb93d58caab8cf9 + languageName: node + linkType: hard + "escalade@npm:^3.1.1": version: 3.1.1 resolution: "escalade@npm:3.1.1" @@ -3665,6 +3947,15 @@ __metadata: languageName: node linkType: hard +"get-tsconfig@npm:^4.7.5": + version: 4.10.0 + resolution: "get-tsconfig@npm:4.10.0" + dependencies: + resolve-pkg-maps: ^1.0.0 + checksum: cebf14d38ecaa9a1af25fc3f56317402a4457e7e20f30f52a0ab98b4c85962a259f75065e483824f73a1ce4a8e4926c149ead60f0619842b8cd13b94e15fbdec + languageName: node + linkType: hard + "git-config-path@npm:^1.0.1": version: 1.0.1 resolution: "git-config-path@npm:1.0.1" @@ -6253,6 +6544,13 @@ __metadata: languageName: node linkType: hard +"resolve-pkg-maps@npm:^1.0.0": + version: 1.0.0 + resolution: "resolve-pkg-maps@npm:1.0.0" + checksum: 1012afc566b3fdb190a6309cc37ef3b2dcc35dff5fa6683a9d00cd25c3247edfbc4691b91078c97adc82a29b77a2660c30d791d65dab4fc78bfc473f60289977 + languageName: node + linkType: hard + "resolve@npm:^1.10.0, resolve@npm:^1.22.1": version: 1.22.1 resolution: "resolve@npm:1.22.1" @@ -6385,6 +6683,15 @@ __metadata: languageName: node linkType: hard +"rxjs@npm:^7.8.1": + version: 7.8.2 + resolution: "rxjs@npm:7.8.2" + dependencies: + tslib: ^2.1.0 + checksum: 2f233d7c832a6c255dabe0759014d7d9b1c9f1cb2f2f0d59690fd11c883c9826ea35a51740c06ab45b6ade0d9087bde9192f165cba20b6730d344b831ef80744 + languageName: node + linkType: hard + "safe-buffer@npm:^5.0.1, safe-buffer@npm:~5.2.0": version: 5.2.1 resolution: "safe-buffer@npm:5.2.1" @@ -6510,6 +6817,13 @@ __metadata: languageName: node linkType: hard +"shell-quote@npm:^1.8.1": + version: 1.8.2 + resolution: "shell-quote@npm:1.8.2" + checksum: 1e97b62ced1c4c5135015978ebf273bed1f425a68cf84163e83fbb0f34b3ff9471e656720dab2b7cbb4ae0f58998e686d17d166c28dfb3662acd009e8bd7faed + languageName: node + linkType: hard + "side-channel@npm:^1.0.4": version: 1.0.4 resolution: "side-channel@npm:1.0.4" @@ -6860,6 +7174,15 @@ __metadata: languageName: node linkType: hard +"supports-color@npm:^8.1.1": + version: 8.1.1 + resolution: "supports-color@npm:8.1.1" + dependencies: + has-flag: ^4.0.0 + checksum: c052193a7e43c6cdc741eb7f378df605636e01ad434badf7324f17fb60c69a880d8d8fcdcb562cf94c2350e57b937d7425ab5b8326c67c2adc48f7c87c1db406 + languageName: node + linkType: hard + "supports-hyperlinks@npm:^1.0.1": version: 1.0.1 resolution: "supports-hyperlinks@npm:1.0.1" @@ -7030,6 +7353,15 @@ __metadata: languageName: node linkType: hard +"tree-kill@npm:^1.2.2": + version: 1.2.2 + resolution: "tree-kill@npm:1.2.2" + bin: + tree-kill: cli.js + checksum: 49117f5f410d19c84b0464d29afb9642c863bc5ba40fcb9a245d474c6d5cc64d1b177a6e6713129eb346b40aebb9d4631d967517f9fbe8251c35b21b13cd96c7 + languageName: node + linkType: hard + "trim-newlines@npm:^3.0.0": version: 3.0.1 resolution: "trim-newlines@npm:3.0.1" @@ -7056,6 +7388,13 @@ __metadata: languageName: node linkType: hard +"tslib@npm:^2.1.0": + version: 2.8.1 + resolution: "tslib@npm:2.8.1" + checksum: e4aba30e632b8c8902b47587fd13345e2827fa639e7c3121074d5ee0880723282411a8838f830b55100cbe4517672f84a2472667d355b81e8af165a55dc6203a + languageName: node + linkType: hard + "tslib@npm:^2.4.0, tslib@npm:^2.5.0": version: 2.5.0 resolution: "tslib@npm:2.5.0" @@ -7070,6 +7409,22 @@ __metadata: languageName: node linkType: hard +"tsx@npm:^4.19.3": + version: 4.19.3 + resolution: "tsx@npm:4.19.3" + dependencies: + esbuild: ~0.25.0 + fsevents: ~2.3.3 + get-tsconfig: ^4.7.5 + dependenciesMeta: + fsevents: + optional: true + bin: + tsx: dist/cli.mjs + checksum: 51bd7fb7c234f32bc866208f8ec0eef0208bfb998ba58d68f4ccb6cec49fd34deeee895c16d8ff15c870beda905ca9e4844e6729e22b47e6943f80fe9322f0b8 + languageName: node + linkType: hard + "tty-table@npm:^4.1.5": version: 4.1.6 resolution: "tty-table@npm:4.1.6" @@ -7135,6 +7490,26 @@ __metadata: languageName: node linkType: hard +"typescript@npm:^5.7.3": + version: 5.7.3 + resolution: "typescript@npm:5.7.3" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 6c38b1e989918e576f0307e6ee013522ea480dfce5f3ca85c9b2d8adb1edeffd37f4f30cd68de0c38a44563d12ba922bdb7e36aa2dac9c51de5d561e6e9a2e9c + languageName: node + linkType: hard + +"typescript@patch:typescript@^5.7.3#~builtin": + version: 5.7.3 + resolution: "typescript@patch:typescript@npm%3A5.7.3#~builtin::version=5.7.3&hash=ad5954" + bin: + tsc: bin/tsc + tsserver: bin/tsserver + checksum: 633cd749d6cd7bc842c6b6245847173bba99742a60776fae3c0fbcc0d1733cd51a733995e5f4dadd8afb0e64e57d3c7dbbeae953a072ee303940eca69e22f311 + languageName: node + linkType: hard + "unbox-primitive@npm:^1.0.2": version: 1.0.2 resolution: "unbox-primitive@npm:1.0.2" @@ -7610,6 +7985,21 @@ __metadata: languageName: node linkType: hard +"yargs@npm:^17.7.2": + version: 17.7.2 + resolution: "yargs@npm:17.7.2" + dependencies: + cliui: ^8.0.1 + escalade: ^3.1.1 + get-caller-file: ^2.0.5 + require-directory: ^2.1.1 + string-width: ^4.2.3 + y18n: ^5.0.5 + yargs-parser: ^21.1.1 + checksum: 73b572e863aa4a8cbef323dd911d79d193b772defd5a51aab0aca2d446655216f5002c42c5306033968193bdbf892a7a4c110b0d77954a7fdf563e653967b56a + languageName: node + linkType: hard + "yauzl@npm:^2.10.0": version: 2.10.0 resolution: "yauzl@npm:2.10.0" From f33841ed6d85c546e1854e578fefc172feae4521 Mon Sep 17 00:00:00 2001 From: Pranita Jain B Date: Fri, 28 Feb 2025 18:57:19 +0530 Subject: [PATCH 06/11] build command fixed, dist folder created --- package.json | 5 +++-- packages/client/tsconfig.json | 17 ++--------------- packages/export/tsconfig.json | 8 +------- packages/provider-elasticsearch/tsconfig.json | 8 +------- packages/provider-mongo/tsconfig.json | 8 +------- packages/server/tsconfig.json | 8 +------- packages/util/tsconfig.json | 8 +------- 7 files changed, 10 insertions(+), 52 deletions(-) diff --git a/package.json b/package.json index 64215f934..93a82b3e5 100644 --- a/package.json +++ b/package.json @@ -7,9 +7,10 @@ ], "scripts": { "foreach": "yarn workspaces foreach --no-private --parallel --verbose", - "build": "yarn build:tsc --build --verbose", + "build:tsc": "tsc --build --verbose", + "build": "yarn run build:tsc", "build:watch": "concurrently --raw --kill-others 'tsc --build --verbose --watch --inlineSourceMap'", - "build:clean": "tsc --build --clean && yarn foreach clean", + "build:clean": "tsc --build --clean && yarn workspaces foreach exec rm -rf dist", "version": "yarn changeset version && yarn install --mode=update-lockfile", "publish": "yarn foreach npm publish --tolerate-republish", "postinstall": "yarn foreach run prepack", diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index 57f84004a..bba2a4463 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -12,15 +12,9 @@ //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. - //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all - "noEmit": true, + "outDir": "dist", // Output directory for compiled files - //Allow Importing TypeScript Extensions, for future support - "allowImportingTsExtensions": true, - - //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'client' + //same as what we do in Spark , a node_modules folder at root level , with in that a subfolder named 'client' "tsBuildInfoFile": "../../node_modules/.buildinfo/client", //Allows TypeScript to compile JavaScript files @@ -41,13 +35,6 @@ //Ensures function parameters are used.// Error: 'name' is unused. "noUnusedParameters": true, - //strict it self holds 6 different type of checks - //strictNullChecks-Error: Type 'null' is not assignable to 'string' - //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type - //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' - //strictBindCallApply- - //strictPropertyInitialization- - //noImplicitThis- "strict": true, "isolatedModules": true diff --git a/packages/export/tsconfig.json b/packages/export/tsconfig.json index 4aacc7b68..4488dd34e 100644 --- a/packages/export/tsconfig.json +++ b/packages/export/tsconfig.json @@ -12,13 +12,7 @@ //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. - //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all - "noEmit": true, - - //Allow Importing TypeScript Extensions, for future support - "allowImportingTsExtensions": true, + "outDir": "dist", // Output directory for compiled files //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'export' "tsBuildInfoFile": "../../node_modules/.buildinfo/export", diff --git a/packages/provider-elasticsearch/tsconfig.json b/packages/provider-elasticsearch/tsconfig.json index aa9b0db43..9db2cd5a4 100644 --- a/packages/provider-elasticsearch/tsconfig.json +++ b/packages/provider-elasticsearch/tsconfig.json @@ -12,13 +12,7 @@ //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. - //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all - "noEmit": true, - - //Allow Importing TypeScript Extensions, for future support - "allowImportingTsExtensions": true, + "outDir": "dist", // Output directory for compiled files //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'provider-elasticsearch' "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-elasticsearch", diff --git a/packages/provider-mongo/tsconfig.json b/packages/provider-mongo/tsconfig.json index e7b2e4088..eaf2860e8 100644 --- a/packages/provider-mongo/tsconfig.json +++ b/packages/provider-mongo/tsconfig.json @@ -12,13 +12,7 @@ //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. - //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all - "noEmit": true, - - //Allow Importing TypeScript Extensions, for future support - "allowImportingTsExtensions": true, + "outDir": "dist", // Output directory for compiled files //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'provider-mongo' "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-mongo", diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index a69cfb8fa..42197b884 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -12,13 +12,7 @@ //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. - //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all - "noEmit": true, - - //Allow Importing TypeScript Extensions, for future support - "allowImportingTsExtensions": true, + "outDir": "dist", // Output directory for compiled files //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'server' "tsBuildInfoFile": "../../node_modules/.buildinfo/server", diff --git a/packages/util/tsconfig.json b/packages/util/tsconfig.json index 1e990b4fb..a67c72489 100644 --- a/packages/util/tsconfig.json +++ b/packages/util/tsconfig.json @@ -12,13 +12,7 @@ //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], - //In Spark we are creating dist in 2 folders named 'common' and 'common-node' , - //and those dist files are further consumed by other packages like web etc. - //Do we need to create dist folder for web? "noEmit": true will not create dist folder at all - "noEmit": true, - - //Allow Importing TypeScript Extensions, for future support - "allowImportingTsExtensions": true, + "outDir": "dist", // Output directory for compiled files //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'util' "tsBuildInfoFile": "../../node_modules/.buildinfo/util", From f1d9414f4dffd155b7ddc022ceb63d20cff787d0 Mon Sep 17 00:00:00 2001 From: Pranita Jain B Date: Fri, 28 Feb 2025 22:45:24 +0530 Subject: [PATCH 07/11] provider-mongo package updated --- packages/provider-mongo/package.json | 2 +- yarn.lock | 229 ++++++++++++++------------- 2 files changed, 123 insertions(+), 108 deletions(-) diff --git a/packages/provider-mongo/package.json b/packages/provider-mongo/package.json index e8f6a2a18..284980cfa 100644 --- a/packages/provider-mongo/package.json +++ b/packages/provider-mongo/package.json @@ -48,6 +48,6 @@ }, "devDependencies": { "contexture": "^0.12.23", - "mongodb-memory-server": "^9.1.1" + "mongodb-memory-server": "^10.1.4" } } diff --git a/yarn.lock b/yarn.lock index ec76887d9..d3a556f14 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1052,12 +1052,12 @@ __metadata: languageName: node linkType: hard -"@mongodb-js/saslprep@npm:^1.1.0": - version: 1.1.1 - resolution: "@mongodb-js/saslprep@npm:1.1.1" +"@mongodb-js/saslprep@npm:^1.1.9": + version: 1.2.0 + resolution: "@mongodb-js/saslprep@npm:1.2.0" dependencies: sparse-bitfield: ^3.0.3 - checksum: 0b263aef5e42a2b296c205a4afcc06c3e59817427dfdf4b5d6f49c4e5c000aa90f652006b95f726e0eac7e888031a82393a964e390d5689a2de61e945f8238d3 + checksum: a2df7bf5fde7c0a46fb0022208720ec8235dfaad0ed078200af16d123b8fa63c03083a7e086045d2d7e9ce7a5602e7766064c415c21406e9f176767802fae715 languageName: node linkType: hard @@ -1497,13 +1497,12 @@ __metadata: languageName: node linkType: hard -"@types/whatwg-url@npm:^8.2.1": - version: 8.2.2 - resolution: "@types/whatwg-url@npm:8.2.2" +"@types/whatwg-url@npm:^11.0.2": + version: 11.0.5 + resolution: "@types/whatwg-url@npm:11.0.5" dependencies: - "@types/node": "*" "@types/webidl-conversions": "*" - checksum: 5dc5afe078dfa1a8a266745586fa3db9baa8ce7cc904789211d1dca1d34d7f3dd17d0b7423c36bc9beab9d98aa99338f1fc60798c0af6cbb8356f20e20d9f243 + checksum: 23a0c45aff51817807b473a6adb181d6e3bb0d27dde54e84883d5d5bc93358e95204d2188e7ff7fdc2cdaf157e97e1188ef0a22ec79228da300fc30d4a05b56a languageName: node linkType: hard @@ -1658,12 +1657,10 @@ __metadata: languageName: node linkType: hard -"agent-base@npm:^7.0.2": - version: 7.1.0 - resolution: "agent-base@npm:7.1.0" - dependencies: - debug: ^4.3.4 - checksum: f7828f991470a0cc22cb579c86a18cbae83d8a3cbed39992ab34fc7217c4d126017f1c74d0ab66be87f71455318a8ea3e757d6a37881b8d0f2a2c6aa55e5418f +"agent-base@npm:^7.1.2": + version: 7.1.3 + resolution: "agent-base@npm:7.1.3" + checksum: 87bb7ee54f5ecf0ccbfcba0b07473885c43ecd76cb29a8db17d6137a19d9f9cd443a2a7c5fd8a3f24d58ad8145f9eb49116344a66b107e1aeab82cf2383f4753 languageName: node linkType: hard @@ -1874,12 +1871,12 @@ __metadata: languageName: node linkType: hard -"async-mutex@npm:^0.4.0": - version: 0.4.0 - resolution: "async-mutex@npm:0.4.0" +"async-mutex@npm:^0.5.0": + version: 0.5.0 + resolution: "async-mutex@npm:0.5.0" dependencies: tslib: ^2.4.0 - checksum: 813a71728b35a4fbfd64dba719f04726d9133c67b577fcd951b7028c4a675a13ee34e69beb82d621f87bf81f5d4f135c4c44be0448550c7db728547244ef71fc + checksum: be1587f4875f3bb15e34e9fcce82eac2966daef4432c8d0046e61947fb9a1b95405284601bc7ce4869319249bc07c75100880191db6af11d1498931ac2a2f9ea languageName: node linkType: hard @@ -2015,10 +2012,10 @@ __metadata: languageName: node linkType: hard -"bson@npm:^5.5.0": - version: 5.5.1 - resolution: "bson@npm:5.5.1" - checksum: f49730504e8362e2c8d1eb0c272e5e125392c41fb7196fc35ccbc39718ee62569a1d197bd2342c3334cd420073d3fd5dc7dea764a7f219dcd79e0ce473dd2772 +"bson@npm:^6.10.3": + version: 6.10.3 + resolution: "bson@npm:6.10.3" + checksum: 156807dc7a36954273cbe364783bffaaa8b89f193241d388250314f4d60b24f719d9c9fcb2d7fcbfb28f8330811617c5fd5e0b00c459867f16df6e8efe29d850 languageName: node linkType: hard @@ -2427,7 +2424,7 @@ __metadata: lodash: ^4.17.4 moment: ^2.18.1 moment-timezone: ^0.5.28 - mongodb-memory-server: ^9.1.1 + mongodb-memory-server: ^10.1.4 peerDependencies: mongodb: ">=4.0.0" languageName: unknown @@ -2683,6 +2680,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.3.7": + version: 4.4.0 + resolution: "debug@npm:4.4.0" + dependencies: + ms: ^2.1.3 + peerDependenciesMeta: + supports-color: + optional: true + checksum: fb42df878dd0e22816fc56e1fdca9da73caa85212fbe40c868b1295a6878f9101ae684f4eeef516c13acfc700f5ea07f1136954f43d4cd2d477a811144136479 + languageName: node + linkType: hard + "decamelize-keys@npm:^1.1.0": version: 1.1.1 resolution: "decamelize-keys@npm:1.1.1" @@ -3596,15 +3605,6 @@ __metadata: languageName: node linkType: hard -"fd-slicer@npm:~1.1.0": - version: 1.1.0 - resolution: "fd-slicer@npm:1.1.0" - dependencies: - pend: ~1.2.0 - checksum: c8585fd5713f4476eb8261150900d2cb7f6ff2d87f8feb306ccc8a1122efd152f1783bdb2b8dc891395744583436bfd8081d8e63ece0ec8687eeefea394d4ff2 - languageName: node - linkType: hard - "file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" @@ -3704,13 +3704,13 @@ __metadata: languageName: node linkType: hard -"follow-redirects@npm:^1.15.3": - version: 1.15.3 - resolution: "follow-redirects@npm:1.15.3" +"follow-redirects@npm:^1.15.9": + version: 1.15.9 + resolution: "follow-redirects@npm:1.15.9" peerDependenciesMeta: debug: optional: true - checksum: 584da22ec5420c837bd096559ebfb8fe69d82512d5585004e36a3b4a6ef6d5905780e0c74508c7b72f907d1fa2b7bd339e613859e9c304d0dc96af2027fd0231 + checksum: 859e2bacc7a54506f2bf9aacb10d165df78c8c1b0ceb8023f966621b233717dab56e8d08baadc3ad3b9db58af290413d585c999694b7c146aaf2616340c3d2a6 languageName: node linkType: hard @@ -4295,13 +4295,13 @@ __metadata: languageName: node linkType: hard -"https-proxy-agent@npm:^7.0.2": - version: 7.0.2 - resolution: "https-proxy-agent@npm:7.0.2" +"https-proxy-agent@npm:^7.0.5": + version: 7.0.6 + resolution: "https-proxy-agent@npm:7.0.6" dependencies: - agent-base: ^7.0.2 + agent-base: ^7.1.2 debug: 4 - checksum: 088969a0dd476ea7a0ed0a2cf1283013682b08f874c3bc6696c83fa061d2c157d29ef0ad3eb70a2046010bb7665573b2388d10fdcb3e410a66995e5248444292 + checksum: b882377a120aa0544846172e5db021fa8afbf83fea2a897d397bd2ddd8095ab268c24bc462f40a15f2a8c600bf4aa05ce52927f70038d4014e68aefecfa94e8d languageName: node linkType: hard @@ -5559,75 +5559,77 @@ __metadata: languageName: node linkType: hard -"mongodb-connection-string-url@npm:^2.6.0": - version: 2.6.0 - resolution: "mongodb-connection-string-url@npm:2.6.0" +"mongodb-connection-string-url@npm:^3.0.0": + version: 3.0.2 + resolution: "mongodb-connection-string-url@npm:3.0.2" dependencies: - "@types/whatwg-url": ^8.2.1 - whatwg-url: ^11.0.0 - checksum: 1d662f0ecfe96f7a400f625c244b2e52914c98f3562ee7d19941127578b5f8237624433bdcea285a654041b945b518803512989690c74548aec5860c5541c605 + "@types/whatwg-url": ^11.0.2 + whatwg-url: ^14.1.0 || ^13.0.0 + checksum: 382319aa41d381ff4be9370024e3cf765ded14aa581bca7c7a171fcaae618b8d92912329b6b13898334c3b6f3cab12ae8785defad2745ca20226ceeb253ef1ae languageName: node linkType: hard -"mongodb-memory-server-core@npm:9.1.1": - version: 9.1.1 - resolution: "mongodb-memory-server-core@npm:9.1.1" +"mongodb-memory-server-core@npm:10.1.4": + version: 10.1.4 + resolution: "mongodb-memory-server-core@npm:10.1.4" dependencies: - async-mutex: ^0.4.0 + async-mutex: ^0.5.0 camelcase: ^6.3.0 - debug: ^4.3.4 + debug: ^4.3.7 find-cache-dir: ^3.3.2 - follow-redirects: ^1.15.3 - https-proxy-agent: ^7.0.2 - mongodb: ^5.9.1 + follow-redirects: ^1.15.9 + https-proxy-agent: ^7.0.5 + mongodb: ^6.9.0 new-find-package-json: ^2.0.0 - semver: ^7.5.4 - tar-stream: ^3.0.0 - tslib: ^2.6.2 - yauzl: ^2.10.0 - checksum: f2404177ac6e454e2fb91636515c1fb74f32da0e8508cd21af1b13203f2b18367e34b245307f9e4e5fccaa0e59e8495466d58ed69e991c005c9497f53733363d + semver: ^7.6.3 + tar-stream: ^3.1.7 + tslib: ^2.7.0 + yauzl: ^3.1.3 + checksum: a02fc2678ce23dcebe29bd804557a7ce3e62c4a55415a12f6eebff6038ab5a1db241b4dcb25dacee12961d3eae7da212224eca51dae25360d4a4ff421a966dfc languageName: node linkType: hard -"mongodb-memory-server@npm:^9.1.1": - version: 9.1.1 - resolution: "mongodb-memory-server@npm:9.1.1" +"mongodb-memory-server@npm:^10.1.4": + version: 10.1.4 + resolution: "mongodb-memory-server@npm:10.1.4" dependencies: - mongodb-memory-server-core: 9.1.1 - tslib: ^2.6.2 - checksum: 1c2da27b543ce239e22a3ffd93ca828b67524befa350a621b7f0349cd15200d9ee90633541ef172d1e8e01f1fd69709162d7be12b1bb269eae1a3bdb9d862837 + mongodb-memory-server-core: 10.1.4 + tslib: ^2.7.0 + checksum: 8c9160f62dc403c2b9624289d9b67538fe97487f9020510594564c86a0a99af32b329f998ac0bf48dab07f2c55d3621a828d57bffd17224e98f18c57d9131d0c languageName: node linkType: hard -"mongodb@npm:^5.9.1": - version: 5.9.1 - resolution: "mongodb@npm:5.9.1" +"mongodb@npm:^6.9.0": + version: 6.14.0 + resolution: "mongodb@npm:6.14.0" dependencies: - "@mongodb-js/saslprep": ^1.1.0 - bson: ^5.5.0 - mongodb-connection-string-url: ^2.6.0 - socks: ^2.7.1 + "@mongodb-js/saslprep": ^1.1.9 + bson: ^6.10.3 + mongodb-connection-string-url: ^3.0.0 peerDependencies: "@aws-sdk/credential-providers": ^3.188.0 - "@mongodb-js/zstd": ^1.0.0 - kerberos: ^1.0.0 || ^2.0.0 - mongodb-client-encryption: ">=2.3.0 <3" + "@mongodb-js/zstd": ^1.1.0 || ^2.0.0 + gcp-metadata: ^5.2.0 + kerberos: ^2.0.1 + mongodb-client-encryption: ">=6.0.0 <7" snappy: ^7.2.2 - dependenciesMeta: - "@mongodb-js/saslprep": - optional: true + socks: ^2.7.1 peerDependenciesMeta: "@aws-sdk/credential-providers": optional: true "@mongodb-js/zstd": optional: true + gcp-metadata: + optional: true kerberos: optional: true mongodb-client-encryption: optional: true snappy: optional: true - checksum: a827937120cd7eecafc0ad5657b40536774f0b09582a9363db0a192149ba20eae80a33fccf573f5ce69a20aca6759c40b4961d9d1d4de2a350c543030055e0f6 + socks: + optional: true + checksum: d98acbbf6c0cef1767846a1841733444188ba1870b01825552bfea21ee93c7e23e5a9af0f960edd028badd758588c2c85591670d5b75c320615bc5c0b7e16273 languageName: node linkType: hard @@ -6302,7 +6304,7 @@ __metadata: languageName: node linkType: hard -"punycode@npm:^2.1.1": +"punycode@npm:^2.3.1": version: 2.3.1 resolution: "punycode@npm:2.3.1" checksum: bb0a0ceedca4c3c57a9b981b90601579058903c62be23c5e8e843d2c2d4148a3ecf029d5133486fb0e1822b098ba8bba09e89d6b21742d02fa26bda6441a6fb2 @@ -6760,7 +6762,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.5.3, semver@npm:^7.5.4": +"semver@npm:^7.5.3": version: 7.5.4 resolution: "semver@npm:7.5.4" dependencies: @@ -6771,6 +6773,15 @@ __metadata: languageName: node linkType: hard +"semver@npm:^7.6.3": + version: 7.7.1 + resolution: "semver@npm:7.7.1" + bin: + semver: bin/semver.js + checksum: 586b825d36874007c9382d9e1ad8f93888d8670040add24a28e06a910aeebd673a2eb9e3bf169c6679d9245e66efb9057e0852e70d9daa6c27372aab1dda7104 + languageName: node + linkType: hard + "set-blocking@npm:^2.0.0": version: 2.0.0 resolution: "set-blocking@npm:2.0.0" @@ -6904,7 +6915,7 @@ __metadata: languageName: node linkType: hard -"socks@npm:^2.6.2, socks@npm:^2.7.1": +"socks@npm:^2.6.2": version: 2.7.1 resolution: "socks@npm:2.7.1" dependencies: @@ -7228,6 +7239,17 @@ __metadata: languageName: node linkType: hard +"tar-stream@npm:^3.1.7": + version: 3.1.7 + resolution: "tar-stream@npm:3.1.7" + dependencies: + b4a: ^1.6.4 + fast-fifo: ^1.2.0 + streamx: ^2.15.0 + checksum: 6393a6c19082b17b8dcc8e7fd349352bb29b4b8bfe1075912b91b01743ba6bb4298f5ff0b499a3bbaf82121830e96a1a59d4f21a43c0df339e54b01789cb8cc6 + languageName: node + linkType: hard + "tar@npm:^6.1.11, tar@npm:^6.1.2": version: 6.1.13 resolution: "tar@npm:6.1.13" @@ -7337,12 +7359,12 @@ __metadata: languageName: node linkType: hard -"tr46@npm:^3.0.0": - version: 3.0.0 - resolution: "tr46@npm:3.0.0" +"tr46@npm:^5.0.0": + version: 5.0.0 + resolution: "tr46@npm:5.0.0" dependencies: - punycode: ^2.1.1 - checksum: 44c3cc6767fb800490e6e9fd64fd49041aa4e49e1f6a012b34a75de739cc9ed3a6405296072c1df8b6389ae139c5e7c6496f659cfe13a04a4bff3a1422981270 + punycode: ^2.3.1 + checksum: 8d8b021f8e17675ebf9e672c224b6b6cfdb0d5b92141349e9665c14a2501c54a298d11264bbb0b17b447581e1e83d4fc3c038c929f3d210e3964d4be47460288 languageName: node linkType: hard @@ -7388,7 +7410,7 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.1.0": +"tslib@npm:^2.1.0, tslib@npm:^2.7.0": version: 2.8.1 resolution: "tslib@npm:2.8.1" checksum: e4aba30e632b8c8902b47587fd13345e2827fa639e7c3121074d5ee0880723282411a8838f830b55100cbe4517672f84a2472667d355b81e8af165a55dc6203a @@ -7402,13 +7424,6 @@ __metadata: languageName: node linkType: hard -"tslib@npm:^2.6.2": - version: 2.6.2 - resolution: "tslib@npm:2.6.2" - checksum: 329ea56123005922f39642318e3d1f0f8265d1e7fcb92c633e0809521da75eeaca28d2cf96d7248229deb40e5c19adf408259f4b9640afd20d13aecc1430f3ad - languageName: node - linkType: hard - "tsx@npm:^4.19.3": version: 4.19.3 resolution: "tsx@npm:4.19.3" @@ -7726,13 +7741,13 @@ __metadata: languageName: node linkType: hard -"whatwg-url@npm:^11.0.0": - version: 11.0.0 - resolution: "whatwg-url@npm:11.0.0" +"whatwg-url@npm:^14.1.0 || ^13.0.0": + version: 14.1.1 + resolution: "whatwg-url@npm:14.1.1" dependencies: - tr46: ^3.0.0 + tr46: ^5.0.0 webidl-conversions: ^7.0.0 - checksum: ed4826aaa57e66bb3488a4b25c9cd476c46ba96052747388b5801f137dd740b73fde91ad207d96baf9f17fbcc80fc1a477ad65181b5eb5fa718d27c69501d7af + checksum: d44667005e35b545587b49371e0c75ddc6355407c07d9c6aaafc01d8ed3dfadf44393fa74c74cda3d8d5f41d3860acf408b4e81820c6de7cc5a17d9eb274349f languageName: node linkType: hard @@ -8000,13 +8015,13 @@ __metadata: languageName: node linkType: hard -"yauzl@npm:^2.10.0": - version: 2.10.0 - resolution: "yauzl@npm:2.10.0" +"yauzl@npm:^3.1.3": + version: 3.2.0 + resolution: "yauzl@npm:3.2.0" dependencies: buffer-crc32: ~0.2.3 - fd-slicer: ~1.1.0 - checksum: 7f21fe0bbad6e2cb130044a5d1d0d5a0e5bf3d8d4f8c4e6ee12163ce798fee3de7388d22a7a0907f563ac5f9d40f8699a223d3d5c1718da90b0156da6904022b + pend: ~1.2.0 + checksum: d16440447bbc4973cf60c455290d6a394c47b82d449193098b10c69a6cc8f3eb003e361a512d1885ca67c96c95351aadb46bfcc47ee2c73a5134743d99275554 languageName: node linkType: hard From b96692f89da1ea67bc79989c7acf54155f264797 Mon Sep 17 00:00:00 2001 From: Pranita Jain B Date: Tue, 4 Mar 2025 21:16:19 +0530 Subject: [PATCH 08/11] clean comments --- packages/client/tsconfig.json | 2 -- packages/export/tsconfig.json | 2 -- packages/provider-elasticsearch/tsconfig.json | 2 -- packages/provider-mongo/tsconfig.json | 2 -- packages/server/tsconfig.json | 2 -- packages/util/tsconfig.json | 2 -- 6 files changed, 12 deletions(-) diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index bba2a4463..3ff69b4b1 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -6,8 +6,6 @@ //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - //compilerOptions inherited from tsconfig.all.jsonc are overridden here. - // i have taken reference from spark/web compilerOptions.In that also we are overridding "compilerOptions": { //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], diff --git a/packages/export/tsconfig.json b/packages/export/tsconfig.json index 4488dd34e..b68d1424e 100644 --- a/packages/export/tsconfig.json +++ b/packages/export/tsconfig.json @@ -6,8 +6,6 @@ //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - //compilerOptions inherited from tsconfig.all.jsonc are overridden here. - // i have taken reference from spark/web compilerOptions.In that also we are overridding "compilerOptions": { //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], diff --git a/packages/provider-elasticsearch/tsconfig.json b/packages/provider-elasticsearch/tsconfig.json index 9db2cd5a4..2941efbec 100644 --- a/packages/provider-elasticsearch/tsconfig.json +++ b/packages/provider-elasticsearch/tsconfig.json @@ -6,8 +6,6 @@ //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - //compilerOptions inherited from tsconfig.all.jsonc are overridden here. - // i have taken reference from spark/web compilerOptions.In that also we are overridding "compilerOptions": { //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], diff --git a/packages/provider-mongo/tsconfig.json b/packages/provider-mongo/tsconfig.json index eaf2860e8..fc0eac49e 100644 --- a/packages/provider-mongo/tsconfig.json +++ b/packages/provider-mongo/tsconfig.json @@ -6,8 +6,6 @@ //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - //compilerOptions inherited from tsconfig.all.jsonc are overridden here. - // i have taken reference from spark/web compilerOptions.In that also we are overridding "compilerOptions": { //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index 42197b884..390ee4a96 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -6,8 +6,6 @@ //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - //compilerOptions inherited from tsconfig.all.jsonc are overridden here. - // i have taken reference from spark/web compilerOptions.In that also we are overridding "compilerOptions": { //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], diff --git a/packages/util/tsconfig.json b/packages/util/tsconfig.json index a67c72489..823af22f7 100644 --- a/packages/util/tsconfig.json +++ b/packages/util/tsconfig.json @@ -6,8 +6,6 @@ //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - //compilerOptions inherited from tsconfig.all.jsonc are overridden here. - // i have taken reference from spark/web compilerOptions.In that also we are overridding "compilerOptions": { //Provides Node.js global types and includes types for Vitest which is used by test files "types": ["node", "vitest"], From 733406a98573ea8cf71f63e12ba880654e261e04 Mon Sep 17 00:00:00 2001 From: Pranita Jain B Date: Tue, 4 Mar 2025 23:40:51 +0530 Subject: [PATCH 09/11] common options are written into root level --- packages/client/tsconfig.json | 35 +--------------- packages/export/tsconfig.json | 42 +------------------ packages/provider-elasticsearch/tsconfig.json | 40 ------------------ packages/provider-mongo/tsconfig.json | 40 ------------------ packages/server/tsconfig.json | 40 ------------------ packages/util/tsconfig.json | 40 ------------------ tsconfig.all.jsonc | 11 ++++- 7 files changed, 11 insertions(+), 237 deletions(-) diff --git a/packages/client/tsconfig.json b/packages/client/tsconfig.json index 3ff69b4b1..1c01edab2 100644 --- a/packages/client/tsconfig.json +++ b/packages/client/tsconfig.json @@ -1,40 +1,7 @@ { - //Inherits settings from ../tsconfig.all.jsonc which is at root level "extends": ["../../tsconfig.all.jsonc"], - - //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. - //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - "compilerOptions": { - //Provides Node.js global types and includes types for Vitest which is used by test files - "types": ["node", "vitest"], - - "outDir": "dist", // Output directory for compiled files - - //same as what we do in Spark , a node_modules folder at root level , with in that a subfolder named 'client' - "tsBuildInfoFile": "../../node_modules/.buildinfo/client", - - //Allows TypeScript to compile JavaScript files - "allowJs": true, - - //Disables type checking on .js files. - "checkJs": false, - - //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, - //then it will throw Error: Not all code paths return a value. - "noImplicitReturns": true, - - //Forces explicit undefined checks when accessing arrays or objects. - //for example let x = arr[0]; // Error: x might be undefined. - //to fix this let x: number[] | undefined or let x = arr[0] as number; - "noUncheckedIndexedAccess": true, - - //Ensures function parameters are used.// Error: 'name' is unused. - "noUnusedParameters": true, - - "strict": true, - - "isolatedModules": true + "tsBuildInfoFile": "../../node_modules/.buildinfo/client" } } diff --git a/packages/export/tsconfig.json b/packages/export/tsconfig.json index b68d1424e..cae77f4c8 100644 --- a/packages/export/tsconfig.json +++ b/packages/export/tsconfig.json @@ -1,47 +1,7 @@ { - //Inherits settings from ../tsconfig.all.jsonc which is at root level "extends": ["../../tsconfig.all.jsonc"], - - //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. - //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - "compilerOptions": { - //Provides Node.js global types and includes types for Vitest which is used by test files - "types": ["node", "vitest"], - - "outDir": "dist", // Output directory for compiled files - - //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'export' - "tsBuildInfoFile": "../../node_modules/.buildinfo/export", - - //Allows TypeScript to compile JavaScript files - "allowJs": true, - - //Disables type checking on .js files. - "checkJs": false, - - //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, - //then it will throw Error: Not all code paths return a value. - "noImplicitReturns": true, - - //Forces explicit undefined checks when accessing arrays or objects. - //for example let x = arr[0]; // Error: x might be undefined. - //to fix this let x: number[] | undefined or let x = arr[0] as number; - "noUncheckedIndexedAccess": true, - - //Ensures function parameters are used.// Error: 'name' is unused. - "noUnusedParameters": true, - - //strict it self holds 6 different type of checks - //strictNullChecks-Error: Type 'null' is not assignable to 'string' - //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type - //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' - //strictBindCallApply- - //strictPropertyInitialization- - //noImplicitThis- - "strict": true, - - "isolatedModules": true + "tsBuildInfoFile": "../../node_modules/.buildinfo/export" } } diff --git a/packages/provider-elasticsearch/tsconfig.json b/packages/provider-elasticsearch/tsconfig.json index 2941efbec..7838b70c1 100644 --- a/packages/provider-elasticsearch/tsconfig.json +++ b/packages/provider-elasticsearch/tsconfig.json @@ -1,47 +1,7 @@ { - //Inherits settings from ../tsconfig.all.jsonc which is at root level "extends": ["../../tsconfig.all.jsonc"], - - //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. - //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - "compilerOptions": { - //Provides Node.js global types and includes types for Vitest which is used by test files - "types": ["node", "vitest"], - - "outDir": "dist", // Output directory for compiled files - - //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'provider-elasticsearch' "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-elasticsearch", - - //Allows TypeScript to compile JavaScript files - "allowJs": true, - - //Disables type checking on .js files. - "checkJs": false, - - //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, - //then it will throw Error: Not all code paths return a value. - "noImplicitReturns": true, - - //Forces explicit undefined checks when accessing arrays or objects. - //for example let x = arr[0]; // Error: x might be undefined. - //to fix this let x: number[] | undefined or let x = arr[0] as number; - "noUncheckedIndexedAccess": true, - - //Ensures function parameters are used.// Error: 'name' is unused. - "noUnusedParameters": true, - - //strict it self holds 6 different type of checks - //strictNullChecks-Error: Type 'null' is not assignable to 'string' - //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type - //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' - //strictBindCallApply- - //strictPropertyInitialization- - //noImplicitThis- - "strict": true, - - "isolatedModules": true } } diff --git a/packages/provider-mongo/tsconfig.json b/packages/provider-mongo/tsconfig.json index fc0eac49e..f2f688ee6 100644 --- a/packages/provider-mongo/tsconfig.json +++ b/packages/provider-mongo/tsconfig.json @@ -1,47 +1,7 @@ { - //Inherits settings from ../tsconfig.all.jsonc which is at root level "extends": ["../../tsconfig.all.jsonc"], - - //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. - //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - "compilerOptions": { - //Provides Node.js global types and includes types for Vitest which is used by test files - "types": ["node", "vitest"], - - "outDir": "dist", // Output directory for compiled files - - //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'provider-mongo' "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-mongo", - - //Allows TypeScript to compile JavaScript files - "allowJs": true, - - //Disables type checking on .js files. - "checkJs": false, - - //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, - //then it will throw Error: Not all code paths return a value. - "noImplicitReturns": true, - - //Forces explicit undefined checks when accessing arrays or objects. - //for example let x = arr[0]; // Error: x might be undefined. - //to fix this let x: number[] | undefined or let x = arr[0] as number; - "noUncheckedIndexedAccess": true, - - //Ensures function parameters are used.// Error: 'name' is unused. - "noUnusedParameters": true, - - //strict it self holds 6 different type of checks - //strictNullChecks-Error: Type 'null' is not assignable to 'string' - //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type - //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' - //strictBindCallApply- - //strictPropertyInitialization- - //noImplicitThis- - "strict": true, - - "isolatedModules": true } } diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index 390ee4a96..d5cdc0b2e 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -1,47 +1,7 @@ { - //Inherits settings from ../tsconfig.all.jsonc which is at root level "extends": ["../../tsconfig.all.jsonc"], - - //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. - //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - "compilerOptions": { - //Provides Node.js global types and includes types for Vitest which is used by test files - "types": ["node", "vitest"], - - "outDir": "dist", // Output directory for compiled files - - //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'server' "tsBuildInfoFile": "../../node_modules/.buildinfo/server", - - //Allows TypeScript to compile JavaScript files - "allowJs": true, - - //Disables type checking on .js files. - "checkJs": false, - - //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, - //then it will throw Error: Not all code paths return a value. - "noImplicitReturns": true, - - //Forces explicit undefined checks when accessing arrays or objects. - //for example let x = arr[0]; // Error: x might be undefined. - //to fix this let x: number[] | undefined or let x = arr[0] as number; - "noUncheckedIndexedAccess": true, - - //Ensures function parameters are used.// Error: 'name' is unused. - "noUnusedParameters": true, - - //strict it self holds 6 different type of checks - //strictNullChecks-Error: Type 'null' is not assignable to 'string' - //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type - //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' - //strictBindCallApply- - //strictPropertyInitialization- - //noImplicitThis- - "strict": true, - - "isolatedModules": true } } diff --git a/packages/util/tsconfig.json b/packages/util/tsconfig.json index 823af22f7..ed7230d6f 100644 --- a/packages/util/tsconfig.json +++ b/packages/util/tsconfig.json @@ -1,47 +1,7 @@ { - //Inherits settings from ../tsconfig.all.jsonc which is at root level "extends": ["../../tsconfig.all.jsonc"], - - //Tells TypeScript to only compile files inside the src/ folder and its subdirectories. - //It includes .ts, .tsx, .js, and .jsx "include": ["src/**/*"], - "compilerOptions": { - //Provides Node.js global types and includes types for Vitest which is used by test files - "types": ["node", "vitest"], - - "outDir": "dist", // Output directory for compiled files - - //same as what we do in Spark , a node_modules folder at root level , with in a subfolder named 'util' "tsBuildInfoFile": "../../node_modules/.buildinfo/util", - - //Allows TypeScript to compile JavaScript files - "allowJs": true, - - //Disables type checking on .js files. - "checkJs": false, - - //Ensures that functions always return a value.for example there is whole code of function wrapped under IF statment, - //then it will throw Error: Not all code paths return a value. - "noImplicitReturns": true, - - //Forces explicit undefined checks when accessing arrays or objects. - //for example let x = arr[0]; // Error: x might be undefined. - //to fix this let x: number[] | undefined or let x = arr[0] as number; - "noUncheckedIndexedAccess": true, - - //Ensures function parameters are used.// Error: 'name' is unused. - "noUnusedParameters": true, - - //strict it self holds 6 different type of checks - //strictNullChecks-Error: Type 'null' is not assignable to 'string' - //noImplicitAny-Error: Parameter 'name' implicitly has an 'any' type - //strictFunctionTypes-Error: Type '(age: number) => void' is not assignable to type '(name: string) => void' - //strictBindCallApply- - //strictPropertyInitialization- - //noImplicitThis- - "strict": true, - - "isolatedModules": true } } diff --git a/tsconfig.all.jsonc b/tsconfig.all.jsonc index 7ea1cd530..8df077ac7 100644 --- a/tsconfig.all.jsonc +++ b/tsconfig.all.jsonc @@ -10,10 +10,17 @@ "module": "nodenext", // Uses the ES module system compatible with Node.js. "moduleResolution": "nodenext", // Resolves modules as per Node.js ESM standards. "resolveJsonModule": true, // Allows importing JSON files as modules. - "types": ["vite/client", "vitest/globals"], // Restricts the global scope to these type definitions. + "types": ["vite/client", "vitest/globals", "node", "vitest"], // Provides Node.js global types and includes Vitest types. "jsx": "react", // Specifies JSX transformation method for React applications. "noEmitOnError": true, // Prevents output generation if there are TypeScript errors. "incremental": true, // Enables incremental builds for better performance. - "skipLibCheck": true // Skips type checking of library declaration files to speed up compilation. + "skipLibCheck": true, // Skips type checking of library declaration files to speed up compilation. + "allowJs": true, // Allows TypeScript to compile JavaScript files. + "checkJs": false, // Disables type checking on .js files. + "noImplicitReturns": true, // Ensures all functions return a value (e.g., prevents missing return in `if` branches). + "noUncheckedIndexedAccess": true, // Forces explicit undefined checks when accessing arrays or objects. + "noUnusedParameters": true, // Ensures function parameters are used (reports unused ones). + "strict": true, // Enables all strict type-checking options (includes `strictNullChecks`, `noImplicitAny`, etc.). + "outDir": "dist" // Specifies the output directory for compiled files. } } From 575ceded62832a6712724b82a34704d1788954f3 Mon Sep 17 00:00:00 2001 From: Lint Action Date: Tue, 4 Mar 2025 18:11:43 +0000 Subject: [PATCH 10/11] Fix code style issues with Prettier --- packages/provider-elasticsearch/tsconfig.json | 2 +- packages/provider-mongo/tsconfig.json | 2 +- packages/server/tsconfig.json | 2 +- packages/util/tsconfig.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/provider-elasticsearch/tsconfig.json b/packages/provider-elasticsearch/tsconfig.json index 7838b70c1..5dfd76a55 100644 --- a/packages/provider-elasticsearch/tsconfig.json +++ b/packages/provider-elasticsearch/tsconfig.json @@ -2,6 +2,6 @@ "extends": ["../../tsconfig.all.jsonc"], "include": ["src/**/*"], "compilerOptions": { - "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-elasticsearch", + "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-elasticsearch" } } diff --git a/packages/provider-mongo/tsconfig.json b/packages/provider-mongo/tsconfig.json index f2f688ee6..6759d4d54 100644 --- a/packages/provider-mongo/tsconfig.json +++ b/packages/provider-mongo/tsconfig.json @@ -2,6 +2,6 @@ "extends": ["../../tsconfig.all.jsonc"], "include": ["src/**/*"], "compilerOptions": { - "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-mongo", + "tsBuildInfoFile": "../../node_modules/.buildinfo/provider-mongo" } } diff --git a/packages/server/tsconfig.json b/packages/server/tsconfig.json index d5cdc0b2e..7593be5db 100644 --- a/packages/server/tsconfig.json +++ b/packages/server/tsconfig.json @@ -2,6 +2,6 @@ "extends": ["../../tsconfig.all.jsonc"], "include": ["src/**/*"], "compilerOptions": { - "tsBuildInfoFile": "../../node_modules/.buildinfo/server", + "tsBuildInfoFile": "../../node_modules/.buildinfo/server" } } diff --git a/packages/util/tsconfig.json b/packages/util/tsconfig.json index ed7230d6f..f74dc5513 100644 --- a/packages/util/tsconfig.json +++ b/packages/util/tsconfig.json @@ -2,6 +2,6 @@ "extends": ["../../tsconfig.all.jsonc"], "include": ["src/**/*"], "compilerOptions": { - "tsBuildInfoFile": "../../node_modules/.buildinfo/util", + "tsBuildInfoFile": "../../node_modules/.buildinfo/util" } } From 9f8bf37f63c25792ff2cd58f613a96804d368a6a Mon Sep 17 00:00:00 2001 From: Pranita Jain B Date: Sat, 5 Apr 2025 15:19:07 +0530 Subject: [PATCH 11/11] concurrent and dist removed , some more ts settings removed --- package.json | 4 ++-- tsconfig.all.jsonc | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 93a82b3e5..6fea0180e 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "foreach": "yarn workspaces foreach --no-private --parallel --verbose", "build:tsc": "tsc --build --verbose", "build": "yarn run build:tsc", - "build:watch": "concurrently --raw --kill-others 'tsc --build --verbose --watch --inlineSourceMap'", - "build:clean": "tsc --build --clean && yarn workspaces foreach exec rm -rf dist", + "build:watch": "tsc --build --verbose --watch --inlineSourceMap", + "build:clean": "tsc --build --clean", "version": "yarn changeset version && yarn install --mode=update-lockfile", "publish": "yarn foreach npm publish --tolerate-republish", "postinstall": "yarn foreach run prepack", diff --git a/tsconfig.all.jsonc b/tsconfig.all.jsonc index 8df077ac7..df9664f1b 100644 --- a/tsconfig.all.jsonc +++ b/tsconfig.all.jsonc @@ -10,17 +10,13 @@ "module": "nodenext", // Uses the ES module system compatible with Node.js. "moduleResolution": "nodenext", // Resolves modules as per Node.js ESM standards. "resolveJsonModule": true, // Allows importing JSON files as modules. - "types": ["vite/client", "vitest/globals", "node", "vitest"], // Provides Node.js global types and includes Vitest types. + "types": ["vitest/globals"], // Provides Node.js global types and includes Vitest types. "jsx": "react", // Specifies JSX transformation method for React applications. "noEmitOnError": true, // Prevents output generation if there are TypeScript errors. "incremental": true, // Enables incremental builds for better performance. - "skipLibCheck": true, // Skips type checking of library declaration files to speed up compilation. - "allowJs": true, // Allows TypeScript to compile JavaScript files. - "checkJs": false, // Disables type checking on .js files. - "noImplicitReturns": true, // Ensures all functions return a value (e.g., prevents missing return in `if` branches). "noUncheckedIndexedAccess": true, // Forces explicit undefined checks when accessing arrays or objects. "noUnusedParameters": true, // Ensures function parameters are used (reports unused ones). "strict": true, // Enables all strict type-checking options (includes `strictNullChecks`, `noImplicitAny`, etc.). - "outDir": "dist" // Specifies the output directory for compiled files. + "noEmit": true // Specifies the output directory for compiled files. } }