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

core: Don't use global buffer #1422

merged 12 commits into from Dec 21, 2021


Copy link

@jimmywarting jimmywarting commented Dec 19, 2021


Attempt to deal with one of xo's new lint rule that global Buffer shouldn't be used
and prevents us from merging the new breaking version


  • Some tests where changed to use TextEncoder instad of Buffer.from
  • A base64 test was replaced to use res.arrayBuffer() instead of the deprecated res.buffer()
  • Two test where we test that Buffer is allowed as a body was removed... A buffer is just a instances of a Uint8Array and should be covered by this
  • Other files that still use Buffer now imports it

Additional information

xo that fails:

  • I updated some unit test(s)

  • fix part of xo new breaking release

@jimmywarting jimmywarting changed the title Features/buffer core: Don't use global buffer Dec 19, 2021
@jimmywarting jimmywarting marked this pull request as draft Dec 19, 2021
@jimmywarting jimmywarting marked this pull request as ready for review Dec 19, 2021
@jimmywarting jimmywarting requested review from gr2m and LinusU Dec 19, 2021
gr2m approved these changes Dec 19, 2021
@jimmywarting jimmywarting merged commit 1493d04 into node-fetch:main Dec 21, 2021
9 checks passed
@jimmywarting jimmywarting deleted the features/buffer branch Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants