Socket
Socket
Sign inDemoInstall

@rollup/plugin-babel

Package Overview
Dependencies
Maintainers
4
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rollup/plugin-babel - npm Package Compare versions

Comparing version 5.2.1 to 5.2.2

9

CHANGELOG.md
# @rollup/plugin-babel ChangeLog
## v5.2.2
_2020-11-30_
### Bugfixes
- fix: clone cached helper identifier before returning it (#584)
- fix: strip hash and query param in extension filter (#533)
## v5.2.1

@@ -4,0 +13,0 @@

18

dist/index.es.js

@@ -99,3 +99,5 @@ import * as babel from '@babel/core';

function importHelperPlugin() {
function importHelperPlugin({
types: t
}) {
return {

@@ -110,3 +112,3 @@ pre(file) {

if (cachedHelpers[name]) {
return cachedHelpers[name];
return t.cloneNode(cachedHelpers[name]);
}

@@ -134,2 +136,12 @@

const escapeRegExpCharacters = str => str.replace(regExpCharactersRegExp, '\\$&');
function stripQuery(id) {
// strip query params from import
const [bareId, query] = id.split('?');
const suffix = `${query ? `?${query}` : ''}`;
return {
bareId,
query,
suffix
};
}

@@ -371,3 +383,3 @@ const MODULE_ERROR = 'Rollup requires that your Babel configuration keeps ES6 module syntax intact. ' + 'Unfortunately it looks like your configuration specifies a module transformer ' + 'to replace ES6 modules with another module format. To continue you have to disable it.' + '\n\n' + "Most commonly it's a CommonJS transform added by @babel/preset-env - " + 'in such case you should disable it by adding `modules: false` option to that preset ' + '(described in more detail here - https://github.com/rollup/plugins/tree/master/packages/babel#modules ).';

filter = id => extensionRegExp.test(id) && includeExcludeFilter(id);
filter = id => extensionRegExp.test(stripQuery(id).bareId) && includeExcludeFilter(id);

@@ -374,0 +386,0 @@ return null;

@@ -9,2 +9,24 @@ 'use strict';

function _interopNamespace(e) {
if (e && e.__esModule) return e;
var n = Object.create(null);
if (e) {
Object.keys(e).forEach(function (k) {
if (k !== 'default') {
var d = Object.getOwnPropertyDescriptor(e, k);
Object.defineProperty(n, k, d.get ? d : {
enumerable: true,
get: function () {
return e[k];
}
});
}
});
}
n['default'] = e;
return Object.freeze(n);
}
var babel__namespace = /*#__PURE__*/_interopNamespace(babel);
function _defineProperty(obj, key, value) {

@@ -103,3 +125,5 @@ if (key in obj) {

function importHelperPlugin() {
function importHelperPlugin({
types: t
}) {
return {

@@ -114,3 +138,3 @@ pre(file) {

if (cachedHelpers[name]) {
return cachedHelpers[name];
return t.cloneNode(cachedHelpers[name]);
}

@@ -138,2 +162,12 @@

const escapeRegExpCharacters = str => str.replace(regExpCharactersRegExp, '\\$&');
function stripQuery(id) {
// strip query params from import
const [bareId, query] = id.split('?');
const suffix = `${query ? `?${query}` : ''}`;
return {
bareId,
query,
suffix
};
}

@@ -343,3 +377,3 @@ const MODULE_ERROR = 'Rollup requires that your Babel configuration keeps ES6 module syntax intact. ' + 'Unfortunately it looks like your configuration specifies a module transformer ' + 'to replace ES6 modules with another module format. To continue you have to disable it.' + '\n\n' + "Most commonly it's a CommonJS transform added by @babel/preset-env - " + 'in such case you should disable it by adding `modules: false` option to that preset ' + '(described in more detail here - https://github.com/rollup/plugins/tree/master/packages/babel#modules ).';

function createBabelInputPluginFactory(customCallback = returnObject) {
const overrides = customCallback(babel);
const overrides = customCallback(babel__namespace);
return pluginOptions => {

@@ -376,3 +410,3 @@ const {

filter = id => extensionRegExp.test(id) && includeExcludeFilter(id);
filter = id => extensionRegExp.test(stripQuery(id).bareId) && includeExcludeFilter(id);

@@ -434,3 +468,3 @@ return null;

function createBabelOutputPluginFactory(customCallback = returnObject) {
const overrides = customCallback(babel);
const overrides = customCallback(babel__namespace);
return pluginOptions => {

@@ -437,0 +471,0 @@ const {

3

package.json
{
"name": "@rollup/plugin-babel",
"version": "5.2.1",
"version": "5.2.2",
"publishConfig": {

@@ -65,2 +65,3 @@ "access": "public"

"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^10.0.0",
"@types/babel__core": "^7.1.9",

@@ -67,0 +68,0 @@ "rollup": "^2.23.0",

@@ -317,6 +317,3 @@ [npm]: https://img.shields.io/npm/v/@rollup/plugin-babel

config(
cfg /* Passed Babel's 'PartialConfig' object. */,
{ code, customOptions }
) {
config(cfg /* Passed Babel's 'PartialConfig' object. */, { code, customOptions }) {
if (cfg.hasFilesystemConfig()) {

@@ -323,0 +320,0 @@ // Use the normal config

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc