@parcel/babel-preset-env 2.0.0-beta.3 → 2.0.0-dev.1510
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/lib/index.js +0 -6
- package/package.json +6 -6
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.0.0-
|
|
3
|
+
"version": "2.0.0-dev.1510+a9bb85adf",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
"node": ">= 12.0.0"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@babel/preset-env": "^7.
|
|
22
|
-
"semver": "^5.
|
|
21
|
+
"@babel/preset-env": "^7.22.14",
|
|
22
|
+
"semver": "^7.5.2"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@babel/core": "^7.
|
|
25
|
+
"@babel/core": "^7.22.11"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@babel/core": "^7.
|
|
28
|
+
"@babel/core": "^7.22.11"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "a9bb85adf8f3b38631e178b3aacaa30c78696e36"
|
|
31
31
|
}
|