Simple utils ts migration#848
Conversation
|
Size Change: -58 B (0%) Total Size: 3.51 MB
|
There was a problem hiding this comment.
Pull request overview
Migrates a small utility (verifyChecksum) toward TypeScript usage and adjusts build/lint configuration to support TypeScript artifacts.
Changes:
- Convert
src/util/checksumto TypeScript with explicitUint8Arraytypes. - Add a new checksum unit test written for Vitest.
- Update TypeScript and ESLint configuration (declaration output, ignore patterns, and removed per-file eslint disables).
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| type_validation/util/checksum.d.ts | Adds a declaration for verifyChecksum under type_validation/. |
| tsconfig.cjs.json | Enables declaration emit and routes declarations to ./type_validation. |
| tsconfig.base.json | Disables allowJs (impacts how tsc handles the largely-JS src/ tree). |
| test/unit/util/checksum.test.ts | Adds Vitest-based unit tests for verifyChecksum. |
| src/util/checksum.ts | Adds TypeScript annotations to verifyChecksum. |
| src/operations/set_options.js | Removes file-level eslint disable for no-param-reassign. |
| src/operation.js | Removes file-level eslint disable for no-bitwise. |
| config/eslint.config.cjs | Adds test globals block (for JS tests) and ignores src/generated via flat config. |
| .eslintignore | Removes legacy ignore entries now handled via flat config. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1505687 to
2710710
Compare
2710710 to
b21baeb
Compare
|
|
||
| module.exports = eslintConfig.defineConfig( | ||
| includeIgnoreFile(gitignorePath), | ||
| { ignores: ["src/generated"] }, |
There was a problem hiding this comment.
We don't need to ignore vendor?
There was a problem hiding this comment.
That directory does not seem to exist anymore
| "esModuleInterop": true | ||
| "esModuleInterop": true, | ||
| "declaration": true, | ||
| "declarationDir": "./type_validation" |
There was a problem hiding this comment.
It might be just me, but should we rename the directory to something that signals that it was generated? I'm sure I will forget it after a while, and will wonder where these types are coming from. Thoughts?
There was a problem hiding this comment.
We definitely can but this will be moved most likely to lib/types once we are done migrating
No description provided.