]>
zoso.dev Git - buffer.git/log
Feross Aboukhadijeh [Fri, 16 Feb 2018 07:35:03 +0000 (23:35 -0800)]
Pull in new test files from Node.js core that are passing!
Feross Aboukhadijeh [Fri, 16 Feb 2018 07:22:02 +0000 (23:22 -0800)]
add semi
Feross Aboukhadijeh [Fri, 16 Feb 2018 07:21:32 +0000 (23:21 -0800)]
download-node-tests: don't delete common.js
Feross Aboukhadijeh [Fri, 16 Feb 2018 07:16:28 +0000 (23:16 -0800)]
5.1.0
Feross Aboukhadijeh [Fri, 16 Feb 2018 07:10:21 +0000 (23:10 -0800)]
Drop Node 0.10 support
Fix https://github.com/feross/buffer/issues/184
Feross Aboukhadijeh [Fri, 16 Feb 2018 07:09:57 +0000 (23:09 -0800)]
Buffer.concat() accepts Uint8Array instances
Fix https://github.com/feross/buffer/issues/173
Feross Aboukhadijeh [Fri, 16 Feb 2018 06:53:13 +0000 (22:53 -0800)]
readme: update browser support list
Fixes: https://github.com/feross/buffer/issues/182
Feross Aboukhadijeh [Fri, 16 Feb 2018 06:49:34 +0000 (22:49 -0800)]
do not run ES6 tests on iOS 9.3, only run ES5 tests
Feross Aboukhadijeh [Fri, 16 Feb 2018 06:46:40 +0000 (22:46 -0800)]
Use TypedArrayView.copyWithin() when available
Fixes https://github.com/feross/buffer/issues/174
Feross Aboukhadijeh [Fri, 16 Feb 2018 06:45:55 +0000 (22:45 -0800)]
fix yml syntax for list, so iPhone tests run
Feross Aboukhadijeh [Fri, 16 Feb 2018 06:35:29 +0000 (22:35 -0800)]
only test major ios versions
Feross Aboukhadijeh [Fri, 16 Feb 2018 06:35:05 +0000 (22:35 -0800)]
skip ES6 tests in Safari 9, only run ES5 tests
The Node.js tests contain the const keyword, which doesn't work in Safari 9 in strict mode :(
Feross Aboukhadijeh [Fri, 16 Feb 2018 06:21:51 +0000 (22:21 -0800)]
Remove special-case copy() for len < 1000
For https://github.com/feross/buffer/issues/174
Feross Aboukhadijeh [Fri, 16 Feb 2018 06:16:55 +0000 (22:16 -0800)]
test ios 9.3+, safari 9+, last two Edge versions
Fixes https://github.com/feross/buffer/issues/182
Feross Aboukhadijeh [Fri, 16 Feb 2018 05:56:28 +0000 (21:56 -0800)]
more robust check for invalid arguments to copy()
Feross Aboukhadijeh [Fri, 16 Feb 2018 05:52:40 +0000 (21:52 -0800)]
Remove unneeded char from regex
We're already finding the first = and discarding it and everything that follows in the split() call a few lines below. There should be no = left in the string to remove.
Feross Aboukhadijeh [Fri, 16 Feb 2018 05:48:18 +0000 (21:48 -0800)]
Merge branch 'vmx-sync-tests-alloc'
Feross Aboukhadijeh [Fri, 16 Feb 2018 05:28:40 +0000 (21:28 -0800)]
disable flaky android test
Feross Aboukhadijeh [Fri, 16 Feb 2018 05:28:31 +0000 (21:28 -0800)]
make properties 'parent' and 'offset' non-enumerable
Feross Aboukhadijeh [Fri, 16 Feb 2018 05:28:09 +0000 (21:28 -0800)]
convert to ES5 for IE11 support
Feross Aboukhadijeh [Fri, 16 Feb 2018 05:27:49 +0000 (21:27 -0800)]
move common.js to node/ folder so it doesn't run in ES5 browsers
Feross Aboukhadijeh [Wed, 7 Feb 2018 19:55:33 +0000 (11:55 -0800)]
Merge pull request #181 from GeekStocks/master
fix typo
David Walton [Sat, 3 Feb 2018 06:49:26 +0000 (01:49 -0500)]
fix typo
Volker Mische [Sun, 21 Jan 2018 01:42:48 +0000 (02:42 +0100)]
Use automatically downloaded test-buffer-alloc
This commit uses the `test-buffer-alloc.js` from upstream Node.js
as of 2018-01-20.
This is part of #177.
Volker Mische [Sun, 21 Jan 2018 00:54:18 +0000 (01:54 +0100)]
Remove some post-processing from download script
Some post-processing of the downloaded tests is no longer needed.
Use `const` and `let` instead of `var` and also import a trimmed
down version of the `common` test helper.
Volker Mische [Sun, 21 Jan 2018 01:30:22 +0000 (02:30 +0100)]
Remove tests that were moved
Some tests from test-buffer.js were moved into test-buffer-alloc.js.
Remove those tests as they got updated (and fixed) in
test-buffer-alloc.js.
Volker Mische [Sun, 21 Jan 2018 01:17:42 +0000 (02:17 +0100)]
Fix outdated error message
Volker Mische [Sun, 21 Jan 2018 00:46:06 +0000 (01:46 +0100)]
Add .parent property
Volker Mische [Sun, 21 Jan 2018 00:37:01 +0000 (01:37 +0100)]
const is needed to fix some test
Volker Mische [Sun, 21 Jan 2018 00:34:50 +0000 (01:34 +0100)]
Add .offset property
Volker Mische [Sat, 20 Jan 2018 23:23:56 +0000 (00:23 +0100)]
Fix single character fast path
This fixed is based on Node.js' commit
d4f00fe1098b0d7b8444565e741d8b457fd9c091
https://github.com/nodejs/node/commit/
d4f00fe1098b0d7b8444565e741d8b457fd9c091
Volker Mische [Sat, 20 Jan 2018 23:01:16 +0000 (00:01 +0100)]
Throw error on alloc() if value can't be encoded
Volker Mische [Sat, 20 Jan 2018 22:18:19 +0000 (23:18 +0100)]
Custom implementation of toLocaleString()
Make `toLocaleString()` to point to the same implementation as `toString()`.
Volker Mische [Sat, 20 Jan 2018 22:11:51 +0000 (23:11 +0100)]
Error message for "size" parameter changed
Volker Mische [Fri, 19 Jan 2018 15:06:03 +0000 (16:06 +0100)]
Node.js also supports Buffer creation from {buffer: ArrayBuffer}
Volker Mische [Fri, 19 Jan 2018 14:49:22 +0000 (15:49 +0100)]
Out of bounds error message changed
Volker Mische [Fri, 19 Jan 2018 14:47:45 +0000 (15:47 +0100)]
Out of bounds error message changed
Volker Mische [Fri, 19 Jan 2018 14:45:22 +0000 (15:45 +0100)]
Error message on Buffer creation changed
Volker Mische [Fri, 19 Jan 2018 14:40:25 +0000 (15:40 +0100)]
Throw error when no buffer is given for `copy()`
Volker Mische [Fri, 19 Jan 2018 00:10:01 +0000 (01:10 +0100)]
Add `printSkipMessage()` stub
We don't want to print anything, hence `printSkipMessage()` is just
a no-op to make the tests without changes pass.
Volker Mische [Fri, 19 Jan 2018 00:01:12 +0000 (01:01 +0100)]
Change error message when unknown encoding is given
The error message changed from
"encoding" must be a valid string encoding
to
Unknown encoding: <the-given-encoding>
To make the test work, parts of Node.js's `common` module need to
be used. Add the parts that are needed with minor modifications (the
check for the return code were removed, as vanilla JS errors don't
have an error code, only Node.js errors have).
Volker Mische [Thu, 18 Jan 2018 23:44:15 +0000 (00:44 +0100)]
Hex strings no longer need have even number of digits
If a hex string has an odd number of bytes, the last byte is just
ignored in Node.js.
Volker Mische [Thu, 18 Jan 2018 23:39:03 +0000 (00:39 +0100)]
Treat `=` as end of Base64 encoded string
Node.js treats an equal sign as the end of a Base64 encoded string.
Hence `Buffer.from('=bad')` results in an empty string.
Volker Mische [Thu, 18 Jan 2018 21:55:35 +0000 (22:55 +0100)]
test-buffer-alloc updated from uptream
This commits updates the `test-buffer-alloc.js`. Tests currently
not passing are commented out and will be fixed in a subsequent
commit.
Feross Aboukhadijeh [Fri, 29 Sep 2017 23:48:32 +0000 (16:48 -0700)]
5.0.8
Feross Aboukhadijeh [Fri, 29 Sep 2017 23:11:28 +0000 (16:11 -0700)]
Remove my email from comment
Feross Aboukhadijeh [Sat, 5 Aug 2017 01:45:23 +0000 (18:45 -0700)]
5.0.7
Feross Aboukhadijeh [Sat, 5 Aug 2017 01:40:33 +0000 (18:40 -0700)]
authors
Feross Aboukhadijeh [Sat, 5 Aug 2017 01:37:18 +0000 (18:37 -0700)]
Merge pull request #170 from feross/arraybuffer-context
Treat ArrayBuffers from another context as valid
Feross Aboukhadijeh [Fri, 4 Aug 2017 22:27:08 +0000 (15:27 -0700)]
Treat ArrayBuffers from another context as valid
Fixes: https://github.com/feross/buffer/issues/166
ArrayBuffers from another context (i.e. an iframe) do not pass the
`instanceof` check but they should be treated as valid.
Feross Aboukhadijeh [Fri, 4 Aug 2017 22:12:17 +0000 (15:12 -0700)]
Merge pull request #165 from srsudar/arraybuffer-readme
Add slice for converting to ArrayBuffer
Sam Sudar [Sat, 1 Jul 2017 05:14:16 +0000 (22:14 -0700)]
Add slice for converting to ArrayBuffer
The .buffer property is an ArrayBuffer, but it is not necessarily the
same length as the original buffer. This adds further documentation to
the README to flesh out converting a Buffer to an ArrayBuffer.
Feross Aboukhadijeh [Wed, 5 Apr 2017 19:05:09 +0000 (12:05 -0700)]
5.0.6
Feross Aboukhadijeh [Wed, 5 Apr 2017 18:51:52 +0000 (11:51 -0700)]
add back Number.isNaN shim for IE
Feross Aboukhadijeh [Wed, 5 Apr 2017 18:37:06 +0000 (11:37 -0700)]
Merge pull request #159 from feross/improvements
support environments that lack ArrayBuffer.isView; remove old shims
Feross Aboukhadijeh [Wed, 5 Apr 2017 18:28:28 +0000 (11:28 -0700)]
remove string.trim() shim
Feross Aboukhadijeh [Wed, 5 Apr 2017 18:27:26 +0000 (11:27 -0700)]
use `Number.isNaN` consistently
Feross Aboukhadijeh [Wed, 5 Apr 2017 18:24:52 +0000 (11:24 -0700)]
support environments that lack ArrayBuffer.isView (Node 0.10)
This helps browserify tests to pass
Feross Aboukhadijeh [Tue, 21 Mar 2017 02:31:37 +0000 (19:31 -0700)]
standard
Feross Aboukhadijeh [Thu, 2 Mar 2017 08:13:05 +0000 (00:13 -0800)]
Merge pull request #158 from feross/readme
Add conversion instructions
Feross Aboukhadijeh [Tue, 21 Feb 2017 08:04:49 +0000 (00:04 -0800)]
Add conversion instructions
Fixes: https://github.com/feross/buffer/issues/157
Also, removed `buffer-equals` from recommended list, since node 0.12 is
no longer a supported version.
Feross Aboukhadijeh [Thu, 9 Feb 2017 22:11:27 +0000 (14:11 -0800)]
5.0.5
Feross Aboukhadijeh [Thu, 9 Feb 2017 22:06:18 +0000 (23:06 +0100)]
Merge pull request #155 from feross/instanceof
Undo `instanceof Buffer` changes
Feross Aboukhadijeh [Thu, 9 Feb 2017 22:01:59 +0000 (14:01 -0800)]
Undo `instanceof Buffer` changes
It turns out that it's not possible to use `instanceof Buffer` safely,
like I thought.
It's not possible to use `instanceof Buffer` reliably in a browserify
context because there could be multiple different copies of the
'buffer' package in use.
This previous method (checking `buf._isBuffer`) works even for Buffer
instances that were created from another copy of the `buffer` package.
NOTE: It's possible to have two different "instances" of the 'buffer'
package, even if the 'buffer' package appears only once in the bundled
code. This can happen if you require 'buffer' in different ways, for
example:
`require('buffer')` vs. `require('buffer/')` vs. using the implicit
`Buffer` global.
You can confirm this by browserifying this code:
```js
console.log(require('buffer').Buffer === require('buffer/').Buffer) //
will be false
```
So, for this reason, `instanceof` won't work.
Feross Aboukhadijeh [Thu, 9 Feb 2017 05:14:00 +0000 (21:14 -0800)]
5.0.4
Feross Aboukhadijeh [Thu, 9 Feb 2017 05:08:22 +0000 (06:08 +0100)]
Merge pull request #153 from feross/standard
Small fixes
Feross Aboukhadijeh [Thu, 9 Feb 2017 03:38:10 +0000 (19:38 -0800)]
Replace `Buffer.isBuffer` with `instanceof Buffer`
It's one less function call, and we don't need to avoid `instanceof
Buffer` anymore because our Buffer is proper subclass of Uint8Array
now, instead of just an Uint8Array with the methods added on as
properties.
Feross Aboukhadijeh [Thu, 9 Feb 2017 03:25:58 +0000 (19:25 -0800)]
remove 'typeof ArrayBuffer' checks
Since buffer v5 we don't support browsers that lack typed arrays
Feross Aboukhadijeh [Thu, 9 Feb 2017 03:25:29 +0000 (19:25 -0800)]
download: one less newline
Feross Aboukhadijeh [Thu, 9 Feb 2017 03:25:20 +0000 (19:25 -0800)]
fix bug caught by standard v9
Feross Aboukhadijeh [Thu, 9 Feb 2017 03:25:08 +0000 (19:25 -0800)]
remove unneeded property access
Feross Aboukhadijeh [Thu, 9 Feb 2017 01:02:06 +0000 (17:02 -0800)]
standard
Feross Aboukhadijeh [Thu, 9 Feb 2017 00:25:30 +0000 (16:25 -0800)]
standard
Feross Aboukhadijeh [Thu, 2 Feb 2017 20:05:33 +0000 (12:05 -0800)]
5.0.3
Feross Aboukhadijeh [Thu, 2 Feb 2017 20:00:48 +0000 (12:00 -0800)]
check for console.error before using it (for IE5-7)
Fixes: https://github.com/feross/buffer/issues/152
Feross Aboukhadijeh [Wed, 25 Jan 2017 04:58:29 +0000 (20:58 -0800)]
browserify@14
Feross Aboukhadijeh [Tue, 24 Jan 2017 23:40:47 +0000 (15:40 -0800)]
remove old comment
Feross Aboukhadijeh [Fri, 2 Dec 2016 23:09:56 +0000 (15:09 -0800)]
authors
Feross Aboukhadijeh [Fri, 2 Dec 2016 23:06:02 +0000 (15:06 -0800)]
5.0.2
Feross Aboukhadijeh [Fri, 2 Dec 2016 22:58:50 +0000 (14:58 -0800)]
fix comment
Feross Aboukhadijeh [Fri, 2 Dec 2016 22:57:38 +0000 (14:57 -0800)]
Merge pull request #148 from adventure-yunfei/master
adventure-yunfei fix: wrong overwritting of not writable Unit8Array.from
Feross Aboukhadijeh [Fri, 2 Dec 2016 22:51:33 +0000 (14:51 -0800)]
Merge pull request #150 from feross/feross/cleanup
Lots of little cleanup
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:50:24 +0000 (14:50 -0600)]
docs
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:48:17 +0000 (14:48 -0600)]
test: there is nothing after IE11
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:48:10 +0000 (14:48 -0600)]
test: ES6 tests on Safari and iPhone
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:47:54 +0000 (14:47 -0600)]
test: run ES6 tests on Edge
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:23:53 +0000 (14:23 -0600)]
test: remove poly fill for Array.forEach, Array.map, Array.isArray
We don’t support any browsers that don’t have these methods anymore
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:22:33 +0000 (14:22 -0600)]
test: remove checks for TYPED_ARRAY_SUPPORT
We only support browsers with typed arrays now, so this is a pointless
check.
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:22:03 +0000 (14:22 -0600)]
Add bin/ to .npmignore
Feross Aboukhadijeh [Fri, 2 Dec 2016 20:21:51 +0000 (14:21 -0600)]
remove useless file
Feross Aboukhadijeh [Tue, 22 Nov 2016 23:08:40 +0000 (20:08 -0300)]
standard fixes
Feross Aboukhadijeh [Mon, 7 Nov 2016 08:13:44 +0000 (00:13 -0800)]
authors
Feross Aboukhadijeh [Mon, 7 Nov 2016 08:04:00 +0000 (00:04 -0800)]
5.0.1
Feross Aboukhadijeh [Mon, 7 Nov 2016 07:56:13 +0000 (23:56 -0800)]
Merge pull request #149 from emilbayes/master
Fix bug with .fill bytes > 127 from other encoding
Emil Bay [Mon, 7 Nov 2016 07:45:38 +0000 (18:15 +1030)]
Update browser testing instructions
Emil Bay [Mon, 7 Nov 2016 07:42:27 +0000 (18:12 +1030)]
Fix Buffer => B, squash
Emil Bay [Mon, 7 Nov 2016 07:25:57 +0000 (17:55 +1030)]
Fix bug with .fill bytes > 127 from other encoding
adventure-yunfei [Thu, 3 Nov 2016 08:27:13 +0000 (16:27 +0800)]
adventure-yunfei fix: wrong overwritting of not writable Unit8Array.from
Feross Aboukhadijeh [Mon, 17 Oct 2016 11:41:01 +0000 (12:41 +0100)]
Merge pull request #146 from fanatid/create-buffer-style
change style of condition in createBuffer
Kirill Fomichev [Mon, 17 Oct 2016 09:45:45 +0000 (12:45 +0300)]
change style of condition in createBuffer