-
Notifications
You must be signed in to change notification settings - Fork 1
[GS-5825]/provide support for typescript_Engineering Ticket #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
PranitaJainB
wants to merge
11
commits into
main
Choose a base branch
from
GS-5825/support-for-typescript
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
fc6b9dd
initial
PranitaJainB 47d0b05
Fix code style issues with Prettier
lint-action b7e8bfe
added config at root level also
PranitaJainB e04e708
Fix code style issues with Prettier
lint-action 17911b2
typescript tsx concurrently added into dev dependencies:
PranitaJainB f33841e
build command fixed, dist folder created
PranitaJainB f1d9414
provider-mongo package updated
PranitaJainB b96692f
clean comments
PranitaJainB 733406a
common options are written into root level
PranitaJainB 575cede
Fix code style issues with Prettier
lint-action 9f8bf37
concurrent and dist removed , some more ts settings removed
PranitaJainB File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,10 @@ | |
], | ||
"scripts": { | ||
"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", | ||
PranitaJainB marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"version": "yarn changeset version && yarn install --mode=update-lockfile", | ||
"publish": "yarn foreach npm publish --tolerate-republish", | ||
"postinstall": "yarn foreach run prepack", | ||
|
@@ -16,6 +20,7 @@ | |
"@changesets/cli": "^2.26.0", | ||
"@flex-development/toggle-pkg-type": "^1.0.1", | ||
"@vitest/coverage-v8": "^2.1.1", | ||
"concurrently": "^9.1.2", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blocker: This package is not being used so it can be removed. |
||
"danger": "^11.2.3", | ||
"duti": "^0.15.2", | ||
"esbuild": "^0.17.5", | ||
|
@@ -25,6 +30,8 @@ | |
"glob": "^8.1.0", | ||
"minimist": "^1.2.7", | ||
"prettier": "^2.8.3", | ||
"tsx": "^4.19.3", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blocker: This package is not being used so it can be removed. |
||
"typescript": "^5.7.3", | ||
"vitest": "^2.1.1" | ||
}, | ||
"packageManager": "[email protected]" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
{ | ||
stellarhoof marked this conversation as resolved.
Show resolved
Hide resolved
|
||
//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 | ||
PranitaJainB marked this conversation as resolved.
Show resolved
Hide resolved
|
||
"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 | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
//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"], | ||
|
||
"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 | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
//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"], | ||
|
||
"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 | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
//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"], | ||
|
||
"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 | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
//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"], | ||
|
||
"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 | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
//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"], | ||
|
||
"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 | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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" } | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.