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

traceur

Package Overview
Dependencies
Maintainers
2
Versions
110
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

traceur - npm Package Compare versions

Comparing version 0.0.87 to 0.0.88

src/node/NodeLoaderCompiler.js

4

package.json
{
"name": "traceur",
"version": "0.0.87",
"version": "0.0.88",
"description": "ES6 to ES5 compiler",

@@ -57,3 +57,3 @@ "keywords": [

"requirejs": "2.x",
"traceur": "0.0.86",
"traceur": "0.0.87",
"promises-aplus-tests": "2.x",

@@ -60,0 +60,0 @@ "webcomponents.js": "^0.5.4-1"

@@ -0,1 +1,2 @@

[![Join the chat at https://gitter.im/google/traceur-compiler](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/google/traceur-compiler?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Build Status](https://travis-ci.org/google/traceur-compiler.svg)](https://travis-ci.org/google/traceur-compiler)

@@ -7,4 +8,3 @@

Traceur is a JavaScript.next-to-JavaScript-of-today compiler that allows you to
use features from the future **today**. Traceur supports ES6, some ES7 features as
well as some AtScript features.
use features from the future **today**. Traceur supports ES6 as well as some experimental ES.next features.

@@ -11,0 +11,0 @@ Traceur's goal is to inform the design

@@ -131,3 +131,7 @@ // Copyright 2013 Traceur Authors.

if (!isSingleFileCompile) {
traceurAPI.forEachRecursiveModuleCompile(out, sources, options);
traceurAPI.forEachRecursiveModuleCompile(out, sources, options).then(function() {
process.exit(0);
}).catch(function() {
process.exit(1);
});
} else {

@@ -199,2 +203,3 @@ traceurAPI.recursiveModuleCompileToSingleFile(out, sources, options).then(function() {

rootSources.forEach(function(obj) {
commandOptions.require = true;
interpret(path.resolve(obj.name), commandOptions);

@@ -201,0 +206,0 @@ });

@@ -39,2 +39,3 @@ // Copyright 2012 Traceur Authors.

include.name = path.resolve(include.name);
include.rootModule = true;
return include;

@@ -66,4 +67,3 @@ });

var compiler = new NodeCompiler(options);
Promise.all(includes.map(function(input) {
function getPromise (input) {
return recursiveModuleCompile([input], options).then(function(tree) {

@@ -73,7 +73,4 @@ var outputFileName = path.join(outputDir, input.name);

});
})).then(function() {
process.exit(0);
}, function() {
process.exit(1);
});
}
return Promise.all(includes.map(getPromise));
}

@@ -154,3 +151,6 @@

referrerName: referrerName,
metadata: {traceurOptions: optionsCopy}
metadata: {
traceurOptions: optionsCopy,
rootModule: input.rootModule && input.name
}
};

@@ -157,0 +157,0 @@

@@ -36,2 +36,3 @@ // Copyright 2013 Traceur Authors.

function traceurRequire(filename) {
filename = require.resolve(filename);
var source = compile(filename);

@@ -57,2 +58,4 @@ var module = new Module(filename, require.main);

traceurRequire.nodeRequire = require;
traceurRequire.makeDefault = function(filter, options) {

@@ -59,0 +62,0 @@ if (!filter)

@@ -19,29 +19,16 @@ // Copyright 2014 Traceur Authors.

var traceur = require('./traceur.js');
var path = require('path');
var nodeLoader = require('./nodeLoader.js');
var url = (path.resolve('./') + '/').replace(/\\/g, '/');
var System = new traceur.runtime.NodeTraceurLoader();
var traceurMap;
var LoaderCompiler = traceur.runtime.LoaderCompiler;
var NodeLoaderCompiler = function() {
LoaderCompiler.call(this);
};
NodeLoaderCompiler.prototype = {
__proto__: LoaderCompiler.prototype,
evaluateCodeUnit: function(codeUnit) {
var result = module._compile(codeUnit.metadata.transcoded,
codeUnit.address || codeUnit.normalizedName);
codeUnit.metadata.transformedTree = null;
return result;
}
};
var System = new traceur.runtime.TraceurLoader(nodeLoader, url,
new NodeLoaderCompiler());
require('source-map-support').install({
retrieveSourceMap: function(filename) {
var map = System.getSourceMap(filename);
if (!map && filename === traceur.selfCompiledFilename) {
if (!traceurMap) {
traceurMap = fs.readFileSync(traceur.selfCompiledFilename + '.map', 'utf8');
}
map = traceurMap;
}
if (map) {

@@ -48,0 +35,0 @@ return {

@@ -31,3 +31,6 @@ // Copyright 2012 Traceur Authors.

return require('./require.js');
},
get selfCompiledFilename() {
return filename;
}
};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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