@equinor/echo-update

中文文档
2.0.0发布于 2026/04/09MITTypeScriptES Module近 30 天下载 2232

Echo dependency updater

原始使用文档
文档目录8 节
  1. Npm Install
  2. Usage
  3. Npm Install
  4. Usage
  5. NPM build
  6. Run it locally with Node
  7. Yalc: For testing echo-update as you develop
  8. Echo Update is now an ESM module

logo

EchoUpdate

This is a simple tool for updating echo npm packages, or optionally all npm packages.

Major.Minor.Patch

  • Auto update if new stable Minor or Patch. Stable = Major.Minor.Patch without any other text
  • New Major - Show selection dialogue: New Major and Current Major on top, and then the rest listed sorted.
  • New Minor & Fixed-version - Show selection dialogue if current package is fixed
  • New Minor - Show selection dialogue if new unstable version (a few packages have release candidates tagged as latest)
  • Don't upgrade if it contains several versions or > <. Like "<1.0.0" "2.3.1 || 2.4.5"
  • Keep any prefixes in version name, like: ~ ^ etc.

Log/Output

  • Green if updated
  • Red if manually update is needed
  • Yellow if fixed and not updating
  • White/grey if no updates
OPTIONS
  -a, --all            Will update all packages, not just echo-packages
  -d, --dev            Will skip update for devDependencies
  -e, --peer           Will skip update for peerDependencies
  -f, --filter=filter  Will only update packages matching the filter, example: --filter=*react*
  -i, --skipFixed      Will skip dialogue and update for new fixed-version
  -m, --skipMajor      Will skip dialogue and update for new major-version
  -o, --optional       Will skip update for optionalDependencies
  -p, --path=path      The path (directory) containing package.json

EXAMPLES
  echo-update                                | update echo packages
  echo-update --all                          | update all packages
  echo-update --filter=*jest*                | update all packages that includes jest
  echo-update -f=jest                        | only update the jest package
  echo-update -a --path="./folder"           | only update the jest package
  echo-update -a --skipFixed --skipMajor     | update all minor- & patch-versions, skip dialogue for major- & fixed-versions

Global

For global use install package globally and use echo-update in your command line.

Npm Install

$ npm install @equinor/echo-update -g

Usage

For global use, navigate to the folder with the package.json and use the following commands.

To update all echo packages, run:

$ echo-update

For any special cases where one need a specific version one can use one of the following commands. For version select use.

$ echo-update -v

For selecting 'beta' and 'next' version.

$ echo-update -c

For updating all packages (not just echo), run:

$ echo-update -a

For running it on a different path/directory, run:

$ echo-update --path="../EchoCli/"

Local

For local use in a specific project.

Npm Install

$ npm install @equinor/echo-update -D

Add scripts to your package.json.

{
    "scripts": {
        // Other scripts...
        "echo-update": "echo-update",
        "echo-update-version": "echo-update -v",
        "echo-update-next": "echo-update -c",
        "echo-update-all": "echo-update -a"
    }
}

Usage

If you install package as dependency then add commands the following to your script section in the package.json

To update the echo packages, run:

$ npm run echo-update

To update all packages, run:

$ npm run echo-update-all

Development

First time usage, run following command first:

$ npm install

NPM build

$ npm run build
$ yalc publish

Run it locally with Node

You can run the script locally with node after a build. Example where it updates all packages for EchoCli using the specified path:

cd non-monorepo-libs/echo-update
npm run build
node ./lib/index.js --path="./" -a              <-- Echo-update
node ./lib/index.js --path="../echo-cli/" -a    <-- Echo-Cli
node ./lib/index.js --path="../../" -a          <-- Echopedia
node ./lib/index.js --path="./sampleFile/" -a   <-- Sample file for testing

Yalc: For testing echo-update as you develop

Remember to add scripts to package.json as described earlier in local section.

In echo-update:

$ npm run build
$ yalc publish

In your other repository where you want to test this (run both these each time you want to test a different echo-update option):

$ yalc add @equinor/echo-update
$ npm run echo-update-all

You need to run all these commands if you do a change and want to test again.

Publish to NPM

Seems like we have to publish this from our local machine.

cd non-monorepo-libs/echo-update/
npm run build
npm pack
npm publish --dry-run
npm publish --access public

Echo Update is now an ESM module

From version v2.0.0 echo update is an ESM module, since the dependency inquirer switched to ESM as well.

版本与发布记录

@equinor/echo-update 共发布 21 个版本,首次发布于 2021/08/23;过去 12 个月发布了 1 个版本。

版本发布日期距今
2.0.0latest2026/04/097 个月前
1.3.42025/10/211.1 年前
1.3.32025/01/091.8 年前
1.3.3-beta-0beta2025/01/091.8 年前
1.3.22023/11/033 年前
1.3.2-beta-02023/11/033 年前

关于 @equinor/echo-update 的常见问题

@equinor/echo-update 是什么?

Echo dependency updater

如何安装 @equinor/echo-update?

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

@equinor/echo-update 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@equinor/echo-update 支持 ESM 还是 CommonJS?

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

@equinor/echo-update 需要什么版本的 Node.js?

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

@equinor/echo-update 可以商用吗?

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

@equinor/echo-update 的下载量有多少?

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

@equinor/echo-update 还在维护吗?

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