Skip to content

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