Skip to content

Commit

Permalink
Release 0.26.0
Browse files Browse the repository at this point in the history
Released 2022-09-18.
Progress: 4500 of 6843 tests passed (or 4673 if ignoring some
deprecation messages).

Breaking changes

* A `BuiltinFn` now takes a `&ResolvedArgs` rather than a `&ScopeRef` as
  argument (PR #157).
* `@extend` is still unsupported, but now some uses of it (e.g. in control
  structures) will result in an error instead of wrong output.
* Some `sass::Item` alternatives now contain a `Callable`, combining
  `FormalArgs` with a body (a `Vec<Item>`).  And `sass::Item::Content` now
  has a `CallArgs`.  Also, `MixinDeclImpl` is replaced with
  `sass::Closure`. (PR #146).
* `sass::CallArgs::new()` has an additional `trailing_comma` boolean
  argument (PR #147).
* Remove deprecated methods `css::Value::integer_value()` and
  `Number::is_integer()`.
* Changed the error type of `Scope::get_function()`.
* Setting a variable, `Scope::define` now takes the `Value` by value rather
  than by reference.  Also, `Scope::define_multi` is no longer exposed in
  the api.
* Renamed one variant of `ScopeError` and added two others.
* The sass `Value::Variable` and `Item::VariableDeclaration` variants
  now holds a `Name` rather than just a `String` for the variable name.
  Also, both now holds a `SourcePos`.
* Changes in `Error` representation.  Many errors are now constructed like
  `Invalid::SomeVariant.at(pos)` (PR #145).
* `Error::error` now takes an `Into<String>` argument (PR #151).
* The module `input` contains types types with `Context<L>`, `Loader`,
  `FsLoader`, and `FsContext`, replacing the old `FileContext` and
  `FsFileContext`.  Also, the types `SourceKind`, `SourceName` and `Parsed`
  are moved from top-level into the `input` module (PR #150).
* The `parse_scss_data` function is removed.  Please create a `SourceFile`
  and use the `parse` method on that instead (PR #150).
* The `Format::write_root` method are removed, `Context::transform`
  should be used instad (PR #152).

Improvements

* `input::Context` is the new main interface to rsass.
  Create a context suitable for how files should be loaded, configure it
  with an output format and optionally extend the global scope before
  calling `Context::transform` with an input file (PR #151, PR #152).
* Also provide `CargoContext` / `CargoLoader` for convenient use in
  build scripts (PR #154).
* The way to get argument values from the implementation of a builtin
  function is refactored to handle both any type that implements
  `TryFrom<Value>` and explicit validation/conversion methods nicer, and is
  now availiable for implementing builtin functions (extensions) outside of
  rsass itself (PR #157).
* The `@content` can have arguments when declaring and calling a mixin
  (PR #146).
* Variable declartions can be scoped (like `module.$var: value`).  Some
  error reporting improvements (PR #148).
* Allow interpolation in css min and max function arguments.
* The url for `@use` and `@forward` must be quoted.
* Improve detection of import loops (PR #150).
* When loading files, Don't apply suffix / index-adding rules if the file
  name already has a suffix (PR #150).
* Some `@` rules are now forbidden in some places as they should (PR #145).
* The css `var(...)` function is now parsed as a proper function, and not
  as a special string (PR #147).
* The null value can be quoted as an empty string (PR #147).
* Make `Debug` formatting of `rsass::Error` look like the `Display` output,
  but without the "Error: " prefix. This makes the error display correctly
  if returned from a main function.  This also removed the "Error: " prefix
  from a lot of message strings (PR #151).
* In error message, don't show ellipses for consecutive lines (PR #147).
* Somtimes a trailing comma in argument lists is preserved (PR #147).
* Simplified `main` of the command-line by returning a `Result` (PR #151).
* Update sass-spec test suite to 2022-09-15.
* Handle tests referencing `input.scss` in spectest (include it among the
  mock files, if mentioned in itself or any existing mock file) (PR #150).
* Use `lazy-regex` in spectest (PR #150).
* Rsass now uses rust edition 2021, so MSRV is 1.56.0 (PR #153).
* Some cleanups.
* The main branch is now named `main` rather than `master`.

Thanks to @fasterthanlime (again) for reporting the problem with
interpolation in min and max.
  • Loading branch information
kaj committed Sep 18, 2022
1 parent 082f935 commit cf724eb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ The format is based on
project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased
## Release 0.26.0

Released 2022-09-18.
Progress: 4500 of 6843 tests passed (or 4673 if ignoring some
deprecation messages).

### Breaking changes

* Changes in `Error` representation. Many errors are now constructed like
`Invalid::SomeVariant.at(pos)` (PR #145).
* A `BuiltinFn` now takes a `&ResolvedArgs` rather than a `&ScopeRef` as
argument (PR #157).
* `@extend` is still unsupported, but now some uses of it (e.g. in control
Expand All @@ -33,6 +35,8 @@ project adheres to
* The sass `Value::Variable` and `Item::VariableDeclaration` variants
now holds a `Name` rather than just a `String` for the variable name.
Also, both now holds a `SourcePos`.
* Changes in `Error` representation. Many errors are now constructed like
`Invalid::SomeVariant.at(pos)` (PR #145).
* `Error::error` now takes an `Into<String>` argument (PR #151).
* The module `input` contains types types with `Context<L>`, `Loader`,
`FsLoader`, and `FsContext`, replacing the old `FileContext` and
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rsass"
version = "0.26.0-PRE"
version = "0.26.0"
authors = ["Rasmus Kaj <[email protected]>"]
categories = ["command-line-utilities", "web-programming"]
keywords = ["scss", "sass", "css"]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ The sass language [is defined in its reference
doc](http://sass-lang.com/documentation/file.SASS_REFERENCE.html).
This implementation is incomplete but getting there, if slowly.

Progress: 4350 of 6552 tests passed in dart-sass compatibility mode.
Progress: 4500 of 6843 tests passed.

If you want a working rust library for sass right now, you may
be better of with [sass-rs](https://crates.io/crates/sass-rs)
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//! doc](http://sass-lang.com/documentation/file.SASS_REFERENCE.html).
//! This implementation is incomplete but getting there, if slowly.
//!
//! Progress: 4350 of 6552 tests passed in dart-sass compatibility mode.
//! Progress: 4500 of 6843 tests passed.
//!
//! If you want a working rust library for sass right now, you may
//! be better of with [sass-rs](https://crates.io/crates/sass-rs)
Expand Down

0 comments on commit cf724eb

Please sign in to comment.