From 372f15cc24973314c08c77b9e29b31f9f801faf3 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Fri, 10 May 2024 15:49:58 -0700 Subject: [PATCH] Fix `MapExtensions.getOption()` for nullable types (#2241) Closes #2239 --- CHANGELOG.md | 4 ++++ lib/src/util/map.dart | 2 +- pkg/sass_api/CHANGELOG.md | 4 ++++ pkg/sass_api/pubspec.yaml | 4 ++-- pubspec.yaml | 2 +- 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 52adaf61a..0c306b1ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.77.1 + +* Fix a crash that could come up with importers in certain contexts. + ## 1.77.0 * *Don't* throw errors for at-rules in keyframe blocks. diff --git a/lib/src/util/map.dart b/lib/src/util/map.dart index 46982a79c..a61c151df 100644 --- a/lib/src/util/map.dart +++ b/lib/src/util/map.dart @@ -21,5 +21,5 @@ extension MapExtensions on Map { /// Returns an option that contains the value at [key] if one exists and null /// otherwise. - Option getOption(K key) => containsKey(key) ? (this[key]!,) : null; + Option getOption(K key) => containsKey(key) ? (this[key] as V,) : null; } diff --git a/pkg/sass_api/CHANGELOG.md b/pkg/sass_api/CHANGELOG.md index 1c068a43f..63e2b58f8 100644 --- a/pkg/sass_api/CHANGELOG.md +++ b/pkg/sass_api/CHANGELOG.md @@ -1,3 +1,7 @@ +## 10.4.1 + +* No user-visible changes. + ## 10.4.0 * No user-visible changes. diff --git a/pkg/sass_api/pubspec.yaml b/pkg/sass_api/pubspec.yaml index aa5fda388..0db04d6b3 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: 10.4.0 +version: 10.4.1 description: Additional APIs for Dart Sass. homepage: https://github.com/sass/dart-sass @@ -10,7 +10,7 @@ environment: sdk: ">=3.0.0 <4.0.0" dependencies: - sass: 1.77.0 + sass: 1.77.1 dev_dependencies: dartdoc: ^6.0.0 diff --git a/pubspec.yaml b/pubspec.yaml index 8bc82a811..4ecb69a9a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.77.0 +version: 1.77.1 description: A Sass implementation in Dart. homepage: https://github.com/sass/dart-sass