-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Update webpack peerDependency in v1-stable branch to v4.x #265
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
sudo: false | ||
language: node_js | ||
node_js: | ||
- "4" | ||
- "6" | ||
- "7" | ||
- "8" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ describe("Server", function() { | |
it("GET request to bundle file", function(done) { | ||
request(app).get("/public/bundle.js") | ||
.expect("Content-Type", "application/javascript; charset=UTF-8") | ||
.expect("Content-Length", "2823") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this change specific to webpack@4? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the |
||
.expect("Content-Length", "3435") | ||
.expect(200, /console\.log\("Hey\."\)/, done); | ||
}); | ||
|
||
|
@@ -138,7 +138,7 @@ describe("Server", function() { | |
|
||
it("GET request to bundle file", function(done) { | ||
request(app).get("/bundle.js") | ||
.expect("Content-Length", "2823") | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this change specific to webpack@4? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same as above 👆🏻 |
||
.expect("Content-Length", "3435") | ||
.expect(200, /console\.log\("Hey\."\)/, done); | ||
}); | ||
}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
module.exports = { | ||
mode: "development", | ||
devtool: false, | ||
context: __dirname, | ||
entry: "./foo.js", | ||
output: { | ||
filename: "bundle.js", | ||
path: "/" | ||
}, | ||
module: { | ||
loaders: [ | ||
rules: [ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. is this change specific to webpack@4? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Actually this schema name change started in webpack v2 ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK this change can stick around |
||
{ | ||
test: /\.(svg|html)$/, | ||
loader: "file-loader", | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunately we can't remove the Node v4 tests for v1.x of the module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Webpack v4 does not support node 4. We could continue to keep the
devDependency
at webpack v3.x for the sake of these tests though.All I really wanted to do is update the
peerDependency
to allow for v4.x.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well in fairness, you can't remove a node dependency in a patch for major version that previously supported it. That's a massive semver violation, and that's why v2.x dropped support for it. Node 4 will have to stay and you'll have to find a way to not run webpack v4 tests on that node version. These are the things that bite you when trying to update an old version instead of upgrading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We aren’t actually removing support for node 4 with this change. We just wouldn’t be running tests against it (because that is not possible with webpack v4). If we kept webpack v3 as the
devDependency
version we could keep running tests against node v4.Really this situation isn’t dissimilar from what you’re already practicing. Webpack-dev-middleware technically supports webpack v1 and v2 but no tests are run for these versions... ¯_(ツ)_/¯