y-prosemirror icon indicating copy to clipboard operation
y-prosemirror copied to clipboard

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

Open jmoudrik opened this issue 1 year ago • 0 comments

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 :-) https://github.com/yjs/yjs/compare/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 avatar Oct 05 '23 14:10 jmoudrik