-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(project): migrate js to ts and update tooling
Migrated the existing JavaScript codebase to TypeScript, including the addition of type definitions and interfaces for better type safety and developer experience. Updated package.json to include necessary TypeScript dependencies and scripts for building and linting the project. Removed old JavaScript files and their references, and set up Jest for unit testing with TypeScript support. This change aims to leverage TypeScript's static typing features for more robust code.
- Loading branch information
Showing
25 changed files
with
208 additions
and
453 deletions.
There are no files selected for viewing
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,16 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'prettier' | ||
], | ||
parserOptions: { | ||
ecmaVersion: 2020, | ||
sourceType: 'module', | ||
}, | ||
rules: { | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-explicit-any': 'warn', | ||
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }] | ||
} | ||
} |
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,9 @@ | ||
export default { | ||
preset: 'ts-jest', | ||
testEnvironment: 'node', | ||
roots: ['<rootDir>/src', '<rootDir>/test'], | ||
testMatch: ['**/*.test.ts'], | ||
moduleNameMapper: { | ||
'^@/(.*)$': '<rootDir>/src/$1' | ||
} | ||
}; |
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.
Empty file.
Empty file.
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,30 @@ | ||
import { Workflow, WorkflowNode } from '../types'; | ||
|
||
export class WorkflowImpl implements Workflow { | ||
constructor( | ||
public id: string, | ||
public name: string, | ||
public nodes: WorkflowNode[] = [], | ||
public variables: Map<string, unknown> = new Map() | ||
) {} | ||
|
||
async execute(): Promise<void> { | ||
throw new Error('Not implemented'); | ||
} | ||
|
||
addNode(node: WorkflowNode): void { | ||
throw new Error('Not implemented'); | ||
} | ||
|
||
removeNode(nodeId: string): void { | ||
throw new Error('Not implemented'); | ||
} | ||
|
||
getNode(nodeId: string): WorkflowNode { | ||
throw new Error('Not implemented'); | ||
} | ||
|
||
validateDAG(): boolean { | ||
throw new Error('Not implemented'); | ||
} | ||
} |
Oops, something went wrong.