mirror of https://github.com/webpack/webpack.git
chore: no `object-shorthand` for tests
This commit is contained in:
parent
e333fe9adf
commit
9e6984056b
|
@ -415,7 +415,6 @@ export default defineConfig([
|
|||
"jest/expect-expect": "off",
|
||||
"jest/no-conditional-expect": "off",
|
||||
"no-console": "off",
|
||||
"object-shorthand": "off",
|
||||
camelcase: "off",
|
||||
"jsdoc/require-jsdoc": "off",
|
||||
"n/no-unsupported-features/es-syntax": [
|
||||
|
|
|
@ -59,7 +59,7 @@ it("can place banner as footer", done => {
|
|||
const compiler = webpack({
|
||||
mode: "development",
|
||||
entry: {
|
||||
footerFile: footerFile
|
||||
footerFile
|
||||
},
|
||||
output: {
|
||||
path: outputDir
|
||||
|
|
|
@ -125,7 +125,7 @@ function runBenchmark(webpack, config, callback) {
|
|||
maxTime: 30,
|
||||
defer: true,
|
||||
initCount: 1,
|
||||
onComplete: function () {
|
||||
onComplete() {
|
||||
const stats = bench.stats;
|
||||
const n = stats.sample.length;
|
||||
const nSqrt = Math.sqrt(n);
|
||||
|
|
|
@ -116,8 +116,8 @@ describe("Compiler (caching)", () => {
|
|||
fixtureCount++;
|
||||
return {
|
||||
rootPath: fixturePath,
|
||||
aFilepath: aFilepath,
|
||||
cFilepath: cFilepath
|
||||
aFilepath,
|
||||
cFilepath
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -194,8 +194,8 @@ describe("Compiler (filesystem caching)", () => {
|
|||
fixtureCount++;
|
||||
return {
|
||||
rootPath: fixturePath,
|
||||
usesAssetFilepath: usesAssetFilepath,
|
||||
svgFilepath: svgFilepath
|
||||
usesAssetFilepath,
|
||||
svgFilepath
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ const describeCases = config => {
|
|||
}
|
||||
}
|
||||
testConfig = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const ext = path.extname(
|
||||
parseResource(options.output.filename).path
|
||||
);
|
||||
|
@ -422,10 +422,10 @@ const describeCases = config => {
|
|||
filesCount++;
|
||||
const document = new FakeDocument(outputDirectory);
|
||||
const globalContext = {
|
||||
console: console,
|
||||
expect: expect,
|
||||
setTimeout: setTimeout,
|
||||
clearTimeout: clearTimeout,
|
||||
console,
|
||||
expect,
|
||||
setTimeout,
|
||||
clearTimeout,
|
||||
document,
|
||||
getComputedStyle:
|
||||
document.getComputedStyle.bind(document),
|
||||
|
@ -442,7 +442,7 @@ const describeCases = config => {
|
|||
const esmCache = new Map();
|
||||
const esmIdentifier = `${category.name}-${testName}-${i}`;
|
||||
const baseModuleScope = {
|
||||
console: console,
|
||||
console,
|
||||
it: _it,
|
||||
beforeEach: _beforeEach,
|
||||
afterEach: _afterEach,
|
||||
|
|
|
@ -7,7 +7,7 @@ describe("Profiling Plugin", () => {
|
|||
it("should persist the passed output path", () => {
|
||||
const outputPath = path.join(__dirname, "invest_in_doge_coin");
|
||||
const plugin = new ProfilingPlugin({
|
||||
outputPath: outputPath
|
||||
outputPath
|
||||
});
|
||||
expect(plugin.outputPath).toBe(outputPath);
|
||||
});
|
||||
|
|
|
@ -421,7 +421,7 @@ const describeCases = config => {
|
|||
Buffer,
|
||||
setTimeout,
|
||||
setImmediate,
|
||||
nsObj: function (m) {
|
||||
nsObj(m) {
|
||||
Object.defineProperty(m, Symbol.toStringTag, {
|
||||
value: "Module"
|
||||
});
|
||||
|
|
|
@ -261,8 +261,8 @@ const describeCases = config => {
|
|||
return;
|
||||
|
||||
const globalContext = {
|
||||
console: console,
|
||||
expect: expect,
|
||||
console,
|
||||
expect,
|
||||
setTimeout,
|
||||
clearTimeout,
|
||||
document: new FakeDocument()
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const ext = options.output.module ? "mjs" : "js";
|
||||
|
||||
switch (i % 4) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["test.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["entryA.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["a.js", "b.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["a.js", "b.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["main.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["main.js", "A.js", "shared.js", "B.js", "B-2.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["entry1.js", "entry2.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["entry1.js", "entry2.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["runtime.js", "common-index_js.js", "main.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return i === 0 ? "./main.js" : "./module/main.mjs";
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return i === 0 ? "./main.js" : "./module/main.mjs";
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return i === 0 ? "./main.js" : "./module/main.mjs";
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return i === 0 ? "./main.js" : "./module/main.mjs";
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return i === 0 ? "./main.js" : "./module/main.mjs";
|
||||
}
|
||||
};
|
||||
|
|
|
@ -4,7 +4,7 @@ const allAssets = new Set();
|
|||
const allBundles = new Set();
|
||||
|
||||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0];
|
||||
allBundles.add(/\.([^.]+)\./.exec(bundle)[1]);
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ const allCss = new Set();
|
|||
const allBundles = new Set();
|
||||
|
||||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0];
|
||||
const async = findOutputFiles(options, /\.js/, `css${i}`);
|
||||
allBundles.add(/\.([^.]+)\./.exec(bundle)[1]);
|
||||
|
|
|
@ -4,7 +4,7 @@ const allFilenameHashes = new Set();
|
|||
const allChunkHashes = new Set();
|
||||
|
||||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const filename = findOutputFiles(options, new RegExp(`^bundle${i}`))[0];
|
||||
const filenameHash = /\.([a-f0-9]+)\.js$/.exec(filename)[1];
|
||||
allFilenameHashes.add(filenameHash);
|
||||
|
|
|
@ -4,7 +4,7 @@ const allAssets = new Set();
|
|||
const allBundles = new Set();
|
||||
|
||||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0];
|
||||
|
||||
allBundles.add(/\.([^.]+)\./.exec(bundle)[1]);
|
||||
|
|
|
@ -4,7 +4,7 @@ const allAssets = new Set();
|
|||
const allBundles = new Set();
|
||||
|
||||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0];
|
||||
allBundles.add(/\.([^.]+)\./.exec(bundle)[1]);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["style_css.bundle0.js", "bundle0.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["style2_css.bundle0.js", "bundle0.js"];
|
||||
},
|
||||
moduleScope(scope) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["style2_css.bundle0.js", "bundle0.js"];
|
||||
},
|
||||
moduleScope(scope) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["css.bundle0.js", "lazy4_js.bundle0.js", "bundle0.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const findOutputFiles = require("../../../helpers/findOutputFiles");
|
||||
|
||||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const async1 = findOutputFiles(options, /^async.async_js.+.js/)[0];
|
||||
const async2 = findOutputFiles(options, /^async.async_css.+.js/)[0];
|
||||
const bundle = findOutputFiles(options, /^bundle.+.js/)[0];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return i === 0
|
||||
? ["./use-style_js.bundle0.js", "./bundle0.js"]
|
||||
: ["./142.bundle1.js", "./bundle1.js"];
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["bundle0.js"];
|
||||
},
|
||||
moduleScope(scope) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return [
|
||||
`style_module_css_as-is.bundle${i}.js`,
|
||||
`style_module_css_camel-case.bundle${i}.js`,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return [
|
||||
"pseudo-export_style_module_css.bundle0.js",
|
||||
"pseudo-export_style_module_css_module.bundle0.js",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["125.bundle0.js", "bundle0.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return [
|
||||
`style_module_css.bundle${i}.js`,
|
||||
`style_module_css_hash.bundle${i}.js`,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i) {
|
||||
findBundle(i) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
return ["test.js"];
|
||||
|
|
|
@ -8,7 +8,7 @@ module.exports = {
|
|||
link.href = "bundle0.css";
|
||||
scope.window.document.head.appendChild(link);
|
||||
},
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const source = fs.readFileSync(
|
||||
path.resolve(options.output.path, "bundle0.css"),
|
||||
"utf-8"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["reexport_modules_css.bundle0.js", "bundle0.js"];
|
||||
},
|
||||
moduleScope(scope) {
|
||||
|
|
|
@ -9,7 +9,7 @@ module.exports = {
|
|||
link2.href = "asyncChunk2_js.css";
|
||||
scope.window.document.head.appendChild(link2);
|
||||
},
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return [
|
||||
"./common-share_js-img_png.js",
|
||||
"./asyncChunk_js.js",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return [`index_css.bundle${i}.js`, `bundle${i}.js`];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./runtime~main.js", "./main.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return [
|
||||
"./app.js",
|
||||
"./runtime.js",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./other-vendors.js", "./page1.js", "./app.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./runtime.js", "./a.js", "./b.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./app.js", "./react-vendors.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./a.js", "./b.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./a.js", "./b.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./a.js", "./b.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./runtime.js", "./app.js", "./home.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -10,7 +10,7 @@ module.exports = {
|
|||
afterExecute: () => {
|
||||
System.execute("(anonym)");
|
||||
},
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./main.system.js", "./main.umd.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["./a.js", "./b.js", "./c.js", "./runtime.js", "./d.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return [
|
||||
`./${options.target}/folder/entry/-x/file.js`,
|
||||
`./${options.target}/folder/x-/-x/file.js`,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return [
|
||||
`../weird-names2-out/entry/entry-${options.target}.js`,
|
||||
`../weird-names2-out/entry-${options.target}.js`
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const findOutputFiles = require("../../../helpers/findOutputFiles");
|
||||
|
||||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const files = findOutputFiles(options, new RegExp(/\.js$/));
|
||||
|
||||
return files.sort((a, b) => (a.startsWith("main") ? 1 : 0));
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./a.js", "./b.js", "./bundle0.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["./common.js", "./main.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["11.js", "22.js", "aa.js", "bbb.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
module.exports = {
|
||||
mode: "development",
|
||||
output: {
|
||||
devtoolModuleFilenameTemplate: function (info) {
|
||||
devtoolModuleFilenameTemplate(info) {
|
||||
return `dummy:///${info.resourcePath}`;
|
||||
}
|
||||
},
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return [
|
||||
"shared.js",
|
||||
"a.js",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["shared.js", "a.js", "b.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return [
|
||||
"shared.js",
|
||||
"a.js",
|
||||
|
|
|
@ -14,7 +14,7 @@ const verifyFilenameLength = (filename, expectedNameLength) => {
|
|||
};
|
||||
|
||||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const files = fs.readdirSync(options.output.path);
|
||||
const bundleDetects = [
|
||||
options.amd.expectedChunkFilenameLength && {
|
||||
|
|
|
@ -2,7 +2,7 @@ const fs = require("fs");
|
|||
|
||||
module.exports = {
|
||||
noTests: true,
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
const regex = new RegExp(`^bundle.${options.name}`, "i");
|
||||
const files = fs.readdirSync(options.output.path);
|
||||
const bundle = files.find(function (file) {
|
||||
|
|
|
@ -9,7 +9,7 @@ module.exports = {
|
|||
dark.href = "dark.css";
|
||||
scope.window.document.head.appendChild(dark);
|
||||
},
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./runtime.js", "./light.js", "./dark.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./light.js", "./dark.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./common.js", "./free.js", "./paid.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./free.js", "./paid.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["main.mjs"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./runtime~main.js", "./main.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -9,7 +9,7 @@ module.exports = {
|
|||
{
|
||||
loader: "./loader2",
|
||||
options: {
|
||||
f: function () {
|
||||
f() {
|
||||
return "ok";
|
||||
}
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ module.exports = {
|
|||
use: {
|
||||
loader: "./loader2",
|
||||
options: {
|
||||
f: function () {
|
||||
f() {
|
||||
return "maybe";
|
||||
}
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ module.exports = {
|
|||
use: {
|
||||
loader: "./loader2",
|
||||
options: {
|
||||
f: function () {
|
||||
f() {
|
||||
return "yes";
|
||||
}
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ module.exports = {
|
|||
{
|
||||
loader: "./loader2",
|
||||
options: {
|
||||
f: function () {
|
||||
f() {
|
||||
return "ok";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ module.exports = {
|
|||
loader: "./loader2",
|
||||
ident: "loader2",
|
||||
options: {
|
||||
f: function () {
|
||||
f() {
|
||||
return "ok";
|
||||
}
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ module.exports = {
|
|||
{
|
||||
loader: "./loader2",
|
||||
options: {
|
||||
f: function () {
|
||||
f() {
|
||||
return "ok";
|
||||
}
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ module.exports = {
|
|||
test: /c\.js$/,
|
||||
loader: "./loader2",
|
||||
options: {
|
||||
f: function () {
|
||||
f() {
|
||||
return "ok";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./deterministic.js", "./size.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return "./main.mjs";
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./runtime.mjs", "./main.mjs"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./runtime.mjs", "./separate.mjs", "./main.mjs"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/** @type {import("../../../../").Configuration} */
|
||||
module.exports = {
|
||||
module: {
|
||||
noParse: function (content) {
|
||||
noParse(content) {
|
||||
return /not-parsed/.test(content);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./a.js", "./b.js", "./runtime-c.js", "./c.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./a.js", "./b.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./a.js", "./b.js", "./c.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return [
|
||||
"module-avoidEntryIife-false.mjs",
|
||||
"module-avoidEntryIife-true.mjs",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["test.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["bundle0.mjs", "test.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return ["main.mjs", "vendor.mjs", "runtime.mjs"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
switch (i) {
|
||||
case 2:
|
||||
case 6:
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["runtime.mjs", "main.mjs"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./a.js", "./b.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./a.js", "./inner-dir/b.js", "./inner-dir/deep/deep/c.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./index.mjs"];
|
||||
},
|
||||
moduleScope(scope) {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./inner1/inner2/a.js", "./b.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./a.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function () {
|
||||
findBundle() {
|
||||
return ["./main.js"];
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
moduleScope: function (scope) {
|
||||
moduleScope(scope) {
|
||||
delete scope.__dirname;
|
||||
delete scope.__filename;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
moduleScope: function (scope) {
|
||||
moduleScope(scope) {
|
||||
delete scope.__dirname;
|
||||
delete scope.__filename;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
module.exports = {
|
||||
findBundle: function (i, options) {
|
||||
findBundle(i, options) {
|
||||
return "./dist/banner.js";
|
||||
}
|
||||
};
|
||||
|
|
|
@ -20,6 +20,7 @@ module.exports = {
|
|||
NEGATIVE_ZER0: -0,
|
||||
NEGATIVE_NUMBER: -100.25,
|
||||
POSITIVE_NUMBER: +100.25,
|
||||
// eslint-disable-next-line object-shorthand
|
||||
FUNCTION: /* istanbul ignore next */ function (a) {
|
||||
return a + 1;
|
||||
},
|
||||
|
@ -28,6 +29,7 @@ module.exports = {
|
|||
OBJECT: {
|
||||
SUB: {
|
||||
UNDEFINED: undefined,
|
||||
// eslint-disable-next-line object-shorthand
|
||||
FUNCTION: /* istanbul ignore next */ function (a) {
|
||||
return a + 1;
|
||||
},
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue