Skip to content

Commit

Permalink
Release 2.3.3
Browse files Browse the repository at this point in the history
- Mitigate crash due to OOBE in Semver by catching exceptions
- Upgrade dependencies
- Correctly install kotlinx.serialization
  • Loading branch information
WarningImHack3r committed Jun 15, 2024
1 parent feca977 commit cde041a
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
### Fixed

- Fix plugin hanging forever when trying to find a dependency's registry (#110)
- Mitigate crashes when checking version for some dependencies (#109)

## [2.3.2] - 2024-05-17

Expand Down
1 change: 1 addition & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ kotlin {
// Dependencies are managed with Gradle version catalog - read more: https://docs.gradle.org/current/userguide/platforms.html#sub:version-catalog
dependencies {
implementation(libs.semver4j)
implementation(libs.serialization)
}

// Configure Gradle IntelliJ Plugin - read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ platformVersion = 2022.1
platformPlugins =

# Gradle Releases -> https://github.com/gradle/gradle/releases
gradleVersion = 8.7
gradleVersion = 8.8

# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
kotlin.stdlib.default.dependency = false
Expand Down
6 changes: 4 additions & 2 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ semver4j = "5.3.0"

# plugins
kotlin = "1.9.24"
serialization = "1.6.3"
changelog = "2.2.0"
gradleIntelliJPlugin = "1.17.3"
gradleIntelliJPlugin = "1.17.4"
qodana = "2024.1.5"
kover = "0.8.0"
kover = "0.8.1"

[libraries]
semver4j = { group = "org.semver4j", name = "semver4j", version.ref = "semver4j" }
serialization = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "serialization" }

[plugins]
changelog = { id = "org.jetbrains.changelog", version.ref = "changelog" }
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,14 @@ class PackageUpdateChecker(private val project: Project) {
|| !newestVersion.satisfies(comparator)
) {
log.debug("Latest version $newestVersion is excluded, a beta, or does not satisfy the comparator")
val allVersions = npmjsClient.getAllVersions(packageName)?.mapNotNull { version ->
Semver.coerce(version)
}?.sortedDescending() ?: emptyList()
val allVersions = try {
npmjsClient.getAllVersions(packageName)?.mapNotNull { version ->
Semver.coerce(version)
}?.sortedDescending() ?: emptyList()
} catch (e: Exception) {
log.warn("Failed to get all versions for $packageName", e)
emptyList()
}

// Downgrade the latest version if it's filtered out
var latest: Semver? = null
Expand Down

0 comments on commit cde041a

Please sign in to comment.