-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
achan3/P2X-1041 new disableSharedBundles config option (#9209)
* Add initial config logic to disable shared bundles * Add test cases for disableSharedBundles config * Shared bundle creation now relies on disableSharedBundles * Add yarn.lock * add new logger warning when both minBundleSize and disableSharedBundles are manually set * Revert "add new logger warning when both minBundleSize and disableSharedBundles are manually set" This reverts commit fd2cdaa. * add warning for conflicting setting of both minBundleSize and disableSharedBundles config options * add test when disableSharedBundler config option isn't set - revert to default value * add test cases for instances that should not throw warnings * add test case where warning is expected * edit defaultBundler to throw warnings for minBundles and maxParallelRequests * condense test cases into minimal combos to test minBundles and maxParallelRequests * prevent reuse of bundles when disableSharedBundles is set * remove import used only for testing * add warning for minBundleSize when shared bundles are disabled * add warning for minBundleSize, remove duplicate disableSharedConfig checks, update test accordingly * stop removal of shared bundles if shared bundles are disabled to begin with --------- Co-authored-by: Iris Moini <[email protected]> Co-authored-by: achan3 <[email protected]>
- Loading branch information
1 parent
df8f72b
commit 6dcba36
Showing
44 changed files
with
619 additions
and
126 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
3 changes: 3 additions & 0 deletions
3
packages/core/integration-tests/test/integration/disable-shared-bundle-single-source/a.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 @@ | ||
import foo from './foo'; | ||
|
||
export default 5; |
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/disable-shared-bundle-single-source/b.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 default 4; |
4 changes: 4 additions & 0 deletions
4
packages/core/integration-tests/test/integration/disable-shared-bundle-single-source/bar.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 @@ | ||
import a from './a'; | ||
import b from './b'; | ||
|
||
export default 3; |
4 changes: 4 additions & 0 deletions
4
packages/core/integration-tests/test/integration/disable-shared-bundle-single-source/foo.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 @@ | ||
import a from './a'; | ||
import b from './b'; | ||
|
||
export default 2; |
4 changes: 4 additions & 0 deletions
4
...ages/core/integration-tests/test/integration/disable-shared-bundle-single-source/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,4 @@ | ||
import('./foo'); | ||
import('./bar'); | ||
|
||
export default 1; |
8 changes: 8 additions & 0 deletions
8
.../core/integration-tests/test/integration/disable-shared-bundle-single-source/package.json
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 @@ | ||
{ | ||
"@parcel/bundler-default": { | ||
"minBundles": 0, | ||
"minBundleSize": 200, | ||
"maxParallelRequests": 100, | ||
"disableSharedBundles": true | ||
} | ||
} |
Empty file.
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/disable-shared-bundles-false/a.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 default 5; |
1 change: 1 addition & 0 deletions
1
packages/core/integration-tests/test/integration/disable-shared-bundles-false/b.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 default 4; |
4 changes: 4 additions & 0 deletions
4
packages/core/integration-tests/test/integration/disable-shared-bundles-false/bar.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 @@ | ||
import a from './a'; | ||
import b from './b'; | ||
|
||
export default 3; |
4 changes: 4 additions & 0 deletions
4
packages/core/integration-tests/test/integration/disable-shared-bundles-false/foo.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 @@ | ||
import a from './a'; | ||
import b from './b'; | ||
|
||
export default 2; |
4 changes: 4 additions & 0 deletions
4
packages/core/integration-tests/test/integration/disable-shared-bundles-false/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,4 @@ | ||
import('./foo'); | ||
import('./bar'); | ||
|
||
export default 1; |
8 changes: 8 additions & 0 deletions
8
packages/core/integration-tests/test/integration/disable-shared-bundles-false/package.json
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 @@ | ||
{ | ||
"@parcel/bundler-default": { | ||
"minBundles": 0, | ||
"minBundleSize": 200, | ||
"maxParallelRequests": 100, | ||
"disableSharedBundles": false | ||
} | ||
} |
Empty file.
1 change: 1 addition & 0 deletions
1
...s/core/integration-tests/test/integration/disable-shared-bundles-true-min-bundleSize/a.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 default 5; |
1 change: 1 addition & 0 deletions
1
...s/core/integration-tests/test/integration/disable-shared-bundles-true-min-bundleSize/b.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 default 4; |
4 changes: 4 additions & 0 deletions
4
...core/integration-tests/test/integration/disable-shared-bundles-true-min-bundleSize/bar.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 @@ | ||
import a from './a'; | ||
import b from './b'; | ||
|
||
export default 3; |
Oops, something went wrong.