File tree 4 files changed +21
-2
lines changed
test/migrators/module/built_in_functions
4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change
1
+ ## 1.2.5
2
+
3
+ ### Module Migrator
4
+
5
+ * The migrator now properly migrates built-in function calls with underscores
6
+ (e.g. ` map_get ` ).
7
+
1
8
## 1.2.4
2
9
3
10
### Module Migrator
Original file line number Diff line number Diff line change @@ -300,7 +300,7 @@ class _ReferenceVisitor extends RecursiveAstVisitor {
300
300
for (var function in functions) {
301
301
if (_isCssCompatibilityOverload (function)) continue ;
302
302
if (function.name.asPlain == null ) continue ;
303
- var name = function.name.asPlain;
303
+ var name = function.name.asPlain. replaceAll ( '_' , '-' ) ;
304
304
var module = builtInFunctionModules[name];
305
305
if (module != null ) _sources[function] = BuiltInSource (module);
306
306
}
Original file line number Diff line number Diff line change 1
1
name : sass_migrator
2
- version : 1.2.4
2
+ version : 1.2.5
3
3
description : A tool for running migrations on Sass files
4
4
author :
Jennifer Thakar <[email protected] >
5
5
homepage : https://github.com/sass/migrator
Original file line number Diff line number Diff line change
1
+ <==> input/entrypoint.scss
2
+ $a: map_get((a: 1), a);
3
+ $b: str_length("hello");
4
+ $c: scale_color(blue, $lightness: -10%);
5
+
6
+ <==> output/entrypoint.scss
7
+ @use "sass:color";
8
+ @use "sass:map";
9
+ @use "sass:string";
10
+ $a: map.get((a: 1), a);
11
+ $b: string.length("hello");
12
+ $c: color.scale(blue, $lightness: -10%);
You can’t perform that action at this time.
0 commit comments