Skip to content

Replace XML parsing and building libraries#1624

Merged
paustint merged 2 commits intomainfrom
feat/1623-swap-xml-lib
Apr 2, 2026
Merged

Replace XML parsing and building libraries#1624
paustint merged 2 commits intomainfrom
feat/1623-swap-xml-lib

Conversation

@paustint
Copy link
Copy Markdown
Contributor

@paustint paustint commented Apr 2, 2026

Switch from fast-xml-parser and fast-xml-builder to @jetstreamapp/simple-xml for improved XML parsing and building functionality. This change streamlines the codebase and enhances performance.

Fast XML parser has had many vulnerability reports and has had releases without proper codebase updates. Their library covers many more cases than we need to worry about.

We should roll our own XML parser that handles our cases exactly without bloat, vulnerabilities, and potential supply chain issues.

Ref:
NaturalIntelligence/fast-xml-parser#814
NaturalIntelligence/fast-xml-parser#813
#1618 (had bugs with a patch release in fast-xml-parser with breaking changes on a patch version)

Copilot AI review requested due to automatic review settings April 2, 2026 03:06
@socket-security
Copy link
Copy Markdown

socket-security bot commented Apr 2, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​jetstreamapp/​simple-xml@​1.1.17010010090100

View full report

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Switches the Salesforce API XML parsing/building implementation from fast-xml-parser / fast-xml-builder to @jetstreamapp/simple-xml, and adds/updates tests to lock in expected XML shapes.

Changes:

  • Replace XML parsing/building calls in libs/salesforce-api with @jetstreamapp/simple-xml (parse/build).
  • Remove fast-xml-parser and fast-xml-builder direct dependencies and add @jetstreamapp/simple-xml.
  • Add snapshot-style XML parsing/building tests and tighten existing XML parsing assertions.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
yarn.lock Adds @jetstreamapp/simple-xml and removes direct lock entries tied to the old XML libs.
package.json Adds @jetstreamapp/simple-xml dependency; removes fast-xml-parser/fast-xml-builder.
libs/salesforce-api/src/lib/salesforce-package.utils.ts Migrates manifest parsing and package.xml building to simple-xml.
libs/salesforce-api/src/lib/callout-adapter.ts Migrates SOAP/XML response parsing to simple-xml.
libs/salesforce-api/src/lib/__tests__/xml-parsing-snapshot.spec.ts Introduces snapshot tests to pin exact XML parse/build output shapes.
libs/salesforce-api/src/lib/__tests__/callout-adapter.spec.ts Updates assertions to reflect (and verify) the new parser output.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@paustint paustint force-pushed the feat/1623-swap-xml-lib branch from 633b1a2 to 2db670a Compare April 2, 2026 03:30
@paustint paustint merged commit e9b0b14 into main Apr 2, 2026
9 checks passed
@paustint paustint deleted the feat/1623-swap-xml-lib branch April 2, 2026 04:04
@paustint paustint mentioned this pull request Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants