Unverified Commit 81c126ee authored by Vincent Voyer's avatar Vincent Voyer Committed by GitHub

fix(cli): inspect flag is deprecated (#10819)

This commit effectively removes the --inspect flag from the CLI help and better inform on the deprecation.
parent 8390a474
...@@ -25,17 +25,16 @@ Available commands ...@@ -25,17 +25,16 @@ Available commands
Options Options
--version, -v Version number --version, -v Version number
--inspect Enable the Node.js inspector
--help, -h Displays this message --help, -h Displays this message
For more information run a command with the --help flag For more information run a command with the --help flag
$ next build --help $ next build --help
``` ```
You can pass any node arguments to `next` commands: You can pass any [node arguments](https://nodejs.org/api/cli.html#cli_node_options_options) to `next` commands:
```bash ```bash
NODE_OPTIONS="--throw-deprecation" next NODE_OPTIONS='--throw-deprecation' next
NODE_OPTIONS="-r esm" next NODE_OPTIONS='-r esm' next
NODE_OPTIONS="--inspect" next NODE_OPTIONS='--inspect' next
``` ```
...@@ -63,7 +63,6 @@ if (!foundCommand && args['--help']) { ...@@ -63,7 +63,6 @@ if (!foundCommand && args['--help']) {
Options Options
--version, -v Version number --version, -v Version number
--inspect Enable the Node.js inspector
--help, -h Displays this message --help, -h Displays this message
For more information run a command with the --help flag For more information run a command with the --help flag
...@@ -77,7 +76,7 @@ const forwardedArgs = foundCommand ? args._.slice(1) : args._ ...@@ -77,7 +76,7 @@ const forwardedArgs = foundCommand ? args._.slice(1) : args._
if (args['--inspect']) if (args['--inspect'])
throw new Error( throw new Error(
`Use env variable NODE_OPTIONS instead: NODE_OPTIONS="--inspect" next ${command}` `--inspect flag is deprecated. Use env variable NODE_OPTIONS instead: NODE_OPTIONS='--inspect' next ${command}`
) )
// Make sure the `next <subcommand> --help` case is covered // Make sure the `next <subcommand> --help` case is covered
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment