
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Auto update version for your application
auto-vers is helpful to your work. It will auto update package version when build your application.
When you iterate over your application, updating the version is a trivial but indispensable little thing. You can run it while packaging your app, and then will do more with less.
npm i auto-vers -g
cat package.json
{
...
"version": "1.0.0"
...
}
auto-vers -i
cat package.json
{
...
"version": "1.0.1"
...
}
auto-vers -i -c
auto-vers -t
If you don't want to update , you can enter ctrl
+ c
to exit program
auto-vers 1.2.0
or
auto-vers -v 1.2.0
options
auto-vers 0.3.1
Auto update version for your application
Usage: auto-vers [options] <version> [[...]]
Options
-v --version <version>
Can update version directly.
-i --inc --increment [<level>]
Increment a version by the specified level. Level can
be one of: major, minor, patch, premajor, preminor
, prepatch or prerelease. Default level is 'patch'.
Only one version may be specified.
-e --extra [<value>]
This is for prerelease extra data
Such as 'beta','alpha'
-c --confirm
Do not update the version directly, you can confirm.
This is a safe mode.
-t --tip
Provide choice to you. If you don't know how to update
you can choose this option.
-g --git
update the version will also help you make a tag.
npm i auto-vers
package.json
{
...
"version": "1.0.0"
...
}
index.js
const autoVers = require('auto-vers');
autoVers({type: 'patch'}); // 1.0.1
node index.js
update package.json
{
...
"version": "1.0.1"
...
}
options
{
version?: <version>,
type: major | minor | patch | prerelease,
url?: package.json's url,
extra?: alpha | beta | ...
}
It is a good choice to build your application and upgrade the version at the same time.
"script": {
"build": "babel ./src --out-dir ./dist",
"tip": "npm run build && auto-vers -t",
}
"script": {
"build": "babel ./src --out-dir ./dist",
"patch": "npm run build && auto-vers -i -c",
"minor": "npm run build && auto-vers -i minor -c",
"major": "npm run build && auto-vers -i major -c",
"beta": "npm run build && auto-vers -i prerelease -c",
}
open the tip(-c --confirm), this is a safe way to update.
git-hooks
If you have not registered pre-commit && post-commit, please move directly.
mv githook-*/* .git/hooks/
Git hooks exist.
cat githook-*/pre-commit >> .git/hooks/pre-commit
After commit, you can run auto-vers -g
to make a tag.
Tip:
Because it automatically pushes you when you tag, there will be a network delay. Please ensure that you execute this command in a network.
Weights: version > tip > increment
increment-related: confirm, extra
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
MIT
Copyright (c) 2018 蓝色的秋风
FAQs
<img src="https://codecov.io/gh/hu
The npm package auto-vers receives a total of 7 weekly downloads. As such, auto-vers popularity was classified as not popular.
We found that auto-vers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.