Open 43081j opened 8 months ago
I took a random stab at this today and replaced wireit
's brace
with brace-extension
. The main thing that came up is wireit has a transitive dependency on micromatch
(via @11ty/eleventy
and fast-glob
), and micromatch depends on braces
, so braces is still in the tree
ultimately i wonder if we could have a fast-glob
alternative thats faster and lighter, an issue for another time though
even if we still have braces
in wireit's tree, we're making progress 👍
another fast-glob
alternative could be fdir
(discovered here: https://github.com/11ty/eleventy/issues/3167) or the upcoming fs.glob
native API
great find 🙏
IMO we should migrate towards fdir
and, once the native API settles, consider using that in projects which don't need to support older node versions
to-regex-range no longer depends on is-number but is still not published on npm
once that and chokidar 4 are published, we should do a follow up investigation into what's left depending on is-number
I suspect it won't be many packages anymore
if it is a very low impact amount, we can probably close this issue at that point
Just notes for how we can tackle this one.
Of course,
typeof obj === 'number'
will be fine for most consumersthere may be edge cases where this package is necessary, but most likely it belongs in edge cases rather than the common case.
Significant dependents
slice(start, -1)
slice(-offset)
Highest impact chain
to-regex-range
is the key here. The primary path is:braces
fill-range
to-regex-range
is-number
The first primary package we reach is
braces
, a package for bash-like brace expansion.We can probably replace
braces
with brace-expansion.Some significant consumers of
braces
are:If we move these to use
brace-expansion
(or any other light alternative we can agree on), we will likely strip is-number from most of the common dependency trees.