Skip to content

Commit

Permalink
Fix support for 2024.1 (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
WarningImHack3r authored Mar 15, 2024
1 parent 05f859d commit b463a3c
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@

- Improve caching introduced in 2.1.3

### Fixed

- Fix support for newer versions (2024.1+)

## [2.1.3] - 2024-02-01

### Added
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ pluginGroup = com.github.warningimhack3r.npmupdatedependencies
pluginName = npm-update-dependencies
pluginRepositoryUrl = https://github.com/WarningImHack3r/npm-update-dependencies
# SemVer format -> https://semver.org
pluginVersion = 2.1.3
pluginVersion = 2.1.4

# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
pluginSinceBuild = 221
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package com.github.warningimhack3r.npmupdatedependencies.ui.actions
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.actionSystem.DefaultActionGroup
import com.intellij.openapi.actionSystem.UpdateInBackground

class MainActionGroup : DefaultActionGroup() {
class MainActionGroup : DefaultActionGroup(), UpdateInBackground {
override fun update(e: AnActionEvent) {
val editor = e.getData(CommonDataKeys.EDITOR)
val file = e.getData(CommonDataKeys.PSI_FILE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import com.github.warningimhack3r.npmupdatedependencies.ui.helpers.ActionsCommon
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.actionSystem.UpdateInBackground
import com.intellij.openapi.components.service

class RemoveAllDeprecationsAction : AnAction() {
class RemoveAllDeprecationsAction : AnAction(), UpdateInBackground {
override fun update(e: AnActionEvent) {
e.presentation.isEnabled = e.project?.service<NUDState>()?.deprecations?.isNotEmpty() ?: false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import com.github.warningimhack3r.npmupdatedependencies.ui.helpers.ActionsCommon
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.actionSystem.UpdateInBackground
import com.intellij.openapi.components.service

class ReplaceAllDeprecationsAction : AnAction() {
class ReplaceAllDeprecationsAction : AnAction(), UpdateInBackground {
override fun update(e: AnActionEvent) {
e.presentation.isEnabled = e.project?.service<NUDState>()?.deprecations?.isNotEmpty() ?: false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ package com.github.warningimhack3r.npmupdatedependencies.ui.actions.scan
import com.github.warningimhack3r.npmupdatedependencies.backend.engine.NUDState
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.UpdateInBackground
import com.intellij.openapi.components.service

class InvalidateCachesAction : AnAction() {
class InvalidateCachesAction : AnAction(), UpdateInBackground {
override fun update(e: AnActionEvent) {
val state = e.project?.service<NUDState>()
e.presentation.isEnabled = if (state != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import com.github.warningimhack3r.npmupdatedependencies.ui.helpers.ActionsCommon
import com.intellij.openapi.actionSystem.AnAction
import com.intellij.openapi.actionSystem.AnActionEvent
import com.intellij.openapi.actionSystem.CommonDataKeys
import com.intellij.openapi.actionSystem.UpdateInBackground
import com.intellij.openapi.components.service

class UpdateAllLatestAction : AnAction() {
class UpdateAllLatestAction : AnAction(), UpdateInBackground {
override fun update(e: AnActionEvent) {
e.presentation.isEnabled = e.project?.service<NUDState>()?.availableUpdates?.isNotEmpty() ?: false
}
Expand Down

0 comments on commit b463a3c

Please sign in to comment.