Make WordPress Core

Opened 10 years ago

Closed 9 years ago

#31700 closed task (blessed) (fixed)

Update Grunt devDependencies in package.json

Reported by: mjbanks's profile mjbanks Owned by: jorbin's profile jorbin
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.2
Component: Build/Test Tools Keywords: has-patch commit
Focuses: Cc:

Description

Update a few grunt modules to latest stable versions in package.json.

"grunt-browserify" updated from ~3.3.0 to ~3.5.0
"grunt-contrib-cssmin" updated from ~0.10.0 to ~0.12.2
"grunt-sass" updated from ~0.18.0 to ~0.18.1

Based on changelogs and running grunt tasks, there are no breaking changes

Attachments (5)

package_json.diff (903 bytes) - added by mjbanks 10 years ago.
build-31700.diff (2.0 MB) - added by netweb 10 years ago.
31700.diff (1.2 KB) - added by wonderboymusic 9 years ago.
31700-uglify.diff (1001.5 KB) - added by netweb 9 years ago.
31700.2.diff (2.2 KB) - added by netweb 9 years ago.

Change History (30)

#1 @mjbanks
10 years ago

  • Keywords has-patch added

@netweb
10 years ago

#2 @netweb
10 years ago

@mjbanks, Thanks for the ticket and patch

Here are the respective changelogs:

@wonderboymusic Can you review the browserify changes, I'm not familiar enough with this yet.

Grunt-SASS looks fine but there are some minified CSS changes with the new CSSMIN.

In /build-31700.diff is the /build folder diff after running grunt precommit
(I haven't had a close look at the exact changes but these need to be checked and verified before commit.)

Last edited 10 years ago by netweb (previous) (diff)

#3 @wonderboymusic
10 years ago

browserify changes seem fine

#4 follow-up: @jorbin
10 years ago

For cssmin, one of the changes was "Set the rebase option to false by default.". We should check and see how this affects us. Additionally, they updated clean-css a major version, which may be affecting the css output. Both require investigation before it is changed.

Sass looks good.

#5 in reply to: ↑ 4 @netweb
10 years ago

Replying to wonderboymusic:

browserify changes seem fine

Thanks :)

Replying to jorbin:

For cssmin, one of the changes was "Set the rebase option to false by default.". We should check and see how this affects us. Additionally, they updated clean-css a major version, which may be affecting the css output. Both require investigation before it is changed.

Sass looks good.

Yes, it's a matter of making sense of this 2mb diff file build-31700.diff

#6 @jorbin
10 years ago

  • Milestone changed from Awaiting Review to 4.3
  • Type changed from enhancement to task (blessed)

Current list:

"grunt-autoprefixer" can be updated from ~2.2.0 to ~3.0.0 (Installed: 2.2.0, Latest: 3.0.0)
"grunt-browserify" can be updated from ^3.3.0 to ^3.8.0 (Installed: 3.8.0, Latest: 3.8.0)
"grunt-contrib-cssmin" can be updated from ~0.10.0 to ~0.12.2 (Installed: 0.10.0, Latest: 0.12.2)
"grunt-contrib-imagemin" can be updated from ~0.9.3 to ~0.9.4 (Installed: 0.9.4, Latest: 0.9.4)
"grunt-contrib-jshint" can be updated from ~0.11.0 to ~0.11.2 (Installed: 0.11.2, Latest: 0.11.2)
"grunt-contrib-qunit" can be updated from ~0.5.2 to ~0.7.0 (Installed: 0.5.2, Latest: 0.7.0)
"grunt-contrib-uglify" can be updated from ~0.8.0 to ~0.9.1 (Installed: 0.8.1, Latest: 0.9.1)
"grunt-includes" can be updated from ~0.4.5 to ~0.5.1 (Installed: 0.4.5, Latest: 0.5.1)
"grunt-sass" can be updated from ~0.18.0 to ~0.18.1 (Installed: 0.18.1, Latest: 0.18.1)

#7 @jorbin
10 years ago

In 32356:

Update grunt-contrib-qunit to 0.7.0

This upgrade adds two changes, both of which are aimed at less reporting of false test passing:

  • Log PhantomJS errors as warnings
  • Add noGlobals option, forwarded to QUnit. Report proper exit code to grunt based on failures. Add support for AMD.

See #31700

#8 @jorbin
10 years ago

In 32357:

Update grunt-autoprefixer to 3.0.0

Two changes we need to know about:

  • Aborts build if there is an exception thrown bu autoprefixer
  • Less verbose output in standard mode

Major version seems to have been bumped due to change in annotation option which which we do not use.

Upstream Changes https://github.com/nDmitry/grunt-autoprefixer/compare/e30d2c5bfda027e1e196a640010e05aabca329c6...6f8dfe8840c48a394da478c553eb4748c4ffc79b

See #31700

#9 @obenland
10 years ago

  • Owner set to jorbin
  • Status changed from new to assigned

#11 @iseulde
9 years ago

I'm currently using Browserify 3.8.0 because that's what we allow. A reason I'd prefer 3.x.x.
Reviewing changes after the fact sounds a bit weird to me.

#12 @iseulde
9 years ago

In 32704:

Autoprefixer after autoprefixer-core 5.2 update

grunt-autoprefixer requires 5.1.7, so this was automatically updated.

See #31700.

Last edited 9 years ago by netweb (previous) (diff)

@wonderboymusic
9 years ago

#13 follow-up: @wonderboymusic
9 years ago

31700.diff is diff containing latest versions - I just ran build and precommit after npm install, all seems good.

#14 in reply to: ↑ 13 @netweb
9 years ago

Replying to wonderboymusic:

31700.diff is diff containing latest versions - I just ran build and precommit after npm install, all seems good.

I'll take a look at this during #wceu contributor day, even though I'm not actually there ;)

A couple of things need checking in regard to new/updated configuration options, grunt-autoprefixer, grunt-contrib-cssmin, and grunt-sass.

#15 @netweb
9 years ago

Update grunt-contrib-jshint to v0.11.2

Changelog: https://github.com/gruntjs/grunt-contrib-jshint/compare/v0.11.0...v0.11.2

  • 2015-04-16   v0.11.2   Fix default value of the reporter option.
  • 2015-03-20   v0.11.1   fix iojs compat issues other fixes to pathing

Running grunt jshint and related WordPress Grunt tasks show no issues with grunt-contrib-jshint.

This ticket was mentioned in Slack in #core by netweb. View the logs.


9 years ago

@netweb
9 years ago

#17 @netweb
9 years ago

  • Keywords needs-patch added; has-patch removed

Update grunt-contrib-uglify to v0.9.1

Changelog: https://github.com/gruntjs/grunt-contrib-uglify/compare/v0.8.0...v0.9.1

  • 2015-04-07   v0.9.0   added hook into uglify's mangling functionality
  • 2015-03-30   v0.8.1   lock uglify to 2.4.17 due to breaking changes

Running grunt uglify results in quite a few changes of minified JavaScript in the following files:

  • wp-admin/js/common.min.js
  • wp-admin/js/common.min.js
  • wp-admin/js/customize-controls.min.js
  • wp-admin/js/customize-nav-menus.min.js
  • wp-admin/js/edit-comments.min.js
  • wp-admin/js/editor-expand.min.js
  • wp-admin/js/svg-painter.min.js
  • wp-includes/js/admin-bar.min.js
  • wp-includes/js/jquery/ui/button.min.js
  • wp-includes/js/jquery/ui/datepicker.min.js
  • wp-includes/js/jquery/ui/position.min.js
  • wp-includes/js/jquery/ui/tabs.min.js
  • wp-includes/js/jquery/ui/widget.min.js
  • wp-includes/js/json2.min.js
  • wp-includes/js/media-audiovideo.min.js
  • wp-includes/js/media-editor.min.js
  • wp-includes/js/media-grid.min.js
  • wp-includes/js/media-models.min.js
  • wp-includes/js/media-views.min.js
  • wp-includes/js/quicktags.min.js
  • wp-includes/js/tinymce/plugins/wpeditimage/plugin.min.js
  • wp-includes/js/tw-sack.min.js
  • wp-includes/js/wp-lists.min.js
  • wp-includes/js/wplink.min.js

A full diff file 31700-uglify.diff shows the differences before and after this grunt-contrib-uglify change.

These changes should be reviewed before updating grunt-contrib-uglify

Last edited 9 years ago by netweb (previous) (diff)

#18 @jorbin
9 years ago

In 32988:

Update Grunt dev-dependencies

grunt-browserify : minor version update
grunt-contrib-cssmin : minor version update
grunt-contrib-imagemin : patch version update
grunt-contrib-jshint : patch version update
grunt-contrib-uglify : minor version update (causes some changes to minified JS)
grunt-includes : minor version update
grunt-sass : major version update ( underlying libsass update ).

Props wonderboymusic
See #31700

#19 @netweb
9 years ago

In 31700.2.diff:

Switch to grunt-postcss (repo) over deprecated grunt-autoprefixer (src) for CSS vendor prefixes

  • Switch to grunt-postcss using NPM package autoprefixer-core as a PostCSS processor plugin
  • Grunt task grunt autoprefixer is replaced with grunt postcss
  • Grunt task autoprefixer:colors and autoprefixer:core renamed to postcss:colors and postcss:core respectively, updated tasks grunt colors and grunt precommit use the new tasks
  • New grunt postcss tasks continue to use the same settings as the previous grunt autoprefixer task configurations

Resulting change results in no change to any CSS files in /src via grunt precommit (postcss:core) or /build via grunt colors, basically a seemless change for us which is awesome.

Version 0, edited 9 years ago by netweb (next)

This ticket was mentioned in Slack in #core by netweb. View the logs.


9 years ago

@netweb
9 years ago

#21 @netweb
9 years ago

  • Keywords has-patch commit added; needs-patch removed

Yeah, I added a patch, 31700.2.diff​, and to avoid any punting adding commit also for 31700.2.diff :)

#22 @obenland
9 years ago

@jorbin, could you do a final review here?

#23 @jorbin
9 years ago

@obenland Yep. Going to get the last piece in this week before dev chat and then close this for 4.3.

#24 @jorbin
9 years ago

In 33129:

Remove grunt-autoprefixer in favor of grunt-postcss with autoprefixer

grunt-autoprefixer was deprecated - https://github.com/nDmitry/grunt-autoprefixer/commit/e020f878d5fe1a3f9f15bc7533b31c12ffa74799
None of the autoprefixer tasks should have been called directly, so they are now removed. grunt precommit and grunt build still work exactly as they should. This change doesn't affect the output of our builds.

An NPM install is required after you have updated after this change.

See #31700
Props netweb

#25 @jorbin
9 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

I am closing this tracking ticket for 4.3.

If there are specific issues that require us to update our build tools again before 4.4 development starts, we should open up a specific ticket for that change.

Thanks to everyone who helped contribute to ensuring our dev dependencies stay updated. I spoke to the elders of the internet and they wanted you to to know that the internet can sleep safely in the Tower of London thanks to your efforts.

Note: See TracTickets for help on using tickets.