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.20 to 0.0.21

4

package.json
{
"name": "traceur",
"version": "0.0.20",
"version": "0.0.21",
"description": "Experimental ES6 to ES5 compiler",

@@ -48,5 +48,5 @@ "keywords": [

"semver": "2.2.1",
"traceur": "0.0.19"
"traceur": "0.0.20"
},
"subdomain": "traceur"
}

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

// The System object requires traceur, but we want it set for everything that
// The System object requires traceur, but we want it set for everything that
// follows. The module sets global.System as a side-effect.

@@ -151,4 +151,6 @@ require('./System.js');

var includes = flags.args;
var includes = traceur.options.scripts || [];
includes = includes.concat(flags.args);
if (!includes.length) {

@@ -155,0 +157,0 @@ // TODO: Start trepl

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

var AttachModuleNameTransformer =
traceur.codegeneration.AttachModuleNameTransformer;
traceur.codegeneration.module.AttachModuleNameTransformer;
var FromOptionsTransformer = traceur.codegeneration.FromOptionsTransformer;

@@ -27,0 +27,0 @@ var Parser = traceur.syntax.Parser;

@@ -27,4 +27,2 @@ // Copyright 2012 Traceur Authors.

var SourceFile = traceur.syntax.SourceFile
var SourceMapGenerator = traceur.outputgeneration.SourceMapGenerator;
var ModuleAnalyzer = traceur.semantics.ModuleAnalyzer;
var moduleStore = traceur.runtime.ModuleStore;

@@ -39,3 +37,3 @@

function InlineLoaderHooks(reporter, url, elements, depTarget) {
LoaderHooks.call(this, reporter, url, undefined,
LoaderHooks.call(this, reporter, url,
nodeLoader, // Load modules using node fs.

@@ -103,2 +101,4 @@ moduleStore); // Look up modules in our static module store

var scriptsCount = options.scripts.length;
var loadCount = 0;

@@ -109,18 +109,37 @@ var elements = [];

function appendEvaluateModule(name, referrerName) {
var normalizedName =
traceur.ModuleStore.normalize(name, referrerName);
// Create tree for System.get('normalizedName');
var tree =
traceur.codegeneration.module.createModuleEvaluationStatement(normalizedName);
elements.push(tree);
}
function loadNext() {
var codeUnit = loader.loadAsScript(filenames[loadCount],
{referrerName: referrerName},
function() {
loadCount++;
if (loadCount < filenames.length) {
loadNext();
} else if (depTarget) {
callback(null);
} else {
var tree = allLoaded(basePath, reporter, elements);
callback(tree);
}
}, function(err) {
errback(err);
});
var loadAsScript = scriptsCount && (loadCount < scriptsCount);
var loadFunction = loader.import;
var name = filenames[loadCount];
if (loadAsScript)
loadFunction = loader.loadAsScript;
else
name = name.replace(/\.js$/,'');
var loadOptions = {referrerName: referrerName};
var codeUnit = loadFunction.call(loader, name, loadOptions).then(
function() {
if (!loadAsScript && options.modules !== 'inline')
appendEvaluateModule(name, referrerName);
loadCount++;
if (loadCount < filenames.length) {
loadNext();
} else if (depTarget) {
callback(null);
} else {
var tree = allLoaded(basePath, reporter, elements);
callback(tree);
}
}, function(err) {
errback(err);
});
}

@@ -127,0 +146,0 @@

@@ -31,4 +31,3 @@ // Copyright 2013 Traceur Authors.

// Load dependencies as relative to the argument.
var loaderHooks = new LoaderHooks(reporter, moduleName, undefined,
nodeLoader);
var loaderHooks = new LoaderHooks(reporter, moduleName, nodeLoader);
return new traceur.runtime.TraceurLoader(loaderHooks);

@@ -35,0 +34,0 @@ }

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

var url = './';
var loaderHooks = new LoaderHooks(reporter, url, undefined, nodeLoader);
var loaderHooks = new LoaderHooks(reporter, url, nodeLoader);

@@ -26,0 +26,0 @@ var System = new traceur.runtime.TraceurLoader(loaderHooks);

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