From 2c7e7ee34169e72192609c489add1fbcf867db23 Mon Sep 17 00:00:00 2001 From: awjin Date: Tue, 27 Apr 2021 16:26:49 -0700 Subject: [PATCH 1/2] Fix extending selectors across multiple modules. Allows more than one module to extend the same upstream selector that, in turn, extends a selector from its upstream module. Properly skips creating an extra extension that was being counted as unresolved when evaluating @extends. See https://github.com/sass/sass-spec/pull/1635 Fixes https://github.com/sass/dart-sass/issues/1295 --- CHANGELOG.md | 6 ++++++ lib/src/extend/extension_store.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 820a176f6..2cf20cfba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.32.12 + +* Fix a bug that disallowed more than one module from extending the same + selector from a module if that selector itself extended a selector from + another upstream module. + ## 1.32.11 * Fix a bug where bogus indented syntax errors were reported for lines that diff --git a/lib/src/extend/extension_store.dart b/lib/src/extend/extension_store.dart index 73a189ee8..c821a21c9 100644 --- a/lib/src/extend/extension_store.dart +++ b/lib/src/extend/extension_store.dart @@ -328,7 +328,7 @@ class ExtensionStore { } var containsExtension = selectors.first == extension.extender.selector; - var first = false; + var first = true; for (var complex in selectors) { // If the output contains the original complex selector, there's no // need to recreate it. diff --git a/pubspec.yaml b/pubspec.yaml index fbac65f22..734f8a9e2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.32.11 +version: 1.32.12-dev description: A Sass implementation in Dart. author: Sass Team homepage: https://github.com/sass/dart-sass From dec3ef8e09dcdd306757ab7224566842f7b667e5 Mon Sep 17 00:00:00 2001 From: awjin Date: Wed, 28 Apr 2021 11:38:38 -0700 Subject: [PATCH 2/2] Code review. --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index 734f8a9e2..0d336a6a7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.32.12-dev +version: 1.32.12 description: A Sass implementation in Dart. author: Sass Team homepage: https://github.com/sass/dart-sass