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

Why not add "type": "module" in package.json of y-websocket? #128

Open
2 tasks done
kapv89 opened this issue Nov 11, 2022 · 0 comments
Open
2 tasks done

Why not add "type": "module" in package.json of y-websocket? #128

kapv89 opened this issue Nov 11, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@kapv89
Copy link

kapv89 commented Nov 11, 2022

Checklist

Describe the bug
As seen in this repo - https://github.com/kapv89/yjs-scalable-ws-backend/tree/external_api_persistence ... adding "type": "module" to package.json of y-websocket allows y-websocket to be used in node-environment for unit tests. Not sure why this is not done yet by default on this package.

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/kapv89/yjs-scalable-ws-backend/tree/external_api_persistence (the specific branch)
  2. Follow steps in Usage. See tests working fine
  3. In one run, don't follow step#5 in Usage, complete the steps and see the error caused by y-websocket lacking "type": "module"

Expected behavior
It should be trivial to use y-websocket in tests of your y-crdt websocket-backend. It's not right now.

Environment Information

  • Node.js
    crdt-backend@1.0.0 /Users/kv/Projects/ref/yjs-scalable-ws-backend
    ├─┬ y-websocket@1.3.16
    │ ├─┬ y-leveldb@0.1.0
    │ │ └── yjs@13.5.42 deduped
    │ └── yjs@13.5.42 deduped
    └── yjs@13.5.42
@kapv89 kapv89 added the bug Something isn't working label Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants