-
-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bump to TypeScript 5.5 and enable
noImplicitAny
This commit upgrades TypeScript from 5.4 to 5.5 and enables the `noImplicitAny` option for stricter type checking. It refactors code to comply with `noImplicitAny` and adapts to new TypeScript features and limitations. Key changes: - Migrate from TypeScript 5.4 to 5.5 - Enable `noImplicitAny` for stricter type checking - Refactor code to comply with new TypeScript features and limitations Other supporting changes: - Refactor progress bar handling for type safety - Drop 'I' prefix from interfaces to align with new code convention - Update TypeScript target from `ES2017` and `ES2018`. This allows named capturing groups. Otherwise, new TypeScript compiler does not compile the project and shows the following error: ``` ... TimestampedFilenameGenerator.spec.ts:105:23 - error TS1503: Named capturing groups are only available when targeting 'ES2018' or later const pattern = /^(?<timestamp>\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2})-(?<scriptName>[^.]+?)(?:\.(?<extension>[^.]+))?$/;// timestamp-scriptName.extension ... ``` - Refactor usage of `electron-progressbar` for type safety and less complexity.
- Loading branch information
1 parent
a05a600
commit e17744f
Showing
77 changed files
with
656 additions
and
332 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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 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 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 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 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 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 was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...ntimeSanity/Common/ISanityCheckOptions.ts → ...untimeSanity/Common/SanityCheckOptions.ts
This file contains 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
export interface ISanityCheckOptions { | ||
export interface SanityCheckOptions { | ||
readonly validateEnvironmentVariables: boolean; | ||
readonly validateWindowVariables: boolean; | ||
} |
This file contains 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,7 @@ | ||
import type { SanityCheckOptions } from './SanityCheckOptions'; | ||
|
||
export interface SanityValidator { | ||
readonly name: string; | ||
shouldValidate(options: SanityCheckOptions): boolean; | ||
collectErrors(): Iterable<string>; | ||
} |
This file contains 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 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 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 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
15 changes: 15 additions & 0 deletions
15
src/presentation/bootstrapping/Modules/RuntimeSanityBootstrapper.ts
This file contains 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,15 @@ | ||
import { validateRuntimeSanity, type RuntimeSanityValidator } from '@/infrastructure/RuntimeSanity/SanityChecks'; | ||
import type { Bootstrapper } from '../Bootstrapper'; | ||
|
||
export class RuntimeSanityBootstrapper implements Bootstrapper { | ||
constructor(private readonly validator: RuntimeSanityValidator = validateRuntimeSanity) { | ||
|
||
} | ||
|
||
public async bootstrap(): Promise<void> { | ||
this.validator({ | ||
validateEnvironmentVariables: true, | ||
validateWindowVariables: true, | ||
}); | ||
} | ||
} |
15 changes: 0 additions & 15 deletions
15
src/presentation/bootstrapping/Modules/RuntimeSanityValidator.ts
This file was deleted.
Oops, something went wrong.
This file contains 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 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
Oops, something went wrong.