8000 (function() {}).toString() yields different results in node 10.0.0 vs node 9 · Issue #20459 · nodejs/node · GitHub
[go: up one dir, main page]

Skip to content

(function() {}).toString() yields different results in node 10.0.0 vs node 9 #20459

@sadasant

Description

@sadasant
  • Version: Node 10.0.0
  • Platform: Debian GNU/Linux 8.10 (jessie)

Node 10.0.0 yields an unexpected result when functions are converted to strings through the toString method. Here's what happens:

  • 10.0.0: (function () { }).toString() results in: 'function () { }'.
  • 9.5.0: (function(){ }).toString() results in: 'function (){ }'.

This difference seems insignificant, but it affects several critical NPM modules. One example is: promisify-node, here's a relevant issue that I created in that repo: nodegit/promisify-node#28

Of course, this means that many other NPM repos are being affected, such as: nodegit. Here's the issue I created for them: nodegit/nodegit#1490

Within the other affected modules, we have: nodegit-promise, asap, fbjs, eslint-plugin-react, and so on and so forth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0