Skip to content

Commit

Permalink
2.7.0 rollback (#1023)
Browse files Browse the repository at this point in the history
* Revert "Sockjs prefix config (#911)"

This reverts commit ccd113a.

* Revert "2.7.0 (#1020)"

This reverts commit c8b9a0f.
  • Loading branch information
shellscape authored Aug 8, 2017
1 parent c8b9a0f commit cab5da5
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 81 deletions.
10 changes: 1 addition & 9 deletions client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,20 +170,12 @@ if(hostname && (self.location.protocol === "https:" || urlParts.hostname === "0.
protocol = self.location.protocol;
}

var rootPathName = url.parse(__webpack_public_path__).pathname || ""; // eslint-disable-line no-undef

if(rootPathName.length > 1) {
rootPathName = rootPathName.replace(/\/+$/, "");
}

var sockjsPath = rootPathName + "/sockjs-node";

var socketUrl = url.format({
protocol: protocol,
auth: urlParts.auth,
hostname: hostname,
port: (urlParts.port === "0") ? self.location.port : urlParts.port,
pathname: urlParts.path == null || urlParts.path === "/" ? sockjsPath : urlParts.path
pathname: urlParts.path == null || urlParts.path === "/" ? "/sockjs-node" : urlParts.path
});

socket(socketUrl, onSocketMsg);
Expand Down
15 changes: 0 additions & 15 deletions examples/node-api-sockjs-prefix/README.md

This file was deleted.

7 changes: 0 additions & 7 deletions examples/node-api-sockjs-prefix/app.js

This file was deleted.

9 changes: 0 additions & 9 deletions examples/node-api-sockjs-prefix/index.html

This file was deleted.

25 changes: 0 additions & 25 deletions examples/node-api-sockjs-prefix/server.js

This file was deleted.

8 changes: 0 additions & 8 deletions examples/node-api-sockjs-prefix/webpack.config.js

This file was deleted.

3 changes: 1 addition & 2 deletions lib/Server.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ function Server(compiler, options) {
this.disableHostCheck = !!options.disableHostCheck;
this.publicHost = options.public;
this.allowedHosts = options.allowedHosts;
this.sockjsPrefix = options.sockjsPrefix || ""
this.sockets = [];
this.contentBaseWatchers = [];

Expand Down Expand Up @@ -521,7 +520,7 @@ Server.prototype.listen = function(port, hostname) {
});

sockServer.installHandlers(this.listeningApp, {
prefix: `${this.sockjsPrefix}/sockjs-node`
prefix: "/sockjs-node"
});
return returnValue;
}
Expand Down
4 changes: 0 additions & 4 deletions lib/optionsSchema.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@
}
]
},
"sockjsPrefix": {
"description": "Optional prefix for the sockjs handler to be mounted to.",
"type": "string"
},
"socket": {
"description": "The Unix socket to listen to (instead of on a host).",
"type": "string"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "webpack-dev-server",
"version": "2.7.0",
"version": "2.6.1",
"author": "Tobias Koppers @sokra",
"description": "Serves a webpack app. Updates the browser on changes.",
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion test/Validation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ describe("Validation", function() {
config: { asdf: true },
message: [
" - configuration has an unknown property 'asdf'. These properties are valid:",
" object { hot?, hotOnly?, lazy?, bonjour?, host?, allowedHosts?, filename?, publicPath?, port?, sockjsPrefix?, socket?, " +
" object { hot?, hotOnly?, lazy?, bonjour?, host?, allowedHosts?, filename?, publicPath?, port?, socket?, " +
"watchOptions?, headers?, clientLogLevel?, overlay?, key?, cert?, ca?, pfx?, pfxPassphrase?, " +
"inline?, disableHostCheck?, public?, https?, contentBase?, watchContentBase?, open?, useLocalIp?, openPage?, features?, " +
"compress?, proxy?, historyApiFallback?, staticOptions?, setup?, stats?, reporter?, " +
Expand Down

0 comments on commit cab5da5

Please sign in to comment.