New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Take dynamic dependencies into account when calculating hashes #2596
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
module.exports = { | ||
description: 'chunk aliasing with extensions', | ||
options: { | ||
input: ['main1', 'main2', 'main3.ts'], | ||
output: { | ||
chunkFileNames: 'generated-[name].js' | ||
} | ||
input: ['main1', 'main2', 'main3.ts'] | ||
} | ||
}; |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/basic-chunking/_expected/amd/main1.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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/basic-chunking/_expected/amd/main2.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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/basic-chunking/_expected/cjs/main1.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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/basic-chunking/_expected/cjs/main2.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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/basic-chunking/_expected/es/main1.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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/basic-chunking/_expected/es/main2.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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/basic-chunking/_expected/system/main1.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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/basic-chunking/_expected/system/main2.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
10 changes: 0 additions & 10 deletions
10
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/amd/chunk-264eb6ba.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/amd/generated-chunk2.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 @@ | ||
define(['exports', './generated-chunk.js', './generated-chunk3.js'], function (exports, __chunk_1, __chunk_3) { 'use strict'; | ||
|
||
var x = __chunk_1.x + 1; | ||
|
||
var y = __chunk_3.x + 1; | ||
|
||
exports.x = x; | ||
exports.y = y; | ||
|
||
}); |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/amd/main1.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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/amd/main2.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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/amd/main3.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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/amd/main4.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
11 changes: 0 additions & 11 deletions
11
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/cjs/chunk-61a62bc6.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
11 changes: 11 additions & 0 deletions
11
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/cjs/generated-chunk2.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,11 @@ | ||
'use strict'; | ||
|
||
var __chunk_1 = require('./generated-chunk.js'); | ||
var __chunk_3 = require('./generated-chunk3.js'); | ||
|
||
var x = __chunk_1.x + 1; | ||
|
||
var y = __chunk_3.x + 1; | ||
|
||
exports.x = x; | ||
exports.y = y; |
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/cjs/main1.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 @@ | ||
'use strict'; | ||
|
||
require('./chunk-8a340a3c.js'); | ||
var __chunk_2 = require('./chunk-61a62bc6.js'); | ||
require('./chunk-4b766e46.js'); | ||
require('./generated-chunk.js'); | ||
var __chunk_2 = require('./generated-chunk2.js'); | ||
require('./generated-chunk3.js'); | ||
|
||
console.log(__chunk_2.x + __chunk_2.y); |
6 changes: 3 additions & 3 deletions
6
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/cjs/main2.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,6 +1,6 @@ | ||
'use strict'; | ||
|
||
require('./chunk-8a340a3c.js'); | ||
require('./chunk-61a62bc6.js'); | ||
require('./chunk-4b766e46.js'); | ||
require('./generated-chunk.js'); | ||
require('./generated-chunk2.js'); | ||
require('./generated-chunk3.js'); | ||
|
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/cjs/main3.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 @@ | ||
'use strict'; | ||
|
||
require('./chunk-8a340a3c.js'); | ||
require('./generated-chunk.js'); | ||
|
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/cjs/main4.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 @@ | ||
'use strict'; | ||
|
||
require('./chunk-4b766e46.js'); | ||
require('./generated-chunk3.js'); | ||
|
8 changes: 0 additions & 8 deletions
8
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/es/chunk-c223c238.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
8 changes: 8 additions & 0 deletions
8
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/es/generated-chunk2.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,8 @@ | ||
import { a as x } from './generated-chunk.js'; | ||
import { a as x$1 } from './generated-chunk3.js'; | ||
|
||
var x$2 = x + 1; | ||
|
||
var y = x$1 + 1; | ||
|
||
export { x$2 as a, y as b }; |
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/es/main1.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,5 +1,5 @@ | ||
import './chunk-91999913.js'; | ||
import { a as x, b as y } from './chunk-c223c238.js'; | ||
import './chunk-78fb52ac.js'; | ||
import './generated-chunk.js'; | ||
import { a as x, b as y } from './generated-chunk2.js'; | ||
import './generated-chunk3.js'; | ||
|
||
console.log(x + y); |
6 changes: 3 additions & 3 deletions
6
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/es/main2.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,3 +1,3 @@ | ||
import './chunk-91999913.js'; | ||
import './chunk-c223c238.js'; | ||
import './chunk-78fb52ac.js'; | ||
import './generated-chunk.js'; | ||
import './generated-chunk2.js'; | ||
import './generated-chunk3.js'; |
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/es/main3.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 +1 @@ | ||
import './chunk-91999913.js'; | ||
import './generated-chunk.js'; |
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/es/main4.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 +1 @@ | ||
import './chunk-78fb52ac.js'; | ||
import './generated-chunk3.js'; |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...gnment/_expected/system/chunk-61e8212c.js → ...ment/_expected/system/generated-chunk2.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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/system/main1.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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/system/main2.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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/system/main3.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
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-deshadowing-reassignment/_expected/system/main4.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
5 changes: 0 additions & 5 deletions
5
test/chunking-form/samples/chunk-execution-order/_expected/amd/chunk-7d7b15ed.js
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions
5
test/chunking-form/samples/chunk-execution-order/_expected/amd/generated-chunk3.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(['./generated-chunk.js', './generated-chunk2.js'], function (__chunk_1, __chunk_2) { 'use strict'; | ||
|
||
console.log('11'); | ||
|
||
}); |
2 changes: 1 addition & 1 deletion
2
test/chunking-form/samples/chunk-execution-order/_expected/amd/main1.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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We do need the rendered hash of the source itself here. How else would changing the source without changing any other dependency information change the hash?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rendered hash is added in
visitDependencies
. I made a note to add a new test category at some point to prove this is actually the case.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be somewhat confusing, though, that visitDependencies always visits the base chunk first. Maybe the name should be improved.