rollup 2.78.0 → 2.78.1

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.78.0
4
- Sun, 14 Aug 2022 04:30:34 GMT - commit 105b264847892c8f7966364d73f6900554178f58
3
+ Rollup.js v2.78.1
4
+ Fri, 19 Aug 2022 05:19:43 GMT - commit 398d0c4970b679795025f36e320f8aecb2859d24
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.78.0
4
- Sun, 14 Aug 2022 04:30:34 GMT - commit 105b264847892c8f7966364d73f6900554178f58
3
+ Rollup.js v2.78.1
4
+ Fri, 19 Aug 2022 05:19:43 GMT - commit 398d0c4970b679795025f36e320f8aecb2859d24
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -14,7 +14,7 @@ import { createHash as createHash$1 } from 'crypto';
14
14
  import { promises } from 'fs';
15
15
  import { EventEmitter } from 'events';
16
16
 
17
- var version$1 = "2.78.0";
17
+ var version$1 = "2.78.1";
18
18
 
19
19
  var charToInteger = {};
20
20
  var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
@@ -2270,15 +2270,16 @@ const RESERVED_NAMES$1 = RESERVED_NAMES;
2270
2270
 
2271
2271
  const illegalCharacters = /[^$_a-zA-Z0-9]/g;
2272
2272
  const startsWithDigit = (str) => /\d/.test(str[0]);
2273
+ const needsEscape = (str) => startsWithDigit(str) || RESERVED_NAMES$1.has(str) || str === 'arguments';
2273
2274
  function isLegal(str) {
2274
- if (startsWithDigit(str) || RESERVED_NAMES$1.has(str)) {
2275
+ if (needsEscape(str)) {
2275
2276
  return false;
2276
2277
  }
2277
2278
  return !illegalCharacters.test(str);
2278
2279
  }
2279
2280
  function makeLegal(str) {
2280
2281
  str = str.replace(/-(\w)/g, (_, letter) => letter.toUpperCase()).replace(illegalCharacters, '_');
2281
- if (startsWithDigit(str) || RESERVED_NAMES$1.has(str))
2282
+ if (needsEscape(str))
2282
2283
  str = `_${str}`;
2283
2284
  return str || '_';
2284
2285
  }
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.78.0
4
- Sun, 14 Aug 2022 04:30:34 GMT - commit 105b264847892c8f7966364d73f6900554178f58
3
+ Rollup.js v2.78.1
4
+ Fri, 19 Aug 2022 05:19:43 GMT - commit 398d0c4970b679795025f36e320f8aecb2859d24
5
5
 
6
6
  https://github.com/rollup/rollup
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.78.0
4
- Sun, 14 Aug 2022 04:30:34 GMT - commit 105b264847892c8f7966364d73f6900554178f58
3
+ Rollup.js v2.78.1
4
+ Fri, 19 Aug 2022 05:19:43 GMT - commit 398d0c4970b679795025f36e320f8aecb2859d24
5
5
 
6
6
  https://github.com/rollup/rollup
7
7