From 56393c126a7465b4c16df08f6d0f294af08a0129 Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Wed, 26 Aug 2020 09:56:55 -0400 Subject: [PATCH] module: drop `-u` alias for `--conditions` Old versions of mocha break after https://github.com/nodejs/node/pull/34637. This was a bug in mocha, but since this is a widely used module we can expect ecosystem breakage until modules are updated to the latest version of mocha. Drop the conflicting `-u` alias -- we can potentially bring it back once modules have been updated. PR-URL: https://github.com/nodejs/node/pull/34935 Refs: https://github.com/mochajs/mocha/issues/4417 Refs: https://github.com/nodejs/node/pull/34637 Reviewed-By: Anna Henningsen Reviewed-By: Jan Krems Reviewed-By: Beth Griggs Reviewed-By: Myles Borins Reviewed-By: Colin Ihrig Reviewed-By: Shelley Vohr --- doc/api/cli.md | 4 ++-- doc/node.1 | 2 +- src/node_options.cc | 1 - test/es-module/test-esm-custom-exports.mjs | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/doc/api/cli.md b/doc/api/cli.md index cdc173dc1730d4..574e40232fefb5 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -81,7 +81,7 @@ $ node --completion-bash > node_bash_completion $ source node_bash_completion ``` -### `-u`, `--conditions=condition` +### `--conditions=condition` @@ -1181,7 +1181,7 @@ node --require "./a.js" --require "./b.js" Node.js options that are allowed are: -* `--conditions`, `-u` +* `--conditions` * `--diagnostic-dir` * `--disable-proto` * `--enable-fips` diff --git a/doc/node.1 b/doc/node.1 index 8c4a6908383adc..610b21d0eef114 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -78,7 +78,7 @@ Aborting instead of exiting causes a core file to be generated for analysis. .It Fl -completion-bash Print source-able bash completion script for Node.js. . -.It Fl u , Fl -conditions Ar string +.It Fl -conditions Ar string Use custom conditional exports conditions .Ar string . diff --git a/src/node_options.cc b/src/node_options.cc index 790265106be952..824004631f5301 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -287,7 +287,6 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "additional user conditions for conditional exports and imports", &EnvironmentOptions::conditions, kAllowedInEnvironment); - AddAlias("-u", "--conditions"); AddOption("--diagnostic-dir", "set dir for all output files" " (default: current working directory)", diff --git a/test/es-module/test-esm-custom-exports.mjs b/test/es-module/test-esm-custom-exports.mjs index ad81abfdafd861..cf0557fa44215e 100644 --- a/test/es-module/test-esm-custom-exports.mjs +++ b/test/es-module/test-esm-custom-exports.mjs @@ -1,4 +1,4 @@ -// Flags: --conditions=custom-condition -u another +// Flags: --conditions=custom-condition --conditions another import { mustCall } from '../common/index.mjs'; import { strictEqual } from 'assert'; import { requireFixture, importFixture } from '../fixtures/pkgexports.mjs';