Skip to content

Commit 1b50e4e

Browse files
authored
Merge pull request webpack#6833 from webpack/ellipsis
Use ellipsis instead of '...'
2 parents 3a6edf0 + 72786be commit 1b50e4e

File tree

12 files changed

+43
-43
lines changed

12 files changed

+43
-43
lines changed

lib/Compiler.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,36 +94,36 @@ class Compiler extends Tapable {
9494
this.resolverFactory.plugin("resolver normal", resolver => {
9595
resolver.plugin(hook, fn);
9696
});
97-
}, "webpack: Using compiler.resolvers.normal is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver normal", resolver => {\n resolver.plugin(/* ... */);\n}); instead.'),
97+
}, "webpack: Using compiler.resolvers.normal is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver normal", resolver => {\n resolver.plugin(/* */);\n}); instead.'),
9898
apply: util.deprecate((...args) => {
9999
this.resolverFactory.plugin("resolver normal", resolver => {
100100
resolver.apply(...args);
101101
});
102-
}, "webpack: Using compiler.resolvers.normal is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver normal", resolver => {\n resolver.apply(/* ... */);\n}); instead.')
102+
}, "webpack: Using compiler.resolvers.normal is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver normal", resolver => {\n resolver.apply(/* */);\n}); instead.')
103103
},
104104
loader: {
105105
plugins: util.deprecate((hook, fn) => {
106106
this.resolverFactory.plugin("resolver loader", resolver => {
107107
resolver.plugin(hook, fn);
108108
});
109-
}, "webpack: Using compiler.resolvers.loader is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver loader", resolver => {\n resolver.plugin(/* ... */);\n}); instead.'),
109+
}, "webpack: Using compiler.resolvers.loader is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver loader", resolver => {\n resolver.plugin(/* */);\n}); instead.'),
110110
apply: util.deprecate((...args) => {
111111
this.resolverFactory.plugin("resolver loader", resolver => {
112112
resolver.apply(...args);
113113
});
114-
}, "webpack: Using compiler.resolvers.loader is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver loader", resolver => {\n resolver.apply(/* ... */);\n}); instead.')
114+
}, "webpack: Using compiler.resolvers.loader is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver loader", resolver => {\n resolver.apply(/* */);\n}); instead.')
115115
},
116116
context: {
117117
plugins: util.deprecate((hook, fn) => {
118118
this.resolverFactory.plugin("resolver context", resolver => {
119119
resolver.plugin(hook, fn);
120120
});
121-
}, "webpack: Using compiler.resolvers.context is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver context", resolver => {\n resolver.plugin(/* ... */);\n}); instead.'),
121+
}, "webpack: Using compiler.resolvers.context is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver context", resolver => {\n resolver.plugin(/* */);\n}); instead.'),
122122
apply: util.deprecate((...args) => {
123123
this.resolverFactory.plugin("resolver context", resolver => {
124124
resolver.apply(...args);
125125
});
126-
}, "webpack: Using compiler.resolvers.context is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver context", resolver => {\n resolver.apply(/* ... */);\n}); instead.')
126+
}, "webpack: Using compiler.resolvers.context is deprecated.\n" + 'Use compiler.resolverFactory.plugin("resolver context", resolver => {\n resolver.apply(/* */);\n}); instead.')
127127
}
128128
};
129129

lib/JavascriptGenerator.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ class JavascriptGenerator {
8383
* we can not inject "foo" twice, therefore we just make two IIFEs like so:
8484
* (function(foo, bar, baz){
8585
* (function(foo, some, more){
86-
* ...
87-
* }(...));
88-
* }(...));
86+
*
87+
* }());
88+
* }());
8989
*
9090
* "splitVariablesInUniqueNamedChunks" splits the variables shown above up to this:
9191
* [[foo, bar, baz], [foo, some, more]]
@@ -177,8 +177,8 @@ class JavascriptGenerator {
177177

178178
/*
179179
* creates the start part of a IIFE around the module to inject a variable name
180-
* (function(...){ <- this part
181-
* }.call(...))
180+
* (function(){ <- this part
181+
* }.call())
182182
*/
183183
variableInjectionFunctionWrapperStartCode(varNames) {
184184
const args = varNames.join(", ");
@@ -194,8 +194,8 @@ class JavascriptGenerator {
194194

195195
/*
196196
* creates the end part of a IIFE around the module to inject a variable name
197-
* (function(...){
198-
* }.call(...)) <- this part
197+
* (function(){
198+
* }.call()) <- this part
199199
*/
200200
variableInjectionFunctionWrapperEndCode(module, varExpressions, block) {
201201
const firstParam = this.contextArgument(module, block);

lib/Parser.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,7 @@ class Parser extends Tapable {
16511651
expression.arguments &&
16521652
expression.arguments.length > 0
16531653
) {
1654-
// (function(...) { }.call/bind(?, ...))
1654+
// (function() { }.call/bind(?, ))
16551655
walkIIFE.call(
16561656
this,
16571657
expression.callee.object,
@@ -1662,7 +1662,7 @@ class Parser extends Tapable {
16621662
expression.callee.type === "FunctionExpression" &&
16631663
expression.arguments
16641664
) {
1665-
// (function(...) { }(...))
1665+
// (function() { }())
16661666
walkIIFE.call(this, expression.callee, expression.arguments);
16671667
} else if (expression.callee.type === "Import") {
16681668
result = this.hooks.importCall.call(expression);

lib/ProgressPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const createDefaultHandler = profile => {
2424
for (let detail of details) {
2525
if (!detail) continue;
2626
if (detail.length > 40) {
27-
detail = `...${detail.substr(detail.length - 37)}`;
27+
detail = `${detail.substr(detail.length - 39)}`;
2828
}
2929
msg += ` ${detail}`;
3030
}

lib/Template.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ module.exports = class Template {
118118
if (minId > module.id) minId = module.id;
119119
}
120120
if (minId < 16 + ("" + minId).length) {
121-
// add minId x ',' instead of 'Array(minId).concat(...)'
121+
// add minId x ',' instead of 'Array(minId).concat()'
122122
minId = 0;
123123
}
124124
var objectOverhead = modules

lib/WebpackOptionsValidationError.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ class WebpackOptionsValidationError extends WebpackError {
116116
if (!required.includes(property)) return property + "?";
117117
return property;
118118
})
119-
.concat(schema.additionalProperties ? ["..."] : [])
119+
.concat(schema.additionalProperties ? [""] : [])
120120
.join(", ")} }`;
121121
}
122122
if (schema.additionalProperties) {
@@ -175,7 +175,7 @@ class WebpackOptionsValidationError extends WebpackError {
175175
" new webpack.LoaderOptionsPlugin({\n" +
176176
" // test: /\\.xxx$/, // may apply this only for some modules\n" +
177177
" options: {\n" +
178-
` ${err.params.additionalProperty}: ...\n` +
178+
` ${err.params.additionalProperty}: \n` +
179179
" }\n" +
180180
" })\n" +
181181
" ]"

lib/dependencies/AMDDefineDependencyParserPlugin.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ class AMDDefineDependencyParserPlugin {
152152
switch (expr.arguments.length) {
153153
case 1:
154154
if (isCallable(expr.arguments[0])) {
155-
// define(f() {...})
155+
// define(f() {})
156156
fn = expr.arguments[0];
157157
} else if (expr.arguments[0].type === "ObjectExpression") {
158-
// define({...})
158+
// define({})
159159
obj = expr.arguments[0];
160160
} else {
161161
// define(expr)
@@ -166,45 +166,45 @@ class AMDDefineDependencyParserPlugin {
166166
case 2:
167167
if (expr.arguments[0].type === "Literal") {
168168
namedModule = expr.arguments[0].value;
169-
// define("...", ...)
169+
// define("", )
170170
if (isCallable(expr.arguments[1])) {
171-
// define("...", f() {...})
171+
// define("", f() {})
172172
fn = expr.arguments[1];
173173
} else if (expr.arguments[1].type === "ObjectExpression") {
174-
// define("...", {...})
174+
// define("", {})
175175
obj = expr.arguments[1];
176176
} else {
177-
// define("...", expr)
177+
// define("", expr)
178178
// unclear if function or object
179179
obj = fn = expr.arguments[1];
180180
}
181181
} else {
182182
array = expr.arguments[0];
183183
if (isCallable(expr.arguments[1])) {
184-
// define([...], f() {})
184+
// define([], f() {})
185185
fn = expr.arguments[1];
186186
} else if (expr.arguments[1].type === "ObjectExpression") {
187-
// define([...], {...})
187+
// define([], {})
188188
obj = expr.arguments[1];
189189
} else {
190-
// define([...], expr)
190+
// define([], expr)
191191
// unclear if function or object
192192
obj = fn = expr.arguments[1];
193193
}
194194
}
195195
break;
196196
case 3:
197-
// define("...", [...], f() {...})
197+
// define("", [], f() {})
198198
namedModule = expr.arguments[0].value;
199199
array = expr.arguments[1];
200200
if (isCallable(expr.arguments[2])) {
201-
// define("...", [...], f() {})
201+
// define("", [], f() {})
202202
fn = expr.arguments[2];
203203
} else if (expr.arguments[2].type === "ObjectExpression") {
204-
// define("...", [...], {...})
204+
// define("", [], {})
205205
obj = expr.arguments[2];
206206
} else {
207-
// define("...", [...], expr)
207+
// define("", [], expr)
208208
// unclear if function or object
209209
obj = fn = expr.arguments[2];
210210
}

lib/dependencies/AMDRequireDependenciesBlockParserPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ class AMDRequireDependenciesBlockParserPlugin {
216216
parser.state.module.errors.push(
217217
new UnsupportedFeatureWarning(
218218
parser.state.module,
219-
"Cannot statically analyse 'require(..., ...)' in line " +
219+
"Cannot statically analyse 'require(…, …)' in line " +
220220
expr.loc.start.line
221221
)
222222
);

test/Validation.test.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ describe("Validation", () => {
210210
" new webpack.LoaderOptionsPlugin({",
211211
" // test: /\\.xxx$/, // may apply this only for some modules",
212212
" options: {",
213-
" postcss: ...",
213+
" postcss: ",
214214
" }",
215215
" })",
216216
" ]"
@@ -297,7 +297,7 @@ describe("Validation", () => {
297297
},
298298
message: [
299299
" - configuration.plugins[0] should be one of these:",
300-
" object { apply, ... } | function",
300+
" object { apply, } | function",
301301
" -> Plugin of type object or instanceof Function",
302302
" Details:",
303303
" * configuration.plugins[0] should be an object.",
@@ -314,7 +314,7 @@ describe("Validation", () => {
314314
},
315315
message: [
316316
" - configuration.plugins[0] should be one of these:",
317-
" object { apply, ... } | function",
317+
" object { apply, } | function",
318318
" -> Plugin of type object or instanceof Function",
319319
" Details:",
320320
" * configuration.plugins[0] should be an object.",
@@ -331,7 +331,7 @@ describe("Validation", () => {
331331
},
332332
message: [
333333
" - configuration.plugins[0] should be one of these:",
334-
" object { apply, ... } | function",
334+
" object { apply, } | function",
335335
" -> Plugin of type object or instanceof Function",
336336
" Details:",
337337
" * configuration.plugins[0] should be an object.",
@@ -348,7 +348,7 @@ describe("Validation", () => {
348348
},
349349
message: [
350350
" - configuration.plugins[0] should be one of these:",
351-
" object { apply, ... } | function",
351+
" object { apply, } | function",
352352
" -> Plugin of type object or instanceof Function",
353353
" Details:",
354354
" * configuration.plugins[0] should be an object.",
@@ -365,7 +365,7 @@ describe("Validation", () => {
365365
},
366366
message: [
367367
" - configuration.plugins[0] should be one of these:",
368-
" object { apply, ... } | function",
368+
" object { apply, } | function",
369369
" -> Plugin of type object or instanceof Function",
370370
" Details:",
371371
" * configuration.plugins[0] misses the property 'apply'.",

test/browsertest/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function join(a, b) {
2323
return a;
2424
}
2525

26-
console.log("compile scripts...");
26+
console.log("compile scripts");
2727

2828
var extraArgsNoWatch = extraArgs.slice(0);
2929
var watchIndex = extraArgsNoWatch.indexOf("--watch");

0 commit comments

Comments
 (0)