question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

last release should be major version - breaks compatibility with pre ECMAScript 2015

See original GitHub issue

Summary

https://github.com/request/request/pull/2751 breaks compatibility, the resulting hawk version should have incremented the major version number, not the patch number (2.82.0 to 2.82.1) in https://github.com/request/request/commit/6f1b51ed43309128487739f20f9df0699a043124

I updated hawk from 3.1.3 to 6.0.2 (still a ~ for version managing)

This jump in versions changed the which version(s) of NodeJS it is compatible with and should have resulted in a major version change. Only the patch version was updated (not even the minor version!), consequently libraries which depend on version 2.x of request automatically pick up a breaking change.

Simplest Example to Reproduce

run/compile in code that requires/uses pre- ECMAScript 2015

Expected Behavior

compiling an application that has transitive dependencies on request 5 days ago and today should continue to work, especially when the transitive dependency specifies a locked major version.

Current Behavior

building a project fails due to the new patch version.

/node_modules/grunt-juice-email/node_modules/juice/node_modules/jsdom/node_modules/request/node_modules/hawk/node_modules/boom/lib/index.js:5
const Hoek = require('hoek');
^^^^^

Loading "juice.js" tasks...ERROR
>> SyntaxError: Use of const in strict mode.

Possible Solution

remove version 2.82.1, update to 3.0.0 to account for the breaking change

Context

Builds that worked on the 15th no longer work, code work, deploys that are in-progress are halted. We’re looking at having to create a snowflake fork of this library just to keep our application working, since upgrading our NodeJS across the board is not a short-term option.

Your Environment

software version
request 2.x (via jsdom )
node 0.10.26
npm
Operating System Debian 7.11

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
mikealcommented, Sep 20, 2017

Nope.

Read thread https://github.com/request/request/issues/2772#issuecomment-330879495

I also recorded some audio w/ @watson about it https://www.patreon.com/posts/thomas-watson-on-14473075

If you are still on a version of Node.js no longer supported by the project, which we removed support for 11 months ago, and have been ignoring the warnings npm generates that entire time, it’s on you to go in and lock the version of request your rely on to an earlier version.

3reactions
kwalker3690commented, Sep 20, 2017

+1 Please revert or fix immediately, it will be a lot of work to go through and fix this in our own projects rather than fixing it in this repo!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Semantic Versioning 2.0.0 | Semantic Versioning
MAJOR version when you make incompatible API changes; MINOR version when you add functionality in a backwards compatible manner; PATCH version when you...
Read more >
A Guide to Semantic Versioning - Baeldung
The major version should increase when we've introduced new functionality which breaks our API, i.e., increase this value when we've added a ...
Read more >
2.2.0.6 - Semantic Versioning - LearnHowToProgram.com
Major versions represent "breaking" changes to software. This doesn't mean the software is broken - it just means that the package is no...
Read more >
JavaScript Versions: How JavaScript has changed over the ...
Since its inception in 1995, JavaScript has gone through several iterations and versions. In this article, we'll take a look at the history ......
Read more >
Breaking Changes · microsoft/TypeScript Wiki - GitHub
When TypeScript first supported type-checking and compilation for JavaScript, it accidentally supported a feature called import elision. In ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found