Skip to content

Commit

Permalink
Revises release and configuration docs
Browse files Browse the repository at this point in the history
  • Loading branch information
ominestre committed Apr 13, 2022
1 parent ae6afcd commit 447564c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
23 changes: 10 additions & 13 deletions documentation/how-to/create-a-config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
Let's assume you're in a situation where you want to use a global compliance period of 14 days, but due to technical limitations you are stuck to a specific version of ExpressJS and want to ignore it. Let's also assume you want to allow `captain-picard` 100 days to comply.

1. Create a `.json` configuration file, named anything you want, somewhere on your file system
2. Create a config with 2 rules for your specific use case
2. Create a config with 2 rules for your specific use case and set the default compliance period to 14 days

```json
{
"defaultExpiration": 14,
"rules": [
{
"dependencyName": "express",
Expand All @@ -24,20 +25,16 @@ Let's assume you're in a situation where you want to use a global compliance per

You should now see an output that reflects that `express` was ignored as well as not failing if you're other dependencies are within their defined compliance period. If this doesn't work as expected or you have questions feel free to drop us an issue on [our issue board](https://github.com/ominestre/rotten-deps/issues).

## Options
## Config Options

### Rules: `Array<Rule>`
### `defaultExpiration: number`

#### Rule
This is a number value to use as the default expiration for all dependencies. This is overridden if any specific dependency has it's own expiration date.

##### dependencyName: string
### `rules: Array<Rule>`

This is the exact name of the dependency you are configuring a rule for.
This is a collection of rules for each dependency. The individual rules have the following properties:

##### OPTIONAL ignore: boolean

If this value is set to true then this specific dependency being outdated will not trigger a failure. It will still show up in the report.

##### OPTIONAL daysUntilExpiration: number

This value sets the compliance period, measured in days, for the specific dependency.
- `dependencyName: string` The name of the dependency you're configuring a rule for
- OPTIONAL `ignore: boolean` Sets the dependency to be ignored. This will never trigger a fail due to being outdated.
- OPTIONAL `daysUntilExpiration: number` This sets the expiration period for the individual dependency
4 changes: 3 additions & 1 deletion documentation/how-to/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@
- Once the dummy version is created the docs are generated
- The docs and `CHANGELOG.md` are staged in git
- The real `npm version` is run creating a release commit and tag
3. Push the release using `git push origin master`
3. Push the release using `git push origin main`
4. Push the new tag using `git push --tags`
5. Login to NPM using `npm login`
6. Publish to NPM using `npm publish --access public`

0 comments on commit 447564c

Please sign in to comment.