@parcel/babel-plugin-transform-runtime 2.8.4-nightly.2921 → 2.8.4-nightly.2937

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.
Files changed (2) hide show
  1. package/lib/index.js +2 -8
  2. package/package.json +3 -3
package/lib/index.js CHANGED
@@ -1,28 +1,22 @@
1
1
  "use strict";
2
2
 
3
3
  const semver = require('semver');
4
-
5
4
  const pluginTransformRuntime = require('@babel/plugin-transform-runtime').default;
6
-
7
5
  const COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER = '^2.0.0-alpha.1.1';
8
-
9
6
  module.exports = function (api, opts, dirname) {
10
7
  let name = api.caller(caller => caller && caller.name);
11
8
  let version = api.caller(caller => caller && caller.version);
12
-
13
9
  if (name === 'parcel' && typeof version === 'string' && semver.satisfies(version, COMPATIBLE_PARCEL_BABEL_TRANSFORMER_SEMVER)) {
14
10
  let outputFormat = api.caller(caller => {
15
11
  return caller && caller.outputFormat;
16
12
  });
17
-
18
13
  if (typeof outputFormat !== 'string' && outputFormat !== undefined) {
19
14
  throw new Error('Expected outputFormat to be a string');
20
15
  }
21
-
22
- return pluginTransformRuntime(api, { ...opts,
16
+ return pluginTransformRuntime(api, {
17
+ ...opts,
23
18
  useESModules: outputFormat === 'esmodule'
24
19
  }, dirname);
25
20
  }
26
-
27
21
  return pluginTransformRuntime(api, opts, dirname);
28
22
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcel/babel-plugin-transform-runtime",
3
- "version": "2.8.4-nightly.2921+eb76826da",
3
+ "version": "2.8.4-nightly.2937+3ad435157",
4
4
  "license": "MIT",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "devDependencies": {
25
25
  "@babel/core": "^7.12.0",
26
- "@parcel/babel-preset-env": "2.0.0-nightly.1298+eb76826da"
26
+ "@parcel/babel-preset-env": "2.0.0-nightly.1314+3ad435157"
27
27
  },
28
- "gitHead": "eb76826da305db1e5668bb9b0c1cb5dbe0951a4c"
28
+ "gitHead": "3ad435157d443da806c215d68ccf292b4e95ae0c"
29
29
  }