pdf.js/external/dist
Jonas Jenwald 00f8fab8a5 Add support for modern ECMAScript class features
With ESLint 8 we should now finally be able to start using modern `class` features, see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Public_class_fields and https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields

However, while both ESLint and Acorn now support this, it unfortunately turns out that Escodegen (which we use during building) still lack the necessary support. Looking at https://github.com/estools/escodegen there's not been any updates since last year, and there's also open PRs adding support for these new `class` features.

To avoid blocking usage of these `class` features in the PDF.js code-base, in particular *private* fields/methods, this patch thus proposes that we (hopefully temporarily) switch to an `escodegen` fork that has the necessary support; please see https://www.npmjs.com/package/@javascript-obfuscator/escodegen

While I have no reason to doubt the security of the `escodegen` fork, this patch nonetheless pins the version number. Furthermore, I've also diffed the output of the two `.js`-files in this forked package against the original files without finding anything that looks immediately "dangerous".
2021-10-22 22:01:17 +02:00
..
legacy Fix Viewer API definitions and include in CI 2021-08-25 18:45:46 -04:00
lib Add a (basic) TypeScript definitions for the viewer components (issue 13267) 2021-06-19 16:24:34 +02:00
web Fix Viewer API definitions and include in CI 2021-08-25 18:45:46 -04:00
CODE_OF_CONDUCT.md Include the code of conduct for pdfjs-dist too 2019-03-30 19:00:57 +01:00
README.md Add support for modern ECMAScript class features 2021-10-22 22:01:17 +02:00
webpack.js making webpack aware of the change inside of the worker file and hashing its name on build accordingly 2021-07-08 13:32:58 -03:00

PDF.js

PDF.js is a Portable Document Format (PDF) library that is built with HTML5. Our goal is to create a general-purpose, web standards-based platform for parsing and rendering PDFs.

This is a pre-built version of the PDF.js source code. It is automatically generated by the build scripts.

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

See https://github.com/mozilla/pdf.js for learning and contributing.