-
Notifications
You must be signed in to change notification settings - Fork 20.5k
Core: Migrate from AMD to ES modules 🎉 #4541
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
7993682
Core: Migrate all source AMD modules to ECMAScript modules
mgol 11bc60a
Core: Use explicit extensions for imports so that they work natively
mgol 8cd544d
Core: Make noGlobal handling in global.js work in ES modules mode
mgol c90d8a1
Ajax: Workaround nonce being immutable as an ES module
mgol fa6878b
Build: Add a basic Rollup config
mgol a72e591
Build: Remove an export from src/queue/delay.js
mgol 82cb929
Build: Make sure the jQuery global isn't set when ES modules are used
mgol d68ad3c
Tests: Convert test setup to work with source ES modules
mgol e0e5bff
Build: A basic fully working Rollup build (`grunt` & `npm test` both …
mgol 9dc310e
Build: Normalize srcFolder, fix rollupHypotheticalOptions usage
mgol 7fe6f83
Core: disable the max-len rule for the version variable
mgol c6b75df
Build: Add back support for custom compilation
mgol 1065fa3
Core: Import "./core/parseHTML.js" directly in jquery.js
mgol a4250b2
Core: Minor comments tweaks
mgol afeb0eb
Build: rename jsmodules to esmodules
mgol 3b21968
Build: Use more of Rollup API, simplify logic
mgol f6f0545
Build: Simplify ESLint exclusions & globals, revert globalJQuery to n…
mgol 910d815
Build: Move the parseHTML import to save size
mgol c2d5407
Build: Compress ajax/var/nonce.js
mgol eba151a
Build: ESLint tweaks
mgol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Ajax: Workaround nonce being immutable as an ES module
ES modules bindings are immutable and we relied on the `ajax/var/nonce.js` variable being mutable. Workaround it by creating a wrapper object. We might try to compress it somehow in the future.
- Loading branch information
commit c90d8a10734e7d32a6d2c818d86ecbbe7e5d1adf
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| export default Date.now(); | ||
| export default { nonce: Date.now() }; |
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.
Uh oh!
There was an error while loading. Please reload this page.