core-js-compat 3.40.0 → 3.42.0

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/README.md CHANGED
@@ -27,7 +27,7 @@ const {
27
27
  exclude: [ // optional list / filter of modules to exclude, the signature is similar to `modules` option
28
28
  'web.atob',
29
29
  ],
30
- version: '3.40', // used `core-js` version, by default - the latest
30
+ version: '3.42', // used `core-js` version, by default - the latest
31
31
  inverse: false, // inverse of the result - shows modules that are NOT required for the target environment
32
32
  });
33
33
 
@@ -96,7 +96,11 @@ console.log(targets);
96
96
  rhino: '1.7.13', // Rhino engine version
97
97
  safari: '14.0', // Safari version
98
98
  samsung: '14.0', // Samsung Internet version
99
- esmodules: true, // That option set target to minimum supporting ES Modules versions of all browsers
99
+ /**
100
+ * true option set target to minimum supporting ES Modules versions of all browsers, ignoring `browsers` target.
101
+ * 'intersect' option intersects the `browsers` target and `browserslist`'s targets. The maximum version will be used.
102
+ */
103
+ esmodules: true | 'intersect',
100
104
  browsers: '> 0.25%', // Browserslist query or object with target browsers
101
105
  });
102
106
  ```
@@ -125,9 +129,9 @@ require('core-js-compat/modules'); // => Array<ModuleName>
125
129
  require('core-js-compat').modules; // => Array<ModuleName>
126
130
 
127
131
  // the subset of modules which available in the passed `core-js` version:
128
- require('core-js-compat/get-modules-list-for-target-version')('3.40'); // => Array<ModuleName>
132
+ require('core-js-compat/get-modules-list-for-target-version')('3.42'); // => Array<ModuleName>
129
133
  // or
130
- require('core-js-compat').getModulesListForTargetVersion('3.40'); // => Array<ModuleName>
134
+ require('core-js-compat').getModulesListForTargetVersion('3.42'); // => Array<ModuleName>
131
135
  ```
132
136
 
133
137
  If you wanna help to improve this data, you could take a look at the related section of [`CONTRIBUTING.md`](https://github.com/zloirock/core-js/blob/master/CONTRIBUTING.md#how-to-update-core-js-compat-data). The visualization of compatibility data and the browser tests runner is available [here](http://zloirock.github.io/core-js/compat/), the example:
package/compat.d.ts CHANGED
@@ -12,7 +12,7 @@ type Environments = {
12
12
 
13
13
  type Targets = Environments & {
14
14
  browsers?: Environments | BrowserslistQuery,
15
- esmodules?: boolean,
15
+ esmodules?: boolean | 'intersect',
16
16
  };
17
17
 
18
18
  type CompatOptions = {