WebReflection / linkedom

A triple-linked lists based DOM implementation.
https://webreflection.medium.com/linkedom-a-jsdom-alternative-53dd8f699311
ISC License
1.62k stars 78 forks source link

cdata-section beaks esm import #234

Closed jefbarn closed 9 months ago

jefbarn commented 9 months ago

Error [ERR_MODULE_NOT_FOUND]: Cannot find module '.../linkedom/esm/interface/cdata-section' imported from .../node_modules/linkedom/esm/shared/facades.js

The facades.js file needs the cdata import to have the '.js' extension.

https://github.com/WebReflection/linkedom/blob/6f21a9df53e12431a1a38f0974c69b4fb9ee57ce/esm/shared/facades.js#L3C74-L3C74

bartveneman commented 9 months ago

Having the same issue in 0.16.0. Version 0.15.6 is not affected by this issue.

WebReflection commented 9 months ago

damn it TS users ...

WebReflection commented 9 months ago

apologies I should've paid more attention, not even sure why tests pass there ... fixed now.

WebReflection commented 9 months ago

not even sure why tests pass there

FWIWI actually I know why, CJS does the same, it fallsback to .js so no problems whatsoever there ... bummer, this should've been caught earlier. Sorry again.

WebReflection commented 9 months ago

OK, this should never happen again.

bartveneman commented 9 months ago

Hey, no worries, thanks for the quick fix + tests!