sass-loader
Advanced tools
Comparing version 10.0.0-rc.0 to 10.0.0
@@ -5,2 +5,8 @@ # Changelog | ||
## [10.0.0](https://github.com/webpack-contrib/sass-loader/compare/v10.0.0-rc.0...v10.0.0) (2020-08-24) | ||
### Bug Fixes | ||
* handle absolute windows path in source maps | ||
## [10.0.0-rc.0](https://github.com/webpack-contrib/sass-loader/compare/v9.0.3...v10.0.0-rc.0) (2020-08-24) | ||
@@ -7,0 +13,0 @@ |
@@ -163,3 +163,4 @@ "use strict"; | ||
options.sourceMapContents = true; | ||
options.omitSourceMapUrl = true; // options.sourceMapEmbed = false; | ||
options.omitSourceMapUrl = true; | ||
options.sourceMapEmbed = false; | ||
} | ||
@@ -243,4 +244,8 @@ | ||
return (context, request) => new Promise((resolve, reject) => { | ||
callbackResolve(context, request, (err, result) => { | ||
if (err) reject(err);else resolve(result); | ||
callbackResolve(context, request, (error, result) => { | ||
if (error) { | ||
reject(error); | ||
} else { | ||
resolve(result); | ||
} | ||
}); | ||
@@ -250,5 +255,5 @@ }); | ||
const isSpecialModuleImport = /^~[^/]+$/; // `[drive_letter]:\` + `\\[server]\[sharename]\` | ||
const IS_SPECIAL_MODULE_IMPORT = /^~[^/]+$/; // `[drive_letter]:\` + `\\[server]\[sharename]\` | ||
const isNativeWin32Path = /^[a-zA-Z]:[/\\]|^\\\\/i; | ||
const IS_NATIVE_WIN32_PATH = /^[a-z]:[/\\]|^\\\\/i; | ||
/** | ||
@@ -337,7 +342,7 @@ * @public | ||
const needEmulateSassResolver = // `sass` doesn't support module import | ||
!isSpecialModuleImport.test(request) && // We need improve absolute paths handling. | ||
!IS_SPECIAL_MODULE_IMPORT.test(request) && // We need improve absolute paths handling. | ||
// Absolute paths should be resolved: | ||
// - Server-relative URLs - `<context>/path/to/file.ext` (where `<context>` is root context) | ||
// - Absolute path - `/full/path/to/file.ext` or `C:\\full\path\to\file.ext` | ||
!isFileScheme && !originalRequest.startsWith('/') && !isNativeWin32Path.test(originalRequest); | ||
!isFileScheme && !originalRequest.startsWith('/') && !IS_NATIVE_WIN32_PATH.test(originalRequest); | ||
@@ -442,2 +447,6 @@ if (includePaths.length > 0 && needEmulateSassResolver) { | ||
if (IS_NATIVE_WIN32_PATH.test(source)) { | ||
return 'path-absolute'; | ||
} | ||
return ABSOLUTE_SCHEME.test(source) ? 'absolute' : 'path-relative'; | ||
@@ -444,0 +453,0 @@ } |
{ | ||
"name": "sass-loader", | ||
"version": "10.0.0-rc.0", | ||
"version": "10.0.0", | ||
"description": "Sass loader for webpack", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
65745
502
0
8