Skip to content

Conversation

tishajain25
Copy link
Contributor

Thanks for taking a look! This updates jsPDF to cope with Node test environments that don’t expose TextEncoder/TextDecoder out of the box and closes #3882.

Summary

  • Introduce a Buffer-based polyfill that provides TextEncoder/TextDecoder whenever the globals are missing
  • Ensure the polyfill loads before other entry-point code and inside the polyfills bundle
  • Add a jasmine regression spec that verifies the fallback installs and round-trips text correctly

Testing

  • npm run lint
  • npm run build
  • npm run test-node

- Introduce Buffer-based polyfill to provide TextEncoder/TextDecoder when missing
- Load polyfill early in library entry points and polyfills bundle
- Add regression test ensuring fallback installs and functions correctly

Fixes parallax#3882
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.

TextEncoder and TextDecoder not defined

1 participant