rollup 2.51.1 → 2.51.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rollup.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.51.1
4
- Tue, 08 Jun 2021 05:41:03 GMT - commit 76dedd65e6059f60964684ac7c3cfb89ce5c5523
3
+ Rollup.js v2.51.2
4
+ Fri, 11 Jun 2021 05:35:15 GMT - commit bfae7910ea7553d56782cb5ee0c8581e2b451729
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.51.1
4
- Tue, 08 Jun 2021 05:41:03 GMT - commit 76dedd65e6059f60964684ac7c3cfb89ce5c5523
3
+ Rollup.js v2.51.2
4
+ Fri, 11 Jun 2021 05:35:15 GMT - commit bfae7910ea7553d56782cb5ee0c8581e2b451729
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.51.1
4
- Tue, 08 Jun 2021 05:41:03 GMT - commit 76dedd65e6059f60964684ac7c3cfb89ce5c5523
3
+ Rollup.js v2.51.2
4
+ Fri, 11 Jun 2021 05:35:15 GMT - commit bfae7910ea7553d56782cb5ee0c8581e2b451729
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.51.1
4
- Tue, 08 Jun 2021 05:41:03 GMT - commit 76dedd65e6059f60964684ac7c3cfb89ce5c5523
3
+ Rollup.js v2.51.2
4
+ Fri, 11 Jun 2021 05:35:15 GMT - commit bfae7910ea7553d56782cb5ee0c8581e2b451729
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.51.1
4
- Tue, 08 Jun 2021 05:41:03 GMT - commit 76dedd65e6059f60964684ac7c3cfb89ce5c5523
3
+ Rollup.js v2.51.2
4
+ Fri, 11 Jun 2021 05:35:15 GMT - commit bfae7910ea7553d56782cb5ee0c8581e2b451729
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -32,7 +32,7 @@ function _interopNamespaceDefault(e) {
32
32
 
33
33
  var fs__namespace = /*#__PURE__*/_interopNamespaceDefault(fs);
34
34
 
35
- var version$1 = "2.51.1";
35
+ var version$1 = "2.51.2";
36
36
 
37
37
  function ensureArray(items) {
38
38
  if (Array.isArray(items)) {
@@ -9786,6 +9786,7 @@ class Module {
9786
9786
  this.implicitlyLoadedBefore = new Set();
9787
9787
  this.importDescriptions = Object.create(null);
9788
9788
  this.importMetas = [];
9789
+ this.importedFromNotTreeshaken = false;
9789
9790
  this.importers = [];
9790
9791
  this.imports = new Set();
9791
9792
  this.includedDynamicImporters = [];
@@ -9917,12 +9918,12 @@ class Module {
9917
9918
  }
9918
9919
  if (!this.options.treeshake || this.info.hasModuleSideEffects === 'no-treeshake') {
9919
9920
  for (const dependency of this.dependencies) {
9920
- if (dependency instanceof ExternalModule || dependency.isIncluded()) {
9921
- relevantDependencies.add(dependency);
9922
- }
9921
+ relevantDependencies.add(dependency);
9923
9922
  }
9924
9923
  }
9925
- this.addRelevantSideEffectDependencies(relevantDependencies, necessaryDependencies, alwaysCheckedDependencies);
9924
+ else {
9925
+ this.addRelevantSideEffectDependencies(relevantDependencies, necessaryDependencies, alwaysCheckedDependencies);
9926
+ }
9926
9927
  for (const dependency of necessaryDependencies) {
9927
9928
  relevantDependencies.add(dependency);
9928
9929
  }
@@ -10110,7 +10111,7 @@ class Module {
10110
10111
  this.ast.include(createInclusionContext(), true);
10111
10112
  }
10112
10113
  isIncluded() {
10113
- return this.ast.included || this.namespace.included;
10114
+ return this.ast.included || this.namespace.included || this.importedFromNotTreeshaken;
10114
10115
  }
10115
10116
  linkImports() {
10116
10117
  this.addModulesToImportDescriptions(this.importDescriptions);
@@ -19551,6 +19552,13 @@ class ModuleLoader {
19551
19552
  module.dependencies.add(dependency);
19552
19553
  dependency.importers.push(module.id);
19553
19554
  }
19555
+ if (!this.options.treeshake || module.info.hasModuleSideEffects === 'no-treeshake') {
19556
+ for (const dependency of module.dependencies) {
19557
+ if (dependency instanceof Module) {
19558
+ dependency.importedFromNotTreeshaken = true;
19559
+ }
19560
+ }
19561
+ }
19554
19562
  }
19555
19563
  getNormalizedResolvedIdWithoutDefaults(resolveIdResult, importer, source) {
19556
19564
  const { makeAbsoluteExternalsRelative } = this.options;
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.51.1
4
- Tue, 08 Jun 2021 05:41:03 GMT - commit 76dedd65e6059f60964684ac7c3cfb89ce5c5523
3
+ Rollup.js v2.51.2
4
+ Fri, 11 Jun 2021 05:35:15 GMT - commit bfae7910ea7553d56782cb5ee0c8581e2b451729
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.51.1
4
- Tue, 08 Jun 2021 05:41:03 GMT - commit 76dedd65e6059f60964684ac7c3cfb89ce5c5523
3
+ Rollup.js v2.51.2
4
+ Fri, 11 Jun 2021 05:35:15 GMT - commit bfae7910ea7553d56782cb5ee0c8581e2b451729
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rollup",
3
- "version": "2.51.1",
3
+ "version": "2.51.2",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",