Skip to content

[api-minor] Remove the, in legacy builds, bundled ReadableStream polyfill #14560

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

Conversation

Snuffleupagus
Copy link
Collaborator

@Snuffleupagus Snuffleupagus commented Feb 12, 2022

According to the MDN compatibility data, see https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream#browser_compatibility, all browsers that we support have native ReadableStream implementations (since quite some time too).

Hence only Node.js is now lagging behind w.r.t. ReadableStream support, and its experimental implementation doesn't really help us given the life-span of the LTS releases (see https://en.wikipedia.org/wiki/Node.js#Releases).
It seems quite unfortunate to bundle a ReadableStream polyfill in the legacy builds when it's unnecessary in browsers, given its overall size, but fortunately we can avoid that by simply listing web-streams-polyfill as a dependency for the pdfjs-dist library.

@Snuffleupagus Snuffleupagus force-pushed the Node-ReadableStream-polyfill branch 3 times, most recently from 7406ca6 to de81b2f Compare February 12, 2022 19:29
@mozilla mozilla deleted a comment from pdfjsbot Feb 12, 2022
@mozilla mozilla deleted a comment from pdfjsbot Feb 12, 2022
@mozilla mozilla deleted a comment from pdfjsbot Feb 12, 2022
@mozilla mozilla deleted a comment from pdfjsbot Feb 12, 2022
…polyfill

According to the MDN compatibility data, see https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream#browser_compatibility, all browsers that we support have native `ReadableStream` implementations (since quite some time too).

Hence only Node.js is now lagging behind w.r.t. `ReadableStream` support, and its experimental implementation doesn't really help us given the life-span of the LTS releases (see https://en.wikipedia.org/wiki/Node.js#Releases).
It seems quite unfortunate to bundle a `ReadableStream` polyfill in the `legacy` builds when it's unnecessary in browsers, given its overall size, but fortunately we can avoid that by simply listing `web-streams-polyfill` as a dependency for the `pdfjs-dist` library.
@Snuffleupagus Snuffleupagus force-pushed the Node-ReadableStream-polyfill branch from de81b2f to b89595f Compare February 13, 2022 09:16
@mozilla mozilla deleted a comment from pdfjsbot Feb 13, 2022
@mozilla mozilla deleted a comment from pdfjsbot Feb 13, 2022
@mozilla mozilla deleted a comment from pdfjsbot Feb 13, 2022
@mozilla mozilla deleted a comment from pdfjsbot Feb 13, 2022
@Snuffleupagus
Copy link
Collaborator Author

/botio xfatest

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Received

Command cmd_xfatest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.241.84.105:8877/9767cb99e143965/output.txt

@pdfjsbot
Copy link

From: Bot.io (Windows)


Received

Command cmd_xfatest from @Snuffleupagus received. Current queue size: 0

Live output at: http://54.193.163.58:8877/ac24ad566f1779c/output.txt

@pdfjsbot
Copy link

From: Bot.io (Linux m4)


Failed

Full output at http://54.241.84.105:8877/9767cb99e143965/output.txt

Total script time: 10.21 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 2

Image differences available at: http://54.241.84.105:8877/9767cb99e143965/reftest-analyzer.html#web=eq.log

@pdfjsbot
Copy link

From: Bot.io (Windows)


Failed

Full output at http://54.193.163.58:8877/ac24ad566f1779c/output.txt

Total script time: 12.48 mins

  • Font tests: Passed
  • Unit tests: Passed
  • Integration Tests: FAILED
  • Regression tests: FAILED
  different ref/snapshot: 7

Image differences available at: http://54.193.163.58:8877/ac24ad566f1779c/reftest-analyzer.html#web=eq.log

@timvandermeij timvandermeij merged commit c37d785 into mozilla:master Feb 13, 2022
@timvandermeij
Copy link
Contributor

Good idea!

@Snuffleupagus Snuffleupagus deleted the Node-ReadableStream-polyfill branch February 13, 2022 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants