diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9835158..5b62274 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,7 @@ jobs: run: pnpm build - name: Bump version with release tag name + if: ${{ github.event_name == 'release' }} run: pnpm version --no-git-tag-version ${{ github.event.release.tag_name }} - name: Pack package diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b09679e..68677ea 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: name: package - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 registry-url: https://registry.npmjs.org/ - run: npm publish $(ls *.tgz) --access=public --tag ${{ github.event.release.prerelease && 'next' || 'latest'}} env: @@ -46,7 +46,7 @@ jobs: name: package - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 registry-url: https://npm.pkg.github.com/ - run: npm publish $(ls *.tgz) --access=public --tag ${{ github.event.release.prerelease && 'next' || 'latest'}} env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7568d9a..614c600 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 24 - uses: pnpm/action-setup@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index bc9cc57..14342af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,32 @@ All notable changes to this project will be documented in this file. +## [3.0.0] - Unreleased + +### Changed + +- **BREAKING:** upgraded `ky` to `2.x`, which renames the `HttpClient` option `prefixUrl` to `prefix`. Update every `new HttpClient({ prefixUrl })`, `createHttpClient({ prefixUrl })` and `httpClientOptions: { prefixUrl }` usage to `prefix`. + +## [2.0.5] - 2026-06-15 + +### Fixed + +- TypeScript 6 compatibility: removed deprecated `baseUrl`, updated `moduleResolution` to `Bundler`. +- Updated `ky` imports to use the public entry point only, removing internal path dependencies. +- Fixed relative import paths and implicit `any` types in `src/vue/index.ts`. +- `RepositoryHttp` default metadata adapter no longer drops `contentLanguage` when both `Content-Language` and `Accept-Language` response headers are present. +- `useRepositoryHttp` `create()` and `update()` now expose the `item` ref, consistently with `read()`. +- `HttpClientInstance.setBearerToken` type signature now matches the implementation (nullable token and options). + +### Added + +- `item` ref returned by the `create()` and `update()` Vue composables. + +### Internal + +- `RepositoryHttp.create()`/`update()` and the Vue repository composables refactored to remove duplication. +- Type-check and tests now cover the `test/` folder; declaration emit moved to a dedicated `tsconfig.build.json`. + ## [2.0.4] - 2025-10-09 ### Fixed @@ -117,6 +143,8 @@ 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 +[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 [2.0.2]: https://github.com/volverjs/data/compare/v2.0.1...v2.0.2 diff --git a/README.md b/README.md index 3c16ba6..4900f33 100644 --- a/README.md +++ b/README.md @@ -110,7 +110,7 @@ class User { constructor(data: { id: number, name: string, surname: string }) { this.id = data.id this.name = data.name - this.email = data.email + this.surname = data.surname } get fullName() { @@ -228,7 +228,7 @@ async function execute() { ``` -`useHttpClient()` also exposes `request()`, `requestGet()`, `requestPost()`, `requestPut()`, `requestPatch()` and `requestDelete()` methods. These methods are wrappers around the `HttpClient` methods with reactivity. +`useHttpClient()` also exposes `request()`, `requestGet()`, `requestPost()`, `requestPut()`, `requestPatch()`, `requestHead()` and `requestDelete()` methods. These methods are wrappers around the `HttpClient` methods with reactivity. ```vue