Upgrade to Babel 7#10293
Merged
Merged
Conversation
| { | ||
| "name": "pdf.js", | ||
| "version": "2.0.0", | ||
| "main": "build/lib/pdf.js", |
Collaborator
There was a problem hiding this comment.
This must be reverted, since that's not at all desired/correct.
Please remember that the lib folder mostly exists for running the unit-tests on Travis, and the officially supported way of using the library is through the built pdf.js/pdf.worker.js files.
Also, please remember to squash the commits, since landing ones that fail linting/testing is not allowed.
Contributor
Author
There was a problem hiding this comment.
Whoops, sorry, fixed that.
Update configuration to work with Babel 7 Explicitly require globals - eslint-plugin-mozilla needs it, but doesn't require it on its own. Fix Regexp to match Babel 7's inlined _interopRequireDefault
Collaborator
|
/botio-linux preview |
From: Bot.io (Linux m4)ReceivedCommand cmd_preview from @timvandermeij received. Current queue size: 0 Live output at: http://54.67.70.0:8877/86dc347ce8aad2a/output.txt |
From: Bot.io (Linux m4)SuccessFull output at http://54.67.70.0:8877/86dc347ce8aad2a/output.txt Total script time: 3.08 mins Published |
timvandermeij
approved these changes
Nov 23, 2018
Collaborator
|
Nice work! |
Closed
timvandermeij
added a commit
to timvandermeij/pdf.js
that referenced
this pull request
Jul 29, 2024
This dependency got introduced in PR mozilla#10293, almost six years ago now, because `eslint-plugin-mozilla` didn't work without it but also didn't require it as a dependency itself. However, nowadays `eslint-plugin-mozilla` works just fine without it, and other dependencies that need it correctly require it themselves. This can be seen using `npm ls globals`: ``` $ npm ls globals pdf.js ├─┬ @babel/core@7.24.9 │ └─┬ @babel/traverse@7.25.0 │ └── globals@11.12.0 ├─┬ @babel/preset-env@7.25.0 │ └─┬ @babel/plugin-transform-classes@7.25.0 │ └── globals@11.12.0 ├─┬ eslint-plugin-unicorn@55.0.0 │ └── globals@15.8.0 deduped ├─┬ eslint@8.57.0 │ ├─┬ @eslint/eslintrc@2.1.4 │ │ └── globals@13.24.0 │ └── globals@13.24.0 └── globals@15.8.0 ``` Further proof that `eslint-plugin-mozilla` (no longer) uses `globals` is from a source code search in https://searchfox.org/mozilla-central/search?q=globals&path=&case=false®exp=false. The only results for `eslint-plugin-mozilla` refer to a file named `globals.js`, but the `globals` NPM package is not actually imported anywhere. Given this we should be able to safely get rid of this explicit dependency on our end now.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updated using babel-upgrade with custom fixes on top, mostly for custom Babel configuration.
I don't know how to verify it better,
gulp genericpasses without any error, I ran the viewer and it seems to be fine.Happy to hear your comments :)