pretty files

This commit is contained in:
Tobias Koppers 2019-06-09 11:23:42 +02:00
bovenliggende 096c0f0027
commit fd4b3c503a
17 gewijzigde bestanden met toevoegingen van 33 en 95 verwijderingen

2
declarations.d.ts vendored
Bestand weergeven

@ -59,7 +59,7 @@ declare module "neo-async" {
}
export type AsyncAutoTasks<R extends Dictionary<any>, E> = {
[K in keyof R]: AsyncAutoTask<R[K], R, E>
[K in keyof R]: AsyncAutoTask<R[K], R, E>;
};
export type AsyncAutoTask<R1, R extends Dictionary<any>, E> =
| AsyncAutoTaskFunctionWithoutDependencies<R1, E>

Bestand weergeven

@ -496,18 +496,14 @@ class ChunkGroup {
for (const child of chunk._children) {
if (!child._parents.has(chunk)) {
throw new Error(
`checkConstraints: child missing parent ${chunk.debugId} -> ${
child.debugId
}`
`checkConstraints: child missing parent ${chunk.debugId} -> ${child.debugId}`
);
}
}
for (const parentChunk of chunk._parents) {
if (!parentChunk._children.has(chunk)) {
throw new Error(
`checkConstraints: parent missing child ${parentChunk.debugId} <- ${
chunk.debugId
}`
`checkConstraints: parent missing child ${parentChunk.debugId} <- ${chunk.debugId}`
);
}
}

Bestand weergeven

@ -694,9 +694,7 @@ class Compilation extends Tapable {
const factory = this.dependencyFactories.get(dep.constructor);
if (factory === undefined) {
throw new Error(
`No module factory available for dependency type: ${
dep.constructor.name
}`
`No module factory available for dependency type: ${dep.constructor.name}`
);
}
let innerMap = dependencies.get(factory);
@ -958,9 +956,7 @@ class Compilation extends Tapable {
const moduleFactory = this.dependencyFactories.get(Dep);
if (!moduleFactory) {
throw new Error(
`No dependency factory available for this dependency type: ${
dependency.constructor.name
}`
`No dependency factory available for this dependency type: ${dependency.constructor.name}`
);
}

Bestand weergeven

@ -345,9 +345,7 @@ module.exports = class MainTemplate extends Tapable {
buf.push("");
buf.push("// Object.prototype.hasOwnProperty.call");
buf.push(
`${
this.requireFn
}.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };`
`${this.requireFn}.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };`
);
const publicPath = this.getPublicPath({

Bestand weergeven

@ -435,9 +435,7 @@ class NormalModuleFactory extends Tapable {
err.message +
"\n" +
"BREAKING CHANGE: It's no longer allowed to omit the '-loader' suffix when using loaders.\n" +
` You need to specify '${
item.loader
}-loader' instead of '${item.loader}',\n` +
` You need to specify '${item.loader}-loader' instead of '${item.loader}',\n` +
" see https://webpack.js.org/migrate/3/#automatic-loader-module-name-extension-removed";
}
callback(err);

Bestand weergeven

@ -382,9 +382,7 @@ class HarmonyExportImportedSpecifierDependency extends HarmonyImportDependency {
// We are sure that it's not provided
const idIsNotNameMessage =
this._id !== this.name ? ` (reexported as '${this.name}')` : "";
const errorMessage = `"export '${
this._id
}'${idIsNotNameMessage} was not found in '${this.userRequest}'`;
const errorMessage = `"export '${this._id}'${idIsNotNameMessage} was not found in '${this.userRequest}'`;
return [new HarmonyLinkingError(errorMessage)];
}

Bestand weergeven

@ -107,9 +107,7 @@ class HarmonyImportSpecifierDependency extends HarmonyImportDependency {
// We are sure that it's not provided
const idIsNotNameMessage =
this._id !== this.name ? ` (imported as '${this.name}')` : "";
const errorMessage = `"export '${
this._id
}'${idIsNotNameMessage} was not found in '${this.userRequest}'`;
const errorMessage = `"export '${this._id}'${idIsNotNameMessage} was not found in '${this.userRequest}'`;
return [new HarmonyLinkingError(errorMessage)];
}

Bestand weergeven

@ -43,9 +43,7 @@ class ImportParserPlugin {
const { comment } = e;
parser.state.module.warnings.push(
new CommentCompilationWarning(
`Compilation error while processing magic comment(-s): /*${
comment.value
}*/: ${e.message}`,
`Compilation error while processing magic comment(-s): /*${comment.value}*/: ${e.message}`,
parser.state.module,
comment.loc
)
@ -59,9 +57,7 @@ class ImportParserPlugin {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
`\`webpackIgnore\` expected a boolean, but received: ${
importOptions.webpackIgnore
}.`,
`\`webpackIgnore\` expected a boolean, but received: ${importOptions.webpackIgnore}.`,
expr.loc
)
);
@ -77,9 +73,7 @@ class ImportParserPlugin {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
`\`webpackChunkName\` expected a string, but received: ${
importOptions.webpackChunkName
}.`,
`\`webpackChunkName\` expected a string, but received: ${importOptions.webpackChunkName}.`,
expr.loc
)
);
@ -92,9 +86,7 @@ class ImportParserPlugin {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
`\`webpackMode\` expected a string, but received: ${
importOptions.webpackMode
}.`,
`\`webpackMode\` expected a string, but received: ${importOptions.webpackMode}.`,
expr.loc
)
);
@ -111,9 +103,7 @@ class ImportParserPlugin {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
`\`webpackPrefetch\` expected true or a number, but received: ${
importOptions.webpackPrefetch
}.`,
`\`webpackPrefetch\` expected true or a number, but received: ${importOptions.webpackPrefetch}.`,
expr.loc
)
);
@ -128,9 +118,7 @@ class ImportParserPlugin {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
`\`webpackPreload\` expected true or a number, but received: ${
importOptions.webpackPreload
}.`,
`\`webpackPreload\` expected true or a number, but received: ${importOptions.webpackPreload}.`,
expr.loc
)
);
@ -144,9 +132,7 @@ class ImportParserPlugin {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
`\`webpackInclude\` expected a regular expression, but received: ${
importOptions.webpackInclude
}.`,
`\`webpackInclude\` expected a regular expression, but received: ${importOptions.webpackInclude}.`,
expr.loc
)
);
@ -162,9 +148,7 @@ class ImportParserPlugin {
parser.state.module.warnings.push(
new UnsupportedFeatureWarning(
parser.state.module,
`\`webpackExclude\` expected a regular expression, but received: ${
importOptions.webpackExclude
}.`,
`\`webpackExclude\` expected a regular expression, but received: ${importOptions.webpackExclude}.`,
expr.loc
)
);

Bestand weergeven

@ -49,9 +49,7 @@ class LoaderPlugin {
if (factory === undefined) {
return callback(
new Error(
`No module factory available for dependency type: ${
dep.constructor.name
}`
`No module factory available for dependency type: ${dep.constructor.name}`
)
);
}

Bestand weergeven

@ -40,9 +40,7 @@ class WebAssemblyImportDependency extends ModuleDependency {
) {
return [
new UnsupportedWebAssemblyFeatureError(
`Import "${this.name}" from "${this.request}" with ${
this.onlyDirectImport
} can only be used for direct wasm to wasm dependencies`
`Import "${this.name}" from "${this.request}" with ${this.onlyDirectImport} can only be used for direct wasm to wasm dependencies`
)
];
}

Bestand weergeven

@ -26,9 +26,7 @@ class ChunkModuleIdRangePlugin {
);
if (!chunk) {
throw new Error(
`ChunkModuleIdRangePlugin: Chunk with name '${
options.name
}"' was not found`
`ChunkModuleIdRangePlugin: Chunk with name '${options.name}"' was not found`
);
}

Bestand weergeven

@ -1136,23 +1136,17 @@ class ConcatenatedModule extends Module {
if (info.interopNamespaceObjectUsed) {
if (info.module.buildMeta.exportsType === "named") {
result.add(
`var ${
info.interopNamespaceObjectName
} = /*#__PURE__*/__webpack_require__.t(${info.name}, 2);\n`
`var ${info.interopNamespaceObjectName} = /*#__PURE__*/__webpack_require__.t(${info.name}, 2);\n`
);
} else if (!info.module.buildMeta.exportsType) {
result.add(
`var ${
info.interopNamespaceObjectName
} = /*#__PURE__*/__webpack_require__.t(${info.name});\n`
`var ${info.interopNamespaceObjectName} = /*#__PURE__*/__webpack_require__.t(${info.name});\n`
);
}
}
if (info.interopDefaultAccessUsed) {
result.add(
`var ${
info.interopDefaultAccessName
} = /*#__PURE__*/__webpack_require__.n(${info.name});\n`
`var ${info.interopDefaultAccessName} = /*#__PURE__*/__webpack_require__.n(${info.name});\n`
);
}
break;
@ -1266,9 +1260,7 @@ class HarmonyImportSpecifierDependencyConcatenatedTemplate {
}_ns${strictFlag}__[${JSON.stringify(dep._id)}]`;
} else {
const exportData = Buffer.from(dep._id, "utf-8").toString("hex");
content = `__WEBPACK_MODULE_REFERENCE__${
info.index
}_${exportData}${callFlag}${strictFlag}__`;
content = `__WEBPACK_MODULE_REFERENCE__${info.index}_${exportData}${callFlag}${strictFlag}__`;
}
if (dep.shorthand) {
content = dep.name + ": " + content;
@ -1464,14 +1456,10 @@ class HarmonyExportImportedSpecifierDependencyConcatenatedTemplate {
? "_strict"
: "";
if (def.id === true) {
finalName = `__WEBPACK_MODULE_REFERENCE__${
info.index
}_ns${strictFlag}__`;
finalName = `__WEBPACK_MODULE_REFERENCE__${info.index}_ns${strictFlag}__`;
} else {
const exportData = Buffer.from(def.id, "utf-8").toString("hex");
finalName = `__WEBPACK_MODULE_REFERENCE__${
info.index
}_${exportData}${strictFlag}__`;
finalName = `__WEBPACK_MODULE_REFERENCE__${info.index}_${exportData}${strictFlag}__`;
}
const exportsName = this.rootModule.exportsArgument;
const content =

Bestand weergeven

@ -46,9 +46,7 @@ class WasmFinalizeExportsPlugin {
// 4. error
/** @type {any} */
const error = new UnsupportedWebAssemblyFeatureError(
`Export "${name}" with ${
jsIncompatibleExports[name]
} can only be used for direct wasm to wasm dependencies`
`Export "${name}" with ${jsIncompatibleExports[name]} can only be used for direct wasm to wasm dependencies`
);
error.module = module;
error.origin = reason.module;

Bestand weergeven

@ -307,9 +307,7 @@ class WasmMainTemplatePlugin {
"}",
"promises.push(installedWasmModules[wasmModuleId] = promise.then(function(res) {",
Template.indent([
`return ${
mainTemplate.requireFn
}.w[wasmModuleId] = (res.instance || res).exports;`
`return ${mainTemplate.requireFn}.w[wasmModuleId] = (res.instance || res).exports;`
]),
"}));"
]),

Bestand weergeven

@ -340,9 +340,7 @@ class JsonpMainTemplatePlugin {
source,
"",
"// on error function for async loading",
`${
mainTemplate.requireFn
}.oe = function(err) { console.error(err); throw err; };`
`${mainTemplate.requireFn}.oe = function(err) { console.error(err); throw err; };`
]);
}
);

Bestand weergeven

@ -505,7 +505,7 @@ rules:
context: "licence/cla"
description: "Contributor License Agreement is not needed for this user."
state: "success"
# merge dependabot PRs automatically
- filters:
open: true

Bestand weergeven

@ -279,9 +279,7 @@ describe("BenchmarkTestCases", function() {
describe(`${testName} create benchmarks`, function() {
baselines.forEach(baseline => {
let baselineStats = null;
it(`should benchmark ${baseline.name} (${
baseline.rev
})`, function(done) {
it(`should benchmark ${baseline.name} (${baseline.rev})`, function(done) {
const outputDirectory = path.join(
__dirname,
"js",
@ -332,14 +330,10 @@ describe("BenchmarkTestCases", function() {
}, 180000);
if (baseline.name !== "HEAD") {
it(`HEAD should not be slower than ${baseline.name} (${
baseline.rev
})`, function() {
it(`HEAD should not be slower than ${baseline.name} (${baseline.rev})`, function() {
if (baselineStats.maxConfidence < headStats.minConfidence) {
throw new Error(
`HEAD (${headStats.text}) is slower than ${baseline.name} (${
baselineStats.text
}) (90% confidence)`
`HEAD (${headStats.text}) is slower than ${baseline.name} (${baselineStats.text}) (90% confidence)`
);
} else if (
baselineStats.minConfidence > headStats.maxConfidence