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/es/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
@@ -14,7 +14,7 @@ import * as fs from 'fs';
14
14
  import { lstatSync, realpathSync, readdirSync } from 'fs';
15
15
  import { EventEmitter } from 'events';
16
16
 
17
- var version$1 = "2.51.1";
17
+ var version$1 = "2.51.2";
18
18
 
19
19
  var charToInteger = {};
20
20
  var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
@@ -9718,6 +9718,7 @@ class Module {
9718
9718
  this.implicitlyLoadedBefore = new Set();
9719
9719
  this.importDescriptions = Object.create(null);
9720
9720
  this.importMetas = [];
9721
+ this.importedFromNotTreeshaken = false;
9721
9722
  this.importers = [];
9722
9723
  this.imports = new Set();
9723
9724
  this.includedDynamicImporters = [];
@@ -9849,12 +9850,12 @@ class Module {
9849
9850
  }
9850
9851
  if (!this.options.treeshake || this.info.hasModuleSideEffects === 'no-treeshake') {
9851
9852
  for (const dependency of this.dependencies) {
9852
- if (dependency instanceof ExternalModule || dependency.isIncluded()) {
9853
- relevantDependencies.add(dependency);
9854
- }
9853
+ relevantDependencies.add(dependency);
9855
9854
  }
9856
9855
  }
9857
- this.addRelevantSideEffectDependencies(relevantDependencies, necessaryDependencies, alwaysCheckedDependencies);
9856
+ else {
9857
+ this.addRelevantSideEffectDependencies(relevantDependencies, necessaryDependencies, alwaysCheckedDependencies);
9858
+ }
9858
9859
  for (const dependency of necessaryDependencies) {
9859
9860
  relevantDependencies.add(dependency);
9860
9861
  }
@@ -10042,7 +10043,7 @@ class Module {
10042
10043
  this.ast.include(createInclusionContext(), true);
10043
10044
  }
10044
10045
  isIncluded() {
10045
- return this.ast.included || this.namespace.included;
10046
+ return this.ast.included || this.namespace.included || this.importedFromNotTreeshaken;
10046
10047
  }
10047
10048
  linkImports() {
10048
10049
  this.addModulesToImportDescriptions(this.importDescriptions);
@@ -19483,6 +19484,13 @@ class ModuleLoader {
19483
19484
  module.dependencies.add(dependency);
19484
19485
  dependency.importers.push(module.id);
19485
19486
  }
19487
+ if (!this.options.treeshake || module.info.hasModuleSideEffects === 'no-treeshake') {
19488
+ for (const dependency of module.dependencies) {
19489
+ if (dependency instanceof Module) {
19490
+ dependency.importedFromNotTreeshaken = true;
19491
+ }
19492
+ }
19493
+ }
19486
19494
  }
19487
19495
  getNormalizedResolvedIdWithoutDefaults(resolveIdResult, importer, source) {
19488
19496
  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