@bugron/validate-dependabot-yaml

中文文档
0.3.4发布于 2026/11/07MITES Module构建来源已验证近 30 天下载 1778

CLI for validating Dependabot v2 YAML configuration files

原始使用文档
文档目录4 节
  1. Why?
  2. Usage
  3. Test coverage
  4. Any problem?

This CLI tests the dependabot.yml against a bundled copy of the official v2 JSON schema. It does not detect ALL invalid dependabot files as dependabot has extra validation beyond the JSON schema.

In addition to validating Dependabot configuration files against the schema, this tool also implements the following validations:

  • Directory/directories values must be unique and cannot overlap with the directory or directories entries in blocks that have the same ecosystem and target-branch. Docs
  • Ensures that dependency-type option is used with supported package ecosystems. Docs
  • Ensures cooldown semver-major-days, semver-minor-days, semver-patch-days options are used with supported package ecosystems Docs

Why?

If you get a validation error when editing your config, you won't know if there's a problem until the next dependabot runs. And if the cycle is long and the alarm is not set, it may be detected much later. This CLI allows you to find some problems even before committing dependabot.yml.

Usage

$ npx @bugron/validate-dependabot-yaml@latest --help

  CLI for validating Dependabot v2 YAML configuration files

  Usage
    $ npx @bugron/validate-dependabot-yaml [path]

  [path]
    Optional path to dependabot configuration file relative to current working directory (default: .github/dependabot.yml)

  Options
    --format, -f    Logger type, either json or markdown (default: markdown)
    --pretty, -p    Only used for json logger, prettifies JSON output

  Output
    Success: process exits with status 0, no output is logged
    Failure: process exits with status 1, JSON or Markdown formatted validation error messages are logged

  Examples
    $ npx @bugron/validate-dependabot-yaml
    $ npx @bugron/validate-dependabot-yaml config/dependabot.yaml
    $ npx @bugron/validate-dependabot-yaml .github/dependabot.yml --f=json --p
    $ npx @bugron/validate-dependabot-yaml .github/dependabot.yml --format=json --pretty
    $ npx @bugron/validate-dependabot-yaml .github/dependabot.yml --f=markdown
    $ npx @bugron/validate-dependabot-yaml .github/dependabot.yml --format=markdown

Test coverage

The validation logic is tested on almost all cases/examples from the official documentation and more.

Any problem?

Feel free to report issues. 😃

版本与发布记录

@bugron/validate-dependabot-yaml 共发布 12 个版本,首次发布于 2024/09/01;过去 12 个月发布了 3 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.3.4latest2026/11/072 天前
0.3.32026/01/169 个月前
0.3.22026/01/169 个月前
0.3.12025/09/211.1 年前
0.3.02025/09/211.1 年前
0.2.02025/09/201.1 年前

关于 @bugron/validate-dependabot-yaml 的常见问题

@bugron/validate-dependabot-yaml 是什么?

CLI for validating Dependabot v2 YAML configuration files

如何安装 @bugron/validate-dependabot-yaml?

在项目目录运行 npm install @bugron/validate-dependabot-yaml,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 validate-dependabot-yaml,可以用 npx validate-dependabot-yaml 直接运行。

@bugron/validate-dependabot-yaml 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/bugron__validate-dependabot-yaml 是否存在。

@bugron/validate-dependabot-yaml 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@bugron/validate-dependabot-yaml 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@bugron/validate-dependabot-yaml 可以商用吗?

@bugron/validate-dependabot-yaml 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bugron/validate-dependabot-yaml 的下载量有多少?

根据 npm 官方下载统计,@bugron/validate-dependabot-yaml 在 2026/10/09 – 2026/11/07 这 30 天内被下载 1,778 次,日均约 59 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@bugron/validate-dependabot-yaml 还在维护吗?

最新版本 0.3.4 发布于 2026/11/07(2 天前);至今共发布 12 个版本,其中过去 12 个月发布了 3 个;首次发布于 2024/09/01。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。