diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dd056929..7ab247d4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.45.3 + +### JS API + +* **Potentially breaking bug fix:** Match the specification of the new JS API by + passing `undefined` rather than `null` to `Logger.warn()` for an unset `span`. + ## 1.45.2 ### JS API diff --git a/lib/src/logger/node_to_dart.dart b/lib/src/logger/node_to_dart.dart index 93a0a4b3e..bb16798fc 100644 --- a/lib/src/logger/node_to_dart.dart +++ b/lib/src/logger/node_to_dart.dart @@ -2,6 +2,7 @@ // MIT-style license that can be found in the LICENSE file or at // https://opensource.org/licenses/MIT. +import 'package:node_interop/js.dart'; import 'package:source_span/source_span.dart'; import 'package:stack_trace/stack_trace.dart'; import 'package:term_glyph/term_glyph.dart' as glyph; @@ -38,7 +39,9 @@ class NodeToDartLogger implements Logger { warn( message, WarnOptions( - span: span, stack: trace.toString(), deprecation: deprecation)); + span: span ?? (undefined as SourceSpan?), + stack: trace.toString(), + deprecation: deprecation)); } } diff --git a/pubspec.yaml b/pubspec.yaml index 2bd409d5d..96a16cc63 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.45.2 +version: 1.45.3 description: A Sass implementation in Dart. homepage: https://github.com/sass/dart-sass