Skip to content

Bump jspdf and jspdf-autotable #4190

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

Merged
merged 1 commit into from
Mar 31, 2025

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 18, 2025

Bumps jspdf and jspdf-autotable. These dependencies needed to be updated together.
Updates jspdf from 2.5.1 to 3.0.1

Release notes

Sourced from jspdf's releases.

v3.0.1

This release fixes two security vulnerabilities:

  • Upgrade optional dependency canvg to 3.0.11
  • Fix a ReDoS vulnerability in the addImage method and the methods html and addSvgAsImage, which depend on addImage

v3.0.0

This major release officially drops support for Internet Explorer and fixes a security vulnerability in the html function by updating the optional dependency dompurify to v3.2.4. There are no other breaking changes.

New Contributors

Full Changelog: parallax/jsPDF@v2.5.2...v3.0.0

v2.5.2

This release upgrades the Dompurify dependency to 2.5.4 with fixes a vulnerability with high severity: GHSA-mmhx-hmjr-r674.

It also upgrades fflate, core-js, and @​babel/runtime to more recent versions.

What's Changed

Commits
  • 57cbe94 3.0.1
  • 7cf6ddf fix: upgrade @​babel/runtime from 7.26.0 to 7.26.7 (#3832)
  • b167c43 improve performance of data url parsing in addimage (#3843)
  • c4b7421 don't use saucelabs in CI to be able to correctly run CI for PRs
  • 6136d4b Upgrade canvg from 3.0.6 to 3.0.11 (#3836)
  • d0c605f 3.0.0
  • 7aa332e fix(sec): remove MSIE support to allow upgrading to vuln-free dompurify v3 ...
  • e2c1818 Bump rollup from 2.21.0 to 2.79.2 (#3826)
  • 5aad456 fix: upgrade @​babel/runtime from 7.25.6 to 7.26.0 (#3822)
  • 637b5d3 Upgrade dompurify to 2.5.6 to 2.5.8 (#3812)
  • Additional commits viewable in compare view

Updates jspdf-autotable from 3.8.2 to 5.0.2

Release notes

Sourced from jspdf-autotable's releases.

v5.0

Summary of changes in 5.0.0-5.0.2

  • Breaking: The plugin is no longer auto applied to jsPDF in none browser environments (see more below)
  • The esm build file is now chosen automatically based on your packages environment (no need to use the jspdf-autotable/es path anymore)
  • HookData is now exported simonbengtsson/jsPDF-AutoTable#1075

Plugin no longer applied automatically

In this release the plugin is no longer auto applied to jsPDF in none browser environments. This is a breaking change for users that for example uses this plugin in node js and call autoTable method on the jsPDF doc instance (doc.autoTable({...}).

It is now recommended to import the autoTable method and pass it the jsPDF doc instance.

import { jsPDF } from 'jspdf'
import { autoTable } from 'jspdf-autotable'
const doc = new jsPDF()
autoTable(doc, { ... })

If you want to keep calling the plugin method on the jsPDF doc instance you can also apply the plugin to it yourself using applyPlugin:

import { jsPDF } from 'jspdf'
import { applyPlugin } from 'jspdf-autotable'
// This is now required in non browser environments to use the old
// way of calling autoTable on the jspdf doc instance.
applyPlugin(jsPDF)
const doc = new jsPDF()
doc.autoTable({ ... })

v4.0.0

Mostly minor changes but bumping major version due to old deprecation removals and upgrade to jsPDF 3.0 (that removes support for internet explorer).

  • Jspdf 3.0 (removes support for internet explorer)
  • You can now import autoTable with a named import import { autoTable } from ‘jspdf-autotable’) . The previously exported autoTable type is now exported as autoTableInstanceType instead.
  • Removed long time deprecations
    • Removed support for all old options and styles that was soft removed and deprecated in v3.0
    • Removed old ways to get information of the last autoTable drawn: doc.previousAutoTable , doc.autoTable.previous and doc.autoTableEndPosY. Now you should use doc.lastAutoTable.
    • Removed Table#pageCount field. You should now use Table#pageNumber.
    • Removed old column/body way of calling autoTable doc.autoTable(columns, body, options). You should now use autoTable(doc, options) or doc.autoTable(options).
    • Removed doc.autoTableAddPageContent. You should now use jsPDF.autoTableSetDefaults({didDrawPage: () => {}})
    • Removed doc.autoTableAddPage(). You should now use doc.addPage().

v3.8.4

What's Changed

New Contributors

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    You can disable automated security fix PRs for this repo from the Security Alerts page.

@dependabot dependabot bot added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels Mar 18, 2025
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/multi-740000f706 branch from c4c45ca to 1b0f147 Compare March 28, 2025 17:25
@objecttothis
Copy link
Member

@dependabot rebase

@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/multi-740000f706 branch from 1b0f147 to 3478439 Compare March 31, 2025 07:38
@objecttothis
Copy link
Member

@dependabot rebase

Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 31, 2025

Looks like this PR has been edited by someone other than Dependabot. That means Dependabot can't rebase it - sorry!

If you're happy for Dependabot to recreate it from scratch, overwriting any edits, you can request @dependabot recreate.

@objecttothis
Copy link
Member

@dependabot recreate

Bumps [jspdf](https://github.com/MrRio/jsPDF) and [jspdf-autotable](https://github.com/simonbengtsson/jsPDF-AutoTable). These dependencies needed to be updated together.

Updates `jspdf` from 2.5.1 to 3.0.1
- [Release notes](https://github.com/MrRio/jsPDF/releases)
- [Changelog](https://github.com/parallax/jsPDF/blob/master/RELEASE.md)
- [Commits](parallax/jsPDF@v2.5.1...v3.0.1)

Updates `jspdf-autotable` from 3.8.2 to 5.0.2
- [Release notes](https://github.com/simonbengtsson/jsPDF-AutoTable/releases)
- [Commits](simonbengtsson/jsPDF-AutoTable@v3.8.2...v5.0.2)

---
updated-dependencies:
- dependency-name: jspdf
  dependency-type: direct:production
- dependency-name: jspdf-autotable
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot force-pushed the dependabot/npm_and_yarn/multi-740000f706 branch from 724bd13 to 1987b43 Compare March 31, 2025 07:43
@objecttothis
Copy link
Member

@jekkos If I had to bet, I would guess that this upgrade is going to break jspdf in the master, but it looks like it will be a necessary upgrade to resolve the vulnerability it's referencing.

@objecttothis objecttothis self-requested a review March 31, 2025 08:56
@objecttothis objecttothis merged commit 2c9ae36 into master Mar 31, 2025
3 of 4 checks passed
@dependabot dependabot bot deleted the dependabot/npm_and_yarn/multi-740000f706 branch March 31, 2025 09:03
@jekkos
Copy link
Member

jekkos commented Mar 31, 2025

I believe in the past these upgrades never went flawless, so it will require some testing first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants