Skip to content

Remove PDFJSDev.json from the pre-processor #19020

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

Closed
wants to merge 1 commit into from

Conversation

Snuffleupagus
Copy link
Collaborator

The PDFJSDev.json functionality has never been used much, and there's currently only a single call-site remaining.[1]
It's possible to replace that one with PDFJSDev.eval, by tweaking the gulpfile a little bit, and we can thus simplify the pre-processor code slightly.

Please note: This can be considered a step towards implementing issue #18563, and once import attributes become generally available in (all) browsers and build-tools we can change the web/chromecom.js file to use that instead.


[1] The previous usage was removed over three and a half years ago.

The `PDFJSDev.json` functionality has never been used much, and there's currently only a single call-site remaining.[1]
It's possible to replace that one with `PDFJSDev.eval`, by tweaking the `gulpfile` a little bit, and we can thus simplify the pre-processor code slightly.

*Please note:* This can be considered a step towards implementing issue 18563, and once [import attributes](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import/with) become generally available in (all) browsers and build-tools we can change the `web/chromecom.js` file to use that instead.

---

[1] The previous usage was removed over three and a half years ago.
@Snuffleupagus
Copy link
Collaborator Author

/botio unittest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Received

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

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

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/feedf07f7e80ab7/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/feedf07f7e80ab7/output.txt

Total script time: 2.50 mins

  • Unit Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

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

Total script time: 7.47 mins

  • Unit Tests: Passed

@nicolo-ribaudo
Copy link
Contributor

nicolo-ribaudo commented Nov 11, 2024

once import attributes become generally available in (all) browsers and build-tools we can change the web/chromecom.js file to use that instead

Last time I checked, web/chromecom.js is run through Webpack and so the import attributes syntax is removed from the file that gets generated.

ESLint was the only blocker, but they recently released support for import attributes so it should be fine now.

@Snuffleupagus
Copy link
Collaborator Author

ESLint was the only blocker, but they recently released support for import attributes so it should be fine now.

Maybe, but that requires fixing issue #17928 first as far as I can tell. (Last time I looked at that, it didn't seem trivial to just update.)

@Snuffleupagus Snuffleupagus deleted the rm-PDFJSDev.json branch November 12, 2024 16:33
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