keep package inputs ES5-compatible - #15
Merged
Merged
Conversation
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.
In our project, with the latest version of yii, we have a failing input
lib/pph-yii-repo/framework/web/js/source/jquery.ba-bbq.min.js:23because that minified file contained ES6 arrow IIFEs and unquoted reserved object keys, which YUI Compressor 2.4.8 cannot parse.YUI Compressor 2.4.8 is still the latest official YUI Compressor release, published in 2014. YUI Compressor parses JS through Rhino, and the official project predates ES6 syntax support like arrow functions. So there is no drop-in yuicompressor-2.4.9.jar or newer official jar that will parse
=>.During our Build step, when CircleCI runs the following command:
docker run -t --rm --volumes-from dc --memory=3g --env APP_ID=next --env CLIENTSCRIPT_CDN=https://staging.peopleperhour.com --env S3_BUCKET_MAIN=pphuserfilesstaging --env S3_BUCKET_MAIN_KEY=$IAM_KEY_S3_STAGING_YII_ASSETS --env S3_BUCKET_MAIN_SECRET=$IAM_SECRET_S3_STAGING_YII_ASSETS peopleperhour/pph_builder:7.4_24cd068e php /var/www/pph/yiic.php pkgcomp compressAllWe get a error:
I noticed the clientscript package that has the problem is defined in @config/clientscript.php
Reference: https://github.com/yui/yuicompressor/releases