Comparing version 0.0.49 to 0.0.50
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Wildcard dependency
QualityPackage has a dependency with a floating version range. This can cause issues if the dependency publishes a new major version.
Found 1 instance in 1 package
1041571
27007
0
12
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedcommander@2.20.3(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedglob@4.5.3(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedminimatch@2.0.10(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedsemver@2.3.2(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removed@isaacs/cliui@8.0.2(transitive)
- Removedansi-regex@5.0.16.1.0(transitive)
- Removedansi-styles@4.3.06.2.1(transitive)
- Removedbrace-expansion@2.0.1(transitive)
- Removedcolor-convert@2.0.1(transitive)
- Removedcolor-name@1.1.4(transitive)
- Removedcommander@12.1.0(transitive)
- Removedcross-spawn@7.0.5(transitive)
- Removedeastasianwidth@0.2.0(transitive)
- Removedemoji-regex@8.0.09.2.2(transitive)
- Removedforeground-child@3.3.0(transitive)
- Removedglob@11.0.0(transitive)
- Removedis-fullwidth-code-point@3.0.0(transitive)
- Removedisexe@2.0.0(transitive)
- Removedjackspeak@4.0.2(transitive)
- Removedlru-cache@11.0.2(transitive)
- Removedminimatch@10.0.1(transitive)
- Removedminipass@7.1.2(transitive)
- Removedpackage-json-from-dist@1.0.1(transitive)
- Removedpath-key@3.1.1(transitive)
- Removedpath-scurry@2.0.0(transitive)
- Removedsemver@7.6.3(transitive)
- Removedshebang-command@2.0.0(transitive)
- Removedshebang-regex@3.0.0(transitive)
- Removedsignal-exit@4.1.0(transitive)
- Removedstring-width@4.2.35.1.2(transitive)
- Removedstrip-ansi@6.0.17.1.0(transitive)
- Removedwhich@2.0.2(transitive)
- Removedwrap-ansi@7.0.08.1.0(transitive)
Updatedcommander@2.x
Updatedglob@4.x
Updatedsemver@2.x