Minimal required Node.js version is now 18.20.2.#610
Merged
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR updates the minimum required Node.js version to 18.20.2 and migrates the codebase from JavaScript to TypeScript, along with updating the build tooling from Rollup to Vite/tsup.
- Migrated all source files from
.jsto.tswith proper TypeScript type annotations - Updated build system from Rollup to Vite and tsup for better TypeScript support
- Added new
hashMultifunction and renamedwriteJSONtowriteJsonfor consistency
Reviewed changes
Copilot reviewed 122 out of 135 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated Node.js version requirement, build dependencies, and scripts |
| vite.config.mjs | New Vite build configuration |
| tsup.config.ts | New tsup configuration for TypeScript builds |
| tsconfig.json | TypeScript compiler configuration with strict type checking |
| src/index.ts | Updated main entry point with new exports including hashMulti |
| src/core/write/write-json.ts | Migrated to TypeScript with renamed function writeJson |
| src/core/write/write-file.ts | Migrated to TypeScript with type annotations |
| src/core/info/hash-multi.ts | New function to calculate multiple hash algorithms |
| test/index.test.mjs | Updated tests to include hashMulti and use renamed writeJson |
| .travis.yml | Updated Node.js and npm versions |
| CHANGELOG.md | Documented version changes and new features |
Comments suppressed due to low confidence (4)
test/index.test.mjs:1
- The test expects
remove()to returntrue, but according to the updated implementation insrc/core/remove/remove.ts, the function now returnsboolean | Error. When successful, it resolves totrue, but the test assertion should handle potential error returns. The previous implementation returnedundefinedon success.
test/index.test.mjs:1 - The test expects
remove()to returntruefor the class method, but this assertion should be consistent with the updated return type ofboolean | Error. The previous implementation returnedundefinedon success.
src/core/write/write-json.ts:1 - When
configuration.sortistruebutconfiguration.spaceis not provided, the variablejsonremains undefined, causing the function to returnundefinedinstead of the stringified JSON. The logic should setjsonafter the sort operation even whenspaceis not specified.
src/core/error/error-extract-options.ts:1 - The function has an unreachable return statement at line 24. If the error is an instance of Error but doesn't have the filesystem-specific properties, the function returns nothing (implicitly undefined) rather than
{ cause: error }. The return at line 24 should be inside an else block or the function should be restructured.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


No description provided.