-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not warn for hidden namespace conflicts
- Loading branch information
1 parent
f30e6f0
commit 4351780
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
30 changes: 30 additions & 0 deletions
30
test/function/samples/synthetic-named-export-entry/_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,30 @@ | ||
const assert = require('assert'); | ||
const path = require('path'); | ||
const ID_MAIN = path.join(__dirname, 'main.js'); | ||
|
||
module.exports = { | ||
skip: true, | ||
description: 'does not expose synthetic named exports on entry points', | ||
options: { | ||
plugins: [ | ||
{ | ||
transform(code, id) { | ||
// TODO Lukas assign correct synthetic namespaces | ||
// switch (id) { | ||
// case ID_MAIN: | ||
// return { syntheticNamedExports: 'synthMain' }; | ||
// } | ||
} | ||
} | ||
] | ||
}, | ||
exports(exports) { | ||
assert.deepStrictEqual(exports, { | ||
explicitReexport: { override: true }, | ||
main: 'main', | ||
noOverride: 'noOverride', | ||
override: 'override', | ||
synthOverride: 'overridden' | ||
}); | ||
} | ||
}; |
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,6 @@ | ||
// export const synthMain = { main: true }; | ||
// export const main = 'main'; | ||
// export * from './noOverride.js'; | ||
export * from './override.js'; | ||
export const synthOverride = 'overridden'; | ||
// export { synthOverride as explicitReexport } from './override.js'; |
2 changes: 2 additions & 0 deletions
2
test/function/samples/synthetic-named-export-entry/noOverride.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,2 @@ | ||
export const synthNoOverride = { noOverride: true }; | ||
export const noOverride = 'noOverride'; |
2 changes: 2 additions & 0 deletions
2
test/function/samples/synthetic-named-export-entry/override.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,2 @@ | ||
export const synthOverride = { override: true }; | ||
export const override = 'override'; |