cli: add -C alias for --conditions flag · nodejs/node@bc84001 · GitHub
Skip to content

Commit bc84001

Browse files
guybedforddanielleadams
authored andcommitted
cli: add -C alias for --conditions flag
PR-URL: #38755 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
1 parent 80c32b7 commit bc84001

5 files changed

Lines changed: 14 additions & 6 deletions

File tree

doc/api/cli.md

Lines changed: 10 additions & 3 deletions

doc/node.1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Aborting instead of exiting causes a core file to be generated for analysis.
7878
.It Fl -completion-bash
7979
Print source-able bash completion script for Node.js.
8080
.
81-
.It Fl -conditions Ar string
81+
.It Fl C , Fl -conditions Ar string
8282
Use custom conditional exports conditions.
8383
.Ar string
8484
.

src/node_options.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() {
292292
"additional user conditions for conditional exports and imports",
293293
&EnvironmentOptions::conditions,
294294
kAllowedInEnvironment);
295+
AddAlias("-C", "--conditions");
295296
AddOption("--diagnostic-dir",
296297
"set dir for all output files"
297298
" (default: current working directory)",

test/es-module/test-esm-custom-exports.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Flags: --conditions=custom-condition --conditions another
1+
// Flags: --conditions=custom-condition -C another
22
import { mustCall } from '../common/index.mjs';
33
import { strictEqual } from 'assert';
44
import { requireFixture, importFixture } from '../fixtures/pkgexports.mjs';

test/parallel/test-process-env-allowed-flags.js

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)