Skip to content

chore: update all dependencies #12

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

Merged
merged 5 commits into from
Jan 13, 2025
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
11 changes: 7 additions & 4 deletions .github/workflows/scala.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: 'sbt'
- name: Install sbt
uses: sbt/setup-sbt@v1
- name: Cache Playwright drivers
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright/
key: ${{ runner.os }}-playwright-${{ hashFiles('**/pom.xml') }}
Expand All @@ -36,4 +38,5 @@ jobs:
- name: Run tests
run: sbt test
- name: Update Dependency Graph
uses: scalacenter/sbt-dependency-submission@v2
if: github.ref == 'refs/heads/main'
uses: scalacenter/sbt-dependency-submission@v3
77 changes: 39 additions & 38 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import sbtrelease.ReleasePlugin.autoImport.ReleaseTransformations.*
import xerial.sbt.Sonatype.*
organization := "io.github.gmkumar2005"
organizationName := "io.github.gmkumar2005"
scalaVersion := "2.12.18"
scalaVersion := "2.12.20"
sonatypeProfileName := "io.github.gmkumar2005"
versionScheme := Some("early-semver")
licenses := Seq(
Expand Down Expand Up @@ -32,40 +32,41 @@ developers := List(
//publishTo := Some(Resolver.file("local-ivy-repo", file(Path.userHome.absolutePath + "/.ivy2/local"))(Patterns(true, Resolver.mavenStyleBasePattern)))
//val localIvyRepo = Resolver.file("local-ivy-repo", file(Path.userHome.absolutePath + "/.ivy2/local"))(Patterns(true, Resolver.mavenStyleBasePattern))

lazy val root = (project in file("."))
.settings(
name := "scala-js-env-playwright",
libraryDependencies ++= Seq(
"com.microsoft.playwright" % "playwright" % "1.40.0",
"org.scala-js" %% "scalajs-js-envs" % "1.4.0",
"com.google.jimfs" % "jimfs" % "1.2",
"com.outr" %% "scribe" % "3.13.0",
"org.typelevel" %% "cats-effect" % "3.5.2",
"org.scala-js" %% "scalajs-js-envs-test-kit" % "1.4.0" % Test,
"com.novocode" % "junit-interface" % "0.11" % Test
),
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _)),
setNextVersion,
commitNextVersion
),
publishTo := {
val nexus = "https://s01.oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
// For all Sonatype accounts created on or after February 2021
sonatypeCredentialHost := "s01.oss.sonatype.org",
Test / parallelExecution := true,
Test / publishArtifact := false,
usePgpKeyHex("F7E440260BAE93EB4AD2723D6613CA76E011F638")
)
lazy val root = (project in file(".")).settings(
name := "scala-js-env-playwright",
libraryDependencies ++= Seq(
"com.microsoft.playwright" % "playwright" % "1.49.0",
"org.scala-js" %% "scalajs-js-envs" % "1.4.0",
"com.google.jimfs" % "jimfs" % "1.3.0",
"com.outr" %% "scribe" % "3.15.2",
"org.typelevel" %% "cats-effect" % "3.5.7",
"org.scala-js" %% "scalajs-js-envs-test-kit" % "1.4.0" % Test,
"com.novocode" % "junit-interface" % "0.11" % Test
),
javacOptions += "-nowarn",
javacOptions -= "-Werror",
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
setReleaseVersion,
commitReleaseVersion,
tagRelease,
ReleaseStep(action = Command.process("publishSigned", _)),
setNextVersion,
commitNextVersion
),
publishTo := {
val nexus = "https://s01.oss.sonatype.org/"
if (isSnapshot.value)
Some("snapshots" at nexus + "content/repositories/snapshots")
else
Some("releases" at nexus + "service/local/staging/deploy/maven2")
},
// For all Sonatype accounts created on or after February 2021
sonatypeCredentialHost := "s01.oss.sonatype.org",
Test / parallelExecution := true,
Test / publishArtifact := false,
usePgpKeyHex("F7E440260BAE93EB4AD2723D6613CA76E011F638")
)
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.7
sbt.version=1.10.7
11 changes: 0 additions & 11 deletions project/metals.sbt

This file was deleted.

14 changes: 8 additions & 6 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
val sbtTypelevelVersion = "0.6.4"
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.1")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.3.0")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9")
val sbtTypelevelVersion = "0.7.5"
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.3.0")
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.2")
addSbtPlugin("org.typelevel" % "sbt-typelevel" % sbtTypelevelVersion)
addSbtPlugin("org.typelevel" % "sbt-typelevel-scalafix" % sbtTypelevelVersion)
addSbtPlugin("org.typelevel" % "sbt-typelevel-site" % sbtTypelevelVersion)

addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "2.0.6")
12 changes: 0 additions & 12 deletions project/project/metals.sbt

This file was deleted.

18 changes: 7 additions & 11 deletions src/main/java/jsenv/DriverJar.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
public class DriverJar extends Driver {
private static final String PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD";
private static final String SELENIUM_REMOTE_URL = "SELENIUM_REMOTE_URL";
static final String PLAYWRIGHT_NODEJS_PATH = "PLAYWRIGHT_NODEJS_PATH";
private final Path driverTempDir;
private Path preinstalledNodePath;

Expand Down Expand Up @@ -68,7 +67,7 @@ protected void initialize(Boolean installBrowsers) throws Exception {
env.put(PLAYWRIGHT_NODEJS_PATH, preinstalledNodePath.toString());
}
extractDriverToTempDir();
logMessage("extracted driver from jar to " + driverPath());
logMessage("extracted driver from jar to " + driverDir());
if (installBrowsers)
installBrowsers(env);
}
Expand All @@ -79,14 +78,14 @@ private void installBrowsers(Map<String, String> env) throws IOException, Interr
skip = System.getenv(PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD);
}
if (skip != null && !"0".equals(skip) && !"false".equals(skip)) {
System.out.println("Skipping browsers download because `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` env variable is set");
logMessage("Skipping browsers download because `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD` env variable is set");
return;
}
if (env.get(SELENIUM_REMOTE_URL) != null || System.getenv(SELENIUM_REMOTE_URL) != null) {
logMessage("Skipping browsers download because `SELENIUM_REMOTE_URL` env variable is set");
return;
}
Path driver = driverPath();
Path driver = driverDir();
if (!Files.exists(driver)) {
throw new RuntimeException("Failed to find driver: " + driver);
}
Expand Down Expand Up @@ -119,7 +118,7 @@ private FileSystem initFileSystem(URI uri) throws IOException {
}

public static URI getDriverResourceURI() throws URISyntaxException {
// ClassLoader classloader = Thread.currentThread().getContextClassLoader();
// ClassLoader classloader = Thread.currentThread().getContextClassLoader();
ClassLoader classloader = DriverJar.class.getClassLoader();
return classloader.getResource("driver/" + platformDir()).toURI();
}
Expand All @@ -129,7 +128,7 @@ void extractDriverToTempDir() throws URISyntaxException, IOException {
URI uri = maybeExtractNestedJar(originalUri);

// Create zip filesystem if loading from jar.
FileSystem fileSystem = "jar".equals(uri.getScheme()) ? initFileSystem(uri) : null;
try (FileSystem fileSystem = "jar".equals(uri.getScheme()) ? initFileSystem(uri) : null) {
Path srcRoot = Paths.get(uri);
// jar file system's .relativize gives wrong results when used with
// spring-boot-maven-plugin, convert to the default filesystem to
Expand Down Expand Up @@ -159,8 +158,6 @@ void extractDriverToTempDir() throws URISyntaxException, IOException {
throw new RuntimeException("Failed to extract driver from " + uri + ", full uri: " + originalUri, e);
}
});
if (fileSystem != null) {
fileSystem.close();
}
}

Expand All @@ -175,8 +172,7 @@ private URI maybeExtractNestedJar(final URI uri) throws URISyntaxException {
}
String innerJar = String.join(JAR_URL_SEPARATOR, parts[0], parts[1]);
URI jarUri = new URI(innerJar);
try {
FileSystem fs = FileSystems.newFileSystem(jarUri, Collections.emptyMap());
try (FileSystem fs = FileSystems.newFileSystem(jarUri, Collections.emptyMap())) {
Path fromPath = Paths.get(jarUri);
Path toPath = driverTempDir.resolve(fromPath.getFileName().toString());
Files.copy(fromPath, toPath);
Expand Down Expand Up @@ -212,7 +208,7 @@ private static String platformDir() {
}

@Override
protected Path driverDir() {
public Path driverDir() {
return driverTempDir;
}
}
Loading