Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cache transitive reexport detection (#2864)
* Make test actually test the issue that was fixed, add basic caching for reexports * Refine caching and add a side-effect to the test
- Loading branch information
1 parent
020e87f
commit 72f2e81
Showing
34 changed files
with
100 additions
and
114 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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/preserve-modules-nested-export/_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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module.exports = { | ||
description: 'confirm exports are preserved when exporting a module', | ||
options: { | ||
input: ['main1.js', 'main2.js'], | ||
input: 'main.js', | ||
preserveModules: true | ||
} | ||
}; |
7 changes: 0 additions & 7 deletions
7
test/chunking-form/samples/preserve-modules-nested-export/_expected/amd/dep.js
This file was deleted.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
...g-form/samples/preserve-modules-nested-export/_expected/amd/inner/more_inner/something.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,7 @@ | ||
define(['exports'], function (exports) { 'use strict'; | ||
|
||
const Something = 'Hello World'; | ||
|
||
exports.Something = Something; | ||
|
||
}); |
5 changes: 5 additions & 0 deletions
5
test/chunking-form/samples/preserve-modules-nested-export/_expected/amd/inner/some_effect.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,5 @@ | ||
define(function () { 'use strict'; | ||
|
||
console.log('side-effect'); | ||
|
||
}); |
9 changes: 9 additions & 0 deletions
9
test/chunking-form/samples/preserve-modules-nested-export/_expected/amd/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,9 @@ | ||
define(['exports', './inner/more_inner/something', './inner/some_effect'], function (exports, __chunk_1, __chunk_3) { 'use strict'; | ||
|
||
|
||
|
||
exports.Something = __chunk_1.Something; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
}); |
9 changes: 0 additions & 9 deletions
9
test/chunking-form/samples/preserve-modules-nested-export/_expected/amd/main1.js
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
test/chunking-form/samples/preserve-modules-nested-export/_expected/amd/main2.js
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
test/chunking-form/samples/preserve-modules-nested-export/_expected/cjs/dep.js
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
...g-form/samples/preserve-modules-nested-export/_expected/cjs/inner/more_inner/something.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,5 @@ | ||
'use strict'; | ||
|
||
const Something = 'Hello World'; | ||
|
||
exports.Something = Something; |
3 changes: 3 additions & 0 deletions
3
test/chunking-form/samples/preserve-modules-nested-export/_expected/cjs/inner/some_effect.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 @@ | ||
'use strict'; | ||
|
||
console.log('side-effect'); |
10 changes: 10 additions & 0 deletions
10
test/chunking-form/samples/preserve-modules-nested-export/_expected/cjs/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,10 @@ | ||
'use strict'; | ||
|
||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
|
||
var __chunk_1 = require('./inner/more_inner/something.js'); | ||
require('./inner/some_effect.js'); | ||
|
||
|
||
|
||
exports.Something = __chunk_1.Something; |
9 changes: 0 additions & 9 deletions
9
test/chunking-form/samples/preserve-modules-nested-export/_expected/cjs/main1.js
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
test/chunking-form/samples/preserve-modules-nested-export/_expected/cjs/main2.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/chunking-form/samples/preserve-modules-nested-export/_expected/es/dep.js
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
...ng-form/samples/preserve-modules-nested-export/_expected/es/inner/more_inner/something.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 @@ | ||
const Something = 'Hello World'; | ||
|
||
export { Something }; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/preserve-modules-nested-export/_expected/es/inner/some_effect.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 @@ | ||
console.log('side-effect'); |
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/preserve-modules-nested-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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export { Something } from './inner/more_inner/something.js'; | ||
import './inner/some_effect.js'; |
1 change: 0 additions & 1 deletion
1
test/chunking-form/samples/preserve-modules-nested-export/_expected/es/main1.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/chunking-form/samples/preserve-modules-nested-export/_expected/es/main2.js
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
...orm/samples/preserve-modules-nested-export/_expected/system/inner/more_inner/something.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,10 @@ | ||
System.register([], function (exports, module) { | ||
'use strict'; | ||
return { | ||
execute: function () { | ||
|
||
const Something = exports('Something', 'Hello World'); | ||
|
||
} | ||
}; | ||
}); |
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
13 changes: 13 additions & 0 deletions
13
test/chunking-form/samples/preserve-modules-nested-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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
System.register(['./inner/more_inner/something.js', './inner/some_effect.js'], function (exports, module) { | ||
'use strict'; | ||
return { | ||
setters: [function (module) { | ||
exports('Something', module.Something); | ||
}, function () {}], | ||
execute: function () { | ||
|
||
|
||
|
||
} | ||
}; | ||
}); |
13 changes: 0 additions & 13 deletions
13
test/chunking-form/samples/preserve-modules-nested-export/_expected/system/main1.js
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
test/chunking-form/samples/preserve-modules-nested-export/_expected/system/main2.js
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
test/chunking-form/samples/preserve-modules-nested-export/dep.js
This file was deleted.
Oops, something went wrong.
2 changes: 2 additions & 0 deletions
2
test/chunking-form/samples/preserve-modules-nested-export/inner/index.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 * from './more_inner/index'; | ||
import './some_effect'; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/preserve-modules-nested-export/inner/more_inner/index.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 @@ | ||
export * from './something'; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/preserve-modules-nested-export/inner/more_inner/something.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 @@ | ||
export const Something = 'Hello World'; |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/preserve-modules-nested-export/inner/some_effect.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 @@ | ||
console.log('side-effect'); |
1 change: 1 addition & 0 deletions
1
test/chunking-form/samples/preserve-modules-nested-export/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 @@ | ||
export * from './inner/index'; |
1 change: 0 additions & 1 deletion
1
test/chunking-form/samples/preserve-modules-nested-export/main1.js
This file was deleted.
Oops, something went wrong.
1 change: 0 additions & 1 deletion
1
test/chunking-form/samples/preserve-modules-nested-export/main2.js
This file was deleted.
Oops, something went wrong.