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

pdfjs-dist expand exports, export pdfjs-dist from react-pdf #38117

Merged
merged 4 commits into from Sep 9, 2019

Conversation

nikuda
Copy link
Contributor

@nikuda nikuda commented Sep 4, 2019

Relates to wojtekmaj/react-pdf#417

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: https://github.com/mozilla/pdf.js/blob/master/src/pdf.js
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick performance metrics against master and your PR. This is still an experiment, so don’t panic if I say something crazy! I’m still learning how to interpret these metrics.

Let’s review the numbers, shall we?

pdfjs-dist/v2

Comparison details for pdfjs-dist/v2 📊
master #38117 diff
Batch compilation
Memory usage (MiB) 77.0 79.1 +2.7%
Type count 9002 9003 0.0%
Assignability cache size 32534 32534 0.0%
Subtype cache size 0 0
Identity cache size 3 3 0.0%
Language service
Samples taken 79 79 0.0%
Identifiers in tests 79 79 0.0%
getCompletionsAtPosition
    Mean duration (ms) 401.8 420.3 +4.6%
    Median duration (ms) 400.7 420.6 +5.0%
    Mean CV 14.7% 13.7% -6.8%
    Worst duration (ms) 477.8 501.2 +4.9%
    Worst identifier pageNum renderPage
getQuickInfoAtPosition
    Mean duration (ms) 374.2 391.8 +4.7%
    Median duration (ms) 370.6 387.9 +4.7%
    Mean CV 13.4% 12.1% -9.8%
    Worst duration (ms) 432.3 478.8 +10.8%
    Worst identifier pdf pageNum

It looks like nothing changed too much. I’m pretty lenient since I’m still an experiment, so take a look anyways and make sure nothing looks out of place.

react-pdf/v4

Comparison details for react-pdf/v4 📊
master #38117 diff
Batch compilation
Memory usage (MiB) 131.2 131.5 +0.2%
Type count 51989 51991 0.0%
Assignability cache size 52441 52441 0.0%
Subtype cache size 18 18 0.0%
Identity cache size 6 6 0.0%
Language service
Samples taken 39 45 +15.4%
Identifiers in tests 39 45 +15.4%
getCompletionsAtPosition
    Mean duration (ms) 713.6 712.3 -0.2%
    Median duration (ms) 709.5 706.7 -0.4%
    Mean CV 9.4% 8.0% -15.4%
    Worst duration (ms) 838.7 818.1 -2.4%
    Worst identifier Document setState
getQuickInfoAtPosition
    Mean duration (ms) 625.9 622.7 -0.5%
    Median duration (ms) 617.3 608.2 -1.5%
    Mean CV 10.6% 10.8% +1.9%
    Worst duration (ms) 754.9 749.8 -0.7%
    Worst identifier PDFDocumentProxy pageNumber

It looks like nothing changed too much. I’m pretty lenient since I’m still an experiment, so take a look anyways and make sure nothing looks out of place.


If you have any questions or comments about me, you can ping @andrewbranch. Have a nice day!

@typescript-bot typescript-bot added this to Waiting for Reviewers in Pull Request Status Board Sep 4, 2019
@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Awaiting reviewer feedback labels Sep 4, 2019
@typescript-bot
Copy link
Contributor

typescript-bot commented Sep 4, 2019

@nikuda Thank you for submitting this PR!

🔔 @jbaldwin @1999 @CodeDaraW @nhardy - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot typescript-bot moved this from Waiting for Reviewers to Check and Merge in Pull Request Status Board Sep 6, 2019
@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Merge:Express and removed Awaiting reviewer feedback labels Sep 6, 2019
@typescript-bot
Copy link
Contributor

A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped!

@minestarks minestarks merged commit 22bfbf1 into DefinitelyTyped:master Sep 9, 2019
Pull Request Status Board automation moved this from Check and Merge to Done Sep 9, 2019
pheromonez pushed a commit to class-clown/DefinitelyTyped that referenced this pull request Sep 17, 2019
…lyTyped#38117)

* pdfjs-dist module definition

* Declare pdfjs export in react-pdf

* Remove react-pdf/package.json, fix-up default export

* Add pdfjs test to react-pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Owner Approved A listed owner of this package signed off on the pull request. Popular package This PR affects a popular package (as counted by NPM download counts).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants