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 🙏

© 2026 – Pkg Stats / Ryan Hefner

dsh-license-guard

v0.1.0

Published

依赖许可证合规:扫描 node_modules 许可证、归一化 SPDX 标识、按宽松/弱传染/强传染分类,并做发布前合规校验

Readme

dsh-license-guard · 依赖许可证合规

扫描项目 node_modules 中每个依赖的许可证,归一化为 SPDX 标识,按「宽松 / 弱传染 / 强传染 / 未知 / 未授权」分类,并支持发布前的允许/禁止策略校验。纯 Node 实现,无网络、无外部服务。

提供的工具

| 工具 | 作用 | |---|---| | license_scan | 扫描全部依赖许可证,分类汇总 | | license_check | 按允许/禁止策略校验,返回违规依赖 |

安装

dsh plugin add dsh-license-guard

安装后在 profile 的 package.json 的 dsh.profile.bundles 中加入 "dsh-license-guard"。

用法示例

看看这个项目依赖的许可证构成
→ 调用 license_scan(root="/workspace")

发布前做一次合规门禁
→ 调用 license_check(root="/workspace", deny=["AGPL-3.0"])

默认策略

  • 默认允许:MIT、Apache-2.0、ISC、BSD、0BSD、Zlib、Unlicense、CC0-1.0 等宽松许可证。
  • 默认禁止:GPL-3.0、AGPL-3.0、SSPL-1.0、GPL-2.0 等强传染许可证。
  • 未知 / 未授权许可证默认计入违规(可用 includeUnknown: false 关闭)。

说明

  • 许可证识别基于各依赖 package.json 的 license / licenses 字段,识别不到的会标记为「未知」。
  • 这属于启发式合规筛查,正式商用/发布前请以法律复核为准。