Skip to content

Commit 5db3eec

Browse files
committed
fix: correct all typos and add spell checker
1 parent f651ccf commit 5db3eec

19 files changed

+67
-31
lines changed

.cspell.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"import": [
3+
"./node_modules/aegir/cspell.json"
4+
],
5+
"dictionaries": ["project"],
6+
"dictionaryDefinitions": [{
7+
"name": "project",
8+
"path": "./.github/dictionary.txt",
9+
"addWords": true
10+
}]
11+
}

.github/dictionary.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
ENOENT
2+
GOPATH
3+
mgmt
4+
gotest
5+
XKCD
6+
filetypemime
7+
fleek
8+
msword
9+
msdownload
10+
powerpoint
11+
noopener
12+
noreferrer
13+
nosniff
14+
Segoe
15+
Cantarell
16+
Noto
17+
Consolas
18+
filev

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"lint": "aegir run lint",
3232
"dep-check": "aegir run dep-check",
3333
"doc-check": "aegir run doc-check",
34+
"spell-check": "aegir spell-check",
3435
"release": "run-s build docs:no-publish npm:release docs",
3536
"npm:release": "aegir run release --concurrency 1",
3637
"docs": "aegir docs",

packages/gateway-conformance/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ $ curl -v GET http://localhost:3442/ipfs/bafkqabtimvwgy3yk/ # in terminal 2
7373

7474
If you see the following error:
7575

76-
> ENOENT: no such file or directory, open '\[...]/helia-verified-fetch/packages/gateway-conformance/dist/src/fixtures/data/gateway-conformance-fixtures/dnslinks.json
76+
> ENOENT: no such file or directory, open '[...]/helia-verified-fetch/packages/gateway-conformance/dist/src/...
7777
7878
This likely means the docker container is not executing properly for some reason. You can try running the following command to see if there are any errors: `DEBUG="-mocha*,*,*:trace" npm run test`
7979

packages/gateway-conformance/src/fixtures/get-local-dns-resolver.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export function getLocalDnsResolver (ipfsNsMap: string, kuboGateway: string): DN
4646
name: domain,
4747
type: 16,
4848
TTL: 180,
49-
data // should be in the format 'dnslink=/ipfs/bafkqac3imvwgy3zao5xxe3de'
49+
data // should be in the format 'dnslink=/ipfs/bafyfoo'
5050
})
5151
}
5252

packages/gateway-conformance/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
* ## Missing file in gateway-conformance-fixtures folder
4444
*
4545
* If you see the following error:
46-
* > ENOENT: no such file or directory, open '[...]/helia-verified-fetch/packages/gateway-conformance/dist/src/fixtures/data/gateway-conformance-fixtures/dnslinks.json
46+
* > ENOENT: no such file or directory, open '[...]/helia-verified-fetch/packages/gateway-conformance/dist/src/...
4747
*
4848
* This likely means the docker container is not executing properly for some reason. You can try running the following command to see if there are any errors: `DEBUG="-mocha*,*,*:trace" npm run test`
4949
*/

packages/interop/src/json.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { expect } from 'aegir/chai'
44
import { CID } from 'multiformats/cid'
55

66
describe('@helia/verified-fetch - json', () => {
7-
describe('unixfs - multiblock', () => {
7+
describe('unixfs - multi-block', () => {
88
let verifiedFetch: Awaited<ReturnType<typeof createVerifiedFetch>>
99

1010
before(async () => {

packages/interop/src/unixfs-dir.spec.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ describe('@helia/verified-fetch - unixfs directory', () => {
5151
expect(resp.status).to.equal(501) // TODO: we should do a directory listing instead
5252
})
5353

54-
it('can return a string for unixfs pathed data', async () => {
54+
it('can return a string for deep-linked unixfs data', async () => {
5555
const resp = await verifiedFetch('ipfs://QmbQDovX7wRe9ek7u6QXe9zgCXkTzoUSsTFJEkrYV1HrVR/1 - Barrel - Part 1 - alt.txt', {
5656
allowLocal: true,
5757
allowInsecure: true
@@ -61,7 +61,7 @@ describe('@helia/verified-fetch - unixfs directory', () => {
6161
expect(text).to.equal('Don\'t we all.')
6262
})
6363

64-
it('can return an image for unixfs pathed data', async () => {
64+
it('can return an image for deep-linked unixfs data', async () => {
6565
const resp = await verifiedFetch('ipfs://QmbQDovX7wRe9ek7u6QXe9zgCXkTzoUSsTFJEkrYV1HrVR/1 - Barrel - Part 1.png', {
6666
allowLocal: true,
6767
allowInsecure: true
@@ -88,7 +88,7 @@ describe('@helia/verified-fetch - unixfs directory', () => {
8888
})
8989
})
9090

91-
it('can return an image content-type for unixfs pathed data', async () => {
91+
it('can return an image content-type for deep-linked unixfs data', async () => {
9292
const resp = await verifiedFetch('ipfs://QmbQDovX7wRe9ek7u6QXe9zgCXkTzoUSsTFJEkrYV1HrVR/1 - Barrel - Part 1.png', {
9393
allowLocal: true,
9494
allowInsecure: true
@@ -108,9 +108,11 @@ describe('@helia/verified-fetch - unixfs directory', () => {
108108
expect(resp).to.be.ok()
109109
const text = await resp.text()
110110
// npx [email protected] cat '/ipfs/bafybeidbclfqleg2uojchspzd4bob56dqetqjsj27gy2cq3klkkgxtpn4i/685.txt'
111+
// spell-checker: disable
111112
expect(text).to.equal(`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc non imperdiet nunc. Proin ac quam ut nibh eleifend aliquet. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Sed ligula dolor, imperdiet sagittis arcu et, semper tincidunt urna. Donec et tempor augue, quis sollicitudin metus. Curabitur semper ullamcorper aliquet. Mauris hendrerit sodales lectus eget fermentum. Proin sollicitudin vestibulum commodo. Vivamus nec lectus eu augue aliquet dignissim nec condimentum justo. In hac habitasse platea dictumst. Mauris vel sem neque.
112113
113114
Vivamus finibus, enim at lacinia semper, arcu erat gravida lacus, sit amet gravida magna orci sit amet est. Sed non leo lacus. Nullam viverra ipsum a tincidunt dapibus. Nulla pulvinar ligula sit amet ante ultrices tempus. Proin purus urna, semper sed lobortis quis, gravida vitae ipsum. Aliquam mi urna, pulvinar eu bibendum quis, convallis ac dolor. In gravida justo sed risus ullamcorper, vitae luctus massa hendrerit. Pellentesque habitant amet.`)
115+
// spell-checker: enable
114116
})
115117
})
116118
})

packages/verified-fetch/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ When fetching `DAG-PB` data, the content type will be set to `application/octet-
306306

307307
#### JSON
308308

309-
The JSON codec is a very simple codec, a block parseable with this codec is a JSON string encoded into a `Uint8Array`.
309+
The JSON codec is a very simple codec, a block decodable with this codec is a JSON string encoded into a `Uint8Array`.
310310

311311
##### Using the JSON codec
312312

@@ -399,7 +399,7 @@ console.info(obj.buf) // Uint8Array(5) [ 0, 1, 2, 3, 4 ]
399399

400400
[DAG-CBOR](https://ipld.io/docs/codecs/known/dag-cbor/) uses the [Concise Binary Object Representation](https://cbor.io/) format for serialization instead of JSON.
401401

402-
This supports more datatypes in a safer way than JSON and is smaller on the wire to boot so is usually preferable to JSON or DAG-JSON.
402+
This supports more data types in a safer way than JSON and is smaller on the wire to boot so is usually preferable to JSON or DAG-JSON.
403403

404404
##### Content-Type
405405

@@ -479,7 +479,7 @@ const res = await verifiedFetch('ipfs://bafyfoo/path/to/dir')
479479
console.info(res.url) // ipfs://bafyfoo/path/to/dir/
480480
```
481481

482-
It's possible to prevent this behaviour and/or handle a redirect manually
482+
It's possible to prevent this behavior and/or handle a redirect manually
483483
through use of the [redirect](https://developer.mozilla.org/en-US/docs/Web/API/fetch#redirect)
484484
option.
485485

@@ -554,7 +554,7 @@ This library supports the following methods of fetching web3 content from IPFS:
554554
2. IPNS protocol: `ipns://<peerId>` & `ipns://<publicKey>` & `ipns://<hostUri_Supporting_DnsLink_TxtRecords>`
555555
3. CID instances: An actual CID instance `CID.parse('bafy...')`
556556

557-
As well as support for pathing & params for items 1 & 2 above according to [IPFS - Path Gateway Specification](https://specs.ipfs.tech/http-gateways/path-gateway) & [IPFS - Trustless Gateway Specification](https://specs.ipfs.tech/http-gateways/trustless-gateway/). Further refinement of those specifications specifically for web-based scenarios can be found in the [Web Pathing Specification IPIP](https://github.com/ipfs/specs/pull/453).
557+
As well as support for paths & params for items 1 & 2 above according to [IPFS - Path Gateway Specification](https://specs.ipfs.tech/http-gateways/path-gateway) & [IPFS - Trustless Gateway Specification](https://specs.ipfs.tech/http-gateways/trustless-gateway/). Further refinement of those specifications specifically for web-based scenarios can be found in the [Web Pathing Specification IPIP](https://github.com/ipfs/specs/pull/453).
558558

559559
If you pass a CID instance, it assumes you want the content for that specific CID only, and does not support pathing or params for that CID.
560560

@@ -658,7 +658,7 @@ Known Errors that can be thrown:
658658
3. `TypeError` - If the options argument is passed and is malformed.
659659
4. `AbortError` - If the content request is aborted due to user aborting provided AbortSignal. Note that this is a `AbortError` from `@libp2p/interface` and not the standard `AbortError` from the Fetch API.
660660

661-
## Pluggability and Extensibility
661+
## Extensibility
662662

663663
Verified‑fetch can now be extended to alter how it handles requests by using plugins.
664664
Plugins are classes that extend the `BasePlugin` class and implement the `VerifiedFetchPlugin`

packages/verified-fetch/src/index.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@
368368
*
369369
* [DAG-CBOR](https://ipld.io/docs/codecs/known/dag-cbor/) uses the [Concise Binary Object Representation](https://cbor.io/) format for serialization instead of JSON.
370370
*
371-
* This supports more datatypes in a safer way than JSON and is smaller on the wire to boot so is usually preferable to JSON or DAG-JSON.
371+
* This supports more data types in a safer way than JSON and is smaller on the wire to boot so is usually preferable to JSON or DAG-JSON.
372372
*
373373
* ##### Content-Type
374374
*
@@ -448,7 +448,7 @@
448448
* console.info(res.url) // ipfs://bafyfoo/path/to/dir/
449449
* ```
450450
*
451-
* It's possible to prevent this behaviour and/or handle a redirect manually
451+
* It's possible to prevent this behavior and/or handle a redirect manually
452452
* through use of the [redirect](https://developer.mozilla.org/en-US/docs/Web/API/fetch#redirect)
453453
* option.
454454
*
@@ -627,7 +627,7 @@
627627
* 3. `TypeError` - If the options argument is passed and is malformed.
628628
* 4. `AbortError` - If the content request is aborted due to user aborting provided AbortSignal. Note that this is a `AbortError` from `@libp2p/interface` and not the standard `AbortError` from the Fetch API.
629629
*
630-
* ## Pluggability and Extensibility
630+
* ## Extensibility
631631
*
632632
* Verified‑fetch can now be extended to alter how it handles requests by using plugins.
633633
* Plugins are classes that extend the `BasePlugin` class and implement the `VerifiedFetchPlugin`
@@ -893,7 +893,7 @@ export interface CreateVerifiedFetchInit {
893893
/**
894894
* By default we will not connect to any HTTP Gateways providers over local or
895895
* loopback addresses, this is because they are typically running on remote
896-
* peers that have published private addresses by mistate.
896+
* peers that have published private addresses by mistake.
897897
*
898898
* Pass `true` here to connect to local Gateways as well, this may be useful
899899
* in testing environments.
@@ -904,7 +904,7 @@ export interface CreateVerifiedFetchInit {
904904

905905
/**
906906
* By default we will not connect to any gateways over HTTP addresses,
907-
* requring HTTPS connections instead. This is because it will cause
907+
* requiring HTTPS connections instead. This is because it will cause
908908
* "mixed-content" errors to appear in the console when running in secure
909909
* browser contexts.
910910
*
@@ -1012,7 +1012,7 @@ export interface VerifiedFetchInit extends RequestInit, ProgressOptions<BubbledP
10121012
/**
10131013
* By default we will not connect to any HTTP Gateways providers over local or
10141014
* loopback addresses, this is because they are typically running on remote
1015-
* peers that have published private addresses by mistate.
1015+
* peers that have published private addresses by mistake.
10161016
*
10171017
* Pass `true` here to connect to local Gateways as well, this may be useful
10181018
* in testing environments.
@@ -1023,7 +1023,7 @@ export interface VerifiedFetchInit extends RequestInit, ProgressOptions<BubbledP
10231023

10241024
/**
10251025
* By default we will not connect to any gateways over HTTP addresses,
1026-
* requring HTTPS connections instead. This is because it will cause
1026+
* requiring HTTPS connections instead. This is because it will cause
10271027
* "mixed-content" errors to appear in the console when running in secure
10281028
* browser contexts.
10291029
*

0 commit comments

Comments
 (0)