โจ๐ Upgrade Closure Compiler to v20180101#18794
โจ๐ Upgrade Closure Compiler to v20180101#18794rsimha merged 10 commits intoampproject:masterfrom rsimha:2018-10-15-ClosureUpgrade
Conversation
|
This PR is now ready for review. Adding @cvializ to review the change to |
cvializ
left a comment
There was a problem hiding this comment.
react-utils changes look good ๐ "deferring" approval to other reviewers : )
|
Please ping on this PR when it's tested and ready. |
|
@choumx Pinging this PR. To get the runtime to work in single-pass mode, I had to do a couple things like transform common JS dependencies to ESM and remove the UMD wrapper from |
|
@choumx @jridgewell @erwinmombay At long last, this is ready for review. PTAL. |
|
Tested this PR as follows:
Merging now ๐ค |
| return defaultPlugins; | ||
| if (isCommonJsModule) { | ||
| pluginsToApply = pluginsToApply.concat([ | ||
| [require.resolve('babel-plugin-transform-commonjs-es2015-modules')], |
There was a problem hiding this comment.
Do we have an open issue for removing this transform when possible? We should migrate over all these dependencies to ESM.
There was a problem hiding this comment.
I have a TODO in the code assigned to @erwinmombay and me. I'm working on a follow up PR to upgrade to the latest closure as we speak, and will file issues for all remaining ESM library related tasks.
It's 2018, so this PR upgrades closure compiler to the earliest version from 2018.
Code changes:
promise-pjsworkaround introduced by @cramforce in Turn on closure compiler collapse properties.ย #2972.Property so-and-so never definederrors ingulp check-typesby modifying a few importsprocess_common_js_modulesoption for single-pass to prevent errors due to class exports being appended with.default. To make up for it, also do the following:babel-plugin-transform-commonjs-es2015-modulestransform to common JS dependencies that are shipped with the runtime (promise-pjs,dompurify, andset-dom)third_party/mustache.jsto make it an ESM style module@ampproject/animations/dist/animationsthat we were using inamp-lightbox-gallerywith its ESM equivalentreact-utils.jsby renamingDeferredtoDeferredType(Deferredis already defined and exported bysrc/promise.js)width,left, andrightinamp-image-slider.jsComing up: More PRs to eventually upgrade to the latest version.
Partial fix for #18748
Follow up to #18552
Follow up to #18609