@versatiles/release-tool 2.7.0 → 2.7.2

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 CHANGED
@@ -1,5 +1,8 @@
1
- [![Code Coverage](https://codecov.io/gh/versatiles-org/node-release-tool/branch/main/graph/badge.svg?token=IDHAI13M0K)](https://codecov.io/gh/versatiles-org/node-release-tool)
2
- [![GitHub Workflow Status)](https://img.shields.io/github/actions/workflow/status/versatiles-org/node-release-tool/ci.yml)](https://github.com/versatiles-org/node-release-tool/actions/workflows/ci.yml)
1
+ [![NPM version](https://img.shields.io/npm/v/%40versatiles%2Frelease-tool)](https://www.npmjs.com/package/@versatiles/release-tool)
2
+ [![NPM downloads](https://img.shields.io/npm/dt/%40versatiles%2Frelease-tool)](https://www.npmjs.com/package/@versatiles/release-tool)
3
+ [![Code coverage](https://codecov.io/gh/versatiles-org/node-release-tool/branch/main/graph/badge.svg?token=IDHAI13M0K)](https://codecov.io/gh/versatiles-org/node-release-tool)
4
+ [![CI status](https://img.shields.io/github/actions/workflow/status/versatiles-org/node-release-tool/ci.yml)](https://github.com/versatiles-org/node-release-tool/actions/workflows/ci.yml)
5
+ [![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)
3
6
 
4
7
  # VersaTiles Release Tools
5
8
 
@@ -24,7 +24,7 @@ export async function upgradeDependencies(directory) {
24
24
  });
25
25
  });
26
26
  const shell = new Shell(directory);
27
- await check('Remove lock file and node_modules', shell.stdout('rm -f package-lock.json && rm -rf node_modules'));
27
+ await shell.run('rm -f package-lock.json && rm -rf node_modules', false);
28
28
  await check('Reinstall all dependencies', shell.stdout('npm i'));
29
29
  // Final log message
30
30
  info('All dependencies are up to date');
@@ -19,7 +19,7 @@ export async function generateCommandDocumentation(command) {
19
19
  }
20
20
  catch (error) {
21
21
  // Handle errors in generating subcommand documentation.
22
- throw new Error(`Error generating documentation for subcommand '${fullCommand}': ${getErrorMessage(error)}`);
22
+ throw new Error(`Error generating documentation for subcommand '${fullCommand}': ${getErrorMessage(error)}`, { cause: error });
23
23
  }
24
24
  }))).join('');
25
25
  return markdown;
@@ -7,9 +7,9 @@ export type DocFormat = 'markdown' | 'wiki' | 'html';
7
7
  */
8
8
  export interface TypescriptDocOptions {
9
9
  /** Path to the entry point file (default: './src/index.ts') */
10
- entryPoint?: string;
10
+ input?: string;
11
11
  /** Output directory for generated docs (default: './docs') */
12
- outputPath?: string;
12
+ output?: string;
13
13
  /** Documentation format: 'markdown', 'wiki', or 'html' (default: 'markdown') */
14
14
  format?: DocFormat;
15
15
  /** Suppress info-level logging (default: false) */
@@ -33,8 +33,8 @@ export interface TypescriptDocOptions {
33
33
  *
34
34
  * // Generate HTML docs to custom directory
35
35
  * await generateTypescriptDocs({
36
- * entryPoint: './src/main.ts',
37
- * outputPath: './api-docs',
36
+ * input: './src/main.ts',
37
+ * output: './api-docs',
38
38
  * format: 'html'
39
39
  * });
40
40
  * ```
@@ -18,14 +18,14 @@ import { panic, warn } from '../lib/log.js';
18
18
  *
19
19
  * // Generate HTML docs to custom directory
20
20
  * await generateTypescriptDocs({
21
- * entryPoint: './src/main.ts',
22
- * outputPath: './api-docs',
21
+ * input: './src/main.ts',
22
+ * output: './api-docs',
23
23
  * format: 'html'
24
24
  * });
25
25
  * ```
26
26
  */
27
27
  export async function generateTypescriptDocs(options) {
28
- const { entryPoint, outputPath, quiet } = options;
28
+ const { input, output, quiet } = options;
29
29
  const format = options.format ?? 'markdown';
30
30
  const isMarkdown = format !== 'html';
31
31
  const plugin = [
@@ -34,8 +34,8 @@ export async function generateTypescriptDocs(options) {
34
34
  format === 'html' && 'typedoc-github-theme',
35
35
  ].filter(Boolean);
36
36
  const app = await td.Application.bootstrapWithPlugins({
37
- entryPoints: [entryPoint ?? './src/index.ts'],
38
- out: outputPath ?? './docs',
37
+ entryPoints: [input ?? './src/index.ts'],
38
+ out: output ?? './docs',
39
39
  plugin,
40
40
  logLevel: quiet ? 'Warn' : 'Info',
41
41
  highlightLanguages: ['typescript', 'javascript', 'json', 'shell', 'bash', 'sh', 'css', 'html'],
@@ -112,7 +112,7 @@ export async function release(directory, branch = 'main', dryRun = false) {
112
112
  info(' git add .');
113
113
  info(` git commit -m "v${nextVersion}"`);
114
114
  info(` git tag -f -a "v${nextVersion}" -m "new release: v${nextVersion}"`);
115
- info(' git push --no-verify --follow-tags');
115
+ info(' git push --atomic --no-verify --follow-tags');
116
116
  info(` gh release create/edit "v${nextVersion}"`);
117
117
  info('Dry-run complete - no changes were made');
118
118
  return;
@@ -137,9 +137,9 @@ export async function release(directory, branch = 'main', dryRun = false) {
137
137
  }
138
138
  // git push
139
139
  await check('git add', shell.run('git add .'));
140
- await check('git commit', shell.run(`git commit -m "v${nextVersion}"`, false));
140
+ await check('git commit', shell.run(`git commit -m "v${nextVersion}"`));
141
141
  await check('git tag', shell.run(`git tag -f -a "v${nextVersion}" -m "new release: v${nextVersion}"`));
142
- await check('git push', withRetry(() => shell.run('git push --no-verify --follow-tags'), {
142
+ await check('git push', withRetry(() => shell.run('git push --atomic --no-verify --follow-tags'), {
143
143
  onRetry: (attempt, error) => warn(`git push failed (attempt ${attempt}): ${error.message}, retrying...`),
144
144
  }));
145
145
  // github release (with retry for transient network failures)
package/dist/index.js CHANGED
@@ -86,7 +86,7 @@ program
86
86
  .description('Insert Markdown from stdin into a specified section of a Markdown file.')
87
87
  .argument('<readme>', 'Path to the target Markdown file (e.g., README.md).', checkFilename)
88
88
  .argument('[heading]', 'Heading in the Markdown file where content should be placed. Default is "# API".', '# API')
89
- .argument('[foldable]', 'Whether to wrap the inserted content in a foldable section.', false)
89
+ .argument('[foldable]', 'Whether to wrap the inserted content in a foldable section.', (v) => v === 'true', false)
90
90
  .action(async (mdFilename, heading, foldable) => {
91
91
  const buffers = [];
92
92
  for await (const data of process.stdin) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@versatiles/release-tool",
3
- "version": "2.7.0",
3
+ "version": "2.7.2",
4
4
  "description": "VersaTiles release and documentation tools",
5
5
  "bin": {
6
6
  "vrt": "./dist/index.js"
@@ -39,31 +39,32 @@
39
39
  },
40
40
  "homepage": "https://github.com/versatiles-org/node-release-tool",
41
41
  "devDependencies": {
42
+ "@eslint/js": "^10.0.1",
42
43
  "@schemastore/package": "^0.0.10",
43
- "@types/node": "^25.2.0",
44
- "@typescript-eslint/eslint-plugin": "^8.54.0",
45
- "@typescript-eslint/parser": "^8.54.0",
44
+ "@types/node": "^25.2.3",
45
+ "@typescript-eslint/eslint-plugin": "^8.56.0",
46
+ "@typescript-eslint/parser": "^8.56.0",
46
47
  "@vitest/coverage-v8": "^4.0.18",
47
- "eslint": "^9.39.2",
48
+ "eslint": "^10.0.0",
48
49
  "husky": "^9.1.7",
49
50
  "lint-staged": "^16.2.7",
50
51
  "prettier": "^3.8.1",
51
52
  "tsx": "^4.21.0",
52
53
  "typescript": "^5.9.3",
53
- "typescript-eslint": "^8.54.0",
54
+ "typescript-eslint": "^8.56.0",
54
55
  "vitest": "^4.0.18"
55
56
  },
56
57
  "dependencies": {
57
- "@inquirer/select": "^5.0.4",
58
+ "@inquirer/select": "^5.0.7",
58
59
  "commander": "^14.0.3",
59
- "dependency-cruiser": "^17.3.7",
60
+ "dependency-cruiser": "^17.3.8",
60
61
  "npm-check-updates": "^19.3.2",
61
62
  "remark": "^15.0.1",
62
63
  "remark-gfm": "^4.0.1",
63
- "typedoc": "^0.28.16",
64
- "typedoc-github-theme": "^0.3.1",
64
+ "typedoc": "^0.28.17",
65
+ "typedoc-github-theme": "^0.4.0",
65
66
  "typedoc-github-wiki-theme": "^2.1.0",
66
- "typedoc-plugin-markdown": "^4.9.0"
67
+ "typedoc-plugin-markdown": "^4.10.0"
67
68
  },
68
69
  "lint-staged": {
69
70
  "*.{ts,js,json,md,yml,yaml}": "prettier --write",