chore(cli): fix the order --experimental-debug-memory-usage so it's alphabetical (#64264)

## Why?

This fixes the ordering of `--experimental-debug-memory-usage` so the
help output for experimental options are alphabetical/ordered properly
(grouped at the end).

- Related https://github.com/vercel/next.js/pull/63869

Closes NEXT-3054
This commit is contained in:
Sam Ko 2024-04-09 10:28:12 -07:00 committed by GitHub
parent 85b9ed5eb8
commit 5e7e4bc02b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -105,13 +105,10 @@ program
)}`
)
.option('-d, --debug', 'Enables a more verbose build output.')
.option(
'--experimental-debug-memory-usage',
'Enables memory profiling features to debug memory consumption.'
)
.option('--profile', 'Enables production profiling for React.')
.option('--no-lint', 'Disables linting.')
.option('--no-mangling', 'Disables mangling.')
.option('--profile', 'Enables production profiling for React.')
.option('--experimental-app-only', 'Builds only App Router routes.')
.addOption(new Option('--experimental-turbo').hideHelp())
.addOption(
@ -122,6 +119,10 @@ program
.choices(['compile', 'generate'])
.default('default')
)
.option(
'--experimental-debug-memory-usage',
'Enables memory profiling features to debug memory consumption.'
)
.action((directory, options) =>
// ensure process exits after build completes so open handles/connections
// don't cause process to hang