diff --git a/build-pack-vitessce-zarronly.sh b/build-pack-vitessce-zarronly.sh new file mode 100755 index 0000000000..c24c88d896 --- /dev/null +++ b/build-pack-vitessce-zarronly.sh @@ -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." diff --git a/packages/config/package.json b/packages/config/package.json index 08bd331ab9..d0c7eac99d 100644 --- a/packages/config/package.json +++ b/packages/config/package.json @@ -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": { @@ -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" } } diff --git a/packages/constants-internal/package.json b/packages/constants-internal/package.json index c7d331e1b7..d3e45458c5 100644 --- a/packages/constants-internal/package.json +++ b/packages/constants-internal/package.json @@ -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": { diff --git a/packages/constants-internal/src/version.json b/packages/constants-internal/src/version.json index e7f1664eac..26820a8380 100644 --- a/packages/constants-internal/src/version.json +++ b/packages/constants-internal/src/version.json @@ -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" -} \ No newline at end of file +} diff --git a/packages/constants/package.json b/packages/constants/package.json index 3bad16ec28..e2ce188cd0 100644 --- a/packages/constants/package.json +++ b/packages/constants/package.json @@ -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": { @@ -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" } } diff --git a/packages/error/package.json b/packages/error/package.json index 141ac84809..7f56317e60 100644 --- a/packages/error/package.json +++ b/packages/error/package.json @@ -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": { @@ -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:", diff --git a/packages/file-types/abstract/package.json b/packages/file-types/abstract/package.json index aa17d920ae..ec7b1f1d5c 100644 --- a/packages/file-types/abstract/package.json +++ b/packages/file-types/abstract/package.json @@ -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": { @@ -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" } } diff --git a/packages/file-types/spatial-zarr/package.json b/packages/file-types/spatial-zarr/package.json index c11a4557bf..955498489a 100644 --- a/packages/file-types/spatial-zarr/package.json +++ b/packages/file-types/spatial-zarr/package.json @@ -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": { @@ -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:", @@ -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:*", diff --git a/packages/file-types/zarr/package.json b/packages/file-types/zarr/package.json index 55e29e9115..575247e4ba 100644 --- a/packages/file-types/zarr/package.json +++ b/packages/file-types/zarr/package.json @@ -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": { @@ -30,15 +30,6 @@ "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:", @@ -46,7 +37,16 @@ "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:*" diff --git a/packages/globals/package.json b/packages/globals/package.json index 493cecac5e..9448db413d 100644 --- a/packages/globals/package.json +++ b/packages/globals/package.json @@ -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": { diff --git a/packages/plugins/package.json b/packages/plugins/package.json index 35d3723351..7d57b0bade 100644 --- a/packages/plugins/package.json +++ b/packages/plugins/package.json @@ -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": { diff --git a/packages/schemas/package.json b/packages/schemas/package.json index cf40da393f..2a04f17d93 100644 --- a/packages/schemas/package.json +++ b/packages/schemas/package.json @@ -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": { @@ -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:", @@ -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" } } diff --git a/packages/types/package.json b/packages/types/package.json index daad251339..475a7c76b6 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -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": { diff --git a/packages/utils/image-utils/package.json b/packages/utils/image-utils/package.json index 1180fa4e54..6ace70d8fa 100644 --- a/packages/utils/image-utils/package.json +++ b/packages/utils/image-utils/package.json @@ -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": { @@ -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" } } diff --git a/packages/utils/other-utils/package.json b/packages/utils/other-utils/package.json index e8e81afab9..4e0b4c94fb 100644 --- a/packages/utils/other-utils/package.json +++ b/packages/utils/other-utils/package.json @@ -1,6 +1,6 @@ { "name": "@vitessce/utils", - "version": "3.8.8", + "version": "3.8.8-mh-zarronly.0", "author": "HIDIVE Lab at HMS", "homepage": "http://vitessce.io", "repository": { @@ -30,11 +30,13 @@ "test": "pnpm exec vitest --run" }, "dependencies": { - "@vitessce/globals": "workspace:*", "bowser": "^2.11.0", "lodash-es": "catalog:", "lz-string": "^1.4.4", "pluralize": "catalog:", "d3-array": "catalog:" + }, + "peerDependencies": { + "@vitessce/globals": "3.8.8-mh-zarronly.0" } } diff --git a/packages/utils/sets-utils/package.json b/packages/utils/sets-utils/package.json index 69a57807b4..16b63cb2fa 100644 --- a/packages/utils/sets-utils/package.json +++ b/packages/utils/sets-utils/package.json @@ -1,6 +1,6 @@ { "name": "@vitessce/sets-utils", - "version": "3.8.8", + "version": "3.8.8-mh-zarronly.0", "author": "HIDIVE Lab at HMS", "homepage": "http://vitessce.io", "repository": { @@ -32,9 +32,6 @@ "dependencies": { "@turf/centroid": "catalog:turf", "@turf/helpers": "catalog:turf", - "@vitessce/schemas": "workspace:*", - "@vitessce/utils": "workspace:*", - "@vitessce/globals": "workspace:*", "concaveman": "^1.2.1", "d3-dsv": "catalog:", "internmap": "catalog:", @@ -42,5 +39,10 @@ "lodash-es": "catalog:", "tinycolor2": "^1.4.1", "uuid": "catalog:" + }, + "peerDependencies": { + "@vitessce/schemas": "3.8.8-mh-zarronly.0", + "@vitessce/utils": "3.8.8-mh-zarronly.0", + "@vitessce/globals": "3.8.8-mh-zarronly.0" } } diff --git a/packages/utils/spatial-utils/package.json b/packages/utils/spatial-utils/package.json index 4453df7549..6334a3f6df 100644 --- a/packages/utils/spatial-utils/package.json +++ b/packages/utils/spatial-utils/package.json @@ -1,6 +1,6 @@ { "name": "@vitessce/spatial-utils", - "version": "3.8.8", + "version": "3.8.8-mh-zarronly.0", "author": "HIDIVE Lab at HMS", "homepage": "http://vitessce.io", "repository": { @@ -30,16 +30,16 @@ "test": "pnpm exec vitest --run" }, "peerDependencies": { - "zarrita": "catalog:" + "zarrita": "catalog:", + "@vitessce/utils": "3.8.8-mh-zarronly.0", + "@vitessce/zarr-utils": "3.8.8-mh-zarronly.0", + "@vitessce/constants-internal": "3.8.8-mh-zarronly.0", + "@vitessce/globals": "3.8.8-mh-zarronly.0", + "@vitessce/error": "3.8.8-mh-zarronly.0" }, "dependencies": { "@vivjs/loaders": "^0.16.0", "quickselect": "^2.0.0", - "@vitessce/utils": "workspace:*", - "@vitessce/zarr-utils": "workspace:*", - "@vitessce/constants-internal": "workspace:*", - "@vitessce/globals": "workspace:*", - "@vitessce/error": "workspace:*", "lodash-es": "catalog:", "math.gl": "catalog:", "mathjs": "catalog:", diff --git a/packages/utils/zarr-utils/package.json b/packages/utils/zarr-utils/package.json index 94898de19c..3b47a96e72 100644 --- a/packages/utils/zarr-utils/package.json +++ b/packages/utils/zarr-utils/package.json @@ -1,6 +1,6 @@ { "name": "@vitessce/zarr-utils", - "version": "3.8.8", + "version": "3.8.8-mh-zarronly.0", "author": "HIDIVE Lab at HMS", "homepage": "http://vitessce.io", "repository": { @@ -30,11 +30,13 @@ "test": "pnpm exec vitest --run" }, "dependencies": { - "@zarrita/storage": "catalog:", - "@vitessce/globals": "workspace:*" + "@zarrita/storage": "catalog:" }, "devDependencies": { "unzipit": "^1.4.3", "zarrita": "catalog:" + }, + "peerDependencies": { + "@vitessce/globals": "3.8.8-mh-zarronly.0" } }