Dart-sass

Latest version: v0.5.2

Safety actively analyzes 713567 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 32

1.46.0

JS API

* **Potentially breaking bug fix:** Match the specification of the new JS API by
passing `undefined` rather than `null` to `Logger.warn()` for an unset `span`.

TypeScript Declarations

* Add a declaration for the `LegacyPluginThis.options.context` field.

* Update the definition of `LegacyAsyncFunction` to include explicit definitions
with zero through six arguments before the `done` parameter. This makes it
possible for TypeScript users to pass in callbacks that take a specific number
of arguments, rather than having to declare a callback that takes an arbitrary
number.

* Add a declaration for `types.Error`, a legacy API class that can be returned
by asynchronous functions to signal asynchronous errors.

* Add a `LegacyAsyncFunctionDone` type for the `done` callback that's passed to
`LegacyAsyncFunction`.

1.45.2

JS API

* **Potentially breaking bug fix:** Change the default value of the `separator`
parameter for `new SassArgumentList()` to `','` rather than `null`. This
matches the API specification.

1.45.1

* **Potentially breaking bug fix:** Properly parse custom properties in
`supports` conditions. Note that this means that SassScript expressions on
the right-hand side of custom property `supports` queries now need to be
interpolated, as per https://sass-lang.com/d/css-vars.

* **Potentially breaking bug fix:** Fix a bug where `inspect()` was not
properly printing nested, empty, bracketed lists.

1.45.0

JS API

This release includes an entirely new JavaScript API, designed to be more
idiomatic, performant, and usable. The old API will continue to be supported
until Dart Sass 2.0.0, but it is now considered deprecated and should be avoided
for new code.

The new API includes:

* `compile()` and `compileAsync()` functions that take Sass file paths and
return the result of compiling them to CSS. The async function returns a
`Promise` rather than using a callback-based API.

* `compileString()` and `compileStringAsync()` functions that take a string of
Sass source and compiles it to CSS. As above, the async function returns a
`Promise`.

* A new importer API that more closely matches the Sass specification's logic
for resolving loads. This makes it much easier for Sass to cache information
across `import` and `use` rules, which substantially improves performance
for applications that rely heavily on repeated `import`s.

* A new custom function API, including much more usable JS representations of
Sass value types complete with type-assertion functions, easy map and list
lookups, and compatibility with the [`immutable`] package. **Unlike in the
legacy API,** function callbacks now take one argument which contains an array
of Sass values (rather than taking a separate JS argument for each Sass
argument).

[`immutable`]: https://immutable-js.com/

For full documentation of this API, please see [the Sass website][js-api].

[js-api]: https://sass-lang.com/documentation/js-api

This release also adds TypeScript type definitions.

1.44.0

* Suggest `calc()` as an alternative in `/`-as-division deprecation messages.

Dart API

* Add `SassNumber.convert()` and `SassNumber.convertValue()`. These work like
`SassNumber.coerce()` and `SassNumber.coerceValue()`, except they don't treat
unitless numbers as universally compatible.

* Fix a bug where `SassNumber.coerceToMatch()` and
`SassNumber.coerceValueToMatch()` wouldn't coerce single-unit numbers to
match unitless numbers.

1.43.5

* Fix a bug where calculations with different operators were incorrectly
considered equal.

* Properly parse attribute selectors with empty namespaces.

JS API

* Print more detailed JS stack traces. This is mostly useful for the Sass team's
own debugging purposes.

Page 4 of 32

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.