svger-cli 4.0.7 → 4.0.8
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/CHANGELOG.md +16 -0
- package/dist/services/svg-service.js +7 -0
- package/dist/utils/native.d.ts +1 -0
- package/dist/utils/native.js +18 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project
|
|
6
6
|
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [4.0.8] - 2026-05-20
|
|
9
|
+
|
|
10
|
+
### 🐛 Bug Fixes
|
|
11
|
+
|
|
12
|
+
- **Fixed subcommand help handling**: `svger-cli build --help` and other subcommand help flags now display command-specific help text instead of failing with "Both <src> and <out> paths are required" error. The CLI parser now correctly intercepts `--help` and `-h` flags after subcommand resolution.
|
|
13
|
+
- **Fixed false Vue/Svelte index generation warning**: Builds for Vue and Svelte frameworks no longer emit the misleading "No component files found in output directory for index generation" warning. Index generation is now framework-aware and silently skipped for frameworks that use non-standard extensions (`.vue`, `.svelte`).
|
|
14
|
+
|
|
15
|
+
### 🔧 Improvements
|
|
16
|
+
|
|
17
|
+
- **Enhanced CLI help system**: Added per-command help display showing command-specific options and global options separately.
|
|
18
|
+
- **Framework-aware index generation**: Index file generation now intelligently detects framework type and skips for frameworks where barrel exports are not applicable.
|
|
19
|
+
|
|
20
|
+
### 📝 Documentation
|
|
21
|
+
|
|
22
|
+
- Bug fixes address issues reported in upstream issue report dated 2026-05-19 for version 4.0.7.
|
|
23
|
+
|
|
8
24
|
## [4.0.7] - 2026-05-07
|
|
9
25
|
|
|
10
26
|
### ✅ Release Readiness & Validation
|
|
@@ -320,6 +320,13 @@ export class SVGService {
|
|
|
320
320
|
*/
|
|
321
321
|
async generateIndexFile(outDir, config) {
|
|
322
322
|
try {
|
|
323
|
+
// Skip index generation for frameworks that use non-standard extensions
|
|
324
|
+
const framework = config?.framework;
|
|
325
|
+
const frameworksWithoutIndexSupport = new Set(['vue', 'svelte']);
|
|
326
|
+
if (framework && frameworksWithoutIndexSupport.has(framework)) {
|
|
327
|
+
logger.debug(`Skipping index generation for ${framework} framework (components use .${framework} extension)`);
|
|
328
|
+
return;
|
|
329
|
+
}
|
|
323
330
|
// Scan output directory for all component files
|
|
324
331
|
const files = await FileSystem.readDir(outDir);
|
|
325
332
|
// Get the file extension based on typescript setting
|
package/dist/utils/native.d.ts
CHANGED
package/dist/utils/native.js
CHANGED
|
@@ -219,6 +219,11 @@ export class CLI {
|
|
|
219
219
|
this.showHelp();
|
|
220
220
|
process.exit(1);
|
|
221
221
|
}
|
|
222
|
+
// Check for subcommand help before parsing args
|
|
223
|
+
if (remainingArgs.includes('--help') || remainingArgs.includes('-h')) {
|
|
224
|
+
this.showCommandHelp(commandName, command);
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
222
227
|
const { parsedArgs, options } = this.parseArgs(remainingArgs, command.options);
|
|
223
228
|
try {
|
|
224
229
|
await command.action(parsedArgs, options);
|
|
@@ -277,6 +282,19 @@ export class CLI {
|
|
|
277
282
|
writeStdout(' --help, -h Show help');
|
|
278
283
|
writeStdout(' --version, -v Show version');
|
|
279
284
|
}
|
|
285
|
+
showCommandHelp(commandName, command) {
|
|
286
|
+
writeStdout(`${this.programName} ${commandName}`);
|
|
287
|
+
writeStdout(`\n${command.description}\n`);
|
|
288
|
+
if (command.options.size > 0) {
|
|
289
|
+
writeStdout('Options:');
|
|
290
|
+
for (const [name, opt] of command.options) {
|
|
291
|
+
const flag = opt.hasValue ? `--${name} <value>` : `--${name}`;
|
|
292
|
+
writeStdout(` ${flag.padEnd(25)} ${opt.description}`);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
writeStdout('\nGlobal Options:');
|
|
296
|
+
writeStdout(' --help, -h Show help');
|
|
297
|
+
}
|
|
280
298
|
}
|
|
281
299
|
class CommandBuilder {
|
|
282
300
|
signature;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svger-cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.8",
|
|
4
4
|
"description": "Enterprise-grade SVG to component converter with advanced plugin system, visual diff testing, and official framework integrations. Supporting React, React Native, Vue, Angular, Svelte, Solid, Lit, Preact & Vanilla. Features TypeScript, HMR, optimization pipeline, and extensible architecture.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|