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

esbuild-wasm

Package Overview
Dependencies
Maintainers
1
Versions
464
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

esbuild-wasm - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

34

lib/main.js

@@ -5,9 +5,29 @@ const child_process = require('child_process');

function binPath() {
// This file is used for both the "esbuild" package and the "esbuild-wasm"
// package. The publishing script copies this file into the "esbuild-wasm"
// package and then sets this variable to true.
const WASM = true;
function esbuildSpawn({ flags, stdio }) {
if ((process.platform === 'linux' || process.platform === 'darwin') && os.arch() === 'x64') {
return path.join(__dirname, '..', 'bin', 'esbuild');
return child_process.spawn(path.join(__dirname, '..', 'bin', 'esbuild'), flags, {
cwd: process.cwd(),
stdio,
});
}
if (process.platform === 'win32' && os.arch() === 'x64') {
return path.join(__dirname, '..', '.install', 'node_modules', 'esbuild-windows-64', 'esbuild.exe');
if (WASM) {
return child_process.spawn(['node'], [path.join(__dirname, '..', 'bin', 'esbuild')].concat(flags), {
cwd: process.cwd(),
windowsHide: true,
stdio,
});
} else {
return child_process.spawn(path.join(__dirname, '..', 'esbuild.exe'), flags, {
cwd: process.cwd(),
windowsHide: true,
stdio,
});
}
}

@@ -63,3 +83,3 @@

const child = child_process.spawn(binPath(), flags, { cwd: process.cwd(), windowsHide: true, stdio });
const child = esbuildSpawn({ flags, stdio });
child.on('error', error => reject(error));

@@ -109,4 +129,4 @@

return new Promise((resolve, reject) => {
const child = child_process.spawn(binPath(), ['--service'], {
windowsHide: true,
const child = esbuildSpawn({
flags: ['--service'],
stdio: ['pipe', 'pipe', 'inherit'],

@@ -265,4 +285,4 @@ });

},
}));
}), error => reject(error));
});
};
{
"name": "esbuild-wasm",
"version": "0.2.4",
"version": "0.2.5",
"description": "The cross-platform WebAssembly binary for esbuild, a JavaScript bundler.",

@@ -5,0 +5,0 @@ "repository": "https://github.com/evanw/esbuild",

Sorry, the diff of this file is not supported yet

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