Skip to content

Commit

Permalink
Do not warn for hidden namespace conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Jan 25, 2022
1 parent f30e6f0 commit 4351780
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
30 changes: 30 additions & 0 deletions test/function/samples/synthetic-named-export-entry/_config.js
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'
});
}
};
6 changes: 6 additions & 0 deletions test/function/samples/synthetic-named-export-entry/main.js
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';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const synthNoOverride = { noOverride: true };
export const noOverride = 'noOverride';
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const synthOverride = { override: true };
export const override = 'override';

0 comments on commit 4351780

Please sign in to comment.