Skip to content
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

Bump com.slack.api:bolt from 1.40.+ to 1.42.0 #5084

Merged
merged 1 commit into from
Sep 1, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Sep 1, 2024

Bumps com.slack.api:bolt from 1.40.+ to 1.42.0.

Release notes

Sourced from com.slack.api:bolt's releases.

version 1.42.0

Announcements

Jakarta EE compatible Socket Mode

Since this version, developers can migrate to the newer Jakarta EE compatible WebSocket interface for Socket Mode modules. To enable this, the following two optional modules are added:

  • com.slack.api:slack-jakarta-socket-mode-client
  • com.slack.api:bolt-jakarata-socket-mode

The Socket Mode client's default implementation uses tyrus-standalone-client 1.x, which is compatible with javax.websocket-api APIs. The Jakarta EE version of this interface is the jakarta.websocket-client-api APIs, and tyrus-standalone-client 2.x is compatible with it. Since it's not feasible to have both tyrus-standalone-client 1.x and 2.x in the same module's dependencies, I have added a new module named slack-jakarta-socket-mode-client. See slackapi/java-slack-sdk#919 for more details.

Developers can initialize the Jakarta-compatible SocketModeClient this way:

import com.slack.api.Slack;
import com.slack.api.jakarta_socket_mode.JakartaSocketModeClientFactory;
public class Example {
public static void main(String[] args) throws Exception {
var appToken = System.getenv("SLACK_APP_TOKEN");
var slack = Slack.getInstance();
// Java EE compatible Socket Mode client
slack.socketMode(appToken).connect();
// Jakarta EE compatible Socket Mode client
JakartaSocketModeClientFactory.create(slack, appToken).connect();
}
}

In the same way, I’ve added a new Jakarta-compatible module, which is equivalent to bolt-socket-mode. Here is the demo code. As you can see, just replace the dependency and imports in the code:

import com.slack.api.bolt.App;
import com.slack.api.bolt.jakarta_socket_mode.SocketModeApp;
public class Example {
public static void main(String[] args) throws Exception {
var app = new App();
app.command("/hi", (req, ctx) -> {
ctx.say("Hi there!");
return ctx.ack();
});
var appToken = System.getenv("SLACK_APP_TOKEN");
// Switch from com.slack.api.bolt.socket_mode to com.slack.api.bolt.jakarta_socket_mode
new SocketModeApp(appToken, app).start();
}
}

The reason behind this enhancement is that many Java-house companies are planning to eliminate the legacy javax.* dependencies from their project settings. I don't think the short-term risk of having a javax.websocket dependency is significant, but it seems it's about time to provide an option for migration on the developers' side.

... (truncated)

Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [com.slack.api:bolt](https://github.com/slackapi/java-slack-sdk) from 1.40.+ to 1.42.0.
- [Release notes](https://github.com/slackapi/java-slack-sdk/releases)
- [Changelog](https://github.com/slackapi/java-slack-sdk/blob/main/jSlack_changelog.md)
- [Commits](https://github.com/slackapi/java-slack-sdk/commits/v1.42.0)

---
updated-dependencies:
- dependency-name: com.slack.api:bolt
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file java Pull requests that update Java code labels Sep 1, 2024
@Pil0tXia Pil0tXia merged commit b28b321 into master Sep 1, 2024
10 checks passed
@dependabot dependabot bot deleted the dependabot/gradle/com.slack.api-bolt-1.42.0 branch September 1, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant