From 03e79742d582210bb7bac243677fd4e175d8d58d Mon Sep 17 00:00:00 2001 From: Alessandro Bellesia Date: Mon, 15 Jun 2026 16:12:18 +0200 Subject: [PATCH 1/2] feat!: upgrade ky to 2.x and rename prefixUrl option to prefix BREAKING CHANGE: the `HttpClient` option `prefixUrl` has been renamed to `prefix`, following `ky` 2.x. Update every `new HttpClient({ prefixUrl })`, `createHttpClient({ prefixUrl })` and `httpClientOptions: { prefixUrl }` usage to `prefix`. - bump `ky` dependency to `^2.0.2` - rename `prefixUrl` to `prefix` across source, tests, docs and README - changelog entry for 3.0.0-beta.1 Co-Authored-By: Claude Opus 4.8 (1M context) --- CHANGELOG.md | 4 ++-- README.md | 12 ++++++------ docs/HttpClient.md | 2 +- docs/RepositoryHttp.md | 2 +- package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ src/HttpClient.ts | 8 ++++---- src/RepositoryHttp.ts | 4 ++-- src/vue/index.ts | 4 ++-- test/httpClient.test.ts | 6 +++--- test/repository.test.ts | 12 ++++++------ test/vueHttpClient.test.ts | 16 ++++++++-------- test/vueRepository.test.ts | 4 ++-- 13 files changed, 44 insertions(+), 44 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 14342af..1bc5ff5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ All notable changes to this project will be documented in this file. -## [3.0.0] - Unreleased +## [3.0.0-beta.1] - 2026-06-15 ### Changed @@ -143,7 +143,7 @@ All notable changes to this project will be documented in this file. - `UrlBuilder` a class to build URLs through a template; - `RepositoryHttp` an implementation of `Repository` interface to fetch data through `HttpClient`. -[3.0.0]: https://github.com/volverjs/data/compare/v2.0.5...v3.0.0 +[3.0.0-beta.1]: https://github.com/volverjs/data/compare/v2.0.5...v3.0.0-beta.1 [2.0.5]: https://github.com/volverjs/data/compare/v2.0.4...v2.0.5 [2.0.4]: https://github.com/volverjs/data/compare/v2.0.3...v2.0.4 [2.0.3]: https://github.com/volverjs/data/compare/v2.0.2...v2.0.3 diff --git a/README.md b/README.md index 4900f33..e8ae601 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ The `HttpClient` class is a wrapper around [`ky`](https://github.com/sindresorhu import { HttpClient } from '@volverjs/data' const client = new HttpClient({ - prefixUrl: 'https://my.api.com' + prefix: 'https://my.api.com' }) const response = await client.get({ template: ':endpoint/:action?/:id', @@ -119,7 +119,7 @@ class User { } const client = new HttpClient({ - prefixUrl: 'https://my.api.com' + prefix: 'https://my.api.com' }) const repository = new RepositoryHttp(client, 'users/:group?/:id?', { @@ -152,7 +152,7 @@ import App from './App.vue' const app = createApp(App) const httpClientPlugin = createHttpClient({ - prefixUrl: 'https://my.api.com' + prefix: 'https://my.api.com' }) app.use(httpClientPlugin, { @@ -180,7 +180,7 @@ import { createHttpClient, useHttpClient } from '@volverjs/data/vue' import { computed, ref } from 'vue' createHttpClient({ - prefixUrl: 'https://my.api.com' + prefix: 'https://my.api.com' }) const { client } = useHttpClient() @@ -569,7 +569,7 @@ With `scope` parameter on `createHttpClient()` multiple `httpClient` instances c