sass-embedded
Advanced tools
Comparing version 1.58.3 to 1.59.2
@@ -18,3 +18,3 @@ "use strict"; | ||
/** The underlying process that's being wrapped. */ | ||
this.process = (0, child_process_1.spawn)(compiler_path_1.compilerPath, { windowsHide: true }); | ||
this.process = (0, child_process_1.spawn)(compiler_path_1.compilerCommand[0], compiler_path_1.compilerCommand.slice(1), { windowsHide: true }); | ||
/** The child process's exit event. */ | ||
@@ -21,0 +21,0 @@ this.exit$ = new Promise(resolve => { |
@@ -6,8 +6,8 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.compilerPath = void 0; | ||
exports.compilerCommand = void 0; | ||
const fs = require("fs"); | ||
const p = require("path"); | ||
const utils_1 = require("./utils"); | ||
/** The path to the embedded compiler executable. */ | ||
exports.compilerPath = (() => { | ||
/** The full command for the embedded compiler executable. */ | ||
exports.compilerCommand = (() => { | ||
// find for development | ||
@@ -17,9 +17,23 @@ for (const path of ['vendor', '../../../lib/src/vendor']) { | ||
if (fs.existsSync(executable)) | ||
return executable; | ||
return [executable]; | ||
} | ||
try { | ||
return require.resolve(`sass-embedded-${process.platform}-${process.arch}/` + | ||
'dart-sass-embedded/dart-sass-embedded' + | ||
(process.platform === 'win32' ? '.bat' : '')); | ||
return [ | ||
require.resolve(`sass-embedded-${process.platform}-${process.arch}/` + | ||
'dart-sass-embedded/src/dart' + | ||
(process.platform === 'win32' ? '.exe' : '')), | ||
require.resolve(`sass-embedded-${process.platform}-${process.arch}/` + | ||
'dart-sass-embedded/src/dart-sass-embedded.snapshot'), | ||
]; | ||
} | ||
catch (ignored) { | ||
// ignored | ||
} | ||
try { | ||
return [ | ||
require.resolve(`sass-embedded-${process.platform}-${process.arch}/` + | ||
'dart-sass-embedded/dart-sass-embedded' + | ||
(process.platform === 'win32' ? '.bat' : '')), | ||
]; | ||
} | ||
catch (e) { | ||
@@ -26,0 +40,0 @@ if (!((0, utils_1.isErrnoException)(e) && e.code === 'MODULE_NOT_FOUND')) { |
@@ -17,3 +17,3 @@ "use strict"; | ||
/** The underlying process that's being wrapped. */ | ||
this.process = new sync_process_1.SyncProcess(compiler_path_1.compilerPath, { windowsHide: true }); | ||
this.process = new sync_process_1.SyncProcess(compiler_path_1.compilerCommand[0], compiler_path_1.compilerCommand.slice(1), { windowsHide: true }); | ||
/** The buffers emitted by the child process's stdout. */ | ||
@@ -20,0 +20,0 @@ this.stdout$ = new rxjs_1.Subject(); |
{ | ||
"name": "sass-embedded", | ||
"version": "1.58.3", | ||
"version": "1.59.2", | ||
"protocol-version": "1.2.0", | ||
"compiler-version": "1.58.3", | ||
"compiler-version": "1.59.2", | ||
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol", | ||
@@ -30,10 +30,10 @@ "repository": "sass/embedded-host-node", | ||
"optionalDependencies": { | ||
"sass-embedded-darwin-arm64": "1.58.3", | ||
"sass-embedded-darwin-x64": "1.58.3", | ||
"sass-embedded-linux-arm": "1.58.3", | ||
"sass-embedded-linux-arm64": "1.58.3", | ||
"sass-embedded-linux-ia32": "1.58.3", | ||
"sass-embedded-linux-x64": "1.58.3", | ||
"sass-embedded-win32-ia32": "1.58.3", | ||
"sass-embedded-win32-x64": "1.58.3" | ||
"sass-embedded-darwin-arm64": "1.59.2", | ||
"sass-embedded-darwin-x64": "1.59.2", | ||
"sass-embedded-linux-arm": "1.59.2", | ||
"sass-embedded-linux-arm64": "1.59.2", | ||
"sass-embedded-linux-ia32": "1.59.2", | ||
"sass-embedded-linux-x64": "1.59.2", | ||
"sass-embedded-win32-ia32": "1.59.2", | ||
"sass-embedded-win32-x64": "1.59.2" | ||
}, | ||
@@ -40,0 +40,0 @@ "dependencies": { |
{ | ||
"name": "sass-embedded", | ||
"version": "1.58.3", | ||
"version": "1.59.2", | ||
"protocol-version": "1.2.0", | ||
"compiler-version": "1.58.3", | ||
"compiler-version": "1.59.2", | ||
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol", | ||
@@ -30,10 +30,10 @@ "repository": "sass/embedded-host-node", | ||
"optionalDependencies": { | ||
"sass-embedded-darwin-arm64": "1.58.3", | ||
"sass-embedded-darwin-x64": "1.58.3", | ||
"sass-embedded-linux-arm": "1.58.3", | ||
"sass-embedded-linux-arm64": "1.58.3", | ||
"sass-embedded-linux-ia32": "1.58.3", | ||
"sass-embedded-linux-x64": "1.58.3", | ||
"sass-embedded-win32-ia32": "1.58.3", | ||
"sass-embedded-win32-x64": "1.58.3" | ||
"sass-embedded-darwin-arm64": "1.59.2", | ||
"sass-embedded-darwin-x64": "1.59.2", | ||
"sass-embedded-linux-arm": "1.59.2", | ||
"sass-embedded-linux-arm64": "1.59.2", | ||
"sass-embedded-linux-ia32": "1.59.2", | ||
"sass-embedded-linux-x64": "1.59.2", | ||
"sass-embedded-win32-ia32": "1.59.2", | ||
"sass-embedded-win32-x64": "1.59.2" | ||
}, | ||
@@ -40,0 +40,0 @@ "dependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
622609
10903
14