rollup-plugin-babel
Advanced tools
Comparing version 2.7.0 to 2.7.1
# rollup-plugin-babel changelog | ||
## 2.7.1 | ||
* Prevent erroneous warnings about duplicated runtime helpers ([#105](https://github.com/rollup/rollup-plugin-babel/issues/105)) | ||
* Ignore `ignore` option in preflight check ([#102](https://github.com/rollup/rollup-plugin-babel/issues/102)) | ||
* Allow custom `moduleName` with `runtime-helpers` ([#95](https://github.com/rollup/rollup-plugin-babel/issues/95)) | ||
## 2.7.0 | ||
@@ -4,0 +10,0 @@ |
@@ -38,2 +38,4 @@ 'use strict'; | ||
delete options.only; | ||
delete options.ignore; | ||
options.filename = path.join( dir, 'x.js' ); | ||
@@ -47,3 +49,3 @@ | ||
if ( ~check.indexOf( 'import _classCallCheck from "babel-runtime' ) ) { helpers = RUNTIME; } | ||
if ( ~check.indexOf( 'import _classCallCheck from' ) ) { helpers = RUNTIME; } | ||
else if ( ~check.indexOf( 'function _classCallCheck' ) ) { helpers = INLINE; } | ||
@@ -86,5 +88,5 @@ else if ( ~check.indexOf( 'babelHelpers' ) ) { helpers = BUNDLED; } | ||
delete options.externalHelpersWhitelist; | ||
var warn = function (msg) { return console.warn(msg); }; // eslint-disable-line no-console | ||
return { | ||
@@ -127,5 +129,9 @@ name: 'babel', | ||
if ( helpers === BUNDLED ) { | ||
if ( !externalHelpers ) { transformed.code += "\n\nimport * as babelHelpers from '" + HELPERS + "';"; } | ||
} else if ( helpers === RUNTIME && !runtimeHelpers ) { | ||
throw new Error( 'Runtime helpers are not enabled. Either exclude the transform-runtime Babel plugin or pass the `runtimeHelpers: true` option. See https://github.com/rollup/rollup-plugin-babel#configuring-babel for more information' ); | ||
if ( !externalHelpers ) { | ||
transformed.code += "\n\nimport * as babelHelpers from '" + HELPERS + "';"; | ||
} | ||
} else if ( helpers === RUNTIME ) { | ||
if ( !runtimeHelpers ) { | ||
throw new Error( 'Runtime helpers are not enabled. Either exclude the transform-runtime Babel plugin or pass the `runtimeHelpers: true` option. See https://github.com/rollup/rollup-plugin-babel#configuring-babel for more information' ); | ||
} | ||
} else { | ||
@@ -132,0 +138,0 @@ usedHelpers.forEach( function (helper) { |
@@ -34,2 +34,4 @@ import { dirname, join } from 'path'; | ||
delete options.only; | ||
delete options.ignore; | ||
options.filename = join( dir, 'x.js' ); | ||
@@ -43,3 +45,3 @@ | ||
if ( ~check.indexOf( 'import _classCallCheck from "babel-runtime' ) ) { helpers = RUNTIME; } | ||
if ( ~check.indexOf( 'import _classCallCheck from' ) ) { helpers = RUNTIME; } | ||
else if ( ~check.indexOf( 'function _classCallCheck' ) ) { helpers = INLINE; } | ||
@@ -82,5 +84,5 @@ else if ( ~check.indexOf( 'babelHelpers' ) ) { helpers = BUNDLED; } | ||
delete options.externalHelpersWhitelist; | ||
var warn = function (msg) { return console.warn(msg); }; // eslint-disable-line no-console | ||
return { | ||
@@ -123,5 +125,9 @@ name: 'babel', | ||
if ( helpers === BUNDLED ) { | ||
if ( !externalHelpers ) { transformed.code += "\n\nimport * as babelHelpers from '" + HELPERS + "';"; } | ||
} else if ( helpers === RUNTIME && !runtimeHelpers ) { | ||
throw new Error( 'Runtime helpers are not enabled. Either exclude the transform-runtime Babel plugin or pass the `runtimeHelpers: true` option. See https://github.com/rollup/rollup-plugin-babel#configuring-babel for more information' ); | ||
if ( !externalHelpers ) { | ||
transformed.code += "\n\nimport * as babelHelpers from '" + HELPERS + "';"; | ||
} | ||
} else if ( helpers === RUNTIME ) { | ||
if ( !runtimeHelpers ) { | ||
throw new Error( 'Runtime helpers are not enabled. Either exclude the transform-runtime Babel plugin or pass the `runtimeHelpers: true` option. See https://github.com/rollup/rollup-plugin-babel#configuring-babel for more information' ); | ||
} | ||
} else { | ||
@@ -128,0 +134,0 @@ usedHelpers.forEach( function (helper) { |
{ | ||
"name": "rollup-plugin-babel", | ||
"version": "2.7.0", | ||
"version": "2.7.1", | ||
"description": "Seamless integration between Rollup and Babel.", | ||
@@ -27,6 +27,7 @@ "main": "dist/rollup-plugin-babel.cjs.js", | ||
"test": "mocha", | ||
"prepublish": "npm run test", | ||
"prepublish": "npm run lint && npm test", | ||
"pretest": "npm run build", | ||
"build": "rollup -c", | ||
"prebuild": "rm -rf dist/*" | ||
"prebuild": "rm -rf dist/*", | ||
"lint": "eslint src" | ||
}, | ||
@@ -33,0 +34,0 @@ "dependencies": { |
@@ -32,5 +32,5 @@ import { dirname } from 'path'; | ||
delete options.externalHelpersWhitelist; | ||
let warn = msg => console.warn(msg); // eslint-disable-line no-console | ||
return { | ||
@@ -72,5 +72,9 @@ name: 'babel', | ||
if ( helpers === BUNDLED ) { | ||
if ( !externalHelpers ) transformed.code += `\n\nimport * as babelHelpers from '${HELPERS}';`; | ||
} else if ( helpers === RUNTIME && !runtimeHelpers ) { | ||
throw new Error( 'Runtime helpers are not enabled. Either exclude the transform-runtime Babel plugin or pass the `runtimeHelpers: true` option. See https://github.com/rollup/rollup-plugin-babel#configuring-babel for more information' ); | ||
if ( !externalHelpers ) { | ||
transformed.code += `\n\nimport * as babelHelpers from '${HELPERS}';`; | ||
} | ||
} else if ( helpers === RUNTIME ) { | ||
if ( !runtimeHelpers ) { | ||
throw new Error( 'Runtime helpers are not enabled. Either exclude the transform-runtime Babel plugin or pass the `runtimeHelpers: true` option. See https://github.com/rollup/rollup-plugin-babel#configuring-babel for more information' ); | ||
} | ||
} else { | ||
@@ -77,0 +81,0 @@ usedHelpers.forEach( helper => { |
@@ -15,2 +15,4 @@ import { join } from 'path'; | ||
delete options.only; | ||
delete options.ignore; | ||
options.filename = join( dir, 'x.js' ); | ||
@@ -24,3 +26,3 @@ | ||
if ( ~check.indexOf( 'import _classCallCheck from "babel-runtime' ) ) helpers = RUNTIME; | ||
if ( ~check.indexOf( 'import _classCallCheck from' ) ) helpers = RUNTIME; | ||
else if ( ~check.indexOf( 'function _classCallCheck' ) ) helpers = INLINE; | ||
@@ -27,0 +29,0 @@ else if ( ~check.indexOf( 'babelHelpers' ) ) helpers = BUNDLED; |
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
25207
347