-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Convert to EcmaScript (ES6+) #859
Conversation
…ributed by pdfkit and pdfmake
…s a pdf with the difference if snapshot does not matches
… dependency on font classes
…ee and 24 other files
Awesome work! 👏 cc. @diegomura |
This is ready to go and to broader testing. To make easier testing, i uploaded to npm a build of this branch as Those that want to help can:
|
Users that are creating pdf with many png files can test the Its a try to fix a perf issue: #861 |
Hey @blikblum ! Awesome work. Would love to see this merged soon. Did you have any feedback about how this version is working? I'm going to try finding time to test it also. I find a bit confusing tests under the |
It should be working exactly as the last coffee version + the memory leak PR (the test snapshots were created with this coffee version). But only one user reported a testing (successfully) so far.
They come from the pdfmake examples. I instrumented pdfkit to record the calls and generated the tests
Agree. This is the way i found to have the broadest tests to avoid regression. Since there was no previous test at all this seems a reasonable compromise. As the time goes and more tests are added they can be removed. To achieve that a good rule is to only accept patches with tests |
@devongovett @blikblum is there a reason why this hasn't been merged already? One possibility would be to start developing pdfkit-es forward and leave pdfkit as is, projects could then adopt to that library when they are ready. The current state of affairs really hinders the development, so I think something needs to happen soon. Ps. I need PDF/A and would like to work on top of this so I could add tests etc. but am not sure if this will ever be merged given the time it has taken.. |
@blikblum really good ! but why do we need coffee-script in dependencies ? |
AFAIR docs still uses coffee to be generated, something that can be easily cleaned after the merge |
@devongovett @alafr Can you merge this PR and release new version? |
Hey @blikblum this is amazing, thanks so much for doing it! I’m sorry it has taken this look for me to look at it. Going to merge, but I saw a couple things that might be good to follow up on:
I’ve also added you as a maintainer of the repo. Thanks again for your contribution. 🙏 |
I'm aware of it but the PR was already too big. Will do the cleanup this weekend |
Converts code base to modern JavaScript. The build targets to node 6+
It builds on top of #806 to ensure the converted code acts the same as before
It also incorporates changes from #729
A few changes were also done:
Todo: