Skip to content
Open
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
122 changes: 122 additions & 0 deletions build-pack-vitessce-zarronly.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT_DIR"

VERSION="${1:-3.8.8-mh-zarronly.0}"
PACK_DIR="${2:-lib_vitessce}"

PACKAGES=(
"packages/constants-internal"
"packages/error"
"packages/plugins"
"packages/types"
"packages/globals"
"packages/file-types/abstract"
"packages/constants"
"packages/utils/other-utils"
"packages/utils/zarr-utils"
"packages/config"
"packages/schemas"
"packages/utils/spatial-utils"
"packages/utils/image-utils"
"packages/utils/sets-utils"
"packages/file-types/zarr"
"packages/file-types/spatial-zarr"
)

MANIFESTS=(
"packages/file-types/abstract/package.json"
"packages/config/package.json"
"packages/constants/package.json"
"packages/constants-internal/package.json"
"packages/error/package.json"
"packages/globals/package.json"
"packages/utils/image-utils/package.json"
"packages/plugins/package.json"
"packages/schemas/package.json"
"packages/utils/sets-utils/package.json"
"packages/utils/spatial-utils/package.json"
"packages/file-types/spatial-zarr/package.json"
"packages/types/package.json"
"packages/utils/other-utils/package.json"
"packages/file-types/zarr/package.json"
"packages/utils/zarr-utils/package.json"
"packages/constants-internal/src/version.json"
)

echo "Setting Vitessce zarr-only package version to ${VERSION}"
VERSION="$VERSION" node - "${MANIFESTS[@]}" <<'NODE'
const fs = require('fs');

const version = process.env.VERSION;
const files = process.argv.slice(2);

for (const file of files) {
const data = JSON.parse(fs.readFileSync(file, 'utf8'));
data.version = version;

if (file.endsWith('/package.json')) {
const dependencies = data.dependencies || {};
const peerDependencies = data.peerDependencies || {};

for (const name of Object.keys(dependencies)) {
if (name.startsWith('@vitessce/')) {
peerDependencies[name] = version;
delete dependencies[name];
}
}

if (Object.keys(dependencies).length > 0) {
data.dependencies = dependencies;
} else {
delete data.dependencies;
}

if (Object.keys(peerDependencies).length > 0) {
data.peerDependencies = peerDependencies;
} else {
delete data.peerDependencies;
}
}

fs.writeFileSync(file, `${JSON.stringify(data, null, 2)}\n`);
}
NODE

echo "Building bundled output for zarr-only package closure"
pnpm \
--filter @vitessce/abstract \
--filter @vitessce/config \
--filter @vitessce/constants \
--filter @vitessce/constants-internal \
--filter @vitessce/error \
--filter @vitessce/globals \
--filter @vitessce/image-utils \
--filter @vitessce/plugins \
--filter @vitessce/schemas \
--filter @vitessce/sets-utils \
--filter @vitessce/spatial-utils \
--filter @vitessce/spatial-zarr \
--filter @vitessce/types \
--filter @vitessce/utils \
--filter @vitessce/zarr \
--filter @vitessce/zarr-utils \
--workspace-concurrency 1 \
bundle

echo "Building TypeScript declaration output"
pnpm exec tsc --build

mkdir -p "$PACK_DIR"

echo "Packing tarballs into ${PACK_DIR}"
for package_dir in "${PACKAGES[@]}"; do
pnpm --dir "$package_dir" pack --pack-destination "$ROOT_DIR/$PACK_DIR"
done

echo "Packed files:"
find "$PACK_DIR" -maxdepth 1 -type f -name "vitessce-*-${VERSION}.tgz" -print | sort

echo "Done."
12 changes: 7 additions & 5 deletions packages/config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/config",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HIDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down Expand Up @@ -30,11 +30,13 @@
"test": "pnpm exec vitest --run"
},
"dependencies": {
"@vitessce/constants-internal": "workspace:*",
"@vitessce/utils": "workspace:*",
"@vitessce/globals": "workspace:*",
"@vitessce/zarr-utils": "workspace:*",
"zarrita": "catalog:",
"@zarrita/storage": "catalog:"
},
"peerDependencies": {
"@vitessce/constants-internal": "3.8.8-mh-zarronly.0",
"@vitessce/utils": "3.8.8-mh-zarronly.0",
"@vitessce/globals": "3.8.8-mh-zarronly.0",
"@vitessce/zarr-utils": "3.8.8-mh-zarronly.0"
}
}
2 changes: 1 addition & 1 deletion packages/constants-internal/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/constants-internal",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HIDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions packages/constants-internal/src/version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"note": "This file is autogenerated by .changeset/post-changelog.mjs.",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"date": "2025-11-12",
"branch": "changeset-release/main",
"hash": "d6c0d38d"
}
}
10 changes: 5 additions & 5 deletions packages/constants/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/constants",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HIDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down Expand Up @@ -28,11 +28,11 @@
"scripts": {
"bundle": "pnpm exec vite build -c ../../scripts/vite.config.mjs"
},
"dependencies": {
"@vitessce/globals": "workspace:*",
"@vitessce/constants-internal": "workspace:*"
},
"devDependencies": {
"@vitessce/types": "workspace:*"
},
"peerDependencies": {
"@vitessce/globals": "3.8.8-mh-zarronly.0",
"@vitessce/constants-internal": "3.8.8-mh-zarronly.0"
}
}
3 changes: 1 addition & 2 deletions packages/error/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/error",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HIDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down Expand Up @@ -29,7 +29,6 @@
"bundle": "pnpm exec vite build -c ../../scripts/vite.config.mjs",
"test": "pnpm exec vitest --run"
},
"dependencies": {},
"devDependencies": {
"react": "catalog:",
"react-dom": "catalog:",
Expand Down
8 changes: 4 additions & 4 deletions packages/file-types/abstract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/abstract",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HiDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down Expand Up @@ -30,10 +30,10 @@
"bundle": "pnpm exec vite build -c ../../../scripts/vite.config.mjs",
"test": "pnpm exec vitest --run"
},
"dependencies": {
"@vitessce/globals": "workspace:*"
},
"devDependencies": {
"@vitessce/types": "workspace:*"
},
"peerDependencies": {
"@vitessce/globals": "3.8.8-mh-zarronly.0"
}
}
18 changes: 9 additions & 9 deletions packages/file-types/spatial-zarr/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/spatial-zarr",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HIDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down Expand Up @@ -30,13 +30,6 @@
"test": "pnpm exec vitest --run"
},
"dependencies": {
"@vitessce/abstract": "workspace:*",
"@vitessce/error": "workspace:*",
"@vitessce/spatial-utils": "workspace:*",
"@vitessce/image-utils": "workspace:*",
"@vitessce/zarr": "workspace:*",
"@vitessce/config": "workspace:*",
"@vitessce/globals": "workspace:*",
"@math.gl/core": "catalog:",
"d3-array": "catalog:",
"lodash-es": "catalog:",
Expand All @@ -45,7 +38,14 @@
"ol": "^10.2.1"
},
"peerDependencies": {
"zarrita": "catalog:"
"zarrita": "catalog:",
"@vitessce/abstract": "3.8.8-mh-zarronly.0",
"@vitessce/error": "3.8.8-mh-zarronly.0",
"@vitessce/spatial-utils": "3.8.8-mh-zarronly.0",
"@vitessce/image-utils": "3.8.8-mh-zarronly.0",
"@vitessce/zarr": "3.8.8-mh-zarronly.0",
"@vitessce/config": "3.8.8-mh-zarronly.0",
"@vitessce/globals": "3.8.8-mh-zarronly.0"
},
"devDependencies": {
"@vitessce/types": "workspace:*",
Expand Down
22 changes: 11 additions & 11 deletions packages/file-types/zarr/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/zarr",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HIDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down Expand Up @@ -30,23 +30,23 @@
"test": "pnpm exec vitest --run"
},
"dependencies": {
"@vitessce/abstract": "workspace:*",
"@vitessce/error": "workspace:*",
"@vitessce/constants-internal": "workspace:*",
"@vitessce/sets-utils": "workspace:*",
"@vitessce/image-utils": "workspace:*",
"@vitessce/utils": "workspace:*",
"@vitessce/zarr-utils": "workspace:*",
"@vitessce/config": "workspace:*",
"@vitessce/globals": "workspace:*",
"d3-array": "catalog:",
"lodash-es": "catalog:",
"apache-arrow": "catalog:",
"parquet-wasm": "catalog:",
"ol": "^10.2.1"
},
"peerDependencies": {
"zarrita": "catalog:"
"zarrita": "catalog:",
"@vitessce/abstract": "3.8.8-mh-zarronly.0",
"@vitessce/error": "3.8.8-mh-zarronly.0",
"@vitessce/constants-internal": "3.8.8-mh-zarronly.0",
"@vitessce/sets-utils": "3.8.8-mh-zarronly.0",
"@vitessce/image-utils": "3.8.8-mh-zarronly.0",
"@vitessce/utils": "3.8.8-mh-zarronly.0",
"@vitessce/zarr-utils": "3.8.8-mh-zarronly.0",
"@vitessce/config": "3.8.8-mh-zarronly.0",
"@vitessce/globals": "3.8.8-mh-zarronly.0"
},
"devDependencies": {
"@vitessce/types": "workspace:*"
Expand Down
2 changes: 1 addition & 1 deletion packages/globals/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/globals",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HIDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/plugins",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HIDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down
14 changes: 8 additions & 6 deletions packages/schemas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/schemas",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HIDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down Expand Up @@ -33,11 +33,6 @@
"@types/lodash-es": "catalog:",
"@types/semver": "catalog:",
"@types/uuid": "catalog:",
"@vitessce/constants": "workspace:*",
"@vitessce/constants-internal": "workspace:*",
"@vitessce/plugins": "workspace:*",
"@vitessce/utils": "workspace:*",
"@vitessce/globals": "workspace:*",
"lodash-es": "catalog:",
"semver": "catalog:",
"uuid": "catalog:",
Expand All @@ -48,5 +43,12 @@
"vite": "catalog:",
"vitest": "catalog:",
"zod-to-json-schema": "^3.20.4"
},
"peerDependencies": {
"@vitessce/constants": "3.8.8-mh-zarronly.0",
"@vitessce/constants-internal": "3.8.8-mh-zarronly.0",
"@vitessce/plugins": "3.8.8-mh-zarronly.0",
"@vitessce/utils": "3.8.8-mh-zarronly.0",
"@vitessce/globals": "3.8.8-mh-zarronly.0"
}
}
2 changes: 1 addition & 1 deletion packages/types/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/types",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HIDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down
12 changes: 7 additions & 5 deletions packages/utils/image-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vitessce/image-utils",
"version": "3.8.8",
"version": "3.8.8-mh-zarronly.0",
"author": "HIDIVE Lab at HMS",
"homepage": "http://vitessce.io",
"repository": {
Expand Down Expand Up @@ -30,15 +30,17 @@
"test": "pnpm exec vitest --run"
},
"dependencies": {
"@vitessce/types": "workspace:*",
"@vitessce/spatial-utils": "workspace:*",
"@vitessce/utils": "workspace:*",
"@vitessce/globals": "workspace:*",
"@vivjs/loaders": "^0.16.0",
"quickselect": "^2.0.0"
},
"devDependencies": {
"vite": "catalog:",
"vitest": "catalog:"
},
"peerDependencies": {
"@vitessce/types": "3.8.8-mh-zarronly.0",
"@vitessce/spatial-utils": "3.8.8-mh-zarronly.0",
"@vitessce/utils": "3.8.8-mh-zarronly.0",
"@vitessce/globals": "3.8.8-mh-zarronly.0"
}
}
Loading