Skip to content
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

Legacy build seems not work, still have optional chain #17082

Closed
Spike-Leung opened this issue Oct 7, 2023 · 2 comments
Closed

Legacy build seems not work, still have optional chain #17082

Spike-Leung opened this issue Oct 7, 2023 · 2 comments
Labels

Comments

@Spike-Leung
Copy link

From https://github.com/mozilla/pdfjs-dist :

For usage with older browsers or environments, without support for modern features such as optional chaining, nullish coalescing, and private class fields/methods; please see the legacy/ folder.

After npm install pdfjs-dist and import pdfjs-dist/legacy/build/pdf.js, it still has modern features.

image

image

I also searched on the GitHub repo, it seems there are no modern features in the legacy build:

image

According to the README, these features should not be included in the legacy build.

Is there something wrong with my operation?

Configuration:

  • PDF.js version: 3.6.172
  • Is a browser extension: no

Steps to reproduce the problem:

  1. npm install pdfjs-dist
  2. open node_module/pdfjs-dist/legacy/build/pdf.js and check the code
@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Oct 7, 2023

From https://github.com/mozilla/pdfjs-dist :

Unfortunately, because of various issues, that GitHub repository no longer updates correctly and it's consequently outdated.

If you instead look at https://www.npmjs.com/package/pdfjs-dist you'll notice slightly updated compatibility text, with a link to https://github.com/mozilla/pdf.js/wiki/Frequently-Asked-Questions#faq-support that always contains the current support data.

If you compare our list of supported browsers/environments you'll notice that all of them have native support for optional chaining, please see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining#browser_compatibility

PDF.js version: 3.6.172

That version is no longer supported, please find the latest releases at https://mozilla.github.io/pdf.js/getting_started/#download

@Snuffleupagus Snuffleupagus closed this as not planned Won't fix, can't repro, duplicate, stale Oct 7, 2023
@Spike-Leung
Copy link
Author

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants