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

Node.js version support policy #2

Open
dougwilson opened this issue Apr 14, 2018 · 4 comments
Open

Node.js version support policy #2

dougwilson opened this issue Apr 14, 2018 · 4 comments

Comments

@dougwilson
Copy link

Hi @ChALkeR . I'm looking to move some modules to use this module for the whole Buffer thing and was curious on your Node.js version support policy. I looked around but didn't see anything (including looking for engines.node in the package.json). I do see the .travis.yml though has down to 0.8.

Just has a couple questions:

  1. Does this mean the minimum supported Node.js version for this module in 0.8?
  2. If that does change in the future, would you consider that a major version bump of this module or no?

Thanks for all your hard work @ChALkeR

@ChALkeR
Copy link
Owner

ChALkeR commented Apr 16, 2018

@dougwilson Hi!

Yes, the minimum supported version is 0.8.6 (just because versions lower don't have pre-build binaries for testing on Travis).

Yes, if that changes, that will be a semver-major bump, of course.

That said, the supported API differs between versions — this library (like safe-buffer), does not try to polyfill .fill() API. E.g. Node.js 0.10.x and below does not support filling with multibyte strings and uses just the first character, so Buffer.alloc(10, 'ab') will work differently on Node.js 0.10.x. That is also true for safe-buffer.

I will add a table of what API is supported since which Node.js version, perhaps.
I might also add polyfill code to fix some of those inconsistencies (e.g. the multi-byte string one), but I don't think that all of those need fixing.

As an alternative, buffer-alloc and buffer-from modules do a somewhat better job at polyfilling, but also have some drawbacks.

@dougwilson
Copy link
Author

Thanks for the information, @ChALkeR !

@ChALkeR
Copy link
Owner

ChALkeR commented Apr 19, 2018

I would prefer to keep this open until a table with supported arguments per Node.js version is done.

@ChALkeR ChALkeR reopened this Apr 19, 2018
@RA80533
Copy link

RA80533 commented Jun 10, 2021

Out of complete curiosity, is the minimum version kept to acknowledge historical versions or is there a chance that someone out there is still on such an old version and is using this package?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants