core-js-compat 3.25.0 → 3.25.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/README.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ![logo](https://user-images.githubusercontent.com/2213682/146607186-8e13ddef-26a4-4ebf-befd-5aac9d77c090.png)
2
2
 
3
+ <div align="center">
4
+
5
+ [![fundraising](https://opencollective.com/core-js/all/badge.svg?label=fundraising)](https://opencollective.com/core-js) [![PRs welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/zloirock/core-js/blob/master/CONTRIBUTING.md) [![version](https://img.shields.io/npm/v/core-js-compat.svg)](https://www.npmjs.com/package/core-js-compat) [![tests](https://github.com/zloirock/core-js/workflows/tests/badge.svg)](https://github.com/zloirock/core-js/actions) [![eslint](https://github.com/zloirock/core-js/workflows/eslint/badge.svg)](https://github.com/zloirock/core-js/actions)
6
+
7
+ </div>
8
+
3
9
  [`core-js-compat` package](https://github.com/zloirock/core-js/tree/master/packages/core-js-compat) contains data about the necessity of [`core-js`](https://github.com/zloirock/core-js) modules and API for getting a list of required core-js modules by browserslist query.
4
10
 
5
11
  ```js
package/data.json CHANGED
@@ -4121,10 +4121,14 @@
4121
4121
  "safari": "15.4",
4122
4122
  "samsung": "18.0"
4123
4123
  },
4124
- "esnext.array.group": {},
4124
+ "esnext.array.group": {
4125
+ "bun": "0.1.9"
4126
+ },
4125
4127
  "esnext.array.group-by": {},
4126
4128
  "esnext.array.group-by-to-map": {},
4127
- "esnext.array.group-to-map": {},
4129
+ "esnext.array.group-to-map": {
4130
+ "bun": "0.1.9"
4131
+ },
4128
4132
  "esnext.array.is-template-object": {},
4129
4133
  "esnext.array.last-index": {},
4130
4134
  "esnext.array.last-item": {},
@@ -4419,7 +4423,9 @@
4419
4423
  },
4420
4424
  "esnext.typed-array.to-spliced": {},
4421
4425
  "esnext.typed-array.unique-by": {},
4422
- "esnext.typed-array.with": {},
4426
+ "esnext.typed-array.with": {
4427
+ "bun": "0.1.9"
4428
+ },
4423
4429
  "esnext.weak-map.delete-all": {},
4424
4430
  "esnext.weak-map.from": {},
4425
4431
  "esnext.weak-map.of": {},
@@ -4536,6 +4542,7 @@
4536
4542
  "samsung": "5.0"
4537
4543
  },
4538
4544
  "web.immediate": {
4545
+ "bun": "0.1.7",
4539
4546
  "ie": "10",
4540
4547
  "node": "0.9.1"
4541
4548
  },
package/helpers.js CHANGED
@@ -1,11 +1,30 @@
1
1
  'use strict';
2
- const cmp = require('semver/functions/cmp');
3
- const semver = require('semver/functions/coerce');
2
+ // eslint-disable-next-line es-x/no-object-hasown -- safe
3
+ const has = Object.hasOwn || Function.call.bind({}.hasOwnProperty);
4
+
5
+ function semver(input) {
6
+ if (input instanceof semver) return input;
7
+ // eslint-disable-next-line new-cap -- ok
8
+ if (!(this instanceof semver)) return new semver(input);
9
+ const match = /(\d+)(?:\.(\d+))?(?:\.(\d+))?/.exec(input);
10
+ if (!match) throw TypeError(`Invalid version: ${ input }`);
11
+ const [, $major, $minor, $patch] = match;
12
+ this.major = +$major;
13
+ this.minor = $minor ? +$minor : 0;
14
+ this.patch = $patch ? +$patch : 0;
15
+ }
4
16
 
5
- const has = Function.call.bind({}.hasOwnProperty);
17
+ semver.prototype.toString = function () {
18
+ return `${ this.major }.${ this.minor }.${ this.patch }`;
19
+ };
6
20
 
7
- function compare(a, operator, b) {
8
- return cmp(semver(a), operator, semver(b));
21
+ function compare($a, operator, $b) {
22
+ const a = semver($a);
23
+ const b = semver($b);
24
+ for (const component of ['major', 'minor', 'patch']) {
25
+ if (a[component] < b[component]) return operator === '<' || operator === '<=' || operator === '!=';
26
+ if (a[component] > b[component]) return operator === '>' || operator === '>=' || operator === '!=';
27
+ } return operator === '==' || operator === '<=' || operator === '>=';
9
28
  }
10
29
 
11
30
  function filterOutStabilizedProposals(modules) {
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "core-js-compat",
3
3
  "description": "core-js compat",
4
- "version": "3.25.0",
4
+ "version": "3.25.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/zloirock/core-js.git",
8
8
  "directory": "packages/core-js-compat"
9
9
  },
10
10
  "main": "index.js",
11
+ "sideEffects": false,
11
12
  "dependencies": {
12
- "browserslist": "^4.21.3",
13
- "semver": "7.0.0"
13
+ "browserslist": "^4.21.3"
14
14
  },
15
15
  "funding": {
16
16
  "type": "opencollective",