Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scripts: Use the latest version of webpack for build and start commands #17746

Merged
merged 3 commits into from
Oct 4, 2019

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Oct 3, 2019

Description

This PR upgrades the version of webpack used in @wordpress/scripts.

There should be no changes in how npm run dev and npm run build work in Gutenberg.

In addition, I updated the list of dependencies for @wordpress/scripts to use ranges for consistency.

@gziolo gziolo added the [Tool] WP Scripts /packages/scripts label Oct 3, 2019
@gziolo gziolo self-assigned this Oct 3, 2019
@gziolo gziolo added the [Type] Enhancement A suggestion for improvement. label Oct 3, 2019
@gziolo
Copy link
Member Author

gziolo commented Oct 3, 2019

cc @jsnajdr @simison

@simison
Copy link
Member

simison commented Oct 3, 2019

Failed JavaScript unit tests just look like you should update some snaps?

@gziolo
Copy link
Member Author

gziolo commented Oct 3, 2019

Failed JavaScript unit tests just look like you should update some snaps?

I will fix it soon. It looks like webpack produces a different hash for files, interesting. @sirreal, any idea what could happen?

@gziolo
Copy link
Member Author

gziolo commented Oct 3, 2019

Updated with 29a3e3e. Travis seems to be much happier now 🎉

@gziolo
Copy link
Member Author

gziolo commented Oct 3, 2019

@youknowriad - this is another one to include in the npm release process since we use a super out of date version of webpack.

@jsnajdr
Copy link
Member

jsnajdr commented Oct 3, 2019

It looks like webpack produces a different hash for files, interesting.

That hash includes also the webpack runtime code. If something in the code that loads and executes the webpack chunks and modules changes, the bundle's hash will change, too.

Here's one example of a simple change in the runtime code that happened between 4.8.3 and 4.41.0. It changes head references to document.head: webpack/webpack@6f5c5ef33

Copy link
Member

@simison simison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI build obviously succeeds and I appreciate the version range change. 👍

Does version range change need a major Semver update?

@gziolo
Copy link
Member Author

gziolo commented Oct 4, 2019

Does version range change need a major Semver update?

webpack follows sem ver as far as we can tell, so it's safe to assume there are only enhancements added given it is still v4.x.

@gziolo gziolo merged commit 3cf3fdb into master Oct 4, 2019
@gziolo gziolo deleted the update/scripts-webpack branch October 4, 2019 08:26
@gziolo
Copy link
Member Author

gziolo commented Oct 4, 2019

@youknowriad - another one to include in the next npm release.

@youknowriad youknowriad added this to the Gutenberg 6.7 milestone Oct 14, 2019
gziolo added a commit that referenced this pull request Oct 15, 2019
…ds (#17746)

* Scripts: Use the latest version of webpack for build and start commands

* Add changelog entry for webpack upgrade in `@wordpress/scripts`

* Update failing tests by regenerating snapshots where hashes produces by webpack changed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Tool] WP Scripts /packages/scripts [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants