Skip to content
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

doc: Document buffer.indexOf changes in v4.2.0 #3373

Closed
wants to merge 1 commit into from

Conversation

skomski
Copy link
Contributor

@skomski skomski commented Oct 14, 2015

No description provided.

@silverwind silverwind added the doc Issues and PRs related to the documentations. label Oct 14, 2015
@mscdex mscdex added the buffer Issues and PRs related to the buffer subsystem. label Oct 14, 2015
@@ -34,6 +34,7 @@ The first Node.js LTS release! See https://github.com/nodejs/LTS/ for details of
- Added new `-c` (or `--check`) command line argument for checking script syntax without executing the code (Dave Eddy) [#2411](https://github.com/nodejs/node/pull/2411)
- Added `process.versions.icu` to hold the current ICU library version (Evan Lucas) [#3102](https://github.com/nodejs/node/pull/3102)
- Added `process.release.lts` to hold the current LTS codename when the binary is from an active LTS release line (Rod Vagg) [#3212](https://github.com/nodejs/node/pull/3212)
- Added new optional parameter `encoding` to `Buffer.indexOf`. Changed search algorithm from naive to naive + Boyer-Moore-Horspool. (Karl Skomski) [#2539](https://github.com/nodejs/node/pull/2539)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we fine with retroactively changing the changelog like this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not really sure it matters either way.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No one's going to read that anyways, that's for sure. I'm feeling adding to the changelog after the release isn't quite right. Let's remove it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intention from #3258 (comment) but I still need to do a PR for new.nodejs.org

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. Still, I think the changelog train has left here.

To avoid such issues in the future: How about we add a relnotes label so people can tag changes that they feel worthy of being mentioned in a release? cc: @nodejs/release.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on the relnotes label. I'm -1 on making this particular change tho.

@jasnell
Copy link
Member

jasnell commented Oct 21, 2015

Given the -1's on merging this, I'm inclined to close. Can open if someone feels it's necessary.

@jasnell jasnell closed this Oct 21, 2015
@Fishrock123
Copy link
Contributor

@jasnell those were only for the changelog bit. The doc part is important. Reopening.

@Fishrock123 Fishrock123 reopened this Oct 21, 2015
@jasnell
Copy link
Member

jasnell commented Oct 21, 2015

Ah, right, completely forgot that the PR had the doc changes. @skomski if you can update the PR to just include the doc change that would be helpful

@@ -393,18 +393,31 @@ byte from the original Buffer.
// !bc


### buf.indexOf(value[, byteOffset])
### buf.indexOf(value[, byteOffset, encoding])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be buf.indexOf(value[, byteOffset[, encoding]]). If not then the implementation is wrong.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, since typeof byteOffset === 'number' and typeof encoding === 'string' the arguments should actually be indexOf(value[, byteOffset][, encoding]). Sorry about that.

@jasnell
Copy link
Member

jasnell commented Nov 5, 2015

@skomski ... ping... did you see the comments from @trevnorris ?

@Fishrock123
Copy link
Contributor

Ping @skomski

@jasnell jasnell added the stalled Issues and PRs that are stalled. label Dec 14, 2015
@skomski skomski force-pushed the add-doc-buffer-indexof branch 2 times, most recently from acc4698 to 8d142b1 Compare January 21, 2016 16:57
@skomski
Copy link
Contributor Author

skomski commented Jan 21, 2016

Updated.

@trevnorris
Copy link
Contributor

Thanks. I'll land this after #4803. I incorrectly believed that byteOffset was completely optional. That PR is a fix.

Strings are by default interpreted as UTF8.
Buffers will use the entire Buffer (to compare a partial
Buffer use [`Buffer#slice()`][]).
Numbers can range from 0 to 255.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this amount of linebreaks really necessary?

trevnorris pushed a commit that referenced this pull request Jan 22, 2016
@trevnorris
Copy link
Contributor

Landed with whitespace changes, and made example match existing pattern, in 2bcea02. Thanks much!

@trevnorris trevnorris closed this Jan 22, 2016
rvagg pushed a commit that referenced this pull request Jan 25, 2016
@MylesBorins
Copy link
Contributor

@trevnorris this is not landing cleanly into the lts branch. We will likely need to see the changes from #4370 ported over before this can land.

MylesBorins pushed a commit that referenced this pull request Feb 22, 2016
MylesBorins pushed a commit that referenced this pull request Feb 22, 2016
MylesBorins pushed a commit that referenced this pull request Mar 2, 2016
scovetta pushed a commit to scovetta/node that referenced this pull request Apr 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
buffer Issues and PRs related to the buffer subsystem. doc Issues and PRs related to the documentations. stalled Issues and PRs that are stalled.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants