clang-format
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -1,2 +0,2 @@ | ||
#! /usr/bin/env node | ||
#!/usr/bin/env node | ||
@@ -6,6 +6,6 @@ var clangFormat = require('../index').spawnClangFormat; | ||
try { | ||
clangFormat(process.argv.slice(2), process.exit, 'inherit'); | ||
clangFormat(process.argv.slice(2), process.exit, 'inherit'); | ||
} catch (e) { | ||
process.stdout.write(e.message); | ||
process.exit(1); | ||
process.stdout.write(e.message); | ||
process.exit(1); | ||
} |
15
index.js
@@ -14,4 +14,3 @@ var spawn = require('child_process').spawn; | ||
function clangFormat(file, enc, style, done) { | ||
return spawnClangFormat(['-style=' + style, file.path], done, | ||
['ignore', 'pipe', process.stderr]) | ||
return spawnClangFormat(['-style=' + style, file.path], done, ['ignore', 'pipe', process.stderr]) | ||
.stdout; | ||
@@ -26,10 +25,10 @@ } | ||
if (!fs.existsSync(nativeBinary)) { | ||
message = "FATAL: This module doesn't bundle the clang-format executable for your platform. " + | ||
"(" + os.platform() + "_" + os.arch() + ")\n" + | ||
"Consider installing it with your native package manager instead.\n"; | ||
throw new Error(message); | ||
message = "FATAL: This module doesn't bundle the clang-format executable for your platform. " + | ||
"(" + os.platform() + "_" + os.arch() + ")\n" + | ||
"Consider installing it with your native package manager instead.\n"; | ||
throw new Error(message); | ||
} | ||
var child_process = spawn(nativeBinary, args, { | ||
stdio: stdio, | ||
cwd: __dirname, | ||
stdio: stdio, | ||
cwd: __dirname, | ||
}); | ||
@@ -36,0 +35,0 @@ child_process.on('close', function(exit) { |
{ | ||
"name": "clang-format", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"description": "node wrapper around clang-format", | ||
@@ -13,4 +13,7 @@ "repository": { | ||
}, | ||
"author": "Alex Eagle <alexeagle@google.com>", | ||
"contributors": [ | ||
"Alex Eagle <alexeagle@google.com>", | ||
"Martin Probst <martinprobst@google.com>" | ||
], | ||
"license": "Apache 2" | ||
} |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
3064619
12
47
2