1
0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-02-21 07:29:37 +01:00

chore: keep_readmes docs (#5052)

* chore: `keep_readmes` docs

* clean-up type

* fix indent (tab to space)
This commit is contained in:
Marc Bernard 2025-02-02 11:02:14 +01:00 committed by GitHub
parent 7fb6950996
commit 058860593a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 36 additions and 18 deletions

@ -0,0 +1,7 @@
---
'@verdaccio/config': patch
'@verdaccio/types': patch
'@verdaccio/website': patch
---
chore: `keep_readmes` docs

@ -121,6 +121,7 @@ server:
# publish:
# allow_offline: false
# check_owners: false
# keep_readmes: 'latest' | 'tagged' | 'all'
# https://verdaccio.org/docs/configuration#url-prefix
# url_prefix: /verdaccio/
@ -143,11 +144,11 @@ server:
# expiresIn: 29d
# verify:
# someProp: [value]
# web:
# sign:
# expiresIn: 1h # 1 hour by default
# verify:
# someProp: [value]
# web:
# sign:
# expiresIn: 1h # 1 hour by default
# verify:
# someProp: [value]
# https://verdaccio.org/docs/configuration#user-rate-limit
# userRateLimit:

@ -127,6 +127,7 @@ server:
# publish:
# allow_offline: false
# check_owners: false
# keep_readmes: 'latest' | 'tagged' | 'all'
# https://verdaccio.org/docs/configuration#url-prefix
# url_prefix: /verdaccio/
@ -149,11 +150,11 @@ server:
# expiresIn: 29d
# verify:
# someProp: [value]
# web:
# sign:
# expiresIn: 1h # 1 hour by default
# verify:
# someProp: [value]
# web:
# sign:
# expiresIn: 1h # 1 hour by default
# verify:
# someProp: [value]
# https://verdaccio.org/docs/configuration#user-rate-limit
# userRateLimit:

@ -196,11 +196,11 @@ export interface Security {
api: APITokenOptions;
}
export type ReadmeOptions = 'latest' | 'tagged' | 'all' | undefined;
export type ReadmeOptions = 'latest' | 'tagged' | 'all';
export interface PublishOptions {
allow_offline: boolean;
keep_readmes: ReadmeOptions;
keep_readmes?: ReadmeOptions;
check_owners: boolean;
}

@ -129,7 +129,7 @@ security:
sign:
expiresIn: 1h # 1 hour by default
verify:
someProp: [value]
someProp: [value]
```
### Server {#server}
@ -183,14 +183,14 @@ packages:
### Offline Publish {#offline-publish}
By default `verdaccio` does not allow you to publish packages when the client is offline. This can be overridden by setting this value to _true_.
By default Verdaccio does not allow you to publish packages when the client is offline. This can be overridden by setting this value to _true_.
```yaml
publish:
allow_offline: false
```
### Checking Package Ownership {#chec-owner}
### Checking Package Ownership {#check-owner}
By default, [package access](packages.md) defines who is allowed to publish and unpublish packages. By setting `check_owners` to _true_, only package owners are allowed to make changes to a package. The first owner of a package is the user who published the first version. Further owners can be added or removed using [`npm owner`](https://docs.npmjs.com/cli/v10/commands/npm-owner). You can find the list of current owners using `npm owner list` or by checking the package manifest under `maintainers`.
@ -199,6 +199,15 @@ publish:
check_owners: false
```
### Keep Readmes {#keep-readmes}
By default, Verdaccio stores only the readme markdown of the latest version for each package. Setting `keep_readmes` to `'tagged'` keeps the readmes of versions with `dist-tags` (for example, `latest`, `next`, and major branches). Using the `'all'` setting will retain the complete history of readme versions. Note that `'all'` can significantly increase the required storage space for packages published to Verdaccio!
```yaml
publish:
keep_readmes: 'tagged'
```
<small>Since: `verdaccio@2.3.6` due [#223](https://github.com/verdaccio/verdaccio/pull/223)</small>
### URL Prefix {#url-prefix}

@ -143,7 +143,7 @@ If verdaccio runs on **Node.js 22** or higher, you will not see this warning sin
The **migrateToSecureLegacySignature** property is only available for versions higher than 5.31.0 and is **false** by default.
:::info
:::
```yaml
security:
@ -170,7 +170,7 @@ security:
sign:
expiresIn: 1h # 1 hour by default
verify:
someProp: [value]
someProp: [value]
```
### Server {#server}
@ -224,7 +224,7 @@ packages:
### Offline Publish {#offline-publish}
By default `verdaccio` does not allow you to publish packages when the client is offline. This can be can be overridden by setting this value to _true_.
By default Verdaccio does not allow you to publish packages when the client is offline. This can be can be overridden by setting this value to _true_.
```yaml
publish: