@rollup/plugin-babel
Advanced tools
Comparing version 5.1.0 to 5.2.0
# @rollup/plugin-babel ChangeLog | ||
## v5.2.0 | ||
_2020-08-13_ | ||
### Features | ||
- feat: `export * as ns` support (#511) | ||
### Updates | ||
- chore: update dependencies (13526d6) | ||
## v5.1.0 | ||
@@ -4,0 +16,0 @@ |
@@ -120,3 +120,3 @@ import * as babel from '@babel/core'; | ||
const addBabelPlugin = (options, plugin) => { | ||
return _objectSpread2({}, options, { | ||
return _objectSpread2(_objectSpread2({}, options), {}, { | ||
plugins: options.plugins.concat(plugin) | ||
@@ -251,7 +251,7 @@ }); | ||
return _objectSpread2({ | ||
return _objectSpread2(_objectSpread2({ | ||
extensions, | ||
plugins: [], | ||
sourceMaps: sourcemap && sourcemaps && sourceMap && sourceMaps | ||
}, rest, { | ||
}, rest), {}, { | ||
caller: _objectSpread2({ | ||
@@ -263,3 +263,3 @@ name: '@rollup/plugin-babel' | ||
const unpackInputPluginOptions = (_ref2) => { | ||
const unpackInputPluginOptions = (_ref2, rollupVersion) => { | ||
let { | ||
@@ -275,3 +275,3 @@ skipPreflightCheck = false | ||
return unpackOptions(_objectSpread2({}, rest, { | ||
return unpackOptions(_objectSpread2(_objectSpread2({}, rest), {}, { | ||
skipPreflightCheck, | ||
@@ -282,3 +282,5 @@ babelHelpers: rest.babelHelpers || BUNDLED, | ||
supportsDynamicImport: true, | ||
supportsTopLevelAwait: true | ||
supportsTopLevelAwait: true, | ||
// todo: remove version checks for 1.20 - 1.25 when we bump peer deps | ||
supportsExportNamespaceFrom: !rollupVersion.match(/^1\.2[0-5]\./) | ||
}, rest.caller) | ||
@@ -290,6 +292,6 @@ })); | ||
format | ||
}) => unpackOptions(_objectSpread2({ | ||
}) => unpackOptions(_objectSpread2(_objectSpread2({ | ||
configFile: false, | ||
sourceType: format === 'es' ? 'module' : 'script' | ||
}, options, { | ||
}, options), {}, { | ||
caller: _objectSpread2({ | ||
@@ -328,21 +330,33 @@ supportsStaticESM: format === 'es' | ||
} = getOptionsWithOverrides(pluginOptions, overrides); | ||
let babelHelpers; | ||
let babelOptions; | ||
let filter; | ||
let skipPreflightCheck; | ||
return { | ||
name: 'babel', | ||
const _unpackInputPluginOpt = unpackInputPluginOptions(pluginOptionsWithOverrides), | ||
{ | ||
exclude, | ||
extensions, | ||
babelHelpers, | ||
include, | ||
skipPreflightCheck | ||
} = _unpackInputPluginOpt, | ||
babelOptions = _objectWithoutProperties(_unpackInputPluginOpt, ["exclude", "extensions", "babelHelpers", "include", "skipPreflightCheck"]); | ||
options() { | ||
// todo: remove options hook and hoist declarations when version checks are removed | ||
let exclude; | ||
let include; | ||
let extensions; | ||
const extensionRegExp = new RegExp(`(${extensions.map(escapeRegExpCharacters).join('|')})$`); | ||
const includeExcludeFilter = createFilter(include, exclude); | ||
var _unpackInputPluginOpt = unpackInputPluginOptions(pluginOptionsWithOverrides, this.meta.rollupVersion); | ||
const filter = id => extensionRegExp.test(id) && includeExcludeFilter(id); | ||
({ | ||
exclude, | ||
extensions, | ||
babelHelpers, | ||
include, | ||
skipPreflightCheck | ||
} = _unpackInputPluginOpt); | ||
babelOptions = _objectWithoutProperties(_unpackInputPluginOpt, ["exclude", "extensions", "babelHelpers", "include", "skipPreflightCheck"]); | ||
const extensionRegExp = new RegExp(`(${extensions.map(escapeRegExpCharacters).join('|')})$`); | ||
const includeExcludeFilter = createFilter(include, exclude); | ||
return { | ||
name: 'babel', | ||
filter = id => extensionRegExp.test(id) && includeExcludeFilter(id); | ||
return null; | ||
}, | ||
resolveId(id) { | ||
@@ -367,3 +381,3 @@ if (id !== HELPERS) { | ||
if (filename === HELPERS) return null; | ||
return transformCode(code, _objectSpread2({}, babelOptions, { | ||
return transformCode(code, _objectSpread2(_objectSpread2({}, babelOptions), {}, { | ||
filename | ||
@@ -370,0 +384,0 @@ }), overrides, customOptions, this, async transformOptions => { |
@@ -123,3 +123,3 @@ 'use strict'; | ||
const addBabelPlugin = (options, plugin) => { | ||
return _objectSpread2({}, options, { | ||
return _objectSpread2(_objectSpread2({}, options), {}, { | ||
plugins: options.plugins.concat(plugin) | ||
@@ -254,7 +254,7 @@ }); | ||
return _objectSpread2({ | ||
return _objectSpread2(_objectSpread2({ | ||
extensions, | ||
plugins: [], | ||
sourceMaps: sourcemap && sourcemaps && sourceMap && sourceMaps | ||
}, rest, { | ||
}, rest), {}, { | ||
caller: _objectSpread2({ | ||
@@ -266,3 +266,3 @@ name: '@rollup/plugin-babel' | ||
const unpackInputPluginOptions = (_ref2) => { | ||
const unpackInputPluginOptions = (_ref2, rollupVersion) => { | ||
let { | ||
@@ -278,3 +278,3 @@ skipPreflightCheck = false | ||
return unpackOptions(_objectSpread2({}, rest, { | ||
return unpackOptions(_objectSpread2(_objectSpread2({}, rest), {}, { | ||
skipPreflightCheck, | ||
@@ -285,3 +285,5 @@ babelHelpers: rest.babelHelpers || BUNDLED, | ||
supportsDynamicImport: true, | ||
supportsTopLevelAwait: true | ||
supportsTopLevelAwait: true, | ||
// todo: remove version checks for 1.20 - 1.25 when we bump peer deps | ||
supportsExportNamespaceFrom: !rollupVersion.match(/^1\.2[0-5]\./) | ||
}, rest.caller) | ||
@@ -293,6 +295,6 @@ })); | ||
format | ||
}) => unpackOptions(_objectSpread2({ | ||
}) => unpackOptions(_objectSpread2(_objectSpread2({ | ||
configFile: false, | ||
sourceType: format === 'es' ? 'module' : 'script' | ||
}, options, { | ||
}, options), {}, { | ||
caller: _objectSpread2({ | ||
@@ -331,21 +333,33 @@ supportsStaticESM: format === 'es' | ||
} = getOptionsWithOverrides(pluginOptions, overrides); | ||
let babelHelpers; | ||
let babelOptions; | ||
let filter; | ||
let skipPreflightCheck; | ||
return { | ||
name: 'babel', | ||
const _unpackInputPluginOpt = unpackInputPluginOptions(pluginOptionsWithOverrides), | ||
{ | ||
exclude, | ||
extensions, | ||
babelHelpers, | ||
include, | ||
skipPreflightCheck | ||
} = _unpackInputPluginOpt, | ||
babelOptions = _objectWithoutProperties(_unpackInputPluginOpt, ["exclude", "extensions", "babelHelpers", "include", "skipPreflightCheck"]); | ||
options() { | ||
// todo: remove options hook and hoist declarations when version checks are removed | ||
let exclude; | ||
let include; | ||
let extensions; | ||
const extensionRegExp = new RegExp(`(${extensions.map(escapeRegExpCharacters).join('|')})$`); | ||
const includeExcludeFilter = pluginutils.createFilter(include, exclude); | ||
var _unpackInputPluginOpt = unpackInputPluginOptions(pluginOptionsWithOverrides, this.meta.rollupVersion); | ||
const filter = id => extensionRegExp.test(id) && includeExcludeFilter(id); | ||
({ | ||
exclude, | ||
extensions, | ||
babelHelpers, | ||
include, | ||
skipPreflightCheck | ||
} = _unpackInputPluginOpt); | ||
babelOptions = _objectWithoutProperties(_unpackInputPluginOpt, ["exclude", "extensions", "babelHelpers", "include", "skipPreflightCheck"]); | ||
const extensionRegExp = new RegExp(`(${extensions.map(escapeRegExpCharacters).join('|')})$`); | ||
const includeExcludeFilter = pluginutils.createFilter(include, exclude); | ||
return { | ||
name: 'babel', | ||
filter = id => extensionRegExp.test(id) && includeExcludeFilter(id); | ||
return null; | ||
}, | ||
resolveId(id) { | ||
@@ -370,3 +384,3 @@ if (id !== HELPERS) { | ||
if (filename === HELPERS) return null; | ||
return transformCode(code, _objectSpread2({}, babelOptions, { | ||
return transformCode(code, _objectSpread2(_objectSpread2({}, babelOptions), {}, { | ||
filename | ||
@@ -373,0 +387,0 @@ }), overrides, customOptions, this, async transformOptions => { |
{ | ||
"name": "@rollup/plugin-babel", | ||
"version": "5.1.0", | ||
"version": "5.2.0", | ||
"publishConfig": { | ||
@@ -14,2 +14,3 @@ "access": "public" | ||
"main": "dist/index.js", | ||
"module": "dist/index.es.js", | ||
"engines": { | ||
@@ -25,3 +26,3 @@ "node": ">= 10.0.0" | ||
"lint": "pnpm run lint:js && pnpm run lint:docs && pnpm run lint:package", | ||
"lint:docs": "prettier --single-quote --write README.md", | ||
"lint:docs": "prettier --single-quote --arrow-parens avoid --trailing-comma none --write README.md", | ||
"lint:js": "eslint --fix --cache src test", | ||
@@ -55,18 +56,22 @@ "lint:package": "prettier --write package.json --plugin=prettier-plugin-package", | ||
"dependencies": { | ||
"@babel/helper-module-imports": "^7.7.4", | ||
"@rollup/pluginutils": "^3.0.8" | ||
"@babel/helper-module-imports": "^7.10.4", | ||
"@rollup/pluginutils": "^3.1.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.7.4", | ||
"@babel/plugin-external-helpers": "^7.7.4", | ||
"@babel/plugin-proposal-decorators": "^7.7.4", | ||
"@babel/plugin-syntax-dynamic-import": "^7.7.4", | ||
"@babel/plugin-transform-runtime": "^7.7.4", | ||
"@babel/preset-env": "^7.9.0", | ||
"@rollup/plugin-json": "^4.0.0", | ||
"@babel/core": "^7.10.5", | ||
"@babel/plugin-external-helpers": "^7.10.4", | ||
"@babel/plugin-proposal-decorators": "^7.10.5", | ||
"@babel/plugin-syntax-dynamic-import": "^7.8.3", | ||
"@babel/plugin-transform-runtime": "^7.10.5", | ||
"@babel/preset-env": "^7.10.4", | ||
"@rollup/plugin-json": "^4.1.0", | ||
"@types/babel__core": "^7.1.9", | ||
"rollup": "^2.0.0", | ||
"source-map": "^0.6.1" | ||
"rollup": "^2.23.0", | ||
"source-map": "^0.7.3" | ||
}, | ||
"types": "types/index.d.ts", | ||
"ava": { | ||
"babel": { | ||
"compileEnhancements": false | ||
}, | ||
"files": [ | ||
@@ -83,3 +88,2 @@ "!**/fixtures/**", | ||
], | ||
"module": "dist/index.es.js", | ||
"peerDependenciesMeta": { | ||
@@ -89,4 +93,3 @@ "@types/babel__core": { | ||
} | ||
}, | ||
"types": "types/index.d.ts" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
58947
848
+ Addedelectron-to-chromium@1.5.20(transitive)
- Removedelectron-to-chromium@1.5.24(transitive)
Updated@rollup/pluginutils@^3.1.0