Skip to content

Commit 7004d49

Browse files
stofnex3
andauthored
Fix the tracking of variable nodes for scopes (#1681)
Co-authored-by: Natalie Weizenbaum <[email protected]>
1 parent 0c24114 commit 7004d49

File tree

6 files changed

+15
-4
lines changed

6 files changed

+15
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 1.51.1
2+
3+
* Fix an issue where source locations tracked through variable references could
4+
potentially become incorrect.
5+
16
## 1.51.0
27

38
* **Potentially breaking change**: Change the order of maps returned by

lib/src/async_environment.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,7 @@ class AsyncEnvironment {
773773
for (var name in _variables.removeLast().keys) {
774774
_variableIndices.remove(name);
775775
}
776+
_variableNodes.removeLast();
776777
for (var name in _functions.removeLast().keys) {
777778
_functionIndices.remove(name);
778779
}

lib/src/environment.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// DO NOT EDIT. This file was generated from async_environment.dart.
66
// See tool/grind/synchronize.dart for details.
77
//
8-
// Checksum: 6b97030ff074d0b39e027ea97ba5893d242b9d3d
8+
// Checksum: 88f81b417129a74e4eb776d518c8e019dbf2ec36
99
//
1010
// ignore_for_file: unused_import
1111

@@ -779,6 +779,7 @@ class Environment {
779779
for (var name in _variables.removeLast().keys) {
780780
_variableIndices.remove(name);
781781
}
782+
_variableNodes.removeLast();
782783
for (var name in _functions.removeLast().keys) {
783784
_functionIndices.remove(name);
784785
}

pkg/sass_api/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.0-beta.44
2+
3+
* No user-visible changes.
4+
15
## 1.0.0-beta.43
26

37
* No user-visible changes.

pkg/sass_api/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ name: sass_api
22
# Note: Every time we add a new Sass AST node, we need to bump the *major*
33
# version because it's a breaking change for anyone who's implementing the
44
# visitor interface(s).
5-
version: 1.0.0-beta.43
5+
version: 1.0.0-beta.44
66
description: Additional APIs for Dart Sass.
77
homepage: https://github.com/sass/dart-sass
88

99
environment:
1010
sdk: '>=2.12.0 <3.0.0'
1111

1212
dependencies:
13-
sass: 1.51.0
13+
sass: 1.51.1
1414

1515
dependency_overrides:
1616
sass: {path: ../..}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass
2-
version: 1.51.0
2+
version: 1.51.1-dev
33
description: A Sass implementation in Dart.
44
homepage: https://github.com/sass/dart-sass
55

0 commit comments

Comments
 (0)