@reiniiriarios/newver
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -33,3 +33,2 @@ import { exec } from "child_process"; | ||
// Version | ||
// eslint-disable-next-line no-useless-escape | ||
if (!version || !/^v?\d+\.\d+\.\d+(?:\.\d+)?(?:-[a-z0-9\-\.\+])?$/i.test(version)) { | ||
@@ -454,8 +453,9 @@ log.err(`Invalid new version. Usage: ${chalk.yellow("newver <version> [options]")}`); | ||
if (stderr) { | ||
log.stderr(stderr); | ||
if (!err || !err.message.includes(stderr)) { | ||
// [sic] git outputs some non-error information to stderr | ||
log.stdout(stderr); | ||
} | ||
} | ||
if (err && (!stderr || !err.message.includes(stderr))) { | ||
if (err) { | ||
log.err(`[${err.code}] ${err.message}`); | ||
} | ||
if (stderr || err) { | ||
process.exit(1); | ||
@@ -462,0 +462,0 @@ } |
{ | ||
"name": "@reiniiriarios/newver", | ||
"description": "A silly little script to help quickly update a version in package files, then commit, tag, and push.", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "dist/main.js", | ||
@@ -6,0 +6,0 @@ "type": "module", |
@@ -6,14 +6,10 @@ # 🔥 newver | ||
## CLI Usage | ||
## Getting Started | ||
```sh | ||
newver <version> [options] | ||
newver 1.2.3 | ||
newver 1.2.3 -c | ||
newver 1.2.3 --commit | ||
newver 1.2.3 --commit=true --tag=false --push=true --prefix="chore(release)" | ||
newver 1.2.3 -cptx "chore(release)" | ||
newver 1.2.3 --files=path/to/file.ext --files=path/to/another/file.ext | ||
``` | ||
npm i --save-dev @reiniiriarios/newver | ||
``` | ||
package.json: | ||
```json | ||
@@ -31,2 +27,15 @@ { | ||
## CLI Usage | ||
```sh | ||
newver <version> [options] | ||
newver 1.2.3 | ||
newver 1.2.3 -c | ||
newver 1.2.3 --commit | ||
newver --commit 1.2.3 | ||
newver 1.2.3 --commit=true --tag=false --push=true --prefix="chore(release)" | ||
newver -cptx "chore(release)" 1.2.3 | ||
newver 1.2.3 --files=path/to/file.ext --files=path/to/another/file.ext | ||
``` | ||
For option details: | ||
@@ -58,3 +67,3 @@ | ||
#!/usr/bin/env node | ||
import newver from "newver"; | ||
import newver from "@reiniiriarios/newver"; | ||
@@ -61,0 +70,0 @@ newver(process.args.pop(), { |
Sorry, the diff of this file is not supported yet
95167
94