Skip to content

Commit bd80c58

Browse files
authoredDec 5, 2023
Make LazyFileSpans work in JavaScript (#2142)
Closes #1952
1 parent 13830a5 commit bd80c58

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed
 

‎CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 1.69.6
2+
3+
### JS API
4+
5+
* Fix a bug where certain exceptions could produce `SourceSpan`s that didn't
6+
follow the documented `SourceSpan` API.
7+
18
## 1.69.5
29

310
### JS API

‎lib/src/js/source_span.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import 'package:source_span/source_span.dart';
66

7+
import '../util/lazy_file_span.dart';
78
import '../util/multi_span.dart';
89
import '../util/nullable.dart';
910
import 'reflection.dart';
@@ -14,8 +15,9 @@ import 'utils.dart';
1415
void updateSourceSpanPrototype() {
1516
var span = SourceFile.fromString('').span(0);
1617
var multiSpan = MultiSpan(span, '', {});
18+
var lazySpan = LazyFileSpan(() => span);
1719

18-
for (var item in [span, multiSpan]) {
20+
for (var item in [span, multiSpan, lazySpan]) {
1921
getJSClass(item).defineGetters({
2022
'start': (FileSpan span) => span.start,
2123
'end': (FileSpan span) => span.end,

‎pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.69.5
2+
version: 1.69.6-dev
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)
Please sign in to comment.