@versatiles/release-tool 1.2.2 → 1.2.4
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/README.md +21 -0
- package/dist/commands/markdown.js +5 -14
- package/dist/commands/release.js +2 -0
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -43,8 +43,14 @@ Have a look at this [package.json](https://github.com/versatiles-org/node-releas
|
|
|
43
43
|
|
|
44
44
|
<!--- This chapter is generated automatically --->
|
|
45
45
|
|
|
46
|
+
> @versatiles/release-tool@1.2.4 npx
|
|
47
|
+
> vrt cmd2md vrt
|
|
48
|
+
|
|
46
49
|
```console
|
|
47
50
|
$ vrt
|
|
51
|
+
> @versatiles/release-tool@1.2.4 npx
|
|
52
|
+
> vrt --help
|
|
53
|
+
|
|
48
54
|
Usage: vrt [options] [command]
|
|
49
55
|
|
|
50
56
|
versatiles release and documentaion tool
|
|
@@ -65,6 +71,9 @@ Commands:
|
|
|
65
71
|
|
|
66
72
|
```console
|
|
67
73
|
$ vrt ts2md
|
|
74
|
+
> @versatiles/release-tool@1.2.4 npx
|
|
75
|
+
> vrt ts2md --help
|
|
76
|
+
|
|
68
77
|
Usage: vrt ts2md [options] <typescript> <tsconfig>
|
|
69
78
|
|
|
70
79
|
documents a TypeScript file and outputs it to stdout
|
|
@@ -81,6 +90,9 @@ Options:
|
|
|
81
90
|
|
|
82
91
|
```console
|
|
83
92
|
$ vrt cmd2md
|
|
93
|
+
> @versatiles/release-tool@1.2.4 npx
|
|
94
|
+
> vrt cmd2md --help
|
|
95
|
+
|
|
84
96
|
Usage: vrt cmd2md [options] <command>
|
|
85
97
|
|
|
86
98
|
documents a runnable command and outputs it to stdout
|
|
@@ -96,6 +108,9 @@ Options:
|
|
|
96
108
|
|
|
97
109
|
```console
|
|
98
110
|
$ vrt insertmd
|
|
111
|
+
> @versatiles/release-tool@1.2.4 npx
|
|
112
|
+
> vrt insertmd --help
|
|
113
|
+
|
|
99
114
|
Usage: vrt insertmd [options] <readme> [heading] [foldable]
|
|
100
115
|
|
|
101
116
|
takes Markdown from stdin and insert it into a Markdown file
|
|
@@ -113,6 +128,9 @@ Options:
|
|
|
113
128
|
|
|
114
129
|
```console
|
|
115
130
|
$ vrt inserttoc
|
|
131
|
+
> @versatiles/release-tool@1.2.4 npx
|
|
132
|
+
> vrt inserttoc --help
|
|
133
|
+
|
|
116
134
|
Usage: vrt inserttoc [options] <readme> [heading]
|
|
117
135
|
|
|
118
136
|
updates the TOC in a Markdown file
|
|
@@ -129,6 +147,9 @@ Options:
|
|
|
129
147
|
|
|
130
148
|
```console
|
|
131
149
|
$ vrt release-npm
|
|
150
|
+
> @versatiles/release-tool@1.2.4 npx
|
|
151
|
+
> vrt release-npm --help
|
|
152
|
+
|
|
132
153
|
Usage: vrt release-npm [options] [path]
|
|
133
154
|
|
|
134
155
|
release a npm package
|
|
@@ -134,20 +134,8 @@ function getHeadingDepth(mainAst, index) {
|
|
|
134
134
|
*/
|
|
135
135
|
function indentSegmentToDepth(segmentAst, depth) {
|
|
136
136
|
segmentAst.children.forEach(node => {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
case 'html':
|
|
140
|
-
case 'list':
|
|
141
|
-
case 'listItem':
|
|
142
|
-
case 'paragraph':
|
|
143
|
-
case 'text':
|
|
144
|
-
return;
|
|
145
|
-
case 'heading':
|
|
146
|
-
return node.depth += depth;
|
|
147
|
-
default:
|
|
148
|
-
console.log(node);
|
|
149
|
-
throw Error('unknown type: ' + node.type);
|
|
150
|
-
}
|
|
137
|
+
if (node.type == 'heading')
|
|
138
|
+
return node.depth += depth;
|
|
151
139
|
});
|
|
152
140
|
}
|
|
153
141
|
/**
|
|
@@ -275,6 +263,9 @@ export function nodeToHtml(node) {
|
|
|
275
263
|
if (node.title ?? '')
|
|
276
264
|
attributes.push(`title="${node.title}"`);
|
|
277
265
|
return `<img ${attributes.join(' ')} />`;
|
|
266
|
+
case 'footnoteReference': throw new Error('Not implemented yet: "footnoteReference" case');
|
|
267
|
+
case 'imageReference': throw new Error('Not implemented yet: "imageReference" case');
|
|
268
|
+
case 'linkReference': throw new Error('Not implemented yet: "linkReference" case');
|
|
278
269
|
default:
|
|
279
270
|
console.log(node);
|
|
280
271
|
throw Error('unknown type');
|
package/dist/commands/release.js
CHANGED
|
@@ -27,6 +27,8 @@ export async function release(directory, branch = 'main') {
|
|
|
27
27
|
panic('package.json is missing "scripts"');
|
|
28
28
|
if (!('check' in pkg.scripts))
|
|
29
29
|
panic('missing npm script "check" in package.json');
|
|
30
|
+
if (!('prepack' in pkg.scripts))
|
|
31
|
+
panic('missing npm script "prepack" in package.json');
|
|
30
32
|
// get last version
|
|
31
33
|
const tag = await check('get last github tag', getLastGitHubTag());
|
|
32
34
|
const shaLast = tag?.sha;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@versatiles/release-tool",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
4
4
|
"description": "VersaTiles release and documentation tools",
|
|
5
5
|
"bin": {
|
|
6
6
|
"vrt": "./dist/index.js"
|
|
@@ -30,22 +30,23 @@
|
|
|
30
30
|
"homepage": "https://github.com/versatiles-org/node-versatiles/blob/main/versatiles-release-tool/README.md",
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/inquirer": "^9.0.7",
|
|
33
|
-
"@types/jest": "^29.5.
|
|
34
|
-
"@types/node": "^20.
|
|
35
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
36
|
-
"@typescript-eslint/parser": "^
|
|
37
|
-
"eslint": "^8.
|
|
33
|
+
"@types/jest": "^29.5.12",
|
|
34
|
+
"@types/node": "^20.14.2",
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "^7.12.0",
|
|
36
|
+
"@typescript-eslint/parser": "^7.12.0",
|
|
37
|
+
"eslint": "^8.57.0",
|
|
38
38
|
"jest": "^29.7.0",
|
|
39
|
-
"
|
|
39
|
+
"npm-check-updates": "^16.14.20",
|
|
40
|
+
"ts-jest": "^29.1.4",
|
|
40
41
|
"ts-node": "^10.9.2",
|
|
41
|
-
"tsx": "^4.
|
|
42
|
-
"typescript": "^5.
|
|
42
|
+
"tsx": "^4.12.0",
|
|
43
|
+
"typescript": "^5.4.5"
|
|
43
44
|
},
|
|
44
45
|
"dependencies": {
|
|
45
|
-
"commander": "^
|
|
46
|
-
"inquirer": "^9.2.
|
|
46
|
+
"commander": "^12.1.0",
|
|
47
|
+
"inquirer": "^9.2.23",
|
|
47
48
|
"remark": "^15.0.1",
|
|
48
49
|
"remark-gfm": "^4.0.0",
|
|
49
|
-
"typedoc": "^0.25.
|
|
50
|
+
"typedoc": "^0.25.13"
|
|
50
51
|
}
|
|
51
52
|
}
|