Skip to content

Commit

Permalink
chore(deps): upgrade cross-spawn to 7.0.3 (#45839)
Browse files Browse the repository at this point in the history
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:
moxystudio/node-cross-spawn#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>
  • Loading branch information
SukkaW and ijjk authored Feb 14, 2023
1 parent 216e8b6 commit b9b556e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
"content-disposition": "0.5.3",
"content-type": "1.0.4",
"cookie": "0.4.1",
"cross-spawn": "6.0.5",
"cross-spawn": "7.0.3",
"crypto-browserify": "3.12.0",
"css.escape": "1.5.1",
"cssnano-simple": "3.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/compiled/cross-spawn/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b9b556e

Please sign in to comment.