Skip to content

Commit

Permalink
Expose Expression.isCalculationSafe to sass_api (#2404)
Browse files Browse the repository at this point in the history
This is necessary to fix sass/migrator#262.
  • Loading branch information
jathak authored Oct 23, 2024
1 parent 37a05f9 commit c907bcb
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 9 deletions.
3 changes: 0 additions & 3 deletions lib/src/ast/sass/expression.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ abstract class Expression implements SassNode {
Expression();

/// Whether this expression can be used in a calculation context.
///
/// @nodoc
@internal
bool get isCalculationSafe => accept(const IsCalculationSafeVisitor());

/// If this expression is valid interpolated plain CSS, returns the equivalent
Expand Down
2 changes: 1 addition & 1 deletion pkg/sass-parser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sass-parser",
"version": "0.4.1-dev",
"version": "0.4.1",
"description": "A PostCSS-compatible wrapper of the official Sass parser",
"repository": "sass/sass",
"author": "Google Inc.",
Expand Down
5 changes: 3 additions & 2 deletions pkg/sass_api/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## 14.0.1
## 14.1.0

* No user-visible changes.
* Add `Expression.isCalculationSafe`, which returns true when this expression
can safely be used in a calcuation.

## 14.0.0

Expand Down
4 changes: 2 additions & 2 deletions pkg/sass_api/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ name: sass_api
# Note: Every time we add a new Sass AST node, we need to bump the *major*
# version because it's a breaking change for anyone who's implementing the
# visitor interface(s).
version: 14.0.1-dev
version: 14.1.0
description: Additional APIs for Dart Sass.
homepage: https://github.com/sass/dart-sass

environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
sass: 1.80.4-dev
sass: 1.80.4

dev_dependencies:
dartdoc: ^8.0.14
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: sass
version: 1.80.4-dev
version: 1.80.4
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down

0 comments on commit c907bcb

Please sign in to comment.