fix: _interopRequireWildcard should only cache objects (#10574)
* fix: [#10561] _interopRequireWildcard should cache object only * fix: narrow down cache restriction to object/function type * test: add interop require null module case
This commit is contained in:
committed by
Nicolò Ribaudo
parent
78cd63d9cf
commit
fe258dec04
@@ -0,0 +1,3 @@
|
||||
return import("./mod.js").then(({ default: def }) => {
|
||||
expect(def).toBe(null);
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = null;
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"parserOpts": {
|
||||
"allowReturnOutsideFunction": true
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
return import("./mod.js").then(({ default: def }) => {
|
||||
expect(def).toBe("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==");
|
||||
});
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8BQDwAEhQGAhKmMIQAAAABJRU5ErkJggg==";
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"parserOpts": {
|
||||
"allowReturnOutsideFunction": true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user