sass 1.22.7 → 1.22.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/sass.dart.js +70 -39
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"sass","description":"A pure JavaScript implementation of Sass.","license":"MIT","bugs":"https://github.com/sass/dart-sass/issues","homepage":"https://github.com/sass/dart-sass","repository":{"type":"git","url":"https://github.com/sass/dart-sass"},"author":{"name":"Natalie Weizenbaum","email":"nweiz@google.com","url":"https://github.com/nex3"},"engines":{"node":">=
|
|
1
|
+
{"name":"sass","description":"A pure JavaScript implementation of Sass.","license":"MIT","bugs":"https://github.com/sass/dart-sass/issues","homepage":"https://github.com/sass/dart-sass","repository":{"type":"git","url":"https://github.com/sass/dart-sass"},"author":{"name":"Natalie Weizenbaum","email":"nweiz@google.com","url":"https://github.com/nex3"},"engines":{"node":">=8.9.0"},"dependencies":{"chokidar":">=2.0.0 <4.0.0"},"main":"sass.dart.js","bin":"sass.js","keywords":["style","scss","sass","preprocessor","css"],"version":"1.22.9"}
|
package/sass.dart.js
CHANGED
|
@@ -1,34 +1,54 @@
|
|
|
1
1
|
// make sure to keep this as 'var'
|
|
2
2
|
// we don't want block scoping
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
var url = require("url");
|
|
5
|
+
var dartNodePreambleSelf = typeof global !== "undefined" ? global : window;
|
|
6
|
+
|
|
7
|
+
var self = Object.create(dartNodePreambleSelf);
|
|
4
8
|
|
|
5
9
|
self.scheduleImmediate = self.setImmediate
|
|
6
10
|
? function (cb) {
|
|
7
|
-
|
|
11
|
+
dartNodePreambleSelf.setImmediate(cb);
|
|
8
12
|
}
|
|
9
13
|
: function(cb) {
|
|
10
14
|
setTimeout(cb, 0);
|
|
11
15
|
};
|
|
12
16
|
|
|
17
|
+
// CommonJS globals.
|
|
13
18
|
self.exports = exports;
|
|
14
|
-
self.process = process;
|
|
15
19
|
|
|
16
|
-
|
|
17
|
-
|
|
20
|
+
// Node.js specific exports, check to see if they exist & or polyfilled
|
|
21
|
+
|
|
22
|
+
if (typeof process !== "undefined") {
|
|
23
|
+
self.process = process;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (typeof __dirname !== "undefined") {
|
|
27
|
+
self.__dirname = __dirname;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (typeof __filename !== "undefined") {
|
|
31
|
+
self.__filename = __filename;
|
|
32
|
+
}
|
|
18
33
|
|
|
19
34
|
// if we're running in a browser, Dart supports most of this out of box
|
|
20
35
|
// make sure we only run these in Node.js environment
|
|
21
|
-
if (!
|
|
22
|
-
// TODO: This isn't really a correct transformation. For example, it will fail
|
|
23
|
-
// for paths that contain characters that need to be escaped in URLs. Once
|
|
24
|
-
// dart-lang/sdk#27979 is fixed, it should be possible to make it better.
|
|
36
|
+
if (!dartNodePreambleSelf.window) {
|
|
25
37
|
self.location = {
|
|
26
38
|
get href() {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
if (url.pathToFileURL) {
|
|
40
|
+
return url.pathToFileURL(process.cwd()).href + "/";
|
|
41
|
+
} else {
|
|
42
|
+
// This isn't really a correct transformation, but it's the best we have
|
|
43
|
+
// for versions of Node <10.12.0 which introduced `url.pathToFileURL()`.
|
|
44
|
+
// For example, it will fail for paths that contain characters that need
|
|
45
|
+
// to be escaped in URLs.
|
|
46
|
+
return "file://" + (function() {
|
|
47
|
+
var cwd = process.cwd();
|
|
48
|
+
if (process.platform != "win32") return cwd;
|
|
49
|
+
return "/" + cwd.replace(/\\/g, "/");
|
|
50
|
+
})() + "/"
|
|
51
|
+
}
|
|
32
52
|
}
|
|
33
53
|
};
|
|
34
54
|
|
|
@@ -68,6 +88,7 @@ if (!global.window) {
|
|
|
68
88
|
}
|
|
69
89
|
};
|
|
70
90
|
}
|
|
91
|
+
|
|
71
92
|
self.fs = require("fs");
|
|
72
93
|
self.chokidar = require("chokidar");
|
|
73
94
|
self.readline = require("readline");
|
|
@@ -8135,7 +8156,7 @@ self.readline = require("readline");
|
|
|
8135
8156
|
switch ($async$goto) {
|
|
8136
8157
|
case 0:
|
|
8137
8158
|
// Function start
|
|
8138
|
-
$async$returnValue = "1.22.
|
|
8159
|
+
$async$returnValue = "1.22.9 compiled with dart2js 2.4.0";
|
|
8139
8160
|
// goto return
|
|
8140
8161
|
$async$goto = 1;
|
|
8141
8162
|
break;
|
|
@@ -10364,7 +10385,7 @@ self.readline = require("readline");
|
|
|
10364
10385
|
J.set$run_$x(self.exports, P.allowInterop(new B.main_closure()));
|
|
10365
10386
|
J.set$render$x(self.exports, P.allowInterop(B.node___render$closure()));
|
|
10366
10387
|
J.set$renderSync$x(self.exports, P.allowInterop(B.node___renderSync$closure()));
|
|
10367
|
-
J.set$info$x(self.exports, "dart-sass\t1.22.
|
|
10388
|
+
J.set$info$x(self.exports, "dart-sass\t1.22.9\t(Sass Compiler)\t[Dart]\ndart2js\t2.4.0\t(Dart Compiler)\t[Dart]");
|
|
10368
10389
|
J.set$types$x(self.exports, {Boolean: $.$get$booleanConstructor(), Color: $.$get$colorConstructor(), List: $.$get$listConstructor(), Map: $.$get$mapConstructor(), Null: $.$get$nullConstructor(), Number: $.$get$numberConstructor(), String: $.$get$stringConstructor(), Error: self.Error});
|
|
10369
10390
|
},
|
|
10370
10391
|
_render: function(options, callback) {
|
|
@@ -14124,8 +14145,18 @@ self.readline = require("readline");
|
|
|
14124
14145
|
SourceLocationMixin: function SourceLocationMixin() {
|
|
14125
14146
|
},
|
|
14126
14147
|
current: function() {
|
|
14127
|
-
var path, lastIndex,
|
|
14148
|
+
var exception, t1, path, lastIndex, uri = null;
|
|
14149
|
+
try {
|
|
14128
14150
|
uri = P.Uri_base();
|
|
14151
|
+
} catch (exception) {
|
|
14152
|
+
if (!!J.getInterceptor$(H.unwrapException(exception)).$isException) {
|
|
14153
|
+
t1 = $._current;
|
|
14154
|
+
if (t1 != null)
|
|
14155
|
+
return t1;
|
|
14156
|
+
throw exception;
|
|
14157
|
+
} else
|
|
14158
|
+
throw exception;
|
|
14159
|
+
}
|
|
14129
14160
|
if (J.$eq$(uri, $._currentUriBase))
|
|
14130
14161
|
return $._current;
|
|
14131
14162
|
$._currentUriBase = uri;
|
|
@@ -21917,6 +21948,7 @@ self.readline = require("readline");
|
|
|
21917
21948
|
toString$0: function(_) {
|
|
21918
21949
|
return "Exception: " + this.message;
|
|
21919
21950
|
},
|
|
21951
|
+
$isException: 1,
|
|
21920
21952
|
get$message: function(receiver) {
|
|
21921
21953
|
return this.message;
|
|
21922
21954
|
}
|
|
@@ -21990,6 +22022,7 @@ self.readline = require("readline");
|
|
|
21990
22022
|
} else
|
|
21991
22023
|
return offset != null ? report + (" (at offset " + H.S(offset) + ")") : report;
|
|
21992
22024
|
},
|
|
22025
|
+
$isException: 1,
|
|
21993
22026
|
get$message: function(receiver) {
|
|
21994
22027
|
return this.message;
|
|
21995
22028
|
},
|
|
@@ -24304,7 +24337,7 @@ self.readline = require("readline");
|
|
|
24304
24337
|
isAbsoluteAndNotRootRelative = !t3.isRootRelative$1(t5);
|
|
24305
24338
|
t4 = H.S(t5);
|
|
24306
24339
|
} else {
|
|
24307
|
-
if (!(t5.length
|
|
24340
|
+
if (!(t5.length !== 0 && t3.containsSeparator$1(t5[0])))
|
|
24308
24341
|
if (needsSeparator)
|
|
24309
24342
|
t4 += t3.get$separator();
|
|
24310
24343
|
t4 += H.S(t5);
|
|
@@ -24408,7 +24441,7 @@ self.readline = require("readline");
|
|
|
24408
24441
|
pathParsed = X.ParsedPath_ParsedPath$parse(path, t1);
|
|
24409
24442
|
pathParsed.normalize$0();
|
|
24410
24443
|
t2 = fromParsed.parts;
|
|
24411
|
-
if (t2.length
|
|
24444
|
+
if (t2.length !== 0 && J.$eq$(t2[0], "."))
|
|
24412
24445
|
return pathParsed.toString$0(0);
|
|
24413
24446
|
t2 = fromParsed.root;
|
|
24414
24447
|
t3 = pathParsed.root;
|
|
@@ -24420,9 +24453,9 @@ self.readline = require("readline");
|
|
|
24420
24453
|
return pathParsed.toString$0(0);
|
|
24421
24454
|
while (true) {
|
|
24422
24455
|
t2 = fromParsed.parts;
|
|
24423
|
-
if (t2.length
|
|
24456
|
+
if (t2.length !== 0) {
|
|
24424
24457
|
t3 = pathParsed.parts;
|
|
24425
|
-
t2 = t3.length
|
|
24458
|
+
t2 = t3.length !== 0 && t1.pathsEqual$2(t2[0], t3[0]);
|
|
24426
24459
|
} else
|
|
24427
24460
|
t2 = false;
|
|
24428
24461
|
if (!t2)
|
|
@@ -24433,7 +24466,7 @@ self.readline = require("readline");
|
|
|
24433
24466
|
C.JSArray_methods.removeAt$1(pathParsed.separators, 1);
|
|
24434
24467
|
}
|
|
24435
24468
|
t2 = fromParsed.parts;
|
|
24436
|
-
if (t2.length
|
|
24469
|
+
if (t2.length !== 0 && J.$eq$(t2[0], ".."))
|
|
24437
24470
|
throw H.wrapException(X.PathException$(_s26_ + H.S(path) + '" from "' + H.S(from) + '".'));
|
|
24438
24471
|
t2 = P.String;
|
|
24439
24472
|
C.JSArray_methods.insertAll$2(pathParsed.parts, 0, P.List_List$filled(fromParsed.parts.length, "..", t2));
|
|
@@ -24796,7 +24829,7 @@ self.readline = require("readline");
|
|
|
24796
24829
|
}
|
|
24797
24830
|
t1 = _this.separators;
|
|
24798
24831
|
t2 = t1.length;
|
|
24799
|
-
if (t2
|
|
24832
|
+
if (t2 !== 0)
|
|
24800
24833
|
t1[t2 - 1] = "";
|
|
24801
24834
|
},
|
|
24802
24835
|
normalize$1$canonicalize: function(canonicalize) {
|
|
@@ -24808,7 +24841,7 @@ self.readline = require("readline");
|
|
|
24808
24841
|
t5 = J.getInterceptor$(part);
|
|
24809
24842
|
if (!(t5.$eq(part, ".") || t5.$eq(part, "")))
|
|
24810
24843
|
if (t5.$eq(part, ".."))
|
|
24811
|
-
if (newParts.length
|
|
24844
|
+
if (newParts.length !== 0)
|
|
24812
24845
|
newParts.pop();
|
|
24813
24846
|
else
|
|
24814
24847
|
++leadingDoubles;
|
|
@@ -24821,7 +24854,7 @@ self.readline = require("readline");
|
|
|
24821
24854
|
newParts.push(".");
|
|
24822
24855
|
newSeparators = P.List_List$generate(newParts.length, new X.ParsedPath_normalize_closure(_this), true, t1);
|
|
24823
24856
|
t1 = _this.root;
|
|
24824
|
-
C.JSArray_methods.insert$2(newSeparators, 0, t1 != null && newParts.length
|
|
24857
|
+
C.JSArray_methods.insert$2(newSeparators, 0, t1 != null && newParts.length !== 0 && t4.needsSeparator$1(t1) ? t4.get$separator() : "");
|
|
24825
24858
|
_this.parts = newParts;
|
|
24826
24859
|
_this.separators = newSeparators;
|
|
24827
24860
|
t1 = _this.root;
|
|
@@ -24878,6 +24911,7 @@ self.readline = require("readline");
|
|
|
24878
24911
|
toString$0: function(_) {
|
|
24879
24912
|
return "PathException: " + this.message;
|
|
24880
24913
|
},
|
|
24914
|
+
$isException: 1,
|
|
24881
24915
|
get$message: function(receiver) {
|
|
24882
24916
|
return this.message;
|
|
24883
24917
|
}
|
|
@@ -25553,8 +25587,10 @@ self.readline = require("readline");
|
|
|
25553
25587
|
}
|
|
25554
25588
|
if (_this.restArgument != null)
|
|
25555
25589
|
return;
|
|
25556
|
-
if (positional > t2)
|
|
25557
|
-
|
|
25590
|
+
if (positional > t2) {
|
|
25591
|
+
t1 = "Only " + t2 + " ";
|
|
25592
|
+
throw H.wrapException(E.SassScriptException$(t1 + (names.get$isEmpty(names) ? "" : "positional ") + B.pluralize(_s8_, t2, null) + " allowed, but " + positional + " " + B.pluralize("was", positional, "were") + " passed."));
|
|
25593
|
+
}
|
|
25558
25594
|
if (namedUsed < t3.get$length(t3)) {
|
|
25559
25595
|
unknownNames = P.LinkedHashSet_LinkedHashSet$of(names, P.String);
|
|
25560
25596
|
t2 = P.Object;
|
|
@@ -29424,7 +29460,7 @@ self.readline = require("readline");
|
|
|
29424
29460
|
return destination != null;
|
|
29425
29461
|
}
|
|
29426
29462
|
};
|
|
29427
|
-
B.UsageException.prototype = {
|
|
29463
|
+
B.UsageException.prototype = {$isException: 1,
|
|
29428
29464
|
get$message: function(receiver) {
|
|
29429
29465
|
return this.message;
|
|
29430
29466
|
}
|
|
@@ -39445,7 +39481,7 @@ self.readline = require("readline");
|
|
|
39445
39481
|
t1 = H.unwrapException(exception);
|
|
39446
39482
|
if (t1 instanceof E.SassFormatException) {
|
|
39447
39483
|
error = t1;
|
|
39448
|
-
throw H.wrapException(this._value$_exception$
|
|
39484
|
+
throw H.wrapException(this._value$_exception$2(C.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""), $name));
|
|
39449
39485
|
} else
|
|
39450
39486
|
throw exception;
|
|
39451
39487
|
}
|
|
@@ -39471,7 +39507,7 @@ self.readline = require("readline");
|
|
|
39471
39507
|
t1 = H.unwrapException(exception);
|
|
39472
39508
|
if (t1 instanceof E.SassFormatException) {
|
|
39473
39509
|
error = t1;
|
|
39474
|
-
throw H.wrapException(this._value$_exception$
|
|
39510
|
+
throw H.wrapException(this._value$_exception$2(C.JSString_methods.replaceFirst$2(J.toString$0$(error), "Error: ", ""), $name));
|
|
39475
39511
|
} else
|
|
39476
39512
|
throw exception;
|
|
39477
39513
|
}
|
|
@@ -39582,9 +39618,6 @@ self.readline = require("readline");
|
|
|
39582
39618
|
},
|
|
39583
39619
|
_value$_exception$2: function(message, $name) {
|
|
39584
39620
|
return new E.SassScriptException($name == null ? message : "$" + $name + ": " + message);
|
|
39585
|
-
},
|
|
39586
|
-
_value$_exception$1: function(message) {
|
|
39587
|
-
return this._value$_exception$2(message, null);
|
|
39588
39621
|
}
|
|
39589
39622
|
};
|
|
39590
39623
|
D.SassArgumentList.prototype = {};
|
|
@@ -39968,7 +40001,7 @@ self.readline = require("readline");
|
|
|
39968
40001
|
result = T.fuzzyCheckRange(_this.value, min, max);
|
|
39969
40002
|
if (result != null)
|
|
39970
40003
|
return result;
|
|
39971
|
-
throw H.wrapException(_this._number0$_exception$
|
|
40004
|
+
throw H.wrapException(_this._number0$_exception$2("Expected " + _this.toString$0(0) + " to be within " + min + _this.get$unitString() + " and " + max + _this.get$unitString() + ".", $name));
|
|
39972
40005
|
},
|
|
39973
40006
|
hasUnit$1: function(unit) {
|
|
39974
40007
|
var t1 = this.numeratorUnits;
|
|
@@ -40199,9 +40232,6 @@ self.readline = require("readline");
|
|
|
40199
40232
|
},
|
|
40200
40233
|
_number0$_exception$2: function(message, $name) {
|
|
40201
40234
|
return new E.SassScriptException($name == null ? message : "$" + $name + ": " + message);
|
|
40202
|
-
},
|
|
40203
|
-
_number0$_exception$1: function(message) {
|
|
40204
|
-
return this._number0$_exception$2(message, null);
|
|
40205
40235
|
}
|
|
40206
40236
|
};
|
|
40207
40237
|
T.SassNumber_valueInUnits_closure.prototype = {
|
|
@@ -49959,7 +49989,7 @@ self.readline = require("readline");
|
|
|
49959
49989
|
_this._buffer.writeCharCode$1(91);
|
|
49960
49990
|
else if (value._list$_contents.length === 0) {
|
|
49961
49991
|
if (!_this._inspect)
|
|
49962
|
-
throw H.wrapException(E.SassScriptException$("() isn't a valid CSS value"));
|
|
49992
|
+
throw H.wrapException(E.SassScriptException$("() isn't a valid CSS value."));
|
|
49963
49993
|
_this._buffer.write$1(0, "()");
|
|
49964
49994
|
return;
|
|
49965
49995
|
}
|
|
@@ -51317,7 +51347,8 @@ self.readline = require("readline");
|
|
|
51317
51347
|
},
|
|
51318
51348
|
toString$0: function($receiver) {
|
|
51319
51349
|
return this.toString$1$color($receiver, null);
|
|
51320
|
-
}
|
|
51350
|
+
},
|
|
51351
|
+
$isException: 1
|
|
51321
51352
|
};
|
|
51322
51353
|
G.SourceSpanFormatException.prototype = {
|
|
51323
51354
|
get$source: function() {
|