diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fc34c6a..c4b08ff8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,24 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +### [7.13.1-alpha.0](https://github.com/prismicio/prismic-client/compare/v7.12.0...v7.13.1-alpha.0) (2024-12-11) + + +### Features + +* add support for repeatable links in models ([#355](https://github.com/prismicio/prismic-client/issues/355)) ([ed120a8](https://github.com/prismicio/prismic-client/commit/ed120a8606b8de0e6c651dc859e350a732d76768)), closes [#360](https://github.com/prismicio/prismic-client/issues/360) + + +### Bug Fixes + +* link inside a repeatable contain a key ([939cac9](https://github.com/prismicio/prismic-client/commit/939cac9eb5d485f036d5895f4adabc912f2de3ae)) + + +### Chore + +* Release alpha as patch ([a2d778f](https://github.com/prismicio/prismic-client/commit/a2d778fa201b796578dd73750f6a7058d75542a2)) +* **release:** 7.13.0 ([a001f06](https://github.com/prismicio/prismic-client/commit/a001f06778c934fdceaf31c460664a14957315a2)) + ## [7.13.0](https://github.com/prismicio/prismic-client/compare/v7.12.0...v7.13.0) (2024-12-05) diff --git a/package-lock.json b/package-lock.json index 93cbedc5..250321ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@prismicio/client", - "version": "7.13.0", + "version": "7.13.1-alpha.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@prismicio/client", - "version": "7.13.0", + "version": "7.13.1-alpha.0", "license": "Apache-2.0", "dependencies": { "imgix-url-builder": "^0.0.5" diff --git a/package.json b/package.json index 96a58838..0928a19c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@prismicio/client", - "version": "7.13.0", + "version": "7.13.1-alpha.0", "description": "The official JavaScript + TypeScript client library for Prismic", "keywords": [ "typescript", @@ -69,8 +69,8 @@ "prepare": "npm run build", "release": "npm run test && standard-version && git push --follow-tags && npm run build && npm publish", "release:dry": "standard-version --dry-run", - "release:alpha": "npm run test && standard-version --release-as minor --prerelease alpha && git push --follow-tags && npm run build && npm publish --tag alpha", - "release:alpha:dry": "standard-version --release-as minor --prerelease alpha --dry-run", + "release:alpha": "npm run test && standard-version --release-as patch --prerelease alpha && git push --follow-tags && npm run build && npm publish --tag alpha", + "release:alpha:dry": "standard-version --release-as patch --prerelease alpha --dry-run", "lint": "eslint --ext .js,.ts .", "types": "tsc --noEmit", "unit": "vitest run --coverage", diff --git a/src/types/value/types.ts b/src/types/value/types.ts index 58ac44e6..3e8e2ed9 100644 --- a/src/types/value/types.ts +++ b/src/types/value/types.ts @@ -59,7 +59,12 @@ export type AnySlicePrimaryField = GroupField | AnyRegularField export type Repeatable< Field extends LinkField, State extends FieldState = FieldState, -> = State extends "empty" ? [] : [Field, ...Field[]] +> = State extends "empty" ? [] : [WithKey, ...WithKey[]] + +/** + * Wrapper to add a key to a field when inside a repeatable. + */ +type WithKey = Field & { key: string } /** * Useful to flatten the type output to improve type hints shown in editors. And