Skip to content

Commit

Permalink
module: drop -u alias for --conditions
Browse files Browse the repository at this point in the history
Old versions of mocha break after nodejs#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: nodejs#34935
Refs: mochajs/mocha#4417
Refs: nodejs#34637
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Beth Griggs <Bethany.Griggs@uk.ibm.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
  • Loading branch information
richardlau authored and guybedford committed Sep 28, 2020
1 parent d6af3ba commit 56393c1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions doc/api/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ $ node --completion-bash > node_bash_completion
$ source node_bash_completion
```

### `-u`, `--conditions=condition`
### `--conditions=condition`
<!-- YAML
added: REPLACEME
-->
Expand Down Expand Up @@ -1181,7 +1181,7 @@ node --require "./a.js" --require "./b.js"

Node.js options that are allowed are:
<!-- node-options-node start -->
* `--conditions`, `-u`
* `--conditions`
* `--diagnostic-dir`
* `--disable-proto`
* `--enable-fips`
Expand Down
2 changes: 1 addition & 1 deletion doc/node.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
.
Expand Down
1 change: 0 additions & 1 deletion src/node_options.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
2 changes: 1 addition & 1 deletion test/es-module/test-esm-custom-exports.mjs
Original file line number Diff line number Diff line change
@@ -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';
Expand Down

0 comments on commit 56393c1

Please sign in to comment.