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.49 to 0.0.50

31

package.json
{
"name": "traceur",
"version": "0.0.49",
"version": "0.0.50",
"description": "ES6 to ES5 compiler",

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

"test": "make test",
"start": "node ./demo/expressServer.js"
"start": "make && node ./demo/expressServer.js"
},

@@ -37,18 +37,21 @@ "homepage": "https://github.com/google/traceur-compiler",

"dependencies": {
"commander": ">=1.1",
"glob": ">=4.0",
"semver": "*"
"commander": "2.x",
"glob": "4.x",
"semver": "2.x"
},
"devDependencies": {
"source-map": "0.1.30",
"mocha": ">=1.9",
"chai": ">=1.5",
"node-uuid": ">=1.4",
"rsvp": "3.0.3",
"requirejs": "~2.1.9",
"semver": "2.2.1",
"traceur": "0.0.48",
"promises-aplus-tests": "~2.0.4"
"source-map": "0.1.34",
"express": "4.x",
"serve-index": "1.x",
"mocha": "1.20.x",
"chai": "1.x",
"node-uuid": "1.x",
"rsvp": "3.x",
"requirejs": "2.x",
"semver": "2.x",
"traceur": "0.0.49",
"promises-aplus-tests": "2.x",
"compat-table": "git+https://github.com/johnjbarton/compat-table.git#traceur"
},
"subdomain": "traceur"
}

@@ -54,7 +54,2 @@ // Copyright 2013 Traceur Authors.

commandLine.option('--sourcemap', 'Generate source maps');
commandLine.on('sourcemap', function() {
commandLine.sourceMaps = traceurAPI.options.sourceMaps = true;
});
commandLine.option('--longhelp', 'Show all known options');

@@ -61,0 +56,0 @@ commandLine.on('longhelp', function() {

@@ -33,3 +33,3 @@ // Copyright 2013 Traceur Authors.

writeCompiledCodeToFile(result.js, outputFilePath, result.sourceMap);
writeCompiledCodeToFile(result.js, outputFilePath, result.generatedSourceMap);
});

@@ -42,4 +42,4 @@ }

inputDir = path.normalize(inputDir);
outputDir = path.normalize(outputDir);
inputDir = path.normalize(inputDir).replace(/\\/g, '/');
outputDir = path.normalize(outputDir).replace(/\\/g, '/');

@@ -46,0 +46,0 @@ glob(inputDir + '/**/*.js', {}, function (er, files) {

@@ -28,3 +28,3 @@ // Copyright 2013 Traceur Authors.

}).catch(function(err) {
console.error(err.stack || err);
console.error(err.stack || err + '');
process.exit(8);

@@ -31,0 +31,0 @@ });

@@ -84,3 +84,3 @@ // Copyright 2014 Traceur Authors.

function writeCompiledCodeToFile(compiledCode, filename, sourcemap) {
var sourceMapFilePath
var sourceMapFilePath;
if (sourcemap) {

@@ -87,0 +87,0 @@ sourceMapFilePath = getSourceMapFileName(filename);

@@ -28,5 +28,5 @@ // Copyright 2012 Traceur Authors.

function writeTreeToFile(tree, filename, useSourceMaps, opt_sourceRoot) {
var options = {sourcMmaps: useSourceMaps};
var options = {sourceMaps: useSourceMaps};
var result = treeToString({tree: tree, options: options, errors: []});
writeCompiledCodeToFile(result.js, filename, result.sourcemap);
writeCompiledCodeToFile(result.js, filename, result.generatedSourceMap);
}

@@ -88,3 +88,3 @@

var TraceurLoader = traceur.runtime.TraceurLoader;
var LoaderHooks = traceur.runtime.LoaderHooks;
var InlineLoaderHooks = traceur.runtime.InlineLoaderHooks;
var Script = traceur.syntax.trees.Script;

@@ -94,37 +94,4 @@ var SourceFile = traceur.syntax.SourceFile

/**
* @param {Array.<ParseTree>} elements
* @param {string|undefined} depTarget A valid depTarget means dependency
* printing was requested.
*/
function InlineLoaderHooks(url, elements, depTarget) {
LoaderHooks.call(this, null, url,
nodeLoader, // Load modules using node fs.
moduleStore); // Look up modules in our static module store
this.dirname = url;
this.elements = elements;
this.depTarget = depTarget && normalizePath(path.relative('.', depTarget));
this.codeUnitList = [];
}
InlineLoaderHooks.prototype = {
__proto__: LoaderHooks.prototype,
evaluateCodeUnit: function(codeUnit) {
if (this.depTarget) {
console.log('%s: %s', this.depTarget,
normalizePath(path.relative(path.join(__dirname, '../..'),
codeUnit.url)));
}
// Don't eval. Instead append the trees to the output.
var tree = codeUnit.metadata.transformedTree;
this.elements.push.apply(this.elements, tree.scriptItemList);
},
};
function allLoaded(url, elements) {
return new Script(null, elements);
}
/**

@@ -167,3 +134,6 @@ * Compiles the files in "fileNamesAndTypes" along with any associated modules,

var elements = [];
var hooks = new InlineLoaderHooks(basePath, elements, depTarget);
var hooks = new InlineLoaderHooks(basePath, elements,
nodeLoader, // Load modules using node fs.
moduleStore); // Look up modules in our static module store
var loader = new TraceurLoader(hooks);

@@ -208,3 +178,3 @@

} else {
var tree = allLoaded(basePath, elements);
var tree = hooks.toTree(basePath, elements);
callback(tree);

@@ -211,0 +181,0 @@ }

@@ -28,7 +28,7 @@ // Copyright 2013 Traceur Authors.

function compile(filename) {
function compile(filename, options) {
var contents = fs.readFileSync(filename, 'utf-8');
var results = traceurAPI.compile(contents);
var results = traceurAPI.compile(contents, options);
if (!results.js)
console.error(results.errors);
throw new Error(results.errors[0]);

@@ -59,3 +59,3 @@ return results.js;

traceurRequire.makeDefault = function(filter) {
traceurRequire.makeDefault = function(filter, options) {
if (!filter)

@@ -68,3 +68,3 @@ filters = [];

if (shouldCompile(filename)) {
var source = compile(filename)
var source = compile(filename, options);
return module._compile(source, filename);

@@ -71,0 +71,0 @@ }

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