core-js-builder 3.48.0 → 3.49.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 +1 -1
- package/index.d.ts +2 -2
- package/index.js +3 -3
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
**I highly recommend reading this: [So, what's next?](https://github.com/zloirock/core-js/blob/master/docs/2023-02-14-so-whats-next.md)**
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
For some cases could be useful to exclude some `core-js` features or generate a polyfill for target engines. This API helps conditionally include or exclude certain parts of [`core-js`](https://
|
|
12
|
+
For some cases could be useful to exclude some [`core-js`](https://core-js.io) features or generate a polyfill for target engines. This API helps conditionally include or exclude certain parts of [`core-js`](https://core-js.io) and build for targets. `modules`, `exclude` and `targets` options are specified in [the `core-js-compat` format](https://github.com/zloirock/core-js/tree/master/packages/core-js-compat).
|
|
13
13
|
|
|
14
14
|
```js
|
|
15
15
|
import builder from 'core-js-builder';
|
package/index.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ type SummaryEntry = boolean | {
|
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
type Summary = {
|
|
11
|
-
/** in the console, you could specify required parts or set `true` for enable all of them */
|
|
12
|
-
comment?: SummaryEntry,
|
|
13
11
|
/** in the comment, you could specify required parts or set `true` for enable all of them */
|
|
12
|
+
comment?: SummaryEntry,
|
|
13
|
+
/** in the console, you could specify required parts or set `true` for enable all of them */
|
|
14
14
|
console?: SummaryEntry,
|
|
15
15
|
};
|
|
16
16
|
|
package/index.js
CHANGED
|
@@ -36,11 +36,11 @@ module.exports = async function ({
|
|
|
36
36
|
if (!['bundle', 'cjs', 'esm'].includes(format)) throw new TypeError('Incorrect output type');
|
|
37
37
|
summary = { comment: normalizeSummary(summary.comment), console: normalizeSummary(summary.console) };
|
|
38
38
|
|
|
39
|
-
const TITLE = filename !== null
|
|
39
|
+
const TITLE = filename !== null && filename !== undefined ? filename : '`core-js`';
|
|
40
40
|
let script = banner;
|
|
41
41
|
let code = '\n';
|
|
42
42
|
|
|
43
|
-
const { list, targets: compatTargets } = compat({ targets, modules, exclude:
|
|
43
|
+
const { list, targets: compatTargets } = compat({ targets, modules, exclude: blacklist || exclude });
|
|
44
44
|
|
|
45
45
|
if (list.length) {
|
|
46
46
|
if (format === 'bundle') {
|
|
@@ -62,7 +62,7 @@ module.exports = async function ({
|
|
|
62
62
|
},
|
|
63
63
|
});
|
|
64
64
|
|
|
65
|
-
const file = await readFile(tempFile);
|
|
65
|
+
const file = await readFile(tempFile, 'utf8');
|
|
66
66
|
|
|
67
67
|
await unlink(tempFile);
|
|
68
68
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "core-js-builder",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.49.0",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"description": "core-js builder",
|
|
6
6
|
"repository": {
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
"main": "index.js",
|
|
27
27
|
"types": "index.d.ts",
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"core-js": "3.
|
|
30
|
-
"core-js-compat": "3.
|
|
29
|
+
"core-js": "3.49.0",
|
|
30
|
+
"core-js-compat": "3.49.0",
|
|
31
31
|
"mkdirp": ">=0.5.6 <1",
|
|
32
32
|
"webpack": ">=4.47.0 <5"
|
|
33
33
|
},
|