rollup 2.52.2 → 2.52.3

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.52.2
4
- Mon, 21 Jun 2021 05:09:47 GMT - commit a9346bae21287e17eda8d0490b4776402e067db1
3
+ Rollup.js v2.52.3
4
+ Fri, 25 Jun 2021 13:12:43 GMT - commit 9c436a7c7c368f2ff840735a30119899513ff4bd
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.2
4
- Mon, 21 Jun 2021 05:09:47 GMT - commit a9346bae21287e17eda8d0490b4776402e067db1
3
+ Rollup.js v2.52.3
4
+ Fri, 25 Jun 2021 13:12:43 GMT - commit 9c436a7c7c368f2ff840735a30119899513ff4bd
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.2
4
- Mon, 21 Jun 2021 05:09:47 GMT - commit a9346bae21287e17eda8d0490b4776402e067db1
3
+ Rollup.js v2.52.3
4
+ Fri, 25 Jun 2021 13:12:43 GMT - commit 9c436a7c7c368f2ff840735a30119899513ff4bd
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.2
4
- Mon, 21 Jun 2021 05:09:47 GMT - commit a9346bae21287e17eda8d0490b4776402e067db1
3
+ Rollup.js v2.52.3
4
+ Fri, 25 Jun 2021 13:12:43 GMT - commit 9c436a7c7c368f2ff840735a30119899513ff4bd
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.2
4
- Mon, 21 Jun 2021 05:09:47 GMT - commit a9346bae21287e17eda8d0490b4776402e067db1
3
+ Rollup.js v2.52.3
4
+ Fri, 25 Jun 2021 13:12:43 GMT - commit 9c436a7c7c368f2ff840735a30119899513ff4bd
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.52.2";
35
+ var version$1 = "2.52.3";
36
36
 
37
37
  function ensureArray(items) {
38
38
  if (Array.isArray(items)) {
@@ -4578,7 +4578,11 @@ class Identifier extends NodeBase {
4578
4578
  const { treeshake } = this.context.options;
4579
4579
  switch (kind) {
4580
4580
  case 'var':
4581
- variable = this.scope.addDeclaration(this, this.context, treeshake && treeshake.correctVarValueBeforeDeclaration ? UNKNOWN_EXPRESSION : init, true);
4581
+ variable = this.scope.addDeclaration(this, this.context, init, true);
4582
+ if (treeshake && treeshake.correctVarValueBeforeDeclaration) {
4583
+ // Necessary to make sure the init is deoptimized. We cannot call deoptimizePath here.
4584
+ this.scope.addDeclaration(this, this.context, UNDEFINED_EXPRESSION, true);
4585
+ }
4582
4586
  break;
4583
4587
  case 'function':
4584
4588
  // in strict mode, functions are only hoisted within a scope but not across block scopes
@@ -6325,7 +6329,9 @@ class ArrayPattern extends NodeBase {
6325
6329
  class BlockScope extends ChildScope {
6326
6330
  addDeclaration(identifier, context, init, isHoisted) {
6327
6331
  if (isHoisted) {
6328
- return this.parent.addDeclaration(identifier, context, UNKNOWN_EXPRESSION, isHoisted);
6332
+ this.parent.addDeclaration(identifier, context, init, isHoisted);
6333
+ // Necessary to make sure the init is deoptimized. We cannot call deoptimizePath here.
6334
+ return this.parent.addDeclaration(identifier, context, UNDEFINED_EXPRESSION, isHoisted);
6329
6335
  }
6330
6336
  else {
6331
6337
  return super.addDeclaration(identifier, context, init, false);
@@ -7167,8 +7173,7 @@ class CatchScope extends ParameterScope {
7167
7173
  existingParameter.addDeclaration(identifier, init);
7168
7174
  return existingParameter;
7169
7175
  }
7170
- // as parameters are handled differently, all remaining declarations are
7171
- // hoisted
7176
+ // as parameters are handled differently, all remaining declarations are hoisted
7172
7177
  return this.parent.addDeclaration(identifier, context, init, isHoisted);
7173
7178
  }
7174
7179
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.2
4
- Mon, 21 Jun 2021 05:09:47 GMT - commit a9346bae21287e17eda8d0490b4776402e067db1
3
+ Rollup.js v2.52.3
4
+ Fri, 25 Jun 2021 13:12:43 GMT - commit 9c436a7c7c368f2ff840735a30119899513ff4bd
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.52.2
4
- Mon, 21 Jun 2021 05:09:47 GMT - commit a9346bae21287e17eda8d0490b4776402e067db1
3
+ Rollup.js v2.52.3
4
+ Fri, 25 Jun 2021 13:12:43 GMT - commit 9c436a7c7c368f2ff840735a30119899513ff4bd
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.52.2",
3
+ "version": "2.52.3",
4
4
  "description": "Next-generation ES module bundler",
5
5
  "main": "dist/rollup.js",
6
6
  "module": "dist/es/rollup.js",
@@ -11,7 +11,7 @@
11
11
  "scripts": {
12
12
  "build": "shx rm -rf dist && git rev-parse HEAD > .commithash && rollup --config rollup.config.ts --configPlugin typescript && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup",
13
13
  "build:cjs": "shx rm -rf dist && rollup --config rollup.config.ts --configPlugin typescript --configTest && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup",
14
- "build:bootstrap": "dist/bin/rollup --config rollup.config.ts --configPlugin typescript && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup",
14
+ "build:bootstrap": "node dist/bin/rollup --config rollup.config.ts --configPlugin typescript && shx cp src/rollup/types.d.ts dist/rollup.d.ts && shx chmod a+x dist/bin/rollup",
15
15
  "ci:lint": "npm run lint:nofix",
16
16
  "ci:test": "npm run build:cjs && npm run build:bootstrap && npm run test:all",
17
17
  "ci:test:only": "npm run build:cjs && npm run build:bootstrap && npm run test:only",