Repository navigation
build(deps)!: make shared vis packages and regl peer dependencies - #326
Merged
Merged
Conversation
- Move vis-core, vis-geometry, and regl to peerDependencies (workspace:^) in core, dzi, omezarr, and scatterbrain, keeping them as devDependencies for local linking - Align regl to 2.1.1 across the workspace and drop the now-unneeded @ts-expect-error in the scatterbrain demo - Replace .npmrc with saveExact in pnpm-workspace.yaml - Configure git-cliff so breaking changes bump the 0.x minor version instead of jumping to 1.0.0 - Document peer dependency installs and policy; remove the obsolete GitHub Packages auth page and fix stale README/docs references BREAKING CHANGE: consumers must install @alleninstitute/vis-core, @alleninstitute/vis-geometry, and regl alongside the packages that depend on them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jarbuckle
approved these changes
Nov 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Make
@alleninstitute/vis-core,@alleninstitute/vis-geometry, andreglpeer dependencies of the packages that build on them, so consumers end up with a single shared copy instead of mismatched duplicates. Follow-up to the discussion in #320.Why
workspace:*publishes as an exact version, so each package currently pins its own copy of the shared packages. For example, the latestvis-dzion npm depends onvis-core@0.0.6andvis-geometry@0.0.8, while the latestvis-omezarrdepends onvis-core@0.1.5andvis-geometry@0.1.1. An app using both installs two copies of each.#320 hit this with
CartesianPlane, but the same problem affects anything that crosses package boundaries:VisZarrError extends VisError: with two copies of core,e instanceof VisErrorsilently fails#privatefields (SharedPriorityCache,PriorityCache,RenderServer,WorkerPool) that the consumer builds and passes into omezarr, dzi, or scatterbrainregl: the consumer owns the context. Scatterbrain was pinned to2.1.0while everything else used2.1.1, which is why the scatterbrain demo needed a@ts-expect-errorHow
Dependencies
core:vis-geometryandreglmoved topeerDependenciesdzi,omezarr,scatterbrain:vis-core,vis-geometry, andreglmoved topeerDependenciesworkspace:^, which publishes as a caret range (e.g.^0.1.5). Since a 0.x minor bump is our breaking change, that accepts patch releases only.regluses^2.1.0.devDependency(workspace:*/regl@2.1.1) so the workspace still links locally@ts-expect-errorinsite/src/examples/scatterbrain/demo.tsxPacked manifest for omezarr, checked with
pnpm pack:Tooling
.npmrc(save-exact=true) withsaveExact: trueinpnpm-workspace.yaml[bump] breaking_always_bump_major = falsetocliff.toml. Without it, git-cliff's default would release this breaking commit as1.0.0for every package. With it, the next releases come out as core0.2.0, omezarr0.3.0, scatterbrain0.2.0, and dzi0.1.0.Docs
getting-started/using-packages.md(for consumers) anddevelopers/dependencies.md(the rule for what should be a peer, and how to widen ranges)0.0.xversioning note, the missingvis-scatterbrainentry, and the deaddocs/*.mdlinksBreaking change
Consumers must install
@alleninstitute/vis-core,@alleninstitute/vis-geometry, andreglalongside the packages that depend on them. npm 7+ and pnpm install peers automatically; Yarn does not. The commit is marked!/BREAKING CHANGEso it appears in each package's changelog.PR Checklist
main?Locally:
pnpm build,pnpm typecheck,pnpm test, andpnpm fmt:checkpass. The examples were built but not smoke tested in a browser.🤖 Generated with Claude Code