diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0243cc19359..7c7c776753a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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? diff --git a/README.md b/README.md index a590372b1b1..d7122a2d32a 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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' @@ -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()` @@ -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([ diff --git a/docs/client-configuration.md b/docs/client-configuration.md index 1854f07158a..cbf56330b72 100644 --- a/docs/client-configuration.md +++ b/docs/client-configuration.md @@ -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({ @@ -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 diff --git a/docs/clustering.md b/docs/clustering.md index 28ea0e2964c..224af367b1c 100644 --- a/docs/clustering.md +++ b/docs/clustering.md @@ -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: [{ diff --git a/docs/isolated-execution.md b/docs/isolated-execution.md index 7870a4680e7..8a5b146ea05 100644 --- a/docs/isolated-execution.md +++ b/docs/isolated-execution.md @@ -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 @@ -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 { diff --git a/docs/v3-to-v4.md b/docs/v3-to-v4.md index 0bf0d269b90..54cf1d7d281 100644 --- a/docs/v3-to-v4.md +++ b/docs/v3-to-v4.md @@ -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'; @@ -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';