diff --git a/CHANGELOG.md b/CHANGELOG.md index 086c8055e..fa991a65d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.83.5-dev + +* Fix the error message for `@extend` without a selector and possibly other + parsing edge-cases in contexts that allow interpolation.. + ## 1.83.4 * No user-visible changes. diff --git a/lib/src/interpolation_map.dart b/lib/src/interpolation_map.dart index 9f6788f53..ca244be23 100644 --- a/lib/src/interpolation_map.dart +++ b/lib/src/interpolation_map.dart @@ -46,6 +46,11 @@ final class InterpolationMap { var target = error.span; if (target == null) return error; + if (_interpolation.contents.isEmpty) { + return SourceSpanFormatException( + error.message, _interpolation.span, error.source); + } + var source = mapSpan(target); var startIndex = _indexInContents(target.start); var endIndex = _indexInContents(target.end); @@ -83,6 +88,8 @@ final class InterpolationMap { /// generated from interpolation, this will return the full [FileSpan] for /// that interpolated expression. Object /* FileLocation|FileSpan */ _mapLocation(SourceLocation target) { + if (_interpolation.contents.isEmpty) return _interpolation.span; + var index = _indexInContents(target); if (_interpolation.contents[index] case Expression chunk) { return chunk.span; diff --git a/pkg/sass-parser/CHANGELOG.md b/pkg/sass-parser/CHANGELOG.md index 01368d49d..60a15e23b 100644 --- a/pkg/sass-parser/CHANGELOG.md +++ b/pkg/sass-parser/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.4.13-dev + +* No user-visible changes. + ## 0.4.12 * Fix more bugs in the automated release process. diff --git a/pkg/sass-parser/package.json b/pkg/sass-parser/package.json index 493a45106..80b596730 100644 --- a/pkg/sass-parser/package.json +++ b/pkg/sass-parser/package.json @@ -1,6 +1,6 @@ { "name": "sass-parser", - "version": "0.4.12", + "version": "0.4.13-dev", "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 c68a2f070..153a56c86 100644 --- a/pkg/sass_api/CHANGELOG.md +++ b/pkg/sass_api/CHANGELOG.md @@ -1,3 +1,7 @@ +## 15.0.5-dev + +* No user-visible changes. + ## 15.0.4 * No user-visible changes. diff --git a/pkg/sass_api/pubspec.yaml b/pkg/sass_api/pubspec.yaml index 8ec0f5503..7f16313a6 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.0.4 +version: 15.0.5-dev description: Additional APIs for Dart Sass. homepage: https://github.com/sass/dart-sass @@ -10,7 +10,7 @@ environment: sdk: ">=3.3.0 <4.0.0" dependencies: - sass: 1.83.4 + sass: 1.83.5 dev_dependencies: dartdoc: ^8.0.14 diff --git a/pubspec.yaml b/pubspec.yaml index 51fe325d2..277f399f2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.83.4 +version: 1.83.5-dev description: A Sass implementation in Dart. homepage: https://github.com/sass/dart-sass