Repository navigation
fix(annotator): move the React adapter to the ./react subpath so the root stays headless - #911
Merged
Merged
Conversation
…root stays headless The root re-exported the React adapter, so importing @visionset/annotator required the optional react peer. The adapter is now the separate @visionset/annotator/react entry; in-repo consumers import from it, and the package verifier gains a react-free consumer and a root-store/react-hook type check. Breaking for importers of React adapter names from the root. Fixes #843
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.
Fixes #843
@visionset/annotatordeclaredreactas an optional peer, but its only entry point re-exported the React adapter as values, so the package could not be imported without React.Change
@visionset/annotator/reactexport; the optional peer stays.tsupbuilds two entries with splitting on, so both share one copy of the core (stores, error classes).ui-coreandappnow import React-adapter names from/react.scripts/verify_npm_packages.shgains a consumer that installs only the annotator tarball, assertsreactis absent and imports the root. The existing consumer also imports./reactand type-checks a root-created store against the./reacthooks.CHANGELOG.mdrecords it.Breaking
Importers of React adapter names from the package root must switch to
@visionset/annotator/react. The package is a 0.0.x beta; all in-repo consumers are updated.Verification
pnpm -r build, annotator lint and tests, ui-core and app lint, andverify_npm_packages.shpass.ERR_MODULE_NOT_FOUND; the new gate covers that case.UI-affecting (touches
ui-coreandapp): for human review before merge.