sn-typescript-util 1.3.14 → 1.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bun.lockb +0 -0
- package/package.json +2 -2
- package/scripts/utils/release.ts +9 -5
package/bun.lockb
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sn-typescript-util",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.16",
|
|
4
4
|
"description": "A TypeScript utility for ServiceNow developers using VS Code",
|
|
5
5
|
"bin": {
|
|
6
6
|
"snts": "bin/snts.js"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@types/commander": "^2.12.2",
|
|
35
35
|
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
36
36
|
"@typescript-eslint/parser": "^6.19.0",
|
|
37
|
-
"bun-types": "^1.0.
|
|
37
|
+
"bun-types": "^1.0.24",
|
|
38
38
|
"eslint": "^8.56.0",
|
|
39
39
|
"prettier": "^3.2.2"
|
|
40
40
|
}
|
package/scripts/utils/release.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ } from '
|
|
1
|
+
import { $ } from 'bun';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
import { readFileSync } from 'fs';
|
|
4
4
|
import { fileURLToPath } from 'url';
|
|
@@ -9,6 +9,11 @@ async function bumpVersion(releaseType) {
|
|
|
9
9
|
return await $`npm version ${releaseType} --no-git-tag-version`;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
+
async function cancelOperation() {
|
|
13
|
+
cancel('Operation cancelled.');
|
|
14
|
+
await $`git checkout package.json`;
|
|
15
|
+
}
|
|
16
|
+
|
|
12
17
|
async function confirmVersion(version: string) {
|
|
13
18
|
return await confirm({
|
|
14
19
|
message: `Bump to ${version}?`
|
|
@@ -23,7 +28,7 @@ async function doGitOperation(version: string) {
|
|
|
23
28
|
await $`git push origin ${version}`;
|
|
24
29
|
}
|
|
25
30
|
|
|
26
|
-
async function doOperation(shouldContinue, version: string) {
|
|
31
|
+
async function doOperation(shouldContinue: boolean | symbol, version: string) {
|
|
27
32
|
if (shouldContinue) {
|
|
28
33
|
const s = spinner();
|
|
29
34
|
s.start('Start release');
|
|
@@ -32,8 +37,7 @@ async function doOperation(shouldContinue, version: string) {
|
|
|
32
37
|
s.stop('Done.');
|
|
33
38
|
outro("You're all set!");
|
|
34
39
|
} else {
|
|
35
|
-
|
|
36
|
-
await $`git checkout package.json`;
|
|
40
|
+
cancelOperation();
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
|
|
@@ -68,7 +72,7 @@ function getOptions(): Version[] {
|
|
|
68
72
|
|
|
69
73
|
async function getVersion() {
|
|
70
74
|
const file = await getPackageInfo();
|
|
71
|
-
return file.version
|
|
75
|
+
return `v${file.version}`;
|
|
72
76
|
}
|
|
73
77
|
|
|
74
78
|
(async function init() {
|