diff --git a/README.md b/README.md index c3788e9b..07c1e760 100644 --- a/README.md +++ b/README.md @@ -82,13 +82,13 @@ type sources = tag: string, attribute: string, attributes: string, - resourcePath: string + resourcePath: string, ) => boolean; }>; urlFilter?: ( attribute: string, value: string, - resourcePath: string + resourcePath: string, ) => boolean; scriptingEnabled?: boolean; }; @@ -210,7 +210,7 @@ type list = Array<{ tag: string, attribute: string, attributes: string, - resourcePath: string + resourcePath: string, ) => boolean; }>; ``` @@ -411,7 +411,7 @@ Type: type urlFilter = ( attribute: string, value: string, - resourcePath: string + resourcePath: string, ) => boolean; ``` @@ -492,7 +492,7 @@ Type: ```ts type preprocessor = ( content: string | Buffer, - loaderContext: LoaderContext + loaderContext: LoaderContext, ) => HTMLElement; ``` @@ -876,7 +876,7 @@ a { **file.html** ```html - + diff --git a/package-lock.json b/package-lock.json index e2b77556..49c44559 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2815,32 +2815,6 @@ "node": ">=18" } }, - "node_modules/@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - }, "node_modules/@dabh/diagnostics": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", @@ -4035,38 +4009,6 @@ "@sinonjs/commons": "^3.0.0" } }, - "node_modules/@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "optional": true, - "peer": true - }, - "node_modules/@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/@types/babel__core": { "version": "7.20.1", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", @@ -4429,17 +4371,6 @@ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } }, - "node_modules/acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/add-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", @@ -4539,14 +4470,6 @@ "node": ">= 8" } }, - "node_modules/arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -6001,14 +5924,6 @@ "node": ">=8" } }, - "node_modules/create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/cross-env": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", @@ -6794,17 +6709,6 @@ "node": ">=8" } }, - "node_modules/diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=0.3.1" - } - }, "node_modules/diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -11724,14 +11628,6 @@ "semver": "bin/semver" } }, - "node_modules/make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -14337,51 +14233,6 @@ "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", "dev": true }, - "node_modules/ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "optional": true, - "peer": true, - "dependencies": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - }, - "bin": { - "ts-node": "dist/bin.js", - "ts-node-cwd": "dist/bin-cwd.js", - "ts-node-esm": "dist/bin-esm.js", - "ts-node-script": "dist/bin-script.js", - "ts-node-transpile-only": "dist/bin-transpile.js", - "ts-script": "dist/bin-script-deprecated.js" - }, - "peerDependencies": { - "@swc/core": ">=1.2.50", - "@swc/wasm": ">=1.2.50", - "@types/node": "*", - "typescript": ">=2.7" - }, - "peerDependenciesMeta": { - "@swc/core": { - "optional": true - }, - "@swc/wasm": { - "optional": true - } - } - }, "node_modules/tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -14533,20 +14384,6 @@ "is-typedarray": "^1.0.0" } }, - "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", - "dev": true, - "peer": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=14.17" - } - }, "node_modules/uglify-js": { "version": "3.17.1", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.1.tgz", @@ -14690,14 +14527,6 @@ "integrity": "sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==", "dev": true }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "optional": true, - "peer": true - }, "node_modules/v8-to-istanbul": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.2.tgz", @@ -15214,17 +15043,6 @@ "node": ">=12" } }, - "node_modules/yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "optional": true, - "peer": true, - "engines": { - "node": ">=6" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -15636,8 +15454,7 @@ "version": "7.21.0-placeholder-for-preset-env.2", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz", "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==", - "dev": true, - "requires": {} + "dev": true }, "@babel/plugin-syntax-async-generators": { "version": "7.8.4", @@ -17286,31 +17103,6 @@ "integrity": "sha512-TWIA9SrtQTvpT+RN1RJUA2OWH1qNbjsjby8EmHteHjrueFr4a9nRxl4etQ1EoiGaBwt2w1w1iatnfpRY0U15Zg==", "dev": true }, - "@cspotcode/source-map-support": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", - "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@jridgewell/trace-mapping": "0.3.9" - }, - "dependencies": { - "@jridgewell/trace-mapping": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", - "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" - } - } - } - }, "@dabh/diagnostics": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", @@ -18210,38 +18002,6 @@ "@sinonjs/commons": "^3.0.0" } }, - "@tsconfig/node10": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", - "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", - "dev": true, - "optional": true, - "peer": true - }, - "@tsconfig/node12": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", - "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", - "dev": true, - "optional": true, - "peer": true - }, - "@tsconfig/node14": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", - "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", - "dev": true, - "optional": true, - "peer": true - }, - "@tsconfig/node16": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", - "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", - "dev": true, - "optional": true, - "peer": true - }, "@types/babel__core": { "version": "7.20.1", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.1.tgz", @@ -18555,8 +18315,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/@webpack-contrib/eslint-config-webpack/-/eslint-config-webpack-3.0.0.tgz", "integrity": "sha512-3f0dwuTZ1JZpnoGQ6tAKBWluZKZZBXr1ADoaOAbPiW0OvSN7o0wXFLGyfw6J+fW756xIkZLZ8JDYP5zInIRvBA==", - "dev": true, - "requires": {} + "dev": true }, "@xtuc/ieee754": { "version": "1.2.0", @@ -18579,23 +18338,13 @@ "version": "1.9.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz", "integrity": "sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA==", - "dev": true, - "requires": {} + "dev": true }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} - }, - "acorn-walk": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.2.0.tgz", - "integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==", - "dev": true, - "optional": true, - "peer": true + "dev": true }, "add-stream": { "version": "1.0.0", @@ -18667,14 +18416,6 @@ "picomatch": "^2.0.4" } }, - "arg": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", - "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", - "dev": true, - "optional": true, - "peer": true - }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -19754,14 +19495,6 @@ } } }, - "create-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", - "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", - "dev": true, - "optional": true, - "peer": true - }, "cross-env": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", @@ -20093,8 +19826,7 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", - "dev": true, - "requires": {} + "dev": true }, "deep-is": { "version": "0.1.4", @@ -20282,14 +20014,6 @@ "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", "dev": true }, - "diff": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", - "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", - "dev": true, - "optional": true, - "peer": true - }, "diff-sequences": { "version": "29.6.3", "resolved": "https://registry.npmjs.org/diff-sequences/-/diff-sequences-29.6.3.tgz", @@ -20791,8 +20515,7 @@ "version": "9.1.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", - "dev": true, - "requires": {} + "dev": true }, "eslint-import-resolver-node": { "version": "0.3.9", @@ -22736,8 +22459,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "requires": {} + "dev": true }, "jest-regex-util": { "version": "29.6.3", @@ -23872,14 +23594,6 @@ } } }, - "make-error": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", - "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", - "dev": true, - "optional": true, - "peer": true - }, "makeerror": { "version": "1.0.12", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz", @@ -25192,8 +24906,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} + "dev": true }, "json-schema-traverse": { "version": "0.4.1", @@ -25826,29 +25539,6 @@ "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==", "dev": true }, - "ts-node": { - "version": "10.9.1", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", - "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", - "dev": true, - "optional": true, - "peer": true, - "requires": { - "@cspotcode/source-map-support": "^0.8.0", - "@tsconfig/node10": "^1.0.7", - "@tsconfig/node12": "^1.0.7", - "@tsconfig/node14": "^1.0.0", - "@tsconfig/node16": "^1.0.2", - "acorn": "^8.4.1", - "acorn-walk": "^8.1.1", - "arg": "^4.1.0", - "create-require": "^1.1.0", - "diff": "^4.0.1", - "make-error": "^1.1.1", - "v8-compile-cache-lib": "^3.0.1", - "yn": "3.1.1" - } - }, "tsconfig-paths": { "version": "3.15.0", "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", @@ -25966,13 +25656,6 @@ "is-typedarray": "^1.0.0" } }, - "typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", - "dev": true, - "peer": true - }, "uglify-js": { "version": "3.17.1", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.1.tgz", @@ -26066,14 +25749,6 @@ "integrity": "sha512-Z0DbgELS9/L/75wZbro8xAnT50pBVFQZ+hUEueGDU5FN51YSCYM+jdxsfCiHjwNP/4LCDD0i/graKpeBnOXKRA==", "dev": true }, - "v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", - "dev": true, - "optional": true, - "peer": true - }, "v8-to-istanbul": { "version": "9.1.2", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.2.tgz", @@ -26471,14 +26146,6 @@ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", "dev": true }, - "yn": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", - "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", - "dev": true, - "optional": true, - "peer": true - }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/src/index.js b/src/index.js index 381dde17..cea9e359 100644 --- a/src/index.js +++ b/src/index.js @@ -33,7 +33,7 @@ export default async function loader(content) { imports, errors, replacements, - }) + }), ); } diff --git a/src/plugins/sources-plugin.js b/src/plugins/sources-plugin.js index 41fa4d72..5aec1d9b 100644 --- a/src/plugins/sources-plugin.js +++ b/src/plugins/sources-plugin.js @@ -68,7 +68,7 @@ export default (options) => const attributeAndValue = html.slice( sourceCodeLocation.attrs[name].startOffset, - sourceCodeLocation.attrs[name].endOffset + sourceCodeLocation.attrs[name].endOffset, ); const isValueQuoted = attributeAndValue[attributeAndValue.length - 1] === '"' || diff --git a/src/utils.js b/src/utils.js index 7e4351ee..a4f1e576 100644 --- a/src/utils.js +++ b/src/utils.js @@ -342,7 +342,7 @@ export function parseSrcset(input) { candidates.push(candidate); } else { throw new Error( - `Invalid srcset descriptor found in '${input}' at '${desc}'` + `Invalid srcset descriptor found in '${input}' at '${desc}'`, ); } } @@ -695,7 +695,7 @@ export function srcType(options) { `Bad value for attribute "${options.attribute}" on element "${options.tag}": ${error.message}`, options.attributeStartOffset, options.attributeEndOffset, - options.html + options.html, ); } @@ -706,7 +706,7 @@ export function srcType(options) { `Bad value for attribute "${options.attribute}" on element "${options.tag}": ${error.message}`, options.attributeStartOffset, options.attributeEndOffset, - options.html + options.html, ); } @@ -730,7 +730,7 @@ export function srcsetType(options) { `Bad value for attribute "${options.attribute}" on element "${options.tag}": ${error.message}`, options.attributeStartOffset, options.attributeEndOffset, - options.html + options.html, ); } @@ -746,7 +746,7 @@ export function srcsetType(options) { `Bad value for attribute "${options.attribute}" on element "${options.tag}": ${error.message}`, options.attributeStartOffset, options.attributeEndOffset, - options.html + options.html, ); } @@ -769,7 +769,7 @@ function metaContentType(options) { const isMsapplicationTask = options.attributes.find( (i) => i.name.toLowerCase() === "name" && - i.value.toLowerCase() === "msapplication-task" + i.value.toLowerCase() === "msapplication-task", ); if (isMsapplicationTask) { @@ -796,7 +796,7 @@ function metaContentType(options) { `Bad value for attribute "icon-uri" on element "${options.tag}": ${error.message}`, options.attributeStartOffset, options.attributeEndOffset, - options.html + options.html, ); } @@ -807,7 +807,7 @@ function metaContentType(options) { `Bad value for attribute "icon-uri" on element "${options.tag}": ${error.message}`, options.attributeStartOffset, options.attributeEndOffset, - options.html + options.html, ); } @@ -1241,7 +1241,7 @@ export function getImportCode(html, loaderContext, imports, options) { default: code += options.esModule ? `var ${importName} = new URL(${JSON.stringify( - request + request, )}, import.meta.url);\n` : `var ${importName} = require(${JSON.stringify(request)});\n`; } @@ -1254,7 +1254,7 @@ export function getModuleCode(html, replacements) { let code = JSON.stringify(html) // Invalid in JavaScript but valid HTML .replace(/[\u2028\u2029]/g, (str) => - str === "\u2029" ? "\\u2029" : "\\u2028" + str === "\u2029" ? "\\u2029" : "\\u2028", ); let replacersCode = ""; @@ -1273,12 +1273,12 @@ export function getModuleCode(html, replacements) { code = code.replace( new RegExp(replacementName, "g"), - () => `" + ${replacementName} + "` + () => `" + ${replacementName} + "`, ); } else { code = code.replace( new RegExp(replacementName, "g"), - () => `" + ${importName} + "` + () => `" + ${importName} + "`, ); } } diff --git a/test/esModule-option.test.js b/test/esModule-option.test.js index 7e0fafe6..52487ebf 100644 --- a/test/esModule-option.test.js +++ b/test/esModule-option.test.js @@ -15,7 +15,7 @@ describe("'esModule' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -27,7 +27,7 @@ describe("'esModule' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -39,7 +39,7 @@ describe("'esModule' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); diff --git a/test/helpers/execute.js b/test/helpers/execute.js index 7bd707a1..4b7a48a3 100644 --- a/test/helpers/execute.js +++ b/test/helpers/execute.js @@ -14,14 +14,14 @@ export default (code) => { const module = new Module(resource, parentModule); // eslint-disable-next-line no-underscore-dangle module.paths = Module._nodeModulePaths( - path.resolve(__dirname, "../fixtures") + path.resolve(__dirname, "../fixtures"), ); module.filename = resource; // eslint-disable-next-line no-underscore-dangle module._compile( `${code};module.exports = ___TEST___.default ?___TEST___.default : ___TEST___;`, - resource + resource, ); return replaceAbsolutePath(module.exports); diff --git a/test/helpers/getCompiler.js b/test/helpers/getCompiler.js index 56d39828..993b0d1c 100644 --- a/test/helpers/getCompiler.js +++ b/test/helpers/getCompiler.js @@ -54,7 +54,7 @@ export default (fixture, loaderOptions = {}, config = {}) => { aliasImg: path.resolve(__dirname, "../fixtures/image.png"), aliasImageWithSpace: path.resolve( __dirname, - "../fixtures/image image.png" + "../fixtures/image image.png", ), }, }, diff --git a/test/helpers/normalizeErrors.js b/test/helpers/normalizeErrors.js index 73966256..4502af1b 100644 --- a/test/helpers/normalizeErrors.js +++ b/test/helpers/normalizeErrors.js @@ -16,5 +16,5 @@ function removeCWD(str) { export default (errors) => errors.map((error) => - removeCWD(error.toString().split("\n").slice(0, 2).join("\n")) + removeCWD(error.toString().split("\n").slice(0, 2).join("\n")), ); diff --git a/test/loader.test.js b/test/loader.test.js index c3b6813b..2774c8f9 100644 --- a/test/loader.test.js +++ b/test/loader.test.js @@ -20,7 +20,7 @@ describe("loader", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -32,7 +32,7 @@ describe("loader", () => { expect(getModuleSource("./empty.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -44,7 +44,7 @@ describe("loader", () => { expect(getModuleSource("./template.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -52,7 +52,7 @@ describe("loader", () => { it("should not failed contain invisible spaces", async () => { const source = fs.readFileSync( - path.resolve(__dirname, "./fixtures/invisible-space.html") + path.resolve(__dirname, "./fixtures/invisible-space.html"), ); expect(/[\u2028\u2029]/.test(source)).toBe(true); @@ -65,7 +65,7 @@ describe("loader", () => { expect(moduleSource).toMatchSnapshot("module"); expect(/[\u2028\u2029]/.test(moduleSource)).toBe(false); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -76,10 +76,10 @@ describe("loader", () => { const stats = await compile(compiler); expect(getModuleSource("./broken-html-syntax.html", stats)).toMatchSnapshot( - "module" + "module", ); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -91,7 +91,7 @@ describe("loader", () => { expect(getModuleSource("./nested.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -105,13 +105,13 @@ describe("loader", () => { resolve: { roots: [path.resolve(__dirname, "fixtures/roots")], }, - } + }, ); const stats = await compile(compiler); expect(getModuleSource("./roots.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -130,7 +130,7 @@ describe("loader", () => { // 'module' // ); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -150,7 +150,7 @@ describe("loader", () => { use: { loader: path.resolve( __dirname, - "./helpers/svg-color-loader.js" + "./helpers/svg-color-loader.js", ), }, }, @@ -160,15 +160,15 @@ describe("loader", () => { }, ], }, - } + }, ); const stats = await compile(compiler); expect(getModuleSource("./other-loader-query.html", stats)).toMatchSnapshot( - "module" + "module", ); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -179,10 +179,10 @@ describe("loader", () => { const stats = await compile(compiler); expect(getModuleSource("./webpackIgnore.html", stats)).toMatchSnapshot( - "module" + "module", ); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -210,7 +210,7 @@ describe("loader", () => { template: path.resolve(__dirname, "fixtures/template-html.html"), }), ], - } + }, ); const stats = await compile(compiler); diff --git a/test/minimize-option.test.js b/test/minimize-option.test.js index 99286cf4..6a55d6b4 100644 --- a/test/minimize-option.test.js +++ b/test/minimize-option.test.js @@ -19,7 +19,7 @@ describe('"minimize" option', () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -31,7 +31,7 @@ describe('"minimize" option', () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -43,7 +43,7 @@ describe('"minimize" option', () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -55,7 +55,7 @@ describe('"minimize" option', () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -67,7 +67,7 @@ describe('"minimize" option', () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -92,7 +92,7 @@ describe('"minimize" option', () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -103,10 +103,10 @@ describe('"minimize" option', () => { const stats = await compile(compiler); expect(getModuleSource("./broken-html-syntax.html", stats)).toMatchSnapshot( - "module" + "module", ); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -118,7 +118,7 @@ describe('"minimize" option', () => { expect(getModuleSource("./XHTML.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); diff --git a/test/preprocessor-option.test.js b/test/preprocessor-option.test.js index a841785b..30a09062 100644 --- a/test/preprocessor-option.test.js +++ b/test/preprocessor-option.test.js @@ -38,10 +38,10 @@ describe("'process' option", () => { const stats = await compile(compiler); expect(getModuleSource("./preprocessor.hbs", stats)).toMatchSnapshot( - "module" + "module", ); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -72,10 +72,10 @@ describe("'process' option", () => { const stats = await compile(compiler); expect(getModuleSource("./preprocessor.hbs", stats)).toMatchSnapshot( - "module" + "module", ); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -105,7 +105,7 @@ describe("'process' option", () => { expect(getModuleSource("./posthtml.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -136,7 +136,7 @@ describe("'process' option", () => { expect(getModuleSource("./posthtml.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); diff --git a/test/runtime/getUrl.test.js b/test/runtime/getUrl.test.js index 5cf61b7b..0b70d49f 100644 --- a/test/runtime/getUrl.test.js +++ b/test/runtime/getUrl.test.js @@ -20,73 +20,73 @@ describe("getUrl", () => { expect(getUrl("image`image.png")).toMatchSnapshot(); expect(getUrl("image.png", { maybeNeedQuotes: true })).toMatchSnapshot(); expect( - getUrl("image\timage.png", { maybeNeedQuotes: true }) + getUrl("image\timage.png", { maybeNeedQuotes: true }), ).toMatchSnapshot(); expect( - getUrl("image\nimage.png", { maybeNeedQuotes: true }) + getUrl("image\nimage.png", { maybeNeedQuotes: true }), ).toMatchSnapshot(); expect( - getUrl("image\fimage.png", { maybeNeedQuotes: true }) + getUrl("image\fimage.png", { maybeNeedQuotes: true }), ).toMatchSnapshot(); expect( - getUrl("image\rimage.png", { maybeNeedQuotes: true }) + getUrl("image\rimage.png", { maybeNeedQuotes: true }), ).toMatchSnapshot(); expect( - getUrl("image image.png", { maybeNeedQuotes: true }) + getUrl("image image.png", { maybeNeedQuotes: true }), ).toMatchSnapshot(); expect( - getUrl('image"image.png', { maybeNeedQuotes: true }) + getUrl('image"image.png', { maybeNeedQuotes: true }), ).toMatchSnapshot(); expect( - getUrl("image'image.png", { maybeNeedQuotes: true }) + getUrl("image'image.png", { maybeNeedQuotes: true }), ).toMatchSnapshot(); expect( - getUrl("image=image.png", { maybeNeedQuotes: true }) + getUrl("image=image.png", { maybeNeedQuotes: true }), ).toMatchSnapshot(); expect( - getUrl("image>image.png", { maybeNeedQuotes: true }) + getUrl("image>image.png", { maybeNeedQuotes: true }), ).toMatchSnapshot(); expect( - getUrl("imageimage.png", { maybeNeedQuotes: true, hash: "#hash" }) + getUrl("image>image.png", { maybeNeedQuotes: true, hash: "#hash" }), ).toMatchSnapshot(); expect( - getUrl("image { expect(getUrl("image { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -29,7 +29,7 @@ describe("'sources' option", () => { expect(getModuleSource("./sources.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -56,7 +56,7 @@ describe("'sources' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -79,7 +79,7 @@ describe("'sources' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -107,7 +107,7 @@ describe("'sources' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -131,7 +131,7 @@ describe("'sources' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -153,7 +153,7 @@ describe("'sources' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -164,10 +164,10 @@ describe("'sources' option", () => { const stats = await compile(compiler); expect(getModuleSource("./webpack-import.html", stats)).toMatchSnapshot( - "module" + "module", ); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -179,7 +179,7 @@ describe("'sources' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -191,7 +191,7 @@ describe("'sources' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -205,7 +205,7 @@ describe("'sources' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -304,7 +304,7 @@ describe("'sources' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -325,7 +325,7 @@ describe("'sources' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -348,7 +348,7 @@ describe("'sources' option", () => { expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -362,15 +362,15 @@ describe("'sources' option", () => { resolve: { roots: [path.resolve(__dirname, "fixtures/nested/")], }, - } + }, ); const stats = await compile(compiler); expect(getModuleSource("./resolve-roots.html", stats)).toMatchSnapshot( - "module" + "module", ); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -403,13 +403,13 @@ describe("'sources' option", () => { }, ], }, - } + }, ); const stats = await compile(compiler); expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -442,13 +442,13 @@ describe("'sources' option", () => { }, ], }, - } + }, ); const stats = await compile(compiler); expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -481,13 +481,13 @@ describe("'sources' option", () => { }, ], }, - } + }, ); const stats = await compile(compiler); expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors"); @@ -520,13 +520,13 @@ describe("'sources' option", () => { }, ], }, - } + }, ); const stats = await compile(compiler); expect(getModuleSource("./simple.html", stats)).toMatchSnapshot("module"); expect( - execute(readAsset("main.bundle.js", compiler, stats)) + execute(readAsset("main.bundle.js", compiler, stats)), ).toMatchSnapshot("result"); expect(getWarnings(stats)).toMatchSnapshot("warnings"); expect(getErrors(stats)).toMatchSnapshot("errors");