biomejs / biome

A toolchain for web projects, aimed to provide functionalities to maintain them. Biome offers formatter and linter, usable via CLI and LSP.
https://biomejs.dev
Apache License 2.0
15.55k stars 485 forks source link

feat(biome_glob): add dedicated crate for globs #4609

Open Conaclos opened 5 days ago

Conaclos commented 5 days ago

Summary

Move RetsrictedGlob from biome_js_analyze to a dedicated crate. This allows us to use RetsrictedGlob outside biome_js_analyze.

Also, I renamed RetsrictedGlob into Glob. Possible alternative names are GlobPattern and Pattern.

I added some documentation for the crate and put optional dependencies behind feature flags.

Test Plan

CI must pass.

codspeed-hq[bot] commented 5 days ago

CodSpeed Performance Report

Merging #4609 will not alter performance

Comparing conaclos/biome_glob (03e4540) with main (03cd04a)

Summary

✅ 97 untouched benchmarks

cr7pt0gr4ph7 commented 4 days ago

Just a small nit-pick: RetsrictedGlob should be RestrictedGlob :)

On a (only partially) related note:

ematipico commented 4 days ago

The idea is to get rid of Pattern. See https://github.com/biomejs/biome/issues/4611 for the whole plan, help is very welcome