Skip to content

Commit edfe90d

Browse files
authored
Fix crash when @importing a Sass file that @uses another file (#2599)
* update changelog and versions
1 parent 9360866 commit edfe90d

File tree

8 files changed

+23
-11
lines changed

8 files changed

+23
-11
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.92.2-dev
2+
3+
* Fix a crash when a style rule contains a nested `@import`, and the loaded file
4+
`@use`s a user-defined module as well as `@include`s a top-level mixin which
5+
emits top-level declarations.
6+
17
## 1.92.1
28

39
* Fix a bug where variable definitions from one imported, forwarded module

lib/src/visitor/async_evaluate.dart

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4670,9 +4670,8 @@ final class _ImportedCssVisitor implements ModifiableCssVisitor<void> {
46704670

46714671
void visitCssComment(ModifiableCssComment node) => _visitor._addChild(node);
46724672

4673-
void visitCssDeclaration(ModifiableCssDeclaration node) {
4674-
assert(false, "visitCssDeclaration() should never be called.");
4675-
}
4673+
void visitCssDeclaration(ModifiableCssDeclaration node) =>
4674+
_visitor._addChild(node);
46764675

46774676
void visitCssImport(ModifiableCssImport node) {
46784677
if (_visitor._parent != _visitor._root) {

lib/src/visitor/evaluate.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// DO NOT EDIT. This file was generated from async_evaluate.dart.
66
// See tool/grind/synchronize.dart for details.
77
//
8-
// Checksum: a32ff6b83b3365e8dad72b8b12c2c17937a5f28e
8+
// Checksum: b79ed685f78b8d5356795eb2d1112f830abaf58e
99
//
1010
// ignore_for_file: unused_import
1111

@@ -4652,9 +4652,8 @@ final class _ImportedCssVisitor implements ModifiableCssVisitor<void> {
46524652

46534653
void visitCssComment(ModifiableCssComment node) => _visitor._addChild(node);
46544654

4655-
void visitCssDeclaration(ModifiableCssDeclaration node) {
4656-
assert(false, "visitCssDeclaration() should never be called.");
4657-
}
4655+
void visitCssDeclaration(ModifiableCssDeclaration node) =>
4656+
_visitor._addChild(node);
46584657

46594658
void visitCssImport(ModifiableCssImport node) {
46604659
if (_visitor._parent != _visitor._root) {

pkg/sass-parser/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.4.29-dev
2+
3+
* No user-visible changes.
4+
15
## 0.4.28
26

37
* No user-visible changes.

pkg/sass-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sass-parser",
3-
"version": "0.4.28",
3+
"version": "0.4.29-dev",
44
"description": "A PostCSS-compatible wrapper of the official Sass parser",
55
"repository": "sass/sass",
66
"author": "Google Inc.",

pkg/sass_api/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 15.11.1-dev
2+
3+
* No user-visible changes.
4+
15
## 15.11.0
26

37
* No user-visible changes.

pkg/sass_api/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: sass_api
22
# Note: Every time we add a new Sass AST node, we need to bump the *major*
33
# version because it's a breaking change for anyone who's implementing the
44
# visitor interface(s).
5-
version: 15.11.0
5+
version: 15.11.1-dev
66
description: Additional APIs for Dart Sass.
77
homepage: https://github.com/sass/dart-sass
88

99
environment:
1010
sdk: ">=3.6.0 <4.0.0"
1111

1212
dependencies:
13-
sass: 1.92.1
13+
sass: 1.92.2
1414

1515
dev_dependencies:
1616
dartdoc: ^8.0.14

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.92.1
2+
version: 1.92.2-dev
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)