Skip to content

Commit

Permalink
Fix the tracking of variable nodes for scopes (#1681)
Browse files Browse the repository at this point in the history
Co-authored-by: Natalie Weizenbaum <nweiz@google.com>
  • Loading branch information
stof and nex3 committed Apr 26, 2022
1 parent 0c24114 commit 7004d49
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,8 @@
## 1.51.1

* Fix an issue where source locations tracked through variable references could
potentially become incorrect.

## 1.51.0

* **Potentially breaking change**: Change the order of maps returned by
Expand Down
1 change: 1 addition & 0 deletions lib/src/async_environment.dart
Expand Up @@ -773,6 +773,7 @@ class AsyncEnvironment {
for (var name in _variables.removeLast().keys) {
_variableIndices.remove(name);
}
_variableNodes.removeLast();
for (var name in _functions.removeLast().keys) {
_functionIndices.remove(name);
}
Expand Down
3 changes: 2 additions & 1 deletion lib/src/environment.dart
Expand Up @@ -5,7 +5,7 @@
// DO NOT EDIT. This file was generated from async_environment.dart.
// See tool/grind/synchronize.dart for details.
//
// Checksum: 6b97030ff074d0b39e027ea97ba5893d242b9d3d
// Checksum: 88f81b417129a74e4eb776d518c8e019dbf2ec36
//
// ignore_for_file: unused_import

Expand Down Expand Up @@ -779,6 +779,7 @@ class Environment {
for (var name in _variables.removeLast().keys) {
_variableIndices.remove(name);
}
_variableNodes.removeLast();
for (var name in _functions.removeLast().keys) {
_functionIndices.remove(name);
}
Expand Down
4 changes: 4 additions & 0 deletions pkg/sass_api/CHANGELOG.md
@@ -1,3 +1,7 @@
## 1.0.0-beta.44

* No user-visible changes.

## 1.0.0-beta.43

* No user-visible changes.
Expand Down
4 changes: 2 additions & 2 deletions pkg/sass_api/pubspec.yaml
Expand Up @@ -2,15 +2,15 @@ name: sass_api
# Note: Every time we add a new Sass AST node, we need to bump the *major*
# version because it's a breaking change for anyone who's implementing the
# visitor interface(s).
version: 1.0.0-beta.43
version: 1.0.0-beta.44
description: Additional APIs for Dart Sass.
homepage: https://github.com/sass/dart-sass

environment:
sdk: '>=2.12.0 <3.0.0'

dependencies:
sass: 1.51.0
sass: 1.51.1

dependency_overrides:
sass: {path: ../..}
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,5 +1,5 @@
name: sass
version: 1.51.0
version: 1.51.1-dev
description: A Sass implementation in Dart.
homepage: https://github.com/sass/dart-sass

Expand Down

0 comments on commit 7004d49

Please sign in to comment.