@atlaspack/babel-plugin-transform-runtime 2.12.1-dev.3367 → 2.12.1-dev.3398
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
CHANGED
|
@@ -6,7 +6,7 @@ const COMPATIBLE_ATLASPACK_BABEL_TRANSFORMER_SEMVER = '^2.0.0-alpha.1.1';
|
|
|
6
6
|
module.exports = function (api, opts, dirname) {
|
|
7
7
|
let name = api.caller(caller => caller && caller.name);
|
|
8
8
|
let version = api.caller(caller => caller && caller.version);
|
|
9
|
-
if (name === '
|
|
9
|
+
if (name === 'parcel' && typeof version === 'string' && semver.satisfies(version, COMPATIBLE_ATLASPACK_BABEL_TRANSFORMER_SEMVER)) {
|
|
10
10
|
let outputFormat = api.caller(caller => {
|
|
11
11
|
return caller && caller.outputFormat;
|
|
12
12
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaspack/babel-plugin-transform-runtime",
|
|
3
|
-
"version": "2.12.1-dev.
|
|
3
|
+
"version": "2.12.1-dev.3398+81c73b3cd",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"semver": "^7.5.2"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
|
-
"@atlaspack/babel-preset-env": "2.12.1-dev.
|
|
21
|
+
"@atlaspack/babel-preset-env": "2.12.1-dev.3398+81c73b3cd",
|
|
22
22
|
"@babel/core": "^7.22.11"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "81c73b3cdf93adf8b0013be9fed5422579bd5910"
|
|
25
25
|
}
|
package/src/index.js
CHANGED
|
@@ -4,12 +4,12 @@ const pluginTransformRuntime =
|
|
|
4
4
|
|
|
5
5
|
const COMPATIBLE_ATLASPACK_BABEL_TRANSFORMER_SEMVER = '^2.0.0-alpha.1.1';
|
|
6
6
|
|
|
7
|
-
module.exports = function
|
|
7
|
+
module.exports = function parcelPluginTransformRuntime(api, opts, dirname) {
|
|
8
8
|
let name = api.caller(caller => caller && caller.name);
|
|
9
9
|
let version = api.caller(caller => caller && caller.version);
|
|
10
10
|
|
|
11
11
|
if (
|
|
12
|
-
name === '
|
|
12
|
+
name === 'parcel' &&
|
|
13
13
|
typeof version === 'string' &&
|
|
14
14
|
semver.satisfies(version, COMPATIBLE_ATLASPACK_BABEL_TRANSFORMER_SEMVER)
|
|
15
15
|
) {
|
|
@@ -20,7 +20,7 @@ describe('@atlaspack/plugin-transform-runtime', () => {
|
|
|
20
20
|
presets: [preset],
|
|
21
21
|
plugins: [plugin],
|
|
22
22
|
caller: {
|
|
23
|
-
name: '
|
|
23
|
+
name: 'parcel',
|
|
24
24
|
version: '2.0.0',
|
|
25
25
|
targets: JSON.stringify({browsers: ['last 1 Chrome version']}),
|
|
26
26
|
env: 'esmodule',
|
|
@@ -37,7 +37,7 @@ describe('@atlaspack/plugin-transform-runtime', () => {
|
|
|
37
37
|
presets: [preset],
|
|
38
38
|
plugins: [plugin],
|
|
39
39
|
caller: {
|
|
40
|
-
name: '
|
|
40
|
+
name: 'parcel',
|
|
41
41
|
version: '2.0.0',
|
|
42
42
|
targets: JSON.stringify({browsers: ['last 1 Chrome version']}),
|
|
43
43
|
},
|