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.6",
"version": "0.1.7",
"license": "MIT",
"exports": { ".": "./mod.ts" },
"compilerOptions": {
Expand Down
11 changes: 7 additions & 4 deletions api-client/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ export const makeClient = <T extends GenericRoutes>(baseUrl = ''): {
reset: () => void
fetch: (
input?: HandlerIO<T, K>[0] | undefined,
options?: Options | undefined,
headers?: HeadersInit | undefined,
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

This is a breaking API change. The second parameter has been changed from options?: Options | undefined to headers?: HeadersInit | undefined. This means users can no longer pass signal or replacer options to signal().fetch(). While this appears intentional (since signal is auto-managed by the signal wrapper and replacer comes from signal(options)), this is a breaking change that should be:

  1. Documented in a CHANGELOG or migration guide
  2. Reflected in a major or minor version bump (the version was bumped from 0.1.6 to 0.1.7, which suggests a patch release)

Consider whether this breaking change warrants a minor version bump (0.2.0) instead of a patch bump (0.1.7), following semantic versioning conventions.

Suggested change
headers?: HeadersInit | undefined,
options?: Options | undefined,

Copilot uses AI. Check for mistakes.
) => Promise<void>
at: number
}
Expand Down Expand Up @@ -232,7 +232,7 @@ export const makeClient = <T extends GenericRoutes>(baseUrl = ''): {
$.peek().controller?.abort()
$.value = { pending: 0 }
},
fetch: async (input, opt) => {
fetch: async (input, headers) => {
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: opt?.headers,
headers,
})
$.value = {
pending: Date.now(),
Expand Down Expand Up @@ -279,7 +279,10 @@ export const makeClient = <T extends GenericRoutes>(baseUrl = ''): {
} as RequestState<Output> & {
$: Signal<RequestState<Output>>
reset: () => void
fetch: (input?: Input, options?: Options | undefined) => Promise<void>
fetch: (
input?: Input,
headers?: HeadersInit | undefined,
) => Promise<void>
at: number
}
}
Expand Down
2 changes: 1 addition & 1 deletion api/deno.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@std/http": "jsr:@std/http@^1.0.22"
},
"name": "@01edu/api",
"version": "0.1.4",
"version": "0.1.5",
"license": "MIT",
"exports": {
"./context": "./context.ts",
Expand Down
2 changes: 1 addition & 1 deletion api/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export const logger = async ({
span_id: span,
event_name: event,
attributes: props,
timestamp: now(),
timestamp: now() * 1000,
service_version: version,
service_instance_id: startTime.toString(),
}
Expand Down
Loading