From 720c358c066e9aaef51bac3e2e193514987e2448 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 10 Jan 2022 14:16:27 -0800 Subject: [PATCH] Set LegacyResult.map to undefined rather than null (#1592) --- CHANGELOG.md | 7 +++++++ lib/src/node/legacy.dart | 5 ++++- pubspec.yaml | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e741408..2a14e78f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 1.47.1 + +### JS API + +* **Potentially breaking bug fix:** Match the specification of the new JS API by + setting `LegacyResult.map` to `undefined` rather than `null`. + ## 1.47.0 ### JS API diff --git a/lib/src/node/legacy.dart b/lib/src/node/legacy.dart index a4e32e49..ce3f0d56 100644 --- a/lib/src/node/legacy.dart +++ b/lib/src/node/legacy.dart @@ -357,7 +357,10 @@ RenderResult _newRenderResult( var end = DateTime.now(); var css = result.css; - Uint8List? sourceMapBytes; + // TODO(nweiz): Get rid of this cast once pulyaevskiy/node-interop#109 is + // released. + // ignore: prefer_void_to_null + Uint8List? sourceMapBytes = undefined as Null; if (_enableSourceMaps(options)) { var sourceMapOption = options.sourceMap; var sourceMapPath = diff --git a/pubspec.yaml b/pubspec.yaml index d1d44633..70ff2bf1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: sass -version: 1.47.0 +version: 1.47.1-dev description: A Sass implementation in Dart. homepage: https://github.com/sass/dart-sass