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

es6-class

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

es6-class - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

.npmignore

2

bower.json
{
"name": "es6-class",
"version": "0.1.0",
"version": "0.2.0",
"homepage": "https://github.com/square/es6-class",

@@ -5,0 +5,0 @@ "authors": [

@@ -7,3 +7,3 @@ var assert = require('assert');

var recast = require('recast');
var types = require('ast-types');
var types = recast.types;
var n = types.namedTypes;

@@ -371,3 +371,5 @@ var b = types.builders;

*/
function compile(source) {
function compile(source, mapOptions) {
mapOptions = mapOptions || {};
var recastOptions = {

@@ -377,3 +379,6 @@ tabWidth: guessTabWidth(source),

// instead of the master branch that recast provides.
esprima: esprimaHarmony
esprima: esprimaHarmony,
sourceFileName: mapOptions.sourceFileName,
sourceMapName: mapOptions.sourceMapName
};

@@ -391,3 +396,3 @@

function end () {
this.queue(module.exports.compile(data));
this.queue(module.exports.compile(data).code);
this.queue(null);

@@ -394,0 +399,0 @@ }

{
"name": "es6-class",
"version": "0.1.0",
"version": "0.2.0",
"description": "ES6 classes compiled to ES5.",

@@ -16,4 +16,3 @@ "main": "lib/index.js",

"esprima": "git://github.com/ariya/esprima.git#harmony",
"ast-types": "~0.3.10",
"recast": "~0.4.24",
"recast": "^0.5.13",
"through": "~2.3.4"

@@ -20,0 +19,0 @@ },

@@ -96,2 +96,8 @@ # es6-class

To run specific example files:
```
$ node test/runner test/examples/my_example.js test/examples/other_example.js
```
### Pull Requests

@@ -98,0 +104,0 @@

@@ -71,3 +71,3 @@ /**

try {
vm.runInNewContext(compile(source), { assert: assert });
vm.runInNewContext(compile(source).code, { assert: assert });
printSuccess(basename);

@@ -93,5 +93,8 @@ callback(true);

glob(path.join(__dirname, 'examples/*.js'), function(err, filenames) {
if (err) { throw err; }
/**
* Runs the given test files and exits with the appropriate status code.
*
* @param {Array.<string>} filenames
*/
function run(filenames) {
var passed = [];

@@ -119,2 +122,13 @@ var failed = [];

next();
});
}
var files = process.argv.slice(2);
if (files.length) {
run(files);
} else {
glob(path.join(__dirname, 'examples/*.js'), function(err, files) {
if (err) { throw err; }
run(files);
});
}

@@ -38,3 +38,3 @@ /**

function normalize(source) {
return recast.prettyPrint(recast.parse(source, recastOptions), recastOptions);
return recast.prettyPrint(recast.parse(source, recastOptions), recastOptions).code;
}

@@ -41,0 +41,0 @@

Sorry, the diff of this file is not supported yet

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