Skip to content

Commit

Permalink
its amazing what you can find with a little find and replace
Browse files Browse the repository at this point in the history
  • Loading branch information
aoberoi committed Mar 28, 2019
1 parent 2ee0224 commit 81be95b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 20 deletions.
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -54,7 +54,7 @@ a channel, DM, MPDM, or group. The `WebClient` object makes it simple to call an
methods**](https://api.slack.com/methods).

```javascript
const { WebClient } = require('@slack/client');
const { WebClient } = require('@slack/web-api');

// An access token (from your Slack app or custom integration - xoxp, xoxb)
const token = process.env.SLACK_TOKEN;
Expand Down Expand Up @@ -215,7 +215,7 @@ to instantiate it with a token, usually a bot token, that you received from Slac
for the RTM connection to be established, and then send a simple string message to a channel.

```javascript
const { RTMClient } = require('@slack/client');
const { RTMClient } = require('@slack/web-api');

// An access token (from your Slack app or custom integration - usually xoxb)
const token = process.env.SLACK_TOKEN;
Expand Down
2 changes: 1 addition & 1 deletion docs/_main/getting_started.md
Expand Up @@ -57,7 +57,7 @@ picky. After you're done, you'll have a new `package.json` file in your director
Install the `@slack/web-api` package and save it to your `package.json` dependencies using the following command:

```shell
$ npm install @slack/client
$ npm install @slack/web-api
```

Create a new file called `tutorial.js` in this directory and add the following code:
Expand Down
4 changes: 2 additions & 2 deletions docs/_main/typescript.md
Expand Up @@ -26,7 +26,7 @@ in the [Web API method documentation](https://api.slack.com/methods). This is th
have rich typing available as the value is used around your codebase.

```typescript
import { WebClient, WebAPICallResult } from '@slack/client';
import { WebClient, WebAPICallResult } from '@slack/web-api';

const web = new WebClient(process.env.SLACK_TOKEN);

Expand Down Expand Up @@ -55,7 +55,7 @@ describes the properties which this app needs.
The second recommendation is less preferred, but its a useful hack for moving quickly. You can cast the result to `any`.

```typescript
import { WebClient, WebAPICallResult } from '@slack/client';
import { WebClient, WebAPICallResult } from '@slack/web-api';

const web = new WebClient(process.env.SLACK_TOKEN);

Expand Down
13 changes: 1 addition & 12 deletions integration-tests/README.md
Expand Up @@ -25,15 +25,4 @@ the minimum requirements and nothing more. Here are a few ways this is set up:
represent the least amount of configuration needed to get the package working.

* In `package.json`, the `"private"` key must remain set to `true`. This enforces that this project doesn't get
accidentally published. Also, the `@slack/client` dependency is set to a local filename. This allows the
`package.json` to remain authoritative about which dependencies are available (important for code editors) and still
isolated from the version of the package available in the registry.

### Details

You'll notice that this inner project has its own development dependencies. This was done on purpose. Initially, we
tried to install all development dependencies in the top level project (so that there's no need to hit the npm registry
again in the middle of a test run, and so that we can benefit more from module caching in CI systems), but `dtslint` has
some undesirable behavior that preventing us from doing so. Specifically, dependencies of `@slack/client` would be
loaded from the `node_modules` directory at the top-level project, since that was on the module loading path of
`dtslint`, while the `node_modules` directory of the inner project is not.
accidentally published.
4 changes: 2 additions & 2 deletions packages/rtm-api/src/KeepAlive.ts
Expand Up @@ -215,10 +215,10 @@ export class KeepAlive extends EventEmitter {
this.client.on('slack_event', this.attemptAcknowledgePong, this);
})
.catch((error) => {
this.logger.error(`Unhandled error: ${error.message}. Please report to @slack/client package maintainers.`);
this.logger.error(`Unhandled error: ${error.message}. Please report to @slack/rtm-api package maintainers.`);
});
} catch (error) {
this.logger.error(`Unhandled error: ${error.message}. Please report to @slack/client package maintainers.`);
this.logger.error(`Unhandled error: ${error.message}. Please report to @slack/rtm-api package maintainers.`);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/web-api/README.md
Expand Up @@ -141,7 +141,7 @@ error you're dealing with. For example, when Slack responds to your app with an

```javascript
// Import ErrorCode from the package
const { WebClient, ErrorCode } = require('@slack/client');
const { WebClient, ErrorCode } = require('@slack/web-api');

(async () => {

Expand Down

0 comments on commit 81be95b

Please sign in to comment.