Skip to content

Commit 6907429

Browse files
Apply suggestions from code review
Co-authored-by: Haley Elmendorf <[email protected]>
1 parent 9e694a7 commit 6907429

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/content/migration/migrating-to-v4.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Migrating to v4.x
22

3-
This migration guide helps you transition an application written using the `v3.x` series of this package, to the `v4.x` series. This guide focuses specifically on the breaking changes to help get your existing app up and running as quickly as possible. In some cases, there may be better techniques for accomplishing what your app already does by utilizing brand new features or new API. Learn about all the new features in our [`v4.0.0` release notes](https://github.com/slackapi/node-slack-sdk/releases/tag/v4.0.0) if you'd like to go beyond a simple port.
3+
This migration guide helps you transition an application written using the `v3.x` series of this package, to the `v4.x` series. This guide focuses specifically on the breaking changes to help get your existing app up and running as quickly as possible. In some cases, there may be better techniques for accomplishing what your app already does by utilizing brand new features or new API methods. Learn about all the new features in our [`v4.0.0` release notes](https://github.com/slackapi/node-slack-sdk/releases/tag/v4.0.0) if you'd like to go beyond a simple port.
44

55
## WebClient
66

@@ -80,7 +80,7 @@ The datastore APIs have helped apps keep track of team state since this feature
8080

8181
At a high level, here are the design issues that could not be addressed in a backwards compatible way:
8282

83-
- **Synchronous calling convention** - In order to plug in storage destinations other than memory (`SlackMemoryDataStore`) the code to reach that destination would need to be asynchronous. This is important if you want to share state across many processes while horizontally scaling an app. As a result, the maintainers have never seen an implementation of the `SlackDataStore` interface other than the memory-based one provided.
83+
- **Synchronous calling convention** - In order to plug in storage destinations other than memory (`SlackMemoryDataStore`), the code to reach that destination would need to be asynchronous. This is important if you want to share state across many processes while horizontally scaling an app. As a result, the maintainers have never seen an implementation of the `SlackDataStore` interface other than the memory-based one provided.
8484

8585
- **Names versus IDs** - While we always thought it was a good idea to use IDs anywhere possible in programmatic use, the Slack platform wasn't overly strict about it. With the introduction of Shared Channels, we cannot preserve any guarantees of uniqueness for usernames, as we mentioned in this [changelog entry](https://api.slack.com/changelog/2017-09-the-one-about-usernames). In fact, channel names also lose these types of guarantees. The APIs in the `SlackDataStore` that operate on names instead of IDs start to break since the fundamental assumptions are not true anymore.
8686

@@ -119,7 +119,7 @@ If you aren't sure how to translate a specific data store method into a Web API
119119
120120
You'll notice that this code has become asynchronous. This will likely be the largest challenge in migrating away from the data store, but for most developers it will be worth it.
121121
122-
For the majority of apps, you will be ready for v4 at this point. If your app is having performance related issues, there's room to make improvements by caching the data that is relevant to your app. This should only be taken on if you believe its necessary, since cache invalidation is one of the [only two hard things in computer science](https://martinfowler.com/bliki/TwoHardThings.html).
122+
For the majority of apps, you will be ready for v4 at this point. If your app is having performance related issues, there's room to make improvements by caching the data that is relevant to your app. This should only be taken on if you believe it's necessary, since cache invalidation is one of the [only two hard things in computer science](https://martinfowler.com/bliki/TwoHardThings.html).
123123
124124
The approach for caching data that we recommend is to pick out the data your app needs, store it at connection time, and update it according to a determined policy. You may want to disable the `useRtmConnect` option in order
125125
to get more data at connection time.
@@ -197,7 +197,7 @@ rtm.addOutgoingEvent(true, message.type, message)
197197
});
198198
```
199199
200-
### Events
200+
### Events {#events}
201201
202202
The `RTMClient` now has more well-defined states (and substates) that you may observe using the [`EventEmitter` API pattern](https://nodejs.org/api/events.html). The following table helps describe the relationship between events in the `v3.x` series and events in the `v4.x` series.
203203

docs/content/migration/migrating-to-v5.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Those packages only moved repositories, but did not get updated in this process.
1717

1818
## Update to a supported version of Node
1919

20-
These package have dropped support for versions of Node that are no longer supported. We recommend updating to the latest LTS version of [Node](https://nodejs.org/en/), which at this time is v10.15.3. The minimum supported version is v8.9.0.
20+
These packages have dropped support for versions of Node that are no longer supported. We recommend updating to the latest LTS version of [Node](https://nodejs.org/en/), which at this time is v10.15.3. The minimum supported version is v8.9.0.
2121

2222
:::info[Learn more about our [support schedule](/support-schedule) so that you can prepare and plan for future updates.]
2323

0 commit comments

Comments
 (0)