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 .changeset/hungry-donkeys-shave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'zarrextra': patch
---

Remove the unused `zarrSchema` module and drop `zod` from the package's dependencies.

The v2 `.zarray` / v3 `zarr.json` schemas were never exported, so no public API changes. Array metadata stays unvalidated on the tree by design: `zarrita` validates on the real read path, and `getArrayDtype` already reconciles both generations' dtype spellings.
3 changes: 1 addition & 2 deletions packages/zarrextra/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@
"test:coverage": "vitest run --coverage"
},
"dependencies": {
"zarrita": "catalog:",
"zod": "catalog:"
"zarrita": "catalog:"
},
"devDependencies": {
"@fideus-labs/fizarrita": "^1.4.1",
Expand Down
35 changes: 2 additions & 33 deletions packages/zarrextra/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ export type ZarrV2ArrayNode = {
*
* Only `shape` and `data_type` are required here: the rest are optional in the
* specification or omitted by real writers, and this type describes metadata as
* it arrives from a store rather than metadata that has been through
* {@link validateV3Zarray}.
* it arrives from a store — parsed, but not validated or normalised. Nothing
* validates it on the way in, by design: see {@link ZarrArrayMetadata}.
*/
export type ZarrV3ArrayNode = {
shape: number[];
Expand Down Expand Up @@ -115,37 +115,6 @@ export type ZarrV3ArrayNode = {
*/
export type ZarrArrayMetadata = ZarrV2ArrayNode | ZarrV3ArrayNode | ZAttrsAny;

/**
* Zarr v3 group node metadata
*/
export type ZarrV3GroupNode = {
attributes: Record<string, unknown>;
zarr_format: number;
consolidated_metadata: {
kind: string;
must_understand: boolean;
metadata: Record<string, unknown>;
};
node_type: 'group';
};

/**
* Zarr v3 consolidated metadata structure (zarr.json)
* The actual structure has metadata nested under consolidated_metadata.metadata
* with path keys like "images/blobs_image", "labels/blobs_labels", etc.
* Each entry can be either a group node or an array node.
*/
export type ZarrV3Metadata = {
attributes: Record<string, unknown>;
zarr_format: number;
consolidated_metadata: {
kind: string;
must_understand: boolean;
metadata: Record<string, ZarrV3GroupNode | ZarrV3ArrayNode>;
};
node_type: 'group';
};

/**
* This type is liable to change in future - for now, it has `zarritaStore` which is the `ListableStore` from `zarrita`,
* and `tree: ZarrTree` which has the object hierarchy as described in the consolidated metadata as a mostly "Plain Old Javascript Object",
Expand Down
303 changes: 0 additions & 303 deletions packages/zarrextra/src/zarrSchema.ts

This file was deleted.

Loading
Loading