bolinfest / plovr

plovr: a Closure build tool
78 stars 48 forks source link

Update to latest closure jars #137

Closed rgpower closed 6 years ago

rgpower commented 6 years ago

Hey @nicks ,

I am hoping you will consider this pull request which updates plovr to use the latest closure-related jars from Maven central, in particular:

These updates required some small changes to plovr src in order to avoid use of removed/deprecated apis.

In particular:

closure-templates 2017-08-08 changes

  1. accomodate recent soy updates around use of the soy autoescape mode 'deprecated-noncontextual' in plovr's own soy templates
  2. accomodate soy command 'css' replaced in favour of new soy function 'css'
  3. replace calls to soyData (now removed) with StringData.forValue since former function is now removed.
  4. replace calls to now private ErrorReporterImpl with static builder function ErrorReporter.explodeOnErrorsAndIgnoreWarnings
  5. replace usages of now private SoyMsg constructor with static builder SoyMsg.build

closure-compiler v20171023 changes

  1. accomodate node.getType() replaced with node.getToken()
  2. NodeTraversal.traverse deprecated in favour of NodeTraversal.traverseEs6
  3. prettyPrint field now made private - use setter instead
  4. accomodate isStrict changes in compiler config, enable users to configure via new 'strict-mode-input' (boolean) config opt
  5. prefer LanguageMode.fromString over LanguageMode.valueOf since former normalizes the obsolete modes 'ECMASCRIPT6' and 'ECMASCRIPT6_STRICT' into 'ECMASCRIPT_2015' (compatibility)
  6. update input order in ConfigParserTest caused by new compiler version

other:

  1. This pull request also removes closure-stylesheets from plovr and pulls it from Maven central.
  2. Finally, reduce number of chrome complaints related to raw.soy's use of document.write, by combining all of the separate calls into one jumbo call.
  3. No changes were required for plovr to handle Google Stylesheet (gss) files using latest closure-stylesheets 1.5.0 jar.
nicks commented 6 years ago

thanks for doing this! let me poke around at it a bit

nicks commented 6 years ago

mostly looks good. a few minor issues:

nicks commented 6 years ago

ok, i merged this in parts and made the auto-escaping changes. it was a bit messier than i would have liked but it worked out ok

rgpower commented 6 years ago

Hey @nicks, thanks so very much for taking the time (and effort) to merge these updates. I am honoured to have been able to make even a small contribution to plovr, as it has been so beneficial to me and my colleagues.