feat!: remove change$ observable and rxjs dependency#2184
Open
christianhg wants to merge 1 commit intomainfrom
Open
feat!: remove change$ observable and rxjs dependency#2184christianhg wants to merge 1 commit intomainfrom
change$ observable and rxjs dependency#2184christianhg wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: c767b8b The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
7a2161c to
f1e55bf
Compare
f1e55bf to
c9249a2
Compare
change$ observable and rxjs dependency
c9249a2 to
b568462
Compare
The `PortableTextEditor.change$` observable isn't used internally anymore. It's
purely a legacy public API that allows consumers to read editor changes/events
through an Observable rather than through the ordinary subscription API. This
does not justify declaring `rxjs` as a peer dependency of PTE and therefore
this commit removes the `change$` Observable along with the `rxjs` dependency.
BREAKING CHANGES:
- Removed `PortableTextEditor.change$` property
- Removed `EditorChanges` type export (`Subject<EditorChange>`)
- Removed `PatchObservable` type export (`Observable<...>`)
- Removed `rxjs` from peerDependencies
Migration: Replace `change$.subscribe()` with `editor.on()` or
`<EventListenerPlugin on={...} />`. Every active `EditorChange` type
has a 1:1 equivalent in the new event API.
What's preserved:
- `EditorChange` type (still used by sanity's `onEditorChange` prop)
- `PortableTextEditor` class (separate deprecation path)
- All static methods and `schemaTypes` property
b568462 to
c767b8b
Compare
skogsmaskin
approved these changes
Feb 16, 2026
Member
skogsmaskin
left a comment
There was a problem hiding this comment.
Nice! I like that we no longer have rxjs as a dependency here. If someone truly needs it to be an observable, they could create one from the EventListenerPlugin.
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.
The
PortableTextEditor.change$observable isn't used internally anymore. It'spurely a legacy public API that allows consumers to read editor changes/events
through an Observable rather than through the ordinary subscription API. This
does not justify declaring
rxjsas a peer dependency of PTE and thereforethis commit removes the
change$Observable along with therxjsdependency.BREAKING CHANGES:
PortableTextEditor.change$propertyEditorChangestype export (Subject<EditorChange>)PatchObservabletype export (Observable<...>)rxjsfrom peerDependenciesMigration: Replace
change$.subscribe()witheditor.on()or<EventListenerPlugin on={...} />. Every activeEditorChangetypehas a 1:1 equivalent in the new event API.
What's preserved:
EditorChangetype (still used by sanity'sonEditorChangeprop)PortableTextEditorclass (separate deprecation path)schemaTypesproperty