Conversation
Bumps [jspdf](https://github.com/parallax/jsPDF) from 1.3.5 to 4.2.0. - [Release notes](https://github.com/parallax/jsPDF/releases) - [Changelog](https://github.com/parallax/jsPDF/blob/master/RELEASE.md) - [Commits](parallax/jsPDF@v1.3.5...v4.2.0) --- updated-dependencies: - dependency-name: jspdf dependency-version: 4.2.0 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
| "interact.js": "~1.2.6", | ||
| "jcanvas": "~16.7.3", | ||
| "jspdf": "~1.3.2", | ||
| "jspdf": "~4.2.0", |
There was a problem hiding this comment.
Bug: The code calls doc.setFontType(), a method removed in jsPDF v2.0.0. This will cause a runtime error since the PR upgrades jsPDF to v4.2.0, breaking the print functionality.
Severity: CRITICAL
Suggested Fix
Update the code to use the new API for setting font styles. Replace the separate calls to doc.setFont() and doc.setFontType() with a single call to doc.setFont(fontName, fontStyle). For example, doc.setFont('helvetica', 'bold');.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L74
Potential issue: The pull request upgrades the `jsPDF` library from v1.3.5 to v4.2.0.
This upgrade introduces a breaking change. The code in
`src/components/layers/layerlegends.vue` calls `doc.setFontType()`, a method that was
deprecated and removed in jsPDF v2.0.0. When a user attempts to print legends, this code
path is executed, which will result in a `TypeError: doc.setFontType is not a function`.
This error will cause the PDF generation to fail, making the legend printing feature
completely non-functional.
Did we get this right? 👍 / 👎 to inform future reviews.
Bumps jspdf from 1.3.5 to 4.2.0.
Release notes
Sourced from jspdf's releases.
... (truncated)
Commits
7af912c4.2.056b46d4Merge commit from fork2e5e156Merge commit from fork71ad2dbMerge commit from fork885a777fix: upgrade@babel/runtimefrom 7.28.4 to 7.28.6 (#3954)3b92c7dAdd default export to package.json (#3953)02273814.1.0ae4b93fMerge commit from fork2863e5cMerge commit from forkefe54bfMerge commit from forkDependabot 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 rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill 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 versionwill 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 dependencywill 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.