@versatiles/release-tool 1.2.6 → 1.2.7

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 VersaTiles
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -275,7 +275,7 @@ function nodesToHtml(children) {
275
275
  return children.map(nodeToHtml).join('');
276
276
  }
277
277
  function textToHtml(text) {
278
- return text.replace(/[^a-z0-9 ,.-:_?@äöüß]/gi, c => `&#${c.charCodeAt(0)};`);
278
+ return text.replace(/[^a-z0-9 ,.\-:_?@äöüß]/gi, c => `&#${c.charCodeAt(0)};`);
279
279
  }
280
280
  export function parseMarkdown(document) {
281
281
  return remark().use(remarkGfm).parse(document);
@@ -102,11 +102,13 @@ function* documentMethod(method, depth, isConstructor = false) {
102
102
  if (method.signatures?.length !== 1)
103
103
  throw Error('should be 1');
104
104
  const [signature] = method.signatures;
105
- const methodName = signature.name;
106
105
  const parameters = formatMethodParameters(signature.parameters ?? []);
107
- const returnType = signature.type;
108
- const methodType = isConstructor ? 'Constructor' : 'Method';
109
- yield `\n${'#'.repeat(depth)} ${methodType}: \`${methodName}(${parameters})\``;
106
+ if (isConstructor) {
107
+ yield `\n${'#'.repeat(depth)} Constructor: \`new ${signature.name}(${parameters})\``;
108
+ }
109
+ else {
110
+ yield `\n${'#'.repeat(depth)} Method: \`${signature.name}(${parameters})\``;
111
+ }
110
112
  yield* documentSummaryBlock(signature);
111
113
  if (signature.parameters && signature.parameters.length > 0) {
112
114
  yield '';
@@ -115,8 +117,8 @@ function* documentMethod(method, depth, isConstructor = false) {
115
117
  yield documentProperty(parameter);
116
118
  }
117
119
  }
118
- if (returnType && !isConstructor) {
119
- yield `\n**Returns:** <code>${formatTypeDeclaration(returnType)}</code>`;
120
+ if (signature.type && !isConstructor) {
121
+ yield `\n**Returns:** <code>${formatTypeDeclaration(signature.type)}</code>`;
120
122
  }
121
123
  }
122
124
  function formatMethodParameters(parameters) {
@@ -186,7 +188,7 @@ function* documentSummaryBlock(ref) {
186
188
  const link = createSourceLink(ref);
187
189
  if (link != null)
188
190
  summary += ' ' + link;
189
- return summary.replace(/\n/m, ' \n') + '\n';
191
+ return summary.replace(/\n/mg, ' \n') + '\n';
190
192
  }
191
193
  }
192
194
  function resolveTypeDeclaration(someType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versatiles/release-tool",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "VersaTiles release and documentation tools",
5
5
  "bin": {
6
6
  "vrt": "./dist/index.js"
@@ -30,24 +30,24 @@
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.13",
34
- "@types/node": "^22.5.5",
35
- "@typescript-eslint/eslint-plugin": "^8.6.0",
36
- "@typescript-eslint/parser": "^8.6.0",
37
- "eslint": "^9.11.0",
33
+ "@types/jest": "^29.5.14",
34
+ "@types/node": "^22.13.0",
35
+ "@typescript-eslint/eslint-plugin": "^8.22.0",
36
+ "@typescript-eslint/parser": "^8.22.0",
37
+ "eslint": "^9.19.0",
38
38
  "jest": "^29.7.0",
39
- "npm-check-updates": "^17.1.3",
39
+ "npm-check-updates": "^17.1.14",
40
40
  "ts-jest": "^29.2.5",
41
41
  "ts-node": "^10.9.2",
42
- "tsx": "^4.19.1",
43
- "typescript": "^5.6.2",
44
- "typescript-eslint": "^8.6.0"
42
+ "tsx": "^4.19.2",
43
+ "typescript": "^5.7.3",
44
+ "typescript-eslint": "^8.22.0"
45
45
  },
46
46
  "dependencies": {
47
- "@inquirer/select": "^3.0.1",
48
- "commander": "^12.1.0",
47
+ "@inquirer/select": "^4.0.7",
48
+ "commander": "^13.1.0",
49
49
  "remark": "^15.0.1",
50
50
  "remark-gfm": "^4.0.0",
51
- "typedoc": "^0.26.7"
51
+ "typedoc": "^0.27.6"
52
52
  }
53
53
  }