diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a986966019a42..c87cae75f5819d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,9 @@ release. -6.8.1
+6.9.1
+6.9.0
+6.8.1
6.8.0
6.7.0
6.6.0
diff --git a/doc/changelogs/CHANGELOG_V6.md b/doc/changelogs/CHANGELOG_V6.md index c3f8c5043c9253..86b484d743ec22 100644 --- a/doc/changelogs/CHANGELOG_V6.md +++ b/doc/changelogs/CHANGELOG_V6.md @@ -7,9 +7,10 @@ -6.9.0
+6.9.1
+6.9.0
6.8.1
6.8.0
6.7.0
@@ -39,7 +40,23 @@ [Node.js Long Term Support Plan](https://github.com/nodejs/LTS) and will be supported actively until April 2018 and maintained until April 2019. - + +## 2016-10-19, Version 6.9.1 'Boron' (LTS), @thealphanerd + +### Notable changes + +* **streams**: Fix a regression introduced in v6.8.0 in readable stream that caused unpipe to remove the wrong stream (Anna Henningsen) + +### Commits + +* [[`2c3bbb576c`](https://github.com/nodejs/node/commit/2c3bbb576c)] - **doc**: fix changelog index for v6.9.0 (Rod Vagg) [#9168](https://github.com/nodejs/node/pull/9168) +* [[`f4b766f5b7`](https://github.com/nodejs/node/commit/f4b766f5b7)] - **streams**: fix regression in `unpipe()` (Anna Henningsen) [#9171](https://github.com/nodejs/node/pull/9171) +* [[`6072326009`](https://github.com/nodejs/node/commit/6072326009)] - **test**: add regression test for `unpipe()` (Niels Nielsen) [#9171](https://github.com/nodejs/node/pull/9171) +* [[`9f248a4d83`](https://github.com/nodejs/node/commit/9f248a4d83)] - **tools**: check tag is on github before release (Rod Vagg) [#9142](https://github.com/nodejs/node/pull/9142) +* [[`c74d3a700a`](https://github.com/nodejs/node/commit/c74d3a700a)] - **tools**: make detached SHASUM .sig file for releases (Rod Vagg) [#9071](https://github.com/nodejs/node/pull/9071) +* [[`955bbf876f`](https://github.com/nodejs/node/commit/955bbf876f)] - **tools**: explicitly set digest algo for SHASUM to 256 (Rod Vagg) [#9071](https://github.com/nodejs/node/pull/9071) + + ## 2016-10-18, Version 6.9.0 'Boron' (LTS), @rvagg This release marks the transition of Node.js v6 into Long Term Support (LTS) with the codename 'Boron'. The v6 release line now moves in to "Active LTS" and will remain so until April 2018. After that time it will move in to "Maintenance" until end of life in April 2019. diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js index 35b360b88b90f2..94c4164a10ec8d 100644 --- a/lib/_stream_readable.js +++ b/lib/_stream_readable.js @@ -671,7 +671,7 @@ Readable.prototype.unpipe = function(dest) { if (index === -1) return this; - state.pipes.splice(i, 1); + state.pipes.splice(index, 1); state.pipesCount -= 1; if (state.pipesCount === 1) state.pipes = state.pipes[0]; diff --git a/src/node_version.h b/src/node_version.h index f6f40d2a14d065..58a066534018a1 100644 --- a/src/node_version.h +++ b/src/node_version.h @@ -8,7 +8,7 @@ #define NODE_VERSION_IS_LTS 1 #define NODE_VERSION_LTS_CODENAME "Boron" -#define NODE_VERSION_IS_RELEASE 0 +#define NODE_VERSION_IS_RELEASE 1 #ifndef NODE_STRINGIFY #define NODE_STRINGIFY(n) NODE_STRINGIFY_HELPER(n) diff --git a/test/parallel/test-stream-pipe-unpipe-streams.js b/test/parallel/test-stream-pipe-unpipe-streams.js new file mode 100644 index 00000000000000..c51c100d0f6802 --- /dev/null +++ b/test/parallel/test-stream-pipe-unpipe-streams.js @@ -0,0 +1,30 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +const { Readable, Writable } = require('stream'); + +const source = Readable({read: () => {}}); +const dest1 = Writable({write: () => {}}); +const dest2 = Writable({write: () => {}}); + +source.pipe(dest1); +source.pipe(dest2); + +dest1.on('unpipe', common.mustCall(() => {})); +dest2.on('unpipe', common.mustCall(() => {})); + +assert.strictEqual(source._readableState.pipes[0], dest1); +assert.strictEqual(source._readableState.pipes[1], dest2); +assert.strictEqual(source._readableState.pipes.length, 2); + +// Should be able to unpipe them in the reverse order that they were piped. + +source.unpipe(dest2); + +assert.strictEqual(source._readableState.pipes, dest1); +assert.notStrictEqual(source._readableState.pipes, dest2); + +source.unpipe(dest1); + +assert.strictEqual(source._readableState.pipes, null); diff --git a/tools/release.sh b/tools/release.sh index 3f6754275a9636..23b05b4fe8e1ef 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -78,6 +78,14 @@ function sign { if [ "${gpgtagkey}" != "${gpgkey}" ]; then echo "GPG key for \"${version}\" tag is not yours, cannot sign" + exit 1 + fi + + ghtaggedversion=$(curl -sL https://raw.githubusercontent.com/nodejs/node/${version}/src/node_version.h \ + | awk '/define NODE_(MAJOR|MINOR|PATCH)_VERSION/{ v = v "." $3 } END{ v = "v" substr(v, 2); print v }') + if [ "${version}" != "${ghtaggedversion}" ]; then + echo "Could not find tagged version on github.com/nodejs/node, did you push your tag?" + exit 1 fi shapath=$(ssh ${webuser}@${webhost} $signcmd nodejs $version) @@ -97,7 +105,8 @@ function sign { scp ${webuser}@${webhost}:${shapath} ${tmpdir}/${shafile} - gpg --default-key $gpgkey --clearsign ${tmpdir}/${shafile} + gpg --default-key $gpgkey --clearsign --digest-algo SHA256 ${tmpdir}/${shafile} + gpg --default-key $gpgkey --detach-sign --digest-algo SHA256 ${tmpdir}/${shafile} echo "Wrote to ${tmpdir}/" @@ -117,7 +126,7 @@ function sign { fi if [ "X${yorn}" == "Xy" ]; then - scp ${tmpdir}/${shafile} ${tmpdir}/${shafile}.asc ${webuser}@${webhost}:${shadir}/ + scp ${tmpdir}/${shafile} ${tmpdir}/${shafile}.asc ${tmpdir}/${shafile}.sig ${webuser}@${webhost}:${shadir}/ break fi done