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

elm-license-checker

v2.4.0

Published

Check the licenses of Elm packages.

Downloads

1,933

Readme

Elm License Checker

NPM Pursuit test Join the chat at https://gitter.im/elm-license-checker/community Sponsor

Treats the licenses of the dependent packages.

This is inspired by NPM License Checker.

CLI Interface

You can show the package information with the selected fields.

> elm-license-checker --customPath format.json
├─ elm/[email protected]
│  ├─ name: elm/json
│  ├─ version: 1.1.3
│  ├─ summary: Encode and decode JSON values
│  ├─ license: BSD-3-Clause
│  └─ licenseFile: C:\Users\kazuki\AppData\Roaming\elm\0.19.1\packages\elm\json\1.1.3\LICENSE
├─ elm/[email protected]
│  ├─ name: elm/time
│  ├─ version: 1.0.0
│  ├─ summary: Work with POSIX times, time zones, years, months, days, hours, seconds, etc.
│  ├─ license: BSD-3-Clause
│  └─ licenseFile: C:\Users\kazuki\AppData\Roaming\elm\0.19.1\packages\elm\time\1.0.0\LICENSE
:

See the section “Compatibility with NPM License Checker” for options.

Custom Format

Fields that a format file contains are outputted. Values of fields that licenses do not have are given as ones of fields in a format file. Please also refer a document of the NPM License Checker.

There are an example file in test-asset/format.json.

Library Interface

The following is how to use this as a module.

The JavaScript interface is compatible with NPM License Checker, but is actually a subset.

See the section “Compatibility with NPM License Checker”.

const elc = require('elm-license-checker');

elc.init(
  { start: '/path/to/elm-application' },
  function (err, packages) {
    if (err) {
      // handle the error
    } else {
      // use the packages
    }
  }
);

The PureScript interface is also available.

import Prelude
import Effect (Effect)
import ElmLicenseChecker (init)

main :: Effect Unit
main = do
  packages <- init "/path/to/elm-application"
  -- use the packages

Compatibility with NPM License Checker

Statuses are:

  • ⭕ implemented
  • ❌ ignored
  • 📈 decided to be implemented but not yet done
  • 📉 decided to be ignored but not yet done
  • ⌛ not decided whether implemented or not

Options

| Option | CLI | JS | PS | Description | |--------------------------|:---:|:--:|:--:|-----------------------------------------------------------------------------------------------------| | production | ⌛ | ⌛ | ⌛ | only show production dependencies | | development | ⌛ | ⌛ | ⌛ | only show development dependencies | | start | 📈 | ⭕ | ⭕ | give where elm.json is | | unknown | ⌛ | ⌛ | ⌛ | report guessed licenses as unknown licenses | | onlyunknown | ⌛ | ⌛ | ⌛ | only list packages with unknown or guessed licenses | | json | ⭕ | 📈 | ❌ | output in json format | | csv | ⌛ | ⌛ | ❌ | output in csv format | | csvComponentPrefix | ⌛ | ⌛ | ⌛ | prefix column for component in csv format | | out | ⭕ | ❌ | ❌ | write the data to a specific file | | customPath | ⭕ | ⭕ | ❌ | add a custom format file in JSON | | exclude | ⌛ | ⌛ | ⌛ | exclude modules which licenses are in the comma-separated list from the output | | relativeLicensePath | ⌛ | ⌛ | ⌛ | output the location of the license files as relative paths | | summary | ⌛ | ⌛ | ⌛ | output a summary of the license usage | | failOn | ⌛ | ⌛ | ⌛ | fail (exit with code 1) on the first occurrence of the licenses of the semicolon-separated list | | onlyAllow | ⌛ | ⌛ | ⌛ | fail (exit with code 1) on the first occurrence of the licenses not in the semicolon-separated list | | packages | ⌛ | ⌛ | ⌛ | restrict output to the packages (package@version) in the semicolon-separated list | | excludePackages | ⌛ | ⌛ | ⌛ | restrict output to the packages (package@version) not in the semicolon-separated list | | excludePrivatePackages | ⌛ | ⌛ | ⌛ | restrict output to not include any package marked as private | | direct | ⌛ | ⌛ | ⌛ | look for direct dependencies only |

Custom Format

There are compatible fields:

  • name
  • version
  • description the same as summary
  • copyright always empty
  • licenses the same as license
  • licenseFile
  • licenseText
  • licenseModified always empty

There are added fields:

  • summary
  • license