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/CHANGELOG.md +9 -0
- package/dist/bin/rollup +2 -2
- package/dist/es/rollup.browser.js +3 -3
- package/dist/es/rollup.js +2 -2
- package/dist/es/shared/rollup.js +12 -7
- package/dist/es/shared/watch.js +2 -2
- package/dist/loadConfigFile.js +2 -2
- package/dist/rollup.browser.js +3 -3
- package/dist/rollup.browser.js.map +1 -1
- package/dist/rollup.js +2 -2
- package/dist/shared/index.js +2 -2
- package/dist/shared/loadConfigFile.js +2 -2
- package/dist/shared/mergeOptions.js +2 -2
- package/dist/shared/rollup.js +12 -7
- package/dist/shared/watch-cli.js +2 -2
- package/dist/shared/watch.js +2 -2
- package/package.json +2 -2
package/dist/rollup.js
CHANGED
package/dist/shared/index.js
CHANGED
package/dist/shared/rollup.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v2.52.
|
|
4
|
-
|
|
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.
|
|
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,
|
|
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
|
-
|
|
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
|
}
|
package/dist/shared/watch-cli.js
CHANGED
package/dist/shared/watch.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rollup",
|
|
3
|
-
"version": "2.52.
|
|
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",
|