updates
is a CLI tool which checks for npm dependency updates of the current project and optionally updates package.json
. It is highly configurable and is typically able to complete in less than a second.
# install globally
npm i -g updates
# or install locally as a devDependency and run via `npx updates`
npm i -D updates
Then, check for new updates:
updates
When changes are satisfactory, update package.json
and reinstall modules:
updates -u && npm i
To only reinstall modules when updates are available:
updates -uU && npm i
On a CI, it might be desireable to fail a build when updates are available:
updates -E
See --help
or below for the available options. Option that take multiple arguments can take them either via comma-separated value or by specifying the option multiple times. If an option has a optional pkg
argument but none is given, the option will be applied to all packages instead.
usage: updates [options]
Options:
-u, --update Update versions and write package.json
-p, --prerelease [<pkg,...>] Consider prerelease versions
-R, --release [<pkg,...>] Only use release versions, may downgrade
-g, --greatest [<pkg,...>] Prefer greatest over latest version
-i, --include <pkg,...> Include only given packages
-e, --exclude <pkg,...> Exclude given packages
-t, --types <type,...> Check only given dependency types
-P, --patch [<pkg,...>] Consider only up to semver-patch
-m, --minor [<pkg,...>] Consider only up to semver-minor
-d, --allow-downgrade [<pkg,...>] Allow version downgrades when using latest version
-E, --error-on-outdated Exit with code 2 when updates are available and 0 when not
-U, --error-on-unchanged Exit with code 0 when updates are available and 2 when not
-r, --registry <url> Override npm registry URL
-G, --githubapi <url> Override Github API URL
-f, --file <path> Use given package.json file or module directory
-S, --sockets <num> Maximum number of parallel HTTP sockets opened. Default: 96
-j, --json Output a JSON object
-c, --color Force-enable color output
-n, --no-color Disable color output
-v, --version Print the version
-V, --verbose Print verbose output to stderr
-h, --help Print this help
Examples:
$ updates
$ updates -u
$ updates -u -m -e eslint
$ updates -u -U && rm -rf node_modules && npm i
The JSON output is an object with possible properties results
, message
and error
:
updates -j | jq
{
"results": {
"dependencies": {
"p-map": {
"old": "3.0.0",
"new": "4.0.0",
"info": "https://github.com/sindresorhus/p-map",
"age": "3 days"
}
},
"devDependencies": {
"eslint": {
"old": "6.7.2",
"new": "6.8.0",
"info": "https://github.com/eslint/eslint",
"age": "3 months"
}
}
}
}
© silverwind, distributed under BSD licence
对于研发而言,线上数据库update和delete是非常频繁的,因而经常出现update和delete时,后面忘记添加where条件的限制,导致整个表误删除,或者是误更新,造成很多灾难是非常常见的事情,如何彻底解决这样的人为的数据库故障或者减少这种人为的故障了,那就是从根本上控制好mysql数据库的权限,禁止给研发人员update和delete数据库的权限,严格SQL语句上线之前的审核,减少人为的
Mysql数据库log-slave-updates 参数解释 如果写的不对,还请大家批评指正。谢谢 本文需要验证的疑问: 从库做为其他从库的主库时 log-slave-updates参数是必须要添加的,因为从库要作为其他从库的主库,必须添加该参数。该参数就是为了让从库从主库复制数据时可以写入到binlog日志,为什么要用这个参数写binlog日志呢,不是在配置文件中开启log-bin = /dat
MYSQL的安全模式:sql_safe_updates介绍 什么是安全模式 在mysql中,如果在update和delete没有加上where条件,数据将会全部修改。不只是初识mysql的开发者会遇到这个问题,工作有一定经验的工程师难免也会忘记写入where条件。为了避免失误造成的数据全部修改和删除,可开启mysql的安全模式。 安全模式的开启与关闭 连接到数据库后,查看当前mysql的安全模式的
原因是docker里面的DNS无法解析updates.jenkins.io域名。 这么解决: 1、将resolv.conf文件复制出来,因为容器里面无法编辑。 命令:docker cp jenkins:/etc/resolv.conf /data/ 2、编辑文件 命令:vim /data/resolv.conf 将里面的内容注释,添加内容:nameserver 8.8.8.8 3、将resolv.
Git本地代码推送到线上出现的问题 错误信息为: error: failed to push some refs to 'http://**:**/**/**.git' hint: Updates were rejected because the tip of your current branch is behind To http://**:**/**/**.git ! refs/heads
当前使用vue版本:3.2.25 [Vue warn]: Maximum recursive updates exceeded. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources in
189 updates can be installed immediately. 87 of these updates are security updates. To see these additional updates run: apt list --upgradable 升级处理命令: sudo apt-get update sudo apt-get upgrade su
一、报错发生 最近使用git,一直使用命令行操作。昨天突发奇想研究了一番git的GUI,结果由于操作不当产生了如下报错: Updates were rejected because the tip of your current branch is behind its remote counterpart. 二、报错原因 该报错在git push时出现,一句话解释就是你在本地仓库上的修改没有基于
电脑用了七八年了,存储不够了,扫描发现系统更新(/Library/Updates)文件 里竟然有9个多G 的更新文件,而且不允许删除。网上搜索了一下,通过以下方式成功删除。 进入恢复模式 重启电脑,同时按下cmd+R,看到白苹果的进度条时就可以松开手,然后会进入恢复模式。 关闭系统完整性保护(SIP) 在屏幕最上方的工具栏找到实用工具(应该是左数第3个),打开终端,输入如下命令: csrutil
vue warnning:Error: Maximum recursive updates exceeded. This means you have a reactive effect that is mutating... 原因: 项目要求使用较高版本node,而本人使用是v14* 项目架构: vue3+ant design+ts 解决:将node版本升级到v16*以上版本,删除,重装依赖即可
-- Unsafe query: 'Update' statement without 'where' updates all table rows at once 没有任何约束的情况下,当前指定数据表中的所有数据行全部执行修改操作。这很危险! 一定要带有where条件约束: update person set id = 10; -- OK update person set id = 10
Updates were rejected because the remote contains work that you not have locally. 翻译过来就是 更新被拒绝,因为远程包含了你本地没有的工作。 这通常是由于另一个版本库推送了 如何解决: 1.确保你当前的分支(release/R20220406)已经是最新的代码 并且,有可能其它分支commit到这个分支,却没有pus