Repository navigation
feat: richer end-of-run summary (skipped shapes, resvg state, CLI version) - #33
Merged
Merged
Conversation
Skipped shapes are written to stderr and counted in the summary, which also reports whether @resvg/resvg-js is installed and recommends installing it when dimensions were missing.
Print a `version` row (`svgforge-cli <version>`) in the summary, before the resvg install tip so the actionable recommendation still closes the output. The engine version is not included: `@svgforge/svgforge` does not export `./package.json`, so reading it would require a resolve-and-walk-up workaround.
The summary reports the `shape-skipped` events with their parser reasons and whether the `@resvg/resvg-js` dimension fallback is available. Both need svgforge 3.1.0; the previous `^3.0.0` resolved 3.0.0 from the registry, where `@svgforge/svgforge/utils` does not export `isResvgAvailable()` yet, so the CLI failed to start and every test failed in CI. Regenerate the lockfile against the registry (no `link:`/`file:` entries) and exclude the fresh 3.1.0 from the minimum release age check.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Socket Security: Dependency OverviewReview the following changes in direct dependencies. Learn more about socket.dev
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes the CLI's skipped-shape reporting consistent and loud instead of silent, and surfaces the state of the optional dimension fallback plus the CLI version itself.
Added
stderrimmediately asSkipping "<file>" (<reason>)and counted on an extraskipped …line in the end-of-run summary:Invalid SVG file (Opening and ending tag mismatch: "rect" != "svg"), instead of xmldom'sReporting fatalError … caused …boilerplate. The raw[xmldom fatalError]console noise is gone.viewBox, nowidth/height) are counted as… without dimensions.@resvg/resvg-jsdimension-fallback package is installed (resvg availablevs.resvg not installed). It is only needed for that unusual shape case: such a shape is skipped with an immediate warning carrying the install command (npm install @resvg/resvg-js), noNaNviewBox values are emitted, and the summary ends with the install recommendation.version svgforge-cli 3.1.0), printed before that install recommendation so the actionable tip still closes the output.Notes
@svgforge/svgforge≥ 3.1.0 for theshape-skippedevent, the parser reasons, the graceful dimension handling andisResvgAvailable(). The dependency is bumped here — the previous^3.0.0resolved 3.0.0 from the registry, where@svgforge/svgforge/utilsdoes not exportisResvgAvailable()yet, so the CLI could not start in CI. The lockfile is regenerated against the registry (nolink:/file:entries).npm run lintclean,npm test65/65 green (3 consecutive runs) against the publishedsvgforge@3.1.0.