Skip to content

Commit 5449275

Browse files
committed
Use generic "private" prefix instead of generated variable counter
1 parent 91640f3 commit 5449275

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## 2.3.3
2+
3+
### Module System Migration
4+
5+
* Fix some bugs in the conversion of private names that are references across
6+
files to public names, especially when `--remove-prefix` and/or multiple
7+
leading dashes/underscores are involved.
8+
19
## 2.3.2
210

311
* Update to be compatible with the latest version of the Dart Sass AST.

lib/src/migrators/module.dart

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ class _ModuleMigrationVisitor extends MigrationVisitor {
192192
"Can't access _configuredVariables when not visiting a dependency."));
193193
Set<MemberDeclaration<VariableDeclaration>>? __configuredVariables;
194194

195-
/// The number of variables that have been generated from whole cloth.
196-
var _generatedVariables = 0;
197-
198195
/// A mapping between member declarations and references.
199196
///
200197
/// This performs an initial pass to determine how a declaration seen in the
@@ -384,8 +381,7 @@ class _ModuleMigrationVisitor extends MigrationVisitor {
384381
}
385382
}
386383

387-
_generatedVariables++;
388-
return 'var${_generatedVariables}';
384+
return 'private$identifier';
389385
}
390386
return identifier;
391387
}

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: sass_migrator
2-
version: 2.3.2
2+
version: 2.3.3
33
description: A tool for running migrations on Sass files
44
homepage: https://github.com/sass/migrator
55

0 commit comments

Comments
 (0)