Repository navigation
chore: resolve remaining polish issues (#30, #31, #32) - #35
Merged
Merged
Conversation
Drop the TypeScript sources (bin/**/*.ts, lib/**/*.ts) and source maps from the published `files` list; ship only the compiled dist .js and .d.ts. Consumers run the compiled CLI and (rarely) import the typed helpers — neither needs original sources or maps. Unpacked size drops from ~61 kB to ~38 kB (24 -> 12 files), verified with npm pack --dry-run. Closes #32. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The proxy route hardcoded public/symbolstore.svg, so combining --hash (which emits symbolstore-<hash>.svg) with --proxy produced a route that 404s the sprite. Resolve the filename from /public (matching symbolstore(-<hash>)?.svg) so the route works with or without --hash, and document the requirement in the README. Also document Content-Security-Policy behavior for --inline: it injects inline styles (a deliberate, <use>-safe way to hide the sprite, since a plain display:none can stop some browsers resolving the reference), so a strict CSP needs style-src 'unsafe-inline' or a nonce; the static-file and proxy modes inject nothing into the document and are CSP-clean. Closes #31. Closes #30. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Knocks out the three remaining follow-up issues from the production-readiness review.
#32 — lean tarball
Drops
.tssources and source maps from the publishedfiles; ships only compileddist/*.js+dist/*.d.ts. Verified withnpm pack --dry-run: 24 → 12 files, ~61 kB → ~38 kB unpacked. Runtime is unaffected — the compiled bin and the typed helpers are all a consumer uses.#31 —
--hash+--proxyno longer a footgunThe demo proxy route hardcoded
public/symbolstore.svg, so--hash(which emitssymbolstore-<hash>.svg) would 404. It now resolves the filename from/public(matching^symbolstore(-[0-9a-f]+)?\.svg$), working with or without--hash, and the README documents the requirement.#30 —
--inline+ CSP (docs, deliberately)I investigated the optional code change and kept it as documentation on purpose: the inline styles hide the sprite in a way that does not break
<use>(a plaindisplay:nonecan stop some browsers resolving the reference), so stripping them risks broken icons or a layout gap. Instead the README now explains that inline mode needsstyle-src 'unsafe-inline'(or a nonce) under strict CSP — and that the static-file / proxy modes inject nothing into your document and are CSP-clean. Adds the trusted-input note fordangerouslySetInnerHTMLtoo.Closes #30. Closes #31. Closes #32.
🤖 Generated with Claude Code