Esm: instanceof check failing as of 3.0.27

Created on 26 Apr 2018  路  4Comments  路  Source: standard-things/esm

In my package awry I have some instanceof checks in my tests. These aren't terribly important, but I found it odd that they were passing in 3.0.26 of esm and failing in 3.0.27.

Any idea why that might be?

specifically these tests:
https://github.com/chadxz/awry/blob/04c882f3864e2b1749d0823452be72e9e3e90fe0/test/api/index.spec.mjs

bug

Most helpful comment

v3.0.28 is released 馃帀

All 4 comments

Hi @chadxz!

At first guess it looks like it could be related to CJS named exports tweaks or maybe not.
Could you create a simple repro that I can investigate.

Update:

No need for a repro _(I used awry as one)_.
I narrowed the problem commit down to https://github.com/standard-things/esm/commit/c36988de6d3ffc5d85dd81a87974b4cf50b3c922.

Update:

Fixed it locally changing

if (isUnexposed &&
    extname(filename) === ".mjs") {

to

if (isUnexposed ||
    extname(filename) === ".mjs") {

Cool. thank you

v3.0.28 is released 馃帀

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pvdlg picture pvdlg  路  3Comments

StphamZ picture StphamZ  路  3Comments

MVSICA-FICTA picture MVSICA-FICTA  路  3Comments

dnalborczyk picture dnalborczyk  路  3Comments

clock157 picture clock157  路  3Comments