chore: no `object-shorthand` for tests

This commit is contained in:
alexander-akait 2025-04-22 14:09:25 +03:00
parent e333fe9adf
commit 9e6984056b
175 changed files with 189 additions and 187 deletions

View File

@ -415,7 +415,6 @@ export default defineConfig([
"jest/expect-expect": "off", "jest/expect-expect": "off",
"jest/no-conditional-expect": "off", "jest/no-conditional-expect": "off",
"no-console": "off", "no-console": "off",
"object-shorthand": "off",
camelcase: "off", camelcase: "off",
"jsdoc/require-jsdoc": "off", "jsdoc/require-jsdoc": "off",
"n/no-unsupported-features/es-syntax": [ "n/no-unsupported-features/es-syntax": [

View File

@ -59,7 +59,7 @@ it("can place banner as footer", done => {
const compiler = webpack({ const compiler = webpack({
mode: "development", mode: "development",
entry: { entry: {
footerFile: footerFile footerFile
}, },
output: { output: {
path: outputDir path: outputDir

View File

@ -125,7 +125,7 @@ function runBenchmark(webpack, config, callback) {
maxTime: 30, maxTime: 30,
defer: true, defer: true,
initCount: 1, initCount: 1,
onComplete: function () { onComplete() {
const stats = bench.stats; const stats = bench.stats;
const n = stats.sample.length; const n = stats.sample.length;
const nSqrt = Math.sqrt(n); const nSqrt = Math.sqrt(n);

View File

@ -116,8 +116,8 @@ describe("Compiler (caching)", () => {
fixtureCount++; fixtureCount++;
return { return {
rootPath: fixturePath, rootPath: fixturePath,
aFilepath: aFilepath, aFilepath,
cFilepath: cFilepath cFilepath
}; };
} }

View File

@ -194,8 +194,8 @@ describe("Compiler (filesystem caching)", () => {
fixtureCount++; fixtureCount++;
return { return {
rootPath: fixturePath, rootPath: fixturePath,
usesAssetFilepath: usesAssetFilepath, usesAssetFilepath,
svgFilepath: svgFilepath svgFilepath
}; };
} }

View File

@ -138,7 +138,7 @@ const describeCases = config => {
} }
} }
testConfig = { testConfig = {
findBundle: function (i, options) { findBundle(i, options) {
const ext = path.extname( const ext = path.extname(
parseResource(options.output.filename).path parseResource(options.output.filename).path
); );
@ -422,10 +422,10 @@ const describeCases = config => {
filesCount++; filesCount++;
const document = new FakeDocument(outputDirectory); const document = new FakeDocument(outputDirectory);
const globalContext = { const globalContext = {
console: console, console,
expect: expect, expect,
setTimeout: setTimeout, setTimeout,
clearTimeout: clearTimeout, clearTimeout,
document, document,
getComputedStyle: getComputedStyle:
document.getComputedStyle.bind(document), document.getComputedStyle.bind(document),
@ -442,7 +442,7 @@ const describeCases = config => {
const esmCache = new Map(); const esmCache = new Map();
const esmIdentifier = `${category.name}-${testName}-${i}`; const esmIdentifier = `${category.name}-${testName}-${i}`;
const baseModuleScope = { const baseModuleScope = {
console: console, console,
it: _it, it: _it,
beforeEach: _beforeEach, beforeEach: _beforeEach,
afterEach: _afterEach, afterEach: _afterEach,

View File

@ -7,7 +7,7 @@ describe("Profiling Plugin", () => {
it("should persist the passed output path", () => { it("should persist the passed output path", () => {
const outputPath = path.join(__dirname, "invest_in_doge_coin"); const outputPath = path.join(__dirname, "invest_in_doge_coin");
const plugin = new ProfilingPlugin({ const plugin = new ProfilingPlugin({
outputPath: outputPath outputPath
}); });
expect(plugin.outputPath).toBe(outputPath); expect(plugin.outputPath).toBe(outputPath);
}); });

View File

@ -421,7 +421,7 @@ const describeCases = config => {
Buffer, Buffer,
setTimeout, setTimeout,
setImmediate, setImmediate,
nsObj: function (m) { nsObj(m) {
Object.defineProperty(m, Symbol.toStringTag, { Object.defineProperty(m, Symbol.toStringTag, {
value: "Module" value: "Module"
}); });

View File

@ -261,8 +261,8 @@ const describeCases = config => {
return; return;
const globalContext = { const globalContext = {
console: console, console,
expect: expect, expect,
setTimeout, setTimeout,
clearTimeout, clearTimeout,
document: new FakeDocument() document: new FakeDocument()

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
const ext = options.output.module ? "mjs" : "js"; const ext = options.output.module ? "mjs" : "js";
switch (i % 4) { switch (i % 4) {

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["test.js"]; return ["test.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["entryA.js"]; return ["entryA.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["a.js", "b.js"]; return ["a.js", "b.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["a.js", "b.js"]; return ["a.js", "b.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["main.js"]; return ["main.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["main.js", "A.js", "shared.js", "B.js", "B-2.js"]; return ["main.js", "A.js", "shared.js", "B.js", "B-2.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["entry1.js", "entry2.js"]; return ["entry1.js", "entry2.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["entry1.js", "entry2.js"]; return ["entry1.js", "entry2.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["runtime.js", "common-index_js.js", "main.js"]; return ["runtime.js", "common-index_js.js", "main.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return i === 0 ? "./main.js" : "./module/main.mjs"; return i === 0 ? "./main.js" : "./module/main.mjs";
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return i === 0 ? "./main.js" : "./module/main.mjs"; return i === 0 ? "./main.js" : "./module/main.mjs";
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return i === 0 ? "./main.js" : "./module/main.mjs"; return i === 0 ? "./main.js" : "./module/main.mjs";
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return i === 0 ? "./main.js" : "./module/main.mjs"; return i === 0 ? "./main.js" : "./module/main.mjs";
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return i === 0 ? "./main.js" : "./module/main.mjs"; return i === 0 ? "./main.js" : "./module/main.mjs";
} }
}; };

View File

@ -4,7 +4,7 @@ const allAssets = new Set();
const allBundles = new Set(); const allBundles = new Set();
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0]; const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0];
allBundles.add(/\.([^.]+)\./.exec(bundle)[1]); allBundles.add(/\.([^.]+)\./.exec(bundle)[1]);

View File

@ -4,7 +4,7 @@ const allCss = new Set();
const allBundles = new Set(); const allBundles = new Set();
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0]; const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0];
const async = findOutputFiles(options, /\.js/, `css${i}`); const async = findOutputFiles(options, /\.js/, `css${i}`);
allBundles.add(/\.([^.]+)\./.exec(bundle)[1]); allBundles.add(/\.([^.]+)\./.exec(bundle)[1]);

View File

@ -4,7 +4,7 @@ const allFilenameHashes = new Set();
const allChunkHashes = new Set(); const allChunkHashes = new Set();
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
const filename = findOutputFiles(options, new RegExp(`^bundle${i}`))[0]; const filename = findOutputFiles(options, new RegExp(`^bundle${i}`))[0];
const filenameHash = /\.([a-f0-9]+)\.js$/.exec(filename)[1]; const filenameHash = /\.([a-f0-9]+)\.js$/.exec(filename)[1];
allFilenameHashes.add(filenameHash); allFilenameHashes.add(filenameHash);

View File

@ -4,7 +4,7 @@ const allAssets = new Set();
const allBundles = new Set(); const allBundles = new Set();
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0]; const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0];
allBundles.add(/\.([^.]+)\./.exec(bundle)[1]); allBundles.add(/\.([^.]+)\./.exec(bundle)[1]);

View File

@ -4,7 +4,7 @@ const allAssets = new Set();
const allBundles = new Set(); const allBundles = new Set();
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0]; const bundle = findOutputFiles(options, new RegExp(`^bundle${i}`))[0];
allBundles.add(/\.([^.]+)\./.exec(bundle)[1]); allBundles.add(/\.([^.]+)\./.exec(bundle)[1]);

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["style_css.bundle0.js", "bundle0.js"]; return ["style_css.bundle0.js", "bundle0.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["style2_css.bundle0.js", "bundle0.js"]; return ["style2_css.bundle0.js", "bundle0.js"];
}, },
moduleScope(scope) { moduleScope(scope) {

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["style2_css.bundle0.js", "bundle0.js"]; return ["style2_css.bundle0.js", "bundle0.js"];
}, },
moduleScope(scope) { moduleScope(scope) {

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["css.bundle0.js", "lazy4_js.bundle0.js", "bundle0.js"]; return ["css.bundle0.js", "lazy4_js.bundle0.js", "bundle0.js"];
} }
}; };

View File

@ -1,7 +1,7 @@
const findOutputFiles = require("../../../helpers/findOutputFiles"); const findOutputFiles = require("../../../helpers/findOutputFiles");
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
const async1 = findOutputFiles(options, /^async.async_js.+.js/)[0]; const async1 = findOutputFiles(options, /^async.async_js.+.js/)[0];
const async2 = findOutputFiles(options, /^async.async_css.+.js/)[0]; const async2 = findOutputFiles(options, /^async.async_css.+.js/)[0];
const bundle = findOutputFiles(options, /^bundle.+.js/)[0]; const bundle = findOutputFiles(options, /^bundle.+.js/)[0];

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return i === 0 return i === 0
? ["./use-style_js.bundle0.js", "./bundle0.js"] ? ["./use-style_js.bundle0.js", "./bundle0.js"]
: ["./142.bundle1.js", "./bundle1.js"]; : ["./142.bundle1.js", "./bundle1.js"];

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["bundle0.js"]; return ["bundle0.js"];
}, },
moduleScope(scope) { moduleScope(scope) {

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return [ return [
`style_module_css_as-is.bundle${i}.js`, `style_module_css_as-is.bundle${i}.js`,
`style_module_css_camel-case.bundle${i}.js`, `style_module_css_camel-case.bundle${i}.js`,

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return [ return [
"pseudo-export_style_module_css.bundle0.js", "pseudo-export_style_module_css.bundle0.js",
"pseudo-export_style_module_css_module.bundle0.js", "pseudo-export_style_module_css_module.bundle0.js",

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["125.bundle0.js", "bundle0.js"]; return ["125.bundle0.js", "bundle0.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return [ return [
`style_module_css.bundle${i}.js`, `style_module_css.bundle${i}.js`,
`style_module_css_hash.bundle${i}.js`, `style_module_css_hash.bundle${i}.js`,

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i) { findBundle(i) {
switch (i) { switch (i) {
case 0: case 0:
return ["test.js"]; return ["test.js"];

View File

@ -8,7 +8,7 @@ module.exports = {
link.href = "bundle0.css"; link.href = "bundle0.css";
scope.window.document.head.appendChild(link); scope.window.document.head.appendChild(link);
}, },
findBundle: function (i, options) { findBundle(i, options) {
const source = fs.readFileSync( const source = fs.readFileSync(
path.resolve(options.output.path, "bundle0.css"), path.resolve(options.output.path, "bundle0.css"),
"utf-8" "utf-8"

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["reexport_modules_css.bundle0.js", "bundle0.js"]; return ["reexport_modules_css.bundle0.js", "bundle0.js"];
}, },
moduleScope(scope) { moduleScope(scope) {

View File

@ -9,7 +9,7 @@ module.exports = {
link2.href = "asyncChunk2_js.css"; link2.href = "asyncChunk2_js.css";
scope.window.document.head.appendChild(link2); scope.window.document.head.appendChild(link2);
}, },
findBundle: function (i, options) { findBundle(i, options) {
return [ return [
"./common-share_js-img_png.js", "./common-share_js-img_png.js",
"./asyncChunk_js.js", "./asyncChunk_js.js",

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return [`index_css.bundle${i}.js`, `bundle${i}.js`]; return [`index_css.bundle${i}.js`, `bundle${i}.js`];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./runtime~main.js", "./main.js"]; return ["./runtime~main.js", "./main.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return [ return [
"./app.js", "./app.js",
"./runtime.js", "./runtime.js",

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./other-vendors.js", "./page1.js", "./app.js"]; return ["./other-vendors.js", "./page1.js", "./app.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./runtime.js", "./a.js", "./b.js"]; return ["./runtime.js", "./a.js", "./b.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./app.js", "./react-vendors.js"]; return ["./app.js", "./react-vendors.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./a.js", "./b.js"]; return ["./a.js", "./b.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./a.js", "./b.js"]; return ["./a.js", "./b.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./a.js", "./b.js"]; return ["./a.js", "./b.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./runtime.js", "./app.js", "./home.js"]; return ["./runtime.js", "./app.js", "./home.js"];
} }
}; };

View File

@ -10,7 +10,7 @@ module.exports = {
afterExecute: () => { afterExecute: () => {
System.execute("(anonym)"); System.execute("(anonym)");
}, },
findBundle: function () { findBundle() {
return ["./main.system.js", "./main.umd.js"]; return ["./main.system.js", "./main.umd.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["./a.js", "./b.js", "./c.js", "./runtime.js", "./d.js"]; return ["./a.js", "./b.js", "./c.js", "./runtime.js", "./d.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return [ return [
`./${options.target}/folder/entry/-x/file.js`, `./${options.target}/folder/entry/-x/file.js`,
`./${options.target}/folder/x-/-x/file.js`, `./${options.target}/folder/x-/-x/file.js`,

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return [ return [
`../weird-names2-out/entry/entry-${options.target}.js`, `../weird-names2-out/entry/entry-${options.target}.js`,
`../weird-names2-out/entry-${options.target}.js` `../weird-names2-out/entry-${options.target}.js`

View File

@ -1,7 +1,7 @@
const findOutputFiles = require("../../../helpers/findOutputFiles"); const findOutputFiles = require("../../../helpers/findOutputFiles");
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
const files = findOutputFiles(options, new RegExp(/\.js$/)); const files = findOutputFiles(options, new RegExp(/\.js$/));
return files.sort((a, b) => (a.startsWith("main") ? 1 : 0)); return files.sort((a, b) => (a.startsWith("main") ? 1 : 0));

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./a.js", "./b.js", "./bundle0.js"]; return ["./a.js", "./b.js", "./bundle0.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["./common.js", "./main.js"]; return ["./common.js", "./main.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["11.js", "22.js", "aa.js", "bbb.js"]; return ["11.js", "22.js", "aa.js", "bbb.js"];
} }
}; };

View File

@ -2,7 +2,7 @@
module.exports = { module.exports = {
mode: "development", mode: "development",
output: { output: {
devtoolModuleFilenameTemplate: function (info) { devtoolModuleFilenameTemplate(info) {
return `dummy:///${info.resourcePath}`; return `dummy:///${info.resourcePath}`;
} }
}, },

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return [ return [
"shared.js", "shared.js",
"a.js", "a.js",

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["shared.js", "a.js", "b.js"]; return ["shared.js", "a.js", "b.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return [ return [
"shared.js", "shared.js",
"a.js", "a.js",

View File

@ -14,7 +14,7 @@ const verifyFilenameLength = (filename, expectedNameLength) => {
}; };
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
const files = fs.readdirSync(options.output.path); const files = fs.readdirSync(options.output.path);
const bundleDetects = [ const bundleDetects = [
options.amd.expectedChunkFilenameLength && { options.amd.expectedChunkFilenameLength && {

View File

@ -2,7 +2,7 @@ const fs = require("fs");
module.exports = { module.exports = {
noTests: true, noTests: true,
findBundle: function (i, options) { findBundle(i, options) {
const regex = new RegExp(`^bundle.${options.name}`, "i"); const regex = new RegExp(`^bundle.${options.name}`, "i");
const files = fs.readdirSync(options.output.path); const files = fs.readdirSync(options.output.path);
const bundle = files.find(function (file) { const bundle = files.find(function (file) {

View File

@ -9,7 +9,7 @@ module.exports = {
dark.href = "dark.css"; dark.href = "dark.css";
scope.window.document.head.appendChild(dark); scope.window.document.head.appendChild(dark);
}, },
findBundle: function () { findBundle() {
return ["./runtime.js", "./light.js", "./dark.js"]; return ["./runtime.js", "./light.js", "./dark.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./light.js", "./dark.js"]; return ["./light.js", "./dark.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./common.js", "./free.js", "./paid.js"]; return ["./common.js", "./free.js", "./paid.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./free.js", "./paid.js"]; return ["./free.js", "./paid.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["main.mjs"]; return ["main.mjs"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./runtime~main.js", "./main.js"]; return ["./runtime~main.js", "./main.js"];
} }
}; };

View File

@ -9,7 +9,7 @@ module.exports = {
{ {
loader: "./loader2", loader: "./loader2",
options: { options: {
f: function () { f() {
return "ok"; return "ok";
} }
} }
@ -25,7 +25,7 @@ module.exports = {
use: { use: {
loader: "./loader2", loader: "./loader2",
options: { options: {
f: function () { f() {
return "maybe"; return "maybe";
} }
} }
@ -36,7 +36,7 @@ module.exports = {
use: { use: {
loader: "./loader2", loader: "./loader2",
options: { options: {
f: function () { f() {
return "yes"; return "yes";
} }
} }
@ -51,7 +51,7 @@ module.exports = {
{ {
loader: "./loader2", loader: "./loader2",
options: { options: {
f: function () { f() {
return "ok"; return "ok";
} }
} }

View File

@ -10,7 +10,7 @@ module.exports = {
loader: "./loader2", loader: "./loader2",
ident: "loader2", ident: "loader2",
options: { options: {
f: function () { f() {
return "ok"; return "ok";
} }
} }
@ -24,7 +24,7 @@ module.exports = {
{ {
loader: "./loader2", loader: "./loader2",
options: { options: {
f: function () { f() {
return "ok"; return "ok";
} }
} }
@ -39,7 +39,7 @@ module.exports = {
test: /c\.js$/, test: /c\.js$/,
loader: "./loader2", loader: "./loader2",
options: { options: {
f: function () { f() {
return "ok"; return "ok";
} }
} }

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./deterministic.js", "./size.js"]; return ["./deterministic.js", "./size.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return "./main.mjs"; return "./main.mjs";
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./runtime.mjs", "./main.mjs"]; return ["./runtime.mjs", "./main.mjs"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./runtime.mjs", "./separate.mjs", "./main.mjs"]; return ["./runtime.mjs", "./separate.mjs", "./main.mjs"];
} }
}; };

View File

@ -1,7 +1,7 @@
/** @type {import("../../../../").Configuration} */ /** @type {import("../../../../").Configuration} */
module.exports = { module.exports = {
module: { module: {
noParse: function (content) { noParse(content) {
return /not-parsed/.test(content); return /not-parsed/.test(content);
} }
} }

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./a.js", "./b.js", "./runtime-c.js", "./c.js"]; return ["./a.js", "./b.js", "./runtime-c.js", "./c.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./a.js", "./b.js"]; return ["./a.js", "./b.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./a.js", "./b.js", "./c.js"]; return ["./a.js", "./b.js", "./c.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return [ return [
"module-avoidEntryIife-false.mjs", "module-avoidEntryIife-false.mjs",
"module-avoidEntryIife-true.mjs", "module-avoidEntryIife-true.mjs",

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["test.js"]; return ["test.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["bundle0.mjs", "test.js"]; return ["bundle0.mjs", "test.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return ["main.mjs", "vendor.mjs", "runtime.mjs"]; return ["main.mjs", "vendor.mjs", "runtime.mjs"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
switch (i) { switch (i) {
case 2: case 2:
case 6: case 6:

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["runtime.mjs", "main.mjs"]; return ["runtime.mjs", "main.mjs"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./a.js", "./b.js"]; return ["./a.js", "./b.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./a.js", "./inner-dir/b.js", "./inner-dir/deep/deep/c.js"]; return ["./a.js", "./inner-dir/b.js", "./inner-dir/deep/deep/c.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./index.mjs"]; return ["./index.mjs"];
}, },
moduleScope(scope) { moduleScope(scope) {

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./inner1/inner2/a.js", "./b.js"]; return ["./inner1/inner2/a.js", "./b.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./a.js"]; return ["./a.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function () { findBundle() {
return ["./main.js"]; return ["./main.js"];
} }
}; };

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
moduleScope: function (scope) { moduleScope(scope) {
delete scope.__dirname; delete scope.__dirname;
delete scope.__filename; delete scope.__filename;
} }

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
moduleScope: function (scope) { moduleScope(scope) {
delete scope.__dirname; delete scope.__dirname;
delete scope.__filename; delete scope.__filename;
} }

View File

@ -1,5 +1,5 @@
module.exports = { module.exports = {
findBundle: function (i, options) { findBundle(i, options) {
return "./dist/banner.js"; return "./dist/banner.js";
} }
}; };

View File

@ -20,6 +20,7 @@ module.exports = {
NEGATIVE_ZER0: -0, NEGATIVE_ZER0: -0,
NEGATIVE_NUMBER: -100.25, NEGATIVE_NUMBER: -100.25,
POSITIVE_NUMBER: +100.25, POSITIVE_NUMBER: +100.25,
// eslint-disable-next-line object-shorthand
FUNCTION: /* istanbul ignore next */ function (a) { FUNCTION: /* istanbul ignore next */ function (a) {
return a + 1; return a + 1;
}, },
@ -28,6 +29,7 @@ module.exports = {
OBJECT: { OBJECT: {
SUB: { SUB: {
UNDEFINED: undefined, UNDEFINED: undefined,
// eslint-disable-next-line object-shorthand
FUNCTION: /* istanbul ignore next */ function (a) { FUNCTION: /* istanbul ignore next */ function (a) {
return a + 1; return a + 1;
}, },

Some files were not shown because too many files have changed in this diff Show More