-
-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(commonjs)!: check if defaultIsModuleExports is auto for getDefaul…
…tExportFromCjs (#1358) * fix: getEsImportProxy should check whether defaultIsModuleExports option is auto, if defaultIsModuleExports option is auto, the export may should be wrapped with getDefaultExportFromCjs * fix: add test cases when import a module from a cjs with circular Co-authored-by: flyingbirdhub <>
- Loading branch information
1 parent
2c2fe9b
commit 4766d93
Showing
8 changed files
with
124 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/commonjs/test/fixtures/function/esm-import-cjs-circular-dependency/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
description: 'esm import cjs circular dependency', | ||
}; |
3 changes: 3 additions & 0 deletions
3
packages/commonjs/test/fixtures/function/esm-import-cjs-circular-dependency/main.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import cjs from 'cjs-circular'; | ||
|
||
t.is(cjs, 'foo'); |
10 changes: 10 additions & 0 deletions
10
packages/commonjs/test/node_modules/cjs-circular/circular.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
packages/commonjs/test/node_modules/cjs-circular/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.