Closed ghiscoding closed 4 months ago
Run & review this pull request in StackBlitz Codeflow.
Attention: Patch coverage is 0%
with 3 lines
in your changes missing coverage. Please review.
Project coverage is 14.7%. Comparing base (
e34971d
) to head (986fdb0
). Report is 21 commits behind head on master.
Files | Patch % | Lines |
---|---|---|
...es/common/src/extensions/slickDraggableGrouping.ts | 0.0% | 2 Missing :warning: |
packages/common/src/core/slickGrid.ts | 0.0% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
hmm that breaks Jest unit tests since Jest only supports CJS, perhaps I should revisit this if (when) I move from Jest to Vitest
well you could potentially make Jest play nice with ESM. https://jestjs.io/docs/ecmascript-modules I tried that though quite a while ago and it was a mess. Hence why I moved to vitest
well you could potentially make Jest play nice with ESM. https://jestjs.io/docs/ecmascript-modules I tried that though quite a while ago and it was a mess. Hence why I moved to vitest
I tried doing that approach in Lerna-Lite and it was also a big mess, so I decided to switch to Vitest on Lerna-Lite and was happy with the change. The only downside is that in Lerna-Lite, running Vitest is really slow on Windows when using a lot of child_process
that Lerna uses a lot, however that won't be the case here, so I do want to migrate the project to Vitest eventually but considering that I have close to 5k unit tests, that for sure be a challenge. Anyway, that is super low priority.
glad to hear its not me being the only one having trouble with getting esm play nice with jest. 😅
closing for now, might revisit if and when we migrate to Vitest to support ESM
I'm not sure if it's worth it or not but we seem to be using 1kb from the zip when using the ESM build of SortableJS. However the thing that is not as great is that
@types/sortablejs
is not recognized when usingimport Sortable from 'sortablejs/modular/sortable.core.esm.js';
So I had to use something like below with a
@ts-ignore
on the ESM importbefore
after