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

modules: deprecate module.parent #32217

Closed
wants to merge 5 commits into from

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Mar 11, 2020

This feature does not work when a module is imported using ECMAScript modules
specification, therefore it is deprecated.

This has been discussed during Node.js Modules Team Meeting 2020-03-11; the main issue with this feature is that users are using it to check if the current module is the entry point, but that breaks when a CJS module is imported using ESM loader. Also its behaviour is kind of counterintuitive because of CJS cache.

This PR contains a breaking change: Object.keys(module).includes('parent') used to be true, and is now false. Hopefully this can get merged before v14 feature freeze.

Fixes: nodejs/modules#469

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@mscdex mscdex added the semver-major PRs that contain breaking changes and should be released in the next major version. label Mar 12, 2020
@DerekNonGeneric
Copy link
Contributor

❌I'm opposed

My dissent is voiced in a comment to the related issue.

nodejs/modules#469 (comment)

Copy link
Member

@devsnek devsnek left a comment

Choose a reason for hiding this comment

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

even before esm existed this should've been deprecated

@aduh95 aduh95 force-pushed the deprecate-module-parent branch 3 times, most recently from e1f6f47 to 3dbaf67 Compare March 12, 2020 13:46
@bmeck
Copy link
Member

bmeck commented Mar 12, 2020

While we are here, can we update https://github.com/nodejs/node/blob/master/doc/api/modules.md#moduleparent to state that the value may be undefined or null. Regardless of the deprecation logic, that is a driving force behind this PR.

Copy link
Member

@bmeck bmeck left a comment

Choose a reason for hiding this comment

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

nits

Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

I’m -1 on a runtime deprecation just because a feature won’t always work as expected.

This only starts to break when people are moving code over to ESM. When it does break, it will most likely break in a way that’s easily noticed. I don’t think an extra runtime deprecation would be helpful.

@bmeck
Copy link
Member

bmeck commented Mar 12, 2020

@addaleax do you feel comfortable with docs deprecation?

@aduh95
Copy link
Contributor Author

aduh95 commented Mar 12, 2020

@addaleax it breaks when people are using ESM or REPL, there is a better alternative that always works, and it seems there is no actual use-case for this feature.

Anyway, would you find it acceptable if the warning is displayed only when module.parent is undefined or null? This way the warning is displayed when the feature may break, hence helping the debug process.

doc/api/deprecations.md Outdated Show resolved Hide resolved
@aduh95
Copy link
Contributor Author

aduh95 commented Mar 13, 2020

When it does break, it will most likely break in a way that’s easily noticed.

@addaleax I don't think that's a fair assumption: when I did encounter the issue, I was porting a library of mine to ESM, and it was not obvious what what did go wrong. One of the dependency is using a check on module.parent to run its tests, tests that have side effects but there were no console output indicating tests were being run. Even reading the dependency source code, it wasn't obvious what was causing the issue, I didn't know module.parent would be undefined because I was importing from ESM.

I know this is just anecdotal evidence, yet I am convinced a runtime warning is needed; hopefully my user story shows how Node.js can benefit from a runtime deprecation.

To avoid leaking warnings to library users, I have changed the algorithm to warn only when module.parent is null or undefined. My reasoning behind this choice is:

  • Users that have a dependency checking module.parent won't get the warning when using require (because it works fine in that situation)
  • Users that have a dependency checking module.parent will get the warning when using import (because it breaks in that situation)
  • Library authors checking module.parent to run their tests will get the warning so they know they should fix their code.
  • Users using a CLI package that checks module.parent will also get the warning, that's unfortunate but I would expect it is not a very common pattern.
  • EDIT: I have added a condition to display the warning to users using --pending-deprecations flag regardless of the value of module.parent.

I have also added a code snippet in the deprecation note to tell users how to get the current module's parents to address @DerekNonGeneric's concern.

doc/api/deprecations.md Outdated Show resolved Hide resolved
Copy link
Member

@addaleax addaleax left a comment

Choose a reason for hiding this comment

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

I’ll remove my objection since the PR now warns in different situations, but I still think that this is not a good idea, tbh.

If the problem is that module.parent == null happens unexpectedly when importing from ESM, I would try to fix that by returning a fake object for module.parent in that situation – it doesn’t really have to be a full Module, just something as close to it as that makes sense.

I also still think that a full runtime deprecation is overkill, and I would feel more comfortable introducing this only for --pending-deprecation at first – especially as we generally aim to documentation-deprecate features before runtime-deprecating them.

lib/internal/modules/cjs/loader.js Outdated Show resolved Hide resolved
doc/api/deprecations.md Outdated Show resolved Hide resolved
@aduh95 aduh95 requested a review from addaleax March 13, 2020 18:35
Copy link
Contributor

@ExE-Boss ExE-Boss left a comment

Choose a reason for hiding this comment

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

Personally, I’d prefer if this emitted the warning for nullish parent values regardless of ‑‑pending‑deprecation being specified.

doc/api/deprecations.md Outdated Show resolved Hide resolved
lib/internal/modules/cjs/loader.js Outdated Show resolved Hide resolved
doc/api/deprecations.md Outdated Show resolved Hide resolved
@papb
Copy link

papb commented Jul 23, 2020

A bit late to the party, but meow uses this for a reason other than checking if the module is the entrypoint. See sindresorhus/meow#157

@bmeck
Copy link
Member

bmeck commented Jul 23, 2020

@papb yes, we have talked about meow and similar for quite some time ( I see a ref from 2017 in nodejs/node-eps#57 (comment) )

aduh95 added a commit to aduh95/node that referenced this pull request Aug 18, 2020
This feature does not work when a module is imported using ECMAScript
modules specification, therefore it is deprecated.

Fixes: nodejs/modules#469

PR-URL: nodejs#32217
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
BethGriggs pushed a commit that referenced this pull request Aug 18, 2020
This feature does not work when a module is imported using ECMAScript
modules specification, therefore it is deprecated.

Fixes: nodejs/modules#469

PR-URL: #32217
Backport-PR-URL: #34592
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
@codebytere codebytere mentioned this pull request Sep 28, 2020
@BethGriggs BethGriggs added the notable-change PRs with changes that should be highlighted in changelogs. label Sep 29, 2020
codebytere added a commit that referenced this pull request Oct 4, 2020
Notable changes:

assert:
  * (SEMVER-MINOR) port common.mustCall() to assert (ConorDavenport) #31982
async_hooks:
  * (SEMVER-MINOR) add AsyncResource.bind utility (James M Snell) #34574
buffer:
  * (SEMVER-MINOR) also alias BigUInt methods (Anna Henningsen) #34960
  * (SEMVER-MINOR) alias UInt ➡️ Uint in buffer methods (Anna Henningsen) #34729
build:
  * (SEMVER-MINOR) add build flag for OSS-Fuzz integration (davkor) #34761
cli:
  * (SEMVER-MINOR) add alias for report-directory to make it consistent (Ash Cripps) #33587
crypto:
  * (SEMVER-MINOR) allow KeyObjects in postMessage (Tobias Nießen) #33360
  * (SEMVER-MINOR) add randomInt function (Oli Lalonde) #34600
deps:
  * upgrade to libuv 1.39.0 (Colin Ihrig) #34915
  * upgrade npm to 6.14.7 (claudiahdz) #34468
  * upgrade to libuv 1.38.1 (Colin Ihrig) #34187
dgram:
  * (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
  * (SEMVER-MINOR) allow typed arrays in .send() (Sarat Addepalli) #22413
doc:
  * (SEMVER-MINOR) Add maxTotalSockets option to agent constructor (rickyes) #33617
  * (SEMVER-MINOR) add basic embedding example documentation (Anna Henningsen) #30467
  * add Ricky Zhou to collaborators (rickyes) #34676
  * add release key for Ruy Adorno (Ruy Adorno) #34628
  * add DerekNonGeneric to collaborators (Derek Lewis) #34602
  * add AshCripps to collaborators (Ash Cripps) #34494
  * add HarshithaKP to collaborators (Harshitha K P) #34417
  * add rexagod to collaborators (Pranshu Srivastava) #34457
  * add release key for Richard Lau (Richard Lau) #34397
  * add danielleadams to collaborators (Danielle Adams) #34360
  * add sxa as collaborator (Stewart X Addison) #34338
  * add ruyadorno to collaborators (Ruy Adorno) #34297
  * (SEMVER-MAJOR) deprecate process.umask() with no arguments (Colin Ihrig) #32499
embedding:
  * (SEMVER-MINOR) make Stop() stop Workers (Anna Henningsen) #32531
  * (SEMVER-MINOR) provide hook for custom process.exit() behaviour (Anna Henningsen) #32531
fs:
  * (SEMVER-MINOR) implement lutimes (Maël Nison) #33399
http:
  * (SEMVER-MINOR) add maxTotalSockets to agent class (rickyes) #33617
  * (SEMVER-MINOR) return this from IncomingMessage#destroy() (Colin Ihrig) #32789
  * (SEMVER-MINOR) expose host and protocol on ClientRequest (wenningplus) #33803
http2:
  * (SEMVER-MINOR) return this for Http2ServerRequest#setTimeout (Pranshu Srivastava) #33994
  * (SEMVER-MINOR) do not modify explicity set date headers (Pranshu Srivastava) #33160
module:
  * (SEMVER-MINOR) named exports for CJS via static analysis (Guy Bedford) #35249
  * (SEMVER-MINOR) exports pattern support (Guy Bedford) #34718
  * (SEMVER-MINOR) package "imports" field (Guy Bedford) #34117
  * (SEMVER-MINOR) deprecate module.parent (Antoine du HAMEL) #32217
n-api:
  * (SEMVER-MINOR) create N-API version 7 (Gabriel Schulhof) #35199
  * (SEMVER-MINOR) support type-tagging objects (Gabriel Schulhof) #28237
n-api,src:
  * (SEMVER-MINOR) provide asynchronous cleanup hooks (Anna Henningsen) #34572
perf_hooks:
  * (SEMVER-MINOR) add idleTime and event loop util (Trevor Norris) #34938
timers:
  * (SEMVER-MINOR) allow timers to be used as primitives (Denys Otrishko) #34017
tls:
  * (SEMVER-MINOR) make 'createSecureContext' honor more options (Mateusz Krawczuk) #33974
worker:
  * (SEMVER-MINOR) add public method for marking objects as untransferable (Anna Henningsen) #33979
  * (SEMVER-MINOR) emit `'messagerror'` events for failed deserialization (Anna Henningsen) #33772
  * (SEMVER-MINOR) allow passing JS wrapper objects via postMessage (Anna Henningsen) #33772
  * (SEMVER-MINOR) allow transferring/cloning generic BaseObjects (Anna Henningsen) #33772
  * (SEMVER-MINOR) add option to track unmanaged file descriptors (Anna Henningsen) #34303
  * (SEMVER-MINOR) add stack size resource limit option (Anna Henningsen) #33085
worker,fs:
  * (SEMVER-MINOR) make FileHandle transferable (Anna Henningsen) #33772
zlib:
  * (SEMVER-MINOR) add `maxOutputLength` option (unknown) #33516
  * switch to lazy init for zlib streams (Andrey Pechkurov) #34048

PR-URL: TODO
codebytere added a commit that referenced this pull request Oct 6, 2020
Notable changes:

assert:
  * (SEMVER-MINOR) port common.mustCall() to assert (ConorDavenport) #31982
async_hooks:
  * (SEMVER-MINOR) add AsyncResource.bind utility (James M Snell) #34574
buffer:
  * (SEMVER-MINOR) also alias BigUInt methods (Anna Henningsen) #34960
  * (SEMVER-MINOR) alias UInt ➡️ Uint in buffer methods (Anna Henningsen) #34729
build:
  * (SEMVER-MINOR) add build flag for OSS-Fuzz integration (davkor) #34761
cli:
  * (SEMVER-MINOR) add alias for report-directory to make it consistent (Ash Cripps) #33587
crypto:
  * (SEMVER-MINOR) allow KeyObjects in postMessage (Tobias Nießen) #33360
  * (SEMVER-MINOR) add randomInt function (Oli Lalonde) #34600
deps:
  * upgrade to libuv 1.39.0 (Colin Ihrig) #34915
  * upgrade npm to 6.14.7 (claudiahdz) #34468
  * upgrade to libuv 1.38.1 (Colin Ihrig) #34187
dgram:
  * (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
  * (SEMVER-MINOR) allow typed arrays in .send() (Sarat Addepalli) #22413
doc:
  * (SEMVER-MINOR) Add maxTotalSockets option to agent constructor (rickyes) #33617
  * (SEMVER-MINOR) add basic embedding example documentation (Anna Henningsen) #30467
  * add Ricky Zhou to collaborators (rickyes) #34676
  * add release key for Ruy Adorno (Ruy Adorno) #34628
  * add DerekNonGeneric to collaborators (Derek Lewis) #34602
  * add AshCripps to collaborators (Ash Cripps) #34494
  * add HarshithaKP to collaborators (Harshitha K P) #34417
  * add rexagod to collaborators (Pranshu Srivastava) #34457
  * add release key for Richard Lau (Richard Lau) #34397
  * add danielleadams to collaborators (Danielle Adams) #34360
  * add sxa as collaborator (Stewart X Addison) #34338
  * add ruyadorno to collaborators (Ruy Adorno) #34297
  * (SEMVER-MAJOR) deprecate process.umask() with no arguments (Colin Ihrig) #32499
embedding:
  * (SEMVER-MINOR) make Stop() stop Workers (Anna Henningsen) #32531
  * (SEMVER-MINOR) provide hook for custom process.exit() behaviour (Anna Henningsen) #32531
fs:
  * (SEMVER-MINOR) implement lutimes (Maël Nison) #33399
http:
  * (SEMVER-MINOR) add maxTotalSockets to agent class (rickyes) #33617
  * (SEMVER-MINOR) return this from IncomingMessage#destroy() (Colin Ihrig) #32789
  * (SEMVER-MINOR) expose host and protocol on ClientRequest (wenningplus) #33803
http2:
  * (SEMVER-MINOR) return this for Http2ServerRequest#setTimeout (Pranshu Srivastava) #33994
  * (SEMVER-MINOR) do not modify explicity set date headers (Pranshu Srivastava) #33160
module:
  * (SEMVER-MINOR) named exports for CJS via static analysis (Guy Bedford) #35249
  * (SEMVER-MINOR) exports pattern support (Guy Bedford) #34718
  * (SEMVER-MINOR) package "imports" field (Guy Bedford) #34117
  * (SEMVER-MINOR) deprecate module.parent (Antoine du HAMEL) #32217
n-api:
  * (SEMVER-MINOR) create N-API version 7 (Gabriel Schulhof) #35199
  * (SEMVER-MINOR) support type-tagging objects (Gabriel Schulhof) #28237
n-api,src:
  * (SEMVER-MINOR) provide asynchronous cleanup hooks (Anna Henningsen) #34572
perf_hooks:
  * (SEMVER-MINOR) add idleTime and event loop util (Trevor Norris) #34938
timers:
  * (SEMVER-MINOR) allow timers to be used as primitives (Denys Otrishko) #34017
tls:
  * (SEMVER-MINOR) make 'createSecureContext' honor more options (Mateusz Krawczuk) #33974
worker:
  * (SEMVER-MINOR) add public method for marking objects as untransferable (Anna Henningsen) #33979
  * (SEMVER-MINOR) emit `'messagerror'` events for failed deserialization (Anna Henningsen) #33772
  * (SEMVER-MINOR) allow passing JS wrapper objects via postMessage (Anna Henningsen) #33772
  * (SEMVER-MINOR) allow transferring/cloning generic BaseObjects (Anna Henningsen) #33772
  * (SEMVER-MINOR) add option to track unmanaged file descriptors (Anna Henningsen) #34303
  * (SEMVER-MINOR) add stack size resource limit option (Anna Henningsen) #33085
worker,fs:
  * (SEMVER-MINOR) make FileHandle transferable (Anna Henningsen) #33772
zlib:
  * (SEMVER-MINOR) add `maxOutputLength` option (unknown) #33516
  * switch to lazy init for zlib streams (Andrey Pechkurov) #34048

PR-URL: TODO
@richardlau
Copy link
Member

After bisecting, this PR is the reason that node-gyp's test suite is failing in CITGM on master and the current v15.0.0-proposal (#35014, cc @BethGriggs).
e.g. https://ci.nodejs.org/job/citgm-smoker/2497/nodes=ubuntu1804-64/testReport/junit/(root)/citgm/node_gyp_v7_1_0/

 # Subtest: test/test-configure-python.js
     1..0 # no tests found
 not ok 2 - test/test-configure-python.js # time=409.579ms
   ---
   timeout: 120000
   file: test/test-configure-python.js
   childId: 1
   command: /home/iojs/build/workspace/citgm-smoker/nodes/ubuntu1804-64/smoker/bin/node
   args:
     - '-r'
     - >-
       /home/iojs/tmp/citgm_tmp/a30ded27-455a-421a-8399-2875b04856df/node-gyp/node_modules/esm/esm.js
     - test/test-configure-python.js
   stdio:
     - 0
     - pipe
     - 2
   cwd: /home/iojs/tmp/citgm_tmp/a30ded27-455a-421a-8399-2875b04856df/node-gyp
   exitCode: 1
   ...
...
 /home/iojs/tmp/citgm_tmp/a30ded27-455a-421a-8399-2875b04856df/node-gyp/node_modules/require-inject/index.js:72
   Object.keys(mocks).forEach(function (name) {
                      ^
 TypeError: Cannot set property parent of #<Module> which has only a getter
     at /home/iojs/tmp/citgm_tmp/a30ded27-455a-421a-8399-2875b04856df/node-gyp/node_modules/require-inject/index.js:82:18
     at Array.forEach (<anonymous>)
     at installGlobally (/home/iojs/tmp/citgm_tmp/a30ded27-455a-421a-8399-2875b04856df/node-gyp/node_modules/require-inject/index.js:72:22)
     at requireInject (/home/iojs/tmp/citgm_tmp/a30ded27-455a-421a-8399-2875b04856df/node-gyp/node_modules/require-inject/index.js:41:7)
     at module.exports (/home/iojs/tmp/citgm_tmp/a30ded27-455a-421a-8399-2875b04856df/node-gyp/node_modules/require-inject/index.js:13:10)
     at Object.<anonymous> (/home/iojs/tmp/citgm_tmp/a30ded27-455a-421a-8399-2875b04856df/node-gyp/test/test-configure-python.js:8:19)
     at Module._compile (internal/modules/cjs/loader.js:1072:30)
     at Object.Module._extensions..js (internal/modules/cjs/loader.js:1101:10)
     at Module.load (internal/modules/cjs/loader.js:937:32)
     at Function.Module._load (internal/modules/cjs/loader.js:778:14)

The test suite passes on Node.js 14.

@nodejs/modules-active-members is this expected to break for CJS? This was documented as being a documentation only deprecation.

@bmeck
Copy link
Member

bmeck commented Oct 6, 2020

@richardlau this looks like whenever the deprecated form landed it didn't add back a setter, to my knowledge there was no intent to prevent assignment in CJS. This looks like a bug and we need to add back a setter, right now https://github.com/iarna/require-inject/blob/b1cc122fa34741a5d60ad4c26e839fd9bbb7a61b/index.js#L36 is failing due to the lack of setter. changing

ObjectDefineProperty(Module.prototype, 'parent', {
get: pendingDeprecation ? deprecate(
getModuleParent,
'module.parent is deprecated due to accuracy issues. Please use ' +
'require.main to find program entry point instead.',
'DEP0144'
) : getModuleParent
});
to have a setter should fix it

@aduh95
Copy link
Contributor Author

aduh95 commented Oct 6, 2020

This PR moved the parent declaration from the Module instance to the prototype to ensure the pending deprecation warning is written only once. As a result module.parent is now read-only. It's a breaking change, and has been backported to v14.x in semver-minor patch.

require-inject is apparently creating a Module instance, and tries to assign it a parent property which throws. A possible fix would be to add a setter to Module.prototype.parent.

EDIT: @bmeck beat me, sorry for the repetition.
I've opened iarna/require-inject#19 to try to solve the issue.

codebytere added a commit that referenced this pull request Oct 6, 2020
Notable changes:

assert:
  * (SEMVER-MINOR) port common.mustCall() to assert (ConorDavenport) #31982
async_hooks:
  * (SEMVER-MINOR) add AsyncResource.bind utility (James M Snell) #34574
buffer:
  * (SEMVER-MINOR) also alias BigUInt methods (Anna Henningsen) #34960
  * (SEMVER-MINOR) alias UInt ➡️ Uint in buffer methods (Anna Henningsen) #34729
build:
  * (SEMVER-MINOR) add build flag for OSS-Fuzz integration (davkor) #34761
cli:
  * (SEMVER-MINOR) add alias for report-directory to make it consistent (Ash Cripps) #33587
crypto:
  * (SEMVER-MINOR) allow KeyObjects in postMessage (Tobias Nießen) #33360
  * (SEMVER-MINOR) add randomInt function (Oli Lalonde) #34600
deps:
  * upgrade to libuv 1.39.0 (Colin Ihrig) #34915
  * upgrade npm to 6.14.7 (claudiahdz) #34468
  * upgrade to libuv 1.38.1 (Colin Ihrig) #34187
dgram:
  * (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
  * (SEMVER-MINOR) allow typed arrays in .send() (Sarat Addepalli) #22413
doc:
  * (SEMVER-MINOR) Add maxTotalSockets option to agent constructor (rickyes) #33617
  * (SEMVER-MINOR) add basic embedding example documentation (Anna Henningsen) #30467
  * add Ricky Zhou to collaborators (rickyes) #34676
  * add release key for Ruy Adorno (Ruy Adorno) #34628
  * add DerekNonGeneric to collaborators (Derek Lewis) #34602
  * add AshCripps to collaborators (Ash Cripps) #34494
  * add HarshithaKP to collaborators (Harshitha K P) #34417
  * add rexagod to collaborators (Pranshu Srivastava) #34457
  * add release key for Richard Lau (Richard Lau) #34397
  * add danielleadams to collaborators (Danielle Adams) #34360
  * add sxa as collaborator (Stewart X Addison) #34338
  * add ruyadorno to collaborators (Ruy Adorno) #34297
  * (SEMVER-MAJOR) deprecate process.umask() with no arguments (Colin Ihrig) #32499
embedding:
  * (SEMVER-MINOR) make Stop() stop Workers (Anna Henningsen) #32531
  * (SEMVER-MINOR) provide hook for custom process.exit() behaviour (Anna Henningsen) #32531
fs:
  * (SEMVER-MINOR) implement lutimes (Maël Nison) #33399
http:
  * (SEMVER-MINOR) add maxTotalSockets to agent class (rickyes) #33617
  * (SEMVER-MINOR) return this from IncomingMessage#destroy() (Colin Ihrig) #32789
  * (SEMVER-MINOR) expose host and protocol on ClientRequest (wenningplus) #33803
http2:
  * (SEMVER-MINOR) return this for Http2ServerRequest#setTimeout (Pranshu Srivastava) #33994
  * (SEMVER-MINOR) do not modify explicity set date headers (Pranshu Srivastava) #33160
module:
  * (SEMVER-MINOR) named exports for CJS via static analysis (Guy Bedford) #35249
  * (SEMVER-MINOR) exports pattern support (Guy Bedford) #34718
  * (SEMVER-MINOR) package "imports" field (Guy Bedford) #34117
  * (SEMVER-MINOR) deprecate module.parent (Antoine du HAMEL) #32217
n-api:
  * (SEMVER-MINOR) create N-API version 7 (Gabriel Schulhof) #35199
  * (SEMVER-MINOR) support type-tagging objects (Gabriel Schulhof) #28237
n-api,src:
  * (SEMVER-MINOR) provide asynchronous cleanup hooks (Anna Henningsen) #34572
perf_hooks:
  * (SEMVER-MINOR) add idleTime and event loop util (Trevor Norris) #34938
timers:
  * (SEMVER-MINOR) allow timers to be used as primitives (Denys Otrishko) #34017
tls:
  * (SEMVER-MINOR) make 'createSecureContext' honor more options (Mateusz Krawczuk) #33974
worker:
  * (SEMVER-MINOR) add public method for marking objects as untransferable (Anna Henningsen) #33979
  * (SEMVER-MINOR) emit `'messagerror'` events for failed deserialization (Anna Henningsen) #33772
  * (SEMVER-MINOR) allow passing JS wrapper objects via postMessage (Anna Henningsen) #33772
  * (SEMVER-MINOR) allow transferring/cloning generic BaseObjects (Anna Henningsen) #33772
  * (SEMVER-MINOR) add option to track unmanaged file descriptors (Anna Henningsen) #34303
  * (SEMVER-MINOR) add stack size resource limit option (Anna Henningsen) #33085
worker,fs:
  * (SEMVER-MINOR) make FileHandle transferable (Anna Henningsen) #33772
zlib:
  * (SEMVER-MINOR) add `maxOutputLength` option (unknown) #33516
  * switch to lazy init for zlib streams (Andrey Pechkurov) #34048

PR-URL: TODO
codebytere added a commit that referenced this pull request Oct 6, 2020
Notable changes:

assert:
  * (SEMVER-MINOR) port common.mustCall() to assert (ConorDavenport) #31982
async_hooks:
  * (SEMVER-MINOR) add AsyncResource.bind utility (James M Snell) #34574
buffer:
  * (SEMVER-MINOR) also alias BigUInt methods (Anna Henningsen) #34960
  * (SEMVER-MINOR) alias UInt ➡️ Uint in buffer methods (Anna Henningsen) #34729
build:
  * (SEMVER-MINOR) add build flag for OSS-Fuzz integration (davkor) #34761
cli:
  * (SEMVER-MINOR) add alias for report-directory to make it consistent (Ash Cripps) #33587
crypto:
  * (SEMVER-MINOR) allow KeyObjects in postMessage (Tobias Nießen) #33360
  * (SEMVER-MINOR) add randomInt function (Oli Lalonde) #34600
deps:
  * upgrade to libuv 1.39.0 (Colin Ihrig) #34915
  * upgrade npm to 6.14.7 (claudiahdz) #34468
  * upgrade to libuv 1.38.1 (Colin Ihrig) #34187
dgram:
  * (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
  * (SEMVER-MINOR) allow typed arrays in .send() (Sarat Addepalli) #22413
doc:
  * (SEMVER-MINOR) Add maxTotalSockets option to agent constructor (rickyes) #33617
  * (SEMVER-MINOR) add basic embedding example documentation (Anna Henningsen) #30467
  * add Ricky Zhou to collaborators (rickyes) #34676
  * add release key for Ruy Adorno (Ruy Adorno) #34628
  * add DerekNonGeneric to collaborators (Derek Lewis) #34602
  * add AshCripps to collaborators (Ash Cripps) #34494
  * add HarshithaKP to collaborators (Harshitha K P) #34417
  * add rexagod to collaborators (Pranshu Srivastava) #34457
  * add release key for Richard Lau (Richard Lau) #34397
  * add danielleadams to collaborators (Danielle Adams) #34360
  * add sxa as collaborator (Stewart X Addison) #34338
  * add ruyadorno to collaborators (Ruy Adorno) #34297
  * (SEMVER-MAJOR) deprecate process.umask() with no arguments (Colin Ihrig) #32499
embedding:
  * (SEMVER-MINOR) make Stop() stop Workers (Anna Henningsen) #32531
  * (SEMVER-MINOR) provide hook for custom process.exit() behaviour (Anna Henningsen) #32531
fs:
  * (SEMVER-MINOR) implement lutimes (Maël Nison) #33399
http:
  * (SEMVER-MINOR) add maxTotalSockets to agent class (rickyes) #33617
  * (SEMVER-MINOR) return this from IncomingMessage#destroy() (Colin Ihrig) #32789
  * (SEMVER-MINOR) expose host and protocol on ClientRequest (wenningplus) #33803
http2:
  * (SEMVER-MINOR) return this for Http2ServerRequest#setTimeout (Pranshu Srivastava) #33994
  * (SEMVER-MINOR) do not modify explicity set date headers (Pranshu Srivastava) #33160
module:
  * (SEMVER-MINOR) named exports for CJS via static analysis (Guy Bedford) #35249
  * (SEMVER-MINOR) exports pattern support (Guy Bedford) #34718
  * (SEMVER-MINOR) package "imports" field (Guy Bedford) #34117
  * (SEMVER-MINOR) deprecate module.parent (Antoine du HAMEL) #32217
n-api:
  * (SEMVER-MINOR) create N-API version 7 (Gabriel Schulhof) #35199
  * (SEMVER-MINOR) support type-tagging objects (Gabriel Schulhof) #28237
n-api,src:
  * (SEMVER-MINOR) provide asynchronous cleanup hooks (Anna Henningsen) #34572
perf_hooks:
  * (SEMVER-MINOR) add idleTime and event loop util (Trevor Norris) #34938
timers:
  * (SEMVER-MINOR) allow timers to be used as primitives (Denys Otrishko) #34017
tls:
  * (SEMVER-MINOR) make 'createSecureContext' honor more options (Mateusz Krawczuk) #33974
worker:
  * (SEMVER-MINOR) add public method for marking objects as untransferable (Anna Henningsen) #33979
  * (SEMVER-MINOR) emit `'messagerror'` events for failed deserialization (Anna Henningsen) #33772
  * (SEMVER-MINOR) allow passing JS wrapper objects via postMessage (Anna Henningsen) #33772
  * (SEMVER-MINOR) allow transferring/cloning generic BaseObjects (Anna Henningsen) #33772
  * (SEMVER-MINOR) add option to track unmanaged file descriptors (Anna Henningsen) #34303
  * (SEMVER-MINOR) add stack size resource limit option (Anna Henningsen) #33085
worker,fs:
  * (SEMVER-MINOR) make FileHandle transferable (Anna Henningsen) #33772
zlib:
  * (SEMVER-MINOR) add `maxOutputLength` option (unknown) #33516
  * switch to lazy init for zlib streams (Andrey Pechkurov) #34048

PR-URL: #35401
@guybedford
Copy link
Contributor

FYI this is about to go out in 12.

@targos
Copy link
Member

targos commented Oct 6, 2020

@guybedford The version of this change that's going out in 12 is #34592 (doc-only deprecation)

@guybedford
Copy link
Contributor

guybedford commented Oct 6, 2020 via email

codebytere added a commit that referenced this pull request Oct 6, 2020
Notable changes:

assert:
  * (SEMVER-MINOR) port common.mustCall() to assert (ConorDavenport) #31982
async_hooks:
  * (SEMVER-MINOR) add AsyncResource.bind utility (James M Snell) #34574
buffer:
  * (SEMVER-MINOR) also alias BigUInt methods (Anna Henningsen) #34960
  * (SEMVER-MINOR) alias UInt ➡️ Uint in buffer methods (Anna Henningsen) #34729
build:
  * (SEMVER-MINOR) add build flag for OSS-Fuzz integration (davkor) #34761
cli:
  * (SEMVER-MINOR) add alias for report-directory to make it consistent (Ash Cripps) #33587
crypto:
  * (SEMVER-MINOR) allow KeyObjects in postMessage (Tobias Nießen) #33360
  * (SEMVER-MINOR) add randomInt function (Oli Lalonde) #34600
deps:
  * upgrade to libuv 1.39.0 (Colin Ihrig) #34915
  * upgrade npm to 6.14.7 (claudiahdz) #34468
  * upgrade to libuv 1.38.1 (Colin Ihrig) #34187
dgram:
  * (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) #14500
  * (SEMVER-MINOR) allow typed arrays in .send() (Sarat Addepalli) #22413
doc:
  * (SEMVER-MINOR) Add maxTotalSockets option to agent constructor (rickyes) #33617
  * (SEMVER-MINOR) add basic embedding example documentation (Anna Henningsen) #30467
  * add Ricky Zhou to collaborators (rickyes) #34676
  * add release key for Ruy Adorno (Ruy Adorno) #34628
  * add DerekNonGeneric to collaborators (Derek Lewis) #34602
  * add AshCripps to collaborators (Ash Cripps) #34494
  * add HarshithaKP to collaborators (Harshitha K P) #34417
  * add rexagod to collaborators (Pranshu Srivastava) #34457
  * add release key for Richard Lau (Richard Lau) #34397
  * add danielleadams to collaborators (Danielle Adams) #34360
  * add sxa as collaborator (Stewart X Addison) #34338
  * add ruyadorno to collaborators (Ruy Adorno) #34297
  * (SEMVER-MAJOR) deprecate process.umask() with no arguments (Colin Ihrig) #32499
embedding:
  * (SEMVER-MINOR) make Stop() stop Workers (Anna Henningsen) #32531
  * (SEMVER-MINOR) provide hook for custom process.exit() behaviour (Anna Henningsen) #32531
fs:
  * (SEMVER-MINOR) implement lutimes (Maël Nison) #33399
http:
  * (SEMVER-MINOR) add maxTotalSockets to agent class (rickyes) #33617
  * (SEMVER-MINOR) return this from IncomingMessage#destroy() (Colin Ihrig) #32789
  * (SEMVER-MINOR) expose host and protocol on ClientRequest (wenningplus) #33803
http2:
  * (SEMVER-MINOR) return this for Http2ServerRequest#setTimeout (Pranshu Srivastava) #33994
  * (SEMVER-MINOR) do not modify explicity set date headers (Pranshu Srivastava) #33160
module:
  * (SEMVER-MINOR) named exports for CJS via static analysis (Guy Bedford) #35249
  * (SEMVER-MINOR) exports pattern support (Guy Bedford) #34718
  * (SEMVER-MINOR) package "imports" field (Guy Bedford) #34117
  * (SEMVER-MINOR) deprecate module.parent (Antoine du HAMEL) #32217
n-api:
  * (SEMVER-MINOR) create N-API version 7 (Gabriel Schulhof) #35199
  * (SEMVER-MINOR) support type-tagging objects (Gabriel Schulhof) #28237
n-api,src:
  * (SEMVER-MINOR) provide asynchronous cleanup hooks (Anna Henningsen) #34572
perf_hooks:
  * (SEMVER-MINOR) add idleTime and event loop util (Trevor Norris) #34938
timers:
  * (SEMVER-MINOR) allow timers to be used as primitives (Denys Otrishko) #34017
tls:
  * (SEMVER-MINOR) make 'createSecureContext' honor more options (Mateusz Krawczuk) #33974
worker:
  * (SEMVER-MINOR) add public method for marking objects as untransferable (Anna Henningsen) #33979
  * (SEMVER-MINOR) emit `'messagerror'` events for failed deserialization (Anna Henningsen) #33772
  * (SEMVER-MINOR) allow passing JS wrapper objects via postMessage (Anna Henningsen) #33772
  * (SEMVER-MINOR) allow transferring/cloning generic BaseObjects (Anna Henningsen) #33772
  * (SEMVER-MINOR) add option to track unmanaged file descriptors (Anna Henningsen) #34303
  * (SEMVER-MINOR) add stack size resource limit option (Anna Henningsen) #33085
worker,fs:
  * (SEMVER-MINOR) make FileHandle transferable (Anna Henningsen) #33772
zlib:
  * (SEMVER-MINOR) add `maxOutputLength` option (unknown) #33516
  * switch to lazy init for zlib streams (Andrey Pechkurov) #34048

PR-URL: #35401
joesepi pushed a commit to joesepi/node that referenced this pull request Jan 8, 2021
Notable changes:

assert:
  * (SEMVER-MINOR) port common.mustCall() to assert (ConorDavenport) nodejs#31982
async_hooks:
  * (SEMVER-MINOR) add AsyncResource.bind utility (James M Snell) nodejs#34574
buffer:
  * (SEMVER-MINOR) also alias BigUInt methods (Anna Henningsen) nodejs#34960
  * (SEMVER-MINOR) alias UInt ➡️ Uint in buffer methods (Anna Henningsen) nodejs#34729
build:
  * (SEMVER-MINOR) add build flag for OSS-Fuzz integration (davkor) nodejs#34761
cli:
  * (SEMVER-MINOR) add alias for report-directory to make it consistent (Ash Cripps) nodejs#33587
crypto:
  * (SEMVER-MINOR) allow KeyObjects in postMessage (Tobias Nießen) nodejs#33360
  * (SEMVER-MINOR) add randomInt function (Oli Lalonde) nodejs#34600
deps:
  * upgrade to libuv 1.39.0 (Colin Ihrig) nodejs#34915
  * upgrade npm to 6.14.7 (claudiahdz) nodejs#34468
  * upgrade to libuv 1.38.1 (Colin Ihrig) nodejs#34187
dgram:
  * (SEMVER-MINOR) add IPv6 scope id suffix to received udp6 dgrams (Pekka Nikander) nodejs#14500
  * (SEMVER-MINOR) allow typed arrays in .send() (Sarat Addepalli) nodejs#22413
doc:
  * (SEMVER-MINOR) Add maxTotalSockets option to agent constructor (rickyes) nodejs#33617
  * (SEMVER-MINOR) add basic embedding example documentation (Anna Henningsen) nodejs#30467
  * add Ricky Zhou to collaborators (rickyes) nodejs#34676
  * add release key for Ruy Adorno (Ruy Adorno) nodejs#34628
  * add DerekNonGeneric to collaborators (Derek Lewis) nodejs#34602
  * add AshCripps to collaborators (Ash Cripps) nodejs#34494
  * add HarshithaKP to collaborators (Harshitha K P) nodejs#34417
  * add rexagod to collaborators (Pranshu Srivastava) nodejs#34457
  * add release key for Richard Lau (Richard Lau) nodejs#34397
  * add danielleadams to collaborators (Danielle Adams) nodejs#34360
  * add sxa as collaborator (Stewart X Addison) nodejs#34338
  * add ruyadorno to collaborators (Ruy Adorno) nodejs#34297
  * (SEMVER-MAJOR) deprecate process.umask() with no arguments (Colin Ihrig) nodejs#32499
embedding:
  * (SEMVER-MINOR) make Stop() stop Workers (Anna Henningsen) nodejs#32531
  * (SEMVER-MINOR) provide hook for custom process.exit() behaviour (Anna Henningsen) nodejs#32531
fs:
  * (SEMVER-MINOR) implement lutimes (Maël Nison) nodejs#33399
http:
  * (SEMVER-MINOR) add maxTotalSockets to agent class (rickyes) nodejs#33617
  * (SEMVER-MINOR) return this from IncomingMessage#destroy() (Colin Ihrig) nodejs#32789
  * (SEMVER-MINOR) expose host and protocol on ClientRequest (wenningplus) nodejs#33803
http2:
  * (SEMVER-MINOR) return this for Http2ServerRequest#setTimeout (Pranshu Srivastava) nodejs#33994
  * (SEMVER-MINOR) do not modify explicity set date headers (Pranshu Srivastava) nodejs#33160
module:
  * (SEMVER-MINOR) named exports for CJS via static analysis (Guy Bedford) nodejs#35249
  * (SEMVER-MINOR) exports pattern support (Guy Bedford) nodejs#34718
  * (SEMVER-MINOR) package "imports" field (Guy Bedford) nodejs#34117
  * (SEMVER-MINOR) deprecate module.parent (Antoine du HAMEL) nodejs#32217
n-api:
  * (SEMVER-MINOR) create N-API version 7 (Gabriel Schulhof) nodejs#35199
  * (SEMVER-MINOR) support type-tagging objects (Gabriel Schulhof) nodejs#28237
n-api,src:
  * (SEMVER-MINOR) provide asynchronous cleanup hooks (Anna Henningsen) nodejs#34572
perf_hooks:
  * (SEMVER-MINOR) add idleTime and event loop util (Trevor Norris) nodejs#34938
timers:
  * (SEMVER-MINOR) allow timers to be used as primitives (Denys Otrishko) nodejs#34017
tls:
  * (SEMVER-MINOR) make 'createSecureContext' honor more options (Mateusz Krawczuk) nodejs#33974
worker:
  * (SEMVER-MINOR) add public method for marking objects as untransferable (Anna Henningsen) nodejs#33979
  * (SEMVER-MINOR) emit `'messagerror'` events for failed deserialization (Anna Henningsen) nodejs#33772
  * (SEMVER-MINOR) allow passing JS wrapper objects via postMessage (Anna Henningsen) nodejs#33772
  * (SEMVER-MINOR) allow transferring/cloning generic BaseObjects (Anna Henningsen) nodejs#33772
  * (SEMVER-MINOR) add option to track unmanaged file descriptors (Anna Henningsen) nodejs#34303
  * (SEMVER-MINOR) add stack size resource limit option (Anna Henningsen) nodejs#33085
worker,fs:
  * (SEMVER-MINOR) make FileHandle transferable (Anna Henningsen) nodejs#33772
zlib:
  * (SEMVER-MINOR) add `maxOutputLength` option (unknown) nodejs#33516
  * switch to lazy init for zlib streams (Andrey Pechkurov) nodejs#34048

PR-URL: nodejs#35401
Copy link

@edumaciel10 edumaciel10 left a comment

Choose a reason for hiding this comment

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

cool

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. notable-change PRs with changes that should be highlighted in changelogs. semver-minor PRs that contain new features and should be released in the next minor version.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

import(cjs) messes with module.parent