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

clang-format

Package Overview
Dependencies
Maintainers
3
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clang-format - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0

26

index.js

@@ -171,17 +171,25 @@ #!/usr/bin/env node

let nativeBinary;
if (os.platform() === 'win32') {
const platform = os.platform();
const arch = os.arch();
if (platform === 'win32') {
nativeBinary = `${__dirname}/bin/win32/clang-format.exe`;
} else {
nativeBinary = `${__dirname}/bin/${os.platform()}_${os.arch()}/clang-format`;
nativeBinary = `${__dirname}/bin/${platform}_${arch}/clang-format`;
}
if (!fs.existsSync(nativeBinary)) {
const message = '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);
if (fs.existsSync(nativeBinary)) {
return nativeBinary;
}
return nativeBinary;
// Let arm64 macOS fall back to x64
if (platform === 'darwin' && arch === 'arm64') {
nativeBinary = `${__dirname}/bin/darwin_x64/clang-format`;
if (fs.existsSync(nativeBinary)) {
return nativeBinary;
}
}
const message = 'This module doesn\'t bundle the clang-format executable for your platform. ' +
`(${platform}_${arch})\n` +
'Consider installing it with your native package manager instead.\n';
throw new Error(message);
}

@@ -188,0 +196,0 @@

{
"name": "clang-format",
"version": "1.4.0",
"version": "1.5.0",
"description": "node wrapper around clang-format",

@@ -5,0 +5,0 @@ "repository": {

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