From 647fa5d6813d822665656a5094d7f0700910357b Mon Sep 17 00:00:00 2001 From: ominestre Date: Wed, 13 Apr 2022 16:56:50 -0400 Subject: [PATCH] 1.0.0 --- CHANGELOG.md | 24 +++++++++++++++++++ docs/index.html | 2 +- docs/interfaces/lib_config.Config.html | 2 +- .../lib_npm_interactions.OutdatedData.html | 2 +- .../lib_npm_interactions.OutdatedPackage.html | 2 +- .../lib_npm_interactions.PackageDetails.html | 2 +- docs/modules.html | 2 +- docs/modules/lib.html | 10 ++++---- docs/modules/lib_config.html | 8 +++---- docs/modules/lib_npm_interactions.html | 8 +++---- docs/pages/how-to/contribute-to-docs.html | 2 +- docs/pages/how-to/create-a-config-file.html | 2 +- package.json | 2 +- 13 files changed, 46 insertions(+), 22 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 11bf425..17f8b8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,27 @@ +## v1.0.0 + +🎉 With the hem and haw of the CHANGELOG all of the previous betas weren't done in a way to nicely rollup for the v1.0.0 release notes. So instead here is a nice list of the features I'm launching this with: + +### API + +- Everything is organized so that you can directly import `rotten-deps` and use it for programmatic report generation. You can also import the individual libraries for processing config and interacting with NPM but this isn't officially supported at this moment. + +### CLI + +- You can set a default expiration via the CLI flag `--default-expiration` +- You can output raw JSON instead of a table using the `--json` flag +- By default you get a nice table display + +### Exit codes for CI + +As mentioned in the main `README.md` the project uses exit codes to differentiate between a success (no outdated), a warn (some outdated but within compliance windows), and a fail (something is outdated beyond compliance window). + +### Configuration + +- You can flat out ignore a dependency from the check using the `ignore` property of a rule +- You can give a dependency it's own compliance window separate from the default expiration +- You can provide a reason for the whitelist to help you remember why you whitelisted it in the first place (e.g. Depends on Bootstrap v1.2.3 upgrade) + ## v1.0.0-beta.26 ### Enhancement diff --git a/docs/index.html b/docs/index.html index f6178f5..2d0d9e5 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,4 +1,4 @@ -rotten-deps - v1.0.0-beta.26
Options
All
  • Public
  • Public/Protected
  • All
Menu

rotten-deps - v1.0.0-beta.26

+rotten-deps - v1.0.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

rotten-deps - v1.0.0

Rotten Deps

diff --git a/docs/interfaces/lib_config.Config.html b/docs/interfaces/lib_config.Config.html index dd096f6..b68f59f 100644 --- a/docs/interfaces/lib_config.Config.html +++ b/docs/interfaces/lib_config.Config.html @@ -1 +1 @@ -Config | rotten-deps - v1.0.0-beta.26
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Config

Index

Properties

defaultExpiration?: number
kind?: "config"
rules: Rule[]

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +Config | rotten-deps - v1.0.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Config

Index

Properties

defaultExpiration?: number
kind?: "config"
rules: Rule[]

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/lib_npm_interactions.OutdatedData.html b/docs/interfaces/lib_npm_interactions.OutdatedData.html index 69f8e00..551f69a 100644 --- a/docs/interfaces/lib_npm_interactions.OutdatedData.html +++ b/docs/interfaces/lib_npm_interactions.OutdatedData.html @@ -1 +1 @@ -OutdatedData | rotten-deps - v1.0.0-beta.26
Options
All
  • Public
  • Public/Protected
  • All
Menu

Legend

  • Variable
  • Function
  • Type alias
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +OutdatedData | rotten-deps - v1.0.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

Legend

  • Variable
  • Function
  • Type alias
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/lib_npm_interactions.OutdatedPackage.html b/docs/interfaces/lib_npm_interactions.OutdatedPackage.html index eea5e52..08dc59d 100644 --- a/docs/interfaces/lib_npm_interactions.OutdatedPackage.html +++ b/docs/interfaces/lib_npm_interactions.OutdatedPackage.html @@ -1 +1 @@ -OutdatedPackage | rotten-deps - v1.0.0-beta.26
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • OutdatedPackage

Index

Properties

current: string
latest: string
location: string
wanted: string

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +OutdatedPackage | rotten-deps - v1.0.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • OutdatedPackage

Index

Properties

current: string
latest: string
location: string
wanted: string

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/interfaces/lib_npm_interactions.PackageDetails.html b/docs/interfaces/lib_npm_interactions.PackageDetails.html index 7658b77..c52bcd2 100644 --- a/docs/interfaces/lib_npm_interactions.PackageDetails.html +++ b/docs/interfaces/lib_npm_interactions.PackageDetails.html @@ -1 +1 @@ -PackageDetails | rotten-deps - v1.0.0-beta.26
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PackageDetails

Index

Properties

Properties

name: string
time: Record<string, string>

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +PackageDetails | rotten-deps - v1.0.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PackageDetails

Index

Properties

Properties

name: string
time: Record<string, string>

Legend

  • Variable
  • Function
  • Type alias
  • Interface
  • Property

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules.html b/docs/modules.html index 0a833f1..6afb08c 100644 --- a/docs/modules.html +++ b/docs/modules.html @@ -1 +1 @@ -rotten-deps - v1.0.0-beta.26
Options
All
  • Public
  • Public/Protected
  • All
Menu

rotten-deps - v1.0.0-beta.26

Legend

  • Variable
  • Function
  • Type alias
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file +rotten-deps - v1.0.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

rotten-deps - v1.0.0

Legend

  • Variable
  • Function
  • Type alias
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/modules/lib.html b/docs/modules/lib.html index 48fb7a7..5b3c76c 100644 --- a/docs/modules/lib.html +++ b/docs/modules/lib.html @@ -1,6 +1,6 @@ -lib | rotten-deps - v1.0.0-beta.26
Options
All
  • Public
  • Public/Protected
  • All
Menu
+lib | rotten-deps - v1.0.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

Rotten Deps API

-

Index

Type aliases

ReportResponse: Report | ReportWithWarning

Variables

configuration: { createConfig: (config: Config) => Config; createFileReader: (absoluteFilePath: string) => FileReader } = ...

Type declaration

Index

Type aliases

ReportResponse: Report | ReportWithWarning

Variables

configuration: { createConfig: (config: Config) => Config; createFileReader: (absoluteFilePath: string) => FileReader } = ...

Type declaration

  • createConfig: (config: Config) => Config
      • Validates a raw configuration file and generates a report if any rules are misconfigured.

        Parameters

        • config: Config
          @@ -10,7 +10,7 @@ file at the provided path.

          Parameters

          • absoluteFilePath: string

            absolute path to the configuration file

            -

          Returns FileReader

default: { configuration: { createConfig: (config: Config) => Config; createFileReader: (absoluteFilePath: string) => FileReader }; generateReport: (c: Config, r?: Reporter) => Promise<ReportResponse | Error>; npm: { createDetailsRequest: (dependencyName: string) => DetailsRequest; createOutdatedRequest: () => OutdatedRequest } }

Type declaration

  • configuration: { createConfig: (config: Config) => Config; createFileReader: (absoluteFilePath: string) => FileReader }
default: { configuration: { createConfig: (config: Config) => Config; createFileReader: (absoluteFilePath: string) => FileReader }; generateReport: (c: Config, r?: Reporter) => Promise<ReportResponse | Error>; npm: { createDetailsRequest: (dependencyName: string) => DetailsRequest; createOutdatedRequest: () => OutdatedRequest } }

Type declaration

  • configuration: { createConfig: (config: Config) => Config; createFileReader: (absoluteFilePath: string) => FileReader }
    • createConfig: (config: Config) => Config
        • Validates a raw configuration file and generates a report if any rules are misconfigured.

          Parameters

          • config: Config
            @@ -30,12 +30,12 @@

            Parameters

            • dependencyName: string

            Returns DetailsRequest

      • createOutdatedRequest: () => OutdatedRequest
          • (): OutdatedRequest
          • Creates a function for running npm outdated

            -

            Returns OutdatedRequest

npm: { createDetailsRequest: (dependencyName: string) => DetailsRequest; createOutdatedRequest: () => OutdatedRequest } = ...

Type declaration

  • createDetailsRequest: (dependencyName: string) => DetailsRequest
      • (dependencyName: string): DetailsRequest
      • +

        Returns OutdatedRequest

npm: { createDetailsRequest: (dependencyName: string) => DetailsRequest; createOutdatedRequest: () => OutdatedRequest } = ...

Type declaration

  • createDetailsRequest: (dependencyName: string) => DetailsRequest
      • (dependencyName: string): DetailsRequest
      • Creates a function to run the npm view command for a specific dependency

        Parameters

        • dependencyName: string

        Returns DetailsRequest

  • createOutdatedRequest: () => OutdatedRequest
      • (): OutdatedRequest
      • Creates a function for running npm outdated

        -

        Returns OutdatedRequest

Functions

Functions

  • Compares the details on each dependency flagged as outdated in order to determine how stale a version actually is.

    Parameters

    • c: Config
    • Optional r: Reporter
      diff --git a/docs/modules/lib_config.html b/docs/modules/lib_config.html index b2edff0..7cd67cb 100644 --- a/docs/modules/lib_config.html +++ b/docs/modules/lib_config.html @@ -1,6 +1,6 @@ -lib/config | rotten-deps - v1.0.0-beta.26
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu
      +lib/config | rotten-deps - v1.0.0
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Rotten Deps configuration library

      -

      Index

      Interfaces

      Variables

      Functions

      Variables

      default: { createConfig: (config: Config) => Config; createFileReader: (absoluteFilePath: string) => FileReader }

      Type declaration

      Index

      Interfaces

      Variables

      Functions

      Variables

      default: { createConfig: (config: Config) => Config; createFileReader: (absoluteFilePath: string) => FileReader }

      Type declaration

      • createConfig: (config: Config) => Config
          • Validates a raw configuration file and generates a report if any rules are misconfigured.

            Parameters

            • config: Config
              @@ -10,12 +10,12 @@ file at the provided path.

              Parameters

              • absoluteFilePath: string

                absolute path to the configuration file

                -

              Returns FileReader

      Functions

      Returns FileReader

Functions

  • Validates a raw configuration file and generates a report if any rules are misconfigured.

    Parameters

    • config: Config

      rotten deps configuration object

      -

    Returns Config

  • createFileReader(absoluteFilePath: string): FileReader

Returns Config

  • createFileReader(absoluteFilePath: string): FileReader
  • Creates a filereader function for fetching the contents of a config file at the provided path.

    Parameters

    • absoluteFilePath: string
      diff --git a/docs/modules/lib_npm_interactions.html b/docs/modules/lib_npm_interactions.html index 55b471a..1963d4e 100644 --- a/docs/modules/lib_npm_interactions.html +++ b/docs/modules/lib_npm_interactions.html @@ -1,13 +1,13 @@ -lib/npm-interactions | rotten-deps - v1.0.0-beta.26
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu
      +lib/npm-interactions | rotten-deps - v1.0.0
      Options
      All
      • Public
      • Public/Protected
      • All
      Menu

      Module lib/npm-interactions

      Rotten Deps NPM Interactions library

      -

      Index

      Variables

      default: { createDetailsRequest: (dependencyName: string) => DetailsRequest; createOutdatedRequest: () => OutdatedRequest }

      Type declaration

      • createDetailsRequest: (dependencyName: string) => DetailsRequest
          • (dependencyName: string): DetailsRequest
          • +

      Index

      Variables

      default: { createDetailsRequest: (dependencyName: string) => DetailsRequest; createOutdatedRequest: () => OutdatedRequest }

      Type declaration

      • createDetailsRequest: (dependencyName: string) => DetailsRequest
          • (dependencyName: string): DetailsRequest
          • Creates a function to run the npm view command for a specific dependency

            Parameters

            • dependencyName: string

            Returns DetailsRequest

      • createOutdatedRequest: () => OutdatedRequest
          • (): OutdatedRequest
          • Creates a function for running npm outdated

            -

            Returns OutdatedRequest

      Functions

      • createDetailsRequest(dependencyName: string): DetailsRequest

Functions

  • createDetailsRequest(dependencyName: string): DetailsRequest
  • Creates a function to run the npm view command for a specific dependency

    Parameters

    • dependencyName: string
      -

    Returns DetailsRequest

  • createOutdatedRequest(): OutdatedRequest

Returns DetailsRequest

  • createOutdatedRequest(): OutdatedRequest

Legend

  • Variable
  • Function
  • Type alias
  • Interface

Settings

Theme

Generated using TypeDoc

\ No newline at end of file diff --git a/docs/pages/how-to/contribute-to-docs.html b/docs/pages/how-to/contribute-to-docs.html index 403f5c6..f157a94 100644 --- a/docs/pages/how-to/contribute-to-docs.html +++ b/docs/pages/how-to/contribute-to-docs.html @@ -1,4 +1,4 @@ -Contribute to these docs | rotten-deps - v1.0.0-beta.26
Options
All
  • Public
  • Public/Protected
  • All
Menu
+Contribute to these docs | rotten-deps - v1.0.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

Contribute to these docs

How to contribute to the documentation

diff --git a/docs/pages/how-to/create-a-config-file.html b/docs/pages/how-to/create-a-config-file.html index abba6ac..0bba2f1 100644 --- a/docs/pages/how-to/create-a-config-file.html +++ b/docs/pages/how-to/create-a-config-file.html @@ -1,4 +1,4 @@ -Release | rotten-deps - v1.0.0-beta.26
Options
All
  • Public
  • Public/Protected
  • All
Menu
+Release | rotten-deps - v1.0.0
Options
All
  • Public
  • Public/Protected
  • All
Menu

How to create and use a configuration file

diff --git a/package.json b/package.json index 74ae4d5..fc941c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rotten-deps", - "version": "1.0.0-beta.26", + "version": "1.0.0", "description": "The command `npm outdated` only has two endpoints which are pass or fail. This dichotomy isn't very useful for CI flows which have pass, fail, or warn. This CLI utility combines `npm outdated` and `npm view` in order to establish a compliance period for dependency checks. This way if a dependency update is within your compliance period you can trigger a warn or if it's beyond your compliance period it can trigger a fail.", "main": "lib/index.js", "bin": "bin/rotten-deps.js",