Closed chris-green closed 6 years ago
We're facing the same issue. The new version used for readable-stream is causing a SyntaxError: Use of const in strict mode.
error.
Recommend re-releasing v2.0.4 as v3.0.0 so that gulp-utils don't break for old setups.
+1 to this issue. node version - 0.12.0/npm - 2.5.1
I am working on the same issue with node 0.10 on an older project that we cannot update node at this point.
If anyone has suggestions on how to override the version that gulp-util uses, it would be helpful. We unfortunately cannot edit node_modules due to how scripts are written.
@rfischer20 for a time, you can fork gulp-utils and change version for your project.
Thanks @Myrkotyn - that did the trick.
In case anyone needs it, I had to fork gulp as well due to dependencies. Feel free to use the fork:
@rvagg Can you help us out here?
Try this: npm install -S readable-stream@2 through2@2
.
Because we're using "2 || 3"
in the dependencies this should pin you to readable-stream@2.
I'll have a bit more of a think about this but yeah, this might be reason to roll back and do a major bump.
Yeah, I think a rollback and major is necessary
OK, this is done now. 2.0.5 has a rollback(ish):
diff --git a/package.json b/package.json
index 123bc4a..15960b6 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,10 @@
{
"name": "through2",
- "version": "3.0.0",
- "description": "A tiny wrapper around Node.js streams.Transform (Streams2/3) to avoid explicit subclassing noise",
+ "version": "2.0.5",
+ "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
"main": "through2.js",
"scripts": {
- "test": "nyc node test/test.js | faucet && nyc report"
+ "test": "node test/test.js | faucet"
},
"repository": {
"type": "git",
@@ -19,13 +19,14 @@
"author": "Rod Vagg <r@va.gg> (https://github.com/rvagg)",
"license": "MIT",
"dependencies": {
- "readable-stream": "2 || 3",
+ "readable-stream": "~2.3.6",
"xtend": "~4.0.1"
},
"devDependencies": {
"bl": "~2.0.1",
"faucet": "0.0.1",
"nyc": "~13.1.0",
+ "safe-buffer": "~5.1.2",
"stream-spigot": "~3.0.6",
"tape": "~4.9.1"
}
diff --git a/test/test.js b/test/test.js
index 1e9573d..474f090 100644
--- a/test/test.js
+++ b/test/test.js
@@ -3,6 +3,7 @@ const test = require('tape')
, crypto = require('crypto')
, bl = require('bl')
, spigot = require('stream-spigot')
+ , Buffer = require('safe-buffer').Buffer
test('plain through', function (t) {
var th2 = through2(function (chunk, enc, callback) {
So 2.0.5 is pinned to readable-stream@2. I also have a v2.x
branch to maintain this as needed.
3.0.0 has the new stuff but still does 2||3
, so you could still do the pinning yourself as per my comment above.
thanks @rvagg!!
Cheers @rvagg
I'd love to interview anyone who's still using node 0.10. Mostly out of fascinated horror but also to learn more about what keeps projects using old versions.
@wmhilton we use it to build sass and run some dev tools, so we've never really had any need to.
@chris-green I still find that hard to believe! 😁 Node 0.10.x is more than 5 years old, and reached end-of-life more than 2 years ago. I'd think for security reasons alone it would make business sense to upgrade.
(I think part of it is the disconnect between using an ancient tool to download code released yesterday.)
@wmhilton "end of life" and "security reasons" don't mean anything when you are literally building things on your local machine. If something works, why spend time changing it?
@phated Ahhhh, that makes sense. Thanks!
The release of v2.0.4 contained a breaking change for Node v0.10 & npm v1.4.28 (please don't laugh)
This has caused gulp-utils to fail due to using
"through2": "^2.0.0"
where it pulls in v2.0.4, where v2.03 built correct.Gulp-utils installs fine, but then fails to run with the following error:
We're currently working on figuring out the exact cause of this issue.