@parcel/babel-preset-env 2.8.4-nightly.0 → 2.9.1
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/index.js +0 -6
- package/package.json +2 -2
package/lib/index.js
CHANGED
@@ -1,20 +1,15 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
const semver = require('semver');
|
4
|
-
|
5
4
|
const COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER = '^2.0.0-beta.1';
|
6
|
-
|
7
5
|
module.exports = function (api, opts) {
|
8
6
|
let name = api.caller(caller => caller && caller.name);
|
9
7
|
let version = api.caller(caller => caller && caller.version);
|
10
|
-
|
11
8
|
if (name === 'parcel' && typeof version === 'string' && semver.satisfies(version, COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER)) {
|
12
9
|
let targets = api.caller(caller => caller && caller.targets);
|
13
|
-
|
14
10
|
if (typeof targets !== 'string') {
|
15
11
|
throw new Error('Expected targets to be a string');
|
16
12
|
}
|
17
|
-
|
18
13
|
return {
|
19
14
|
presets: [['@babel/preset-env', {
|
20
15
|
modules: false,
|
@@ -27,7 +22,6 @@ module.exports = function (api, opts) {
|
|
27
22
|
}]]
|
28
23
|
};
|
29
24
|
}
|
30
|
-
|
31
25
|
return {
|
32
26
|
presets: [['@babel/preset-env', {
|
33
27
|
shippedProposals: true,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@parcel/babel-preset-env",
|
3
|
-
"version": "2.
|
3
|
+
"version": "2.9.1",
|
4
4
|
"license": "MIT",
|
5
5
|
"publishConfig": {
|
6
6
|
"access": "public"
|
@@ -27,5 +27,5 @@
|
|
27
27
|
"peerDependencies": {
|
28
28
|
"@babel/core": "^7.12.0"
|
29
29
|
},
|
30
|
-
"gitHead": "
|
30
|
+
"gitHead": "5c5dc302b559f0b0d8c57b4d638aac521c879b70"
|
31
31
|
}
|