Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync-plugin: make y-prosemirror build against new yjs. #144

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmoudrik
Copy link

@jmoudrik jmoudrik commented Oct 5, 2023

Issue:
Currently, y-prosemirror does not build against yjs newer (or equal) than v13.5.45, it npm run dist throws:

src/plugins/sync-plugin.js:662:36 - error TS2554: Expected 0 arguments, but got 1.

662     const attrs = el.getAttributes(snapshot)
                                       ~~~~~~~~
Found 1 error in src/plugins/sync-plugin.js:662

Cause:
In yjs, the el.getAttributes(snapshot) was changed to el.getAttributes(), (the implementation did not use the snapshot arg anyway) here - if I am git blaming correctly :-)
yjs/yjs@v13.5.44...v13.5.45#diff-c299d1b6aeba1b81704fa26fd317da05091111fc72ac264c0772d2563ed9f6f8L1237

Fix:

  • rm the arg as well to support newer yjs
  • bump up package.json deps to the lowest yjs version with the arg removed

@jmoudrik jmoudrik changed the title sync-plugin: make y-prosemirror not building against new yjs. sync-plugin: make y-prosemirror build against new yjs. Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant