summaryrefslogtreecommitdiff
path: root/test/fixtures/deprecated-userland-class.js
AgeCommit message (Collapse)Author
2016-08-17util: fix deprecated class prototypeBryan English
Ensure the wrapped class prototype is exactly the unwrapped class prototype, rather than an object whose prototype is the unwrapped class prototype. This ensures that instances of the unwrapped class are instances of the wrapped class. This is useful when both a wrapped class and a factory for the unwrapped class are both exposed. Ref: https://github.com/nodejs/node/pull/8103 PR-URL: https://github.com/nodejs/node/pull/8105 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2016-08-04util: support classes in util.deprecate()vladimir
Classes cannot be instantiated without new, but util.deprecate() uses Function.prototype.apply(). This commit uses new.target to detect constructor calls, allowing classes to be deprecated. PR-URL: https://github.com/nodejs/node/pull/7690 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Michaƫl Zasso <mic.besace@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>