unjs / magic-regexp

A compiled-away, type-safe, readable RegExp alternative
https://regexp.dev
MIT License
3.67k stars 51 forks source link

feat: add `orChar`/`from` chain for `charIn`/`charNotIn` #399

Open danielroe opened 1 month ago

danielroe commented 1 month ago

🔗 Linked issue

resolves https://github.com/unjs/magic-regexp/issues/397

❓ Type of change

📚 Description

This adds an implementation for creating custom ranges like [abcA-Z].

TODO:

📝 Checklist

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
magic-regexp-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 4, 2024 2:51pm
github-actions[bot] commented 1 month ago

Diagnostics Comparison:

Click to expand | Metric | Previous | New | Status | | --- | --- | --- | --- | | Files | 352 | 352 | ± (0.00%) | | Lines | 136176 | 136227 | ▲ (+0.04%) | | Identifiers | 144200 | 144386 | ▲ (+0.13%) | | Symbols | 246224 | 248193 | ▲ (+0.79%) | | Types | 50363 | 52292 | ▲ (+3.69%) | | Instantiations | 605012 | 613876 | ▲ (+1.44%) | | Memory used | 276359K | 288249K | ▲ (+4.12%) | | I/O read | 0.02s | 0.02s | ± (0.00%) | | I/O write | 0s | 0s | ± (0.00%) | | Parse time | 0.87s | 0.87s | ± (0.00%) | | Bind time | 0.35s | 0.35s | ± (0.00%) | | Check time | 1.94s | 2.04s | ± (+4.90%) | | Emit time | 0.09s | 0.08s | ± (-12.50%) | | Total time | 3.24s | 3.33s | ± (+2.70%) |
codspeed-hq[bot] commented 1 month ago

CodSpeed Performance Report

Merging #399 will not alter performance

Comparing feat/or-char-from (4091f08) with main (b06c4e9)

Summary

✅ 6 untouched benchmarks

github-actions[bot] commented 1 month ago

Diagnostics Comparison:

Click to expand | Metric | Previous | New | Status | | --- | --- | --- | --- | | Files | 352 | 352 | ± (0.00%) | | Lines | 136176 | 136227 | ▲ (+0.04%) | | Identifiers | 144200 | 144387 | ▲ (+0.13%) | | Symbols | 246224 | 248193 | ▲ (+0.79%) | | Types | 50363 | 52292 | ▲ (+3.69%) | | Instantiations | 605012 | 613876 | ▲ (+1.44%) | | Memory used | 273822K | 282845K | ▲ (+3.19%) | | I/O read | 0.03s | 0.02s | ▼ (-50.00%) | | I/O write | 0s | 0s | ± (0.00%) | | Parse time | 1.03s | 0.89s | ± (-15.73%) | | Bind time | 0.39s | 0.35s | ± (-11.43%) | | Check time | 2.22s | 2.06s | ± (-7.77%) | | Emit time | 0.09s | 0.09s | ± (0.00%) | | Total time | 3.73s | 3.38s | ▼ (-10.36%) |