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

Use JSON imports instead of PDFJSDev.json #19068

Merged
merged 1 commit into from
Nov 18, 2024

Conversation

nicolo-ribaudo
Copy link
Contributor

JSON imports are now supported by all tools used in PDF.js' build process. The chromecom.js file is bundled by webpack and import attributes are thus removed, so browser compatibility for this new syntax is not relevant.

Fixes #18563

@Snuffleupagus Snuffleupagus changed the title Use JSON imports instad of PDFJSDev.json Use JSON imports instead of PDFJSDev.json Nov 18, 2024
@Snuffleupagus
Copy link
Collaborator

Sorry, but this doesn't seem to work (at all) when running gulp chromium (or even gulp generic) locally and a number of the GitHub Actions work-flows failed as well.

@nicolo-ribaudo
Copy link
Contributor Author

Oh whops, I had an old branch and messed up while rebasing.

@nicolo-ribaudo nicolo-ribaudo marked this pull request as draft November 18, 2024 14:39
@nicolo-ribaudo
Copy link
Contributor Author

Keeping it as draft because, even if ESLint 9.14 addes support for with (https://github.com/eslint/eslint/releases/tag/v9.14.0) and we are using 9.15, it still complains about it 🤔

@Snuffleupagus
Copy link
Collaborator

Keeping it as draft because, even if ESLint 9.14 addes support for with (https://github.com/eslint/eslint/releases/tag/v9.14.0) and we are using 9.15, it still complains about it 🤔

Could that be solved by updating the version here?

ecmaVersion: 2022,

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the typo in the commit message: instad -> instead

external/builder/fixtures_babel/evals.js Show resolved Hide resolved
web/chromecom.js Outdated Show resolved Hide resolved
web/chromecom.js Outdated Show resolved Hide resolved
JSON imports are now supported by all tools used in PDF.js' build
process. The `chromecom.js` file is bundled by webpack and
import attributes are thus removed, so browser compatibility for this
new syntax is not relevant.
@nicolo-ribaudo
Copy link
Contributor Author

Oh that was it, thanks!

@nicolo-ribaudo nicolo-ribaudo marked this pull request as ready for review November 18, 2024 15:23
@Snuffleupagus
Copy link
Collaborator

/botio-linux preview

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

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

@Snuffleupagus
Copy link
Collaborator

/botio unittest

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Received

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

Live output at: http://54.241.84.105:8877/0f095ef920f5952/output.txt

@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/695170d8c5cc965/output.txt

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

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

Total script time: 0.97 mins

Published

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Linux m4)


Success

Full output at http://54.241.84.105:8877/0f095ef920f5952/output.txt

Total script time: 2.57 mins

  • Unit Tests: Passed

@moz-tools-bot
Copy link
Collaborator

From: Bot.io (Windows)


Success

Full output at http://54.193.163.58:8877/695170d8c5cc965/output.txt

Total script time: 7.35 mins

  • Unit Tests: Passed

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, thank you.

@Snuffleupagus Snuffleupagus merged commit f406119 into mozilla:master Nov 18, 2024
9 checks passed
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.

Use JSON imports rather than a custom Babel transform
3 participants