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
support-sinon.js breaking builds for older versions of node.js #1746
Comments
I am thinking that if you use a five year old Node version then staying on the latest version of Sinon can't be that big of a deal :-) In any case, this was unforeseen, but I am not sure support for such old engines is anything else but coincidental. On the other hand, we have striven to be ES5 pure in the codebase, so bundling ES2015 libraries seems a bit wrong. What do you think, @mroderick? |
I do see one point of fixing this though, which might have been obvious to everyone except myself. This doesn't happen by running tests, but by installing a devDependency. That means tests might be run on Node 9, but @robinfhu might strive to keep his OWN code backwards compatible. This prevents that. That speaks for fixing this. We could revert the change in the meantime, Morgan? |
I am in favour of fixing this. While we have written that we only want to support Node LTS versions, we're actually staying quite compatible with old Node. It seems silly that we would break compatibility for old Node versions, just for the post-install script. If we're going to break it, then at least let's get more substantial benefit (i.e. benefit for majority of users). Do you want to create PR to revert it? |
I could also just revert to version 3.2.3? It was version 4 that introduced ES2015. And if we do decide to keep install compatibility with Node 0.10, shouldn't we explicitly test for it in our Travis config? Whatever the resolution, I could add Node 0.10 or v3 there just to get a early warning. |
I've been thinking about this some more today, and decided to do some investigation. We've been using 527086a became This means that at least since 2017-10-25, Sinon has been partially broken in The fact that Sinon is now dependent on Considering that no one has noticed this for nearly six months, suggests to me that Sinon's user base has moved on from using I don't think we should go out of our way to support legacy node versions by testing for them in Travis. I do think we should fix the postinstall script to not fail in unsupported runtimes. |
Thanks for taking the time to consider this. For now, we have fixed sinon to |
I completely get why you would want something that you know some people see, but it has interfered with things that parse output. I am seeing the use of the postinstall step growing in a large number of libraries. To help with this (especially in CI), what do you think about something like putting Thanks for the consideration! |
@mlucool I think that would work for me, for just those reasons. But you would still get :
even if this flag suppressed the output from the command, though it achieves your intended purpose if you do |
Ref sinonjs#1746, this supports doing NO_SUPPORT_MESSAGE='' npm run postinstall -s
…script This allows Sinon to be installed by legacy node versions.
…script This allows Sinon to be installed by legacy node versions.
The new support-sinon.js post install script breaks build, because it uses the "supports-color" module, which uses ES6 syntax, which requires a new version of node.js.
We are on an older version of node.js.
The text was updated successfully, but these errors were encountered: