Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

broccoli-babel-transpiler

Package Overview
Dependencies
Maintainers
3
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-babel-transpiler - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

22

index.js

@@ -7,5 +7,5 @@ 'use strict';

function SixToFive(inputTree, options) {
if (!(this instanceof SixToFive)) {
return new SixToFive(inputTree, options);
function Babel(inputTree, options) {
if (!(this instanceof Babel)) {
return new Babel(inputTree, options);
}

@@ -17,13 +17,13 @@

SixToFive.prototype = Object.create(Filter.prototype);
SixToFive.prototype.constructor = SixToFive;
Babel.prototype = Object.create(Filter.prototype);
Babel.prototype.constructor = Babel;
SixToFive.prototype.extensions = ['js'];
SixToFive.prototype.targetExtension = 'js';
Babel.prototype.extensions = ['js'];
Babel.prototype.targetExtension = 'js';
SixToFive.prototype.transform = function(string, options) {
Babel.prototype.transform = function(string, options) {
return transpiler.transform(string, options);
};
SixToFive.prototype.processString = function (string, relativePath) {
Babel.prototype.processString = function (string, relativePath) {
var options = this.copyOptions();

@@ -36,6 +36,6 @@

SixToFive.prototype.copyOptions = function() {
Babel.prototype.copyOptions = function() {
return clone(this.options);
};
module.exports = SixToFive;
module.exports = Babel;
{
"name": "broccoli-babel-transpiler",
"version": "4.0.0",
"version": "4.0.1",
"description": "A Broccoli plugin which transpile ES6 to readable ES5 by using babel.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,3 +7,3 @@ 'use strict';

var path = require('path');
var to5 = require('./index');
var Babel = require('./index');

@@ -14,3 +14,3 @@ var builder;

function build(path, options) {
builder = new broccoli.Builder(to5(path, options));
builder = new broccoli.Builder(new Babel(path, options));

@@ -23,3 +23,3 @@ return builder.build();

var options, toFive;
var options, babel;

@@ -34,3 +34,3 @@ before(function() {

toFive = new to5('', options);
babel = new Babel('', options);
});

@@ -41,3 +41,3 @@

toFive.transform = function(string, options) {
babel.transform = function(string, options) {
transpilerOptions = options;

@@ -48,3 +48,3 @@ return { code: {} };

expect(transpilerOptions).to.eql(undefined);
toFive.processString('path', 'relativePath');
babel.processString('path', 'relativePath');

@@ -64,3 +64,3 @@ expect(transpilerOptions.foo).to.eql(1);

toFive.transform = function(string, options) {
babel.transform = function(string, options) {
transpilerOptions = options;

@@ -71,3 +71,3 @@ return { code: {} };

expect(transpilerOptions).to.eql(undefined);
toFive.processString('path', 'relativePath');
babel.processString('path', 'relativePath');

@@ -74,0 +74,0 @@ expect(transpilerOptions.filename).to.eql('relativePath');

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