Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7a25bf3
doc: add himadriganguly as a triager
himadriganguly Aug 13, 2021
a387600
doc: add example of self-reference in scoped packages
piranna Mar 6, 2021
c34e253
tools: update markdown lint dependencies
Trott Aug 15, 2021
2b02f74
doc: fix lint errors in packages.md
Trott Aug 17, 2021
3041d57
doc: fix malformed changelog entries
Trott Aug 13, 2021
3f284cf
build: add option to hide console window
zcbenz Aug 9, 2021
8460a32
doc: deprecate using non-boolean values in the `verbatim` option
aduh95 Jun 2, 2021
2e90b10
doc: deprecate type coercion for `dns.lookup` options
aduh95 Jun 11, 2021
a7a217b
repl: fix tla function hoisting
DonJayamanne Aug 15, 2021
8fa3850
policy: canonicalize before resolving specifiers
bmeck Mar 22, 2021
9dc0c91
tools: update rollup to latest version in markdown linter
Trott Aug 18, 2021
158d446
meta: add gyp as owner of gyp files and tools/gyp
mmarchini Aug 20, 2021
0918ea0
src: add a constructor overload for CallbackScope
RaisinTen Aug 15, 2021
a704c9d
src: call overload ctor from the original ctor
RaisinTen Aug 17, 2021
01093b0
tools: update markdown linter dependencies and move to ESM
aduh95 Aug 18, 2021
d1900f4
fs: combine require() and destructure
cjihrig Aug 19, 2021
79079ea
tools: fix markdown linting
Trott Aug 21, 2021
6640037
util: expose toUSVString
ronag Aug 19, 2021
208305f
doc: move util.toUSVString() outside of deprecated group
lpinca Aug 22, 2021
d82ee96
tools: update gyp-next to v0.9.5
gengjiawen Aug 20, 2021
3a8399e
src: return Maybe<bool> from InitializeContextRuntime()
RaisinTen Aug 7, 2021
af7047a
stream: add isDisturbed helper
ronag Aug 2, 2021
a6d50a1
stream: duplexify
ronag Jul 25, 2021
cce95c4
deps: upgrade npm to 7.21.0
MylesBorins Aug 23, 2021
c02165d
doc: update instructions for cc
mhdawson Aug 5, 2021
a01e3ab
deps: V8: cherry-pick 00bb1a77c03e
RaisinTen Aug 21, 2021
8c50d16
doc: improve description of the triagers team
targos Aug 21, 2021
c968372
build: add authors.yml
bnb Aug 20, 2021
254810a
doc: add duplicate CVE check in sec. release doc
danbev Aug 23, 2021
90bf247
build: fix update authors commit
Mesteery Aug 24, 2021
d33f897
tools: use find-inactive-collaborators to modify README.md
Trott Aug 21, 2021
f98311a
tools: update workflow to open a pull request
Trott Aug 21, 2021
93553dc
2021-08-25, Version 16.8.0 (Current)
targos Aug 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
build: add option to hide console window
Adds a Environment flag to allow embedders to set CREATE_NO_WINDOW
property when spawning processes, which is useful for GUI programs
that do not want to show console windows when running terminal
commands.

PR-URL: #39712
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Shelley Vohr <shelley.vohr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
zcbenz authored and targos committed Aug 22, 2021
commit 3f284cf65c3d26b5ec73ed15b81befc4671ed596
4 changes: 4 additions & 0 deletions src/env-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,10 @@ inline bool Environment::tracks_unmanaged_fds() const {
return flags_ & EnvironmentFlags::kTrackUnmanagedFds;
}

inline bool Environment::hide_console_windows() const {
return flags_ & EnvironmentFlags::kHideConsoleWindows;
}

bool Environment::filehandle_close_warning() const {
return emit_filehandle_warning_;
}
Expand Down
1 change: 1 addition & 0 deletions src/env.h
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,7 @@ class Environment : public MemoryRetainer {
inline bool owns_process_state() const;
inline bool owns_inspector() const;
inline bool tracks_unmanaged_fds() const;
inline bool hide_console_windows() const;
inline uint64_t thread_id() const;
inline worker::Worker* worker_context() const;
Environment* worker_parent_env() const;
Expand Down
6 changes: 5 additions & 1 deletion src/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,11 @@ enum Flags : uint64_t {
kNoRegisterESMLoader = 1 << 3,
// Set this flag to make Node.js track "raw" file descriptors, i.e. managed
// by fs.open() and fs.close(), and close them during FreeEnvironment().
kTrackUnmanagedFds = 1 << 4
kTrackUnmanagedFds = 1 << 4,
// Set this flag to force hiding console windows when spawning child
// processes. This is usually used when embedding Node.js in GUI programs on
// Windows.
kHideConsoleWindows = 1 << 5
};
} // namespace EnvironmentFlags

Expand Down
2 changes: 2 additions & 0 deletions src/node_worker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,8 @@ void Worker::New(const FunctionCallbackInfo<Value>& args) {
CHECK(args[4]->IsBoolean());
if (args[4]->IsTrue() || env->tracks_unmanaged_fds())
worker->environment_flags_ |= EnvironmentFlags::kTrackUnmanagedFds;
if (env->hide_console_windows())
worker->environment_flags_ |= EnvironmentFlags::kHideConsoleWindows;
}

void Worker::StartThread(const FunctionCallbackInfo<Value>& args) {
Expand Down
4 changes: 4 additions & 0 deletions src/process_wrap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ class ProcessWrap : public HandleWrap {
options.flags |= UV_PROCESS_WINDOWS_HIDE;
}

if (env->hide_console_windows()) {
options.flags |= UV_PROCESS_WINDOWS_HIDE_CONSOLE;
}

// options.windows_verbatim_arguments
Local<Value> wva_v =
js_options->Get(context, env->windows_verbatim_arguments_string())
Expand Down