rsnext/packages/next/types
Sukka 53a0a0fb87
chore: replace micromatch w/ picomatch (#60699)
The PR continues from #58038 aiming to reduce the installation size
further, and **improve performance in doing so**.

Most of `micromatch`'s APIs are essentially wrappers/alias of
`picomatch`, supplemented with additional features facilitated by a
transitive dependency `braces`. However, Next.js doesn't use those
"extra features". Switching from `micromatch` to `picomatch` can avoid
introducing the transitive dependency `braces`.

The PR also improves some globs' performance by hoisting.

- `micromatch.makeRe` is just an alias of `picomatch.makeRe`
-
90dc0cd3e1/index.js (L387C30-L387C30)
- `micromatch.isMatch(str, patterns, options)` equals
`picomatch(patterns, options)(str)`
-
90dc0cd3e1/index.js (L123)
- `micromatch.matcher` is just an alias of `picomatch`
-
90dc0cd3e1/index.js (L104C1-L104C40)

---------

Co-authored-by: Sam Ko <sam@vercel.com>
2024-01-19 19:56:16 +00:00
..
compiled.d.ts Component Module Types (#56454) 2023-10-05 15:28:45 +00:00
global.d.ts make stdout blocking on macos (#51883) 2023-06-27 14:55:27 +00:00
index.d.ts fix: add maxDuration to PageConfig type (#55918) 2023-12-01 10:58:02 +01:00
misc.d.ts chore: replace micromatch w/ picomatch (#60699) 2024-01-19 19:56:16 +00:00
react-dom.d.ts onHeaders updates for App Pages (#58410) 2023-11-16 05:44:58 +00:00
react.d.ts Partial Prerendering (#57287) 2023-10-24 01:13:05 +00:00
webpack.d.ts enable verbatimModuleSyntax to make type imports/exports explicit (#56551) 2023-10-07 15:09:54 +00:00