Skip to content

Commit a4584e5

Browse files
Merge branch 'master' into fix-importers-modern-api
2 parents aed92f9 + 58ffb68 commit a4584e5

File tree

5 files changed

+470
-412
lines changed

5 files changed

+470
-412
lines changed

Diff for: src/SassError.js

+3-7
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ class SassError extends Error {
33
super();
44

55
this.name = "SassError";
6-
// TODO remove me in the next major release
7-
this.originalSassError = sassError;
86

97
if (
108
typeof sassError.line !== "undefined" ||
@@ -18,13 +16,11 @@ class SassError extends Error {
1816

1917
// Keep original error if `sassError.formatted` is unavailable
2018
this.message = `${this.name}: ${
21-
typeof this.originalSassError.message !== "undefined"
22-
? this.originalSassError.message
23-
: this.originalSassError
19+
typeof sassError.message !== "undefined" ? sassError.message : sassError
2420
}`;
2521

26-
if (this.originalSassError.formatted) {
27-
this.message = `${this.name}: ${this.originalSassError.formatted.replace(
22+
if (sassError.formatted) {
23+
this.message = `${this.name}: ${sassError.formatted.replace(
2824
/^Error: /,
2925
""
3026
)}`;

Diff for: src/utils.js

+1-3
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,7 @@ async function getSassOptions(
153153
: content;
154154

155155
if (!options.logger) {
156-
// TODO set me to `true` by default in the next major release
157-
const needEmitWarning = loaderOptions.warnRuleAsWarning === true;
158-
156+
const needEmitWarning = loaderOptions.warnRuleAsWarning !== false;
159157
const logger = loaderContext.getLogger("sass-loader");
160158
const formatSpan = (span) =>
161159
`${span.url || "-"}:${span.start.line}:${span.start.column}: `;

0 commit comments

Comments
 (0)