This release mainly addresses the high memory usage issue reported in #18: fixed a potential memory leak (#21) and implemented stream processing (#22).
Also, some UI changes were introduced in #21, as we switched the diagnostic reporter from codespan_reporting to miette.
- (runtime) Set exact file size limit
- (runtime) Add file limitation
- (runtime) Filter out binary files
- (cli) Report the source path of diagnostics (#23)
- (cli) Subtract with overflow
- (runtime) Implement stream processing
- (runtime) Zero-copy diagnostics reporting
- Replace
codespan-reporting
withmiette
- (util) Rename
tryb!
totry!
- (readme) Update badge URLs
- Format with prettier
- Make nightly rustfmt compatible with the stable rustfmt
- Format with nightly rustfmt
- Generate UTC release date
- Report Cargo check results
- Rewrite
- Fix typos
- Fix typos
- Update author name
- Add checks (#17)
- (nix) Update flakes
- (cargo) Update dependencies
This release primarily introduces the predefined substitutions suggested in
#9 (thanks @Finii!) and
also brings a few refactors on the CLI. Here are some guides for migrating from v0.3
:
- Use
dump
instead ofcache
to show all icons and substitutions in the runtime database. - Previous release of
nerdfix
supports the--replace FROM:TO
argument to perform a prefix substitution, now it defines a new argument--sub TYPE:FROM/TO
which supports bothexact
andprefix
substitutions. This means that you should use--sub prefix:FROM/TO
in place of the old one. - You can pipe the input/output with
nerdfix
using the special-
path.
- database: make
prefix:mdi-/md-
a default substitution - support read from and write to stdio in more options
- runtime: generate icon substitutions list for
nf-mdi-*
- autofix: load predefined substitutions list
- parser: support new cheat-sheet format
- parser: strip
nf-
prefixes - cli: use
-v/-q
to control log level
- runtime: clear buffer before check sources
- log: exit non-zero if any error occurs
- cli: warn deprecated arguments
- justfile: remove redundant
nf-
prefixes
- cli: rename term input to database
- implement a syntax to define substitutions
- cli: use
--input
to load substitutions - clean up typo and unused codes
- colored: replace
colored
withnu_ansi_term
- autofix: move
--replace
to global options - cli: rename subcommand
cache
toindex
- cache: save in json
- macros: match block instead of statements
- error: show path in logs
- replace inline closures with try-block macro
- cli: pad output codepoints
- cli: support optional paths to write content to
- cli: support recursive directories traversal (#6)
- cli: improve prompts auto confirmation (#4)
- parser: icons with
removed
label should be considered as obsolete
- util: replace some macros with ext traits
- stdio: logs and diagnostics should be written to different streams
error::Io
can be directly constructed with&Path
- fix: patched content should be created in autofix
- prompt: keyboard hints should follow the same style
- error:
Error
should display brief message
- cli: show more metadata
- error: make path optional
- error: derive
From
for source errors
- search: print the icon name
- prompt: display formatted user input
- search: use the first string of user input
- runtime: sort candidates by their names for stable results
- search: use n-grams to search subset matches
- runtime: replace ngrammatic with noodler
- cli: support output structured data
- cli: use
--verbose
to increase log level - cli: use
fix --replace
to auto fix icons - cli: support send yes to all prompts
- runtime: add path in structured output
- runtime: log errors and continue running
- runtime: dont load inlined icons if user input is present
- iter: use itertools to simplify code
- cli: dont allow short argument for
fix --replace
- report: change the severity of obsolete fonts to NOTE
- runtime: lazily construct patched content
- runtime: lazily initialize candidates
- parser: parse both cheat sheet and cached content input
- cli: add
search
to fuzzy search an icon - autocomplete: search icons whose name contain the input string
- fix: show icons in suggesions
- check: auto patch using last user input
- cli: add
cache
,check
andfix
commands
- cli: dont prompt if no icon is patched
- cli: ignore errors in prompt
- clippy: fix clippy warnings
- runtime: use
IndexMap
to store icons - runtime: move
Runtime
to a standalone modulecrate::runtime
- move some type definitions and implementations to standalone modules
- icon: rename
crate::db
tocrate::icon
- db: change type of
Icon::codepoint
tochar
- runtime: dont clone icons