Skip to content
This repository has been archived by the owner on Apr 22, 2021. It is now read-only.

replaced all new Buffer(...) by Buffer.alloc(...) and Buffer.from(...) #6

Merged
merged 1 commit into from
Mar 29, 2021

Conversation

Reg011
Copy link

@Reg011 Reg011 commented May 14, 2019

Replaced Node depreciations since Node v10

@diegomura
Copy link
Collaborator

Looks good! I'm not familiarized with this Buffer api. Did you check that everything runs well?

@Reg011
Copy link
Author

Reg011 commented May 14, 2019

You can read about it like I did here: https://nodejs.org/api/buffer.html. It's simple really, we just have to replace new Buffer with the right stuff (Buffer.from or Buffer.alloc). However I'm not exactly familiar with either fontkit, pdfkit and png-js. Is there a test-suite setup I could run like jest or anything else ?

@Reg011
Copy link
Author

Reg011 commented May 14, 2019

Buffer.alloc when a number is passed, Buffer.from for everything else (string, array, buffer or object).

@Reg011
Copy link
Author

Reg011 commented May 21, 2019

@diegomura I'm afraid that since you've added some Linux exclusive dependencies in your npm. I cannot either npm install or mocha the project since I'm on Windows. You will have to test this pull request on your own to ensure that it's working correctly. Same for those two other pull requests:

@mrlubos
Copy link

mrlubos commented Feb 16, 2020

Hi @Reg011 @diegomura, any updates on this pull request? Thanks!

@Sickora-Kate-PFG
Copy link

Any update as to when this might be merged? Running into this when calling renderToStream.

@mrlubos
Copy link

mrlubos commented Mar 23, 2021

@Sickora-Kate-PFG Seems this fork is dead, the original repository is more active. Although this particular fix hasn't been merged there either...

@diegomura
Copy link
Collaborator

Just catching up sorry. This seems good to me!

@diegomura diegomura merged commit 83b34fe into react-pdf:master Mar 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants