@devicefarmer/please-update-dependencies

中文文档
2.0.2发布于 2024/11/27Apache-2.0CommonJS近 30 天下载 2074

It checks that currently installed dependencies satisfy the requirements set in your package.json file

此软件包已被标记为弃用

Merged into @devicefarmer/stf 3.9.0 and no longer maintained

原始使用文档
文档目录5 节
  1. Benefits/philosophy
  2. Pros
  3. Cons
  4. Installation
  5. License

@devicefarmer/please-update-dependencies

npm

@devicefarmer/please-update-dependencies is a useful addition to Node.js CLI applications. It checks that currently installed dependencies satisfy the requirements set in your package.json, and won't let the user continue till they've updated the dependencies.

Example

Benefits/philosophy

Pros

  • Easy to understand error messages.
  • Encourages users to solve issues by themselves rather than overloading the maintainer with questions or issues.
  • No output when nothing's wrong.

Cons

  • If you release a botched update and forget to release a dependency that you've bumped up, users can't run your app.
  • Only semver compatible dependencies are checked.
    • If you use URLs as dependencies, they will simply be ignored.
  • Slight but mostly unnoticeable overhead.

Installation

Using yarn:

yarn add @devicefarmer/please-update-dependencies

Using npm:

npm install --save @devicefarmer/please-update-dependencies

Now, in your main file, before anything else, insert the following line:

require('@devicefarmer/please-update-dependencies')(module)

If you're using Babel or similar, you probably have an existing entry point. You should put the line there before activating babel or anything else.

If you don't put the line as the first thing in your file, you risk running into incompatibilities before any checks even run.

The dependency check will run every time the binary is invoked, unless you've exported ALLOW_OUTDATED_DEPENDENCIES=1. It'll find the nearest package.json (either in the same folder or a parent folder) and check things from there.

License

See LICENSE.

版本与发布记录

@devicefarmer/please-update-dependencies 共发布 2 个版本,首次发布于 2022/05/10;过去 12 个月发布了 0 个版本。

版本发布日期距今
2.0.2latest2024/11/272 年前
2.0.12022/05/104 年前

关于 @devicefarmer/please-update-dependencies 的常见问题

@devicefarmer/please-update-dependencies 是什么?

It checks that currently installed dependencies satisfy the requirements set in your package.json file注意:该包已被作者标记为弃用——Merged into @devicefarmer/stf 3.9.0 and no longer maintained

如何安装 @devicefarmer/please-update-dependencies?

在项目目录运行 npm install @devicefarmer/please-update-dependencies,或使用 pnpm add / yarn add / bun add。

@devicefarmer/please-update-dependencies 支持 TypeScript 吗?

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

@devicefarmer/please-update-dependencies 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@devicefarmer/please-update-dependencies 可以商用吗?

@devicefarmer/please-update-dependencies 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@devicefarmer/please-update-dependencies 的下载量有多少?

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

@devicefarmer/please-update-dependencies 还在维护吗?

最新版本 2.0.2 发布于 2024/11/27(2 年前);至今共发布 2 个版本,其中过去 12 个月发布了 0 个;首次发布于 2022/05/10。作者已将其标记为弃用,新项目建议寻找替代方案。