Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: deprecate coercion to integer in process.exit() #43738

Merged

Conversation

daeyeon
Copy link
Member

@daeyeon daeyeon commented Jul 8, 2022

Refs: #43716

This warns of invalid uses of process.exit([code]) (such as in the comment)
and recommends the correct practice.

The code passed as the first argument to process.reallyExit() is
converted to an integer. This behavior has been unofficially supported so far.

static void ReallyExit(const FunctionCallbackInfo<Value>& args) {
Environment* env = Environment::GetCurrent(args);
RunAtExit(env);
int code = args[0]->Int32Value(env->context()).FromMaybe(0);
env->Exit(code);
}

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

@nodejs-github-bot nodejs-github-bot added deprecations Issues and PRs related to deprecations. doc Issues and PRs related to the documentations. labels Jul 8, 2022
doc/api/deprecations.md Outdated Show resolved Hide resolved
@bnoordhuis
Copy link
Member

This seems like too trivial a thing to bother users with. The only thing I'd maybe change is FromMaybe(0) to e.g. FromMaybe(1) - a zero exit code when coercion fails is arguably misleading.

@aduh95
Copy link
Contributor

aduh95 commented Jul 9, 2022

This seems like too trivial a thing to bother users with.

I'd argue that's exactly what doc-only deprecations are for.

The only thing I'd maybe change is FromMaybe(0) to e.g. FromMaybe(1) - a zero exit code when coercion fails is arguably misleading.

Neat idea, but that would still need to go through a deprecation cycle, right?

@daeyeon
Copy link
Member Author

daeyeon commented Jul 9, 2022

This seems like too trivial a thing to bother users with. The only thing I'd maybe change is FromMaybe(0) to e.g. FromMaybe(1) - a zero exit code when coercion fails is arguably misleading.

I fully understand that opinion. No matter what code is passed, users will terminate node as expected. So this may be trivial to both users and us. One case I guessed was that there could be a few users wondering why the code they passed isn't correctly read after terminating node with codes like -1 or 'end'. So I wondered what others think of this issue. However, I didn't expect how many undocumented wrong uses we should consider.

I actually started this PR to refactor process.exitCode with getter/setter accessors. In the following case, we need to read the JS property multiple times to sync it on the native side. It seemed to be worth refactoring since we could reduce unnecessary calls. (It's a todo created by @addaleax)

node/src/api/hooks.cc

Lines 77 to 87 in 3d575a4

Local<String> exit_code = env->exit_code_string();
Local<Value> code_v;
int code;
if (!process_object->Get(context, exit_code).ToLocal(&code_v) ||
!code_v->Int32Value(context).To(&code) ||
ProcessEmit(env, "exit", Integer::New(isolate, code)).IsEmpty() ||
// Reload exit code, it may be changed by `emit('exit')`
!process_object->Get(context, exit_code).ToLocal(&code_v) ||
!code_v->Int32Value(context).To(&code)) {
return Nothing<int>();
}

However, I couldn't promptly get a clear answer on what types the accessors can accept because of the loose validation. That was a problem I had.

Thanks for the opinion. I'm happily learning many from all.

@daeyeon daeyeon force-pushed the main.deprecation-220709.Sat.4fcb branch from d998de9 to 1c53a9b Compare July 9, 2022 12:05
@aduh95 aduh95 added notable-change PRs with changes that should be highlighted in changelogs. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Jul 9, 2022
Copy link
Contributor

@RaisinTen RaisinTen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aduh95 aduh95 requested a review from BridgeAR July 12, 2022 21:42
@aduh95
Copy link
Contributor

aduh95 commented Jul 14, 2022

@daeyeon Can you please rebase to fix the conflict?

daeyeon added 2 commits July 15, 2022 12:39
This warns of invalid uses of process.exit([code]) and recommends the
correct practice.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
@daeyeon daeyeon force-pushed the main.deprecation-220709.Sat.4fcb branch from 1c53a9b to 33cb23b Compare July 15, 2022 03:42
@daeyeon
Copy link
Member Author

daeyeon commented Jul 15, 2022

@aduh95 Rebased, thanks!

@aduh95 aduh95 added the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 15, 2022
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 15, 2022
@nodejs-github-bot nodejs-github-bot merged commit b328581 into nodejs:main Jul 15, 2022
@nodejs-github-bot
Copy link
Collaborator

Landed in b328581

@daeyeon daeyeon deleted the main.deprecation-220709.Sat.4fcb branch July 15, 2022 11:49
danielleadams pushed a commit that referenced this pull request Jul 26, 2022
This warns of invalid uses of process.exit([code]) and recommends the
correct practice.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

PR-URL: #43738
Refs: #43716
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
danielleadams added a commit that referenced this pull request Jul 26, 2022
Notable changes:

* doc:
  * add F3n67u to collaborators (Feng Yu) #43953
  * deprecate coercion to integer in process.exit (Daeyeon Jeong) #43738
  * (SEMVER-MINOR) deprecate diagnostics_channel object subscribe method (Stephen Belanger) #42714
* events:
  * (SEMVER-MINOR) expose CustomEvent on global with CLI flag (Daeyeon Jeong) #43885
  * (SEMVER-MINOR) add `CustomEvent` (Daeyeon Jeong) #43514
* http:
  * (SEMVER-MINOR) add drop request event for http server (theanarkh) #43806
* lib:
  * (SEMVER-MINOR) improved diagnostics_channel subscribe/unsubscribe (Stephen Belanger) #42714
* util:
  * (SEMVER-MINOR) add tokens to parseArgs (John Gee) #43459
@danielleadams danielleadams mentioned this pull request Jul 26, 2022
danielleadams added a commit that referenced this pull request Jul 26, 2022
Notable changes:

* doc:
  * add F3n67u to collaborators (Feng Yu)#43953
  * deprecate coercion to integer in process.exit (Daeyeon Jeong) #43738
  * (SEMVER-MINOR) deprecate diagnostics_channel object subscribe method
  (Stephen Belanger) #42714
* events:
  * (SEMVER-MINOR) expose CustomEvent on global with CLI flag (Daeyeon
  Jeong) #43885
  * (SEMVER-MINOR) add `CustomEvent` (Daeyeon Jeong) #43514
* http:
  * (SEMVER-MINOR) add drop request event for http server (theanarkh) #43806
* lib:
  * (SEMVER-MINOR) improved diagnostics_channel subscribe/unsubscribe
  (Stephen Belanger) #42714
* util:
  * (SEMVER-MINOR) add tokens to parseArgs (John Gee) #43459

PR-URL: #43993
danielleadams added a commit that referenced this pull request Jul 26, 2022
Notable changes:

* doc:
  * add F3n67u to collaborators (Feng Yu) #43953
  * deprecate coercion to integer in process.exit (Daeyeon Jeong)
  #43738
  * (SEMVER-MINOR) deprecate diagnostics_channel object subscribe method
  (Stephen Belanger) #42714
* events:
  * (SEMVER-MINOR) expose CustomEvent on global with CLI flag (Daeyeon
  Jeong) #43885
  * (SEMVER-MINOR) add `CustomEvent` (Daeyeon Jeong) #43514
* http:
  * (SEMVER-MINOR) add drop request event for http server (theanarkh)
  #43806
* lib:
  * (SEMVER-MINOR) improved diagnostics_channel subscribe/unsubscribe
  (Stephen Belanger) #42714
* util:
  * (SEMVER-MINOR) add tokens to parseArgs (John Gee) #43459

PR-URL: #43993
targos added a commit that referenced this pull request Aug 16, 2022
Notable changes:

Adds `util.parseArgs` helper for higher level command-line argument
parsing.
Contributed by Benjamin Coe, John Gee, Darcy Clarke, Joe Sepi,
Kevin Gibbons, Aaron Casanova, Jessica Nahulan, and Jordan Harband.
#42675

Node.js ESM Loader hooks now support multiple custom loaders, and
composition is achieved via "chaining": `foo-loader` calls `bar-loader`
calls `qux-loader` (a custom loader _must_ now signal a short circuit
when intentionally not calling the next). See the ESM docs
(https://nodejs.org/dist/latest-v16.x/docs/api/esm.html) for details.
Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias.
#42623

The `node:test` module, which was initially introduced in Node.js
v18.0.0, is now available with all the changes done to it up to Node.js
v18.7.0.

To better align Node.js' experimental implementation of the Web Crypto
API with other runtimes, several changes were made:
* Support for CFRG curves was added, with the `'Ed25519'`, `'Ed448'`,
  `'X25519'`, and `'X448'` algorithms.
* The proprietary `'NODE-DSA'`, `'NODE-DH'`, `'NODE-SCRYPT'`,
  `'NODE-ED25519'`, `'NODE-ED448'`, `'NODE-X25519'`, and `'NODE-X448'`
  algorithms were removed.
* The proprietary `'node.keyObject'` import/export format was removed.
Contributed by Filip Skokan.
#42507
#43310

Updated Corepack to 0.12.1 - #43965
Updated ICU to 71.1 - #42655
Updated npm to 8.15.0 - #43917
Updated Undici to 5.8.0 - #43886

(SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) #42427
(SEMVER-MINOR) crypto: align webcrypto RSA key import/export with other implementations (Filip Skokan) #42816
(SEMVER-MINOR) dns: export error code constants from `dns/promises` (Feng Yu) #43176
doc: deprecate coercion to integer in process.exit (Daeyeon Jeong) #43738
(SEMVER-MINOR) doc: deprecate diagnostics_channel object subscribe method (Stephen Belanger) #42714
(SEMVER-MINOR) errors: add support for cause in aborterror (James M Snell) #41008
(SEMVER-MINOR) events: expose CustomEvent on global with CLI flag (Daeyeon Jeong) #43885
(SEMVER-MINOR) events: add `CustomEvent` (Daeyeon Jeong) #43514
(SEMVER-MINOR) events: propagate abortsignal reason in new AbortError ctor in events (James M Snell) #41008
(SEMVER-MINOR) fs: propagate abortsignal reason in new AbortSignal constructors (James M Snell) #41008
(SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) #42601
(SEMVER-MINOR) fs: add `read(buffer[, options])` versions (LiviaMedeiros) #42768
(SEMVER-MINOR) http: add drop request event for http server (theanarkh) #43806
(SEMVER-MINOR) http: add diagnostics channel for http client (theanarkh) #43580
(SEMVER-MINOR) http: add perf_hooks detail for http request and client (theanarkh) #43361
(SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) #41397
(SEMVER-MINOR) http2: propagate abortsignal reason in new AbortError constructor (James M Snell) #41008
(SEMVER-MINOR) http2: compat support for array headers (OneNail) #42901
(SEMVER-MINOR) lib: propagate abortsignal reason in new AbortError constructor in blob (James M Snell) #41008
(SEMVER-MINOR) lib: add abortSignal.throwIfAborted() (James M Snell) #40951
(SEMVER-MINOR) lib: improved diagnostics_channel subscribe/unsubscribe (Stephen Belanger) #42714
(SEMVER-MINOR) module: add isBuiltIn method (hemanth.hm) #43396
(SEMVER-MINOR) module,repl: support 'node:'-only core modules (Colin Ihrig) #42325
(SEMVER-MINOR) net: add drop event for net server (theanarkh) #43582
(SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) #43112
(SEMVER-MINOR) node-api: emit uncaught-exception on unhandled tsfn callbacks (Chengzhong Wu) #36510
(SEMVER-MINOR) perf_hooks: add PerformanceResourceTiming (RafaelGSS) #42725
(SEMVER-MINOR) report: add more heap infos in process report (theanarkh) #43116
(SEMVER-MINOR) src: add --openssl-legacy-provider option (Daniel Bevenius) #40478
(SEMVER-MINOR) src: define fs.constants.S_IWUSR & S_IRUSR for Win (Liviu Ionescu) #42757
(SEMVER-MINOR) src,doc,test: add --openssl-shared-config option (Daniel Bevenius) #43124
(SEMVER-MINOR) stream: use cause options in AbortError constructors (James M Snell) #41008
(SEMVER-MINOR) stream: add iterator helper find (Nitzan Uziely) #41849
(SEMVER-MINOR) stream: add writableAborted (Robert Nagy) #40802
(SEMVER-MINOR) timers: propagate signal.reason in awaitable timers (James M Snell) #41008
(SEMVER-MINOR) v8: add v8.startupSnapshot utils (Joyee Cheung) #43329
(SEMVER-MINOR) v8: export more fields in getHeapStatistics (theanarkh) #42784
(SEMVER-MINOR) worker: add hasRef() to MessagePort (Darshan Sen) #42849

PR-URL: #44098
Fyko pushed a commit to Fyko/node that referenced this pull request Sep 15, 2022
Notable changes:

* doc:
  * add F3n67u to collaborators (Feng Yu) nodejs#43953
  * deprecate coercion to integer in process.exit (Daeyeon Jeong)
  nodejs#43738
  * (SEMVER-MINOR) deprecate diagnostics_channel object subscribe method
  (Stephen Belanger) nodejs#42714
* events:
  * (SEMVER-MINOR) expose CustomEvent on global with CLI flag (Daeyeon
  Jeong) nodejs#43885
  * (SEMVER-MINOR) add `CustomEvent` (Daeyeon Jeong) nodejs#43514
* http:
  * (SEMVER-MINOR) add drop request event for http server (theanarkh)
  nodejs#43806
* lib:
  * (SEMVER-MINOR) improved diagnostics_channel subscribe/unsubscribe
  (Stephen Belanger) nodejs#42714
* util:
  * (SEMVER-MINOR) add tokens to parseArgs (John Gee) nodejs#43459

PR-URL: nodejs#43993
Fyko pushed a commit to Fyko/node that referenced this pull request Sep 15, 2022
Notable changes:

Adds `util.parseArgs` helper for higher level command-line argument
parsing.
Contributed by Benjamin Coe, John Gee, Darcy Clarke, Joe Sepi,
Kevin Gibbons, Aaron Casanova, Jessica Nahulan, and Jordan Harband.
nodejs#42675

Node.js ESM Loader hooks now support multiple custom loaders, and
composition is achieved via "chaining": `foo-loader` calls `bar-loader`
calls `qux-loader` (a custom loader _must_ now signal a short circuit
when intentionally not calling the next). See the ESM docs
(https://nodejs.org/dist/latest-v16.x/docs/api/esm.html) for details.
Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias.
nodejs#42623

The `node:test` module, which was initially introduced in Node.js
v18.0.0, is now available with all the changes done to it up to Node.js
v18.7.0.

To better align Node.js' experimental implementation of the Web Crypto
API with other runtimes, several changes were made:
* Support for CFRG curves was added, with the `'Ed25519'`, `'Ed448'`,
  `'X25519'`, and `'X448'` algorithms.
* The proprietary `'NODE-DSA'`, `'NODE-DH'`, `'NODE-SCRYPT'`,
  `'NODE-ED25519'`, `'NODE-ED448'`, `'NODE-X25519'`, and `'NODE-X448'`
  algorithms were removed.
* The proprietary `'node.keyObject'` import/export format was removed.
Contributed by Filip Skokan.
nodejs#42507
nodejs#43310

Updated Corepack to 0.12.1 - nodejs#43965
Updated ICU to 71.1 - nodejs#42655
Updated npm to 8.15.0 - nodejs#43917
Updated Undici to 5.8.0 - nodejs#43886

(SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) nodejs#42427
(SEMVER-MINOR) crypto: align webcrypto RSA key import/export with other implementations (Filip Skokan) nodejs#42816
(SEMVER-MINOR) dns: export error code constants from `dns/promises` (Feng Yu) nodejs#43176
doc: deprecate coercion to integer in process.exit (Daeyeon Jeong) nodejs#43738
(SEMVER-MINOR) doc: deprecate diagnostics_channel object subscribe method (Stephen Belanger) nodejs#42714
(SEMVER-MINOR) errors: add support for cause in aborterror (James M Snell) nodejs#41008
(SEMVER-MINOR) events: expose CustomEvent on global with CLI flag (Daeyeon Jeong) nodejs#43885
(SEMVER-MINOR) events: add `CustomEvent` (Daeyeon Jeong) nodejs#43514
(SEMVER-MINOR) events: propagate abortsignal reason in new AbortError ctor in events (James M Snell) nodejs#41008
(SEMVER-MINOR) fs: propagate abortsignal reason in new AbortSignal constructors (James M Snell) nodejs#41008
(SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) nodejs#42601
(SEMVER-MINOR) fs: add `read(buffer[, options])` versions (LiviaMedeiros) nodejs#42768
(SEMVER-MINOR) http: add drop request event for http server (theanarkh) nodejs#43806
(SEMVER-MINOR) http: add diagnostics channel for http client (theanarkh) nodejs#43580
(SEMVER-MINOR) http: add perf_hooks detail for http request and client (theanarkh) nodejs#43361
(SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) nodejs#41397
(SEMVER-MINOR) http2: propagate abortsignal reason in new AbortError constructor (James M Snell) nodejs#41008
(SEMVER-MINOR) http2: compat support for array headers (OneNail) nodejs#42901
(SEMVER-MINOR) lib: propagate abortsignal reason in new AbortError constructor in blob (James M Snell) nodejs#41008
(SEMVER-MINOR) lib: add abortSignal.throwIfAborted() (James M Snell) nodejs#40951
(SEMVER-MINOR) lib: improved diagnostics_channel subscribe/unsubscribe (Stephen Belanger) nodejs#42714
(SEMVER-MINOR) module: add isBuiltIn method (hemanth.hm) nodejs#43396
(SEMVER-MINOR) module,repl: support 'node:'-only core modules (Colin Ihrig) nodejs#42325
(SEMVER-MINOR) net: add drop event for net server (theanarkh) nodejs#43582
(SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) nodejs#43112
(SEMVER-MINOR) node-api: emit uncaught-exception on unhandled tsfn callbacks (Chengzhong Wu) nodejs#36510
(SEMVER-MINOR) perf_hooks: add PerformanceResourceTiming (RafaelGSS) nodejs#42725
(SEMVER-MINOR) report: add more heap infos in process report (theanarkh) nodejs#43116
(SEMVER-MINOR) src: add --openssl-legacy-provider option (Daniel Bevenius) nodejs#40478
(SEMVER-MINOR) src: define fs.constants.S_IWUSR & S_IRUSR for Win (Liviu Ionescu) nodejs#42757
(SEMVER-MINOR) src,doc,test: add --openssl-shared-config option (Daniel Bevenius) nodejs#43124
(SEMVER-MINOR) stream: use cause options in AbortError constructors (James M Snell) nodejs#41008
(SEMVER-MINOR) stream: add iterator helper find (Nitzan Uziely) nodejs#41849
(SEMVER-MINOR) stream: add writableAborted (Robert Nagy) nodejs#40802
(SEMVER-MINOR) timers: propagate signal.reason in awaitable timers (James M Snell) nodejs#41008
(SEMVER-MINOR) v8: add v8.startupSnapshot utils (Joyee Cheung) nodejs#43329
(SEMVER-MINOR) v8: export more fields in getHeapStatistics (theanarkh) nodejs#42784
(SEMVER-MINOR) worker: add hasRef() to MessagePort (Darshan Sen) nodejs#42849

PR-URL: nodejs#44098
daeyeon added a commit to daeyeon/node that referenced this pull request Sep 18, 2022
This is a follow up of doc-only deprecation
nodejs#43738.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
daeyeon added a commit to daeyeon/node that referenced this pull request Sep 18, 2022
This is a follow up of doc-only deprecation
nodejs#43738.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
daeyeon added a commit to daeyeon/node that referenced this pull request Sep 18, 2022
This is a follow up of doc-only deprecation
nodejs#43738.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
daeyeon added a commit to daeyeon/node that referenced this pull request Sep 19, 2022
This is a follow up of doc-only deprecation
nodejs#43738.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
nodejs-github-bot pushed a commit that referenced this pull request Sep 24, 2022
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44714
Refs: #44712
Refs: #43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
daeyeon added a commit to daeyeon/node that referenced this pull request Sep 25, 2022
This is a follow up of doc-only deprecation
nodejs#43738.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
RafaelGSS pushed a commit that referenced this pull request Sep 26, 2022
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44714
Refs: #44712
Refs: #43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Sep 26, 2022
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44714
Refs: #44712
Refs: #43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
RafaelGSS pushed a commit that referenced this pull request Sep 26, 2022
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44714
Refs: #44712
Refs: #43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
daeyeon added a commit to daeyeon/node that referenced this pull request Sep 30, 2022
This is a follow up of doc-only deprecation
nodejs#43738.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
juanarbol pushed a commit that referenced this pull request Oct 4, 2022
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44714
Refs: #44712
Refs: #43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
juanarbol pushed a commit that referenced this pull request Oct 4, 2022
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44714
Refs: #44712
Refs: #43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
juanarbol pushed a commit that referenced this pull request Oct 4, 2022
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44714
Refs: #44712
Refs: #43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
juanarbol pushed a commit that referenced this pull request Oct 4, 2022
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44714
Refs: #44712
Refs: #43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
nodejs-github-bot pushed a commit that referenced this pull request Oct 7, 2022
This is a follow up of doc-only deprecation
#43738.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com
PR-URL: #44711
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
juanarbol pushed a commit that referenced this pull request Oct 7, 2022
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44714
Refs: #44712
Refs: #43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
This warns of invalid uses of process.exit([code]) and recommends the
correct practice.

Signed-off-by: Daeyeon Jeong daeyeon.dev@gmail.com

PR-URL: nodejs/node#43738
Refs: nodejs/node#43716
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
Notable changes:

Adds `util.parseArgs` helper for higher level command-line argument
parsing.
Contributed by Benjamin Coe, John Gee, Darcy Clarke, Joe Sepi,
Kevin Gibbons, Aaron Casanova, Jessica Nahulan, and Jordan Harband.
nodejs/node#42675

Node.js ESM Loader hooks now support multiple custom loaders, and
composition is achieved via "chaining": `foo-loader` calls `bar-loader`
calls `qux-loader` (a custom loader _must_ now signal a short circuit
when intentionally not calling the next). See the ESM docs
(https://nodejs.org/dist/latest-v16.x/docs/api/esm.html) for details.
Contributed by Jacob Smith, Geoffrey Booth, and Bradley Farias.
nodejs/node#42623

The `node:test` module, which was initially introduced in Node.js
v18.0.0, is now available with all the changes done to it up to Node.js
v18.7.0.

To better align Node.js' experimental implementation of the Web Crypto
API with other runtimes, several changes were made:
* Support for CFRG curves was added, with the `'Ed25519'`, `'Ed448'`,
  `'X25519'`, and `'X448'` algorithms.
* The proprietary `'NODE-DSA'`, `'NODE-DH'`, `'NODE-SCRYPT'`,
  `'NODE-ED25519'`, `'NODE-ED448'`, `'NODE-X25519'`, and `'NODE-X448'`
  algorithms were removed.
* The proprietary `'node.keyObject'` import/export format was removed.
Contributed by Filip Skokan.
nodejs/node#42507
nodejs/node#43310

Updated Corepack to 0.12.1 - nodejs/node#43965
Updated ICU to 71.1 - nodejs/node#42655
Updated npm to 8.15.0 - nodejs/node#43917
Updated Undici to 5.8.0 - nodejs/node#43886

(SEMVER-MINOR) crypto: make authTagLength optional for CC20P1305 (Tobias Nießen) nodejs/node#42427
(SEMVER-MINOR) crypto: align webcrypto RSA key import/export with other implementations (Filip Skokan) nodejs/node#42816
(SEMVER-MINOR) dns: export error code constants from `dns/promises` (Feng Yu) nodejs/node#43176
doc: deprecate coercion to integer in process.exit (Daeyeon Jeong) nodejs/node#43738
(SEMVER-MINOR) doc: deprecate diagnostics_channel object subscribe method (Stephen Belanger) nodejs/node#42714
(SEMVER-MINOR) errors: add support for cause in aborterror (James M Snell) nodejs/node#41008
(SEMVER-MINOR) events: expose CustomEvent on global with CLI flag (Daeyeon Jeong) nodejs/node#43885
(SEMVER-MINOR) events: add `CustomEvent` (Daeyeon Jeong) nodejs/node#43514
(SEMVER-MINOR) events: propagate abortsignal reason in new AbortError ctor in events (James M Snell) nodejs/node#41008
(SEMVER-MINOR) fs: propagate abortsignal reason in new AbortSignal constructors (James M Snell) nodejs/node#41008
(SEMVER-MINOR) fs: make params in writing methods optional (LiviaMedeiros) nodejs/node#42601
(SEMVER-MINOR) fs: add `read(buffer[, options])` versions (LiviaMedeiros) nodejs/node#42768
(SEMVER-MINOR) http: add drop request event for http server (theanarkh) nodejs/node#43806
(SEMVER-MINOR) http: add diagnostics channel for http client (theanarkh) nodejs/node#43580
(SEMVER-MINOR) http: add perf_hooks detail for http request and client (theanarkh) nodejs/node#43361
(SEMVER-MINOR) http: add uniqueHeaders option to request and createServer (Paolo Insogna) nodejs/node#41397
(SEMVER-MINOR) http2: propagate abortsignal reason in new AbortError constructor (James M Snell) nodejs/node#41008
(SEMVER-MINOR) http2: compat support for array headers (OneNail) nodejs/node#42901
(SEMVER-MINOR) lib: propagate abortsignal reason in new AbortError constructor in blob (James M Snell) nodejs/node#41008
(SEMVER-MINOR) lib: add abortSignal.throwIfAborted() (James M Snell) nodejs/node#40951
(SEMVER-MINOR) lib: improved diagnostics_channel subscribe/unsubscribe (Stephen Belanger) nodejs/node#42714
(SEMVER-MINOR) module: add isBuiltIn method (hemanth.hm) nodejs/node#43396
(SEMVER-MINOR) module,repl: support 'node:'-only core modules (Colin Ihrig) nodejs/node#42325
(SEMVER-MINOR) net: add drop event for net server (theanarkh) nodejs/node#43582
(SEMVER-MINOR) net: add ability to reset a tcp socket (pupilTong) nodejs/node#43112
(SEMVER-MINOR) node-api: emit uncaught-exception on unhandled tsfn callbacks (Chengzhong Wu) nodejs/node#36510
(SEMVER-MINOR) perf_hooks: add PerformanceResourceTiming (RafaelGSS) nodejs/node#42725
(SEMVER-MINOR) report: add more heap infos in process report (theanarkh) nodejs/node#43116
(SEMVER-MINOR) src: add --openssl-legacy-provider option (Daniel Bevenius) nodejs/node#40478
(SEMVER-MINOR) src: define fs.constants.S_IWUSR & S_IRUSR for Win (Liviu Ionescu) nodejs/node#42757
(SEMVER-MINOR) src,doc,test: add --openssl-shared-config option (Daniel Bevenius) nodejs/node#43124
(SEMVER-MINOR) stream: use cause options in AbortError constructors (James M Snell) nodejs/node#41008
(SEMVER-MINOR) stream: add iterator helper find (Nitzan Uziely) nodejs/node#41849
(SEMVER-MINOR) stream: add writableAborted (Robert Nagy) nodejs/node#40802
(SEMVER-MINOR) timers: propagate signal.reason in awaitable timers (James M Snell) nodejs/node#41008
(SEMVER-MINOR) v8: add v8.startupSnapshot utils (Joyee Cheung) nodejs/node#43329
(SEMVER-MINOR) v8: export more fields in getHeapStatistics (theanarkh) nodejs/node#42784
(SEMVER-MINOR) worker: add hasRef() to MessagePort (Darshan Sen) nodejs/node#42849

PR-URL: nodejs/node#44098
juanarbol pushed a commit that referenced this pull request Oct 10, 2022
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44714
Refs: #44712
Refs: #43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
juanarbol pushed a commit that referenced this pull request Oct 11, 2022
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: #44714
Refs: #44712
Refs: #43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
nodejs-github-bot pushed a commit that referenced this pull request Oct 19, 2022
This removes the deprecation, `DEP0164` and validates the exit code for
both `process.exit([code])` and `process.exitCode`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
PR-URL: #43716
Refs: #43738
Refs: #44714
Refs: #44711
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Jan 3, 2023
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs/node#44714
Refs: nodejs/node#44712
Refs: nodejs/node#43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
guangwong pushed a commit to noslate-project/node that referenced this pull request Jan 3, 2023
This updates the deprecation, DEP0164, to clarify its scope.

Previously, `process.exitCode` wasn't mentioned but it needs
to be applied with the same deprecation because its meaning
is the same as the `code` value and it's overridden with the
`code` value in `process.exit()`.

Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com>
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: nodejs/node#44714
Refs: nodejs/node#44712
Refs: nodejs/node#43738
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. deprecations Issues and PRs related to deprecations. doc Issues and PRs related to the documentations. notable-change PRs with changes that should be highlighted in changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants