Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change default scalameta version #104

Merged
merged 1 commit into from
Mar 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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