sass-embedded 1.0.0-rc.1 → 1.49.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/CHANGELOG.md CHANGED
@@ -1,71 +1,2418 @@
1
+ ## 1.49.9
2
+
3
+ ### Embedded Sass
4
+
5
+ * Fixed a bug where the legacy API could crash when passed an empty importer
6
+ list.
7
+
8
+ ## 1.49.8
9
+
10
+ * Fixed a bug where some plain CSS imports would not be emitted.
11
+
12
+ ### JS API
13
+
14
+ * Fix a bug where inspecting the Sass module in the Node.js console crashed on
15
+ Node 17.
16
+
17
+ ### Embedded Sass
18
+
19
+ * Fix a bug where source map URLs were incorrectly generated when passing
20
+ importers to the legacy API.
21
+
22
+ ## 1.49.7
23
+
24
+ ### Embedded Sass
25
+
26
+ * First stable release the `sass-embedded` npm package that contains the Node.js
27
+ Embedded Host.
28
+
29
+ * First stable release of the `sass_embedded` pub package that contains the
30
+ Embedded Dart Sass compiler.
31
+
32
+ ## 1.49.6
33
+
34
+ * No user-visible changes.
35
+
36
+ ## 1.49.5
37
+
38
+ * No user-visible changes.
39
+
40
+ ## 1.49.4
41
+
42
+ * No user-visible changes.
43
+
44
+ ## 1.49.3
45
+
46
+ * No user-visible changes.
47
+
48
+ ## 1.49.2
49
+
50
+ * No user-visible changes.
51
+
52
+ ## 1.49.1
53
+
54
+ * Stop supporting non-LTS Node.js versions.
55
+
56
+ ## 1.49.0
57
+
58
+ * Fix a bug in `string.insert` with certain negative indices.
59
+
60
+ ### JS API
61
+
62
+ * Add support for the `sourceMapIncludeSources` option in the new JS API.
63
+
64
+ #### TypeScript Declarations
65
+
66
+ * Fix a bug where `LegacyPluginThis.options.linefeed` was typed to return
67
+ abbreviations when it actually returned literal linefeed characters.
68
+
69
+ ## 1.48.0
70
+
71
+ ### JS API
72
+
73
+ * **Potentially breaking bug fix:** Match the specification of the new JS API by
74
+ setting `LegacyResult.map` to `undefined` rather than `null`.
75
+
76
+ #### TypeScript Declarations
77
+
78
+ * Add a declaration for the `NULL` constant.
79
+
80
+ ## 1.47.0
81
+
82
+ ### JS API
83
+
84
+ #### TypeScript Declarations
85
+
86
+ * Add declarations for the `TRUE` and `FALSE` constants.
87
+
88
+ ## 1.46.0
89
+
90
+ ### JS API
91
+
92
+ * **Potentially breaking bug fix:** Match the specification of the new JS API by
93
+ passing `undefined` rather than `null` to `Logger.warn()` for an unset `span`.
94
+
95
+ #### TypeScript Declarations
96
+
97
+ * Add a declaration for the `LegacyPluginThis.options.context` field.
98
+
99
+ * Update the definition of `LegacyAsyncFunction` to include explicit definitions
100
+ with zero through six arguments before the `done` parameter. This makes it
101
+ possible for TypeScript users to pass in callbacks that take a specific number
102
+ of arguments, rather than having to declare a callback that takes an arbitrary
103
+ number.
104
+
105
+ * Add a declaration for `types.Error`, a legacy API class that can be returned
106
+ by asynchronous functions to signal asynchronous errors.
107
+
108
+ * Add a `LegacyAsyncFunctionDone` type for the `done` callback that's passed to
109
+ `LegacyAsyncFunction`.
110
+
111
+ ## 1.45.2
112
+
113
+ ### JS API
114
+
115
+ * **Potentially breaking bug fix:** Change the default value of the `separator`
116
+ parameter for `new SassArgumentList()` to `','` rather than `null`. This
117
+ matches the API specification.
118
+
119
+ ## 1.45.1
120
+
121
+ * **Potentially breaking bug fix:** Properly parse custom properties in
122
+ `@supports` conditions. Note that this means that SassScript expressions on
123
+ the right-hand side of custom property `@supports` queries now need to be
124
+ interpolated, as per https://sass-lang.com/d/css-vars.
125
+
126
+ * **Potentially breaking bug fix:** Fix a bug where `inspect()` was not
127
+ properly printing nested, empty, bracketed lists.
128
+
129
+ ## 1.45.0
130
+
131
+ ### JS API
132
+
133
+ This release includes an entirely new JavaScript API, designed to be more
134
+ idiomatic, performant, and usable. The old API will continue to be supported
135
+ until Dart Sass 2.0.0, but it is now considered deprecated and should be avoided
136
+ for new code.
137
+
138
+ The new API includes:
139
+
140
+ * `compile()` and `compileAsync()` functions that take Sass file paths and
141
+ return the result of compiling them to CSS. The async function returns a
142
+ `Promise` rather than using a callback-based API.
143
+
144
+ * `compileString()` and `compileStringAsync()` functions that take a string of
145
+ Sass source and compiles it to CSS. As above, the async function returns a
146
+ `Promise`.
147
+
148
+ * A new importer API that more closely matches the Sass specification's logic
149
+ for resolving loads. This makes it much easier for Sass to cache information
150
+ across `@import` and `@use` rules, which substantially improves performance
151
+ for applications that rely heavily on repeated `@import`s.
152
+
153
+ * A new custom function API, including much more usable JS representations of
154
+ Sass value types complete with type-assertion functions, easy map and list
155
+ lookups, and compatibility with the [`immutable`] package. **Unlike in the
156
+ legacy API,** function callbacks now take one argument which contains an array
157
+ of Sass values (rather than taking a separate JS argument for each Sass
158
+ argument).
159
+
160
+ [`immutable`]: https://immutable-js.com/
161
+
162
+ For full documentation of this API, please see [the Sass website][js-api].
163
+
164
+ [js-api]: https://sass-lang.com/documentation/js-api
165
+
166
+ This release also adds TypeScript type definitions.
167
+
168
+ ## 1.44.0
169
+
170
+ * Suggest `calc()` as an alternative in `/`-as-division deprecation messages.
171
+
172
+ ### Dart API
173
+
174
+ * Add `SassNumber.convert()` and `SassNumber.convertValue()`. These work like
175
+ `SassNumber.coerce()` and `SassNumber.coerceValue()`, except they don't treat
176
+ unitless numbers as universally compatible.
177
+
178
+ * Fix a bug where `SassNumber.coerceToMatch()` and
179
+ `SassNumber.coerceValueToMatch()` wouldn't coerce single-unit numbers to
180
+ match unitless numbers.
181
+
182
+ ## 1.43.5
183
+
184
+ * Fix a bug where calculations with different operators were incorrectly
185
+ considered equal.
186
+
187
+ * Properly parse attribute selectors with empty namespaces.
188
+
189
+ ### JS API
190
+
191
+ * Print more detailed JS stack traces. This is mostly useful for the Sass team's
192
+ own debugging purposes.
193
+
194
+ ## 1.43.4
195
+
196
+ ### JS API
197
+
198
+ * Fix a bug where the `logger` option was ignored for the `render()` function.
199
+
200
+ ## 1.43.3
201
+
202
+ * Improve performance.
203
+
204
+ ## 1.43.2
205
+
206
+ * Improve the error message when the default namespace of a `@use` rule is not
207
+ a valid identifier.
208
+
209
+ ## 1.43.1
210
+
211
+ * No user-visible changes.
212
+
213
+ ## 1.43.0
214
+
215
+ ### JS API
216
+
217
+ * Add support for the `logger` option. This takes an object that can define
218
+ `warn` or `debug` methods to add custom handling for messages emitted by the
219
+ Sass compiler. See [the JS API docs] for details.
220
+
221
+ [the JS API docs]: https://sass-lang.com/documentation/js-api/interfaces/Logger
222
+
223
+ * Add a `Logger.silent` object that can be passed to the `logger` option to
224
+ silence all messages from the Sass compiler.
225
+
226
+ ## 1.42.1
227
+
228
+ * Fix a bug where Sass variables and function calls in calculations weren't
229
+ being resolved correctly if there was a parenthesized interpolation elsewhere
230
+ in the file.
231
+
232
+ ## 1.42.0
233
+
234
+ * `min()` and `max()` expressions are once again parsed as calculations as long
235
+ as they contain only syntax that's allowed in calculation expressions. To
236
+ avoid the backwards-compatibility issues that were present in 1.40.0, they now
237
+ allow unitless numbers to be mixed with numbers with units just like the
238
+ global `min()` and `max()` functions. Similarly, `+` and `-` operations within
239
+ `min()` and `max()` functions allow unitless numbers to be mixed with numbers
240
+ with units.
241
+
242
+ ## 1.41.1
243
+
244
+ * Preserve parentheses around `var()` functions in calculations, because they
245
+ could potentially be replaced with sub-expressions that might need to be
246
+ parenthesized.
247
+
248
+ ## 1.41.0
249
+
250
+ * Calculation values can now be combined with strings using the `+` operator.
251
+ This was an error in 1.40.0, but this broke stylesheets that were relying on
252
+ `$value + ""` expressions to generically convert values to strings. (Note that
253
+ the Sass team recommends the use of `"#{$value}"` or `inspect($value)` for
254
+ that use-case.)
255
+
256
+ * The `selector.unify()` function now correctly returns `null` when one selector
257
+ is a `:host` or `:host-context` and the other is a selector that's guaranteed
258
+ to be within the current shadow DOM. The `@extend` logic has been updated
259
+ accordingly as well.
260
+
261
+ * Fix a bug where extra whitespace in `min()`, `max()`, `clamp()`, and `calc()`
262
+ expressions could cause bogus parse errors.
263
+
264
+ * Fix a bug where the right-hand operand of a `-` in a calculation could
265
+ incorrectly be stripped of parentheses.
266
+
267
+ ### Dart API
268
+
269
+ * `SassCalculation.plus()` now allows `SassString` arguments.
270
+
271
+ ## 1.40.1
272
+
273
+ * **Potentially breaking bug fix:** `min()` and `max()` expressions outside of
274
+ calculations now behave the same way they did in 1.39.2, returning unquoted
275
+ strings if they contain no Sass-specific features and calling the global
276
+ `min()` and `max()` functions otherwise. Within calculations, they continue to
277
+ behave how they did in 1.40.0.
278
+
279
+ This fixes an unintended breaking change added in 1.40.0, wherein passing a
280
+ unitless number and a number without units to `min()` or `max()` now produces
281
+ an error. Since this breakage affects a major Sass library, we're temporarily
282
+ reverting support for `min()` and `max()` calculations while we work on
283
+ designing a longer-term fix.
284
+
285
+ ## 1.40.0
286
+
287
+ * Add support for first-class `calc()` expressions (as well as `clamp()` and
288
+ plain-CSS `min()` and `max()`). This means:
289
+
290
+ * `calc()` expressions will be parsed more thoroughly, and errors will be
291
+ highlighted where they weren't before. **This may break your stylesheets,**
292
+ but only if they were already producing broken CSS.
293
+
294
+ * `calc()` expressions will be simplified where possible, and may even return
295
+ numbers if they can be simplified away entirely.
296
+
297
+ * `calc()` expressions that can't be simplified to numbers return a new data
298
+ type known as "calculations".
299
+
300
+ * Sass variables and functions can now be used in `calc()` expressions.
301
+
302
+ * New functions `meta.calc-name()` and `meta.calc-args()` can now inspect
303
+ calculations.
304
+
305
+ ### Dart API
306
+
307
+ * Add a new value type, `SassCalculation`, that represents calculations.
308
+
309
+ * Add new `CalculationOperation`, `CalculationOperator`, and
310
+ `CalculationInterpolation` types to represent types of arguments that may
311
+ exist as part of a calculation.
312
+
313
+ * Add a new `Value.assertCalculation()` method.
314
+
315
+ * Add a new `Number.hasCompatibleUnits()` method.
316
+
317
+ ## 1.39.2
318
+
319
+ * Fix a bug where configuring with `@use ... with` would throw an error when
320
+ that variable was defined in a module that also contained `@forward ... with`.
321
+
322
+ ## 1.39.1
323
+
324
+ * Partial fix for a bug where `@at-root` does not work properly in nested
325
+ imports that contain `@use` rules. If the only `@use` rules in the nested
326
+ import are for built-in modules, `@at-root` should now work properly.
327
+
328
+ ## 1.39.0
329
+
330
+ ### JS API
331
+
332
+ * Add a `charset` option that controls whether or not Sass emits a
333
+ `@charset`/BOM for non-ASCII stylesheets.
334
+
335
+ ## 1.38.2
336
+
337
+ * No user-visible changes
338
+
339
+ ## 1.38.1
340
+
341
+ * No user-visible changes
342
+
343
+ ## 1.38.0
344
+
345
+ * In expanded mode, emit characters in Unicode private-use areas as escape
346
+ sequences rather than literal characters.
347
+
348
+ * Fix a bug where quotes would be omitted for an attribute selector whose value
349
+ was a single backslash.
350
+
351
+ * Properly consider numbers that begin with `.` as "plain CSS" for the purposes
352
+ of parsing plain-CSS `min()` and `max()` functions.
353
+
354
+ * Allow `if` to be used as an unquoted string.
355
+
356
+ * Properly parse backslash escapes within `url()` expressions.
357
+
358
+ * Fix a couple bugs where `@extend`s could be marked as unsatisfied when
359
+ multiple identical `@extend`s extended selectors across `@use` rules.
360
+
361
+ ### Command Line Interface
362
+
363
+ * Strip CRLF newlines from snippets of the original stylesheet that are included
364
+ in the output when an error occurs.
365
+
366
+ ### JS API
367
+
368
+ * Don't crash when a Windows path is returned by a custom Node importer at the
369
+ same time as file contents.
370
+
371
+ * Don't crash when an error occurs in a stylesheet loaded via a custom importer
372
+ with a custom URL scheme.
373
+
374
+ ### Dart API
375
+
376
+ * Add a `SassArgumentList.keywordsWithoutMarking` getter to access the keyword
377
+ arguments of an argument list without marking them accessed.
378
+
379
+ ## 1.37.5
380
+
381
+ * No user-visible changes.
382
+
383
+ ## 1.37.4
384
+
385
+ * No user-visible changes.
386
+
387
+ ## 1.37.3
388
+
389
+ * No user-visible changes.
390
+
391
+ ## 1.37.2
392
+
393
+ * No user-visible changes.
394
+
395
+ ## 1.37.1
396
+
397
+ * No user-visible changes.
398
+
399
+ ## 1.37.0
400
+
401
+ ### Dart API
402
+
403
+ * **Potentially breaking bug fix:** `SassNumber.asSlash`,
404
+ `SassNumber.withSlash()`, and `SassNumber.withoutSlash()` have been marked as
405
+ `@internal`. They were never intended to be used outside the `sass` package.
406
+
407
+ * **Potentially breaking bug fix:** `SassException` has been marked as `@sealed`
408
+ to formally indicate that it's not intended to be extended outside of the
409
+ `sass` package.
410
+
411
+ * Add a `Value.withListContents()` method that returns a new Sass list with the
412
+ same list separator and brackets as the current value, interpreted as a list.
413
+
414
+ ## 1.36.0
415
+
416
+ ### Dart API
417
+
418
+ * Added `compileToResult()`, `compileStringToResult()`,
419
+ `compileToResultAsync()`, and `compileStringToResultAsync()` methods. These
420
+ are intended to replace the existing `compile*()` methods, which are now
421
+ deprecated. Rather than returning a simple string, these return a
422
+ `CompileResult` object, which will allow us to add additional information
423
+ about the compilation without having to introduce further deprecations.
424
+
425
+ * Instead of passing a `sourceMaps` callback to `compile*()`, pass
426
+ `sourceMaps: true` to `compile*ToResult()` and access
427
+ `CompileResult.sourceMap`.
428
+
429
+ * The `CompileResult` object exposes a `loadedUrls` object which lists the
430
+ canonical URLs accessed during a compilation. This information was
431
+ previously unavailable except through the JS API.
432
+
433
+ ## 1.35.2
434
+
435
+ * **Potentially breaking bug fix**: Properly throw an error for Unicode ranges
436
+ that have too many `?`s after hexadecimal digits, such as `U+12345??`.
437
+
438
+ * **Potentially breaking bug fix:** Fixed a bug where certain local variable
439
+ declarations nested within multiple `@if` statements would incorrectly
440
+ override a global variable. It's unlikely that any real stylesheets were
441
+ relying on this bug, but if so they can simply add `!global` to the variable
442
+ declaration to preserve the old behavior.
443
+
444
+ * **Potentially breaking bug fix:** Fix a bug where imports of root-relative
445
+ URLs (those that begin with `/`) in `@import` rules would be passed to
446
+ both Dart and JS importers as `file:` URLs.
447
+
448
+ * Properly support selector lists for the `$extendee` argument to
449
+ `selector.extend()` and `selector.replace()`.
450
+
451
+ * Fix an edge case where `@extend` wouldn't affect a selector within a
452
+ pseudo-selector such as `:is()` that itself extended other selectors.
453
+
454
+ * Fix a race condition where `meta.load-css()` could trigger an internal error
455
+ when running in asynchronous mode.
456
+
457
+ ### Dart API
458
+
459
+ * Use the `@internal` annotation to indicate which `Value` APIs are available
460
+ for public use.
461
+
462
+ ## 1.35.1
463
+
464
+ * Fix a bug where the quiet dependency flag didn't silence warnings in some
465
+ stylesheets loaded using `@import`.
466
+
467
+ ## 1.35.0
468
+
469
+ * Fix a couple bugs that could prevent some members from being found in certain
470
+ files that use a mix of imports and the module system.
471
+
472
+ * Fix incorrect recommendation for migrating division expressions that reference
473
+ namespaced variables.
474
+
475
+ ### JS API
476
+
477
+ * Add a `quietDeps` option which silences compiler warnings from stylesheets
478
+ loaded through importers and load paths.
479
+
480
+ * Add a `verbose` option which causes the compiler to emit all deprecation
481
+ warnings, not just 5 per feature.
482
+
483
+ ## 1.34.1
484
+
485
+ * Fix a bug where `--update` would always compile any file that depends on a
486
+ built-in module.
487
+
488
+ * Fix the URL for the `@-moz-document` deprecation message.
489
+
490
+ * Fix a bug with `@for` loops nested inside property declarations.
491
+
492
+ ## 1.34.0
493
+
494
+ * Don't emit the same warning in the same location multiple times.
495
+
496
+ * Cap deprecation warnings at 5 per feature by default.
497
+
498
+ ### Command Line Interface
499
+
500
+ * Add a `--quiet-deps` flag which silences compiler warnings from stylesheets
501
+ loaded through `--load-path`s.
502
+
503
+ * Add a `--verbose` flag which causes the compiler to emit all deprecation
504
+ warnings, not just 5 per feature.
505
+
506
+ ### Dart API
507
+
508
+ * Add a `quietDeps` argument to `compile()`, `compileString()`,
509
+ `compileAsync()`, and `compileStringAsync()` which silences compiler warnings
510
+ from stylesheets loaded through importers, load paths, and `package:` URLs.
511
+
512
+ * Add a `verbose` argument to `compile()`, `compileString()`, `compileAsync()`,
513
+ and `compileStringAsync()` which causes the compiler to emit all deprecation
514
+ warnings, not just 5 per feature.
515
+
516
+ ## 1.33.0
517
+
518
+ * Deprecate the use of `/` for division. The new `math.div()` function should be
519
+ used instead. See [this page][] for details.
520
+
521
+ [this page]: https://sass-lang.com/documentation/breaking-changes/slash-div
522
+
523
+ * Add a `list.slash()` function that returns a slash-separated list.
524
+
525
+ * **Potentially breaking bug fix:** The heuristics around when potentially
526
+ slash-separated numbers are converted to slash-free numbers—for example, when
527
+ `1/2` will be printed as `0.5` rather than `1/2`—have been slightly expanded.
528
+ Previously, a number would be made slash-free if it was passed as an argument
529
+ to a *user-defined function*, but not to a *built-in function*. Now it will be
530
+ made slash-free in both cases. This is a behavioral change, but it's unlikely
531
+ to affect any real-world stylesheets.
532
+
533
+ * [`:is()`][] now behaves identically to `:matches()`.
534
+
535
+ [`:is()`]: https://developer.mozilla.org/en-US/docs/Web/CSS/:is
536
+
537
+ * Fix a bug where non-integer numbers that were very close to integer
538
+ values would be incorrectly formatted in CSS.
539
+
540
+ * Fix a bug where very small number and very large negative numbers would be
541
+ incorrectly formatted in CSS.
542
+
543
+ ### JS API
544
+
545
+ * The `this` context for importers now has a `fromImport` field, which is `true`
546
+ if the importer is being invoked from an `@import` and `false` otherwise.
547
+ Importers should only use this to determine whether to load [import-only
548
+ files].
549
+
550
+ [import-only files]: https://sass-lang.com/documentation/at-rules/import#import-only-files
551
+
552
+ ### Dart API
553
+
554
+ * Add an `Importer.fromImport` getter, which is `true` if the current
555
+ `Importer.canonicalize()` call comes from an `@import` rule and `false`
556
+ otherwise. Importers should only use this to determine whether to load
557
+ [import-only files].
558
+
559
+ ## 1.32.13
560
+
561
+ * **Potentially breaking bug fix:** Null values in `@use` and `@forward`
562
+ configurations no longer override the `!default` variable, matching the
563
+ behavior of the equivalent code using `@import`.
564
+
565
+ * Use the proper parameter names in error messages about `string.slice`
566
+
567
+ ## 1.32.12
568
+
569
+ * Fix a bug that disallowed more than one module from extending the same
570
+ selector from a module if that selector itself extended a selector from
571
+ another upstream module.
572
+
573
+ ## 1.32.11
574
+
575
+ * Fix a bug where bogus indented syntax errors were reported for lines that
576
+ contained only whitespace.
577
+
578
+ ## 1.32.10
579
+
580
+ * No user-visible changes.
581
+
582
+ ## 1.32.9
583
+
584
+ * Fix a typo in a deprecation warning.
585
+
586
+ ### JavaScript API
587
+
588
+ * Drop support for Chokidar 2.x. This version was incompatible with Node 14, but
589
+ due to shortcomings in npm's version resolver sometimes still ended up
590
+ installed anyway. Only declaring support for 3.0.0 should ensure compatibility
591
+ going forward.
592
+
593
+ ### Dart API
594
+
595
+ * Allow the null safety release of args and watcher.
596
+
597
+ ### Command Line Interface
598
+
599
+ * Add a `-w` shorthand for the `--watch` flag.
600
+
601
+ ## 1.32.8
602
+
603
+ * Update chokidar version for Node API tests.
604
+
605
+ ### JavaScript API
606
+
607
+ * Allow a custom function to access the `render()` options object within its
608
+ local context, as `this.options`.
609
+
610
+ ## 1.32.7
611
+
612
+ * Allow the null safety release of stream_transform.
613
+
614
+ * Allow `@forward...with` to take arguments that have a `!default` flag without
615
+ a trailing comma.
616
+
617
+ * Improve the performance of unitless and single-unit numbers.
618
+
619
+ ## 1.32.6
620
+
621
+ ### Node JS API
622
+
623
+ * Fix Electron support when `nodeIntegration` is disabled.
624
+
625
+ ### Dart API
626
+
627
+ * All range checks for `SassColor` constructors now throw `RangeError`s with
628
+ `start` and `end` set.
629
+
630
+ ## 1.32.5
631
+
632
+ * **Potentially breaking bug fix:** When using `@for` with numbers that have
633
+ units, the iteration variable now matches the unit of the initial number. This
634
+ matches the behavior of Ruby Sass and LibSass.
635
+
636
+ ### Node JS API
637
+
638
+ * Fix a few infrequent errors when calling `render()` with `fiber` multiple
639
+ times simultaneously.
640
+
641
+ * Avoid possible mangled error messages when custom functions or importers throw
642
+ unexpected exceptions.
643
+
644
+ * Fix Electron support when `nodeIntegration` is disabled.
645
+
646
+ ## 1.32.4
647
+
648
+ * No user-visible changes.
649
+
650
+ ## 1.32.3
651
+
652
+ * Optimize `==` for numbers that have different units.
653
+
654
+ ## 1.32.2
655
+
656
+ * Print the actual number that was received in unit deprecation warnings for
657
+ color functions.
658
+
659
+ ## 1.32.1
660
+
661
+ * Don't emit permissions errors on Windows and OS X when trying to determine the
662
+ real case of path names.
663
+
664
+ ## 1.32.0
665
+
666
+ * Deprecate passing non-`%` numbers as lightness and saturation to `hsl()`,
667
+ `hsla()`, `color.adjust()`, and `color.change()`. This matches the CSS
668
+ specification, which also requires `%` for all lightness and saturation
669
+ parameters. See [the Sass website][color-units] for more details.
670
+
671
+ * Deprecate passing numbers with units other than `deg` as the hue to `hsl()`,
672
+ `hsla()`, `adjust-hue()`, `color.adjust()`, and `color.change()`. Unitless
673
+ numbers *are* still allowed here, since they're allowed by CSS. See [the Sass
674
+ website][color-units] for more details.
675
+
676
+ * Improve error messages about incompatible units.
677
+
678
+ * Properly mark some warnings emitted by `sass:color` functions as deprecation
679
+ warnings.
680
+
681
+ ### Dart API
682
+
683
+ * Rename `SassNumber.valueInUnits()` to `SassNumber.coerceValue()`. The old name
684
+ remains, but is now deprecated.
685
+
686
+ * Rename `SassNumber.coerceValueToUnit()`, a shorthand for
687
+ `SassNumber.coerceValue()` that takes a single numerator unit.
688
+
689
+ * Add `SassNumber.coerceToMatch()` and `SassNumber.coerceValueToMatch()`, which
690
+ work like `SassNumber.coerce()` and `SassNumber.coerceValue()` but take a
691
+ `SassNumber` whose units should be matched rather than taking the units
692
+ explicitly. These generate better error messages than `SassNumber.coerce()`
693
+ and `SassNumber.coerceValue()`.
694
+
695
+ * Add `SassNumber.convertToMatch()` and `SassNumber.convertValueToMatch()`,
696
+ which work like `SassNumber.coerceToMatch()` and
697
+ `SassNumber.coerceValueToMatch()` except they throw exceptions when converting
698
+ unitless values to or from units.
699
+
700
+ * Add `SassNumber.compatibleWithUnit()`, which returns whether the number can be
701
+ coerced to a single numerator unit.
702
+
703
+ ## 1.31.0
704
+
705
+ * Add support for parsing `clamp()` as a special math function, the same way
706
+ `calc()` is parsed.
707
+
708
+ * Properly load files in case-sensitive Windows directories with upper-case
709
+ names.
710
+
711
+ ## 1.30.0
712
+
713
+ * Fix a bug where `@at-root (without: all)` wouldn't properly remove a
714
+ `@keyframes` context when parsing selectors.
715
+
716
+ ### Node JS API
717
+
718
+ * The generated `main()` function in `sass.js` now returns a `Promise` that
719
+ completes when the executable is finished running.
720
+
721
+ ### Dart API
722
+
723
+ * Fix a bug that prevented importers from returning null when loading from a
724
+ URL that they had already canonicalized.
725
+
726
+ ## 1.29.0
727
+
728
+ * Support a broader syntax for `@supports` conditions, based on the latest
729
+ [Editor's Draft of CSS Conditional Rules 3]. Almost all syntax will be allowed
730
+ (with interpolation) in the conditions' parentheses, as well as function
731
+ syntax such as `@supports selector(...)`.
732
+
733
+ [Editor's Draft of CSS Conditional Rules 3]: https://drafts.csswg.org/css-conditional-3/#at-supports
734
+
735
+ ## 1.28.0
736
+
737
+ * Add a [`color.hwb()`] function to `sass:color` that can express colors in [HWB] format.
738
+
739
+ [`color.hwb()`]: https://sass-lang.com/documentation/modules/color#hwb
740
+ [HWB]: https://en.wikipedia.org/wiki/HWB_color_model
741
+
742
+ * Add [`color.whiteness()`] and [`color.blackness()`] functions to `sass:color`
743
+ to get a color's [HWB] whiteness and blackness components.
744
+
745
+ [`color.whiteness()`]: https://sass-lang.com/documentation/modules/color#whiteness
746
+ [`color.blackness()`]: https://sass-lang.com/documentation/modules/color#blackness
747
+
748
+ * Add `$whiteness` and `$blackness` parameters to [`color.adjust()`],
749
+ [`color.change()`], and [`color.scale()`] to modify a color's [HWB] whiteness
750
+ and blackness components.
751
+
752
+ [`color.adjust()`]: https://sass-lang.com/documentation/modules/color#adjust
753
+ [`color.change()`]: https://sass-lang.com/documentation/modules/color#change
754
+ [`color.scale()`]: https://sass-lang.com/documentation/modules/color#scale
755
+
756
+ ### Dart API
757
+
758
+ * Add [HWB] support to the `SassColor` class, including a `SassColor.hwb()`
759
+ constructor, `whiteness` and `blackness` getters, and a `changeHwb()` method.
760
+
761
+ [HWB]: https://en.wikipedia.org/wiki/HWB_color_model
762
+
763
+ ## 1.27.2
764
+
765
+ * No user-visible changes.
766
+
767
+ ## 1.27.1
768
+
769
+ * **Potentially breaking bug fix:** `meta.load-css()` now correctly uses the
770
+ name `$url` for its first argument, rather than `$module`.
771
+
772
+ * Don't crash when using `Infinity` or `NaN` as a key in a map.
773
+
774
+ * Emit a proper parse error for a `=` with no right-hand side in a function.
775
+
776
+ * Avoid going exponential on certain recursive `@extend` edge cases.
777
+
778
+ ## 1.27.0
779
+
780
+ * Adds an overload to `map.merge()` that supports merging a nested map.
781
+
782
+ `map.merge($map1, $keys..., $map2)`: The `$keys` form a path to the nested map
783
+ in `$map1`, into which `$map2` gets merged.
784
+
785
+ See [the Sass documentation][map-merge] for more details.
786
+
787
+ [map-merge]: https://sass-lang.com/documentation/modules/map#merge
788
+
789
+ * Adds an overloaded `map.set()` function.
790
+
791
+ `map.set($map, $key, $value)`: Adds to or updates `$map` with the specified
792
+ `$key` and `$value`.
793
+
794
+ `map.set($map, $keys..., $value)`: Adds to or updates a map that is nested
795
+ within `$map`. The `$keys` form a path to the nested map in `$map`, into
796
+ which `$value` is inserted.
797
+
798
+ See [the Sass documentation][map-set] for more details.
799
+
800
+ [map-set]: https://sass-lang.com/documentation/modules/map#set
801
+
802
+ * Add support for nested maps to `map.get()`.
803
+ For example, `map.get((a: (b: (c: d))), a, b, c)` would return `d`.
804
+ See [the documentation][map-get] for more details.
805
+
806
+ [map-get]: https://sass-lang.com/documentation/modules/map#get
807
+
808
+ * Add support for nested maps in `map.has-key`.
809
+ For example, `map.has-key((a: (b: (c: d))), a, b, c)` would return true.
810
+ See [the documentation][map-has-key] for more details.
811
+
812
+ [map-has-key]: https://sass-lang.com/documentation/modules/map#has-key
813
+
814
+ * Add a `map.deep-merge()` function. This works like `map.merge()`, except that
815
+ nested map values are *also* recursively merged. For example:
816
+
817
+ ```
818
+ map.deep-merge(
819
+ (color: (primary: red, secondary: blue),
820
+ (color: (secondary: teal)
821
+ ) // => (color: (primary: red, secondary: teal))
822
+ ```
823
+
824
+ See [the Sass documentation][map-deep-merge] for more details.
825
+
826
+ [map-deep-merge]: https://sass-lang.com/documentation/modules/map#deep-merge
827
+
828
+ * Add a `map.deep-remove()` function. This allows you to remove keys from
829
+ nested maps by passing multiple keys. For example:
830
+
831
+ ```
832
+ map.deep-remove(
833
+ (color: (primary: red, secondary: blue)),
834
+ color, primary
835
+ ) // => (color: (secondary: blue))
836
+ ```
837
+
838
+ See [the Sass documentation][map-deep-remove] for more details.
839
+
840
+ [map-deep-remove]: https://sass-lang.com/documentation/modules/map#deep-remove
841
+
842
+ * Fix a bug where custom property values in plain CSS were being parsed as
843
+ normal property values.
844
+
845
+ ### Dart API
846
+
847
+ * Add a `Value.tryMap()` function which returns the `Value` as a `SassMap` if
848
+ it's a valid map, or `null` otherwise. This allows function authors to safely
849
+ retrieve maps even if they're internally stored as empty lists, without having
850
+ to catch exceptions from `Value.assertMap()`.
851
+
852
+ ## 1.26.12
853
+
854
+ * Fix a bug where nesting properties beneath a Sass-syntax custom property
855
+ (written as `#{--foo}: ...`) would crash.
856
+
857
+ ## 1.26.11
858
+
859
+ * **Potentially breaking bug fix:** `selector.nest()` now throws an error
860
+ if the first arguments contains the parent selector `&`.
861
+
862
+ * Fixes a parsing bug with inline comments in selectors.
863
+
864
+ * Improve some error messages for edge-case parse failures.
865
+
866
+ * Throw a proper error when the same built-in module is `@use`d twice.
867
+
868
+ * Don't crash when writing `Infinity` in JS mode.
869
+
870
+ * Produce a better error message for positional arguments following named
871
+ arguments.
872
+
873
+ ## 1.26.10
874
+
875
+ * Fixes a bug where two adjacent combinators could cause an error.
876
+
877
+ ## 1.26.9
878
+
879
+ * Use an updated version of `node_preamble` when compiling to JS.
880
+
881
+ ## 1.26.8
882
+
883
+ * Fixes an error when emitting source maps to stdout.
884
+
885
+ ## 1.26.7
886
+
887
+ * No user-visible changes.
888
+
889
+ ## 1.26.6
890
+
891
+ * Fix a bug where escape sequences were improperly recognized in `@else` rules.
892
+
893
+ ### JavaScript API
894
+
895
+ * Add `sass.NULL`, `sass.TRUE`, and `sass.FALSE` constants to match Node Sass's
896
+ API.
897
+
898
+ * If a custom Node importer returns both `file` and `contents`, don't attempt to
899
+ read the `file`. Instead, use the `contents` provided by the importer, with
900
+ `file` as the canonical url.
901
+
902
+ ## 1.26.5
903
+
904
+ * No user-visible changes.
905
+
906
+ ## 1.26.4
907
+
908
+ * Be more memory-efficient when handling `@forward`s through `@import`s.
909
+
910
+ ## 1.26.3
911
+
912
+ * Fix a bug where `--watch` mode could go into an infinite loop compiling CSS
913
+ files to themselves.
914
+
915
+ ## 1.26.2
916
+
917
+ * More aggressively eliminate redundant selectors in the `selector.extend()` and
918
+ `selector.replace()` functions.
919
+
920
+ ## 1.26.1
921
+
922
+ ### Command Line Interface
923
+
924
+ * Fix a longstanding bug where `--watch` mode could enter into a state where
925
+ recompilation would not occur after a syntax error was introduced into a
926
+ dependency and then fixed.
927
+
928
+ ## 1.26.0
929
+
930
+ * **Potentially breaking bug fix:** `@use` rules whose URLs' basenames begin
931
+ with `_` now correctly exclude that `_` from the rules' namespaces.
932
+
933
+ * Fix a bug where imported forwarded members weren't visible in mixins and
934
+ functions that were defined before the `@import`.
935
+
936
+ * Don't throw errors if the exact same member is loaded or forwarded from
937
+ multiple modules at the same time.
938
+
939
+ ## 1.25.2
940
+
941
+ * Fix a bug where, under extremely rare circumstances, a valid variable could
942
+ become unassigned.
943
+
944
+ ## 1.25.0
945
+
946
+ * Add functions to the built-in "sass:math" module.
947
+
948
+ * `clamp($min, $number, $max)`. Clamps `$number` in between `$min` and `$max`.
949
+
950
+ * `hypot($numbers...)`. Given *n* numbers, outputs the length of the
951
+ *n*-dimensional vector that has components equal to each of the inputs.
952
+
953
+ * Exponential. All inputs must be unitless.
954
+ * `log($number)` or `log($number, $base)`. If no base is provided, performs
955
+ a natural log.
956
+ * `pow($base, $exponent)`
957
+ * `sqrt($number)`
958
+
959
+ * Trigonometric. The input must be an angle. If no unit is given, the input is
960
+ assumed to be in `rad`.
961
+ * `cos($number)`
962
+ * `sin($number)`
963
+ * `tan($number)`
964
+
965
+ * Inverse trigonometric. The output is in `deg`.
966
+ * `acos($number)`. Input must be unitless.
967
+ * `asin($number)`. Input must be unitless.
968
+ * `atan($number)`. Input must be unitless.
969
+ * `atan2($y, $x)`. `$y` and `$x` must have compatible units or be unitless.
970
+
971
+ * Add the variables `$pi` and `$e` to the built-in "sass:math" module.
972
+
973
+ ### JavaScript API
974
+
975
+ * `constructor.value` fields on value objects now match their Node Sass
976
+ equivalents.
977
+
978
+ ## 1.24.5
979
+
980
+ * Highlight contextually-relevant sections of the stylesheet in error messages,
981
+ rather than only highlighting the section where the error was detected.
982
+
983
+ ## 1.24.4
984
+
985
+ ### JavaScript API
986
+
987
+ * Fix a bug where source map generation would crash with an absolute source map
988
+ path and a custom importer that returns string file contents.
989
+
990
+ ## 1.24.3
991
+
992
+ ### Command Line Interface
993
+
994
+ * Fix a bug where `sass --version` would crash for certain executable
995
+ distributions.
996
+
997
+ ## 1.24.2
998
+
999
+ ### JavaScript API
1000
+
1001
+ * Fix a bug introduced in the previous release that prevented custom importers
1002
+ in Node.js from loading import-only files.
1003
+
1004
+ ## 1.24.1
1005
+
1006
+ * Fix a bug where the wrong file could be loaded when the same URL is used by
1007
+ both a `@use` rule and an `@import` rule.
1008
+
1009
+ ## 1.24.0
1010
+
1011
+ * Add an optional `with` clause to the `@forward` rule. This works like the
1012
+ `@use` rule's `with` clause, except that `@forward ... with` can declare
1013
+ variables as `!default` to allow downstream modules to reconfigure their
1014
+ values.
1015
+
1016
+ * Support configuring modules through `@import` rules.
1017
+
1018
+ ## 1.23.8
1019
+
1020
+ * **Potentially breaking bug fix:** Members loaded through a nested `@import`
1021
+ are no longer ever accessible outside that nested context.
1022
+
1023
+ * Don't throw an error when importing two modules that both forward members with
1024
+ the same name. The latter name now takes precedence over the former, as per
1025
+ the specification.
1026
+
1027
+ ### Dart API
1028
+
1029
+ * `SassFormatException` now implements `SourceSpanFormatException` (and thus
1030
+ `FormatException`).
1031
+
1032
+ ## 1.23.7
1033
+
1034
+ * No user-visible changes
1035
+
1036
+ ## 1.23.6
1037
+
1038
+ * No user-visible changes.
1039
+
1040
+ ## 1.23.5
1041
+
1042
+ * Support inline comments in the indented syntax.
1043
+
1044
+ * When an overloaded function receives the wrong number of arguments, guess
1045
+ which overload the user actually meant to invoke, and display the invalid
1046
+ argument error for that overload.
1047
+
1048
+ * When `@error` is used in a function or mixin, print the call site rather than
1049
+ the location of the `@error` itself to better match the behavior of calling a
1050
+ built-in function that throws an error.
1051
+
1052
+ ## 1.23.4
1053
+
1054
+ ### Command-Line Interface
1055
+
1056
+ * Fix a bug where `--watch` wouldn't watch files referred to by `@forward`
1057
+ rules.
1058
+
1059
+ ## 1.23.3
1060
+
1061
+ * Fix a bug where selectors were being trimmed over-eagerly when `@extend`
1062
+ crossed module boundaries.
1063
+
1064
+ ## 1.23.2
1065
+
1066
+ ### Command-Line Interface
1067
+
1068
+ * Fix a bug when compiling all Sass files in a directory where a CSS file could
1069
+ be compiled to its own location, creating an infinite loop in `--watch` mode.
1070
+
1071
+ * Properly compile CSS entrypoints in directories outside of `--watch` mode.
1072
+
1073
+ ## 1.23.1
1074
+
1075
+ * Fix a bug preventing built-in modules from being loaded within a configured
1076
+ module.
1077
+
1078
+ * Fix a bug preventing an unconfigured module from being loaded from within two
1079
+ different configured modules.
1080
+
1081
+ * Fix a bug when `meta.load-css()` was used to load some files that included
1082
+ media queries.
1083
+
1084
+ * Allow `saturate()` in plain CSS files, since it can be used as a plain CSS
1085
+ filter function.
1086
+
1087
+ * Improve the error messages for trying to access functions like `lighten()`
1088
+ from the `sass:color` module.
1089
+
1090
+ ## 1.23.0
1091
+
1092
+ * **Launch the new Sass module system!** This adds:
1093
+
1094
+ * The [`@use` rule][], which loads Sass files as *modules* and makes their
1095
+ members available only in the current file, with automatic namespacing.
1096
+
1097
+ [`@use` rule]: https://sass-lang.com/documentation/at-rules/use
1098
+
1099
+ * The [`@forward` rule][], which makes members of another Sass file available
1100
+ to stylesheets that `@use` the current file.
1101
+
1102
+ [`@forward` rule]: https://sass-lang.com/documentation/at-rules/forward
1103
+
1104
+ * Built-in modules named `sass:color`, `sass:list`, `sass:map`, `sass:math`,
1105
+ `sass:meta`, `sass:selector`, and `sass:string` that provide access to all
1106
+ the built-in Sass functions you know and love, with automatic module
1107
+ namespaces.
1108
+
1109
+ * The [`meta.load-css()` mixin][], which includes the CSS contents of a module
1110
+ loaded from a (potentially dynamic) URL.
1111
+
1112
+ [`meta.load-css()` mixin]: https://sass-lang.com/documentation/modules/meta#load-css
1113
+
1114
+ * The [`meta.module-variables()` function][], which provides access to the
1115
+ variables defined in a given module.
1116
+
1117
+ [`meta.module-variables()` function]: https://sass-lang.com/documentation/modules/meta#module-variables
1118
+
1119
+ * The [`meta.module-functions()` function][], which provides access to the
1120
+ functions defined in a given module.
1121
+
1122
+ [`meta.module-functions()` function]: https://sass-lang.com/documentation/modules/meta#module-functions
1123
+
1124
+ Check out [the Sass blog][migrator blog] for more information on the new
1125
+ module system. You can also use the new [Sass migrator][] to automatically
1126
+ migrate your stylesheets to the new module system!
1127
+
1128
+ [migrator blog]: https://sass-lang.com/blog/the-module-system-is-launched
1129
+ [Sass migrator]: https://sass-lang.com/documentation/cli/migrator
1130
+
1131
+ ## 1.22.12
1132
+
1133
+ * **Potentially breaking bug fix:** character sequences consisting of two or
1134
+ more hyphens followed by a number (such as `--123`), or two or more hyphens on
1135
+ their own (such as `--`), are now parsed as identifiers [in accordance with
1136
+ the CSS spec][ident-token-diagram].
1137
+
1138
+ [ident-token-diagram]: https://drafts.csswg.org/css-syntax-3/#ident-token-diagram
1139
+
1140
+ The sequence `--` was previously parsed as multiple applications of the `-`
1141
+ operator. Since this is unlikely to be used intentionally in practice, we
1142
+ consider this bug fix safe.
1143
+
1144
+ ### Command-Line Interface
1145
+
1146
+ * Fix a bug where changes in `.css` files would be ignored in `--watch` mode.
1147
+
1148
+ ### JavaScript API
1149
+
1150
+ * Allow underscore-separated custom functions to be defined.
1151
+
1152
+ * Improve the performance of Node.js compilation involving many `@import`s.
1153
+
1154
+ ## 1.22.11
1155
+
1156
+ * Don't try to load unquoted plain-CSS indented-syntax imports.
1157
+
1158
+ * Fix a couple edge cases in `@extend` logic and related selector functions:
1159
+
1160
+ * Recognize `:matches()` and similar pseudo-selectors as superselectors of
1161
+ matching complex selectors.
1162
+
1163
+ * Recognize `::slotted()` as a superselector of other `::slotted()` selectors.
1164
+
1165
+ * Recognize `:current()` with a vendor prefix as a superselector.
1166
+
1167
+ ## 1.22.10
1168
+
1169
+ * Fix a bug in which `get-function()` would fail to find a dash-separated
1170
+ function when passed a function name with underscores.
1171
+
1172
+ ## 1.22.9
1173
+
1174
+ * Include argument names when reporting range errors and selector parse errors.
1175
+
1176
+ * Avoid double `Error:` headers when reporting selector parse errors.
1177
+
1178
+ * Clarify the error message when the wrong number of positional arguments are
1179
+ passed along with a named argument.
1180
+
1181
+ ### JavaScript API
1182
+
1183
+ * Re-add support for Node Carbon (8.x).
1184
+
1185
+ ## 1.22.8
1186
+
1187
+ ### JavaScript API
1188
+
1189
+ * Don't crash when running in a directory whose name contains URL-sensitive
1190
+ characters.
1191
+
1192
+ * Drop support for Node Carbon (8.x), which doesn't support `url.pathToFileURL`.
1193
+
1194
+ ## 1.22.7
1195
+
1196
+ * Restrict the supported versions of the Dart SDK to `^2.4.0`.
1197
+
1198
+ ## 1.22.6
1199
+
1200
+ * **Potentially breaking bug fix:** The `keywords()` function now converts
1201
+ underscore-separated argument names to hyphen-separated names. This matches
1202
+ LibSass's behavior, but not Ruby Sass's.
1203
+
1204
+ * Further improve performance for logic-heavy stylesheets.
1205
+
1206
+ * Improve a few error messages.
1207
+
1208
+ ## 1.22.5
1209
+
1210
+ ### JavaScript API
1211
+
1212
+ * Improve performance for logic-heavy stylesheets.
1213
+
1214
+ ## 1.22.4
1215
+
1216
+ * Fix a bug where at-rules imported from within a style rule would appear within
1217
+ that style rule rather than at the root of the document.
1218
+
1219
+ ## 1.22.3
1220
+
1221
+ * **Potentially breaking bug fix:** The argument name for the `saturate()`
1222
+ function is now `$amount`, to match the name in LibSass and originally in Ruby
1223
+ Sass.
1224
+
1225
+ * **Potentially breaking bug fix:** The `invert()` function now properly returns
1226
+ `#808080` when passed `$weight: 50%`. This matches the behavior in LibSass and
1227
+ originally in Ruby Sass, as well as being consistent with other nearby values
1228
+ of `$weight`.
1229
+
1230
+ * **Potentially breaking bug fix:** The `invert()` function now throws an error
1231
+ if it's used [as a plain CSS function][plain-CSS invert] *and* the Sass-only
1232
+ `$weight` parameter is passed. This never did anything useful, so it's
1233
+ considered a bug fix rather than a full breaking change.
1234
+
1235
+ [plain-CSS invert]: https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/invert
1236
+
1237
+ * **Potentially breaking bug fix**: The `str-insert()` function now properly
1238
+ inserts at the end of the string if the `$index` is `-1`. This matches the
1239
+ behavior in LibSass and originally in Ruby Sass.
1240
+
1241
+ * **Potentially breaking bug fix**: An empty map returned by `map-remove()` is
1242
+ now treated as identical to the literal value `()`, rather than being treated
1243
+ as though it had a comma separator. This matches the original behavior in Ruby
1244
+ Sass.
1245
+
1246
+ * The `adjust-color()` function no longer throws an error when a large `$alpha`
1247
+ value is combined with HSL adjustments.
1248
+
1249
+ * The `alpha()` function now produces clearer error messages when the wrong
1250
+ number of arguments are passed.
1251
+
1252
+ * Fix a bug where the `str-slice()` function could produce invalid output when
1253
+ passed a string that contains characters that aren't represented as a single
1254
+ byte in UTF-16.
1255
+
1256
+ * Improve the error message for an unknown separator name passed to the `join()`
1257
+ or `append()` functions.
1258
+
1259
+ * The `zip()` function no longer deadlocks if passed no arguments.
1260
+
1261
+ * The `map-remove()` function can now take a `$key` named argument. This matches
1262
+ the signature in LibSass and originally in Ruby Sass.
1263
+
1264
+ ## 1.22.2
1265
+
1266
+ ### JavaScript API
1267
+
1268
+ * Avoid re-assigning the `require()` function to make the code statically
1269
+ analyzable by Webpack.
1270
+
1271
+ ## 1.22.1
1272
+
1273
+ ### JavaScript API
1274
+
1275
+ * Expand the dependency on `chokidar` to allow 3.x.
1276
+
1277
+ ## 1.22.0
1278
+
1279
+ * Produce better stack traces when importing a file that contains a syntax
1280
+ error.
1281
+
1282
+ * Make deprecation warnings for `!global` variable declarations that create new
1283
+ variables clearer, especially in the case where the `!global` flag is
1284
+ unnecessary because the variables are at the top level of the stylesheet.
1285
+
1286
+ ### Dart API
1287
+
1288
+ * Add a `Value.realNull` getter, which returns Dart's `null` if the value is
1289
+ Sass's null.
1290
+
1291
+ ## 1.21.0
1292
+
1293
+ ### Dart API
1294
+
1295
+ * Add a `sass` executable when installing the package through `pub`.
1296
+
1297
+ * Add a top-level `warn()` function for custom functions and importers to print
1298
+ warning messages.
1299
+
1300
+ ## 1.20.3
1301
+
1302
+ * No user-visible changes.
1303
+
1304
+ ## 1.20.2
1305
+
1306
+ * Fix a bug where numbers could be written using exponential notation in
1307
+ Node.js.
1308
+
1309
+ * Fix a crash that would appear when writing some very large integers to CSS.
1310
+
1311
+ ### Command-Line Interface
1312
+
1313
+ * Improve performance for stand-alone packages on Linux and Mac OS.
1314
+
1315
+ ### JavaScript API
1316
+
1317
+ * Pass imports to custom importers before resolving them using `includePaths` or
1318
+ the `SASS_PATH` environment variable. This matches Node Sass's behavior, so
1319
+ it's considered a bug fix.
1320
+
1321
+ ## 1.20.1
1322
+
1323
+ * No user-visible changes.
1324
+
1325
+ ## 1.20.0
1326
+
1327
+ * Support attribute selector modifiers, such as the `i` in `[title="test" i]`.
1328
+
1329
+ ### Command-Line Interface
1330
+
1331
+ * When compilation fails, Sass will now write the error message to the CSS
1332
+ output as a comment and as the `content` property of a `body::before` rule so
1333
+ it will show up in the browser (unless compiling to standard output). This can
1334
+ be disabled with the `--no-error-css` flag, or forced even when compiling to
1335
+ standard output with the `--error-css` flag.
1336
+
1337
+ ### Dart API
1338
+
1339
+ * Added `SassException.toCssString()`, which returns the contents of a CSS
1340
+ stylesheet describing the error, as above.
1341
+
1342
+ ## 1.19.0
1343
+
1344
+ * Allow `!` in `url()`s without quotes.
1345
+
1346
+ ### Dart API
1347
+
1348
+ * `FilesystemImporter` now doesn't change its effective directory if the working
1349
+ directory changes, even if it's passed a relative argument.
1350
+
1351
+ ## 1.18.0
1352
+
1353
+ * Avoid recursively listing directories when finding the canonical name of a
1354
+ file on case-insensitive filesystems.
1355
+
1356
+ * Fix importing files relative to `package:`-imported files.
1357
+
1358
+ * Don't claim that "package:" URLs aren't supported when they actually are.
1359
+
1360
+ ### Command-Line Interface
1361
+
1362
+ * Add a `--no-charset` flag. If this flag is set, Sass will never emit a
1363
+ `@charset` declaration or a byte-order mark, even if the CSS file contains
1364
+ non-ASCII characters.
1365
+
1366
+ ### Dart API
1367
+
1368
+ * Add a `charset` option to `compile()`, `compileString()`, `compileAsync()` and
1369
+ `compileStringAsync()`. If this option is set to `false`, Sass will never emit
1370
+ a `@charset` declaration or a byte-order mark, even if the CSS file contains
1371
+ non-ASCII characters.
1372
+
1373
+ * Explicitly require that importers' `canonicalize()` methods be able to take
1374
+ paths relative to their outputs as valid inputs. This isn't considered a
1375
+ breaking change because the importer infrastructure already required this in
1376
+ practice.
1377
+
1378
+ ## 1.17.4
1379
+
1380
+ * Consistently parse U+000C FORM FEED, U+000D CARRIAGE RETURN, and sequences of
1381
+ U+000D CARRIAGE RETURN followed by U+000A LINE FEED as individual newlines.
1382
+
1383
+ ### JavaScript API
1384
+
1385
+ * Add a `sass.types.Error` constructor as an alias for `Error`. This makes our
1386
+ custom function API compatible with Node Sass's.
1387
+
1388
+ ## 1.17.3
1389
+
1390
+ * Fix an edge case where slash-separated numbers were written to the stylesheet
1391
+ with a slash even when they're used as part of another arithmetic operation,
1392
+ such as being concatenated with a string.
1393
+
1394
+ * Don't put style rules inside empty `@keyframes` selectors.
1395
+
1396
+ ## 1.17.2
1397
+
1398
+ * Deprecate `!global` variable assignments to variables that aren't yet defined.
1399
+ This deprecation message can be avoided by assigning variables to `null` at
1400
+ the top level before globally assigning values to them.
1401
+
1402
+ ### Dart API
1403
+
1404
+ * Explicitly mark classes that were never intended to be subclassed or
1405
+ implemented as "sealed".
1406
+
1407
+ ## 1.17.1
1408
+
1409
+ * Properly quote attribute selector values that start with identifiers but end
1410
+ with a non-identifier character.
1411
+
1412
+ ## 1.17.0
1413
+
1414
+ * Improve error output, particularly for errors that cover multiple lines.
1415
+
1416
+ * Improve source locations for some parse errors. Rather than pointing to the
1417
+ next token that wasn't what was expected, they point *after* the previous
1418
+ token. This should generally provide more context for the syntax error.
1419
+
1420
+ * Produce a better error message for style rules that are missing the closing
1421
+ `}`.
1422
+
1423
+ * Produce a better error message for style rules and property declarations
1424
+ within `@function` rules.
1425
+
1426
+ ### Command-Line Interface
1427
+
1428
+ * Passing a directory on the command line now compiles all Sass source files in
1429
+ the directory to CSS files in the same directory, as though `dir:dir` were
1430
+ passed instead of just `dir`.
1431
+
1432
+ * The new error output uses non-ASCII Unicode characters by default. Add a
1433
+ `--no-unicode` flag to disable this.
1434
+
1435
+ ## 1.16.1
1436
+
1437
+ * Fix a performance bug where stylesheet evaluation could take a very long time
1438
+ when many binary operators were used in sequence.
1439
+
1440
+ ## 1.16.0
1441
+
1442
+ * `rgb()` and `hsl()` now treat unquoted strings beginning with `env()`,
1443
+ `min()`, and `max()` as special number strings like `calc()`.
1444
+
1445
+ ## 1.15.3
1446
+
1447
+ * Properly merge `all and` media queries. These queries were previously being
1448
+ merged as though `all` referred to a specific media type, rather than all
1449
+ media types.
1450
+
1451
+ * Never remove units from 0 values in compressed mode. This wasn't safe in
1452
+ general, since some properties (such as `line-height`) interpret `0` as a
1453
+ `<number>` rather than a `<length>` which can break CSS transforms. It's
1454
+ better to do this optimization in a dedicated compressor that's aware of CSS
1455
+ property semantics.
1456
+
1457
+ * Match Ruby Sass's behavior in some edge-cases involving numbers with many
1458
+ significant digits.
1459
+
1460
+ * Emit escaped tab characters in identifiers as `\9` rather than a backslash
1461
+ followed by a literal tab.
1462
+
1463
+ ### Command-Line Interface
1464
+
1465
+ * The source map generated for a stylesheet read from standard input now uses a
1466
+ `data:` URL to include that stylesheet's contents in the source map.
1467
+
1468
+ ### Node JS API
1469
+
1470
+ * `this.includePaths` for a running importer is now a `;`-separated string on
1471
+ Windows, rather than `:`-separated. This matches Node Sass's behavior.
1472
+
1473
+ ### Dart API
1474
+
1475
+ * The URL used in a source map to refer to a stylesheet loaded from an importer
1476
+ is now `ImportResult.sourceMapUrl` as documented.
1477
+
1478
+ ## 1.15.2
1479
+
1480
+ ### Node JS API
1481
+
1482
+ * When `setValue()` is called on a Sass string object, make it unquoted even if
1483
+ it was quoted originally, to match the behavior of Node Sass.
1484
+
1485
+ ## 1.15.1
1486
+
1487
+ * Always add quotes to attribute selector values that begin with `--`, since IE
1488
+ 11 doesn't consider them to be identifiers.
1489
+
1490
+ ## 1.15.0
1491
+
1492
+ * Add support for passing arguments to `@content` blocks. See [the
1493
+ proposal][content-args] for details.
1494
+
1495
+ * Add support for the new `rgb()` and `hsl()` syntax introduced in CSS Colors
1496
+ Level 4, such as `rgb(0% 100% 0% / 0.5)`. See [the proposal][color-4-rgb-hsl]
1497
+ for more details.
1498
+
1499
+ * Add support for interpolation in at-rule names. See [the
1500
+ proposal][at-rule-interpolation] for details.
1501
+
1502
+ * Add paths from the `SASS_PATH` environment variable to the load paths in the
1503
+ command-line interface, Dart API, and JS API. These load paths are checked
1504
+ just after the load paths explicitly passed by the user.
1505
+
1506
+ * Allow saturation and lightness values outside of the `0%` to `100%` range in
1507
+ the `hsl()` and `hsla()` functions. They're now clamped to be within that
1508
+ range rather than producing an error if they're outside it.
1509
+
1510
+ * Properly compile selectors that end in escaped whitespace.
1511
+
1512
+ [content-args]: https://github.com/sass/language/blob/master/accepted/content-args.md
1513
+ [color-4-rgb-hsl]: https://github.com/sass/language/blob/master/accepted/color-4-rgb-hsl.md
1514
+ [at-rule-interpolation]: https://github.com/sass/language/blob/master/accepted/at-rule-interpolation.md
1515
+
1516
+ ### JavaScript API
1517
+
1518
+ * Always include the error location in error messages.
1519
+
1520
+ ## 1.14.4
1521
+
1522
+ * Properly escape U+0009 CHARACTER TABULATION in unquoted strings.
1523
+
1524
+ ## 1.14.3
1525
+
1526
+ * Treat `:before`, `:after`, `:first-line`, and `:first-letter` as
1527
+ pseudo-elements for the purposes of `@extend`.
1528
+
1529
+ * When running in compressed mode, remove spaces around combinators in complex
1530
+ selectors, so a selector like `a > b` is output as `a>b`.
1531
+
1532
+ * Properly indicate the source span for errors involving binary operation
1533
+ expressions whose operands are parenthesized.
1534
+
1535
+ ## 1.14.2
1536
+
1537
+ * Fix a bug where loading the same stylesheet from two different import paths
1538
+ could cause its imports to fail to resolve.
1539
+
1540
+ * Properly escape U+001F INFORMATION SEPARATOR ONE in unquoted strings.
1541
+
1542
+ ### Command-Line Interface
1543
+
1544
+ * Don't crash when using `@debug` in a stylesheet passed on standard input.
1545
+
1546
+ ### Dart API
1547
+
1548
+ * `AsyncImporter.canonicalize()` and `Importer.canonicalize()` must now return
1549
+ absolute URLs. Relative URLs are still supported, but are deprecated and will
1550
+ be removed in a future release.
1551
+
1552
+ ## 1.14.1
1553
+
1554
+ * Canonicalize escaped digits at the beginning of identifiers as hex escapes.
1555
+
1556
+ * Properly parse property declarations that are both *in* content blocks and
1557
+ written *after* content blocks.
1558
+
1559
+ ### Command-Line Interface
1560
+
1561
+ * Print more readable paths in `--watch` mode.
1562
+
1563
+ ## 1.14.0
1564
+
1565
+ ### BREAKING CHANGE
1566
+
1567
+ In accordance with our [compatibility policy][], breaking changes made for CSS
1568
+ compatibility reasons are released as minor version revision after a three-month
1569
+ deprecation period.
1570
+
1571
+ [compatibility policy]: README.md#compatibility-policy
1572
+
1573
+ * Tokens such as `#abcd` that are now interpreted as hex colors with alpha
1574
+ channels, rather than unquoted ID strings.
1575
+
1576
+ ## 1.13.4
1577
+
1578
+ ### Node JS
1579
+
1580
+ * Tweak JS compilation options to substantially improve performance.
1581
+
1582
+ ## 1.13.3
1583
+
1584
+ * Properly generate source maps for stylesheets that emit `@charset`
1585
+ declarations.
1586
+
1587
+ ### Command-Line Interface
1588
+
1589
+ * Don't error out when passing `--embed-source-maps` along with
1590
+ `--embed-sources` for stylesheets that contain non-ASCII characters.
1591
+
1592
+ ## 1.13.2
1593
+
1594
+ * Properly parse `:nth-child()` and `:nth-last-child()` selectors with
1595
+ whitespace around the argument.
1596
+
1597
+ * Don't emit extra whitespace in the arguments for `:nth-child()` and
1598
+ `:nth-last-child()` selectors.
1599
+
1600
+ * Fix support for CSS hacks in plain CSS mode.
1601
+
1602
+ ## 1.13.1
1603
+
1604
+ * Allow an IE-style single equals operator in plain CSS imports.
1605
+
1606
+ ## 1.13.0
1607
+
1608
+ * Allow `@extend` to be used with multiple comma-separated simple selectors.
1609
+ This is already supported by other implementations, but fell through the
1610
+ cracks for Dart Sass until now.
1611
+
1612
+ * Don't crash when a media rule contains another media rule followed by a style
1613
+ rule.
1614
+
1615
+ ## 1.12.0
1616
+
1617
+ ### Dart API
1618
+
1619
+ * Add a `SassException` type that provides information about Sass compilation
1620
+ failures.
1621
+
1622
+ ### Node JS API
1623
+
1624
+ * Remove the source map comment from the compiled JS. We don't ship with the
1625
+ source map, so this pointed to nothing.
1626
+
1627
+ ## 1.11.0
1628
+
1629
+ * Add support for importing plain CSS files. They can only be imported *without*
1630
+ an extension—for example, `@import "style"` will import `style.css`. Plain CSS
1631
+ files imported this way only support standard CSS features, not Sass
1632
+ extensions.
1633
+
1634
+ See [the proposal][css-import] for details.
1635
+
1636
+ * Add support for CSS's `min()` and `max()` [math functions][]. A `min()` and
1637
+ `max()` call will continue to be parsed as a Sass function if it involves any
1638
+ Sass-specific features like variables or function calls, but if it's valid
1639
+ plain CSS (optionally with interpolation) it will be emitted as plain CSS instead.
1640
+
1641
+ See [the proposal][css-min-max] for details.
1642
+
1643
+ * Add support for range-format media features like `(10px < width < 100px)`. See
1644
+ [the proposal][media-ranges] for details.
1645
+
1646
+ * Normalize escape codes in identifiers so that, for example, `éclair` and
1647
+ `\E9clair` are parsed to the same value. See
1648
+ [the proposal][identifier-escapes] for details.
1649
+
1650
+ * Don't choke on a [byte-order mark][] at the beginning of a document when
1651
+ running in JavaScript.
1652
+
1653
+ [math functions]: https://drafts.csswg.org/css-values/#math-function
1654
+ [css-import]: https://github.com/sass/language/blob/master/accepted/css-imports.md
1655
+ [css-min-max]: https://github.com/sass/language/blob/master/accepted/min-max.md
1656
+ [media-ranges]: https://github.com/sass/language/blob/master/accepted/media-ranges.md
1657
+ [identifier-escapes]: https://github.com/sass/language/blob/master/accepted/identifier-escapes.md
1658
+ [byte-order mark]: https://en.wikipedia.org/wiki/Byte_order_mark
1659
+
1660
+ ### Command-Line Interface
1661
+
1662
+ * The `--watch` command now continues to recompile a file after a syntax error
1663
+ has been detected.
1664
+
1665
+ ### Dart API
1666
+
1667
+ * Added a `Syntax` enum to indicate syntaxes for Sass source files.
1668
+
1669
+ * The `compile()` and `compileAsync()` functions now parse files with the `.css`
1670
+ extension as plain CSS.
1671
+
1672
+ * Added a `syntax` parameter to `compileString()` and `compileStringAsync()`.
1673
+
1674
+ * Deprecated the `indented` parameter to `compileString()` and `compileStringAsync()`.
1675
+
1676
+ * Added a `syntax` parameter to `new ImporterResult()` and a
1677
+ `ImporterResult.syntax` getter to set the syntax of the source file.
1678
+
1679
+ * Deprecated the `indented` parameter to `new ImporterResult()` and the
1680
+ `ImporterResult.indented` getter in favor of `syntax`.
1681
+
1682
+ ## 1.10.4
1683
+
1684
+ ### Command-Line Interface
1685
+
1686
+ * Fix a Homebrew installation failure.
1687
+
1688
+ ## 1.10.3
1689
+
1690
+ ### Command-Line Interface
1691
+
1692
+ * Run the Chocolatey script with the correct arguments so it doesn't crash.
1693
+
1694
+ ## 1.10.2
1695
+
1696
+ * No user-visible changes.
1697
+
1698
+ ## 1.10.1
1699
+
1700
+ ### Node JS API
1701
+
1702
+ * Don't crash when passing both `includePaths` and `importer`.
1703
+
1704
+ ## 1.10.0
1705
+
1706
+ * When two `@media` rules' queries can't be merged, leave nested rules in place
1707
+ for browsers that support them.
1708
+
1709
+ * Fix a typo in an error message.
1710
+
1711
+ ## 1.9.2
1712
+
1713
+ ### Node JS API
1714
+
1715
+ * Produce more readable filesystem errors, such as when a file doesn't exist.
1716
+
1717
+ ## 1.9.1
1718
+
1719
+ ### Command-Line Interface
1720
+
1721
+ * Don't emit ANSI codes to Windows terminals that don't support them.
1722
+
1723
+ * Fix a bug where `--watch` crashed on Mac OS.
1724
+
1725
+ ## 1.9.0
1726
+
1727
+ ### Node API
1728
+
1729
+ * Add support for `new sass.types.Color(argb)` for creating colors from ARGB hex
1730
+ numbers. This was overlooked when initially adding support for Node Sass's
1731
+ JavaScript API.
1732
+
1733
+ ## 1.8.0
1734
+
1735
+ ### Command-Line Interface
1736
+
1737
+ * Add a `--poll` flag to make `--watch` mode repeatedly check the filesystem for
1738
+ updates rather than relying on native filesystem notifications.
1739
+
1740
+ * Add a `--stop-on-error` flag to stop compiling additional files once an error
1741
+ is encountered.
1742
+
1743
+ ## 1.7.3
1744
+
1745
+ * No user-visible changes.
1746
+
1747
+ ## 1.7.2
1748
+
1749
+ * Add a deprecation warning for `@-moz-document`, except for cases where only an
1750
+ empty `url-prefix()` is used. Support is [being removed from Firefox][] and
1751
+ will eventually be removed from Sass as well.
1752
+
1753
+ [being removed from Firefox]: https://www.fxsitecompat.com/en-CA/docs/2018/moz-document-support-has-been-dropped-except-for-empty-url-prefix/
1754
+
1755
+ * Fix a bug where `@-moz-document` functions with string arguments weren't being
1756
+ parsed.
1757
+
1758
+ ### Command-Line Interface
1759
+
1760
+ * Don't crash when a syntax error is added to a watched file.
1761
+
1762
+ ## 1.7.1
1763
+
1764
+ * Fix crashes in released binaries.
1765
+
1766
+ ## 1.7.0
1767
+
1768
+ * Emit deprecation warnings for tokens such as `#abcd` that are ambiguous
1769
+ between ID strings and hex colors with alpha channels. These will be
1770
+ interpreted as colors in a release on or after 19 September 2018.
1771
+
1772
+ * Parse unambiguous hex colors with alpha channels as colors.
1773
+
1774
+ * Fix a bug where relative imports from files on the load path could look in the
1775
+ incorrect location.
1776
+
1777
+ ## 1.6.2
1778
+
1779
+ ### Command-Line Interface
1780
+
1781
+ * Fix a bug where the source map comment in the generated CSS could refer to the
1782
+ source map file using an incorrect URL.
1783
+
1784
+ ## 1.6.1
1785
+
1786
+ * No user-visible changes.
1787
+
1788
+ ## 1.6.0
1789
+
1790
+ * Produce better errors when expected tokens are missing before a closing brace.
1791
+
1792
+ * Avoid crashing when compiling a non-partial stylesheet that exists on the
1793
+ filesystem next to a partial with the same name.
1794
+
1795
+ ### Command-Line Interface
1796
+
1797
+ * Add support for the `--watch`, which watches for changes in Sass files on the
1798
+ filesystem and ensures that the compiled CSS is up-to-date.
1799
+
1800
+ * When using `--update`, surface errors when an import doesn't exist even if the
1801
+ file containing the import hasn't been modified.
1802
+
1803
+ * When compilation fails, delete the output file rather than leaving an outdated
1804
+ version.
1805
+
1806
+ ## 1.5.1
1807
+
1808
+ * Fix a bug where an absolute Windows path would be considered an `input:output`
1809
+ pair.
1810
+
1811
+ * Forbid custom properties that have no values, like `--foo:;`, since they're
1812
+ forbidden by the CSS spec.
1813
+
1814
+ ## 1.5.0
1815
+
1816
+ * Fix a bug where an importer would be passed an incorrectly-resolved URL when
1817
+ handling a relative import.
1818
+
1819
+ * Throw an error when an import is ambiguous due to a partial and a non-partial
1820
+ with the same name, or multiple files with different extensions. This matches
1821
+ the standard Sass behavior.
1822
+
1823
+ ### Command-Line Interface
1824
+
1825
+ * Add an `--interactive` flag that supports interactively running Sass
1826
+ expressions (thanks to [Jen Thakar][]!).
1827
+
1828
+ [Jen Thakar]: https://github.com/jathak
1829
+
1830
+ ## 1.4.0
1831
+
1832
+ * Improve the error message for invalid semicolons in the indented syntax.
1833
+
1834
+ * Properly disallow semicolons after declarations in the indented syntax.
1835
+
1836
+ ### Command-Line Interface
1837
+
1838
+ * Add support for compiling multiple files at once by writing
1839
+ `sass input.scss:output.css`. Note that unlike Ruby Sass, this *always*
1840
+ compiles files by default regardless of when they were modified.
1841
+
1842
+ This syntax also supports compiling entire directories at once. For example,
1843
+ `sass templates/stylesheets:public/css` compiles all non-partial Sass files
1844
+ in `templates/stylesheets` to CSS files in `public/css`.
1845
+
1846
+ * Add an `--update` flag that tells Sass to compile only stylesheets that have
1847
+ been (transitively) modified since the CSS file was generated.
1848
+
1849
+ ### Dart API
1850
+
1851
+ * Add `Importer.modificationTime()` and `AsyncImporter.modificationTime()` which
1852
+ report the last time a stylesheet was modified.
1853
+
1854
+ ### Node API
1855
+
1856
+ * Generate source maps when the `sourceMaps` option is set to a string and the
1857
+ `outFile` option is not set.
1858
+
1859
+ ## 1.3.2
1860
+
1861
+ * Add support for `@elseif` as an alias of `@else if`. This is not an
1862
+ intentional feature, so using it will cause a deprecation warning. It will be
1863
+ removed at some point in the future.
1864
+
1865
+ ## 1.3.1
1866
+
1867
+ ### Node API
1868
+
1869
+ * Fix loading imports relative to stylesheets that were themselves imported
1870
+ though relative include paths.
1871
+
1872
+ ## 1.3.0
1873
+
1874
+ ### Command-Line Interface
1875
+
1876
+ * Generate source map files by default when writing to disk. This can be
1877
+ disabled by passing `--no-source-map`.
1878
+
1879
+ * Add a `--source-map-urls` option to control whether the source file URLs in
1880
+ the generated source map are relative or absolute.
1881
+
1882
+ * Add an `--embed-sources` option to embed the contents of all source files in
1883
+ the generated source map.
1884
+
1885
+ * Add an `--embed-source-map` option to embed the generated source map as a
1886
+ `data:` URL in the generated CSS.
1887
+
1888
+ ### Dart API
1889
+
1890
+ * Add a `sourceMap` parameter to `compile()`, `compileString()`,
1891
+ `compileAsync()`, and `compileStringAsync()`. This takes a callback that's
1892
+ called with a [`SingleMapping`][] that contains the source map information for
1893
+ the compiled CSS file.
1894
+
1895
+ [`SingleMapping`]: https://www.dartdocs.org/documentation/source_maps/latest/source_maps.parser/SingleMapping-class.html
1896
+
1897
+ ### Node API
1898
+
1899
+ * Added support for the `sourceMap`, `omitSourceMapUrl`, `outFile`,
1900
+ `sourceMapContents`, `sourceMapEmbed`, and `sourceMapRoot` options to
1901
+ `render()` and `renderSync()`.
1902
+
1903
+ * Fix a bug where passing a relative path to `render()` or `renderSync()` would
1904
+ cause relative imports to break.
1905
+
1906
+ * Fix a crash when printing warnings in stylesheets compiled using `render()` or
1907
+ `renderSync()`.
1908
+
1909
+ * Fix a bug where format errors were reported badly on Windows.
1910
+
1911
+ ## 1.2.1
1912
+
1913
+ * Always emit units in compressed mode for `0` dimensions other than lengths and
1914
+ angles.
1915
+
1916
+ ## 1.2.0
1917
+
1918
+ * The command-line executable will now create the directory for the resulting
1919
+ CSS if that directory doesn't exist.
1920
+
1921
+ * Properly parse `#{$var} -#{$var}` as two separate values in a list rather than
1922
+ one value being subtracted from another.
1923
+
1924
+ * Improve the error message for extending compound selectors.
1925
+
1926
+ ## 1.1.1
1927
+
1928
+ * Add a commit that was accidentally left out of 1.1.0.
1929
+
1930
+ ## 1.1.0
1931
+
1932
+ * The command-line executable can now be used to write an output file to disk
1933
+ using `sass input.scss output.css`.
1934
+
1935
+ * Use a POSIX-shell-compatible means of finding the location of the `sass` shell
1936
+ script.
1937
+
1938
+ ## 1.0.0
1939
+
1940
+ **Initial stable release.**
1941
+
1942
+ ### Changes Since 1.0.0-rc.1
1943
+
1944
+ * Allow `!` in custom property values ([#260][]).
1945
+
1946
+ [#260]: https://github.com/sass/dart-sass/issues/260
1947
+
1948
+ #### Dart API
1949
+
1950
+ * Remove the deprecated `render()` function.
1951
+
1952
+ #### Node API
1953
+
1954
+ * Errors are now subtypes of the `Error` type.
1955
+
1956
+ * Allow both the `data` and `file` options to be passed to `render()` and
1957
+ `renderSync()` at once. The `data` option will be used as the contents of the
1958
+ stylesheet, and the `file` option will be used as the path for error reporting
1959
+ and relative imports. This matches Node Sass's behavior.
1960
+
1
1961
  ## 1.0.0-rc.1
2
1962
 
3
- * Add support for the legacy `render()` and `renderSync()` functions and the
4
- legacy `sass.types` namespace.
1963
+ * Add support for importing an `_index.scss` or `_index.sass` file when
1964
+ importing a directory.
1965
+
1966
+ * Add a `--load-path` command-line option (alias `-I`) for passing additional
1967
+ paths to search for Sass files to import.
1968
+
1969
+ * Add a `--quiet` command-line option (alias `-q`) for silencing warnings.
1970
+
1971
+ * Add an `--indented` command-line option for using the indented syntax with a
1972
+ stylesheet from standard input.
1973
+
1974
+ * Don't merge the media queries `not type` and `(feature)`. We had previously
1975
+ been generating `not type and (feature)`, but that's not actually the
1976
+ intersection of the two queries.
1977
+
1978
+ * Don't crash on `$x % 0`.
1979
+
1980
+ * The standalone executable distributed on GitHub is now named `sass` rather
1981
+ than `dart-sass`. The `dart-sass` executable will remain, with a deprecation
1982
+ message, until 1.0.0 is released.
1983
+
1984
+ ### Dart API
1985
+
1986
+ * Add a `Logger` class that allows users to control how messages are printed by
1987
+ stylesheets.
1988
+
1989
+ * Add a `logger` parameter to `compile()`, `compileAsync()`, `compileString()`,
1990
+ and `compileStringAsync()`.
5
1991
 
6
- ## 1.0.0-beta.8
1992
+ ### Node JS API
7
1993
 
8
- * Fully support the new JS API:
9
- * Support custom importers for the new JS API.
10
- * Support custom loggers for the new JS API.
11
- * Support the `SassArgumentList` value type.
12
- * Support the `SassFunction` value type.
1994
+ * Import URLs passed to importers are no longer normalized. For example, if a
1995
+ stylesheet contains `@import "./foo.scss"`, importers will now receive
1996
+ `"./foo.scss"` rather than `"foo.scss"`.
13
1997
 
14
- ## 1.0.0-beta.7
1998
+ ## 1.0.0-beta.5.3
15
1999
 
16
- * Expose the `Exception` class and ensure that syntax errors match the official
17
- JS API.
2000
+ * Support hard tabs in the indented syntax.
18
2001
 
19
- * Add support for the `style`, `alertColor`, `alertAscii`, `quietDeps`,
20
- `verbose`, and `functions` options in `compile()`, `compileString()`,
21
- `compileAsync()`, and `compileStringAsync()`.
2002
+ * Improve the formatting of comments that don't start on the same line as the
2003
+ opening `/*`.
22
2004
 
23
- * Add support for `CompileResult.loadedUrls`.
2005
+ * Preserve whitespace after `and` in media queries in compressed mode.
24
2006
 
25
- ## 1.0.0-beta.6
2007
+ ### Indented Syntax
26
2008
 
27
- * Expose (as yet incomplete) `compile()`, `compileString()`, `compileAsync()`,
28
- and `compileStringAsync()` functions.
2009
+ * Properly parse multi-line selectors.
29
2010
 
30
- * Include the official TypeScript definition files.
2011
+ * Don't deadlock on `/*` comments.
31
2012
 
32
- ## 1.0.0-beta.5
2013
+ * Don't add an extra `*/` to comments that already have it.
33
2014
 
34
- - Function and Values API
35
- - Add `SassColor` class.
36
- - Add `SassList` and `SassMap` classes.
2015
+ * Preserve empty lines in `/*` comments.
37
2016
 
38
- - Add `indentedSyntax` option to `render()`
2017
+ ## 1.0.0-beta.5.2
2018
+
2019
+ * Fix a bug where some colors would crash `compressed` mode.
2020
+
2021
+ ## 1.0.0-beta.5.1
2022
+
2023
+ * Add a `compressed` output style.
2024
+
2025
+ * Emit a warning when `&&` is used, since it's probably not what the user means.
2026
+
2027
+ * `round()` now returns the correct results for negative numbers that should
2028
+ round down.
2029
+
2030
+ * `var()` may now be passed in place of multiple arguments to `rgb()`, `rgba()`,
2031
+ `hsl()` and `hsla()`.
2032
+
2033
+ * Fix some cases where equivalent numbers wouldn't count as the same keys in
2034
+ maps.
2035
+
2036
+ * Fix a bug where multiplication like `(1/1px) * (1px/1)` wouldn't properly
2037
+ cancel out units.
2038
+
2039
+ * Fix a bug where dividing by a compatible unit would produce an invalid
2040
+ result.
2041
+
2042
+ * Remove a non-`sh`-compatible idiom from the standalone shell script.
2043
+
2044
+ ### Dart API
2045
+
2046
+ * Add a `functions` parameter to `compile()`, `compleString()`,
2047
+ `compileAsync()`, and `compileStringAsync()`. This allows users to define
2048
+ custom functions in Dart that can be invoked from Sass stylesheets.
2049
+
2050
+ * Expose the `Callable` and `AsyncCallable` types, which represent functions
2051
+ that can be invoked from Sass.
2052
+
2053
+ * Expose the `Value` type and its subclasses, as well as the top-level
2054
+ `sassTrue`, `sassFalse`, and `sassNull` values, which represent Sass values
2055
+ that may be passed into or returned from custom functions.
2056
+
2057
+ * Expose the `OutputStyle` enum, and add a `style` parameter to `compile()`,
2058
+ `compleString()`, `compileAsync()`, and `compileStringAsync()` that allows
2059
+ users to control the output style.
2060
+
2061
+ ### Node JS API
2062
+
2063
+ * Support the `functions` option.
2064
+
2065
+ * Support the `"compressed"` value for the `outputStyle` option.
39
2066
 
40
2067
  ## 1.0.0-beta.4
41
2068
 
42
- - Allow installing on arm64.
2069
+ * Support unquoted imports in the indented syntax.
2070
+
2071
+ * Fix a crash when `:not(...)` extends a selector that appears in
2072
+ `:not(:not(...))`.
2073
+
2074
+ ### Node JS API
43
2075
 
44
- - Function and Values API
45
- - Add `sassTrue` and `sassFalse` singletons.
46
- - Add `SassColor` class.
47
- - Add `SassNumber` class.
48
- - Add `SassString` class.
2076
+ * Add support for asynchronous importers to `render()` and `renderSync()`.
2077
+
2078
+ ### Dart API
2079
+
2080
+ * Add `compileAsync()` and `compileStringAsync()` methods. These run
2081
+ asynchronously, which allows them to take asynchronous importers (see below).
2082
+
2083
+ * Add an `AsyncImporter` class. This allows imports to be resolved
2084
+ asynchronously in case no synchronous APIs are available. `AsyncImporter`s are
2085
+ only compatible with `compileAysnc()` and `compileStringAsync()`.
49
2086
 
50
2087
  ## 1.0.0-beta.3
51
2088
 
52
- - Properly handle `data:` URIs in sourceMap sources.
2089
+ * Properly parse numbers with exponents.
2090
+
2091
+ * Don't crash when evaluating CSS variables whose names are entirely
2092
+ interpolated (for example, `#{--foo}: ...`).
53
2093
 
54
- - Function and Values API
55
- - Add `Value` abstract class.
56
- - Add `sassNull` singleton.
2094
+ ### Node JS API
2095
+
2096
+ * Add support for the `importer` option to `render()` and `renderSync()`.
2097
+ Only synchronous importers are currently supported.
2098
+
2099
+ ### Dart API
2100
+
2101
+ * Added an `Importer` class. This can be extended by users to provide support
2102
+ for custom resolution for `@import` rules.
2103
+
2104
+ * Added built-in `FilesystemImporter` and `PackageImporter` implementations that
2105
+ support resolving `file:` and `package:` URLs, respectively.
2106
+
2107
+ * Added an `importers` argument to the `compile()` and `compileString()`
2108
+ functions that provides `Importer`s to use when resolving `@import` rules.
2109
+
2110
+ * Added a `loadPaths` argument to the `compile()` and `compileString()`
2111
+ functions that provides paths to search for stylesheets when resolving
2112
+ `@import` rules. This is a shorthand for passing `FilesystemImporter`s to the
2113
+ `importers` argument.
57
2114
 
58
2115
  ## 1.0.0-beta.2
59
2116
 
60
- - No user visible changes.
2117
+ * Add support for the `::slotted()` pseudo-element.
2118
+
2119
+ * Generated transparent colors will now be emitted as `rgba(0, 0, 0, 0)` rather
2120
+ than `transparent`. This works around a bug wherein IE incorrectly handles the
2121
+ latter format.
2122
+
2123
+ ### Command-Line Interface
2124
+
2125
+ * Improve the logic for whether to use terminal colors by default.
2126
+
2127
+ ### Node JS API
2128
+
2129
+ * Add support for `data`, `includePaths`, `indentedSyntax`, `lineFeed`,
2130
+ `indentWidth`, and `indentType` options to `render()` and `renderSync()`.
2131
+
2132
+ * The result object returned by `render()` and `renderSync()` now includes the
2133
+ `stats` object which provides metadata about the compilation process.
2134
+
2135
+ * The error object thrown by `render()` and `renderSync()` now includes `line`,
2136
+ `column`, `file`, `status`, and `formatted` fields. The `message` field and
2137
+ `toString()` also provide more information.
2138
+
2139
+ ### Dart API
2140
+
2141
+ * Add a `renderString()` method for rendering Sass source that's not in a file
2142
+ on disk.
61
2143
 
62
2144
  ## 1.0.0-beta.1
63
2145
 
64
- - Download the compiler binary to the correct directory on Windows.
2146
+ * Drop support for the reference combinator. This has been removed from the
2147
+ spec, and will be deprecated and eventually removed in other implementations.
2148
+
2149
+ * Trust type annotations when compiling to JavaScript, which makes it
2150
+ substantially faster.
2151
+
2152
+ * Compile to minified JavaScript, which decreases the code size substantially
2153
+ and makes startup a little faster.
2154
+
2155
+ * Fix a crash when inspecting a string expression that ended in "\a".
2156
+
2157
+ * Fix a bug where declarations and `@extend` were allowed outside of a style
2158
+ rule in certain circumstances.
2159
+
2160
+ * Fix `not` in parentheses in `@supports` conditions.
2161
+
2162
+ * Allow `url` as an identifier name.
2163
+
2164
+ * Properly parse `/***/` in selectors.
2165
+
2166
+ * Properly parse unary operators immediately after commas.
2167
+
2168
+ * Match Ruby Sass's rounding behavior for all functions.
2169
+
2170
+ * Allow `\` at the beginning of a selector in the indented syntax.
2171
+
2172
+ * Fix a number of `@extend` bugs:
2173
+
2174
+ * `selector-extend()` and `selector-replace()` now allow compound selector
2175
+ extendees.
2176
+
2177
+ * Remove the universal selector `*` when unifying with other selectors.
2178
+
2179
+ * Properly unify the result of multiple simple selectors in the same compound
2180
+ selector being extended.
2181
+
2182
+ * Properly handle extensions being extended.
2183
+
2184
+ * Properly follow the [first law of `@extend`][laws].
2185
+
2186
+ * Fix selector specificity tracking to follow the
2187
+ [second law of `@extend`][laws].
2188
+
2189
+ * Allow extensions that match selectors but fail to unify.
2190
+
2191
+ * Partially-extended selectors are no longer used as parent selectors.
2192
+
2193
+ * Fix an edge case where both the extender and the extended selector
2194
+ have invalid combinator sequences.
2195
+
2196
+ * Don't crash with a "Bad state: no element" error in certain edge cases.
2197
+
2198
+ [laws]: https://github.com/sass/sass/issues/324#issuecomment-4607184
2199
+
2200
+ ## 1.0.0-alpha.9
2201
+
2202
+ * Elements without a namespace (such as `div`) are no longer unified with
2203
+ elements with the empty namespace (such as `|div`). This unification didn't
2204
+ match the results returned by `is-superselector()`, and was not guaranteed to
2205
+ be valid.
2206
+
2207
+ * Support `&` within `@at-root`.
2208
+
2209
+ * Properly error when a compound selector is followed immediately by `&`.
2210
+
2211
+ * Properly handle variable scoping in `@at-root` and nested properties.
2212
+
2213
+ * Properly handle placeholder selectors in selector pseudos.
2214
+
2215
+ * Properly short-circuit the `or` and `and` operators.
2216
+
2217
+ * Support `--$variable`.
2218
+
2219
+ * Don't consider unitless numbers equal to numbers with units.
2220
+
2221
+ * Warn about using named colors in interpolation.
2222
+
2223
+ * Don't emit loud comments in functions.
2224
+
2225
+ * Detect import loops.
2226
+
2227
+ * Fix `@import` with a `supports()` clause.
2228
+
2229
+ * Forbid functions named "and", "or", and "not".
2230
+
2231
+ * Fix `type-of()` with a function.
2232
+
2233
+ * Emit a nicer error for invalid tokens in a selector.
2234
+
2235
+ * Fix `invert()` with a `$weight` parameter.
2236
+
2237
+ * Fix a unit-parsing edge-cases.
2238
+
2239
+ * Always parse imports with queries as plain CSS imports.
2240
+
2241
+ * Support `&` followed by a non-identifier.
2242
+
2243
+ * Properly handle split media queries.
2244
+
2245
+ * Properly handle a placeholder selector that isn't at the beginning of a
2246
+ compound selector.
2247
+
2248
+ * Fix more `str-slice()` bugs.
2249
+
2250
+ * Fix the `%` operator.
2251
+
2252
+ * Allow whitespace between `=` and the mixin name in the indented syntax.
2253
+
2254
+ * Fix some slash division edge cases.
2255
+
2256
+ * Fix `not` when used like a function.
2257
+
2258
+ * Fix attribute selectors with single-character values.
2259
+
2260
+ * Fix some bugs with the `call()` function.
2261
+
2262
+ * Properly handle a backslash followed by a CRLF sequence in a quoted string.
2263
+
2264
+ * Fix numbers divided by colors.
2265
+
2266
+ * Support slash-separated numbers in arguments to plain CSS functions.
2267
+
2268
+ * Error out if a function is passed an unknown named parameter.
2269
+
2270
+ * Improve the speed of loading large files on Node.
2271
+
2272
+ * Don't consider browser-prefixed selector pseudos to be superselectors of
2273
+ differently- or non-prefixed selector pseudos with the same base name.
2274
+
2275
+ * Fix an `@extend` edge case involving multiple combinators in a row.
2276
+
2277
+ * Fix a bug where a `@content` block could get incorrectly passed to a mixin.
2278
+
2279
+ * Properly isolate the lexical environments of different calls to the same mixin
2280
+ and function.
2281
+
2282
+ ## 1.0.0-alpha.8
2283
+
2284
+ * Add the `content-exists()` function.
2285
+
2286
+ * Support interpolation in loud comments.
2287
+
2288
+ * Fix a bug where even valid semicolons and exclamation marks in custom property
2289
+ values were disallowed.
2290
+
2291
+ * Disallow invalid function names.
2292
+
2293
+ * Disallow extending across media queries.
2294
+
2295
+ * Properly parse whitespace after `...` in argument declaration lists.
2296
+
2297
+ * Support terse mixin syntax in the indented syntax.
2298
+
2299
+ * Fix `@at-root` query parsing.
2300
+
2301
+ * Support special functions in `@-moz-document`.
2302
+
2303
+ * Support `...` after a digit.
2304
+
2305
+ * Fix some bugs when treating a map as a list of pairs.
2306
+
2307
+ ## 1.0.0-alpha.7
2308
+
2309
+ * Fix `function-exists()`, `variable-exists()`, and `mixin-exists()` to use the
2310
+ lexical scope rather than always using the global scope.
2311
+
2312
+ * `str-index()` now correctly inserts at negative indices.
2313
+
2314
+ * Properly parse `url()`s that contain comment-like text.
2315
+
2316
+ * Fix a few more small `@extend` bugs.
2317
+
2318
+ * Fix a bug where interpolation in a quoted string was being dropped in some
2319
+ circumstances.
2320
+
2321
+ * Properly handle `@for` rules where each bound has a different unit.
2322
+
2323
+ * Forbid mixins and functions from being defined in control directives.
2324
+
2325
+ * Fix a superselector-computation edge case involving `:not()`.
2326
+
2327
+ * Gracefully handle input files that are invalid UTF-8.
2328
+
2329
+ * Print a Sass stack trace when a file fails to load.
2330
+
2331
+ ## 1.0.0-alpha.6
2332
+
2333
+ * Allow `var()` to be passed to `rgb()`, `rgba()`, `hsl()`, and `hsla()`.
2334
+
2335
+ * Fix conversions between numbers with `dpi`, `dpcm`, and `dppx` units.
2336
+ Previously these conversions were inverted.
2337
+
2338
+ * Don't crash when calling `str-slice()` with an `$end-at` index lower than the
2339
+ `$start-at` index.
2340
+
2341
+ * `str-slice()` now correctly returns `""` when `$end-at` is negative and points
2342
+ before the beginning of the string.
2343
+
2344
+ * Interpolation in quoted strings now properly preserves newlines.
2345
+
2346
+ * Don't crash when passing only `$hue` or no keyword arguments to
2347
+ `adjust-color()`, `scale-color()`, or `change-color()`.
2348
+
2349
+ * Preserve escapes in identifiers. This used to only work for identifiers in
2350
+ SassScript.
2351
+
2352
+ * Fix a few small `@extend` bugs.
2353
+
2354
+ ## 1.0.0-alpha.5
2355
+
2356
+ * Fix bounds-checking for `opacify()`, `fade-in()`, `transparentize()`, and
2357
+ `fade-out()`.
2358
+
2359
+ * Fix a bug with `@extend` superselector calculations.
2360
+
2361
+ * Fix some cases where `#{...}--` would fail to parse in selectors.
2362
+
2363
+ * Allow a single number to be passed to `saturate()` for use in filter contexts.
2364
+
2365
+ * Fix a bug where `**/` would fail to close a loud comment.
2366
+
2367
+ * Fix a bug where mixin and function calls could set variables incorrectly.
2368
+
2369
+ * Move plain CSS `@import`s to the top of the document.
2370
+
2371
+ ## 1.0.0-alpha.4
2372
+
2373
+ * Add support for bracketed lists.
2374
+
2375
+ * Add support for Unicode ranges.
2376
+
2377
+ * Add support for the Microsoft-style `=` operator.
2378
+
2379
+ * Print the filename for `@debug` rules.
2380
+
2381
+ * Fix a bug where `1 + - 2` and similar constructs would crash the parser.
2382
+
2383
+ * Fix a bug where `@extend` produced the wrong result when used with
2384
+ selector combinators.
2385
+
2386
+ * Fix a bug where placeholder selectors were not allowed to be unified.
2387
+
2388
+ * Fix the `mixin-exists()` function.
2389
+
2390
+ * Fix `:nth-child()` and `:nth-last-child()` parsing when they contain `of
2391
+ selector`.
2392
+
2393
+ ## 1.0.0-alpha.3
2394
+
2395
+ * Fix a bug where color equality didn't take the alpha channel into account.
2396
+
2397
+ * Fix a bug with converting some RGB colors to HSL.
2398
+
2399
+ * Fix a parent selector resolution bug.
2400
+
2401
+ * Properly declare the arguments for `opacify()` and related functions.
2402
+
2403
+ * Add a missing dependency on the `stack_trace` package.
2404
+
2405
+ * Fix broken Windows archives.
2406
+
2407
+ * Emit colors using their original representation if possible.
2408
+
2409
+ * Emit colors without an original representation as names if possible.
2410
+
2411
+ ## 1.0.0-alpha.2
2412
+
2413
+ * Fix a bug where variables, functions, and mixins were broken in imported
2414
+ files.
65
2415
 
66
- ## 1.0.0-beta.0
2416
+ ## 1.0.0-alpha.1
67
2417
 
68
- - Release Embedded Host beta with limited support for `render()`, which compiles
69
- Sass files and strings by communicating with the Embedded Compiler via the
70
- Embedded protocol. Does not yet support the entire `render` API, including
71
- custom functions and importers.
2418
+ * Initial alpha release.