Skip to content

Commit 396fce5

Browse files
Version Packages (next)
1 parent 191d95c commit 396fce5

File tree

9 files changed

+126
-4
lines changed

9 files changed

+126
-4
lines changed

.changeset/pre.json

+2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"changesets": [
1313
"cold-dancers-chew",
1414
"flat-boats-train",
15+
"green-pandas-argue",
1516
"grumpy-penguins-lick",
17+
"popular-glasses-nail",
1618
"quick-teachers-camp",
1719
"serious-comics-lick",
1820
"slimy-pigs-buy",

packages/core/CHANGELOG.md

+47
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,52 @@
11
# @zarrita/core
22

3+
## 0.1.0-next.5
4+
5+
### Minor Changes
6+
7+
- feat: Add `tryWithConsolidated` store helper ([#141](https://github.com/manzt/zarrita.js/pull/141))
8+
9+
Provides a convenient way to open a store that may or may not have consolidated
10+
metadata. Ideal for usage senarios with known access paths, since store with
11+
consolidated metadata do not incur additional network requests when accessing
12+
underlying groups and arrays.
13+
14+
```js
15+
import * as zarr from "zarrita";
16+
17+
let store = await zarr.tryWithConsolidated(
18+
new zarr.FetchStore("https://localhost:8080/data.zarr");
19+
);
20+
21+
// The following do not read from the store
22+
// (make network requests) if it is consolidated.
23+
let grp = await zarr.open(store, { kind: "group" });
24+
let foo = await zarr.open(grp.resolve("foo"), { kind: "array" });
25+
```
26+
27+
- feat: Add `withConsolidated` store utility ([#119](https://github.com/manzt/zarrita.js/pull/119))
28+
29+
**BREAKING**: Replaces [`openConsolidated`](https://github.com/manzt/zarrita.js/pull/91)
30+
to provide a consistent interface for accessing consolidated and non-consolidated stores.
31+
32+
```javascript
33+
import * as zarr from "zarrita";
34+
35+
// non-consolidated
36+
let store = new zarr.FetchStore("https://localhost:8080/data.zarr");
37+
let grp = await zarr.open(store); // network request for .zgroup/.zattrs
38+
let foo = await zarr.open(grp.resolve("/foo"), { kind: array }); // network request for .zarray/.zattrs
39+
40+
// consolidated
41+
let store = new zarr.FetchStore("https://localhost:8080/data.zarr");
42+
let consolidatedStore = await zarr.withConsolidated(store); // opens ./zmetadata
43+
let contents = consolidatedStore.contents(); // [ {path: "/", kind: "group" }, { path: "/foo", kind: "array" }, ...]
44+
let grp = await zarr.open(consolidatedStore); // no network request
45+
let foo = await zarr.open(grp.resolve(contents[1].path), {
46+
kind: contents[1].kind,
47+
}); // no network request
48+
```
49+
350
## 0.1.0-next.4
451

552
### Patch Changes

packages/core/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zarrita/core",
3-
"version": "0.1.0-next.4",
3+
"version": "0.1.0-next.5",
44
"license": "MIT",
55
"type": "module",
66
"sideEffects": false,

packages/indexing/CHANGELOG.md

+32
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
# @zarrita/indexing
22

3+
## 0.1.0-next.7
4+
5+
### Minor Changes
6+
7+
- feat: Add `withConsolidated` store utility ([#119](https://github.com/manzt/zarrita.js/pull/119))
8+
9+
**BREAKING**: Replaces [`openConsolidated`](https://github.com/manzt/zarrita.js/pull/91)
10+
to provide a consistent interface for accessing consolidated and non-consolidated stores.
11+
12+
```javascript
13+
import * as zarr from "zarrita";
14+
15+
// non-consolidated
16+
let store = new zarr.FetchStore("https://localhost:8080/data.zarr");
17+
let grp = await zarr.open(store); // network request for .zgroup/.zattrs
18+
let foo = await zarr.open(grp.resolve("/foo"), { kind: array }); // network request for .zarray/.zattrs
19+
20+
// consolidated
21+
let store = new zarr.FetchStore("https://localhost:8080/data.zarr");
22+
let consolidatedStore = await zarr.withConsolidated(store); // opens ./zmetadata
23+
let contents = consolidatedStore.contents(); // [ {path: "/", kind: "group" }, { path: "/foo", kind: "array" }, ...]
24+
let grp = await zarr.open(consolidatedStore); // no network request
25+
let foo = await zarr.open(grp.resolve(contents[1].path), {
26+
kind: contents[1].kind,
27+
}); // no network request
28+
```
29+
30+
### Patch Changes
31+
32+
- Updated dependencies [[`191d95c77d2c7902344cd0175ae0044f740d19ba`](https://github.com/manzt/zarrita.js/commit/191d95c77d2c7902344cd0175ae0044f740d19ba), [`4d177d825f7bc241e0906a1b2890cad93f22d8a6`](https://github.com/manzt/zarrita.js/commit/4d177d825f7bc241e0906a1b2890cad93f22d8a6)]:
33+
- @zarrita/core@0.1.0-next.5
34+
335
## 0.1.0-next.6
436

537
### Patch Changes

packages/indexing/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zarrita/indexing",
3-
"version": "0.1.0-next.6",
3+
"version": "0.1.0-next.7",
44
"license": "MIT",
55
"type": "module",
66
"sideEffects": false,

packages/ndarray/CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @zarrita/ndarray
22

3+
## 0.1.0-next.7
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`191d95c77d2c7902344cd0175ae0044f740d19ba`](https://github.com/manzt/zarrita.js/commit/191d95c77d2c7902344cd0175ae0044f740d19ba), [`4d177d825f7bc241e0906a1b2890cad93f22d8a6`](https://github.com/manzt/zarrita.js/commit/4d177d825f7bc241e0906a1b2890cad93f22d8a6)]:
8+
- @zarrita/core@0.1.0-next.5
9+
- @zarrita/indexing@0.1.0-next.7
10+
311
## 0.1.0-next.6
412

513
### Patch Changes

packages/ndarray/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zarrita/ndarray",
3-
"version": "0.1.0-next.6",
3+
"version": "0.1.0-next.7",
44
"license": "MIT",
55
"type": "module",
66
"sideEffects": false,

packages/zarrita/CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# zarrita
22

3+
## 0.4.0-next.7
4+
5+
### Minor Changes
6+
7+
- feat: Add `withConsolidated` store utility ([#119](https://github.com/manzt/zarrita.js/pull/119))
8+
9+
**BREAKING**: Replaces [`openConsolidated`](https://github.com/manzt/zarrita.js/pull/91)
10+
to provide a consistent interface for accessing consolidated and non-consolidated stores.
11+
12+
```javascript
13+
import * as zarr from "zarrita";
14+
15+
// non-consolidated
16+
let store = new zarr.FetchStore("https://localhost:8080/data.zarr");
17+
let grp = await zarr.open(store); // network request for .zgroup/.zattrs
18+
let foo = await zarr.open(grp.resolve("/foo"), { kind: array }); // network request for .zarray/.zattrs
19+
20+
// consolidated
21+
let store = new zarr.FetchStore("https://localhost:8080/data.zarr");
22+
let consolidatedStore = await zarr.withConsolidated(store); // opens ./zmetadata
23+
let contents = consolidatedStore.contents(); // [ {path: "/", kind: "group" }, { path: "/foo", kind: "array" }, ...]
24+
let grp = await zarr.open(consolidatedStore); // no network request
25+
let foo = await zarr.open(grp.resolve(contents[1].path), {
26+
kind: contents[1].kind,
27+
}); // no network request
28+
```
29+
30+
### Patch Changes
31+
32+
- Updated dependencies [[`191d95c77d2c7902344cd0175ae0044f740d19ba`](https://github.com/manzt/zarrita.js/commit/191d95c77d2c7902344cd0175ae0044f740d19ba), [`4d177d825f7bc241e0906a1b2890cad93f22d8a6`](https://github.com/manzt/zarrita.js/commit/4d177d825f7bc241e0906a1b2890cad93f22d8a6)]:
33+
- @zarrita/core@0.1.0-next.5
34+
- @zarrita/indexing@0.1.0-next.7
35+
336
## 0.4.0-next.6
437

538
### Patch Changes

packages/zarrita/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zarrita",
3-
"version": "0.4.0-next.6",
3+
"version": "0.4.0-next.7",
44
"license": "MIT",
55
"homepage": "https://manzt.github.io/zarrita.js/",
66
"repository": {

0 commit comments

Comments
 (0)