Skip to content

Add v3 consolidated metadata support to withConsolidated#383

Merged
manzt merged 1 commit intomainfrom
push-uvvpvzqvwqzv
Apr 8, 2026
Merged

Add v3 consolidated metadata support to withConsolidated#383
manzt merged 1 commit intomainfrom
push-uvvpvzqvwqzv

Conversation

@manzt
Copy link
Copy Markdown
Owner

@manzt manzt commented Apr 8, 2026

withConsolidated previously only supported Zarr v2 .zmetadata. This adds support for v3 consolidated metadata (inlineconsolidated_metadata in the root zarr.json), which is implemented in zarr-python but not yet accepted into the Zarr v3 spec.

A new format option controls which format(s) to try. It accepts a single format string or an array to try in order. When omitted, auto- detection uses the existing version counter heuristic from open.

await withConsolidated(store);                           // auto-detect
await withConsolidated(store, { format: "v2" });         // v2 only
await withConsolidated(store, { format: "v3" });         // v3 only
await withConsolidated(store, { format: ["v3", "v2"] }); // try v3, fall back to v2

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 8, 2026

🦋 Changeset detected

Latest commit: d3b3a7f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
zarrita Minor
@zarrita/ndarray Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

`withConsolidated` previously only supported Zarr v2 `.zmetadata`. This
adds support for v3 consolidated metadata (inline
`consolidated_metadata` in the root `zarr.json`), which is implemented
in zarr-python but not yet accepted into the Zarr v3 spec.

A new `format` option controls which format(s) to try. It accepts a
single format string or an array to try in order. When omitted, auto-
detection uses the existing version counter heuristic from `open`.

```ts
await withConsolidated(store);                         // auto-detect
await withConsolidated(store, { format: "v2" });       // v2 only
await withConsolidated(store, { format: "v3" });       // v3 only
await withConsolidated(store, { format: ["v3", "v2"] }); // try v3, fall back to v2
```
@manzt manzt force-pushed the push-uvvpvzqvwqzv branch from 858cf99 to d3b3a7f Compare April 8, 2026 23:03
@manzt manzt merged commit 53eff05 into main Apr 8, 2026
2 checks passed
@manzt manzt deleted the push-uvvpvzqvwqzv branch April 8, 2026 23:04
@github-actions github-actions Bot mentioned this pull request Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant