@parcel/babel-preset-env 2.0.0-nightly.92 → 2.0.0-nightly.934
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/index.js +13 -11
- package/package.json +12 -5
- package/src/index.js +14 -2
- package/test/preset-env.test.js +1 -1
package/lib/index.js
CHANGED
@@ -1,14 +1,8 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
4
|
-
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
6
|
-
|
7
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
8
|
-
|
9
3
|
const semver = require('semver');
|
10
4
|
|
11
|
-
const COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER = '^2.0.0-
|
5
|
+
const COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER = '^2.0.0-beta.1';
|
12
6
|
|
13
7
|
module.exports = function (api, opts) {
|
14
8
|
let name = api.caller(caller => caller && caller.name);
|
@@ -22,14 +16,22 @@ module.exports = function (api, opts) {
|
|
22
16
|
}
|
23
17
|
|
24
18
|
return {
|
25
|
-
presets: [['@babel/preset-env',
|
19
|
+
presets: [['@babel/preset-env', {
|
26
20
|
modules: false,
|
27
|
-
|
28
|
-
|
21
|
+
ignoreBrowserslistConfig: true,
|
22
|
+
targets: JSON.parse(targets),
|
23
|
+
useBuiltIns: 'entry',
|
24
|
+
corejs: 3,
|
25
|
+
shippedProposals: true,
|
26
|
+
...opts
|
27
|
+
}]]
|
29
28
|
};
|
30
29
|
}
|
31
30
|
|
32
31
|
return {
|
33
|
-
presets: [['@babel/preset-env',
|
32
|
+
presets: [['@babel/preset-env', {
|
33
|
+
shippedProposals: true,
|
34
|
+
...opts
|
35
|
+
}]]
|
34
36
|
};
|
35
37
|
};
|
package/package.json
CHANGED
@@ -1,24 +1,31 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parcel/babel-preset-env",
|
3
|
-
"version": "2.0.0-nightly.
|
3
|
+
"version": "2.0.0-nightly.934+cdc1d0e4",
|
4
4
|
"license": "MIT",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
7
7
|
},
|
8
|
+
"funding": {
|
9
|
+
"type": "opencollective",
|
10
|
+
"url": "https://opencollective.com/parcel"
|
11
|
+
},
|
8
12
|
"repository": {
|
9
13
|
"type": "git",
|
10
14
|
"url": "https://github.com/parcel-bundler/parcel.git"
|
11
15
|
},
|
12
16
|
"main": "src/index.js",
|
13
17
|
"engines": {
|
14
|
-
"node": ">=
|
18
|
+
"node": ">= 12.0.0"
|
15
19
|
},
|
16
20
|
"dependencies": {
|
17
21
|
"@babel/preset-env": "^7.4.0",
|
18
|
-
"semver": "^5.
|
22
|
+
"semver": "^5.7.1"
|
19
23
|
},
|
20
24
|
"devDependencies": {
|
21
|
-
"@babel/core": "^7.
|
25
|
+
"@babel/core": "^7.12.0"
|
26
|
+
},
|
27
|
+
"peerDependencies": {
|
28
|
+
"@babel/core": "^7.12.0"
|
22
29
|
},
|
23
|
-
"gitHead": "
|
30
|
+
"gitHead": "cdc1d0e4e1991c623608f74b573be6896f5cdb4a"
|
24
31
|
}
|
package/src/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
const semver = require('semver');
|
2
2
|
|
3
|
-
const COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER = '^2.0.0-
|
3
|
+
const COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER = '^2.0.0-beta.1';
|
4
4
|
|
5
5
|
module.exports = function parcelBabelPresetEnv(api, opts) {
|
6
6
|
let name = api.caller(caller => caller && caller.name);
|
@@ -22,7 +22,11 @@ module.exports = function parcelBabelPresetEnv(api, opts) {
|
|
22
22
|
'@babel/preset-env',
|
23
23
|
{
|
24
24
|
modules: false,
|
25
|
+
ignoreBrowserslistConfig: true,
|
25
26
|
targets: JSON.parse(targets),
|
27
|
+
useBuiltIns: 'entry',
|
28
|
+
corejs: 3,
|
29
|
+
shippedProposals: true,
|
26
30
|
...opts,
|
27
31
|
},
|
28
32
|
],
|
@@ -31,6 +35,14 @@ module.exports = function parcelBabelPresetEnv(api, opts) {
|
|
31
35
|
}
|
32
36
|
|
33
37
|
return {
|
34
|
-
presets: [
|
38
|
+
presets: [
|
39
|
+
[
|
40
|
+
'@babel/preset-env',
|
41
|
+
{
|
42
|
+
shippedProposals: true,
|
43
|
+
...opts,
|
44
|
+
},
|
45
|
+
],
|
46
|
+
],
|
35
47
|
};
|
36
48
|
};
|
package/test/preset-env.test.js
CHANGED
@@ -19,7 +19,7 @@ export default class Foo {
|
|
19
19
|
}
|
20
20
|
`;
|
21
21
|
|
22
|
-
const preset = require.resolve('../');
|
22
|
+
const preset = require.resolve('../src');
|
23
23
|
|
24
24
|
describe('@parcel/babel-preset-env', () => {
|
25
25
|
it('compiles against targets passed through caller when the caller is parcel 2.x', () => {
|