Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deconflict build-in names, resolves #2680
- Loading branch information
1 parent
3a7d560
commit 5eec80a
Showing
48 changed files
with
590 additions
and
57 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
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
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
4 changes: 2 additions & 2 deletions
4
test/chunking-form/samples/missing-export-compact/_expected/es/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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
import {missingFn as _missingExportShim$1,x}from'./dep.js';_missingExportShim$1(); | ||
x(_missingExportShim$1); | ||
import {missingFn as _missingExportShim,x}from'./dep.js';_missingExportShim(); | ||
x(_missingExportShim); |
4 changes: 2 additions & 2 deletions
4
test/chunking-form/samples/missing-export-compact/_expected/system/main.js
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
test/chunking-form/samples/missing-export-reused-deconflicting/_expected/es/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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { missing1 as _missingExportShim$1 } from './dep1.js'; | ||
import { missing2 as _missingExportShim$2, previousShimmedExport as _missingExportShim$3 } from './dep2.js'; | ||
import { missing1 as _missingExportShim } from './dep1.js'; | ||
import { missing2 as _missingExportShim$1, previousShimmedExport as _missingExportShim$2 } from './dep2.js'; | ||
|
||
console.log(_missingExportShim$1, _missingExportShim$2, _missingExportShim$3); | ||
console.log(_missingExportShim, _missingExportShim$1, _missingExportShim$2); |
10 changes: 5 additions & 5 deletions
10
test/chunking-form/samples/missing-export-reused-deconflicting/_expected/system/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
6 changes: 3 additions & 3 deletions
6
test/chunking-form/samples/missing-export/_expected/es/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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { missingFn as _missingExportShim$1, x } from './dep.js'; | ||
import { missingFn as _missingExportShim, x } from './dep.js'; | ||
|
||
_missingExportShim$1(); | ||
x(_missingExportShim$1, _missingExportShim$1); | ||
_missingExportShim(); | ||
x(_missingExportShim, _missingExportShim); |
8 changes: 4 additions & 4 deletions
8
test/chunking-form/samples/missing-export/_expected/system/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
4 changes: 4 additions & 0 deletions
4
test/form/samples/deconflict-format-specific-exports/_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,4 @@ | ||
module.exports = { | ||
description: 'only deconflict "exports" for formats where it is necessary', | ||
options: { output: { name: 'bundle' } } | ||
}; |
29 changes: 29 additions & 0 deletions
29
test/form/samples/deconflict-format-specific-exports/_expected/amd.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,29 @@ | ||
define(['exports'], function (exports) { 'use strict'; | ||
|
||
const exports$1 = { | ||
x: 42 | ||
}; | ||
console.log(exports$1); | ||
|
||
function nestedConflict() { | ||
const exports$1 = { | ||
x: 42 | ||
}; | ||
console.log(exports$1); | ||
exports.x++; | ||
} | ||
|
||
function nestedNoConflict() { | ||
const exports = { | ||
x: 42 | ||
}; | ||
console.log(exports); | ||
} | ||
|
||
exports.x = 43; | ||
nestedConflict(); | ||
nestedNoConflict(); | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}); |
27 changes: 27 additions & 0 deletions
27
test/form/samples/deconflict-format-specific-exports/_expected/cjs.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,27 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
const exports$1 = { | ||
x: 42 | ||
}; | ||
console.log(exports$1); | ||
|
||
function nestedConflict() { | ||
const exports$1 = { | ||
x: 42 | ||
}; | ||
console.log(exports$1); | ||
exports.x++; | ||
} | ||
|
||
function nestedNoConflict() { | ||
const exports = { | ||
x: 42 | ||
}; | ||
console.log(exports); | ||
} | ||
|
||
exports.x = 43; | ||
nestedConflict(); | ||
nestedNoConflict(); |
Oops, something went wrong.