Skip to content

Commit

Permalink
Merge pull request #104 from xuwei-k/default-scalameta-version
Browse files Browse the repository at this point in the history
change default scalameta version
  • Loading branch information
xuwei-k authored Mar 10, 2024
2 parents 633347c + 7f1fd4a commit 135145f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
3 changes: 1 addition & 2 deletions localServer/src/test/resources/raw.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Defn.Def(
Defn.Def.After_4_7_3(
Nil,
Term.Name("a"),
Nil,
Nil,
None,
Term.Name("b")
)
Expand Down
3 changes: 1 addition & 2 deletions localServer/src/test/resources/semantic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ class Example extends SemanticRule("Example") {
doc: SemanticDocument
): Patch = {
doc.tree.collect {
case t @ Defn.Def(
case t @ Defn.Def.After_4_7_3(
Nil,
Term.Name("a"),
Nil,
Nil,
None,
Term.Name("b")
) =>
Expand Down
3 changes: 1 addition & 2 deletions localServer/src/test/resources/syntactic.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@ class Example extends SyntacticRule("Example") {
doc: SyntacticDocument
): Patch = {
doc.tree.collect {
case t @ Defn.Def(
case t @ Defn.Def.After_4_7_3(
Nil,
Term.Name("a"),
Nil,
Nil,
None,
Term.Name("b")
) =>
Expand Down
12 changes: 7 additions & 5 deletions localServer/src/test/scala/scalameta_ast/IntegrationTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,16 @@ abstract class IntegrationTest(browserType: Playwright => BrowserType) extends A
"change input" in withBrowser { page =>
setInput(page, "class A")
val expect = Seq(
"""Defn.Class(""",
"""Defn.Class.After_4_6_0(""",
""" Nil,""",
""" Type.Name("A"),""",
""" Nil,""",
""" Ctor.Primary(Nil, Name(""), Nil),""",
""" Template(""",
""" Type.ParamClause(Nil),""",
""" Ctor.Primary""",
""" .After_4_6_0(Nil, Name.Anonymous(), Nil),""",
""" Template.After_4_4_0(""",
""" Nil,""",
""" Nil,""",
""" Self(Name(""), None),""",
""" Self(Name.Anonymous(), None),""",
""" Nil,""",
""" Nil""",
""" )""",
Expand Down Expand Up @@ -278,6 +279,7 @@ abstract class IntegrationTest(browserType: Playwright => BrowserType) extends A
}

"Initial extractor" in withBrowser { page =>
page.selectOption("select#scalameta", "scalafix")
changeOutputType(page, "raw")
setScalafmtConfig(
page,
Expand Down
2 changes: 2 additions & 0 deletions sources/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ $(() => {
"selected",
true,
);
} else {
$(`[name="scalameta"] option[value="latest"]`).prop("selected", true);
}

if (savedPatch != null) {
Expand Down

0 comments on commit 135145f

Please sign in to comment.