Skip to content

util: adhere to noDeprecation set at runtime#6683

Closed
addaleax wants to merge 1 commit intonodejs:masterfrom
addaleax:fix-no-deprecation
Closed

util: adhere to noDeprecation set at runtime#6683
addaleax wants to merge 1 commit intonodejs:masterfrom
addaleax:fix-no-deprecation

Conversation

@addaleax
Copy link
Member

@addaleax addaleax commented May 11, 2016

Checklist
  • tests and code linting passes
  • a test and/or benchmark is included
  • documentation is changed or added
  • the commit message follows commit guidelines
Affected core subsystem(s)

process (util?)

Description of change

Until now, the docs stated that process.noDeprecation could be set at runtime, but before any modules were loaded. That was not true, because lib/internal/util.js was loaded during the process startup process, so setting the flag at runtime was always pointless.

Minimal test case:

process.noDeprecation = true;
process.EventEmitter;

This patch moves checking process.noDeprecation to the place where it was actually used.

/cc @jasnell

CI: https://ci.nodejs.org/job/node-test-commit/3263/

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

util Issues and PRs related to the built-in util module.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants