rollup 2.69.1 → 2.69.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.69.1
4
- Fri, 04 Mar 2022 13:38:38 GMT - commit 994c1eccf4d53e416a010f47e54a2086f1a0f4e9
3
+ Rollup.js v2.69.2
4
+ Sun, 06 Mar 2022 06:43:03 GMT - commit 68817534499a6a1392c465d7fe92a1ef6804ad45
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.69.1
4
- Fri, 04 Mar 2022 13:38:38 GMT - commit 994c1eccf4d53e416a010f47e54a2086f1a0f4e9
3
+ Rollup.js v2.69.2
4
+ Sun, 06 Mar 2022 06:43:03 GMT - commit 68817534499a6a1392c465d7fe92a1ef6804ad45
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -15,7 +15,7 @@ import { createHash as createHash$1 } from 'crypto';
15
15
  import { promises } from 'fs';
16
16
  import { EventEmitter } from 'events';
17
17
 
18
- var version$1 = "2.69.1";
18
+ var version$1 = "2.69.2";
19
19
 
20
20
  var charToInteger = {};
21
21
  var chars$1 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
@@ -5772,6 +5772,30 @@ class ObjectEntity extends ExpressionEntity {
5772
5772
  }
5773
5773
  }
5774
5774
 
5775
+ const isInteger = (prop) => typeof prop === 'string' && /^\d+$/.test(prop);
5776
+ // This makes sure unknown properties are not handled as "undefined" but as
5777
+ // "unknown" but without access side effects. An exception is done for numeric
5778
+ // properties as we do not expect new builtin properties to be numbers, this
5779
+ // will improve tree-shaking for out-of-bounds array properties
5780
+ const OBJECT_PROTOTYPE_FALLBACK = new (class ObjectPrototypeFallbackExpression extends ExpressionEntity {
5781
+ deoptimizeThisOnEventAtPath(event, path, thisParameter) {
5782
+ if (event === EVENT_CALLED && path.length === 1 && !isInteger(path[0])) {
5783
+ thisParameter.deoptimizePath(UNKNOWN_PATH);
5784
+ }
5785
+ }
5786
+ getLiteralValueAtPath(path) {
5787
+ // We ignore number properties as we do not expect new properties to be
5788
+ // numbers and also want to keep handling out-of-bound array elements as
5789
+ // "undefined"
5790
+ return path.length === 1 && isInteger(path[0]) ? undefined : UnknownValue;
5791
+ }
5792
+ hasEffectsWhenAccessedAtPath(path) {
5793
+ return path.length > 1;
5794
+ }
5795
+ hasEffectsWhenAssignedAtPath(path) {
5796
+ return path.length > 1;
5797
+ }
5798
+ })();
5775
5799
  const OBJECT_PROTOTYPE = new ObjectEntity({
5776
5800
  __proto__: null,
5777
5801
  hasOwnProperty: METHOD_RETURNS_BOOLEAN,
@@ -5780,7 +5804,7 @@ const OBJECT_PROTOTYPE = new ObjectEntity({
5780
5804
  toLocaleString: METHOD_RETURNS_STRING,
5781
5805
  toString: METHOD_RETURNS_STRING,
5782
5806
  valueOf: METHOD_RETURNS_UNKNOWN
5783
- }, null, true);
5807
+ }, OBJECT_PROTOTYPE_FALLBACK, true);
5784
5808
 
5785
5809
  const NEW_ARRAY_PROPERTIES = [
5786
5810
  { key: UnknownInteger, kind: 'init', property: UNKNOWN_EXPRESSION },
@@ -6848,6 +6872,8 @@ const knownGlobals = {
6848
6872
  isFrozen: PF,
6849
6873
  isSealed: PF,
6850
6874
  keys: PF,
6875
+ fromEntries: PF,
6876
+ entries: PF,
6851
6877
  prototype: O
6852
6878
  },
6853
6879
  parseFloat: PF,
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.69.1
4
- Fri, 04 Mar 2022 13:38:38 GMT - commit 994c1eccf4d53e416a010f47e54a2086f1a0f4e9
3
+ Rollup.js v2.69.2
4
+ Sun, 06 Mar 2022 06:43:03 GMT - commit 68817534499a6a1392c465d7fe92a1ef6804ad45
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
- Rollup.js v2.69.1
4
- Fri, 04 Mar 2022 13:38:38 GMT - commit 994c1eccf4d53e416a010f47e54a2086f1a0f4e9
3
+ Rollup.js v2.69.2
4
+ Sun, 06 Mar 2022 06:43:03 GMT - commit 68817534499a6a1392c465d7fe92a1ef6804ad45
5
5
 
6
6
 
7
7
  https://github.com/rollup/rollup