diff --git a/CHANGELOG.md b/CHANGELOG.md index f7226993f..019cdb504 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.89.1 + +* No user-visible changes. + ## 1.89.0 * Allow the Node package importer to load files even when there are multiple diff --git a/lib/src/parse/stylesheet.dart b/lib/src/parse/stylesheet.dart index 17fdd99e5..efee015a4 100644 --- a/lib/src/parse/stylesheet.dart +++ b/lib/src/parse/stylesheet.dart @@ -2396,6 +2396,7 @@ abstract class StylesheetParser extends Parser { var start = scanner.state; scanner.expectChar($lparen); whitespace(consumeNewlines: true); + var inside = scanner.state; if (!_lookingAtExpression()) { scanner.expectChar($rparen); return ListExpression( @@ -2425,12 +2426,13 @@ abstract class StylesheetParser extends Parser { whitespace(consumeNewlines: true); } - scanner.expectChar($rparen); - return ListExpression( + var list = ListExpression( expressions, ListSeparator.comma, - scanner.spanFrom(start), + scanner.spanFrom(inside), ); + scanner.expectChar($rparen); + return ParenthesizedExpression(list, scanner.spanFrom(start)); } finally { _inParentheses = wasInParentheses; } diff --git a/pkg/sass-parser/CHANGELOG.md b/pkg/sass-parser/CHANGELOG.md index 746bd40db..f67944eec 100644 --- a/pkg/sass-parser/CHANGELOG.md +++ b/pkg/sass-parser/CHANGELOG.md @@ -1,3 +1,10 @@ +## 0.4.23 + +* Update types for compatibility with the latest PostCSS. + +* **Potentially-breaking bug fix**: parenthesized, comma-separated lists are now + correctly wrapped in a `ParenthesizedExpression`. + ## 0.4.22 * No user-visible changes. diff --git a/pkg/sass-parser/lib/src/node.d.ts b/pkg/sass-parser/lib/src/node.d.ts index a89bb6137..b4026e362 100644 --- a/pkg/sass-parser/lib/src/node.d.ts +++ b/pkg/sass-parser/lib/src/node.d.ts @@ -121,7 +121,12 @@ declare abstract class Node opts?: Pick, ): postcss.Position; positionInside(index: number): postcss.Position; - rangeBy(opts?: Pick): { + rangeBy( + opts?: Pick< + postcss.WarningOptions, + 'end' | 'endIndex' | 'index' | 'start' | 'word' + >, + ): { start: postcss.Position; end: postcss.Position; }; diff --git a/pkg/sass-parser/package.json b/pkg/sass-parser/package.json index add3ca1b0..4baff4fa1 100644 --- a/pkg/sass-parser/package.json +++ b/pkg/sass-parser/package.json @@ -1,6 +1,6 @@ { "name": "sass-parser", - "version": "0.4.22", + "version": "0.4.23", "description": "A PostCSS-compatible wrapper of the official Sass parser", "repository": "sass/sass", "author": "Google Inc.", diff --git a/pkg/sass_api/CHANGELOG.md b/pkg/sass_api/CHANGELOG.md index a5edae7cd..94b28dcc3 100644 --- a/pkg/sass_api/CHANGELOG.md +++ b/pkg/sass_api/CHANGELOG.md @@ -1,3 +1,8 @@ +## 15.7.0 + +* **Potentially-breaking bug fix**: parenthesized, comma-separated lists are now + correctly wrapped in a `ParenthesizedExpression`. + ## 15.6.0 * No user-visible changes. diff --git a/pkg/sass_api/pubspec.yaml b/pkg/sass_api/pubspec.yaml index 47a3946d8..9d70a0149 100644 --- a/pkg/sass_api/pubspec.yaml +++ b/pkg/sass_api/pubspec.yaml @@ -2,7 +2,7 @@ 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: 15.6.0 +version: 15.7.0 description: Additional APIs for Dart Sass. homepage: https://github.com/sass/dart-sass @@ -10,7 +10,7 @@ environment: sdk: ">=3.6.0 <4.0.0" dependencies: - sass: 1.89.0 + sass: 1.89.1 dev_dependencies: dartdoc: ^8.0.14 diff --git a/pubspec.yaml b/pubspec.yaml index 3054e31ee..f5f848a90 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.89.0 +version: 1.89.1 description: A Sass implementation in Dart. homepage: https://github.com/sass/dart-sass