Skip to content

Commit 9382b9e

Browse files
committed
bump version (without publishing)
1 parent 372f327 commit 9382b9e

File tree

14 files changed

+49
-49
lines changed

14 files changed

+49
-49
lines changed

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
209209
### Installation:[](#index)
210210
```sh
211211
// global version
212-
npm install --save core-js@3.33.0
212+
npm install --save core-js@4.0.0-alpha.0
213213
// version without global namespace pollution
214-
npm install --save @core-js/pure@3.33.0
214+
npm install --save @core-js/pure@4.0.0-alpha.0
215215
// bundled global version
216-
npm install --save @core-js/bundle@3.33.0
216+
npm install --save @core-js/bundle@4.0.0-alpha.0
217217
```
218218

219219
Or you can use `core-js` [from CDN](https://www.jsdelivr.com/package/npm/@core-js/bundle).
@@ -310,9 +310,9 @@ import 'regenerator-runtime/runtime';
310310

311311
#### `@babel/preset-env`[](#index)
312312

313-
[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes working with global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to used version of `core-js`, like `corejs: '3.33'`.
313+
[`@babel/preset-env`](https://github.com/babel/babel/tree/master/packages/babel-preset-env) has `useBuiltIns` option, which optimizes working with global version of `core-js`. With `useBuiltIns` option, you should also set `corejs` option to used version of `core-js`, like `corejs: '4.0'`.
314314

315-
> **Warning!** Recommended to specify used minor `core-js` version, like `corejs: '3.33'`, instead of `corejs: 3`, since with `corejs: 3` will not be injected modules which were added in minor `core-js` releases.
315+
> **Warning!** Recommended to specify used minor `core-js` version, like `corejs: '4.0'`, instead of `corejs: 4`, since with `corejs: 4` will not be injected modules which were added in minor `core-js` releases.
316316
317317
- `useBuiltIns: 'entry'` replaces imports of `core-js` to import only required for a target environment modules. So, for example,
318318
```js
@@ -367,13 +367,13 @@ import 'core-js/modules/es.array.of';
367367
var array = Array.of(1, 2, 3);
368368
```
369369

370-
By default, `@babel/preset-env` with `useBuiltIns: 'usage'` option only polyfills stable features, but you can enable polyfilling of proposals by `proposals` option, as `corejs: { version: '3.33', proposals: true }`.
370+
By default, `@babel/preset-env` with `useBuiltIns: 'usage'` option only polyfills stable features, but you can enable polyfilling of proposals by `proposals` option, as `corejs: { version: '4.0', proposals: true }`.
371371

372372
> **Warning!** In the case of `useBuiltIns: 'usage'`, you should not add `core-js` imports by yourself, they will be added automatically.
373373
374374
#### `@babel/runtime`[](#index)
375375

376-
[`@babel/runtime`](https://babeljs.io/docs/plugins/transform-runtime/) with `corejs: 3` option simplifies work with `@core-js/pure`. It automatically replaces usage of modern features from JS standard library to imports from the version of `core-js` without global namespace pollution, so instead of:
376+
[`@babel/runtime`](https://babeljs.io/docs/plugins/transform-runtime/) with `corejs: 4` option simplifies work with `@core-js/pure`. It automatically replaces usage of modern features from JS standard library to imports from the version of `core-js` without global namespace pollution, so instead of:
377377
```js
378378
import from from '@core-js/pure/stable/array/from';
379379
import flat from '@core-js/pure/stable/array/flat';
@@ -391,7 +391,7 @@ Array.from(new Set([1, 2, 3, 2, 1]));
391391
Promise.resolve(32).then(x => console.log(x));
392392
```
393393

394-
By default, `@babel/runtime` only polyfills stable features, but like in `@babel/preset-env`, you can enable polyfilling of proposals by `proposals` option, as `corejs: { version: 3, proposals: true }`.
394+
By default, `@babel/runtime` only polyfills stable features, but like in `@babel/preset-env`, you can enable polyfilling of proposals by `proposals` option, as `corejs: { version: 4, proposals: true }`.
395395

396396
> **Warning!** If you use `@babel/preset-env` and `@babel/runtime` together, use `corejs` option only in one place since it's duplicate functionality and will cause conflicts.
397397
@@ -403,7 +403,7 @@ Fast JavaScript transpiler `swc` [contains integration with `core-js`](https://s
403403
"env": {
404404
"targets": "> 0.25%, not dead",
405405
"mode": "entry",
406-
"coreJs": "3.33"
406+
"coreJs": "4.0"
407407
}
408408
}
409409
```

deno/corejs/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
*Example*:
3131
```js
32-
import 'https://deno.land/x/corejs@v3.33.0/index.js'; // <- at the top of your entry point
32+
import 'https://deno.land/x/corejs@v4.0.0-alpha.0/index.js'; // <- at the top of your entry point
3333

3434
Object.hasOwn({ foo: 42 }, 'foo'); // => true
3535

package-lock.json

+9-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "3.33.0",
2+
"version": "4.0.0-alpha.0",
33
"repository": {
44
"type": "git",
55
"url": "https://github.com/zloirock/core-js.git"

packages/core-js-builder/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@core-js/builder",
3-
"version": "3.33.0",
3+
"version": "4.0.0-alpha.0",
44
"description": "core-js builder",
55
"repository": {
66
"type": "git",
@@ -21,8 +21,8 @@
2121
"main": "index.js",
2222
"types": "index.d.ts",
2323
"dependencies": {
24-
"core-js": "3.33.0",
25-
"@core-js/compat": "3.33.0",
24+
"core-js": "4.0.0-alpha.0",
25+
"@core-js/compat": "4.0.0-alpha.0",
2626
"webpack": "^5.88.2"
2727
},
2828
"engines": {

packages/core-js-bundle/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@core-js/bundle",
3-
"version": "3.33.0",
3+
"version": "4.0.0-alpha.0",
44
"description": "Standard library",
55
"keywords": [
66
"ES3",

packages/core-js-compat/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const {
2727
exclude: [ // optional list / filter of modules to exclude, the signature is similar to `modules` option
2828
'web.atob',
2929
],
30-
version: '3.33', // used `core-js` version, by default - the latest
30+
version: '4.0', // used `core-js` version, by default - the latest
3131
inverse: false, // inverse of the result - shows modules that are NOT required for the target environment
3232
});
3333

@@ -125,9 +125,9 @@ require('@core-js/compat/modules'); // => Array<ModuleName>
125125
require('@core-js/compat').modules; // => Array<ModuleName>
126126

127127
// the subset of modules which available in the passed `core-js` version:
128-
require('@core-js/compat/get-modules-list-for-target-version')('3.33'); // => Array<ModuleName>
128+
require('@core-js/compat/get-modules-list-for-target-version')('4.0'); // => Array<ModuleName>
129129
// or
130-
require('@core-js/compat').getModulesListForTargetVersion('3.33'); // => Array<ModuleName>
130+
require('@core-js/compat').getModulesListForTargetVersion('4.0'); // => Array<ModuleName>
131131
```
132132

133133
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:

packages/core-js-compat/get-modules-list-for-target-version.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ module.exports = function (raw) {
88
throw new TypeError('`core-js` version should be specified as a SemVer string with minor component');
99
}
1010
const corejs = semver(raw, true);
11-
if (corejs.major !== 3) {
12-
throw new RangeError('This version of `@core-js/compat` works only with `core-js@3`');
11+
if (corejs.major !== 4) {
12+
throw new RangeError('This version of `@core-js/compat` works only with `core-js@4`');
1313
}
1414
const result = [];
1515
for (const version of Object.keys(modulesByVersions)) {

packages/core-js-compat/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@core-js/compat",
3-
"version": "3.33.0",
3+
"version": "4.0.0-alpha.0",
44
"description": "core-js compat",
55
"repository": {
66
"type": "git",

packages/core-js-pure/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@core-js/pure",
3-
"version": "3.33.0",
3+
"version": "4.0.0-alpha.0",
44
"description": "Standard library",
55
"keywords": [
66
"ES3",

packages/core-js/internals/shared.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ var store = require('../internals/shared-store');
55
(module.exports = function (key, value) {
66
return store[key] || (store[key] = value !== undefined ? value : {});
77
})('versions', []).push({
8-
version: '3.33.0',
8+
version: '4.0.0-alpha.0',
99
mode: IS_PURE ? 'pure' : 'global',
1010
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
11-
license: 'https://github.com/zloirock/core-js/blob/v3.33.0/LICENSE',
11+
license: 'https://github.com/zloirock/core-js/blob/v4.0.0-alpha.0/LICENSE',
1212
source: 'https://github.com/zloirock/core-js',
1313
});

packages/core-js/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "core-js",
3-
"version": "3.33.0",
3+
"version": "4.0.0-alpha.0",
44
"description": "Standard library",
55
"keywords": [
66
"ES3",

scripts/build-compat/modules-by-versions.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ for (const version of Object.values(modulesByVersions)) {
88
}
99

1010
await fs.writeJson('packages/core-js-compat/modules-by-versions.json', {
11-
'3.0': [...defaults],
11+
'4.0': [...defaults],
1212
...modulesByVersions,
1313
}, { spaces: ' ' });
1414

tests/compat-tools/get-modules-list-for-target-version.mjs

+14-14
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ import getModulesListForTargetVersion from '@core-js/compat/get-modules-list-for
44
const modules = await fs.readJson('packages/core-js-compat/modules.json');
55
const modulesByVersions = await fs.readJson('packages/core-js-compat/modules-by-versions.json');
66

7-
const modules30 = modulesByVersions['3.0'];
8-
const filter = new Set([...modules30, ...modulesByVersions['3.1'] ?? []]);
9-
const modules31 = modules.filter(it => filter.has(it));
7+
const modules40 = modulesByVersions['4.0'];
8+
const filter = new Set([...modules40, ...modulesByVersions['4.1'] ?? []]);
9+
const modules41 = modules.filter(it => filter.has(it));
1010

11-
deepEqual(getModulesListForTargetVersion('3.0'), modules30, '3.0');
12-
deepEqual(getModulesListForTargetVersion('3.0.0'), modules30, '3.0.0');
13-
deepEqual(getModulesListForTargetVersion('3.0.1'), modules30, '3.0.1');
14-
deepEqual(getModulesListForTargetVersion('3.0.0-alpha.1'), modules30, '3.0.0-alpha.1');
15-
deepEqual(getModulesListForTargetVersion('3.1'), modules31, '3.1');
16-
deepEqual(getModulesListForTargetVersion('3.1.0'), modules31, '3.1.0');
17-
deepEqual(getModulesListForTargetVersion('3.1.1'), modules31, '3.1.1');
11+
deepEqual(getModulesListForTargetVersion('4.0'), modules40, '4.0');
12+
deepEqual(getModulesListForTargetVersion('4.0.0'), modules40, '4.0.0');
13+
deepEqual(getModulesListForTargetVersion('4.0.1'), modules40, '4.0.1');
14+
deepEqual(getModulesListForTargetVersion('4.0.0-alpha.1'), modules40, '4.0.0-alpha.1');
15+
deepEqual(getModulesListForTargetVersion('4.1'), modules41, '4.1');
16+
deepEqual(getModulesListForTargetVersion('4.1.0'), modules41, '4.1.0');
17+
deepEqual(getModulesListForTargetVersion('4.1.1'), modules41, '4.1.1');
1818

19-
throws(() => getModulesListForTargetVersion(3), TypeError, 'num 3');
20-
throws(() => getModulesListForTargetVersion('3'), TypeError, '3');
21-
throws(() => getModulesListForTargetVersion('2.0'), RangeError, '2.0');
22-
throws(() => getModulesListForTargetVersion('4.0'), RangeError, '4.0');
19+
throws(() => getModulesListForTargetVersion(4), TypeError, 'num 4');
20+
throws(() => getModulesListForTargetVersion('4'), TypeError, '4');
21+
throws(() => getModulesListForTargetVersion('3.0'), RangeError, '3.0');
22+
throws(() => getModulesListForTargetVersion('5.0'), RangeError, '5.0');
2323
throws(() => getModulesListForTargetVersion('x'), TypeError, 'x');
2424
throws(() => getModulesListForTargetVersion('*'), TypeError, '*');
2525
throws(() => getModulesListForTargetVersion(), TypeError, 'no arg');

0 commit comments

Comments
 (0)