Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Remove ES6 from unsupported error logging #18953

Merged
merged 1 commit into from Mar 8, 2018

Conversation

deployable
Copy link
Contributor

NPM throws an error on old node versions that don't support template strings, rather than reporting the unsupported information to the user

NPM throws an error on old node versions that don's support template strings rather than reporting the unsupported information.
@deployable deployable requested a review from a team as a code owner October 25, 2017 02:19
@deployable
Copy link
Contributor Author

Currently throws

/home/vagrant/.nvm/v0.10.32/lib/node_modules/npm/lib/utils/unsupported.js:27
        console.error(`a bug known to break npm. Please update to at least ${r
                      ^
SyntaxError: Unexpected token ILLEGAL
    at Module._compile (module.js:439:25)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
    at Module.require (module.js:364:17)
    at require (module.js:380:17)
    at /home/vagrant/.nvm/v0.10.32/lib/node_modules/npm/bin/npm-cli.js:19:21
    at Object.<anonymous> (/home/vagrant/.nvm/v0.10.32/lib/node_modules/npm/bin/npm-cli.js:92:3)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)

@deployable
Copy link
Contributor Author

@kenany @iarna Is there any reason why this isn't being merged? There's been a number of dupes to it and it seems to meet the policy from: https://github.com/npm/npm/blob/latest/changelogs/CHANGELOG-4.md

On the flip side, we'll continue to (happily!) accept patches that address regressions seen when running the CLI with Node.js 0.12.

What this doesn't mean:

The CLI is going to start depending on ES2015+ features. npm continues to work, in almost all cases, all the way back to Node.js 0.8, and our long history of backwards compatibility is a source of pride for the team.
We aren't concerned about the problems of users who, for whatever reason, can't update to newer versions of npm. As mentioned above, we're happy to take community patches intended to address regressions.

Copy link
Contributor

@zkat zkat left a comment

Choose a reason for hiding this comment

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

Oh hey, thanks. Yeah, we can totally use modern Node features but we should probably avoid that for lib/unsupported.js which is what reports that this is even an issue.

@zkat zkat changed the base branch from latest to release-next March 6, 2018 03:13
@zkat zkat merged commit 6c53e96 into npm:release-next Mar 8, 2018
zkat pushed a commit that referenced this pull request Mar 8, 2018
npm throws an error on old node versions that don's support template strings rather than reporting the unsupported information.

PR-URL: #18953
Credit: @deployable
Reviewed-By: @zkat
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants