Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
szepeviktor committed Jan 2, 2025
1 parent 1359605 commit bd9ea5c
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/docs/api/CacheStore.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The `SqliteCacheStore` is only exposed if the `node:sqlite` api is present.

- `location` - The location of the SQLite database to use. Default `:memory:`.
- `maxCount` - The maximum number of entries to store in the database. Default `Infinity`.
- `maxEntrySize` - The maximum size in bytes that a resposne's body can be. If a response's body is greater than or equal to this, the response will not be cached. Default `Infinity`.
- `maxEntrySize` - The maximum size in bytes that a response's body can be. If a response's body is greater than or equal to this, the response will not be cached. Default `Infinity`.

## Defining a Custom Cache Store

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/api/ProxyAgent.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Returns: `ProxyAgent`
### Parameter: `ProxyAgentOptions`

Extends: [`AgentOptions`](/docs/docs/api/Agent.md#parameter-agentoptions)
> It ommits `AgentOptions#connect`.
> It omits `AgentOptions#connect`.
* **uri** `string | URL` (required) - The URI of the proxy server. This can be provided as a string, as an instance of the URL class, or as an object with a `uri` property of type string.
If the `uri` is provided as a string or `uri` is an object with an `uri` property of type string, then it will be parsed into a `URL` object according to the [WHATWG URL Specification](https://url.spec.whatwg.org).
Expand Down
2 changes: 1 addition & 1 deletion lib/handler/cache-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class CacheHandler {
!heuristicallyCacheable &&
!this.#cacheByDefault
) {
// Don't have anything to tell us this response is cachable and we're not
// Don't have anything to tell us this response is cacheable and we're not
// caching by default
return downstreamOnHeaders()
}
Expand Down
4 changes: 2 additions & 2 deletions lib/interceptor/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -296,11 +296,11 @@ module.exports = (opts = {}) => {
assertCacheMethods(methods, 'opts.methods')

if (typeof cacheByDefault !== 'undefined' && typeof cacheByDefault !== 'number') {
throw new TypeError(`exepcted opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`)
throw new TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof cacheByDefault}`)
}

if (typeof type !== 'undefined' && type !== 'shared' && type !== 'private') {
throw new TypeError(`exepcted opts.type to be shared, private, or undefined, got ${typeof type}`)
throw new TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof type}`)
}

const globalOpts = {
Expand Down
2 changes: 1 addition & 1 deletion lib/util/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ function parseVaryHeader (varyHeader, headers) {

/**
* Note: this deviates from the spec a little. Empty etags ("", W/"") are valid,
* however, including them in cached resposnes serves little to no purpose.
* however, including them in cached responses serves little to no purpose.
*
* @see https://www.rfc-editor.org/rfc/rfc9110.html#name-etag
*
Expand Down
2 changes: 1 addition & 1 deletion lib/web/fetch/body.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function extractBody (object, keepalive = false) {

// Set action to this step: run the multipart/form-data
// encoding algorithm, with object’s entry list and UTF-8.
// - This ensures that the body is immutable and can't be changed afterwords
// - This ensures that the body is immutable and can't be changed afterwards
// - That the content-length is calculated in advance.
// - And that all parts are pre-encoded and ready to be sent.

Expand Down
2 changes: 1 addition & 1 deletion test/interceptors/cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ describe('Cache Interceptor', () => {
'proxy-connection',
'te',
'upgrade',
// Headers we need to specifiy to be stripped
// Headers we need to specify to be stripped
'should-be-stripped'
]

Expand Down
6 changes: 3 additions & 3 deletions test/utils/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('parseHttpDate', () => {
'Sun, 06 Nov 1994 08:49:37 GMT': new Date(Date.UTC(1994, 10, 6, 8, 49, 37)),
'Thu, 18 Aug 1950 02:01:18 GMT': new Date(Date.UTC(1950, 7, 18, 2, 1, 18)),
'Wed, 11 Dec 2024 23:20:57 GMT': new Date(Date.UTC(2024, 11, 11, 23, 20, 57)),
'Wed, aa Dec 2024 23:20:57 GMT': undefined, // NaN daty
'Wed, aa Dec 2024 23:20:57 GMT': undefined, // NaN day
'aaa, 06 Dec 2024 23:20:57 GMT': undefined, // Invalid day name
'Wed, 01 aaa 2024 23:20:57 GMT': undefined, // Invalid month
'Wed, 6 Dec 2024 23:20:07 GMT': undefined, // No leading zero
Expand All @@ -33,7 +33,7 @@ describe('parseHttpDate', () => {
'Sunday, 06-Nov-94 08:49:37 GMT': new Date(Date.UTC(1994, 10, 6, 8, 49, 37)),
'Thursday, 18-Aug-50 02:01:18 GMT': new Date(Date.UTC(2050, 7, 18, 2, 1, 18)),
'Wednesday, 11-Dec-24 23:20:57 GMT': new Date(Date.UTC(2024, 11, 11, 23, 20, 57)),
'Wednesday, aa Dec 2024 23:20:57 GMT': undefined, // NaN daty
'Wednesday, aa Dec 2024 23:20:57 GMT': undefined, // NaN day
'aaa, 06 Dec 2024 23:20:57 GMT': undefined, // Invalid day name
'Wednesday, 01-aaa-24 23:20:57 GMT': undefined, // Invalid month
'Wednesday, 6-Dec-24 23:20:07 GMT': undefined, // No leading zero
Expand All @@ -56,7 +56,7 @@ describe('parseHttpDate', () => {
'Sun Nov 6 08:49:37 1994': new Date(Date.UTC(1994, 10, 6, 8, 49, 37)),
'Thu Aug 18 02:01:18 1950': new Date(Date.UTC(1950, 7, 18, 2, 1, 18)),
'Wed Dec 11 23:20:57 2024': new Date(Date.UTC(2024, 11, 11, 23, 20, 57)),
'Wed Dec aa 23:20:57 2024': undefined, // NaN daty
'Wed Dec aa 23:20:57 2024': undefined, // NaN day
'aaa Dec 06 23:20:57 2024': undefined, // Invalid day name
'Wed aaa 01 23:20:57 2024': undefined, // Invalid month
'Wed Dec 6 23:20:07 2024': undefined, // No leading zero
Expand Down
2 changes: 1 addition & 1 deletion test/websocket/issue-2844.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test('The server must reply with at least one subprotocol the client sends', asy
await completed
})

test('The connection fails when the client sends subprotocols that the server does not responc with', async (t) => {
test('The connection fails when the client sends subprotocols that the server does not response with', async (t) => {
const { completed, fail, ok } = tspl(t, { plan: 1 })

const wss = new WebSocketServer({
Expand Down

0 comments on commit bd9ea5c

Please sign in to comment.