Skip to content

Commit 9edbc4d

Browse files
authored
Update migration.toml to fix invalid conversion (#174)
* Update migration.toml to fix invalid conversion * fix Math.abs_float
1 parent 4e73a95 commit 9edbc4d

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

migration/migration.toml

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,13 @@ rewrite="String.slice(~start=:[from], ~end=:[to])"
6969
match="Js.String2.sliceToEnd(~from=:[from])"
7070
rewrite="String.sliceToEnd(~start=:[from])"
7171

72-
[string-a-replace]
72+
[string-a-replace-a]
73+
match="Js.String2.replaceByRe"
74+
rewrite="String.replaceRegExp"
75+
76+
[string-a-replace-b]
7377
match="Js.String2.replace"
74-
rewrite="String.replaceString"
78+
rewrite="String.replace"
7579

7680
[string-a-substring]
7781
match="Js.String2.substring(~from=:[from], ~to_=:[to])"
@@ -297,10 +301,26 @@ rewrite="Math.max"
297301
match="Math.min_float"
298302
rewrite="Math.min"
299303

304+
[math-a-g]
305+
match="Math.abs_int"
306+
rewrite="Math.Int.abs"
307+
308+
[math-a-h]
309+
match="Math.abs_float"
310+
rewrite="Math.abs"
311+
300312
## BELT
301313
## Below are migrations that cover moving from Belt to equivalents
302314
## available in the new stdlib.
303-
[belt-option]
315+
[belt-option-a-getWithDefault]
316+
match="Belt.Option.getWithDefault"
317+
rewrite="Option.getOr"
318+
319+
[belt-option-a-mapWithDefault]
320+
match="Belt.Option.mapWithDefault"
321+
rewrite="Option.mapOr"
322+
323+
[belt-option-z]
304324
match="Belt.Option"
305325
rewrite="Option"
306326

0 commit comments

Comments
 (0)