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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ easy to spot when bumping.

## [Unreleased]

## [8.0.1] - 2026-09-30

### Fixed

- `AlbumMinimumSchema.album_artists` renamed to `albumArtists`: the grow and hear APIs send camelCase, so the field was always dropped.
- `CriteriaUpdateSchema.parent` and `updateGenreParent` accept `null`, so a genre can be made a root again (the grow API's PUT allows it).

## [8.0.0] - 2026-09-29

### Breaking
Expand Down
2 changes: 1 addition & 1 deletion packages/app-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@behindthemusictree/app-kit",
"version": "8.0.0",
"version": "8.0.1",
"description": "Shared transport, auth, popup, UI, player, and genre-tree plumbing for BehindTheMusicTree React apps",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-kit/src/genre-tree/schemas/album-minimum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { ArtistMinimumSchema } from "./artist-minimum";
export const AlbumMinimumSchema = z.object({
uuid: z.string().uuid(),
name: z.string(),
album_artists: z.array(ArtistMinimumSchema).nullable().optional(),
albumArtists: z.array(ArtistMinimumSchema).nullable().optional(),
});

export type AlbumMinimum = z.infer<typeof AlbumMinimumSchema>;
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,8 @@ describe("CriteriaUpdateSchema", () => {
it("rejects an invalid essentialTracks entry", () => {
expect(() => CriteriaUpdateSchema.parse({ essentialTracks: ["not-a-uuid"] })).toThrow();
});

it("parses a null parent (make root)", () => {
expect(() => CriteriaUpdateSchema.parse({ parent: null })).not.toThrow();
});
});
2 changes: 1 addition & 1 deletion packages/app-kit/src/genre-tree/schemas/criteria/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { z } from "zod";

export const CriteriaUpdateSchema = z.object({
name: z.string().optional(),
parent: z.string().optional(),
parent: z.string().nullable().optional(),
essentialTracks: z.array(z.string().uuid()).optional(),
});

Expand Down
2 changes: 1 addition & 1 deletion packages/app-kit/src/genre-tree/useGenre.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export function useUpdateGenre(scope: Scope, getBackendBaseUrl: () => string) {
mutate({ uuid, data: { name } });
};

const updateGenreParent = async (uuid: string, parentUuid: string) => {
const updateGenreParent = async (uuid: string, parentUuid: string | null) => {
return new Promise<void>((resolve) => {
mutate({ uuid, data: { parent: parentUuid } });
resolve();
Expand Down
Loading