sass-embedded
Advanced tools
Comparing version 1.51.0 to 1.52.1
@@ -74,4 +74,7 @@ "use strict"; | ||
return url.pathToFileURL(path).toString(); | ||
const components = p.sep === '\\' ? path.split(/[/\\]/) : path.split('/'); | ||
return components.map(encodeURIComponent).join('/'); | ||
// percent encode relative path like `pathToFileURL` | ||
return encodeURI(path) | ||
.replace(/[#?]/g, encodeURIComponent) | ||
.replace(process.platform === 'win32' ? /%(5B|5C|5D|5E|7C)/g : /%(5B|5D|5E|7C)/g, decodeURIComponent) | ||
.replace(/\\/g, '/'); | ||
} | ||
@@ -78,0 +81,0 @@ exports.pathToUrlString = pathToUrlString; |
{ | ||
"name": "sass-embedded", | ||
"version": "1.51.0", | ||
"version": "1.52.1", | ||
"protocol-version": "1.0.0", | ||
"compiler-version": "1.51.0", | ||
"compiler-version": "1.52.1", | ||
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol", | ||
@@ -7,0 +7,0 @@ "repository": "sass/embedded-host-node", |
@@ -18,3 +18,4 @@ "use strict"; | ||
const OS = (() => { | ||
switch (process.platform) { | ||
const platform = process.env.npm_config_platform || process.platform; | ||
switch (platform) { | ||
case 'linux': | ||
@@ -27,3 +28,3 @@ return 'linux'; | ||
default: | ||
throw Error(`Platform ${process.platform} is not supported.`); | ||
throw Error(`Platform ${platform} is not supported.`); | ||
} | ||
@@ -34,3 +35,4 @@ })(); | ||
const ARCH = (() => { | ||
switch (process.arch) { | ||
const arch = process.env.npm_config_arch || process.arch; | ||
switch (arch) { | ||
case 'ia32': | ||
@@ -45,3 +47,3 @@ return 'ia32'; | ||
default: | ||
throw Error(`Architecure ${process.arch} is not supported.`); | ||
throw Error(`Architecure ${arch} is not supported.`); | ||
} | ||
@@ -48,0 +50,0 @@ })(); |
{ | ||
"name": "sass-embedded", | ||
"version": "1.51.0", | ||
"version": "1.52.1", | ||
"protocol-version": "1.0.0", | ||
"compiler-version": "1.51.0", | ||
"compiler-version": "1.52.1", | ||
"description": "Node.js library that communicates with Embedded Dart Sass using the Embedded Sass protocol", | ||
@@ -7,0 +7,0 @@ "repository": "sass/embedded-host-node", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
1174122
17340
10