TeselaGen / openVectorEditor

DEPRECATED - Teselagen's Open Source Vector/Plasmid Editor Component
https://teselagen.github.io/tg-oss/ove/#/Editor
MIT License
200 stars 72 forks source link

fix(compat): fix compatibility for vitest #882

Closed smeng9 closed 1 year ago

smeng9 commented 1 year ago

Hi @tnrich

We need to modify the package.json file slightly in order to use open-vector-editor in vitest.

Vitest seems does not use "module" field in package.json. We have to add this "exports" field for it to resolve es modules correctly, otherwise it will resolve to the incorrect copy of file.

smeng9 commented 1 year ago

Related:

https://github.com/TeselaGen/teselagen-react-components/pull/305 https://github.com/tnrich/use-local-storage-state/pull/1

cypress[bot] commented 1 year ago

3 failed tests on run #1582 ↗︎

3 266 1 0 Flakiness 0

Details:

Merge dc0aaf2de6f79e82b8924d68ac08e87bf8feba14 into 6b09502a24723e4c451a98f95014...
Project: openVectorEditor Commit: 6914e7a7c6 ℹ️
Status: Failed Duration: 17:23 💡
Started: Mar 7, 2023 11:00 AM Ended: Mar 7, 2023 11:17 AM
Failed  editing.spec.js • 1 failed test View Output Video
Test Artifacts
editing > should return focus correctly after typing in chars in circular view Output Screenshots Video
Failed  toolbar.spec.js • 1 failed test View Output Video
Test Artifacts
toolbar > you should be able to undo and redo the deletion of several features Output Screenshots Video
Failed  allowPartOverhangs.spec.js • 1 failed test View Output Video
Test Artifacts
allowPartOverhangs > allowPartOverhangs option should work as expected Output Screenshots Video

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

tnrich commented 1 year ago

Hi @smeng9 I've just published the 3 packages you've modified. Lemme know if that does it for ya!

smeng9 commented 1 year ago

Hi @tnrich I believe you also need to bump the version here https://github.com/TeselaGen/openVectorEditor/blob/master/package.json#L69 since a new package is published

tnrich commented 1 year ago

@smeng9 done, thanks!

tnrich commented 1 year ago

@smeng9 is everything working ok for you?

smeng9 commented 1 year ago

Yes works well for me for vite 4.2beta and vitest 0.29, no more errors.