Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set LegacyResult.map to undefined rather than null #1592

Merged
merged 2 commits into from Jan 10, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions 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
Expand Down
2 changes: 1 addition & 1 deletion lib/src/node/legacy.dart
Expand Up @@ -357,7 +357,7 @@ RenderResult _newRenderResult(
var end = DateTime.now();

var css = result.css;
Uint8List? sourceMapBytes;
Uint8List? sourceMapBytes = undefined;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be dynamic to satisfy the type checker since undefined isn't null.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, right, I guess pulyaevskiy/node-interop#109 hasn't been released yet.

if (_enableSourceMaps(options)) {
var sourceMapOption = options.sourceMap;
var sourceMapPath =
Expand Down
2 changes: 1 addition & 1 deletion 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

Expand Down