npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@bepo65/license-report

v5.0.0-beta.1

Published

creates a short report about project's dependencies (license, url etc)

Downloads

3

Readme

license report tool

generate a license report of the projects dependencies

This is a preliminary beta release of the latest changes to the license-report project.

Installation

npm install -g license-report

Functionality

license-report reads data from a package.json file and adds detailed version information about the installed versions from the corresponding package-lock.json file and about the latest available version from the (npm) registry.

Usage

simple:

cd your/project/
license-report

by default, license-report outputs all licenses from dependencies, devDependencies, optionalDependencies and peerDependencies.
To specify one or the other, use --only; e.g.

license-report --only=dev
license-report --only=prod
license-report --only=prod,opt,peer

The 'only' option is a comma separated list of the dependencies to use.
Possible values are: |value|segment of package.json| |---|---| |prod|dependencies| |dev|devDependencies| |opt|optionalDependencies| |peer|peerDependencies|

explicit package.json:

license-report --package=/path/to/package.json

customize a field's label:

Used as column headers in table / csv / html output. For html output the labels of all fields in the output must be unique.

license-report --department.label=division

customize a fields default value:

Only applicable for the fields in the list later in this document (look for "Fields with data set in the configuration of license-report")

license-report --department.value=ninjaSquad

use another registry:

license-report --registry=https://myregistry.com/

registry with authorization:

To use a npm registry that requires authorization, the option npmTokenEnvVar must contain the name of an environment variable that contains the required npm authorization token (the default name is 'NPM_TOKEN'). An example:

# if the name of the environment variable containing the bearer token for npm authorization is 'NPM_TOKEN'
license-report --registry=https://myregistry.com/ --npmTokenEnvVar=NPM_TOKEN

The name of this environment variable (in the example: 'npm_token') should not be added as an option to the license-report config file, as this implies a severe security risk, when this file is checked in into a git repository. A warning is emitted if such an option is found in the config file.

generate different outputs:

license-report --output=table
license-report --output=json
license-report --output=csv
license-report --output=html

# replace default ',' separator with something else
license-report --output=csv --delimiter="|" 

# output csv headers (fields) on first row
license-report --output=csv --csvHeaders

# use custom stylesheet for html output
license-report --output=html --html.cssFile=/a/b/c.css

# see the output immediately in your browser, use hcat (npm i -g hcat)
license-report --output=html | hcat

select fields for output:

# set options with command line options and config file
license-report --output=csv --config license-report-config.json
# example of config file for backward compatible output:
{
  "fields": [
    "department",
    "relatedTo",
    "name",
    "licensePeriod",
    "material",
    "licenseType",
    "link",
    "comment",
    "installedVersion",
    "author"
  ]
}

exclude packages:

license-report --exclude=async --exclude=rc

Screenshots

screenshot screenshot1

Available fields

Fields with data of the installed packages: | fieldname | column title | data source | |---|---|---| | name | name | name of the package | | licenseType | license type | type of the license of the package (e.g. MIT) | | link | link | link to the repository of the package | | remoteVersion | remote version | latest available version of the package (can be different from the installed version) | | installedVersion | installed version | installed version of the package (can be different from the remote version) | | definedVersion | defined version | version of the package as defined in the (dev-) dependencies entry (can start with a semver range character) | | comment | comment | deprecated (replaced by field 'remoteVersion'); will be removed in a future version | | author | author | author of the package |

Fields with data set in the configuration of license-report: | fieldname | column title | set value | |--|---|---| | department | department | --department.value=kessler | | relatedTo | related to | --relatedTo.value=stuff | | licensePeriod | license period | --licensePeriod.value=perpetual | | material | material / not material | --material.value=material |

More configuration options

See lib/config.js for more details e.g. on customizing the generated html data.

Use rc for further customization.

Debug report generation

By setting the debug environment variable as follows, detailed log information is generated during the report generation. For details see the documentation of the debug package on npm.

export DEBUG=license-report*

ironSource logo