Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion api-client/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"@preact/signals": "npm:@preact/signals@^2.5.1"
},
"name": "@01edu/api-client",
"version": "0.1.5",
"version": "0.1.6",
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change modifies the signature of the signal's fetch method from (input, headers: HeadersInit) to (input, opt) where opt is of type Options | undefined. This is a breaking change for existing code that calls signal().fetch(input, headers) directly with a HeadersInit parameter. Such code would need to be updated to signal().fetch(input, { headers }). Consider bumping to version 0.2.0 instead of 0.1.6 to reflect this breaking change according to semantic versioning.

Suggested change
"version": "0.1.6",
"version": "0.2.0",

Copilot uses AI. Check for mistakes.
"license": "MIT",
"exports": { ".": "./mod.ts" },
"compilerOptions": {
Expand Down
4 changes: 2 additions & 2 deletions api-client/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ export const makeClient = <T extends GenericRoutes>(baseUrl = ''): {
$.peek().controller?.abort()
$.value = { pending: 0 }
},
fetch: async (input, headers: HeadersInit) => {
fetch: async (input, opt) => {
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameter name opt is inconsistent with the rest of the codebase which uses options. Consider renaming opt to options to maintain consistency with the type signature at line 282 and the main fetcher function at line 187.

Copilot uses AI. Check for mistakes.
const prev = $.peek()
try {
const controller = new AbortController()
Expand All @@ -242,7 +242,7 @@ export const makeClient = <T extends GenericRoutes>(baseUrl = ''): {
const promise = fetcher(input, {
replacer,
signal,
headers,
headers: opt?.headers,
})
$.value = {
pending: Date.now(),
Expand Down
Loading