Skip to content

Commit 7f63901

Browse files
authored
Merge pull request #1200 from UdashFramework/scala-2.13.13
Scala 2.13.13
2 parents d1fe4a8 + 6eed6f0 commit 7f63901

File tree

12 files changed

+39
-52
lines changed

12 files changed

+39
-52
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
scala: [ 2.13.12 ]
21+
scala: [ 2.13.13 ]
2222
command: [ udash-jvm/test, udash-js/test, guide-selenium/test ]
2323
steps:
2424
- uses: actions/checkout@v3

bootstrap4/.js/src/main/scala/io/udash/bootstrap/UdashBootstrap.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ object UdashBootstrap {
99
final val True: ReadableProperty[Boolean] = true.toProperty
1010
final val ColorSecondary: ReadableProperty[BootstrapStyles.Color] = BootstrapStyles.Color.Secondary.toProperty
1111
private final val NoneProperty = scala.None.toProperty
12-
def None[A]: ReadableProperty[Option[A]] = NoneProperty.asInstanceOf[ReadableProperty[Option[A]]]
12+
def None[A]: ReadableProperty[Option[A]] = NoneProperty
1313

1414
/** Loads FontAwesome styles. */
1515
def loadFontAwesome(): Element =

bootstrap4/.js/src/test/scala/io/udash/bootstrap/carousel/UdashCarouselTest.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,13 +134,13 @@ class UdashCarouselTest extends AsyncUdashCoreFrontendTest {
134134
var changedEvent: CarouselEvent[UdashCarouselSlide, ReadableProperty[UdashCarouselSlide]] = null
135135
carousel.listen {
136136
case ev@CarouselEvent(_, _, _, false) =>
137-
changeEvent = ev.asInstanceOf[CarouselEvent[UdashCarouselSlide, ReadableProperty[UdashCarouselSlide]]]
137+
changeEvent = ev
138138
case ev@CarouselEvent(_, _, _, true) =>
139-
changedEvent = ev.asInstanceOf[CarouselEvent[UdashCarouselSlide, ReadableProperty[UdashCarouselSlide]]]
139+
changedEvent = ev
140140
}
141141
carousel.goTo(5)
142-
retrying(changeEvent shouldBe CarouselEvent(carousel, 5, CarouselEvent.Direction.Left, false))
143-
retrying(changedEvent shouldBe CarouselEvent(carousel, 5, CarouselEvent.Direction.Left, true))
142+
retrying(changeEvent shouldBe CarouselEvent(carousel, 5, CarouselEvent.Direction.Left, changed = false))
143+
retrying(changedEvent shouldBe CarouselEvent(carousel, 5, CarouselEvent.Direction.Left, changed = true))
144144
retrying(carousel.activeSlide.get shouldBe 5)
145145
}
146146

core/.js/src/test/scala/io/udash/bindings/TagsBindingTest.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,11 +1686,11 @@ class TagsBindingTest extends UdashFrontendTest with Bindings { bindings: Bindin
16861686
done.listenStructure(p => patches += p)
16871687

16881688
todos.set(Seq(
1689-
Todo("A", false),
1690-
Todo("B", false),
1691-
Todo("C", false),
1692-
Todo("D", false),
1693-
Todo("E", false)
1689+
Todo("A", completed = false),
1690+
Todo("B", completed = false),
1691+
Todo("C", completed = false),
1692+
Todo("D", completed = false),
1693+
Todo("E", completed = false),
16941694
))
16951695

16961696
patches.size should be(0)

core/src/test/scala/io/udash/properties/SeqPropertyTest.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -706,11 +706,11 @@ class SeqPropertyTest extends UdashCoreTest {
706706
filtered.listen(_ => ())
707707

708708
val s = Seq(
709-
D("A", false),
710-
D("B", false),
711-
D("C", false),
712-
D("D", false),
713-
D("E", false)
709+
D("A", b = false),
710+
D("B", b = false),
711+
D("C", b = false),
712+
D("D", b = false),
713+
D("E", b = false),
714714
)
715715

716716
ts.set(s)

guide/guide/.js/src/main/scala/io/udash/web/guide/views/frontend/FrontendRoutingView.scala

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,16 @@ import io.udash._
44
import io.udash.auth.{UnauthenticatedException, UnauthorizedException}
55
import io.udash.bootstrap.utils.BootstrapStyles
66
import io.udash.css.CssView
7-
import io.udash.web.commons.components.{CodeBlock, ForceBootstrap}
7+
import io.udash.utils.URLEncoder
8+
import io.udash.web.commons.components.ForceBootstrap
89
import io.udash.web.commons.styles.GlobalStyles
10+
import io.udash.web.guide._
911
import io.udash.web.guide.demos.AutoDemo
1012
import io.udash.web.guide.styles.partials.GuideStyles
1113
import io.udash.web.guide.views.References
12-
import io.udash.web.guide.{Context, _}
1314
import org.scalajs.dom
1415
import scalatags.JsDom
1516

16-
import scala.scalajs.js
17-
1817
case object FrontendRoutingViewFactory extends ViewFactory[FrontendRoutingState] {
1918
override def create(): (View, Presenter[FrontendRoutingState]) = {
2019
val url = Property.blank[String]
@@ -23,13 +22,16 @@ case object FrontendRoutingViewFactory extends ViewFactory[FrontendRoutingState]
2322
}
2423

2524
class FrontendRoutingPresenter(url: Property[String]) extends Presenter[FrontendRoutingState] {
25+
2626
import Context.applicationInstance
27+
2728
override def handleState(state: FrontendRoutingState) = {
2829
url.set(applicationInstance.currentUrl.value)
2930
}
3031
}
3132

3233
class FrontendRoutingView(url: Property[String]) extends View with CssView {
34+
3335
import Context._
3436
import JsDom.all._
3537
import com.avsystem.commons.SharedExtensions.universalOps
@@ -219,14 +221,12 @@ class FrontendRoutingView(url: Property[String]) extends View with CssView {
219221
size = BootstrapStyles.SpacingSize.Normal
220222
))(input(
221223
BootstrapStyles.Form.control, id := "url-demo-link-input", value := "",
222-
placeholder := "Type something in this field and look at the URL...", onkeyup :+= ((event: dom.Event) => {
224+
placeholder := "Type something in this field and look at the URL...", onkeyup :+= { (event: dom.Event) =>
223225
applicationInstance.goTo(FrontendRoutingState(
224-
Some(js.Dynamic.global
225-
.encodeURIComponent(event.target.asInstanceOf[dom.html.Input].value)
226-
.asInstanceOf[String])
226+
Some(URLEncoder.encode(event.target.asInstanceOf[dom.html.Input].value, spaceAsPlus = false))
227227
))
228228
true
229-
})
229+
}
230230
)),
231231
p("This view was created with: ", span(id := "url-demo-link-init")(applicationInstance.currentUrl.value))
232232
)

guide/homepage/.js/src/main/scala/io/udash/web/homepage/components/demo/DemoComponent.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ final class DemoComponent(implicit application: Application[RoutingState]) exten
3636
)
3737
}.toSeq
3838
),
39-
produce(application.currentStateProperty) { state =>
40-
state.opt.collect { case state: IndexState => code(state.codeDemo).setup(Prism.highlightAllUnder) }.getOrElse[Element](div().render)
39+
produce(application.currentStateProperty) {
40+
case state: IndexState => code(state.codeDemo).setup(Prism.highlightAllUnder)
41+
case _ => div().render
4142
}
4243
)
4344
).render
44-
}
45+
}

project/Dependencies.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import sbt.*
55
import sbt.Keys.scalaVersion
66

77
object Dependencies {
8-
val versionOfScala = "2.13.12" //update .github/workflows/ci.yml as well
8+
val versionOfScala = "2.13.13" //update .github/workflows/ci.yml as well
99

1010
val jqueryWrapperVersion = "3.3.0"
1111

@@ -14,7 +14,7 @@ object Dependencies {
1414
val scalaCssVersion = "1.0.0"
1515

1616
val servletVersion = "4.0.1"
17-
val avsCommonsVersion = "2.13.3"
17+
val avsCommonsVersion = "2.14.0"
1818

1919
val atmosphereJSVersion = "3.1.3"
2020
val atmosphereVersion = "2.7.10"

rest/src/main/scala/io/udash/rest/openapi/OpenApi.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ final case class Schema(
247247
@td uniqueItems: Boolean = false,
248248

249249
@td properties: Map[String, RefOr[Schema]] = Map.empty,
250-
@td additionalProperties: AdditionalProperties = AdditionalProperties.Flag(true),
250+
@td additionalProperties: AdditionalProperties = AdditionalProperties.Flag(value = true),
251251
@td maxProperties: OptArg[Int] = OptArg.Empty,
252252
@td minProperties: OptArg[Int] = OptArg.Empty,
253253
@td required: List[String] = Nil,
@@ -295,7 +295,7 @@ object Schema extends HasGenObjectCodec[Schema] {
295295
def enumMapOf(keys: List[String], value: RefOr[Schema]): Schema =
296296
Schema(`type` = DataType.Object,
297297
properties = keys.iterator.map(k => (k, value)).toMap,
298-
additionalProperties = AdditionalProperties.Flag(false)
298+
additionalProperties = AdditionalProperties.Flag(value = false)
299299
)
300300

301301
def nullable(schema: RefOr[Schema]): Schema = schema match {

rest/src/main/scala/io/udash/rest/openapi/OpenApiMetadata.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ final case class OpenApiParamInfo[T](
275275

276276
@bincompat private[rest] def this(
277277
name: String, whenAbsentInfo: Opt[WhenAbsentInfo[T]], flags: ParamFlags, restSchema: RestSchema[T]
278-
) = this(name, whenAbsentInfo, false, flags, restSchema)
278+
) = this(name, whenAbsentInfo, optional = false, flags, restSchema)
279279
}
280280

281281
final case class OpenApiParameter[T](

0 commit comments

Comments
 (0)