Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Throw proper error when indirectly reexporting a recursive binding (#…
…4472) * Throw proper error when indirectly reexporting a recursive binding * Fix unrelated typo
- Loading branch information
1 parent
e3bfe69
commit 2bbdc8e
Showing
4 changed files
with
49 additions
and
8 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
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
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,12 @@ | ||
const path = require('path'); | ||
const ID_MAIN = path.join(__dirname, 'main.js'); | ||
|
||
module.exports = { | ||
description: 'throws proper error for circular reexports', | ||
error: { | ||
code: 'CIRCULAR_REEXPORT', | ||
id: ID_MAIN, | ||
message: '"foo" cannot be exported from main.js as it is a reexport that references itself.', | ||
watchFiles: [ID_MAIN] | ||
} | ||
}; |
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 { foo } from './main.js'; | ||
|
||
export { foo }; |