-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[[FIX]] Preserve functionality in "legacy" Node.js #3215
Conversation
A recent minor release of the npm module `request` has introduced breaking changes for Node.js versions 0.10 and 0.12. Because JSHint depends on this module transitively through one of its `devDependencies`, this interferes with the project's ability to verify its own correctness in the effected environments. Allow JSHint to be installed in legacy environments by specifying the effected dependencies as "optional." These dependencies are only required by tests for the PhantomJS platform, and those tests can be orchestrated from a single actively-maintained version of Node.js without effecting coverage.
This sounds good to me. Unfortunately, the strategy used in this PR is failing in appveyor: https://ci.appveyor.com/project/jshint/jshint/build/1457/job/t4bnpwqry1jjo03n I believe we need to modify appveyor.yml by removing |
This patch has the desired effect in the Windows build, as evidenced by the
It's the text that immediately follows which describes the failure:
I'm not sure how to interpret this. Somehow, a dependency of JSCS is not |
Well, would you look at that :) |
My eyes and brain read right by... Sorry about that. Thanks for the follow up. This is 👍 |
This is really awkward.. this now pulls in phantomjs and phantomjs-prebuilt into projects that use jshint, withouth warning. These are huge and unnecessary dependencies! This only landed 3 days ago in 2.9.6 (2.9.5 is fine), so I only noticed this now. Can this please be reverted? Or want me to file a fresh issue about it?
|
2.9.6 pulls in phantomjs due to a [bad hack](jshint/jshint#3215). This is a huge and unnecessary `npm install` slow down, so avoid this by staying at 2.9.5 for now. Reported at jshint/jshint#3318
2.9.6 pulls in phantomjs due to a [bad hack](jshint/jshint#3215). This is a huge and unnecessary `npm install` slow down, so avoid this by staying at 2.9.5 for now. Reported at jshint/jshint#3318 Closes #9787
@rwaldron In gh-3209 and gh-3210, you reported that JSHint is now failing its
own tests when run with the 0.10 and 0.12 releases of Node.js. You were right
that the error originates from a nested dependency: ironically, an npm module
named
boom
. My initial plan was to work with the maintainers of that moduleto revert the change in a patch release and re-apply it in a new major version.
That turned out to be unnecessary because
boom
released a new major versionwhen it dropped support for legacy versions of Node.js. The real issue is how
that module has been consumed elsewhere.
The module
hawk
(which depends onboom
) likewise incremented its majorversion number in recognition of the breaking change. Unfortunately, the
request
module (which depends onhawk
) did not followsuit. And since JSHint depends
on
request
only transitively (through thephantom
module--used to run thetests in a browser-like environment), we cannot shield ourselves from the
breaking change through this project's
package.json
file.The simplest solution would be to drop support for Node.js versions 0.10 and
0.12. I'd be open to this, but only after announcing our intention, finalizing
our pending bug fixes and feature additions, publishing one last minor version,
and then publishing a new major version. But in the mean time, we would still
have a responsibility to verify the correctness of the library in those
environments.
This patch fixes the tests in 0.10 and 0.12. We're lucky because we only need
to run PhantomJS for one build, and the version of Node.js we use to do that is
inconsequential. If we move forward with this solution, we will be saying, "We
no longer support contributing to JSHint using legacy versions of Node.js."
This isn't ideal, but it's not a breaking change.
A recent minor release of the npm module
request
has introducedbreaking changes for Node.js versions 0.10 and 0.12. Because JSHint
depends on this module transitively through one of its
devDependencies
, this interferes with the project's ability to verifyits own correctness in the effected environments.
Allow JSHint to be installed in legacy environments by specifying the
effected dependencies as "optional." These dependencies are only
required by tests for the PhantomJS platform, and those tests can be
orchestrated from a single actively-maintained version of Node.js
without effecting coverage.