Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: wojtekmaj/react-pdf
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v7.3.3
Choose a base ref
...
head repository: wojtekmaj/react-pdf
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v7.4.0
Choose a head ref

Commits on Aug 1, 2023

  1. Copy the full SHA
    96439c2 View commit details
  2. Improve wording

    wojtekmaj committed Aug 1, 2023
    Copy the full SHA
    c29dba2 View commit details

Commits on Aug 2, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    459c15b View commit details

Commits on Aug 9, 2023

  1. Remove unnecessary TypeScript config

    strictNullChecks is already true if strict is true
    wojtekmaj committed Aug 9, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    6c035a4 View commit details

Commits on Aug 23, 2023

  1. Remove unused dependency

    wojtekmaj committed Aug 23, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d14e13f View commit details
  2. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    c431d25 View commit details

Commits on Aug 28, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    03c3498 View commit details
  2. Update Vitest config

    wojtekmaj committed Aug 28, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b37a267 View commit details

Commits on Aug 30, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    a5b5601 View commit details
  2. Bump @adobe/css-tools from 4.2.0 to 4.3.1 (#1599)

    Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.2.0 to 4.3.1.
    - [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
    - [Commits](https://github.com/adobe/css-tools/commits)
    
    ---
    updated-dependencies:
    - dependency-name: "@adobe/css-tools"
      dependency-type: indirect
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    dependabot[bot] authored Aug 30, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1909bea View commit details
  3. Add TypeScript typings

    wojtekmaj committed Aug 30, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    b5fe342 View commit details

Commits on Sep 8, 2023

  1. Implement monorepo

    wojtekmaj committed Sep 8, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    be18436 View commit details

Commits on Sep 20, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    1d37ef7 View commit details

Commits on Sep 22, 2023

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    80192f3 View commit details
  2. Copy the full SHA
    381c1b6 View commit details
  3. Copy the full SHA
    b760b0f View commit details
  4. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    486b2e5 View commit details
  5. Add Next.js samples

    wojtekmaj committed Sep 22, 2023
    Copy the full SHA
    850793c View commit details
  6. Copy the full SHA
    304893b View commit details
  7. Update Prettier to 3.0

    wojtekmaj committed Sep 22, 2023
    Copy the full SHA
    a24a85d View commit details

Commits on Sep 24, 2023

  1. Use Node 20 for CI

    wojtekmaj committed Sep 24, 2023
    Copy the full SHA
    395b61d View commit details
  2. Copy the full SHA
    19b1197 View commit details

Commits on Sep 25, 2023

  1. Fix watch command

    wojtekmaj committed Sep 25, 2023
    Copy the full SHA
    74b0a98 View commit details
  2. Update Babel to 7.23.0

    wojtekmaj committed Sep 25, 2023
    Copy the full SHA
    b338ca8 View commit details
  3. Copy the full SHA
    67e45c5 View commit details
  4. Copy the full SHA
    b544af3 View commit details
  5. v7.4.0

    wojtekmaj committed Sep 25, 2023
    Copy the full SHA
    6c391aa View commit details
Showing with 6,681 additions and 4,638 deletions.
  1. +0 −6 .eslintignore
  2. +0 −11 .eslintrc.json
  3. +17 −16 .github/workflows/ci.yml
  4. +1 −1 .github/workflows/close-stale-issues.yml
  5. +7 −4 .github/workflows/publish.yml
  6. +1 −1 .husky/pre-commit
  7. +3 −0 .lintstagedrc.json
  8. +1 −3 .prettierignore
  9. +1 −2 .prettierrc.json
  10. +28 −0 .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
  11. +0 −10 .yarn/plugins/plugin-remove-postinstall.cjs
  12. +2 −1 .yarnrc.yml
  13. +2 −616 README.md
  14. +3 −9 __mocks__/_silently_failing_pdf.ts
  15. +15 −103 package.json
  16. +2 −0 packages/react-pdf/.eslintignore
  17. +3 −0 packages/react-pdf/.eslintrc.json
  18. +1 −0 packages/react-pdf/.prettierignore
  19. +21 −0 packages/react-pdf/LICENSE
  20. +620 −0 packages/react-pdf/README.md
  21. +110 −0 packages/react-pdf/package.json
  22. +3 −3 { → packages/react-pdf}/src/Document.spec.tsx
  23. 0 { → packages/react-pdf}/src/Document.tsx
  24. 0 { → packages/react-pdf}/src/DocumentContext.tsx
  25. 0 { → packages/react-pdf}/src/LinkService.ts
  26. 0 { → packages/react-pdf}/src/Message.tsx
  27. +4 −4 { → packages/react-pdf}/src/Outline.spec.tsx
  28. 0 { → packages/react-pdf}/src/Outline.tsx
  29. 0 { → packages/react-pdf}/src/OutlineContext.tsx
  30. +2 −2 { → packages/react-pdf}/src/OutlineItem.spec.tsx
  31. 0 { → packages/react-pdf}/src/OutlineItem.tsx
  32. +169 −43 { → packages/react-pdf}/src/Page.spec.tsx
  33. 0 { → packages/react-pdf}/src/Page.tsx
  34. 0 { → packages/react-pdf}/src/Page/AnnotationLayer.css
  35. +4 −4 { → packages/react-pdf}/src/Page/AnnotationLayer.spec.tsx
  36. +14 −3 { → packages/react-pdf}/src/Page/AnnotationLayer.tsx
  37. +3 −3 { → packages/react-pdf}/src/Page/PageCanvas.spec.tsx
  38. 0 { → packages/react-pdf}/src/Page/PageCanvas.tsx
  39. +9 −3 { → packages/react-pdf}/src/Page/PageSVG.spec.tsx
  40. +7 −9 { → packages/react-pdf}/src/Page/PageSVG.tsx
  41. 0 { → packages/react-pdf}/src/Page/TextLayer.css
  42. +4 −4 { → packages/react-pdf}/src/Page/TextLayer.spec.tsx
  43. 0 { → packages/react-pdf}/src/Page/TextLayer.tsx
  44. 0 { → packages/react-pdf}/src/PageContext.tsx
  45. 0 { → packages/react-pdf}/src/PasswordResponses.ts
  46. 0 { → packages/react-pdf}/src/Ref.spec.ts
  47. 0 { → packages/react-pdf}/src/Ref.ts
  48. +4 −4 { → packages/react-pdf}/src/StructTree.spec.tsx
  49. 0 { → packages/react-pdf}/src/StructTree.tsx
  50. 0 { → packages/react-pdf}/src/StructTreeItem.tsx
  51. +16 −5 { → packages/react-pdf}/src/Thumbnail.spec.tsx
  52. 0 { → packages/react-pdf}/src/Thumbnail.tsx
  53. 0 { → packages/react-pdf}/src/index.spec.ts
  54. +1 −1 { → packages/react-pdf}/src/index.test.ts
  55. 0 { → packages/react-pdf}/src/index.ts
  56. 0 { → packages/react-pdf}/src/pdf.worker.entry.ts
  57. 0 { → packages/react-pdf}/src/pdfjs.ts
  58. 0 { → packages/react-pdf}/src/shared/constants.ts
  59. 0 { → packages/react-pdf}/src/shared/hooks/useCachedValue.ts
  60. 0 { → packages/react-pdf}/src/shared/hooks/useDocumentContext.ts
  61. 0 { → packages/react-pdf}/src/shared/hooks/useOutlineContext.ts
  62. 0 { → packages/react-pdf}/src/shared/hooks/usePageContext.ts
  63. 0 { → packages/react-pdf}/src/shared/hooks/useResolver.ts
  64. 0 { → packages/react-pdf}/src/shared/propTypes.ts
  65. 0 { → packages/react-pdf}/src/shared/structTreeUtils.ts
  66. +1 −6 { → packages/react-pdf}/src/shared/types.ts
  67. 0 { → packages/react-pdf}/src/shared/utils.spec.ts
  68. 0 { → packages/react-pdf}/src/shared/utils.ts
  69. 0 { → packages/react-pdf}/tsconfig.build.json
  70. +0 −1 { → packages/react-pdf}/tsconfig.json
  71. +5 −3 { → packages/react-pdf}/vitest.config.ts
  72. 0 { → packages/react-pdf}/vitest.setup.ts
  73. +1 −1 sample/create-react-app-5/src/Sample.tsx
  74. +2 −3 sample/create-react-app-5/src/index.tsx
  75. +1 −2 sample/create-react-app-5/tsconfig.json
  76. +902 −792 sample/create-react-app-5/yarn.lock
  77. +3 −0 sample/next-app/.gitignore
  78. +61 −0 sample/next-app/app/Sample.css
  79. +60 −0 sample/next-app/app/Sample.tsx
  80. +11 −0 sample/next-app/app/layout.tsx
  81. +5 −0 sample/next-app/app/page.tsx
  82. +5 −0 sample/next-app/next-env.d.ts
  83. +21 −0 sample/next-app/next.config.js
  84. +26 −0 sample/next-app/package.json
  85. BIN sample/next-app/public/sample.pdf
  86. +23 −0 sample/next-app/tsconfig.json
  87. +287 −1,260 {test → sample/next-app}/yarn.lock
  88. +3 −0 sample/next-pages/.gitignore
  89. +5 −0 sample/next-pages/next-env.d.ts
  90. +12 −0 sample/next-pages/next.config.js
  91. +26 −0 sample/next-pages/package.json
  92. +61 −0 sample/next-pages/pages/Sample.css
  93. +56 −0 sample/next-pages/pages/Sample.tsx
  94. +7 −0 sample/next-pages/pages/_app.tsx
  95. +12 −0 sample/next-pages/pages/index.tsx
  96. BIN sample/next-pages/public/sample.pdf
  97. +23 −0 sample/next-pages/tsconfig.json
  98. +1,651 −0 sample/next-pages/yarn.lock
  99. +1 −1 sample/parcel2/Sample.tsx
  100. +1 −2 sample/parcel2/index.tsx
  101. +1 −2 sample/parcel2/tsconfig.json
  102. +16 −15 sample/parcel2/yarn.lock
  103. +1 −1 sample/vite3/Sample.tsx
  104. +1 −2 sample/vite3/index.tsx
  105. +1 −0 sample/vite3/package.json
  106. +1 −2 sample/vite3/tsconfig.json
  107. +242 −202 sample/vite3/yarn.lock
  108. +1 −1 sample/vite4/Sample.tsx
  109. +1 −2 sample/vite4/index.tsx
  110. +1 −1 sample/vite4/package.json
  111. +1 −2 sample/vite4/tsconfig.json
  112. +232 −202 sample/vite4/yarn.lock
  113. +1 −1 sample/webpack5/Sample.tsx
  114. +1 −2 sample/webpack5/index.tsx
  115. +4 −4 sample/webpack5/package.json
  116. +1 −2 sample/webpack5/tsconfig.json
  117. +848 −816 sample/webpack5/yarn.lock
  118. +2 −0 test/.eslintignore
  119. +3 −0 test/.eslintrc.json
  120. +1 −0 test/.prettierignore
  121. +0 −2 test/AnnotationOptions.tsx
  122. +0 −2 test/LayerOptions.tsx
  123. +0 −2 test/PassingOptions.tsx
  124. +4 −1 test/Test.css
  125. +1 −1 test/index.html
  126. +1 −1 test/index.tsx
  127. +13 −7 test/package.json
  128. +1 −2 test/tsconfig.json
  129. +951 −421 yarn.lock
6 changes: 0 additions & 6 deletions .eslintignore

This file was deleted.

11 changes: 0 additions & 11 deletions .eslintrc.json

This file was deleted.

33 changes: 17 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -6,14 +6,17 @@ on:
pull_request:
branches: [main]

env:
HUSKY: 0

jobs:
lint:
name: Static code analysis
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache .yarn/cache
uses: actions/cache@v3
@@ -28,15 +31,16 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn --immutable
env:
HUSKY: 0

- name: Build package
run: yarn build

- name: Run tests
run: yarn lint
@@ -47,7 +51,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache .yarn/cache
uses: actions/cache@v3
@@ -62,15 +66,16 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn --immutable
env:
HUSKY: 0

- name: Build package
run: yarn build

- name: Run type checking
run: yarn tsc
@@ -81,7 +86,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache .yarn/cache
uses: actions/cache@v3
@@ -96,15 +101,13 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn --immutable
env:
HUSKY: 0

- name: Prettier
run: yarn prettier
@@ -115,7 +118,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache .yarn/cache
uses: actions/cache@v3
@@ -130,15 +133,13 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn --immutable
env:
HUSKY: 0

- name: Run tests
run: yarn unit
2 changes: 1 addition & 1 deletion .github/workflows/close-stale-issues.yml
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@ jobs:

steps:
- name: Close stale issues
uses: actions/stale@v6
uses: actions/stale@v8
with:
days-before-issue-stale: 90
days-before-issue-close: 14
11 changes: 7 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,9 @@ on:
release:
types: [published]

env:
HUSKY: 0

permissions:
id-token: write

@@ -14,7 +17,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache .yarn/cache
uses: actions/cache@v3
@@ -29,24 +32,24 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
node-version: '20'

- name: Enable Corepack
run: corepack enable

- name: Install dependencies
run: yarn --immutable
env:
HUSKY: 0

- name: Publish with latest tag
if: github.event.release.prelease == false
run: yarn npm publish --tag latest
working-directory: packages/react-pdf
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish with next tag
if: github.event.release.prelease == true
run: yarn npm publish --tag next
working-directory: packages/react-pdf
env:
YARN_NPM_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn pretty-quick --staged
yarn lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{css,html,js,json,jsx,md,ts,tsx,yml}": "prettier --write"
}
4 changes: 1 addition & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
.cache
.yarn
coverage
dist
*.yml
yarnrc.yml
3 changes: 1 addition & 2 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"printWidth": 100,
"singleQuote": true,
"trailingComma": "all"
"singleQuote": true
}
Loading