Skip to content

Commit f88ec96

Browse files
authored
ci: check doc diff (#3417)
* ci: check unstaged after docs * docs: update generated docs
1 parent dd251c5 commit f88ec96

File tree

7 files changed

+46
-60
lines changed

7 files changed

+46
-60
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
- run: npm run --if-present lint
4141
- run: npm run --if-present dep-check
4242
- run: npm run --if-present docs:no-publish
43+
- run: git diff --exit-code
4344
- run: npm run --if-present doc-check
4445
- run: npm run --if-present spell-check
4546

packages/keychain/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The key management and naming service API all return a `KeyInfo` object. The `i
4545

4646
The **key id** is the SHA-256 [multihash](https://github.com/multiformats/multihash) of its public key.
4747

48-
The *public key* is a [protobuf encoding](https://github.com/libp2p/js-libp2p/blob/958761163edfc7b1a6231041b199737d72fd6424/packages/crypto/src/keys/keys.proto) containing a type and the [DER encoding](https://en.wikipedia.org/wiki/X.690) of the PKCS [SubjectPublicKeyInfo](https://www.ietf.org/rfc/rfc3279.txt).
48+
The *public key* is a [protobuf encoding](https://github.com/libp2p/js-libp2p/blob/main/packages/crypto/src/keys/keys.proto) containing a type and the [DER encoding](https://en.wikipedia.org/wiki/X.690) of the PKCS [SubjectPublicKeyInfo](https://www.ietf.org/rfc/rfc3279.txt).
4949

5050
## Private key storage
5151

@@ -55,7 +55,7 @@ The default options for generating the derived encryption key are in the `dek` o
5555

5656
```TypeScript
5757
const defaultOptions = {
58-
// See https://cryptosense.com/parameter-choice-for-pbkdf2/
58+
// See https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2
5959
dek: {
6060
keyLength: 512 / 8,
6161
iterationCount: 1000,

packages/libp2p/README.md

Lines changed: 38 additions & 38 deletions
Large diffs are not rendered by default.

packages/protocol-autonat/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repo and examine the changes made.
2424
2525
-->
2626

27-
The AutoNAT service implements the [AutoNAT protocol](https://docs.libp2p.io/concepts/nat/autonat/)
27+
The AutoNAT service implements the [AutoNAT protocol](https://libp2p.io/docs/autonat/)
2828
to confirm whether addresses the node is listening on are dialable by remote
2929
peers.
3030

packages/transport-circuit-relay-v2/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repo and examine the changes made.
2424
2525
-->
2626

27-
The `circuitRelayTransport` allows libp2p to dial and listen on [Circuit Relay](https://docs.libp2p.io/concepts/nat/circuit-relay/)
27+
The `circuitRelayTransport` allows libp2p to dial and listen on [Circuit Relay](https://libp2p.io/docs/circuit-relay/)
2828
addresses.
2929

3030
## Example - Use as a transport
@@ -42,7 +42,7 @@ const node = await createLibp2p({
4242
})
4343
```
4444

45-
The `circuitRelayServer` function allows libp2p to function as a [Circuit Relay](https://docs.libp2p.io/concepts/nat/circuit-relay/)
45+
The `circuitRelayServer` function allows libp2p to function as a [Circuit Relay](https://libp2p.io/docs/circuit-relay/)
4646
server. This will not work in browsers.
4747

4848
## Example - Use as a server

packages/transport-webrtc/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The connection establishment phase of WebRTC involves a handshake using [SDP](ht
3636

3737
A third party is usually necessary to carry out this handshake, forwarding messages between the two peers until they can make a direct connection between themselves.
3838

39-
The WebRTC transport uses libp2p [Circuit Relay](https://docs.libp2p.io/concepts/nat/circuit-relay/)s to forward SDP messages. Once a direct connection is formed the relay plays no further part in the exchange.
39+
The WebRTC transport uses libp2p [Circuit Relay](https://libp2p.io/docs/circuit-relay/)s to forward SDP messages. Once a direct connection is formed the relay plays no further part in the exchange.
4040

4141
WebRTC Direct uses a technique known as [SDP munging](https://webrtchacks.com/not-a-guide-to-sdp-munging/) to skip the handshake step, instead encoding enough information in the connection request that the responder can derive what would have been in the handshake messages and so requires no third parties to establish a connection.
4242

packages/utils/README.md

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,7 @@ repo and examine the changes made.
2424
2525
-->
2626

27-
The libp2p ecosystem has lots of repos with it comes several problems like:
28-
29-
- Domain logic dedupe - all modules shared a lot of logic like validation, streams handling, etc.
30-
- Dependencies management - it's really easy with so many repos for dependencies to go out of control, they become outdated, different repos use different modules to do the same thing (like merging defaults options), browser bundles ends up with multiple versions of the same package, bumping versions is cumbersome to do because we need to go through several repos, etc.
31-
32-
These problems are the motivation for this package, having shared logic in this package avoids creating cyclic dependencies, centralizes common use modules/functions (exactly like aegir does for the tooling), semantic versioning for 3rd party dependencies is handled in one single place (a good example is going from streams 2 to 3) and maintainers should only care about having `libp2p-utils` updated.
33-
34-
## Example
35-
36-
Each function should be imported directly.
37-
38-
```TypeScript
39-
import { ipPortToMultiaddr } from '@libp2p/utils'
40-
41-
const ma = ipPortToMultiaddr('127.0.0.1', 9000)
42-
```
27+
This module contains utility functions used by libp2p modules.
4328

4429
# Install
4530

0 commit comments

Comments
 (0)