The PR upgrades `cross-spawn` to `7.0.3`. The precompiled has also been
updated. The `cross-spawn` version is still pinned after the PR.
-----
So I have been working on improving Next.js build performance recently.
One thing that catches my eye is this:
<img width="1751" alt="image"
src="https://user-images.githubusercontent.com/40715044/218383194-5b24c737-0d97-4434-bbbf-ba5752072882.png">
The flamegraph shows the `semver` inside `cross-spawn` is one of the
hottest functions.
Then I take a look at the `cross-spawn`, turns out that `cross-spawn`
has `semver` already removed:
https://github.com/moxystudio/node-cross-spawn/pull/125
According to the CHANGELOG of `cross-spawn`, the only breaking change is
that `cross-spawn@7` is dropping `Node.js < 8` support. So I assume it
would be fine to upgrade `cross-spawn` to the latest version `7.0.3`,
thus eliminating the extra performance overhead introduced by `semver`.
---------
Co-authored-by: JJ Kasper <jj@jjsweb.site>
Adds additional integration tests for `@next/mdx`.
- Test mdx-rs
- Test `mdx-components.tsx`
- Tests development and production. Previously it only checked
development.
<!--
Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:
-->
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
## Feature
- [ ] Implements an existing feature request or RFC. Make sure the
feature request has been accepted for implementation before opening a
PR.
- [ ] Related issues linked using `fixes #number`
- [ ]
[e2e](https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
## Documentation / Examples
- [ ] Make sure the linting passes by running `pnpm build && pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing
doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
---------
Co-authored-by: Shu Ding <g@shud.in>
- [x] Depends on https://github.com/vercel/next.js/pull/45776
Turbotrace occupies too many memories while running; this PR makes it
run after the webpack build is finished, it can reduce the memory
hogging by webpack and turbotrace, thus avoiding OOM
The `maxFiles` option in turbotrace is removed because there is
`memoryLimit` option takes over its role.
Close WEB-556