tojocky / node-printer

Native node.js printer
1.51k stars 436 forks source link

Support Node up to 14 and Electron up to 9 #295

Closed thiagoelg closed 3 years ago

thiagoelg commented 4 years ago

Hi, It's been some time since I made theses change in my fork, but never got the time to open a PR in here and document it.

These changes make the module compile for NodeJs 14 and Electron 9.

Also, I've changed Travis and AppVeyor integrations, so that they can publish pre-made builds as a release (users can then download these builds when adding this module to their packages, instead of compiling it). You can check an example release here: https://github.com/thiagoelg/node-printer/releases/tag/v0.5.3

Beware that these changes make both Travis and AppVeyor create a Tag + Release for each commit on the master branch, so the package.json version must be adjusted before merging PRs.

To fully make them work you'll need to create a prebuild upload token (so Travis and AppVeyor can upload the pre-made builds to the release). To see how you can do that check this: https://github.com/prebuild/prebuild#create-github-token

Travis allow you to store private Environment Variables, so that's where you'll add the prebuild token (probably here https://travis-ci.org/github/tojocky/node-printer/settings)

AppVeyor on the other hand is a bit weird, you'll have to take the token generated from GitHub and encrypt it here (https://ci.appveyor.com/tools/encrypt) before adding it to line 23 of the appveyor.yml file.

Let me know if you'd like any changes to this PR or any help configuring the CIs.

jyooi commented 3 years ago

hey @thiagoelg are you still in active development to let the node-printer working on node14 and electron > 9 ? I wonder will you try to make it work on latest electron 11 ?

conquera99 commented 3 years ago

hi @thiagoelg @tojocky

is this pr still on process? or will it merged soon?

thank you