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

docs: added punctuation #2737

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ To assist reviewers, we ask that you fill out the pull request template as much

Pull Requests to the protected branches require peer-review approvals and passing status checks to be able to be merged.

When reviewing a Pull Request please check the following steps as well as the existing automated checks:
When reviewing a Pull Request, please check the following steps as well as the existing automated checks:

- Does your Pull Request provide or update the docs if docs changes are required?
- Have the tests been updated or new tests been added to test any newly implemented or changed functionality?
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ node-redis is a modern, high performance [Redis](https://redis.io) client for No
| [@redis/search](./packages/search) | [![Downloads](https://img.shields.io/npm/dm/@redis/search.svg)](https://www.npmjs.com/package/@redis/search) [![Version](https://img.shields.io/npm/v/@redis/search.svg)](https://www.npmjs.com/package/@redis/search) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/search/) [RediSearch](https://oss.redis.com/redisearch/) commands |
| [@redis/time-series](./packages/time-series) | [![Downloads](https://img.shields.io/npm/dm/@redis/time-series.svg)](https://www.npmjs.com/package/@redis/time-series) [![Version](https://img.shields.io/npm/v/@redis/time-series.svg)](https://www.npmjs.com/package/@redis/time-series) [![Docs](https://img.shields.io/badge/-documentation-dc382c)](https://redis.js.org/documentation/time-series/) [Redis Time-Series](https://oss.redis.com/redistimeseries/) commands |

> :warning: In version 4.1.0 we moved our subpackages from `@node-redis` to `@redis`. If you're just using `npm install redis`, you don't need to do anything—it'll upgrade automatically. If you're using the subpackages directly, you'll need to point to the new scope (e.g. `@redis/client` instead of `@node-redis/client`).
> :warning: In version 4.1.0, we moved our subpackages from `@node-redis` to `@redis`. If you're just using `npm install redis`, you don't need to do anything—it'll upgrade automatically. If you're using the subpackages directly, you'll need to point to the new scope (e.g. `@redis/client` instead of `@node-redis/client`).

## Installation

Expand Down Expand Up @@ -127,7 +127,7 @@ await client.hGetAll(

### Unsupported Redis Commands

If you want to run commands and/or use arguments that Node Redis doesn't know about (yet!) use `.sendCommand()`:
If you want to run commands and/or use arguments that Node Redis doesn't know about (yet!), use `.sendCommand()`:

```typescript
await client.sendCommand(['SET', 'key', 'value', 'NX']); // 'OK'
Expand Down Expand Up @@ -290,7 +290,7 @@ await client.add('key', 2); // 3

### Disconnecting

There are two functions that disconnect a client from the Redis server. In most scenarios you should use `.quit()` to ensure that pending commands are sent to Redis before closing a connection.
There are two functions that disconnect a client from the Redis server. In most scenarios, you should use `.quit()` to ensure that pending commands are sent to Redis before closing a connection.

#### `.QUIT()`/`.quit()`

Expand Down Expand Up @@ -327,7 +327,7 @@ client.set('Tm9kZSBSZWRpcw==', 'users:1');
client.sAdd('users:1:tokens', 'Tm9kZSBSZWRpcw==');
```

Of course, if you don't do something with your Promises you're certain to get [unhandled Promise exceptions](https://nodejs.org/api/process.html#process_event_unhandledrejection). To take advantage of auto-pipelining and handle your Promises, use `Promise.all()`.
Of course, if you don't do something with your Promises, you're certain to get [unhandled Promise exceptions](https://nodejs.org/api/process.html#process_event_unhandledrejection). To take advantage of auto-pipelining and handle your Promises, use `Promise.all()`.

```typescript
await Promise.all([
Expand Down
4 changes: 2 additions & 2 deletions docs/client-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ When the socket closes unexpectedly (without calling `.quit()`/`.disconnect()`),
2. `number` -> wait for `X` milliseconds before reconnecting.
3. `(retries: number, cause: Error) => false | number | Error` -> `number` is the same as configuring a `number` directly, `Error` is the same as `false`, but with a custom error.

By default the strategy is `Math.min(retries * 50, 500)`, but it can be overwritten like so:
By default, the strategy is `Math.min(retries * 50, 500)`, but it can be overwritten like so:

```javascript
createClient({
Expand All @@ -48,7 +48,7 @@ createClient({

To enable TLS, set `socket.tls` to `true`. Below are some basic examples.

> For configuration options see [tls.connect](https://nodejs.org/api/tls.html#tlsconnectoptions-callback) and [tls.createSecureContext](https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions), as those are the underlying functions used by this library.
> For configuration options, see [tls.connect](https://nodejs.org/api/tls.html#tlsconnectoptions-callback) and [tls.createSecureContext](https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions), as those are the underlying functions used by this library.

### Create a SSL client

Expand Down
1 change: 1 addition & 0 deletions docs/clustering.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const value = await cluster.get('key');
## Auth with password and username

Specifying the password in the URL or a root node will only affect the connection to that specific node. In case you want to set the password for all the connections being created from a cluster instance, use the `defaults` option.

```javascript
createCluster({
rootNodes: [{
Expand Down
4 changes: 2 additions & 2 deletions docs/isolated-execution.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Sometimes you want to run your commands on an exclusive connection. There are a

Below are several examples of how to use isolated execution.

> NOTE: Behind the scenes we're using [`generic-pool`](https://www.npmjs.com/package/generic-pool) to provide a pool of connections that can be isolated. Go there to learn more.
> NOTE: Behind the scenes, we're using [`generic-pool`](https://www.npmjs.com/package/generic-pool) to provide a pool of connections that can be isolated. Go there to learn more.

## The Simple Scenario

Expand All @@ -23,7 +23,7 @@ await client.executeIsolated(async isolatedClient => {

## Transactions

Things get a little more complex with transactions. Here we are `.watch()`ing some keys. If the keys change during the transaction, a `WatchError` is thrown when `.exec()` is called:
Things get a little more complex with transactions. Here, we are `.watch()`ing some keys. If the keys change during the transaction, a `WatchError` is thrown when `.exec()` is called:

```typescript
try {
Expand Down
6 changes: 3 additions & 3 deletions docs/v3-to-v4.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ The configuration object passed to `createClient` has changed significantly with

### No Auto Connect

In V4, the client does not automatically connect to the server. Instead you need to run `.connect()` after creating the client or you will receive an error: `ClientClosedError: The client is closed`.
In V4, the client does not automatically connect to the server. Instead, you need to run `.connect()` after creating the client or you will receive an error: `ClientClosedError: The client is closed`.

```typescript
import { createClient } from 'redis';
Expand Down Expand Up @@ -50,9 +50,9 @@ In V4, you don't need to add a listener to the `message`-like events (items 5 to

The second argument of these commands is a callback, which will be triggered every time there is a message published to the channel.

The third argument to these commands is a boolean to set `bufferMode` (default `false`). If it's set to `true` you will receive a buffer instead of a string.
The third argument to these commands is a boolean to set `bufferMode` (default `false`). If it's set to `true`, you will receive a buffer instead of a string.

The `subscribe`-like commands return a promise. If the command is executed successfully the promise will be fulfilled, otherwise the promise will be rejected.
The `subscribe`-like commands return a promise. If the command is executed successfully, the promise will be fulfilled, otherwise the promise will be rejected.

```typescript
import { createClient } from 'redis';
Expand Down