Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#42308 closed enhancement (fixed)

Update Grunt to version 1.0.2

Reported by: iandunn's profile iandunn Owned by: netweb's profile netweb
Milestone: 5.0 Priority: normal
Severity: normal Version: 4.9
Component: Build/Test Tools Keywords: has-patch commit
Focuses: Cc:

Description

We're currently on Grunt 0.4.5, which is 1 major version behind the latest, 1.0.1.

Upgrading to the latest would benefit #42282, because it adds support for multiple values for command line parameters, e.g.,

grunt watch:phpunit --files=wp-includes/http.php --files=wp-includes/Requests --group=http

Changes since 0.4.5.

Attachments (3)

42308.diff (794 bytes) - added by iandunn 7 years ago.
42308.2.diff (812 bytes) - added by netweb 7 years ago.
42308.3.diff (232.3 KB) - added by netweb 7 years ago.

Download all attachments as: .zip

Change History (12)

@iandunn
7 years ago

#1 @iandunn
7 years ago

I did some basic smoke testing with our existing tasks and the new version, but many of them fail with errors like, Warning: grunt.util._.flattenDeep is not a function Use --force to continue. It seems like that's caused by dependencies that aren't compatible with Grunt 1.0.0.

I tried upgrading some of them, but it didn't seem to work in all cases. I don't have time to dig any deeper right now, though.

#2 @netweb
7 years ago

  • Keywords good-first-bug removed
  • Milestone changed from Awaiting Review to 5.0
  • Owner set to netweb
  • Status changed from new to assigned

Thanks @iandunn, agreed, a great enhancement for what's going on in #42282

That said, let's do this in 5.0, I don't want to update any of these npm dependencies for 4.9 as we're now in beta.

And now with that said, I also hit upon the same issues you've had here previously in #38199#comment:15

Once /trunk becomes 5.0 I'll refresh up the patch here and any update any other dependencies that require or have issues with Grunt 1.x (I'll also update any other dependencies in a separate ticket)

As an aside and related further are the handful of tasks in #35105 which relate to updates we need to perform on our "build server" to update NodeJS and npm versions and to ensure that our build tools updates don't break the build process for build.svn.w.org

@netweb
7 years ago

#3 follow-up: @netweb
7 years ago

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

Patch 42308.2.diff contains updates to grunt, grunt-legacy-util, and grunt-includes npm modules


How has this been tested?

Each of the following Grunt tasks has been run and confirmed that no errors or other code changes have occured:

  • grunt, grunt build
  • grunt _watch (Tested watching PHP, CSS, SCSS, JS files)
  • grunt travis:js, grunt travis:phpunit,
  • grunt qunit, grunt qunit:compiled
  • grunt precommit, grunt prerelease
  • grunt includes,grunt includes:emoji, grunt includes:embed

Travis CI job via my fork: https://travis-ci.org/ntwb/wordpress/jobs/329374246

Note: The changes not contained in 42308.2.diff will be added to a new ticket or tickets shortly

#4 @iandunn
7 years ago

Upgrading to the latest would benefit #42282, because it adds support for multiple values for command line parameters

That's no longer needed, since it's performant and better UX to just watch the whole repo instead.

@netweb
7 years ago

#5 @netweb
7 years ago

  • Summary changed from Update Grunt to version 1.0.1 to Update Grunt to version 1.0.2

#6 in reply to: ↑ 3 @netweb
7 years ago

  • Summary changed from Update Grunt to version 1.0.2 to Update Grunt to version 1.0.1

Patch 42308.3.diff contains updates to grunt, grunt-legacy-util, and grunt-includes npm modules


How has this been tested?

Each of the following Grunt tasks has been run and confirmed that no errors or other code changes have occured:

  • grunt, grunt build
  • grunt _watch (Tested watching PHP, CSS, SCSS, JS files)
  • grunt travis:js, grunt travis:phpunit,
  • grunt qunit, grunt qunit:compiled
  • grunt precommit, grunt prerelease
  • grunt includes,grunt includes:emoji, grunt includes:embed

Note: The changes not contained in 42308.3.diff will be added to a new ticket or tickets shortly

#7 @netweb
7 years ago

  • Summary changed from Update Grunt to version 1.0.1 to Update Grunt to version 1.0.2

#8 @azaozz
7 years ago

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

In 43323:

Build tools: Update Grunt to version 1.0.2.

Props iandunn, netweb.
Fixes #42308.

#9 @jorbin
6 years ago

committed to 5.0 in [43684]

Note: See TracTickets for help on using tickets.