From 6d8ee18f015a3ebceee5363443b6e58d64f1a4e3 Mon Sep 17 00:00:00 2001
From: Dawid Dworak <dawid.dworak@gmail.com>
Date: Mon, 25 Oct 2021 16:12:15 +0200
Subject: [PATCH 1/3] Towards 3.3.0

---
 build.sbt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build.sbt b/build.sbt
index f00c61c..5259e63 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,7 +1,7 @@
 name := "udash-jquery"
 
 inThisBuild(Seq(
-  version := "3.2.0",
+  version := "3.3.0-SNAPSHOT",
   organization := "io.udash",
 ))
 

From ad6342a6c5954618a93d47b2aad3d9699e097998 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bart=C5=82omiej=20Kozak?=
 <64359735+halotukozak@users.noreply.github.com>
Date: Wed, 4 Oct 2023 10:38:00 +0200
Subject: [PATCH 2/3] upgrade jQuery to 3.6.4 (#33)

* upgrade jQuery to 3.6.4 due to CVE-2020-11022, CVE-2020-23064, CVE-2020-11023 vulnerabilities

* upgrade scalaJs, add jQuery methods

* upgrade webpack to 5.75.0

* move webpack version declaration

* add "even/odd matching element" test case

* refactor test

* refactor test
---
 README.md                                        |  2 +-
 build.sbt                                        |  7 ++++---
 project/build.properties                         |  2 +-
 project/plugins.sbt                              |  4 ++--
 .../scala/io/udash/wrappers/jquery/JQuery.scala  |  8 ++++++++
 .../wrappers/jquery_test/TraversingTest.scala    | 16 ++++++++++++++++
 6 files changed, 32 insertions(+), 7 deletions(-)

diff --git a/README.md b/README.md
index 32fdc79..b794ab8 100644
--- a/README.md
+++ b/README.md
@@ -10,7 +10,7 @@ Static types for the jQuery API for [Scala.js](http://www.scala-js.org/) program
 Add the following dependency to your SBT build:
 
 ```scala
-libraryDependencies += "io.udash" %%% "udash-jquery" % "3.0.4"
+libraryDependencies += "io.udash" %%% "udash-jquery" % "3.2.0"
 ```
 
 then import the jQuery package: 
diff --git a/build.sbt b/build.sbt
index 5259e63..6d600cf 100644
--- a/build.sbt
+++ b/build.sbt
@@ -33,6 +33,7 @@ val commonJSSettings = Seq(
     val githubDir = "https://raw.githubusercontent.com/UdashFramework/scala-js-jquery"
     s"-P:scalajs:mapSourceURI:$localDir->$githubDir/v${version.value}/"
   },
+  webpack / version := "5.75.0", // TODO: can be removed when sbt-scalajs-bundler > 0.21.1
 )
 
 val deploymentConfiguration = Seq(
@@ -80,11 +81,11 @@ lazy val root = project.in(file("."))
     deploymentConfiguration,
 
     libraryDependencies ++= Seq(
-      "org.scala-js" %%% "scalajs-dom" % "2.0.0",
+      "org.scala-js" %%% "scalajs-dom" % "2.7.0",
       "org.scalatest" %%% "scalatest" % "3.2.9" % Test,
       "com.lihaoyi" %%% "scalatags" % "0.10.0" % Test
     ),
 
-    Compile / npmDependencies += "jquery" -> "3.4.1",
-    jsDependencies += "org.webjars" % "jquery" % "3.4.1" / "3.4.1/jquery.js" minified s"3.4.1/jquery.min.js",
+    Compile / npmDependencies += "jquery" -> "3.6.4",
+    jsDependencies += "org.webjars" % "jquery" % "3.6.4" / "3.6.4/jquery.js" minified s"3.6.4/jquery.min.js",
   )
diff --git a/project/build.properties b/project/build.properties
index e9db047..657d488 100755
--- a/project/build.properties
+++ b/project/build.properties
@@ -1,2 +1,2 @@
 # suppress inspection "UnusedProperty"
-sbt.version=1.5.5
\ No newline at end of file
+sbt.version=1.9.2
\ No newline at end of file
diff --git a/project/plugins.sbt b/project/plugins.sbt
index fa81d0b..6e5469d 100755
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,7 +1,7 @@
 logLevel := Level.Warn
 
-addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.0")
-addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.20.0")
+addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2")
+addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.21.1")
 addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
 
 // Deployment configuration
diff --git a/src/main/scala/io/udash/wrappers/jquery/JQuery.scala b/src/main/scala/io/udash/wrappers/jquery/JQuery.scala
index 8218c5a..89f1be9 100644
--- a/src/main/scala/io/udash/wrappers/jquery/JQuery.scala
+++ b/src/main/scala/io/udash/wrappers/jquery/JQuery.scala
@@ -164,6 +164,10 @@ trait JQuery extends js.Object {
   @JSName("eq")
   def at(index: Int): JQuery = js.native
 
+  /** Reduce the set of matched elements to the even ones in the set, numbered from zero. <br/>
+   * See: <a href="http://api.jquery.com/even/">jQuery Docs</a> */
+  def even(): JQuery = js.native
+
   /** Display the matched elements by fading them to opaque. <br/>
     * See: <a href="http://api.jquery.com/fadeIn/">jQuery Docs</a> */
   def fadeIn(duration: Int = js.native, easing: EasingFunction = js.native): JQuery = js.native
@@ -381,6 +385,10 @@ trait JQuery extends js.Object {
     * See: <a href="http://api.jquery.com/not/">jQuery Docs</a> */
   def not(el: Element*): JQuery = js.native
 
+  /** Reduce the set of matched elements to the odd ones in the set, numbered from zero. <br/>
+   * See: <a href="http://api.jquery.com/odd/">jQuery Docs</a> */
+  def odd(): JQuery = js.native
+
   /** Remove an event handler. <br/>
     * See: <a href="http://api.jquery.com/off/">jQuery Docs</a> */
   def off(): JQuery = js.native
diff --git a/src/test/scala/io/udash/wrappers/jquery_test/TraversingTest.scala b/src/test/scala/io/udash/wrappers/jquery_test/TraversingTest.scala
index 82116cf..2ff1b89 100644
--- a/src/test/scala/io/udash/wrappers/jquery_test/TraversingTest.scala
+++ b/src/test/scala/io/udash/wrappers/jquery_test/TraversingTest.scala
@@ -166,5 +166,21 @@ class TraversingTest extends AnyWordSpec with Matchers {
       root.children("a").first().length should be(0)
       root.children("a").last().length should be(0)
     }
+
+    "even/odd matching element" in {
+      val dom = div(
+        span("0"),
+        span("1"),
+        span("2"),
+        span("3"),
+        span("4"),
+        span("5"),
+      ).render
+
+      val root = jQ(dom)
+      root.children("span").even().text() shouldBe "024"
+      root.children("span").odd().text() shouldBe "135"
+    }
+
   }
 }

From 4fd23a31e75c90bfbf4e6f5302e8f84a9c494244 Mon Sep 17 00:00:00 2001
From: Dawid Dworak <dawid.dworak@gmail.com>
Date: Wed, 4 Oct 2023 10:48:58 +0200
Subject: [PATCH 3/3] Prepare 3.3.0 release

---
 .github/workflows/ci.yml | 2 +-
 README.md                | 6 +++---
 build.sbt                | 3 +--
 project/build.properties | 2 +-
 project/plugins.sbt      | 2 +-
 5 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 7a13e3a..cf04a0d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -18,7 +18,7 @@ jobs:
     strategy:
       fail-fast: false
       matrix:
-        scala: [ 2.12.14, 2.13.6 ]
+        scala: [ 2.13.12 ]
         command: [ test ]
     steps:
       - uses: actions/checkout@v2
diff --git a/README.md b/README.md
index b794ab8..f5492de 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
 # udash-jquery [<img align="right" height="50px" src="https://avsystem.github.io/Anjay-doc/_images/avsystem_logo.png">](http://www.avsystem.com/)
-![Build Status](https://github.com/UdashFramework/scala-js-jquery.svg/workflows/CI/badge.svg?branch=master&event=push)
-[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.udash/udash-jquery_sjs1_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.udash/udash-jquery_sjs1_2.13)
+
+[![CI](https://github.com/UdashFramework/scala-js-jquery/actions/workflows/ci.yml/badge.svg)](https://github.com/UdashFramework/scala-js-jquery/actions/workflows/ci.yml)[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.udash/udash-jquery_sjs1_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.udash/udash-jquery_sjs1_2.13)
 [![Join the chat at https://gitter.im/UdashFramework/scala-js-jquery](https://badges.gitter.im/UdashFramework/scala-js-jquery.svg)](https://gitter.im/UdashFramework/scala-js-jquery?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
 
 Static types for the jQuery API for [Scala.js](http://www.scala-js.org/) programs. 
@@ -10,7 +10,7 @@ Static types for the jQuery API for [Scala.js](http://www.scala-js.org/) program
 Add the following dependency to your SBT build:
 
 ```scala
-libraryDependencies += "io.udash" %%% "udash-jquery" % "3.2.0"
+libraryDependencies += "io.udash" %%% "udash-jquery" % "3.3.0"
 ```
 
 then import the jQuery package: 
diff --git a/build.sbt b/build.sbt
index 6d600cf..065d200 100644
--- a/build.sbt
+++ b/build.sbt
@@ -6,8 +6,7 @@ inThisBuild(Seq(
 ))
 
 val commonSettings = Seq(
-  scalaVersion := "2.13.6",
-  crossScalaVersions := Seq("2.13.6", "2.12.15"),
+  scalaVersion := "2.13.12",
   scalacOptions ++= Seq(
     "-feature",
     "-deprecation",
diff --git a/project/build.properties b/project/build.properties
index 657d488..ff95dc2 100755
--- a/project/build.properties
+++ b/project/build.properties
@@ -1,2 +1,2 @@
 # suppress inspection "UnusedProperty"
-sbt.version=1.9.2
\ No newline at end of file
+sbt.version=1.9.6
\ No newline at end of file
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 6e5469d..fa4a47a 100755
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -1,6 +1,6 @@
 logLevel := Level.Warn
 
-addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2")
+addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0")
 addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.21.1")
 addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
 
