Conversation
There was a problem hiding this comment.
Pull Request Overview
This pull request updates the project configuration and tooling (switching from ESLint to Biome), adds CI/release workflows, and introduces comprehensive usage examples while upgrading and refactoring the underlying TypeFetcher client and schema integration.
- New configuration files (.editorconfig, biome.json) standardize code style and linting.
- The TypeFetcher client is refactored with enhanced schema validation, improved response handling, and expanded examples covering various use cases.
- Legacy code (e.g., ESLint config and axios-based client) is removed, and test suites are updated accordingly.
Reviewed Changes
Copilot reviewed 27 out of 33 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| vitest.config.ts | Added test configuration with coverage thresholds. |
| tsup.config.ts | Configured bundling for ESM/CJS output with type definitions. |
| src/types.ts, src/schema.ts | Updated types and schema helpers to support Standard Schema integration. |
| src/client.ts | Refactored the main client with endpoint registration, request validation, and error handling. |
| Various example files | Provided comprehensive usage examples (basic, type-safe, Node.js, Signal/Raw usage). |
| CI/Release workflows & config | Introduced Biome, CI automation, and updated package metadata to v1.0.0. |
Comments suppressed due to low confidence (2)
src/client.ts:226
- [nitpick] Consider adding an inline comment here to document that the response is cloned to preserve the raw response data for later use, ensuring clarity on why cloning occurs before consuming the response body.
const responseClone = response.clone();
src/client.ts:238
- Consider providing a more descriptive error message instead of undefined to facilitate debugging when a non-ok HTTP response is encountered.
throw new TypeFetcherError(response.status, response.statusText, undefined, errorData);
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.
This pull request introduces several changes to improve project configuration, automate workflows, and provide comprehensive examples for using the
TypeFetcherlibrary. The most significant updates include adding new.editorconfigandbiome.jsonfiles, replacing ESLint with Biome, setting up CI and release workflows, and adding detailed usage examples forTypeFetcher.Configuration Updates:
.editorconfigto standardize file formatting across the project, including rules for indentation, line endings, and trailing whitespace.biome.jsonto configure Biome for linting, formatting, and JavaScript-specific rules, replacing ESLint..eslintrc.jsonand updated.vscode/settings.jsonto use Biome for code actions on save. [1] [2]Workflow Automation:
.github/workflows/ci.yamlfor continuous integration, including build, lint, format, and test coverage steps..github/workflows/release.yamlto automate npm package releases triggered by version tags.Examples and Documentation:
TypeFetcher, including basic, type-safe, Node.js, and advanced use cases, inexamples/basic-usage.ts,examples/nodejs-usage.ts, andexamples/signal-and-raw-usage.ts. [1] [2] [3]Other Changes:
LICENSEto reflect the current year..npmignoreto streamline the npm package.