From 41f4a7b952e80eea4878d96638b4021f4a762750 Mon Sep 17 00:00:00 2001 From: Alexander Akait <4567934+alexander-akait@users.noreply.github.com> Date: Mon, 5 Feb 2024 19:45:41 +0300 Subject: [PATCH] chore: update tooling --- .cspell.json | 43 + .editorconfig | 3 +- .eslintrc.js | 31 + .github/ISSUE_TEMPLATE/bug_report.md | 8 +- .github/ISSUE_TEMPLATE/feature_request.md | 1 - .github/issue_template.md | 22 +- .github/lock.yml | 1 - .github/stale.yml | 4 +- .github/workflows/main.yml | 82 +- .gitignore | 3 + .husky/commit-msg | 1 + .husky/pre-commit | 1 + .prettierignore | 6 + README.md | 291 +- commitlint.config.js | 8 + docs/template-option.md | 22 +- examples/README.md | 30 +- examples/build-examples.js | 28 +- .../chunk-optimization/dist/webpack-5/488.js | 2 +- .../dist/webpack-5/entryA.js | 4 +- .../dist/webpack-5/entryB.js | 4 +- .../dist/webpack-5/libMath.js | 4 +- .../dist/webpack-5/libText.js | 2 +- examples/chunk-optimization/entryA.js | 10 +- examples/chunk-optimization/entryB.js | 8 +- examples/chunk-optimization/lib-concat.js | 2 +- examples/chunk-optimization/lib-multiply.js | 4 +- examples/chunk-optimization/lib-sum.js | 2 +- examples/chunk-optimization/main.css | 2 +- examples/chunk-optimization/readme.md | 2 +- examples/chunk-optimization/webpack.config.js | 52 +- .../dist/webpack-5/bundle.js | 4 +- examples/custom-insertion-position/example.js | 4 +- examples/custom-insertion-position/readme.md | 2 +- .../webpack.config.js | 26 +- .../custom-template/dist/webpack-5/bundle.js | 4 +- .../custom-template/dist/webpack-5/index.html | 2 +- .../custom-template/dist/webpack-5/styles.css | 1 + examples/custom-template/example.js | 6 +- examples/custom-template/main.css | 2 +- examples/custom-template/partial.html | 2 +- examples/custom-template/template.html | 16 +- examples/custom-template/webpack.config.js | 28 +- examples/default/dist/webpack-5/bundle.js | 6 +- examples/default/example.js | 6 +- examples/default/main.css | 2 +- examples/default/readme.md | 2 +- examples/default/webpack.config.js | 24 +- examples/favicon/dist/webpack-5/bundle.js | 4 +- examples/favicon/dist/webpack-5/styles.css | 1 + examples/favicon/example.js | 6 +- examples/favicon/main.css | 2 +- examples/favicon/template.html | 18 +- examples/favicon/webpack.config.js | 32 +- .../html-loader/dist/webpack-5/about.html | 2 +- examples/html-loader/dist/webpack-5/bundle.js | 4 +- .../html-loader/dist/webpack-5/index.html | 2 +- .../html-loader/dist/webpack-5/styles.css | 1 + examples/html-loader/example.js | 6 +- examples/html-loader/main.css | 2 +- examples/html-loader/template.html | 18 +- examples/html-loader/webpack.config.js | 40 +- examples/inline/dist/webpack-5/bundle.js | 2 +- examples/inline/dist/webpack-5/index.html | 2 +- examples/inline/dist/webpack-5/styles.css | 1 + examples/inline/example.js | 6 +- examples/inline/main.css | 2 +- examples/inline/webpack.config.js | 34 +- .../dist/webpack-5/bundle.js | 6 +- .../dist/webpack-5/index.html | 2 +- .../dist/webpack-5/styles.css | 1 + examples/javascript-advanced/example.js | 6 +- examples/javascript-advanced/main.css | 2 +- examples/javascript-advanced/partial.html | 2 +- examples/javascript-advanced/readme.md | 2 +- examples/javascript-advanced/template.js | 17 +- .../{universial.js => universal.js} | 6 +- .../javascript-advanced/webpack.config.js | 32 +- examples/javascript/dist/webpack-5/bundle.js | 10 +- examples/javascript/dist/webpack-5/index.html | 2 +- examples/javascript/dist/webpack-5/styles.css | 1 + examples/javascript/example.js | 6 +- examples/javascript/main.css | 2 +- examples/javascript/partial.html | 2 +- examples/javascript/readme.md | 2 +- examples/javascript/template.js | 4 +- .../{universial.js => universal.js} | 6 +- examples/javascript/webpack.config.js | 28 +- examples/multi-page/dist/webpack-5/first.js | 6 +- examples/multi-page/dist/webpack-5/second.js | 6 +- examples/multi-page/first.js | 6 +- examples/multi-page/main.css | 2 +- examples/multi-page/readme.md | 2 +- examples/multi-page/second.js | 6 +- examples/multi-page/webpack.config.js | 28 +- examples/pug-loader/dist/webpack-5/bundle.js | 4 +- examples/pug-loader/dist/webpack-5/styles.css | 1 + examples/pug-loader/example.js | 10 +- examples/pug-loader/main.css | 2 +- examples/pug-loader/webpack.config.js | 36 +- examples/sort-manually/a.js | 6 +- examples/sort-manually/b.js | 4 +- examples/sort-manually/c.js | 4 +- examples/sort-manually/d.js | 4 +- examples/sort-manually/dist/webpack-5/a.js | 4 +- examples/sort-manually/dist/webpack-5/b.js | 4 +- examples/sort-manually/dist/webpack-5/c.js | 4 +- examples/sort-manually/dist/webpack-5/d.js | 4 +- examples/sort-manually/dist/webpack-5/e.js | 4 +- .../dist/webpack-5/first-file.html | 2 +- .../dist/webpack-5/second-file.html | 2 +- .../sort-manually/dist/webpack-5/styles.css | 1 + examples/sort-manually/e.js | 4 +- examples/sort-manually/main.css | 2 +- examples/sort-manually/template.html | 18 +- examples/sort-manually/webpack.config.js | 52 +- .../dist/webpack-5/bundle.js | 4 +- examples/template-parameters/example.js | 4 +- .../template-parameters/webpack.config.js | 22 +- index.js | 990 ++- lib/cached-child-compiler.js | 296 +- lib/child-compiler.js | 149 +- lib/chunksorter.js | 10 +- lib/errors.js | 18 +- lib/html-tags.js | 54 +- lib/loader.js | 37 +- lint-staged.config.js | 7 + logs | 13 + migration.md | 126 +- package-lock.json | 3907 ++++++----- package.json | 43 +- spec/basic.spec.js | 6170 ++++++++++------- spec/caching.spec.js | 261 +- spec/example.spec.js | 110 +- spec/hot.spec.js | 392 +- tsconfig.json | 24 +- typings.d.ts | 14 +- 137 files changed, 8192 insertions(+), 5831 deletions(-) create mode 100644 .cspell.json create mode 100644 .eslintrc.js create mode 100644 .husky/commit-msg create mode 100644 .husky/pre-commit create mode 100644 .prettierignore create mode 100644 commitlint.config.js rename examples/javascript-advanced/{universial.js => universal.js} (54%) rename examples/javascript/{universial.js => universal.js} (54%) create mode 100644 lint-staged.config.js create mode 100644 logs diff --git a/.cspell.json b/.cspell.json new file mode 100644 index 00000000..69338303 --- /dev/null +++ b/.cspell.json @@ -0,0 +1,43 @@ +{ + "version": "0.2", + "language": "en,en-gb", + "words": [ + "commitlint", + "chunkhash", + "concat", + "systemjs", + "tapable", + "templatehash", + "blueimp", + "selfclosed", + "nocheck", + "iife", + "appcache", + "subresource", + "startuml", + "autonumber", + "enduml", + "chunksorter", + "urlencode", + "sortmode", + "harddisk", + "Sileghem", + "Bname", + "Bfile", + "webpackconfig", + "specialattribute", + "dircompare" + ], + "ignorePaths": [ + "CHANGELOG.md", + "coverage", + "package.json", + "**/dist/**", + "**/__snapshots__/**", + "**/fixtures/**", + "package-lock.json", + "node_modules", + "coverage", + "*.log" + ] +} diff --git a/.editorconfig b/.editorconfig index 6cd65d89..4bd3bd8b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,10 +1,11 @@ root = true [*] -insert_final_newline = true charset = utf-8 indent_style = space indent_size = 2 +end_of_line = lf +insert_final_newline = true trim_trailing_whitespace = true [*.md] diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000..e6ea930d --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,31 @@ +module.exports = { + env: { + node: true, + commonjs: true, + es2021: true, + }, + extends: "eslint:recommended", + ignorePatterns: ["**/dist/**/*.js", "**/spec/fixtures/**/*.js"], + overrides: [ + { + files: [".eslintrc.{js,cjs}"], + parserOptions: { + sourceType: "script", + }, + }, + { + env: { + browser: true, + es2021: true, + }, + files: ["**/examples/**"], + parserOptions: { + sourceType: "script", + }, + }, + ], + parserOptions: { + ecmaVersion: "latest", + }, + rules: {}, +}; diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 861ef5a3..76962df2 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,6 @@ --- name: Bug report about: Create a 🕷 report to help us improve - --- @@ -19,8 +18,8 @@ about: Create a 🕷 report to help us improve - diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 066b2d92..a09db44f 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,7 +1,6 @@ --- name: Feature request about: Suggest an idea for this project - --- **Is your feature request related to a problem? Please describe.** diff --git a/.github/issue_template.md b/.github/issue_template.md index d3c4693d..18348144 100644 --- a/.github/issue_template.md +++ b/.github/issue_template.md @@ -4,19 +4,18 @@ - We realize there is a lot of data requested here. We ask only that you do your best to provide as much information as possible so we can better help you. - Support questions are better asked in one of the following locations: - - [Stack Overflow](http://stackoverflow.com/questions/tagged/html-webpack-plugin) + - [Stack Overflow](http://stackoverflow.com/questions/tagged/html-webpack-plugin) - Ensure the issue isn't already reported. - Should be reproducible with the latest version of `html-webpack-plugin`. - - (Ensure `npm ls html-webpack-plugin` matches ![](https://img.shields.io/npm/v/html-webpack-plugin.svg)) - -*Delete the above section and the instructions in the sections below before submitting* + - (Ensure `npm ls html-webpack-plugin` matches ![](https://img.shields.io/npm/v/html-webpack-plugin.svg)) +_Delete the above section and the instructions in the sections below before submitting_ ## Description If this is a feature request, explain why it should be added. Specific use-cases are best. -For bug reports, please provide as much *relevant* info as possible. +For bug reports, please provide as much _relevant_ info as possible. ### Error Message & Stack Trace @@ -50,23 +49,20 @@ module.exports = { Copy your template file: ```html - + - - My App - - - + + My App + + ``` - ## Relevant Links - If your project is public, link to the repo so we can investigate directly. - **BONUS POINTS:** Create a [minimal reproduction](http://stackoverflow.com/help/mcve) and upload it to GitHub. This will get you the fastest support. - ## Environment Tell us which operating system you are using, as well as which versions of Node.js, npm, webpack, and html-webpack-plugin. Run the following to get it quickly: diff --git a/.github/lock.yml b/.github/lock.yml index b1fa35a6..9b9a24fd 100644 --- a/.github/lock.yml +++ b/.github/lock.yml @@ -11,4 +11,3 @@ lockComment: false # Number of days of inactivity before a closed issue or pull request is locked daysUntilLock: 30 - diff --git a/.github/stale.yml b/.github/stale.yml index 8d61aee8..baabd895 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -11,6 +11,6 @@ staleLabel: wontfix # Comment to post when marking an issue as stale. Set to `false` to disable markComment: > **This issue had no activity for at least half a year.** - It's subject to automatic issue closing if there is no activity in the next 15 days. + It's subject to automatic issue closing if there is no activity in the next 15 days. # Comment to post when closing a stale issue. Set to `false` to disable -closeComment: false \ No newline at end of file +closeComment: false diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 39d69f8b..4d298b5c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,34 +7,86 @@ on: branches: - main jobs: + lint: + name: Lint - ${{ matrix.os }} - Node v${{ matrix.node-version }} + + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + strategy: + matrix: + os: [ubuntu-latest] + node-version: [lts/*] + + runs-on: ${{ matrix.os }} + + concurrency: + group: lint-${{ matrix.os }}-v${{ matrix.node-version }}-${{ github.ref }} + cancel-in-progress: true + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: "npm" + + - name: Install dependencies + run: npm ci + + - name: Lint + run: npm run lint + + - name: Security audit + run: npm run security -- --only=prod + + - name: Check commit message + uses: wagoid/commitlint-github-action@v5 + build: name: test Node ${{ matrix.node }} Webpack ${{ matrix.webpack }} ${{ matrix.os }} timeout-minutes: 15 runs-on: ${{ matrix.os }} + + concurrency: + group: test-${{ matrix.os }}-v${{ matrix.node-version }}-${{ matrix.webpack-version }}-${{ github.ref }} + cancel-in-progress: true + strategy: matrix: - node: ['10.x', '12.x', '14.x', '16.x', '18.x', '20.x'] + node: ["10.x", "12.x", "14.x", "16.x", "18.x", "20.x"] os: [ubuntu-latest, windows-latest, macOS-latest] - webpack: ['5'] + webpack: [latest] steps: - - name: LF - run: git config --global core.autocrlf false + - name: Setup Git + if: matrix.os == 'windows-latest' + run: git config --global core.autocrlf input - - name: Checkout repo - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Use Node ${{ matrix.node }} - uses: actions/setup-node@v1 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 with: - node-version: ${{ matrix.node }} + node-version: ${{ matrix.node-version }} + cache: "npm" - - name: Install Dependencies - run: npm install --ignore-scripts --force --legacy-peer-deps + - name: Install dependencies + run: npm ci - - name: Install Webpack ${{ matrix.webpack }} - run: npm install --ignore-scripts --force --legacy-peer-deps webpack@${{ matrix.webpack }} + - name: Install webpack ${{ matrix.webpack-version }} + if: matrix.webpack-version != 'latest' + run: npm i webpack@${{ matrix.webpack-version }} - - name: Test - run: npm test -- --forceExit || npm test -- --forceExit || npm test -- --forceExit + - name: Run tests for webpack version ${{ matrix.webpack-version }} + run: npm run test:coverage -- --ci + + - name: Submit coverage data to codecov + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 7321c1ad..868d774a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,6 @@ npm-debug.*.log yarn.lock npm-debug.log.* +/.idea/ +.eslintcache +.cspellcache diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100644 index 00000000..fd2bf708 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1 @@ +npx --no-install commitlint --edit $1 diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100644 index 00000000..041c660c --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1 @@ +npx --no-install lint-staged diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..d7a2e0e7 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,6 @@ +/coverage +/dist +/node_modules +/spec/fixtures +CHANGELOG.md +examples/*/dist diff --git a/README.md b/README.md index d1206dd4..ab0893a2 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![npm](https://img.shields.io/npm/dw/html-webpack-plugin.svg) [![tests][tests]][tests-url] [![Backers on Open Collective](https://opencollective.com/html-webpack-plugin/backers/badge.svg)](#backers) - [![Sponsors on Open Collective](https://opencollective.com/html-webpack-plugin/sponsors/badge.svg)](#sponsors) +[![Sponsors on Open Collective](https://opencollective.com/html-webpack-plugin/sponsors/badge.svg)](#sponsors)
@@ -30,7 +30,6 @@ yarn add --dev html-webpack-plugin ``` -

Webpack 4

```bash @@ -41,7 +40,6 @@ yarn add --dev html-webpack-plugin@4 ``` - This is a [webpack](http://webpack.js.org/) plugin that simplifies creation of HTML files to serve your `webpack` bundles. This is especially useful for `webpack` bundles that include a hash in the filename which changes every compilation. You can either let the plugin generate an HTML file for you, supply your own template using `lodash` templates or use your own loader. @@ -58,7 +56,7 @@ your own template using `lodash` templates or use your own loader. -Thanks for supporting the ongoing improvements to the html-webpack-plugin! +Thanks for supporting the ongoing improvements to the html-webpack-plugin!

Zero Config

@@ -69,29 +67,29 @@ It's a great addition to the [⚙️ webpack-config-plugins](https://github.com/ The `html-webpack-plugin` provides [hooks](https://github.com/jantimon/html-webpack-plugin#events) to extend it to your needs. There are already some really powerful plugins which can be integrated with zero configuration - * [webpack-subresource-integrity](https://www.npmjs.com/package/webpack-subresource-integrity) for enhanced asset security - * [appcache-webpack-plugin](https://github.com/lettertwo/appcache-webpack-plugin) for iOS and Android offline usage - * [favicons-webpack-plugin](https://github.com/jantimon/favicons-webpack-plugin) which generates favicons and icons for iOS, Android and desktop browsers - * [html-webpack-harddisk-plugin](https://github.com/jantimon/html-webpack-harddisk-plugin) can be used to always write to disk the html file, useful when webpack-dev-server / HMR are being used - * [html-webpack-inline-svg-plugin](https://github.com/thegc/html-webpack-inline-svg-plugin) to inline SVGs in the resulting HTML file. - * [html-webpack-exclude-assets-plugin](https://github.com/jamesjieye/html-webpack-exclude-assets-plugin) for excluding assets using regular expressions - * [html-webpack-include-assets-plugin](https://github.com/jharris4/html-webpack-include-assets-plugin) for including lists of js or css file paths (such as those copied by the copy-webpack-plugin). - * [html-webpack-injector](https://github.com/thearchitgarg/html-webpack-injector) to inject chunks in `head` or `body` (different locations ) of same html document. - * [resource-hints-webpack-plugin](https://github.com/jantimon/resource-hints-webpack-plugin) to add resource hints for faster initial page loads using `` and `` - * [link-media-html-webpack-plugin](https://github.com/yaycmyk/link-media-html-webpack-plugin) allows for injected stylesheet `` tags to have their media attribute set automatically; useful for providing specific desktop/mobile/print etc. stylesheets that the browser will conditionally download - * [html-webpack-inline-style-plugin](https://github.com/djaax/html-webpack-inline-style-plugin) for inlining styles to HTML elements using [juice](https://github.com/Automattic/juice). Useful for email generation automatisation. - * [html-webpack-exclude-empty-assets-plugin](https://github.com/KnisterPeter/html-webpack-exclude-empty-assets-plugin) removes empty assets from being added to the html. This fixes some problems with extract-text-plugin with webpack 4. - * [webpack-concat-plugin](https://github.com/hxlniada/webpack-concat-plugin) for concat and uglify files that needn't to be webpack bundles(for legacy files) and inject to html-webpack-plugin. - * [html-webpack-link-type-plugin](https://github.com/steadyapp/html-webpack-link-type-plugin) adds a configurable mimetype to resources injected as links (such as adding type="text/css" to external stylesheets) for compatibility with "strict mode". - * [csp-html-webpack-plugin](https://github.com/slackhq/csp-html-webpack-plugin) to add [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) meta tags to the HTML output - * [strict-csp-html-webpack-plugin](https://github.com/google/strict-csp/tree/main/strict-csp-html-webpack-plugin) to add a [**strict** Content-Security-Policy (CSP)](https://web.dev) as a `meta` tag to the HTML output. A strict CSP is specifically efficient against XSS attacks. - * [webpack-nomodule-plugin](https://github.com/swimmadude66/webpack-nomodule-plugin) allows you to add a `nomodule` attribute to specific injected scripts, which prevents the scripts from being loaded by newer browsers. Good for limiting loads of polyfills. - * [html-webpack-skip-assets-plugin](https://github.com/swimmadude66/html-webpack-skip-assets-plugin) Skip adding certain output files to the html file. Built as a drop-in replacement for [html-webpack-exclude-assets-plugin](https://www.npmjs.com/package/html-webpack-exclude-assets-plugin) and works with newer [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) versions - * [html-webpack-inject-preload](https://github.com/principalstudio/html-webpack-inject-preload) allows to add preload links <link rel='preload'> anywhere you want. - * [inject-body-webpack-plugin](https://github.com/Jaid/inject-body-webpack-plugin) is a simple method of injecting a custom HTML string into the body. - * [html-webpack-plugin-django](https://github.com/TommasoAmici/html-webpack-plugin-django) a Webpack plugin to inject Django static tags. - * [html-webpack-inject-attributes-plugin](https://github.com/dyw934854565/html-webpack-inject-attributes-plugin) add extra attributes to inject assetTags. - * [js-entry-webpack-plugin](https://github.com/liam61/html-webpack-plugin) creates webpack bundles into your js entry +- [webpack-subresource-integrity](https://www.npmjs.com/package/webpack-subresource-integrity) for enhanced asset security +- [appcache-webpack-plugin](https://github.com/lettertwo/appcache-webpack-plugin) for iOS and Android offline usage +- [favicons-webpack-plugin](https://github.com/jantimon/favicons-webpack-plugin) which generates favicons and icons for iOS, Android and desktop browsers +- [html-webpack-harddisk-plugin](https://github.com/jantimon/html-webpack-harddisk-plugin) can be used to always write to disk the html file, useful when webpack-dev-server / HMR are being used +- [html-webpack-inline-svg-plugin](https://github.com/thegc/html-webpack-inline-svg-plugin) to inline SVGs in the resulting HTML file. +- [html-webpack-exclude-assets-plugin](https://github.com/jamesjieye/html-webpack-exclude-assets-plugin) for excluding assets using regular expressions +- [html-webpack-include-assets-plugin](https://github.com/jharris4/html-webpack-include-assets-plugin) for including lists of js or css file paths (such as those copied by the copy-webpack-plugin). +- [html-webpack-injector](https://github.com/thearchitgarg/html-webpack-injector) to inject chunks in `head` or `body` (different locations ) of same html document. +- [resource-hints-webpack-plugin](https://github.com/jantimon/resource-hints-webpack-plugin) to add resource hints for faster initial page loads using `` and `` +- [link-media-html-webpack-plugin](https://github.com/yaycmyk/link-media-html-webpack-plugin) allows for injected stylesheet `` tags to have their media attribute set automatically; useful for providing specific desktop/mobile/print etc. stylesheets that the browser will conditionally download +- [html-webpack-inline-style-plugin](https://github.com/djaax/html-webpack-inline-style-plugin) for inlining styles to HTML elements using [juice](https://github.com/Automattic/juice). Useful for email generation automatisation. +- [html-webpack-exclude-empty-assets-plugin](https://github.com/KnisterPeter/html-webpack-exclude-empty-assets-plugin) removes empty assets from being added to the html. This fixes some problems with extract-text-plugin with webpack 4. +- [webpack-concat-plugin](https://github.com/hxlniada/webpack-concat-plugin) for concat and uglify files that needn't to be webpack bundles(for legacy files) and inject to html-webpack-plugin. +- [html-webpack-link-type-plugin](https://github.com/steadyapp/html-webpack-link-type-plugin) adds a configurable mimetype to resources injected as links (such as adding type="text/css" to external stylesheets) for compatibility with "strict mode". +- [csp-html-webpack-plugin](https://github.com/slackhq/csp-html-webpack-plugin) to add [Content Security Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy) meta tags to the HTML output +- [strict-csp-html-webpack-plugin](https://github.com/google/strict-csp/tree/main/strict-csp-html-webpack-plugin) to add a [**strict** Content-Security-Policy (CSP)](https://web.dev) as a `meta` tag to the HTML output. A strict CSP is specifically efficient against XSS attacks. +- [webpack-nomodule-plugin](https://github.com/swimmadude66/webpack-nomodule-plugin) allows you to add a `nomodule` attribute to specific injected scripts, which prevents the scripts from being loaded by newer browsers. Good for limiting loads of polyfills. +- [html-webpack-skip-assets-plugin](https://github.com/swimmadude66/html-webpack-skip-assets-plugin) Skip adding certain output files to the html file. Built as a drop-in replacement for [html-webpack-exclude-assets-plugin](https://www.npmjs.com/package/html-webpack-exclude-assets-plugin) and works with newer [html-webpack-plugin](https://github.com/jantimon/html-webpack-plugin) versions +- [html-webpack-inject-preload](https://github.com/principalstudio/html-webpack-inject-preload) allows to add preload links <link rel='preload'> anywhere you want. +- [inject-body-webpack-plugin](https://github.com/Jaid/inject-body-webpack-plugin) is a simple method of injecting a custom HTML string into the body. +- [html-webpack-plugin-django](https://github.com/TommasoAmici/html-webpack-plugin-django) a Webpack plugin to inject Django static tags. +- [html-webpack-inject-attributes-plugin](https://github.com/dyw934854565/html-webpack-inject-attributes-plugin) add extra attributes to inject assetTags. +- [js-entry-webpack-plugin](https://github.com/liam61/html-webpack-plugin) creates webpack bundles into your js entry

Usage

@@ -100,33 +98,31 @@ bundles in the head using `script` tags. Just add the plugin to your `webpack` config as follows: **webpack.config.js** + ```js -const HtmlWebpackPlugin = require('html-webpack-plugin') +const HtmlWebpackPlugin = require("html-webpack-plugin"); module.exports = { - entry: 'index.js', + entry: "index.js", output: { - path: __dirname + '/dist', - filename: 'index_bundle.js' + path: __dirname + "/dist", + filename: "index_bundle.js", }, - plugins: [ - new HtmlWebpackPlugin() - ] -} + plugins: [new HtmlWebpackPlugin()], +}; ``` This will generate a file `dist/index.html` containing the following ```html - + - + Webpack App - - + ``` @@ -142,31 +138,32 @@ If you have plugins that make use of it, `html-webpack-plugin` should be ordered You can pass a hash of configuration options to `html-webpack-plugin`. Allowed values are as follows: -|Name|Type|Default|Description| -|:--:|:--:|:-----:|:----------| -|**`title`**|`{String}`|`Webpack App`|The title to use for the generated HTML document| -|**`filename`**|`{String\|Function}`|`'index.html'`|The file to write the HTML to. Defaults to `index.html`. You can specify a subdirectory here too (eg: `assets/admin.html`). The `[name]` placeholder will be replaced with the entry name. Can also be a function e.g. `(entryName) => entryName + '.html'`. | -|**`template`**|`{String}`|``|`webpack` relative or absolute path to the template. By default it will use `src/index.ejs` if it exists. Please see the [docs](https://github.com/jantimon/html-webpack-plugin/blob/master/docs/template-option.md) for details| -|**`templateContent`**|`{string\|Function\|false}`|false| Can be used instead of `template` to provide an inline template - please read the [Writing Your Own Templates](https://github.com/jantimon/html-webpack-plugin#writing-your-own-templates) section | -|**`templateParameters`**|`{Boolean\|Object\|Function}`| `false`| Allows to overwrite the parameters used in the template - see [example](https://github.com/jantimon/html-webpack-plugin/tree/master/examples/template-parameters) | -|**`inject`**|`{Boolean\|String}`|`true`|`true \|\| 'head' \|\| 'body' \|\| false` Inject all assets into the given `template` or `templateContent`. When passing `'body'` all javascript resources will be placed at the bottom of the body element. `'head'` will place the scripts in the head element. Passing `true` will add it to the head/body depending on the `scriptLoading` option. Passing `false` will disable automatic injections. - see the [inject:false example](https://github.com/jantimon/html-webpack-plugin/tree/master/examples/custom-insertion-position)| -|**`publicPath`**|`{String\|'auto'}`|`'auto'`|The publicPath used for script and link tags| -|**`scriptLoading`**|`{'blocking'\|'defer'\|'module'\|'systemjs-module'}`|`'defer'`| Modern browsers support non blocking javascript loading (`'defer'`) to improve the page startup performance. Setting to `'module'` adds attribute [`type="module"`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#applying_the_module_to_your_html). This also implies "defer", since modules are automatically deferred. | -|**`favicon`**|`{String}`|``|Adds the given favicon path to the output HTML| -|**`meta`**|`{Object}`|`{}`|Allows to inject `meta`-tags. E.g. `meta: {viewport: 'width=device-width, initial-scale=1, shrink-to-fit=no'}`| -|**`base`**|`{Object\|String\|false}`|`false`|Inject a [`base`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base) tag. E.g. `base: "https://example.com/path/page.html`| -|**`minify`**|`{Boolean\|Object}`|`true` if `mode` is `'production'`, otherwise `false`|Controls if and in what ways the output should be minified. See [minification](#minification) below for more details.| -|**`hash`**|`{Boolean}`|`false`|If `true` then append a unique `webpack` compilation hash to all included scripts and CSS files (i.e. `main.js?hash=compilation_hash`). This is useful for cache busting| -|**`cache`**|`{Boolean}`|`true`|Emit the file only if it was changed| -|**`showErrors`**|`{Boolean}`|`true`|Errors details will be written into the HTML page| -|**`chunks`**|`{?}`|`?`|Allows you to add only some chunks (e.g only the unit-test chunk)| -|**`chunksSortMode`**|`{String\|Function}`|`auto`|Allows to control how chunks should be sorted before they are included to the HTML. Allowed values are `'none' \| 'auto' \| 'manual' \| {Function}`| -|**`excludeChunks`**|`{Array.}`|``|Allows you to skip some chunks (e.g don't add the unit-test chunk)| -|**`xhtml`**|`{Boolean}`|`false`|If `true` render the `link` tags as self-closing (XHTML compliant)| +| Name | Type | Default | Description | +| :----------------------: | :--------------------------------------------------: | :---------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| **`title`** | `{String}` | `Webpack App` | The title to use for the generated HTML document | +| **`filename`** | `{String\|Function}` | `'index.html'` | The file to write the HTML to. Defaults to `index.html`. You can specify a subdirectory here too (eg: `assets/admin.html`). The `[name]` placeholder will be replaced with the entry name. Can also be a function e.g. `(entryName) => entryName + '.html'`. | +| **`template`** | `{String}` | `` | `webpack` relative or absolute path to the template. By default it will use `src/index.ejs` if it exists. Please see the [docs](https://github.com/jantimon/html-webpack-plugin/blob/master/docs/template-option.md) for details | +| **`templateContent`** | `{string\|Function\|false}` | false | Can be used instead of `template` to provide an inline template - please read the [Writing Your Own Templates](https://github.com/jantimon/html-webpack-plugin#writing-your-own-templates) section | +| **`templateParameters`** | `{Boolean\|Object\|Function}` | `false` | Allows to overwrite the parameters used in the template - see [example](https://github.com/jantimon/html-webpack-plugin/tree/master/examples/template-parameters) | +| **`inject`** | `{Boolean\|String}` | `true` | `true \|\| 'head' \|\| 'body' \|\| false` Inject all assets into the given `template` or `templateContent`. When passing `'body'` all javascript resources will be placed at the bottom of the body element. `'head'` will place the scripts in the head element. Passing `true` will add it to the head/body depending on the `scriptLoading` option. Passing `false` will disable automatic injections. - see the [inject:false example](https://github.com/jantimon/html-webpack-plugin/tree/master/examples/custom-insertion-position) | +| **`publicPath`** | `{String\|'auto'}` | `'auto'` | The publicPath used for script and link tags | +| **`scriptLoading`** | `{'blocking'\|'defer'\|'module'\|'systemjs-module'}` | `'defer'` | Modern browsers support non blocking javascript loading (`'defer'`) to improve the page startup performance. Setting to `'module'` adds attribute [`type="module"`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#applying_the_module_to_your_html). This also implies "defer", since modules are automatically deferred. | +| **`favicon`** | `{String}` | `` | Adds the given favicon path to the output HTML | +| **`meta`** | `{Object}` | `{}` | Allows to inject `meta`-tags. E.g. `meta: {viewport: 'width=device-width, initial-scale=1, shrink-to-fit=no'}` | +| **`base`** | `{Object\|String\|false}` | `false` | Inject a [`base`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/base) tag. E.g. `base: "https://example.com/path/page.html` | +| **`minify`** | `{Boolean\|Object}` | `true` if `mode` is `'production'`, otherwise `false` | Controls if and in what ways the output should be minified. See [minification](#minification) below for more details. | +| **`hash`** | `{Boolean}` | `false` | If `true` then append a unique `webpack` compilation hash to all included scripts and CSS files (i.e. `main.js?hash=compilation_hash`). This is useful for cache busting | +| **`cache`** | `{Boolean}` | `true` | Emit the file only if it was changed | +| **`showErrors`** | `{Boolean}` | `true` | Errors details will be written into the HTML page | +| **`chunks`** | `{?}` | `?` | Allows you to add only some chunks (e.g only the unit-test chunk) | +| **`chunksSortMode`** | `{String\|Function}` | `auto` | Allows to control how chunks should be sorted before they are included to the HTML. Allowed values are `'none' \| 'auto' \| 'manual' \| {Function}` | +| **`excludeChunks`** | `{Array.}` | `` | Allows you to skip some chunks (e.g don't add the unit-test chunk) | +| **`xhtml`** | `{Boolean}` | `false` | If `true` render the `link` tags as self-closing (XHTML compliant) | Here's an example webpack config illustrating how to use these options **webpack.config.js** + ```js { entry: 'index.js', @@ -189,6 +186,7 @@ To generate more than one HTML file, declare the plugin more than once in your plugins array **webpack.config.js** + ```js { entry: 'index.js', @@ -218,23 +216,23 @@ Details of other template loaders are [documented here](https://github.com/janti ```js plugins: [ new HtmlWebpackPlugin({ - title: 'Custom template', + title: "Custom template", // Load a custom template (lodash by default) - template: 'index.html' - }) -] + template: "index.html", + }), +]; ``` **index.html** + ```html - + - + <%= htmlWebpackPlugin.options.title %> - - + ``` @@ -242,6 +240,7 @@ If you already have a template loader, you can use it to parse the template. Please note that this will also happen if you specify the html-loader and use `.html` file as template. **webpack.config.js** + ```js module: { loaders: [ @@ -263,22 +262,21 @@ The following variables are available in the template by default (you can extend - `htmlWebpackPlugin`: data specific to this plugin - `htmlWebpackPlugin.options`: the options hash that was passed to - the plugin. In addition to the options actually used by this plugin, - you can use this hash to pass arbitrary data through to your template. + the plugin. In addition to the options actually used by this plugin, + you can use this hash to pass arbitrary data through to your template. - `htmlWebpackPlugin.tags`: the prepared `headTags` and `bodyTags` Array to render the ``, ``, `

Partial

\ No newline at end of file +Webpack App

Partial

\ No newline at end of file diff --git a/examples/custom-template/dist/webpack-5/styles.css b/examples/custom-template/dist/webpack-5/styles.css index e86486ba..ebc7ed83 100644 --- a/examples/custom-template/dist/webpack-5/styles.css +++ b/examples/custom-template/dist/webpack-5/styles.css @@ -1,3 +1,4 @@ body { background: snow; } + diff --git a/examples/custom-template/example.js b/examples/custom-template/example.js index d62766b0..1d62851d 100755 --- a/examples/custom-template/example.js +++ b/examples/custom-template/example.js @@ -1,4 +1,4 @@ -require('./main.css'); -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +require("./main.css"); +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); diff --git a/examples/custom-template/main.css b/examples/custom-template/main.css index 232a2cdb..e86486ba 100644 --- a/examples/custom-template/main.css +++ b/examples/custom-template/main.css @@ -1,3 +1,3 @@ body { background: snow; -} \ No newline at end of file +} diff --git a/examples/custom-template/partial.html b/examples/custom-template/partial.html index 47dc0f7a..d5dc94ee 100644 --- a/examples/custom-template/partial.html +++ b/examples/custom-template/partial.html @@ -1,2 +1,2 @@

Partial

- \ No newline at end of file + diff --git a/examples/custom-template/template.html b/examples/custom-template/template.html index 1ffee6cd..45d49cfe 100644 --- a/examples/custom-template/template.html +++ b/examples/custom-template/template.html @@ -1,11 +1,11 @@ - - - <%= htmlWebpackPlugin.options.title %> - - - - <%= require('html-loader!./partial.html').default %> - + + + <%= htmlWebpackPlugin.options.title %> + + + + <%= require('html-loader!./partial.html').default %> + diff --git a/examples/custom-template/webpack.config.js b/examples/custom-template/webpack.config.js index b20de1c8..e0effb51 100755 --- a/examples/custom-template/webpack.config.js +++ b/examples/custom-template/webpack.config.js @@ -1,26 +1,26 @@ -var path = require('path'); -var HtmlWebpackPlugin = require('../..'); -var MiniCssExtractPlugin = require('mini-css-extract-plugin'); -var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +var path = require("path"); +var HtmlWebpackPlugin = require("../.."); +var MiniCssExtractPlugin = require("mini-css-extract-plugin"); +var webpackMajorVersion = require("webpack/package.json").version.split(".")[0]; module.exports = { context: __dirname, - entry: './example.js', + entry: "./example.js", output: { - path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion), - publicPath: '', - filename: 'bundle.js' + path: path.join(__dirname, "dist/webpack-" + webpackMajorVersion), + publicPath: "", + filename: "bundle.js", }, module: { rules: [ - { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] }, - { test: /\.png$/, type: 'asset/resource' } - ] + { test: /\.css$/, use: [MiniCssExtractPlugin.loader, "css-loader"] }, + { test: /\.png$/, type: "asset/resource" }, + ], }, plugins: [ new HtmlWebpackPlugin({ - template: 'template.html' + template: "template.html", }), - new MiniCssExtractPlugin({ filename: 'styles.css' }) - ] + new MiniCssExtractPlugin({ filename: "styles.css" }), + ], }; diff --git a/examples/default/dist/webpack-5/bundle.js b/examples/default/dist/webpack-5/bundle.js index cd921216..53aa7b37 100644 --- a/examples/default/dist/webpack-5/bundle.js +++ b/examples/default/dist/webpack-5/bundle.js @@ -14,7 +14,7 @@ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); // Module -___CSS_LOADER_EXPORT___.push([module.id, "body {\n background: snow;\n}", ""]); +___CSS_LOADER_EXPORT___.push([module.id, "body {\n background: snow;\n}\n", ""]); // Exports /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); @@ -474,8 +474,8 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { __webpack_require__(488); -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); })(); diff --git a/examples/default/example.js b/examples/default/example.js index d62766b0..1d62851d 100755 --- a/examples/default/example.js +++ b/examples/default/example.js @@ -1,4 +1,4 @@ -require('./main.css'); -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +require("./main.css"); +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); diff --git a/examples/default/main.css b/examples/default/main.css index 232a2cdb..e86486ba 100644 --- a/examples/default/main.css +++ b/examples/default/main.css @@ -1,3 +1,3 @@ body { background: snow; -} \ No newline at end of file +} diff --git a/examples/default/readme.md b/examples/default/readme.md index 8e9aa8f9..f66618d0 100644 --- a/examples/default/readme.md +++ b/examples/default/readme.md @@ -1,3 +1,3 @@ # zero-config example -in this example only the default configuration is used \ No newline at end of file +in this example only the default configuration is used diff --git a/examples/default/webpack.config.js b/examples/default/webpack.config.js index 21cf98ba..cd84e18d 100755 --- a/examples/default/webpack.config.js +++ b/examples/default/webpack.config.js @@ -1,22 +1,20 @@ -var path = require('path'); -var HtmlWebpackPlugin = require('../..'); -var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +var path = require("path"); +var HtmlWebpackPlugin = require("../.."); +var webpackMajorVersion = require("webpack/package.json").version.split(".")[0]; module.exports = { context: __dirname, - entry: './example.js', + entry: "./example.js", output: { - path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion), - publicPath: '', - filename: 'bundle.js' + path: path.join(__dirname, "dist/webpack-" + webpackMajorVersion), + publicPath: "", + filename: "bundle.js", }, module: { rules: [ - { test: /\.css$/, use: ['style-loader', 'css-loader'] }, - { test: /\.png$/, type: 'asset/resource' } - ] + { test: /\.css$/, use: ["style-loader", "css-loader"] }, + { test: /\.png$/, type: "asset/resource" }, + ], }, - plugins: [ - new HtmlWebpackPlugin() - ] + plugins: [new HtmlWebpackPlugin()], }; diff --git a/examples/favicon/dist/webpack-5/bundle.js b/examples/favicon/dist/webpack-5/bundle.js index 595e56d0..1ca6da07 100644 --- a/examples/favicon/dist/webpack-5/bundle.js +++ b/examples/favicon/dist/webpack-5/bundle.js @@ -54,8 +54,8 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { __webpack_require__(268); -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); })(); diff --git a/examples/favicon/dist/webpack-5/styles.css b/examples/favicon/dist/webpack-5/styles.css index e86486ba..ebc7ed83 100644 --- a/examples/favicon/dist/webpack-5/styles.css +++ b/examples/favicon/dist/webpack-5/styles.css @@ -1,3 +1,4 @@ body { background: snow; } + diff --git a/examples/favicon/example.js b/examples/favicon/example.js index d62766b0..1d62851d 100755 --- a/examples/favicon/example.js +++ b/examples/favicon/example.js @@ -1,4 +1,4 @@ -require('./main.css'); -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +require("./main.css"); +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); diff --git a/examples/favicon/main.css b/examples/favicon/main.css index 232a2cdb..e86486ba 100644 --- a/examples/favicon/main.css +++ b/examples/favicon/main.css @@ -1,3 +1,3 @@ body { background: snow; -} \ No newline at end of file +} diff --git a/examples/favicon/template.html b/examples/favicon/template.html index b7b4f973..5f7bfadc 100644 --- a/examples/favicon/template.html +++ b/examples/favicon/template.html @@ -1,11 +1,11 @@ - - - Example template - - - - - - \ No newline at end of file + + + Example template + + + + + + diff --git a/examples/favicon/webpack.config.js b/examples/favicon/webpack.config.js index 2a06d880..ebe43802 100755 --- a/examples/favicon/webpack.config.js +++ b/examples/favicon/webpack.config.js @@ -1,28 +1,28 @@ -var path = require('path'); -var HtmlWebpackPlugin = require('../..'); -var MiniCssExtractPlugin = require('mini-css-extract-plugin'); -var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +var path = require("path"); +var HtmlWebpackPlugin = require("../.."); +var MiniCssExtractPlugin = require("mini-css-extract-plugin"); +var webpackMajorVersion = require("webpack/package.json").version.split(".")[0]; module.exports = { context: __dirname, - entry: './example.js', + entry: "./example.js", output: { - path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion), - publicPath: '', - filename: 'bundle.js' + path: path.join(__dirname, "dist/webpack-" + webpackMajorVersion), + publicPath: "", + filename: "bundle.js", }, module: { rules: [ - { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] }, - { test: /\.png$/, type: 'asset/resource' } - ] + { test: /\.css$/, use: [MiniCssExtractPlugin.loader, "css-loader"] }, + { test: /\.png$/, type: "asset/resource" }, + ], }, plugins: [ new HtmlWebpackPlugin({ - title: 'HtmlWebpackPlugin example', - favicon: 'favicon.ico', - filename: 'favicon.html' + title: "HtmlWebpackPlugin example", + favicon: "favicon.ico", + filename: "favicon.html", }), - new MiniCssExtractPlugin({ filename: 'styles.css' }) - ] + new MiniCssExtractPlugin({ filename: "styles.css" }), + ], }; diff --git a/examples/html-loader/dist/webpack-5/about.html b/examples/html-loader/dist/webpack-5/about.html index 1d9bfc7c..2fe09424 100644 --- a/examples/html-loader/dist/webpack-5/about.html +++ b/examples/html-loader/dist/webpack-5/about.html @@ -1 +1 @@ -Example template \ No newline at end of file +Example template \ No newline at end of file diff --git a/examples/html-loader/dist/webpack-5/bundle.js b/examples/html-loader/dist/webpack-5/bundle.js index 595e56d0..1ca6da07 100644 --- a/examples/html-loader/dist/webpack-5/bundle.js +++ b/examples/html-loader/dist/webpack-5/bundle.js @@ -54,8 +54,8 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { __webpack_require__(268); -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); })(); diff --git a/examples/html-loader/dist/webpack-5/index.html b/examples/html-loader/dist/webpack-5/index.html index 1d9bfc7c..2fe09424 100644 --- a/examples/html-loader/dist/webpack-5/index.html +++ b/examples/html-loader/dist/webpack-5/index.html @@ -1 +1 @@ -Example template \ No newline at end of file +Example template \ No newline at end of file diff --git a/examples/html-loader/dist/webpack-5/styles.css b/examples/html-loader/dist/webpack-5/styles.css index e86486ba..ebc7ed83 100644 --- a/examples/html-loader/dist/webpack-5/styles.css +++ b/examples/html-loader/dist/webpack-5/styles.css @@ -1,3 +1,4 @@ body { background: snow; } + diff --git a/examples/html-loader/example.js b/examples/html-loader/example.js index d62766b0..1d62851d 100755 --- a/examples/html-loader/example.js +++ b/examples/html-loader/example.js @@ -1,4 +1,4 @@ -require('./main.css'); -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +require("./main.css"); +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); diff --git a/examples/html-loader/main.css b/examples/html-loader/main.css index 232a2cdb..e86486ba 100644 --- a/examples/html-loader/main.css +++ b/examples/html-loader/main.css @@ -1,3 +1,3 @@ body { background: snow; -} \ No newline at end of file +} diff --git a/examples/html-loader/template.html b/examples/html-loader/template.html index b7b4f973..5f7bfadc 100644 --- a/examples/html-loader/template.html +++ b/examples/html-loader/template.html @@ -1,11 +1,11 @@ - - - Example template - - - - - - \ No newline at end of file + + + Example template + + + + + + diff --git a/examples/html-loader/webpack.config.js b/examples/html-loader/webpack.config.js index f89973c5..c1f3a6b0 100755 --- a/examples/html-loader/webpack.config.js +++ b/examples/html-loader/webpack.config.js @@ -1,34 +1,34 @@ -var path = require('path'); -var HtmlWebpackPlugin = require('../..'); -var MiniCssExtractPlugin = require('mini-css-extract-plugin'); -var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +var path = require("path"); +var HtmlWebpackPlugin = require("../.."); +var MiniCssExtractPlugin = require("mini-css-extract-plugin"); +var webpackMajorVersion = require("webpack/package.json").version.split(".")[0]; module.exports = { context: __dirname, - entry: './example.js', + entry: "./example.js", output: { - path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion), - publicPath: '', - filename: 'bundle.js' + path: path.join(__dirname, "dist/webpack-" + webpackMajorVersion), + publicPath: "", + filename: "bundle.js", }, module: { rules: [ - { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] }, - { test: /\.png$/, type: 'asset/resource' }, - { test: /\.html$/, loader: 'html-loader' } - ] + { test: /\.css$/, use: [MiniCssExtractPlugin.loader, "css-loader"] }, + { test: /\.png$/, type: "asset/resource" }, + { test: /\.html$/, loader: "html-loader" }, + ], }, plugins: [ new HtmlWebpackPlugin({ - filename: 'index.html', - favicon: 'favicon.ico', - template: 'template.html' + filename: "index.html", + favicon: "favicon.ico", + template: "template.html", }), new HtmlWebpackPlugin({ - filename: 'about.html', - favicon: 'favicon.ico', - template: 'template.html' + filename: "about.html", + favicon: "favicon.ico", + template: "template.html", }), - new MiniCssExtractPlugin({ filename: 'styles.css' }) - ] + new MiniCssExtractPlugin({ filename: "styles.css" }), + ], }; diff --git a/examples/inline/dist/webpack-5/bundle.js b/examples/inline/dist/webpack-5/bundle.js index 91d970f9..58d9d846 100644 --- a/examples/inline/dist/webpack-5/bundle.js +++ b/examples/inline/dist/webpack-5/bundle.js @@ -56,7 +56,7 @@ var __webpack_exports__ = {}; __webpack_require__(268); -console.log('Hello World'); +console.log("Hello World"); })(); diff --git a/examples/inline/dist/webpack-5/index.html b/examples/inline/dist/webpack-5/index.html index 3096c9a1..ded9fbbb 100644 --- a/examples/inline/dist/webpack-5/index.html +++ b/examples/inline/dist/webpack-5/index.html @@ -58,7 +58,7 @@ __webpack_require__(268); -console.log('Hello World'); +console.log("Hello World"); })(); diff --git a/examples/inline/dist/webpack-5/styles.css b/examples/inline/dist/webpack-5/styles.css index e86486ba..ebc7ed83 100644 --- a/examples/inline/dist/webpack-5/styles.css +++ b/examples/inline/dist/webpack-5/styles.css @@ -1,3 +1,4 @@ body { background: snow; } + diff --git a/examples/inline/example.js b/examples/inline/example.js index 74b36f74..7770dce7 100755 --- a/examples/inline/example.js +++ b/examples/inline/example.js @@ -1,4 +1,4 @@ -'use strict'; -require('./main.css'); +"use strict"; +require("./main.css"); -console.log('Hello World'); +console.log("Hello World"); diff --git a/examples/inline/main.css b/examples/inline/main.css index 232a2cdb..e86486ba 100644 --- a/examples/inline/main.css +++ b/examples/inline/main.css @@ -1,3 +1,3 @@ body { background: snow; -} \ No newline at end of file +} diff --git a/examples/inline/webpack.config.js b/examples/inline/webpack.config.js index 752644a5..e4752b33 100755 --- a/examples/inline/webpack.config.js +++ b/examples/inline/webpack.config.js @@ -1,31 +1,31 @@ -var path = require('path'); -var HtmlWebpackPlugin = require('../..'); -var MiniCssExtractPlugin = require('mini-css-extract-plugin'); -var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +var path = require("path"); +var HtmlWebpackPlugin = require("../.."); +var MiniCssExtractPlugin = require("mini-css-extract-plugin"); +var webpackMajorVersion = require("webpack/package.json").version.split(".")[0]; module.exports = { context: __dirname, - entry: './example.js', + entry: "./example.js", output: { - path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion), - publicPath: '', - filename: 'bundle.js' + path: path.join(__dirname, "dist/webpack-" + webpackMajorVersion), + publicPath: "", + filename: "bundle.js", }, module: { rules: [ - { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] }, - { test: /\.pug$/, loader: 'pug-loader' } - ] + { test: /\.css$/, use: [MiniCssExtractPlugin.loader, "css-loader"] }, + { test: /\.pug$/, loader: "pug-loader" }, + ], }, plugins: [ new HtmlWebpackPlugin({ inject: false, cache: false, - template: 'template.pug', - filename: 'index.html', - favicon: 'favicon.ico', - title: 'pug demo' + template: "template.pug", + filename: "index.html", + favicon: "favicon.ico", + title: "pug demo", }), - new MiniCssExtractPlugin({ filename: 'styles.css' }) - ] + new MiniCssExtractPlugin({ filename: "styles.css" }), + ], }; diff --git a/examples/javascript-advanced/dist/webpack-5/bundle.js b/examples/javascript-advanced/dist/webpack-5/bundle.js index 042804d3..10b57d15 100644 --- a/examples/javascript-advanced/dist/webpack-5/bundle.js +++ b/examples/javascript-advanced/dist/webpack-5/bundle.js @@ -12,15 +12,15 @@ /***/ 968: /***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => { -eval("__webpack_require__(268);\n\nvar universal = __webpack_require__(180);\nvar h1 = document.createElement('h1');\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?"); +eval("__webpack_require__(268);\n\nvar universal = __webpack_require__(612);\nvar h1 = document.createElement(\"h1\");\nh1.innerHTML = universal();\n\ndocument.body.appendChild(h1);\n\n\n//# sourceURL=webpack:///./example.js?"); /***/ }), -/***/ 180: +/***/ 612: /***/ ((module) => { "use strict"; -eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined';\n\nmodule.exports = function () {\n return 'Hello World from ' + (backend ? 'backend' : 'frontend');\n};\n\n\n//# sourceURL=webpack:///./universial.js?"); +eval("// This file is used for frontend and backend\n\n\n// If compiled by the html-webpack-plugin\n// HTML_WEBPACK_PLUGIN is set to true:\nvar backend = typeof HTML_WEBPACK_PLUGIN !== \"undefined\";\n\nmodule.exports = function () {\n return \"Hello World from \" + (backend ? \"backend\" : \"frontend\");\n};\n\n\n//# sourceURL=webpack:///./universal.js?"); /***/ }), diff --git a/examples/javascript-advanced/dist/webpack-5/index.html b/examples/javascript-advanced/dist/webpack-5/index.html index 216fe107..ddfa8474 100644 --- a/examples/javascript-advanced/dist/webpack-5/index.html +++ b/examples/javascript-advanced/dist/webpack-5/index.html @@ -1 +1 @@ -Webpack AppHello World from backend -

Partial

\ No newline at end of file +Webpack AppHello World from backend -

Partial

\ No newline at end of file diff --git a/examples/javascript-advanced/dist/webpack-5/styles.css b/examples/javascript-advanced/dist/webpack-5/styles.css index e86486ba..ebc7ed83 100644 --- a/examples/javascript-advanced/dist/webpack-5/styles.css +++ b/examples/javascript-advanced/dist/webpack-5/styles.css @@ -1,3 +1,4 @@ body { background: snow; } + diff --git a/examples/javascript-advanced/example.js b/examples/javascript-advanced/example.js index e5aff3bd..a0551d4b 100644 --- a/examples/javascript-advanced/example.js +++ b/examples/javascript-advanced/example.js @@ -1,7 +1,7 @@ -require('./main.css'); +require("./main.css"); -var universal = require('./universial.js'); -var h1 = document.createElement('h1'); +var universal = require("./universal.js"); +var h1 = document.createElement("h1"); h1.innerHTML = universal(); document.body.appendChild(h1); diff --git a/examples/javascript-advanced/main.css b/examples/javascript-advanced/main.css index 232a2cdb..e86486ba 100644 --- a/examples/javascript-advanced/main.css +++ b/examples/javascript-advanced/main.css @@ -1,3 +1,3 @@ body { background: snow; -} \ No newline at end of file +} diff --git a/examples/javascript-advanced/partial.html b/examples/javascript-advanced/partial.html index 47dc0f7a..d5dc94ee 100644 --- a/examples/javascript-advanced/partial.html +++ b/examples/javascript-advanced/partial.html @@ -1,2 +1,2 @@

Partial

- \ No newline at end of file + diff --git a/examples/javascript-advanced/readme.md b/examples/javascript-advanced/readme.md index 64d224d1..c27e87e6 100644 --- a/examples/javascript-advanced/readme.md +++ b/examples/javascript-advanced/readme.md @@ -1,4 +1,4 @@ # isomorphic javascript-advanced example This example is similar to the javascript example however it allows takes -parameters from the config and works asynchronously \ No newline at end of file +parameters from the config and works asynchronously diff --git a/examples/javascript-advanced/template.js b/examples/javascript-advanced/template.js index 2b006a25..97834b7b 100644 --- a/examples/javascript-advanced/template.js +++ b/examples/javascript-advanced/template.js @@ -1,13 +1,20 @@ // Webpack require: -var partial = require('./partial.html').default; -var universal = require('./universial.js'); +var partial = require("./partial.html").default; +var universal = require("./universal.js"); // Export a function / promise / or a string: // This function has to return a string or promised string: module.exports = function (templateParams) { - var html = '' + - '' + templateParams.htmlWebpackPlugin.options.title + '' + - '' + universal() + ' - ' + partial + ''; + var html = + "" + + "" + + templateParams.htmlWebpackPlugin.options.title + + "" + + "" + + universal() + + " - " + + partial + + ""; return html; }; diff --git a/examples/javascript-advanced/universial.js b/examples/javascript-advanced/universal.js similarity index 54% rename from examples/javascript-advanced/universial.js rename to examples/javascript-advanced/universal.js index e63d6880..c042b56f 100644 --- a/examples/javascript-advanced/universial.js +++ b/examples/javascript-advanced/universal.js @@ -1,10 +1,10 @@ // This file is used for frontend and backend -'use strict'; +"use strict"; // If compiled by the html-webpack-plugin // HTML_WEBPACK_PLUGIN is set to true: -var backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined'; +var backend = typeof HTML_WEBPACK_PLUGIN !== "undefined"; module.exports = function () { - return 'Hello World from ' + (backend ? 'backend' : 'frontend'); + return "Hello World from " + (backend ? "backend" : "frontend"); }; diff --git a/examples/javascript-advanced/webpack.config.js b/examples/javascript-advanced/webpack.config.js index a8e1af64..37f37492 100644 --- a/examples/javascript-advanced/webpack.config.js +++ b/examples/javascript-advanced/webpack.config.js @@ -1,28 +1,28 @@ -var path = require('path'); -var HtmlWebpackPlugin = require('../..'); -var MiniCssExtractPlugin = require('mini-css-extract-plugin'); -var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +var path = require("path"); +var HtmlWebpackPlugin = require("../.."); +var MiniCssExtractPlugin = require("mini-css-extract-plugin"); +var webpackMajorVersion = require("webpack/package.json").version.split(".")[0]; module.exports = { context: __dirname, - entry: './example.js', + entry: "./example.js", output: { - path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion), - publicPath: '', - filename: 'bundle.js' + path: path.join(__dirname, "dist/webpack-" + webpackMajorVersion), + publicPath: "", + filename: "bundle.js", }, module: { rules: [ - { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] }, - { test: /\.png$/, type: 'asset/resource' }, - { test: /\.html$/, loader: 'html-loader' } - ] + { test: /\.css$/, use: [MiniCssExtractPlugin.loader, "css-loader"] }, + { test: /\.png$/, type: "asset/resource" }, + { test: /\.html$/, loader: "html-loader" }, + ], }, - devtool: 'eval', + devtool: "eval", plugins: [ new HtmlWebpackPlugin({ - template: 'template.js' + template: "template.js", }), - new MiniCssExtractPlugin({ filename: 'styles.css' }) - ] + new MiniCssExtractPlugin({ filename: "styles.css" }), + ], }; diff --git a/examples/javascript/dist/webpack-5/bundle.js b/examples/javascript/dist/webpack-5/bundle.js index 7b4b5def..e2a2f549 100644 --- a/examples/javascript/dist/webpack-5/bundle.js +++ b/examples/javascript/dist/webpack-5/bundle.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ 180: +/***/ 612: /***/ ((module) => { "use strict"; @@ -10,10 +10,10 @@ // If compiled by the html-webpack-plugin // HTML_WEBPACK_PLUGIN is set to true: -var backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined'; +var backend = typeof HTML_WEBPACK_PLUGIN !== "undefined"; module.exports = function () { - return 'Hello World from ' + (backend ? 'backend' : 'frontend'); + return "Hello World from " + (backend ? "backend" : "frontend"); }; @@ -73,8 +73,8 @@ var __webpack_exports__ = {}; (() => { __webpack_require__(268); -var universal = __webpack_require__(180); -var h1 = document.createElement('h1'); +var universal = __webpack_require__(612); +var h1 = document.createElement("h1"); h1.innerHTML = universal(); document.body.appendChild(h1); diff --git a/examples/javascript/dist/webpack-5/index.html b/examples/javascript/dist/webpack-5/index.html index ad9b0008..02015c50 100644 --- a/examples/javascript/dist/webpack-5/index.html +++ b/examples/javascript/dist/webpack-5/index.html @@ -1 +1 @@ -Hello World from backend2024-02-05T14:49:33.127Z

Partial

\ No newline at end of file +Hello World from backend2024-02-05T16:38:00.642Z

Partial

\ No newline at end of file diff --git a/examples/javascript/dist/webpack-5/styles.css b/examples/javascript/dist/webpack-5/styles.css index e86486ba..ebc7ed83 100644 --- a/examples/javascript/dist/webpack-5/styles.css +++ b/examples/javascript/dist/webpack-5/styles.css @@ -1,3 +1,4 @@ body { background: snow; } + diff --git a/examples/javascript/example.js b/examples/javascript/example.js index e5aff3bd..a0551d4b 100644 --- a/examples/javascript/example.js +++ b/examples/javascript/example.js @@ -1,7 +1,7 @@ -require('./main.css'); +require("./main.css"); -var universal = require('./universial.js'); -var h1 = document.createElement('h1'); +var universal = require("./universal.js"); +var h1 = document.createElement("h1"); h1.innerHTML = universal(); document.body.appendChild(h1); diff --git a/examples/javascript/main.css b/examples/javascript/main.css index 232a2cdb..e86486ba 100644 --- a/examples/javascript/main.css +++ b/examples/javascript/main.css @@ -1,3 +1,3 @@ body { background: snow; -} \ No newline at end of file +} diff --git a/examples/javascript/partial.html b/examples/javascript/partial.html index 47dc0f7a..d5dc94ee 100644 --- a/examples/javascript/partial.html +++ b/examples/javascript/partial.html @@ -1,2 +1,2 @@

Partial

- \ No newline at end of file + diff --git a/examples/javascript/readme.md b/examples/javascript/readme.md index 06f9bccd..6063e769 100644 --- a/examples/javascript/readme.md +++ b/examples/javascript/readme.md @@ -2,4 +2,4 @@ This example shows how to generate a template on the fly using javascript. -The best way to debug the compilation result is `devTool:eval` \ No newline at end of file +The best way to debug the compilation result is `devTool:eval` diff --git a/examples/javascript/template.js b/examples/javascript/template.js index 33ca1b57..01664cfc 100644 --- a/examples/javascript/template.js +++ b/examples/javascript/template.js @@ -1,6 +1,6 @@ // Webpack require: -var partial = require('./partial.html').default; -var universal = require('./universial.js'); +var partial = require("./partial.html").default; +var universal = require("./universal.js"); // Export a function / promise / or a string: module.exports = universal() + new Date().toISOString() + partial; diff --git a/examples/javascript/universial.js b/examples/javascript/universal.js similarity index 54% rename from examples/javascript/universial.js rename to examples/javascript/universal.js index e63d6880..c042b56f 100644 --- a/examples/javascript/universial.js +++ b/examples/javascript/universal.js @@ -1,10 +1,10 @@ // This file is used for frontend and backend -'use strict'; +"use strict"; // If compiled by the html-webpack-plugin // HTML_WEBPACK_PLUGIN is set to true: -var backend = typeof HTML_WEBPACK_PLUGIN !== 'undefined'; +var backend = typeof HTML_WEBPACK_PLUGIN !== "undefined"; module.exports = function () { - return 'Hello World from ' + (backend ? 'backend' : 'frontend'); + return "Hello World from " + (backend ? "backend" : "frontend"); }; diff --git a/examples/javascript/webpack.config.js b/examples/javascript/webpack.config.js index 9945c4c5..a80d140c 100644 --- a/examples/javascript/webpack.config.js +++ b/examples/javascript/webpack.config.js @@ -1,25 +1,25 @@ -var path = require('path'); -var HtmlWebpackPlugin = require('../..'); -var MiniCssExtractPlugin = require('mini-css-extract-plugin'); -var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +var path = require("path"); +var HtmlWebpackPlugin = require("../.."); +var MiniCssExtractPlugin = require("mini-css-extract-plugin"); +var webpackMajorVersion = require("webpack/package.json").version.split(".")[0]; module.exports = { context: __dirname, - entry: './example.js', + entry: "./example.js", output: { - path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion), - filename: 'bundle.js' + path: path.join(__dirname, "dist/webpack-" + webpackMajorVersion), + filename: "bundle.js", }, module: { rules: [ - { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] }, - { test: /\.png$/, type: 'asset/resource' }, - { test: /\.html$/, loader: 'html-loader' } - ] + { test: /\.css$/, use: [MiniCssExtractPlugin.loader, "css-loader"] }, + { test: /\.png$/, type: "asset/resource" }, + { test: /\.html$/, loader: "html-loader" }, + ], }, plugins: [ new HtmlWebpackPlugin({ - template: 'template.js' + template: "template.js", }), - new MiniCssExtractPlugin({ filename: 'styles.css' }) - ] + new MiniCssExtractPlugin({ filename: "styles.css" }), + ], }; diff --git a/examples/multi-page/dist/webpack-5/first.js b/examples/multi-page/dist/webpack-5/first.js index cd921216..53aa7b37 100644 --- a/examples/multi-page/dist/webpack-5/first.js +++ b/examples/multi-page/dist/webpack-5/first.js @@ -14,7 +14,7 @@ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); // Module -___CSS_LOADER_EXPORT___.push([module.id, "body {\n background: snow;\n}", ""]); +___CSS_LOADER_EXPORT___.push([module.id, "body {\n background: snow;\n}\n", ""]); // Exports /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); @@ -474,8 +474,8 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { __webpack_require__(488); -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); })(); diff --git a/examples/multi-page/dist/webpack-5/second.js b/examples/multi-page/dist/webpack-5/second.js index cd921216..53aa7b37 100644 --- a/examples/multi-page/dist/webpack-5/second.js +++ b/examples/multi-page/dist/webpack-5/second.js @@ -14,7 +14,7 @@ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]}); // Module -___CSS_LOADER_EXPORT___.push([module.id, "body {\n background: snow;\n}", ""]); +___CSS_LOADER_EXPORT___.push([module.id, "body {\n background: snow;\n}\n", ""]); // Exports /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___); @@ -474,8 +474,8 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { __webpack_require__(488); -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); })(); diff --git a/examples/multi-page/first.js b/examples/multi-page/first.js index d62766b0..1d62851d 100755 --- a/examples/multi-page/first.js +++ b/examples/multi-page/first.js @@ -1,4 +1,4 @@ -require('./main.css'); -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +require("./main.css"); +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); diff --git a/examples/multi-page/main.css b/examples/multi-page/main.css index 232a2cdb..e86486ba 100644 --- a/examples/multi-page/main.css +++ b/examples/multi-page/main.css @@ -1,3 +1,3 @@ body { background: snow; -} \ No newline at end of file +} diff --git a/examples/multi-page/readme.md b/examples/multi-page/readme.md index 8e9aa8f9..f66618d0 100644 --- a/examples/multi-page/readme.md +++ b/examples/multi-page/readme.md @@ -1,3 +1,3 @@ # zero-config example -in this example only the default configuration is used \ No newline at end of file +in this example only the default configuration is used diff --git a/examples/multi-page/second.js b/examples/multi-page/second.js index d62766b0..1d62851d 100755 --- a/examples/multi-page/second.js +++ b/examples/multi-page/second.js @@ -1,4 +1,4 @@ -require('./main.css'); -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +require("./main.css"); +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); diff --git a/examples/multi-page/webpack.config.js b/examples/multi-page/webpack.config.js index addf311b..1015c6e1 100755 --- a/examples/multi-page/webpack.config.js +++ b/examples/multi-page/webpack.config.js @@ -1,27 +1,27 @@ -var path = require('path'); -var HtmlWebpackPlugin = require('../..'); -var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +var path = require("path"); +var HtmlWebpackPlugin = require("../.."); +var webpackMajorVersion = require("webpack/package.json").version.split(".")[0]; module.exports = { context: __dirname, entry: { - first: './first.js', - second: './second.js' + first: "./first.js", + second: "./second.js", }, output: { - path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion), - publicPath: '', - filename: '[name].js' + path: path.join(__dirname, "dist/webpack-" + webpackMajorVersion), + publicPath: "", + filename: "[name].js", }, module: { rules: [ - { test: /\.css$/, use: ['style-loader', 'css-loader'] }, - { test: /\.png$/, type: 'asset/resource' } - ] + { test: /\.css$/, use: ["style-loader", "css-loader"] }, + { test: /\.png$/, type: "asset/resource" }, + ], }, plugins: [ new HtmlWebpackPlugin({ - filename: '[name].html' - }) - ] + filename: "[name].html", + }), + ], }; diff --git a/examples/pug-loader/dist/webpack-5/bundle.js b/examples/pug-loader/dist/webpack-5/bundle.js index 9d9f2cdb..2e42857f 100644 --- a/examples/pug-loader/dist/webpack-5/bundle.js +++ b/examples/pug-loader/dist/webpack-5/bundle.js @@ -379,9 +379,9 @@ __webpack_require__(268); var template = __webpack_require__(384); setInterval(function () { - var div = document.getElementById('main'); + var div = document.getElementById("main"); div.innerHTML = template({ time: new Date() }); - div.style.color = 'navy'; + div.style.color = "navy"; }, 1000); })(); diff --git a/examples/pug-loader/dist/webpack-5/styles.css b/examples/pug-loader/dist/webpack-5/styles.css index e86486ba..ebc7ed83 100644 --- a/examples/pug-loader/dist/webpack-5/styles.css +++ b/examples/pug-loader/dist/webpack-5/styles.css @@ -1,3 +1,4 @@ body { background: snow; } + diff --git a/examples/pug-loader/example.js b/examples/pug-loader/example.js index e165e6d8..f98510c0 100755 --- a/examples/pug-loader/example.js +++ b/examples/pug-loader/example.js @@ -1,10 +1,10 @@ -'use strict'; -require('./main.css'); +"use strict"; +require("./main.css"); // Use the same template for the frontend code -var template = require('./time.pug'); +var template = require("./time.pug"); setInterval(function () { - var div = document.getElementById('main'); + var div = document.getElementById("main"); div.innerHTML = template({ time: new Date() }); - div.style.color = 'navy'; + div.style.color = "navy"; }, 1000); diff --git a/examples/pug-loader/main.css b/examples/pug-loader/main.css index 232a2cdb..e86486ba 100644 --- a/examples/pug-loader/main.css +++ b/examples/pug-loader/main.css @@ -1,3 +1,3 @@ body { background: snow; -} \ No newline at end of file +} diff --git a/examples/pug-loader/webpack.config.js b/examples/pug-loader/webpack.config.js index d674918a..ce98948a 100755 --- a/examples/pug-loader/webpack.config.js +++ b/examples/pug-loader/webpack.config.js @@ -1,30 +1,30 @@ -var path = require('path'); -var HtmlWebpackPlugin = require('../..'); -var MiniCssExtractPlugin = require('mini-css-extract-plugin'); -var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +var path = require("path"); +var HtmlWebpackPlugin = require("../.."); +var MiniCssExtractPlugin = require("mini-css-extract-plugin"); +var webpackMajorVersion = require("webpack/package.json").version.split(".")[0]; module.exports = { context: __dirname, - entry: './example.js', + entry: "./example.js", output: { - path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion), - publicPath: '', - filename: 'bundle.js' + path: path.join(__dirname, "dist/webpack-" + webpackMajorVersion), + publicPath: "", + filename: "bundle.js", }, module: { rules: [ - { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] }, - { test: /\.png$/, type: 'asset/resource' }, - { test: /\.pug$/, loader: 'pug-loader' } - ] + { test: /\.css$/, use: [MiniCssExtractPlugin.loader, "css-loader"] }, + { test: /\.png$/, type: "asset/resource" }, + { test: /\.pug$/, loader: "pug-loader" }, + ], }, plugins: [ new HtmlWebpackPlugin({ - filename: 'index.html', - favicon: 'favicon.ico', - template: 'template.pug', - title: 'pug demo' + filename: "index.html", + favicon: "favicon.ico", + template: "template.pug", + title: "pug demo", }), - new MiniCssExtractPlugin({ filename: 'styles.css' }) - ] + new MiniCssExtractPlugin({ filename: "styles.css" }), + ], }; diff --git a/examples/sort-manually/a.js b/examples/sort-manually/a.js index 51752093..df10f763 100644 --- a/examples/sort-manually/a.js +++ b/examples/sort-manually/a.js @@ -1,4 +1,4 @@ -require('./main.css'); -var h1 = document.createElement('h1'); -h1.innerHTML = 'a!'; +require("./main.css"); +var h1 = document.createElement("h1"); +h1.innerHTML = "a!"; document.body.appendChild(h1); diff --git a/examples/sort-manually/b.js b/examples/sort-manually/b.js index 2744f27e..2fb82151 100644 --- a/examples/sort-manually/b.js +++ b/examples/sort-manually/b.js @@ -1,3 +1,3 @@ -var h1 = document.createElement('h1'); -h1.innerHTML = 'b!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "b!"; document.body.appendChild(h1); diff --git a/examples/sort-manually/c.js b/examples/sort-manually/c.js index 9d70cf50..cfc6ea71 100644 --- a/examples/sort-manually/c.js +++ b/examples/sort-manually/c.js @@ -1,3 +1,3 @@ -var h1 = document.createElement('h1'); -h1.innerHTML = 'c!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "c!"; document.body.appendChild(h1); diff --git a/examples/sort-manually/d.js b/examples/sort-manually/d.js index bd4f3eff..65317c8e 100644 --- a/examples/sort-manually/d.js +++ b/examples/sort-manually/d.js @@ -1,3 +1,3 @@ -var h1 = document.createElement('h1'); -h1.innerHTML = 'd!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "d!"; document.body.appendChild(h1); diff --git a/examples/sort-manually/dist/webpack-5/a.js b/examples/sort-manually/dist/webpack-5/a.js index 5e549c32..0f6c0963 100644 --- a/examples/sort-manually/dist/webpack-5/a.js +++ b/examples/sort-manually/dist/webpack-5/a.js @@ -54,8 +54,8 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk. (() => { __webpack_require__(268); -var h1 = document.createElement('h1'); -h1.innerHTML = 'a!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "a!"; document.body.appendChild(h1); })(); diff --git a/examples/sort-manually/dist/webpack-5/b.js b/examples/sort-manually/dist/webpack-5/b.js index 855d0392..96c44e86 100644 --- a/examples/sort-manually/dist/webpack-5/b.js +++ b/examples/sort-manually/dist/webpack-5/b.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap var __webpack_exports__ = {}; -var h1 = document.createElement('h1'); -h1.innerHTML = 'b!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "b!"; document.body.appendChild(h1); /******/ })() diff --git a/examples/sort-manually/dist/webpack-5/c.js b/examples/sort-manually/dist/webpack-5/c.js index 334b9dd6..4c6261ae 100644 --- a/examples/sort-manually/dist/webpack-5/c.js +++ b/examples/sort-manually/dist/webpack-5/c.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap var __webpack_exports__ = {}; -var h1 = document.createElement('h1'); -h1.innerHTML = 'c!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "c!"; document.body.appendChild(h1); /******/ })() diff --git a/examples/sort-manually/dist/webpack-5/d.js b/examples/sort-manually/dist/webpack-5/d.js index 17f857db..4071cd9c 100644 --- a/examples/sort-manually/dist/webpack-5/d.js +++ b/examples/sort-manually/dist/webpack-5/d.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap var __webpack_exports__ = {}; -var h1 = document.createElement('h1'); -h1.innerHTML = 'd!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "d!"; document.body.appendChild(h1); /******/ })() diff --git a/examples/sort-manually/dist/webpack-5/e.js b/examples/sort-manually/dist/webpack-5/e.js index b8448b95..f8613973 100644 --- a/examples/sort-manually/dist/webpack-5/e.js +++ b/examples/sort-manually/dist/webpack-5/e.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap var __webpack_exports__ = {}; -var h1 = document.createElement('h1'); -h1.innerHTML = 'e!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "e!"; document.body.appendChild(h1); /******/ })() diff --git a/examples/sort-manually/dist/webpack-5/first-file.html b/examples/sort-manually/dist/webpack-5/first-file.html index 052442cb..338f20a3 100644 --- a/examples/sort-manually/dist/webpack-5/first-file.html +++ b/examples/sort-manually/dist/webpack-5/first-file.html @@ -1 +1 @@ -Example template \ No newline at end of file +Example template \ No newline at end of file diff --git a/examples/sort-manually/dist/webpack-5/second-file.html b/examples/sort-manually/dist/webpack-5/second-file.html index bf112e6e..0a4ff03e 100644 --- a/examples/sort-manually/dist/webpack-5/second-file.html +++ b/examples/sort-manually/dist/webpack-5/second-file.html @@ -1 +1 @@ -Example template \ No newline at end of file +Example template \ No newline at end of file diff --git a/examples/sort-manually/dist/webpack-5/styles.css b/examples/sort-manually/dist/webpack-5/styles.css index e86486ba..ebc7ed83 100644 --- a/examples/sort-manually/dist/webpack-5/styles.css +++ b/examples/sort-manually/dist/webpack-5/styles.css @@ -1,3 +1,4 @@ body { background: snow; } + diff --git a/examples/sort-manually/e.js b/examples/sort-manually/e.js index 6083d99e..49cd8f3e 100644 --- a/examples/sort-manually/e.js +++ b/examples/sort-manually/e.js @@ -1,3 +1,3 @@ -var h1 = document.createElement('h1'); -h1.innerHTML = 'e!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "e!"; document.body.appendChild(h1); diff --git a/examples/sort-manually/main.css b/examples/sort-manually/main.css index 232a2cdb..e86486ba 100644 --- a/examples/sort-manually/main.css +++ b/examples/sort-manually/main.css @@ -1,3 +1,3 @@ body { background: snow; -} \ No newline at end of file +} diff --git a/examples/sort-manually/template.html b/examples/sort-manually/template.html index b7b4f973..5f7bfadc 100644 --- a/examples/sort-manually/template.html +++ b/examples/sort-manually/template.html @@ -1,11 +1,11 @@ - - - Example template - - - - - - \ No newline at end of file + + + Example template + + + + + + diff --git a/examples/sort-manually/webpack.config.js b/examples/sort-manually/webpack.config.js index 76d2fd34..bf4703f9 100644 --- a/examples/sort-manually/webpack.config.js +++ b/examples/sort-manually/webpack.config.js @@ -1,43 +1,43 @@ -var path = require('path'); -var HtmlWebpackPlugin = require('../..'); -var MiniCssExtractPlugin = require('mini-css-extract-plugin'); -var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +var path = require("path"); +var HtmlWebpackPlugin = require("../.."); +var MiniCssExtractPlugin = require("mini-css-extract-plugin"); +var webpackMajorVersion = require("webpack/package.json").version.split(".")[0]; module.exports = { context: __dirname, entry: { - b: './b.js', - d: './d.js', - a: './a.js', - c: './c.js', - e: './e.js' + b: "./b.js", + d: "./d.js", + a: "./a.js", + c: "./c.js", + e: "./e.js", }, output: { - path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion), - publicPath: '', - filename: '[name].js' + path: path.join(__dirname, "dist/webpack-" + webpackMajorVersion), + publicPath: "", + filename: "[name].js", }, module: { rules: [ - { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] }, - { test: /\.png$/, type: 'asset/resource' }, - { test: /\.html$/, loader: 'html-loader' } - ] + { test: /\.css$/, use: [MiniCssExtractPlugin.loader, "css-loader"] }, + { test: /\.png$/, type: "asset/resource" }, + { test: /\.html$/, loader: "html-loader" }, + ], }, plugins: [ new HtmlWebpackPlugin({ inject: true, - filename: 'first-file.html', - template: 'template.html', - chunksSortMode: 'manual', - chunks: ['a', 'b', 'c'] + filename: "first-file.html", + template: "template.html", + chunksSortMode: "manual", + chunks: ["a", "b", "c"], }), new HtmlWebpackPlugin({ inject: true, - filename: 'second-file.html', - template: 'template.html', - chunksSortMode: 'manual', - chunks: ['a', 'b', 'd'] + filename: "second-file.html", + template: "template.html", + chunksSortMode: "manual", + chunks: ["a", "b", "d"], }), - new MiniCssExtractPlugin({ filename: 'styles.css' }) - ] + new MiniCssExtractPlugin({ filename: "styles.css" }), + ], }; diff --git a/examples/template-parameters/dist/webpack-5/bundle.js b/examples/template-parameters/dist/webpack-5/bundle.js index 68fc1b11..56a82d66 100644 --- a/examples/template-parameters/dist/webpack-5/bundle.js +++ b/examples/template-parameters/dist/webpack-5/bundle.js @@ -1,7 +1,7 @@ /******/ (() => { // webpackBootstrap var __webpack_exports__ = {}; -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); /******/ })() diff --git a/examples/template-parameters/example.js b/examples/template-parameters/example.js index 6a902b4a..c89859ee 100755 --- a/examples/template-parameters/example.js +++ b/examples/template-parameters/example.js @@ -1,3 +1,3 @@ -var h1 = document.createElement('h1'); -h1.innerHTML = 'Hello world!'; +var h1 = document.createElement("h1"); +h1.innerHTML = "Hello world!"; document.body.appendChild(h1); diff --git a/examples/template-parameters/webpack.config.js b/examples/template-parameters/webpack.config.js index bf76f0a1..2e548c90 100755 --- a/examples/template-parameters/webpack.config.js +++ b/examples/template-parameters/webpack.config.js @@ -1,20 +1,20 @@ -var path = require('path'); -var HtmlWebpackPlugin = require('../..'); -var webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +var path = require("path"); +var HtmlWebpackPlugin = require("../.."); +var webpackMajorVersion = require("webpack/package.json").version.split(".")[0]; module.exports = { context: __dirname, - entry: './example.js', + entry: "./example.js", output: { - path: path.join(__dirname, 'dist/webpack-' + webpackMajorVersion), - publicPath: '', - filename: 'bundle.js' + path: path.join(__dirname, "dist/webpack-" + webpackMajorVersion), + publicPath: "", + filename: "bundle.js", }, plugins: [ new HtmlWebpackPlugin({ // If you pass a plain object, it will be merged with the default values // (New in version 4) templateParameters: { - 'foo': 'bar' + foo: "bar", }, // Or if you want full control, pass a function // templateParameters: (compilation, assets, assetTags, options) => { @@ -29,7 +29,7 @@ module.exports = { // 'foo': 'bar' // }; // }, - template: 'index.ejs' - }) - ] + template: "index.ejs", + }), + ], }; diff --git a/index.js b/index.js index 8f2fe8b2..f4588af0 100644 --- a/index.js +++ b/index.js @@ -1,18 +1,22 @@ // @ts-check -'use strict'; +"use strict"; -const promisify = require('util').promisify; +const promisify = require("util").promisify; -const vm = require('vm'); -const fs = require('fs'); -const _ = require('lodash'); -const path = require('path'); -const { CachedChildCompilation } = require('./lib/cached-child-compiler'); +const vm = require("vm"); +const fs = require("fs"); +const _ = require("lodash"); +const path = require("path"); +const { CachedChildCompilation } = require("./lib/cached-child-compiler"); -const { createHtmlTagObject, htmlTagObjectToString, HtmlTagArray } = require('./lib/html-tags'); -const prettyError = require('./lib/errors.js'); -const chunkSorter = require('./lib/chunksorter.js'); -const { AsyncSeriesWaterfallHook } = require('tapable'); +const { + createHtmlTagObject, + htmlTagObjectToString, + HtmlTagArray, +} = require("./lib/html-tags"); +const prettyError = require("./lib/errors.js"); +const chunkSorter = require("./lib/chunksorter.js"); +const { AsyncSeriesWaterfallHook } = require("tapable"); /** @typedef {import("./typings").HtmlTagObject} HtmlTagObject */ /** @typedef {import("./typings").Options} HtmlWebpackOptions */ @@ -93,17 +97,17 @@ class HtmlWebpackPlugin { * @param {Compilation} compilation * @returns {HtmlWebpackPluginHooks} */ - static getCompilationHooks (compilation) { + static getCompilationHooks(compilation) { let hooks = compilationHooksMap.get(compilation); if (!hooks) { hooks = { - beforeAssetTagGeneration: new AsyncSeriesWaterfallHook(['pluginArgs']), - alterAssetTags: new AsyncSeriesWaterfallHook(['pluginArgs']), - alterAssetTagGroups: new AsyncSeriesWaterfallHook(['pluginArgs']), - afterTemplateExecution: new AsyncSeriesWaterfallHook(['pluginArgs']), - beforeEmit: new AsyncSeriesWaterfallHook(['pluginArgs']), - afterEmit: new AsyncSeriesWaterfallHook(['pluginArgs']) + beforeAssetTagGeneration: new AsyncSeriesWaterfallHook(["pluginArgs"]), + alterAssetTags: new AsyncSeriesWaterfallHook(["pluginArgs"]), + alterAssetTagGroups: new AsyncSeriesWaterfallHook(["pluginArgs"]), + afterTemplateExecution: new AsyncSeriesWaterfallHook(["pluginArgs"]), + beforeEmit: new AsyncSeriesWaterfallHook(["pluginArgs"]), + afterEmit: new AsyncSeriesWaterfallHook(["pluginArgs"]), }; compilationHooksMap.set(compilation, hooks); } @@ -114,7 +118,7 @@ class HtmlWebpackPlugin { /** * @param {HtmlWebpackOptions} [options] */ - constructor (options) { + constructor(options) { /** @type {HtmlWebpackOptions} */ // TODO remove me in the next major release this.userOptions = options || {}; @@ -123,26 +127,29 @@ class HtmlWebpackPlugin { // Default options /** @type {ProcessedHtmlWebpackOptions} */ const defaultOptions = { - template: 'auto', + template: "auto", templateContent: false, templateParameters: templateParametersGenerator, - filename: 'index.html', - publicPath: this.userOptions.publicPath === undefined ? 'auto' : this.userOptions.publicPath, + filename: "index.html", + publicPath: + this.userOptions.publicPath === undefined + ? "auto" + : this.userOptions.publicPath, hash: false, - inject: this.userOptions.scriptLoading === 'blocking' ? 'body' : 'head', - scriptLoading: 'defer', + inject: this.userOptions.scriptLoading === "blocking" ? "body" : "head", + scriptLoading: "defer", compile: true, favicon: false, - minify: 'auto', + minify: "auto", cache: true, showErrors: true, - chunks: 'all', + chunks: "all", excludeChunks: [], - chunksSortMode: 'auto', + chunksSortMode: "auto", meta: {}, base: false, - title: 'Webpack App', - xhtml: false + title: "Webpack App", + xhtml: false, }; /** @type {ProcessedHtmlWebpackOptions} */ @@ -154,59 +161,86 @@ class HtmlWebpackPlugin { * @param {Compiler} compiler * @returns {void} */ - apply (compiler) { - this.logger = compiler.getInfrastructureLogger('HtmlWebpackPlugin'); + apply(compiler) { + this.logger = compiler.getInfrastructureLogger("HtmlWebpackPlugin"); - // Wait for configuration preset plugions to apply all configure webpack defaults - compiler.hooks.initialize.tap('HtmlWebpackPlugin', () => { + // Wait for configuration preset plugins to apply all configure webpack defaults + compiler.hooks.initialize.tap("HtmlWebpackPlugin", () => { const options = this.options; - options.template = this.getTemplatePath(this.options.template, compiler.context); + options.template = this.getTemplatePath( + this.options.template, + compiler.context, + ); // Assert correct option spelling - if (options.scriptLoading !== 'defer' && options.scriptLoading !== 'blocking' && options.scriptLoading !== 'module' && options.scriptLoading !== 'systemjs-module') { + if ( + options.scriptLoading !== "defer" && + options.scriptLoading !== "blocking" && + options.scriptLoading !== "module" && + options.scriptLoading !== "systemjs-module" + ) { /** @type {Logger} */ - (this.logger).error('The "scriptLoading" option need to be set to "defer", "blocking" or "module" or "systemjs-module"'); + (this.logger).error( + 'The "scriptLoading" option need to be set to "defer", "blocking" or "module" or "systemjs-module"', + ); } - if (options.inject !== true && options.inject !== false && options.inject !== 'head' && options.inject !== 'body') { + if ( + options.inject !== true && + options.inject !== false && + options.inject !== "head" && + options.inject !== "body" + ) { /** @type {Logger} */ - (this.logger).error('The `inject` option needs to be set to true, false, "head" or "body'); + (this.logger).error( + 'The `inject` option needs to be set to true, false, "head" or "body', + ); } if ( this.options.templateParameters !== false && - typeof this.options.templateParameters !== 'function' && - typeof this.options.templateParameters !== 'object' + typeof this.options.templateParameters !== "function" && + typeof this.options.templateParameters !== "object" ) { /** @type {Logger} */ - (this.logger).error('The `templateParameters` has to be either a function or an object or false'); + (this.logger).error( + "The `templateParameters` has to be either a function or an object or false", + ); } // Default metaOptions if no template is provided - if (!this.userOptions.template && options.templateContent === false && options.meta) { + if ( + !this.userOptions.template && + options.templateContent === false && + options.meta + ) { options.meta = Object.assign( {}, options.meta, { // TODO remove in the next major release // From https://developer.mozilla.org/en-US/docs/Mozilla/Mobile/Viewport_meta_tag - viewport: 'width=device-width, initial-scale=1' + viewport: "width=device-width, initial-scale=1", }, - this.userOptions.meta + this.userOptions.meta, ); } // entryName to fileName conversion function - const userOptionFilename = this.userOptions.filename || this.options.filename; - const filenameFunction = typeof userOptionFilename === 'function' - ? userOptionFilename - // Replace '[name]' with entry name - : (entryName) => userOptionFilename.replace(/\[name\]/g, entryName); + const userOptionFilename = + this.userOptions.filename || this.options.filename; + const filenameFunction = + typeof userOptionFilename === "function" + ? userOptionFilename + : // Replace '[name]' with entry name + (entryName) => userOptionFilename.replace(/\[name\]/g, entryName); /** output filenames for the given entry names */ const entryNames = Object.keys(compiler.options.entry); - const outputFileNames = new Set((entryNames.length ? entryNames : ['main']).map(filenameFunction)); + const outputFileNames = new Set( + (entryNames.length ? entryNames : ["main"]).map(filenameFunction), + ); // Hook all options into the webpack compiler outputFileNames.forEach((outputFileName) => { @@ -231,12 +265,16 @@ class HtmlWebpackPlugin { let filename = outputFileName; if (path.resolve(filename) === path.normalize(filename)) { - const outputPath = /** @type {string} - Once initialized the path is always a string */(compiler.options.output.path); + const outputPath = + /** @type {string} - Once initialized the path is always a string */ ( + compiler.options.output.path + ); filename = path.relative(outputPath, filename); } - compiler.hooks.thisCompilation.tap('HtmlWebpackPlugin', + compiler.hooks.thisCompilation.tap( + "HtmlWebpackPlugin", /** * Hook into the webpack compilation * @param {Compilation} compilation @@ -244,12 +282,13 @@ class HtmlWebpackPlugin { (compilation) => { compilation.hooks.processAssets.tapAsync( { - name: 'HtmlWebpackPlugin', + name: "HtmlWebpackPlugin", stage: - /** - * Generate the html after minification and dev tooling is done - */ - compiler.webpack.Compilation.PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE + /** + * Generate the html after minification and dev tooling is done + */ + compiler.webpack.Compilation + .PROCESS_ASSETS_STAGE_OPTIMIZE_INLINE, }, /** * Hook into the process assets hook @@ -257,9 +296,19 @@ class HtmlWebpackPlugin { * @param {(err?: Error) => void} callback */ (_, callback) => { - this.generateHTML(compiler, compilation, filename, childCompilerPlugin, previousEmittedAssets, assetJson, callback); - }); - }); + this.generateHTML( + compiler, + compilation, + filename, + childCompilerPlugin, + previousEmittedAssets, + assetJson, + callback, + ); + }, + ); + }, + ); }); }); } @@ -271,23 +320,28 @@ class HtmlWebpackPlugin { * @param {string} template The path to the template e.g. './index.html' * @param {string} context The webpack base resolution path for relative paths e.g. process.cwd() */ - getTemplatePath (template, context) { - if (template === 'auto') { - template = path.resolve(context, 'src/index.ejs'); + getTemplatePath(template, context) { + if (template === "auto") { + template = path.resolve(context, "src/index.ejs"); if (!fs.existsSync(template)) { - template = path.join(__dirname, 'default_index.ejs'); + template = path.join(__dirname, "default_index.ejs"); } } // If the template doesn't use a loader use the lodash template loader - if (template.indexOf('!') === -1) { - template = require.resolve('./lib/loader.js') + '!' + path.resolve(context, template); + if (template.indexOf("!") === -1) { + template = + require.resolve("./lib/loader.js") + + "!" + + path.resolve(context, template); } // Resolve template path return template.replace( /([!])([^/\\][^!?]+|[^/\\!?])($|\?[^!?\n]+$)/, - (match, prefix, filepath, postfix) => prefix + path.resolve(filepath) + postfix); + (match, prefix, filepath, postfix) => + prefix + path.resolve(filepath) + postfix, + ); } /** @@ -298,15 +352,21 @@ class HtmlWebpackPlugin { * @param {string[]|'all'} includedChunks * @param {string[]} excludedChunks */ - filterEntryChunks (chunks, includedChunks, excludedChunks) { - return chunks.filter(chunkName => { + filterEntryChunks(chunks, includedChunks, excludedChunks) { + return chunks.filter((chunkName) => { // Skip if the chunks should be filtered and the given chunk was not added explicity - if (Array.isArray(includedChunks) && includedChunks.indexOf(chunkName) === -1) { + if ( + Array.isArray(includedChunks) && + includedChunks.indexOf(chunkName) === -1 + ) { return false; } // Skip if the chunks should be filtered and the given chunk was excluded explicity - if (Array.isArray(excludedChunks) && excludedChunks.indexOf(chunkName) !== -1) { + if ( + Array.isArray(excludedChunks) && + excludedChunks.indexOf(chunkName) !== -1 + ) { return false; } @@ -323,13 +383,13 @@ class HtmlWebpackPlugin { * @param {string|((entryNameA: string, entryNameB: string) => number)} sortMode * @param {Compilation} compilation */ - sortEntryChunks (entryNames, sortMode, compilation) { + sortEntryChunks(entryNames, sortMode, compilation) { // Custom function - if (typeof sortMode === 'function') { + if (typeof sortMode === "function") { return entryNames.sort(sortMode); } // Check if the given sort mode is a valid chunkSorter sort mode - if (typeof chunkSorter[sortMode] !== 'undefined') { + if (typeof chunkSorter[sortMode] !== "undefined") { return chunkSorter[sortMode](entryNames, compilation, this.options); } throw new Error('"' + sortMode + '" is not a valid chunk sort mode'); @@ -357,17 +417,18 @@ class HtmlWebpackPlugin { * @private * @param {string} filePath */ - urlencodePath (filePath) { + urlencodePath(filePath) { // People use the filepath in quite unexpected ways. // Try to extract the first querystring of the url: // // some+path/demo.html?value=abc?def // - const queryStringStart = filePath.indexOf('?'); - const urlPath = queryStringStart === -1 ? filePath : filePath.substr(0, queryStringStart); + const queryStringStart = filePath.indexOf("?"); + const urlPath = + queryStringStart === -1 ? filePath : filePath.substr(0, queryStringStart); const queryString = filePath.substr(urlPath.length); // Encode all parts except '/' which are not part of the querystring: - const encodedUrlPath = urlPath.split('/').map(encodeURIComponent).join('/'); + const encodedUrlPath = urlPath.split("/").map(encodeURIComponent).join("/"); return encodedUrlPath + queryString; } @@ -379,12 +440,12 @@ class HtmlWebpackPlugin { * @param {string | undefined} url * @param {string} hash */ - appendHash (url, hash) { + appendHash(url, hash) { if (!url) { return url; } - return url + (url.indexOf('?') === -1 ? '?' : '&') + hash; + return url + (url.indexOf("?") === -1 ? "?" : "&") + hash; } /** @@ -397,33 +458,42 @@ class HtmlWebpackPlugin { * @param {string | 'auto'} customPublicPath * @returns {string} */ - getPublicPath (compilation, filename, customPublicPath) { + getPublicPath(compilation, filename, customPublicPath) { /** * @type {string} the configured public path to the asset root * if a path publicPath is set in the current webpack config use it otherwise * fallback to a relative path */ const webpackPublicPath = compilation.getAssetPath( - /** @type {NonNullable} */ (compilation.outputOptions.publicPath), - { hash: compilation.hash } + /** @type {NonNullable} */ ( + compilation.outputOptions.publicPath + ), + { hash: compilation.hash }, ); // Webpack 5 introduced "auto" as default value - const isPublicPathDefined = webpackPublicPath !== 'auto'; + const isPublicPathDefined = webpackPublicPath !== "auto"; let publicPath = - // If the html-webpack-plugin options contain a custom public path uset it - customPublicPath !== 'auto' + // If the html-webpack-plugin options contain a custom public path unset it + customPublicPath !== "auto" ? customPublicPath - : (isPublicPathDefined - // If a hard coded public path exists use it - ? webpackPublicPath - // If no public path was set get a relative url path - : path.relative(path.resolve(/** @type {string} */ (compilation.options.output.path), path.dirname(filename)), /** @type {string} */ (compilation.options.output.path)) - .split(path.sep).join('/') - ); - - if (publicPath.length && publicPath.substr(-1, 1) !== '/') { - publicPath += '/'; + : isPublicPathDefined + ? // If a hard coded public path exists use it + webpackPublicPath + : // If no public path was set get a relative url path + path + .relative( + path.resolve( + /** @type {string} */ (compilation.options.output.path), + path.dirname(filename), + ), + /** @type {string} */ (compilation.options.output.path), + ) + .split(path.sep) + .join("/"); + + if (publicPath.length && publicPath.substr(-1, 1) !== "/") { + publicPath += "/"; } return publicPath; @@ -438,9 +508,13 @@ class HtmlWebpackPlugin { * @param {string[]} entryNames * @returns {AssetsInformationByGroups} */ - getAssetsInformationByGroups (compilation, outputName, entryNames) { + getAssetsInformationByGroups(compilation, outputName, entryNames) { /** The public path used inside the html file */ - const publicPath = this.getPublicPath(compilation, outputName, this.options.publicPath); + const publicPath = this.getPublicPath( + compilation, + outputName, + this.options.publicPath, + ); /** * @type {AssetsInformationByGroups} */ @@ -452,14 +526,19 @@ class HtmlWebpackPlugin { // Will contain all css files css: [], // Will contain the html5 appcache manifest files if it exists - manifest: Object.keys(compilation.assets).find(assetFile => path.extname(assetFile) === '.appcache'), + manifest: Object.keys(compilation.assets).find( + (assetFile) => path.extname(assetFile) === ".appcache", + ), // Favicon - favicon: undefined + favicon: undefined, }; // Append a hash for cache busting if (this.options.hash && assets.manifest) { - assets.manifest = this.appendHash(assets.manifest, /** @type {string} */ (compilation.hash)); + assets.manifest = this.appendHash( + assets.manifest, + /** @type {string} */ (compilation.hash), + ); } // Extract paths to .js, .mjs and .css files from the current compilation @@ -469,7 +548,9 @@ class HtmlWebpackPlugin { for (let i = 0; i < entryNames.length; i++) { const entryName = entryNames[i]; /** entryPointUnfilteredFiles - also includes hot module update files */ - const entryPointUnfilteredFiles = /** @type {Entrypoint} */ (compilation.entrypoints.get(entryName)).getFiles(); + const entryPointUnfilteredFiles = /** @type {Entrypoint} */ ( + compilation.entrypoints.get(entryName) + ).getFiles(); const entryPointFiles = entryPointUnfilteredFiles.filter((chunkFile) => { const asset = compilation.getAsset(chunkFile); @@ -480,21 +561,28 @@ class HtmlWebpackPlugin { // Prevent hot-module files from being included: const assetMetaInformation = asset.info || {}; - return !(assetMetaInformation.hotModuleReplacement || assetMetaInformation.development); + return !( + assetMetaInformation.hotModuleReplacement || + assetMetaInformation.development + ); }); // Prepend the publicPath and append the hash depending on the // webpack.output.publicPath and hashOptions // E.g. bundle.js -> /bundle.js?hash - const entryPointPublicPaths = entryPointFiles - .map(chunkFile => { - const entryPointPublicPath = publicPath + this.urlencodePath(chunkFile); - return this.options.hash - ? this.appendHash(entryPointPublicPath, /** @type {string} */ (compilation.hash)) - : entryPointPublicPath; - }); + const entryPointPublicPaths = entryPointFiles.map((chunkFile) => { + const entryPointPublicPath = publicPath + this.urlencodePath(chunkFile); + return this.options.hash + ? this.appendHash( + entryPointPublicPath, + /** @type {string} */ (compilation.hash), + ) + : entryPointPublicPath; + }); entryPointPublicPaths.forEach((entryPointPublicPath) => { - const extMatch = extensionRegexp.exec(/** @type {string} */ (entryPointPublicPath)); + const extMatch = extensionRegexp.exec( + /** @type {string} */ (entryPointPublicPath), + ); // Skip if the public path is not a .css, .mjs or .js file if (!extMatch) { @@ -510,7 +598,7 @@ class HtmlWebpackPlugin { entryPointPublicPathMap[entryPointPublicPath] = true; // ext will contain .js or .css, because .mjs recognizes as .js - const ext = extMatch[1] === 'mjs' ? 'js' : extMatch[1]; + const ext = extMatch[1] === "mjs" ? "js" : extMatch[1]; assets[ext].push(entryPointPublicPath); }); @@ -531,18 +619,22 @@ class HtmlWebpackPlugin { * @param {string} templateFilename * @returns {Promise string | Promise)>} */ - evaluateCompilationResult (source, publicPath, templateFilename) { + evaluateCompilationResult(source, publicPath, templateFilename) { if (!source) { - return Promise.reject(new Error('The child compilation didn\'t provide a result')); + return Promise.reject( + new Error("The child compilation didn't provide a result"), + ); } // The LibraryTemplatePlugin stores the template result in a local variable. // By adding it to the end the value gets extracted during evaluation - if (source.indexOf('HTML_WEBPACK_PLUGIN_RESULT') >= 0) { - source += ';\nHTML_WEBPACK_PLUGIN_RESULT'; + if (source.indexOf("HTML_WEBPACK_PLUGIN_RESULT") >= 0) { + source += ";\nHTML_WEBPACK_PLUGIN_RESULT"; } - const templateWithoutLoaders = templateFilename.replace(/^.+!/, '').replace(/\?.+$/, ''); + const templateWithoutLoaders = templateFilename + .replace(/^.+!/, "") + .replace(/\?.+$/, ""); const vmContext = vm.createContext({ ...global, HTML_WEBPACK_PLUGIN: true, @@ -597,10 +689,12 @@ class HtmlWebpackPlugin { WebAssembly: global.WebAssembly, WritableStream: global.WritableStream, WritableStreamDefaultController: global.WritableStreamDefaultController, - WritableStreamDefaultWriter: global.WritableStreamDefaultWriter + WritableStreamDefaultWriter: global.WritableStreamDefaultWriter, }); - const vmScript = new vm.Script(source, { filename: templateWithoutLoaders }); + const vmScript = new vm.Script(source, { + filename: templateWithoutLoaders, + }); // Evaluate code and cast to string let newSource; @@ -611,13 +705,21 @@ class HtmlWebpackPlugin { return Promise.reject(e); } - if (typeof newSource === 'object' && newSource.__esModule && newSource.default) { + if ( + typeof newSource === "object" && + newSource.__esModule && + newSource.default + ) { newSource = newSource.default; } - return typeof newSource === 'string' || typeof newSource === 'function' + return typeof newSource === "string" || typeof newSource === "function" ? Promise.resolve(newSource) - : Promise.reject(new Error('The loader "' + templateWithoutLoaders + '" didn\'t return html.')); + : Promise.reject( + new Error( + 'The loader "' + templateWithoutLoaders + "\" didn't return html.", + ), + ); } /** @@ -627,15 +729,17 @@ class HtmlWebpackPlugin { * @param {Array} assetTagGroup * @returns {Array} */ - prepareAssetTagGroupForRendering (assetTagGroup) { + prepareAssetTagGroupForRendering(assetTagGroup) { const xhtml = this.options.xhtml; - return HtmlTagArray.from(assetTagGroup.map((assetTag) => { - const copiedAssetTag = Object.assign({}, assetTag); - copiedAssetTag.toString = function () { - return htmlTagObjectToString(this, xhtml); - }; - return copiedAssetTag; - })); + return HtmlTagArray.from( + assetTagGroup.map((assetTag) => { + const copiedAssetTag = Object.assign({}, assetTag); + copiedAssetTag.toString = function () { + return htmlTagObjectToString(this, xhtml); + }; + return copiedAssetTag; + }), + ); } /** @@ -650,32 +754,50 @@ class HtmlWebpackPlugin { }} assetTags * @returns {Promise<{[key: any]: any}>} */ - getTemplateParameters (compilation, assetsInformationByGroups, assetTags) { + getTemplateParameters(compilation, assetsInformationByGroups, assetTags) { const templateParameters = this.options.templateParameters; if (templateParameters === false) { return Promise.resolve({}); } - if (typeof templateParameters !== 'function' && typeof templateParameters !== 'object') { - throw new Error('templateParameters has to be either a function or an object'); + if ( + typeof templateParameters !== "function" && + typeof templateParameters !== "object" + ) { + throw new Error( + "templateParameters has to be either a function or an object", + ); } - const templateParameterFunction = typeof templateParameters === 'function' - // A custom function can overwrite the entire template parameter preparation - ? templateParameters - // If the template parameters is an object merge it with the default values - : (compilation, assetsInformationByGroups, assetTags, options) => Object.assign({}, - templateParametersGenerator(compilation, assetsInformationByGroups, assetTags, options), - templateParameters - ); + const templateParameterFunction = + typeof templateParameters === "function" + ? // A custom function can overwrite the entire template parameter preparation + templateParameters + : // If the template parameters is an object merge it with the default values + (compilation, assetsInformationByGroups, assetTags, options) => + Object.assign( + {}, + templateParametersGenerator( + compilation, + assetsInformationByGroups, + assetTags, + options, + ), + templateParameters, + ); const preparedAssetTags = { headTags: this.prepareAssetTagGroupForRendering(assetTags.headTags), - bodyTags: this.prepareAssetTagGroupForRendering(assetTags.bodyTags) + bodyTags: this.prepareAssetTagGroupForRendering(assetTags.bodyTags), }; - return Promise - .resolve() - .then(() => templateParameterFunction(compilation, assetsInformationByGroups, preparedAssetTags, this.options)); + return Promise.resolve().then(() => + templateParameterFunction( + compilation, + assetsInformationByGroups, + preparedAssetTags, + this.options, + ), + ); } /** @@ -691,9 +813,18 @@ class HtmlWebpackPlugin { * @param {Compilation} compilation * @returns Promise */ - executeTemplate (templateFunction, assetsInformationByGroups, assetTags, compilation) { + executeTemplate( + templateFunction, + assetsInformationByGroups, + assetTags, + compilation, + ) { // Template processing - const templateParamsPromise = this.getTemplateParameters(compilation, assetsInformationByGroups, assetTags); + const templateParamsPromise = this.getTemplateParameters( + compilation, + assetsInformationByGroups, + assetTags, + ); return templateParamsPromise.then((templateParams) => { try { @@ -702,7 +833,7 @@ class HtmlWebpackPlugin { return templateFunction(templateParams); } catch (e) { // @ts-ignore - compilation.errors.push(new Error('Template execution failed: ' + e)); + compilation.errors.push(new Error("Template execution failed: " + e)); return Promise.reject(e); } }); @@ -718,11 +849,20 @@ class HtmlWebpackPlugin { * @param {{headTags: HtmlTagObject[], bodyTags: HtmlTagObject[]}} assetTags The asset tags to inject * @returns {Promise} */ - postProcessHtml (compiler, originalHtml, assetsInformationByGroups, assetTags) { + postProcessHtml( + compiler, + originalHtml, + assetsInformationByGroups, + assetTags, + ) { let html = originalHtml; - if (typeof html !== 'string') { - return Promise.reject(new Error('Expected html to be a string but got ' + JSON.stringify(html))); + if (typeof html !== "string") { + return Promise.reject( + new Error( + "Expected html to be a string but got " + JSON.stringify(html), + ), + ); } if (this.options.inject) { @@ -730,22 +870,33 @@ class HtmlWebpackPlugin { const headRegExp = /(<\/head\s*>)/i; const bodyRegExp = /(<\/body\s*>)/i; const metaViewportRegExp = /]+name=["']viewport["'][^>]*>/i; - const body = assetTags.bodyTags.map((assetTagObject) => htmlTagObjectToString(assetTagObject, this.options.xhtml)); - const head = assetTags.headTags.filter((item) => { - if (item.tagName === 'meta' && item.attributes && item.attributes.name === 'viewport' && metaViewportRegExp.test(html)) { - return false; - } + const body = assetTags.bodyTags.map((assetTagObject) => + htmlTagObjectToString(assetTagObject, this.options.xhtml), + ); + const head = assetTags.headTags + .filter((item) => { + if ( + item.tagName === "meta" && + item.attributes && + item.attributes.name === "viewport" && + metaViewportRegExp.test(html) + ) { + return false; + } - return true; - }).map((assetTagObject) => htmlTagObjectToString(assetTagObject, this.options.xhtml)); + return true; + }) + .map((assetTagObject) => + htmlTagObjectToString(assetTagObject, this.options.xhtml), + ); if (body.length) { if (bodyRegExp.test(html)) { // Append assets to body element - html = html.replace(bodyRegExp, match => body.join('') + match); + html = html.replace(bodyRegExp, (match) => body.join("") + match); } else { // Append scripts to the end of the file if no element exists: - html += body.join(''); + html += body.join(""); } } @@ -753,14 +904,14 @@ class HtmlWebpackPlugin { // Create a head tag if none exists if (!headRegExp.test(html)) { if (!htmlRegExp.test(html)) { - html = '' + html; + html = "" + html; } else { - html = html.replace(htmlRegExp, match => match + ''); + html = html.replace(htmlRegExp, (match) => match + ""); } } // Append assets to head element - html = html.replace(headRegExp, match => head.join('') + match); + html = html.replace(headRegExp, (match) => head.join("") + match); } // Inject manifest into the opening html tag @@ -770,7 +921,13 @@ class HtmlWebpackPlugin { if (/\smanifest\s*=/.test(match)) { return match; } - return start + ' manifest="' + assetsInformationByGroups.manifest + '"' + end; + return ( + start + + ' manifest="' + + assetsInformationByGroups.manifest + + '"' + + end + ); }); } } @@ -778,41 +935,48 @@ class HtmlWebpackPlugin { // TODO avoid this logic and use https://github.com/webpack-contrib/html-minimizer-webpack-plugin under the hood in the next major version // Check if webpack is running in production mode // @see https://github.com/webpack/webpack/blob/3366421f1784c449f415cda5930a8e445086f688/lib/WebpackOptionsDefaulter.js#L12-L14 - const isProductionLikeMode = compiler.options.mode === 'production' || !compiler.options.mode; - const needMinify = this.options.minify === true || typeof this.options.minify === 'object' || (this.options.minify === 'auto' && isProductionLikeMode); + const isProductionLikeMode = + compiler.options.mode === "production" || !compiler.options.mode; + const needMinify = + this.options.minify === true || + typeof this.options.minify === "object" || + (this.options.minify === "auto" && isProductionLikeMode); if (!needMinify) { return Promise.resolve(html); } - const minifyOptions = typeof this.options.minify === 'object' - ? this.options.minify - : { - // https://www.npmjs.com/package/html-minifier-terser#options-quick-reference - collapseWhitespace: true, - keepClosingSlash: true, - removeComments: true, - removeRedundantAttributes: true, - removeScriptTypeAttributes: true, - removeStyleLinkTypeAttributes: true, - useShortDoctype: true - }; + const minifyOptions = + typeof this.options.minify === "object" + ? this.options.minify + : { + // https://www.npmjs.com/package/html-minifier-terser#options-quick-reference + collapseWhitespace: true, + keepClosingSlash: true, + removeComments: true, + removeRedundantAttributes: true, + removeScriptTypeAttributes: true, + removeStyleLinkTypeAttributes: true, + useShortDoctype: true, + }; try { - html = require('html-minifier-terser').minify(html, minifyOptions); + html = require("html-minifier-terser").minify(html, minifyOptions); } catch (e) { - const isParseError = String(e.message).indexOf('Parse Error') === 0; + const isParseError = String(e.message).indexOf("Parse Error") === 0; if (isParseError) { - e.message = 'html-webpack-plugin could not minify the generated output.\n' + - 'In production mode the html minifcation is enabled by default.\n' + - 'If you are not generating a valid html output please disable it manually.\n' + - 'You can do so by adding the following setting to your HtmlWebpackPlugin config:\n|\n|' + - ' minify: false\n|\n' + - 'See https://github.com/jantimon/html-webpack-plugin#options for details.\n\n' + - 'For parser dedicated bugs please create an issue here:\n' + - 'https://danielruf.github.io/html-minifier-terser/' + - '\n' + e.message; + e.message = + "html-webpack-plugin could not minify the generated output.\n" + + "In production mode the html minification is enabled by default.\n" + + "If you are not generating a valid html output please disable it manually.\n" + + "You can do so by adding the following setting to your HtmlWebpackPlugin config:\n|\n|" + + " minify: false\n|\n" + + "See https://github.com/jantimon/html-webpack-plugin#options for details.\n\n" + + "For parser dedicated bugs please create an issue here:\n" + + "https://danielruf.github.io/html-minifier-terser/" + + "\n" + + e.message; } return Promise.reject(e); @@ -825,8 +989,12 @@ class HtmlWebpackPlugin { * Helper to return a sorted unique array of all asset files out of the asset object * @private */ - getAssetFiles (assets) { - const files = _.uniq(Object.keys(assets).filter(assetType => assetType !== 'chunks' && assets[assetType]).reduce((files, assetType) => files.concat(assets[assetType]), [])); + getAssetFiles(assets) { + const files = _.uniq( + Object.keys(assets) + .filter((assetType) => assetType !== "chunks" && assets[assetType]) + .reduce((files, assetType) => files.concat(assets[assetType]), []), + ); files.sort(); return files; } @@ -842,7 +1010,13 @@ class HtmlWebpackPlugin { * @param {PreviousEmittedAssets} previousEmittedAssets * @returns {Promise} */ - generateFavicon (compiler, favicon, compilation, publicPath, previousEmittedAssets) { + generateFavicon( + compiler, + favicon, + compilation, + publicPath, + previousEmittedAssets, + ) { if (!favicon) { return Promise.resolve(undefined); } @@ -851,7 +1025,10 @@ class HtmlWebpackPlugin { return promisify(compilation.inputFileSystem.readFile)(filename) .then((buf) => { - const source = new compiler.webpack.sources.RawSource(/** @type {string | Buffer} */ (buf), false); + const source = new compiler.webpack.sources.RawSource( + /** @type {string | Buffer} */ (buf), + false, + ); const name = path.basename(filename); compilation.fileDependencies.add(filename); @@ -861,12 +1038,19 @@ class HtmlWebpackPlugin { const faviconPath = publicPath + name; if (this.options.hash) { - return this.appendHash(faviconPath, /** @type {string} */ (compilation.hash)); + return this.appendHash( + faviconPath, + /** @type {string} */ (compilation.hash), + ); } return faviconPath; }) - .catch(() => Promise.reject(new Error('HtmlWebpackPlugin: could not load file ' + filename))); + .catch(() => + Promise.reject( + new Error("HtmlWebpackPlugin: could not load file " + filename), + ), + ); } /** @@ -876,26 +1060,26 @@ class HtmlWebpackPlugin { * @param {Array} jsAssets * @returns {Array} */ - generatedScriptTags (jsAssets) { + generatedScriptTags(jsAssets) { // @ts-ignore - return jsAssets.map(src => { + return jsAssets.map((src) => { const attributes = {}; - if (this.options.scriptLoading === 'defer') { + if (this.options.scriptLoading === "defer") { attributes.defer = true; - } else if (this.options.scriptLoading === 'module') { - attributes.type = 'module'; - } else if (this.options.scriptLoading === 'systemjs-module') { - attributes.type = 'systemjs-module'; + } else if (this.options.scriptLoading === "module") { + attributes.type = "module"; + } else if (this.options.scriptLoading === "systemjs-module") { + attributes.type = "systemjs-module"; } attributes.src = src; return { - tagName: 'script', + tagName: "script", voidTag: false, - meta: { plugin: 'html-webpack-plugin' }, - attributes + meta: { plugin: "html-webpack-plugin" }, + attributes, }; }); } @@ -907,15 +1091,15 @@ class HtmlWebpackPlugin { * @param {Array} cssAssets * @returns {Array} */ - generateStyleTags (cssAssets) { - return cssAssets.map(styleAsset => ({ - tagName: 'link', + generateStyleTags(cssAssets) { + return cssAssets.map((styleAsset) => ({ + tagName: "link", voidTag: true, - meta: { plugin: 'html-webpack-plugin' }, + meta: { plugin: "html-webpack-plugin" }, attributes: { href: styleAsset, - rel: 'stylesheet' - } + rel: "stylesheet", + }, })); } @@ -925,16 +1109,21 @@ class HtmlWebpackPlugin { * @param {string | {[attributeName: string]: string}} base * @returns {Array} */ - generateBaseTag (base) { - return [{ - tagName: 'base', - voidTag: true, - meta: { plugin: 'html-webpack-plugin' }, - // attributes e.g. { href:"http://example.com/page.html" target:"_blank" } - attributes: typeof base === 'string' ? { - href: base - } : base - }]; + generateBaseTag(base) { + return [ + { + tagName: "base", + voidTag: true, + meta: { plugin: "html-webpack-plugin" }, + // attributes e.g. { href:"http://example.com/page.html" target:"_blank" } + attributes: + typeof base === "string" + ? { + href: base, + } + : base, + }, + ]; } /** @@ -944,7 +1133,7 @@ class HtmlWebpackPlugin { * @param {false | {[name: string]: false | string | {[attributeName: string]: string|boolean}}} metaOptions * @returns {Array} */ - generatedMetaTags (metaOptions) { + generatedMetaTags(metaOptions) { if (metaOptions === false) { return []; } @@ -955,10 +1144,12 @@ class HtmlWebpackPlugin { const metaTagAttributeObjects = Object.keys(metaOptions) .map((metaName) => { const metaTagContent = metaOptions[metaName]; - return (typeof metaTagContent === 'string') ? { - name: metaName, - content: metaTagContent - } : metaTagContent; + return typeof metaTagContent === "string" + ? { + name: metaName, + content: metaTagContent, + } + : metaTagContent; }) .filter((attribute) => attribute !== false); @@ -966,13 +1157,13 @@ class HtmlWebpackPlugin { // the html-webpack-plugin tag structure return metaTagAttributeObjects.map((metaTagAttributes) => { if (metaTagAttributes === false) { - throw new Error('Invalid meta tag'); + throw new Error("Invalid meta tag"); } return { - tagName: 'meta', + tagName: "meta", voidTag: true, - meta: { plugin: 'html-webpack-plugin' }, - attributes: metaTagAttributes + meta: { plugin: "html-webpack-plugin" }, + attributes: metaTagAttributes, }; }); } @@ -984,16 +1175,18 @@ class HtmlWebpackPlugin { * @param {string} favicon * @returns {Array} */ - generateFaviconTag (favicon) { - return [{ - tagName: 'link', - voidTag: true, - meta: { plugin: 'html-webpack-plugin' }, - attributes: { - rel: 'icon', - href: favicon - } - }]; + generateFaviconTag(favicon) { + return [ + { + tagName: "link", + voidTag: true, + meta: { plugin: "html-webpack-plugin" }, + attributes: { + rel: "icon", + href: favicon, + }, + }, + ]; } /** @@ -1010,24 +1203,24 @@ class HtmlWebpackPlugin { bodyTags: Array; }} */ - groupAssetsByElements (assetTags, scriptTarget) { + groupAssetsByElements(assetTags, scriptTarget) { /** @type {{ headTags: Array; bodyTags: Array; }} */ const result = { - headTags: [ - ...assetTags.meta, - ...assetTags.styles - ], - bodyTags: [] + headTags: [...assetTags.meta, ...assetTags.styles], + bodyTags: [], }; // Add script tags to head or body depending on // the htmlPluginOptions - if (scriptTarget === 'body') { + if (scriptTarget === "body") { result.bodyTags.push(...assetTags.scripts); } else { // If script loading is blocking add the scripts to the end of the head // If script loading is non-blocking add the scripts in front of the css files - const insertPosition = this.options.scriptLoading === 'blocking' ? result.headTags.length : assetTags.meta.length; + const insertPosition = + this.options.scriptLoading === "blocking" + ? result.headTags.length + : assetTags.meta.length; result.headTags.splice(insertPosition, 0, ...assetTags.scripts); } @@ -1047,12 +1240,14 @@ class HtmlWebpackPlugin { * @param {Compilation} compilation * @returns {{ path: string, info: {} }} */ - replacePlaceholdersInFilename (compiler, filename, fileContent, compilation) { + replacePlaceholdersInFilename(compiler, filename, fileContent, compilation) { if (/\[\\*([\w:]+)\\*\]/i.test(filename) === false) { return { path: filename, info: {} }; } - const hash = compiler.webpack.util.createHash(compilation.outputOptions.hashFunction); + const hash = compiler.webpack.util.createHash( + compilation.outputOptions.hashFunction, + ); hash.update(fileContent); @@ -1060,19 +1255,20 @@ class HtmlWebpackPlugin { hash.update(compilation.outputOptions.hashSalt); } - const contentHash = /** @type {string} */ (hash.digest(compilation.outputOptions.hashDigest).slice(0, compilation.outputOptions.hashDigestLength)); + const contentHash = /** @type {string} */ ( + hash + .digest(compilation.outputOptions.hashDigest) + .slice(0, compilation.outputOptions.hashDigestLength) + ); - return compilation.getPathWithInfo( - filename, - { + return compilation.getPathWithInfo(filename, { + contentHash, + chunk: { + hash: contentHash, + // @ts-ignore contentHash, - chunk: { - hash: contentHash, - // @ts-ignore - contentHash - } - } - ); + }, + }); } /** @@ -1087,36 +1283,57 @@ class HtmlWebpackPlugin { * @param {{ value: string | undefined }} assetJson * @param {(err?: Error) => void} callback */ - generateHTML ( + generateHTML( compiler, compilation, outputName, childCompilerPlugin, previousEmittedAssets, assetJson, - callback + callback, ) { // Get all entry point names for this html file const entryNames = Array.from(compilation.entrypoints.keys()); - const filteredEntryNames = this.filterEntryChunks(entryNames, this.options.chunks, this.options.excludeChunks); - const sortedEntryNames = this.sortEntryChunks(filteredEntryNames, this.options.chunksSortMode, compilation); + const filteredEntryNames = this.filterEntryChunks( + entryNames, + this.options.chunks, + this.options.excludeChunks, + ); + const sortedEntryNames = this.sortEntryChunks( + filteredEntryNames, + this.options.chunksSortMode, + compilation, + ); const templateResult = this.options.templateContent ? { mainCompilationHash: compilation.hash } : childCompilerPlugin.getCompilationEntryResult(this.options.template); - if ('error' in templateResult) { - compilation.errors.push(prettyError(templateResult.error, compiler.context).toString()); + if ("error" in templateResult) { + compilation.errors.push( + prettyError(templateResult.error, compiler.context).toString(), + ); } // If the child compilation was not executed during a previous main compile run // it is a cached result - const isCompilationCached = templateResult.mainCompilationHash !== compilation.hash; + const isCompilationCached = + templateResult.mainCompilationHash !== compilation.hash; /** Generated file paths from the entry point names */ - const assetsInformationByGroups = this.getAssetsInformationByGroups(compilation, outputName, sortedEntryNames); + const assetsInformationByGroups = this.getAssetsInformationByGroups( + compilation, + outputName, + sortedEntryNames, + ); // If the template and the assets did not change we don't have to emit the html - const newAssetJson = JSON.stringify(this.getAssetFiles(assetsInformationByGroups)); + const newAssetJson = JSON.stringify( + this.getAssetFiles(assetsInformationByGroups), + ); - if (isCompilationCached && this.options.cache && assetJson.value === newAssetJson) { + if ( + isCompilationCached && + this.options.cache && + assetJson.value === newAssetJson + ) { previousEmittedAssets.forEach(({ name, source, info }) => { compilation.emitAsset(name, source, info); }); @@ -1129,127 +1346,204 @@ class HtmlWebpackPlugin { // The html-webpack plugin uses a object representation for the html-tags which will be injected // to allow altering them more easily // Just before they are converted a third-party-plugin author might change the order and content - const assetsPromise = this.generateFavicon(compiler, this.options.favicon, compilation, assetsInformationByGroups.publicPath, previousEmittedAssets) - .then((faviconPath) => { - assetsInformationByGroups.favicon = faviconPath; - return HtmlWebpackPlugin.getCompilationHooks(compilation).beforeAssetTagGeneration.promise({ - assets: assetsInformationByGroups, - outputName, - plugin: this - }); + const assetsPromise = this.generateFavicon( + compiler, + this.options.favicon, + compilation, + assetsInformationByGroups.publicPath, + previousEmittedAssets, + ).then((faviconPath) => { + assetsInformationByGroups.favicon = faviconPath; + return HtmlWebpackPlugin.getCompilationHooks( + compilation, + ).beforeAssetTagGeneration.promise({ + assets: assetsInformationByGroups, + outputName, + plugin: this, }); + }); // Turn the js and css paths into grouped HtmlTagObjects const assetTagGroupsPromise = assetsPromise // And allow third-party-plugin authors to reorder and change the assetTags before they are grouped - .then(({ assets }) => HtmlWebpackPlugin.getCompilationHooks(compilation).alterAssetTags.promise({ - assetTags: { - scripts: this.generatedScriptTags(assets.js), - styles: this.generateStyleTags(assets.css), - meta: [ - ...(this.options.base !== false ? this.generateBaseTag(this.options.base) : []), - ...this.generatedMetaTags(this.options.meta), - ...(assets.favicon ? this.generateFaviconTag(assets.favicon) : []) - ] - }, - outputName, - publicPath: assetsInformationByGroups.publicPath, - plugin: this - })) + .then(({ assets }) => + HtmlWebpackPlugin.getCompilationHooks( + compilation, + ).alterAssetTags.promise({ + assetTags: { + scripts: this.generatedScriptTags(assets.js), + styles: this.generateStyleTags(assets.css), + meta: [ + ...(this.options.base !== false + ? this.generateBaseTag(this.options.base) + : []), + ...this.generatedMetaTags(this.options.meta), + ...(assets.favicon + ? this.generateFaviconTag(assets.favicon) + : []), + ], + }, + outputName, + publicPath: assetsInformationByGroups.publicPath, + plugin: this, + }), + ) .then(({ assetTags }) => { // Inject scripts to body unless it set explicitly to head - const scriptTarget = this.options.inject === 'head' || - (this.options.inject !== 'body' && this.options.scriptLoading !== 'blocking') ? 'head' : 'body'; + const scriptTarget = + this.options.inject === "head" || + (this.options.inject !== "body" && + this.options.scriptLoading !== "blocking") + ? "head" + : "body"; // Group assets to `head` and `body` tag arrays const assetGroups = this.groupAssetsByElements(assetTags, scriptTarget); // Allow third-party-plugin authors to reorder and change the assetTags once they are grouped - return HtmlWebpackPlugin.getCompilationHooks(compilation).alterAssetTagGroups.promise({ + return HtmlWebpackPlugin.getCompilationHooks( + compilation, + ).alterAssetTagGroups.promise({ headTags: assetGroups.headTags, bodyTags: assetGroups.bodyTags, outputName, publicPath: assetsInformationByGroups.publicPath, - plugin: this + plugin: this, }); }); // Turn the compiled template into a nodejs function or into a nodejs string - const templateEvaluationPromise = Promise.resolve() - .then(() => { - if ('error' in templateResult) { - return this.options.showErrors ? prettyError(templateResult.error, compiler.context).toHtml() : 'ERROR'; - } - - // Allow to use a custom function / string instead - if (this.options.templateContent !== false) { - return this.options.templateContent; - } - - // Once everything is compiled evaluate the html factory and replace it with its content - if ('compiledEntry' in templateResult) { - const compiledEntry = templateResult.compiledEntry; - const assets = compiledEntry.assets; + const templateEvaluationPromise = Promise.resolve().then(() => { + if ("error" in templateResult) { + return this.options.showErrors + ? prettyError(templateResult.error, compiler.context).toHtml() + : "ERROR"; + } - // Store assets from child compiler to reemit them later - for (const name in assets) { - previousEmittedAssets.push({ name, source: assets[name].source, info: assets[name].info }); - } + // Allow to use a custom function / string instead + if (this.options.templateContent !== false) { + return this.options.templateContent; + } - return this.evaluateCompilationResult(compiledEntry.content, assetsInformationByGroups.publicPath, this.options.template); + // Once everything is compiled evaluate the html factory and replace it with its content + if ("compiledEntry" in templateResult) { + const compiledEntry = templateResult.compiledEntry; + const assets = compiledEntry.assets; + + // Store assets from child compiler to re-emit them later + for (const name in assets) { + previousEmittedAssets.push({ + name, + source: assets[name].source, + info: assets[name].info, + }); } - return Promise.reject(new Error('Child compilation contained no compiledEntry')); - }); - const templateExectutionPromise = Promise.all([assetsPromise, assetTagGroupsPromise, templateEvaluationPromise]) + return this.evaluateCompilationResult( + compiledEntry.content, + assetsInformationByGroups.publicPath, + this.options.template, + ); + } + + return Promise.reject( + new Error("Child compilation contained no compiledEntry"), + ); + }); + const templateExecutionPromise = Promise.all([ + assetsPromise, + assetTagGroupsPromise, + templateEvaluationPromise, + ]) // Execute the template - .then(([assetsHookResult, assetTags, compilationResult]) => typeof compilationResult !== 'function' - ? compilationResult - : this.executeTemplate(compilationResult, assetsHookResult.assets, { headTags: assetTags.headTags, bodyTags: assetTags.bodyTags }, compilation)); + .then(([assetsHookResult, assetTags, compilationResult]) => + typeof compilationResult !== "function" + ? compilationResult + : this.executeTemplate( + compilationResult, + assetsHookResult.assets, + { headTags: assetTags.headTags, bodyTags: assetTags.bodyTags }, + compilation, + ), + ); - const injectedHtmlPromise = Promise.all([assetTagGroupsPromise, templateExectutionPromise]) + const injectedHtmlPromise = Promise.all([ + assetTagGroupsPromise, + templateExecutionPromise, + ]) // Allow plugins to change the html before assets are injected .then(([assetTags, html]) => { - const pluginArgs = { html, headTags: assetTags.headTags, bodyTags: assetTags.bodyTags, plugin: this, outputName }; - return HtmlWebpackPlugin.getCompilationHooks(compilation).afterTemplateExecution.promise(pluginArgs); + const pluginArgs = { + html, + headTags: assetTags.headTags, + bodyTags: assetTags.bodyTags, + plugin: this, + outputName, + }; + return HtmlWebpackPlugin.getCompilationHooks( + compilation, + ).afterTemplateExecution.promise(pluginArgs); }) .then(({ html, headTags, bodyTags }) => { - return this.postProcessHtml(compiler, html, assetsInformationByGroups, { headTags, bodyTags }); + return this.postProcessHtml(compiler, html, assetsInformationByGroups, { + headTags, + bodyTags, + }); }); const emitHtmlPromise = injectedHtmlPromise // Allow plugins to change the html after assets are injected .then((html) => { const pluginArgs = { html, plugin: this, outputName }; - return HtmlWebpackPlugin.getCompilationHooks(compilation).beforeEmit.promise(pluginArgs) - .then(result => result.html); + return HtmlWebpackPlugin.getCompilationHooks(compilation) + .beforeEmit.promise(pluginArgs) + .then((result) => result.html); }) - .catch(err => { + .catch((err) => { // In case anything went wrong the promise is resolved // with the error message and an error is logged compilation.errors.push(prettyError(err, compiler.context).toString()); - return this.options.showErrors ? prettyError(err, compiler.context).toHtml() : 'ERROR'; + return this.options.showErrors + ? prettyError(err, compiler.context).toHtml() + : "ERROR"; }) - .then(html => { - const filename = outputName.replace(/\[templatehash([^\]]*)\]/g, require('util').deprecate( - (match, options) => `[contenthash${options}]`, - '[templatehash] is now [contenthash]') + .then((html) => { + const filename = outputName.replace( + /\[templatehash([^\]]*)\]/g, + require("util").deprecate( + (match, options) => `[contenthash${options}]`, + "[templatehash] is now [contenthash]", + ), + ); + const replacedFilename = this.replacePlaceholdersInFilename( + compiler, + filename, + html, + compilation, ); - const replacedFilename = this.replacePlaceholdersInFilename(compiler, filename, html, compilation); const source = new compiler.webpack.sources.RawSource(html, false); // Add the evaluated html code to the webpack assets - compilation.emitAsset(replacedFilename.path, source, replacedFilename.info); + compilation.emitAsset( + replacedFilename.path, + source, + replacedFilename.info, + ); previousEmittedAssets.push({ name: replacedFilename.path, source }); return replacedFilename.path; }) - .then((finalOutputName) => HtmlWebpackPlugin.getCompilationHooks(compilation).afterEmit.promise({ - outputName: finalOutputName, - plugin: this - }).catch(err => { - /** @type {Logger} */ - (this.logger).error(err); - return null; - }).then(() => null)); + .then((finalOutputName) => + HtmlWebpackPlugin.getCompilationHooks(compilation) + .afterEmit.promise({ + outputName: finalOutputName, + plugin: this, + }) + .catch((err) => { + /** @type {Logger} */ + (this.logger).error(err); + return null; + }) + .then(() => null), + ); // Once all files are added to the webpack compilation // let the webpack compiler continue @@ -1273,15 +1567,15 @@ class HtmlWebpackPlugin { * @param {ProcessedHtmlWebpackOptions} options * @returns {TemplateParameter} */ -function templateParametersGenerator (compilation, assets, assetTags, options) { +function templateParametersGenerator(compilation, assets, assetTags, options) { return { compilation: compilation, webpackConfig: compilation.options, htmlWebpackPlugin: { tags: assetTags, files: assets, - options: options - } + options: options, + }, }; } diff --git a/lib/cached-child-compiler.js b/lib/cached-child-compiler.js index f6e4c733..7aac6c84 100644 --- a/lib/cached-child-compiler.js +++ b/lib/cached-child-compiler.js @@ -3,7 +3,7 @@ * @file * Helper plugin manages the cached state of the child compilation * - * To optimize performance the child compilation is running asyncronously. + * To optimize performance the child compilation is running asynchronously. * Therefore it needs to be started in the compiler.make phase and ends after * the compilation.afterCompile phase. * @@ -21,7 +21,7 @@ }); * ``` */ -'use strict'; +"use strict"; // Import types /** @typedef {import("webpack").Compiler} Compiler */ @@ -37,7 +37,7 @@ error: Error }} ChildCompilationResult */ -const { HtmlWebpackChildCompiler } = require('./child-compiler'); +const { HtmlWebpackChildCompiler } = require("./child-compiler"); /** * This plugin is a singleton for performance reasons. @@ -51,7 +51,7 @@ class CachedChildCompilation { /** * @param {Compiler} compiler */ - constructor (compiler) { + constructor(compiler) { /** * @private * @type {Compiler} @@ -62,7 +62,8 @@ class CachedChildCompilation { if (compilerMap.has(compiler)) { return; } - const persistentChildCompilerSingletonPlugin = new PersistentChildCompilerSingletonPlugin(); + const persistentChildCompilerSingletonPlugin = + new PersistentChildCompilerSingletonPlugin(); compilerMap.set(compiler, persistentChildCompilerSingletonPlugin); persistentChildCompilerSingletonPlugin.apply(compiler); } @@ -71,21 +72,25 @@ class CachedChildCompilation { * apply is called by the webpack main compiler during the start phase * @param {string} entry */ - addEntry (entry) { - const persistentChildCompilerSingletonPlugin = compilerMap.get(this.compiler); + addEntry(entry) { + const persistentChildCompilerSingletonPlugin = compilerMap.get( + this.compiler, + ); if (!persistentChildCompilerSingletonPlugin) { throw new Error( - 'PersistentChildCompilerSingletonPlugin instance not found.' + "PersistentChildCompilerSingletonPlugin instance not found.", ); } persistentChildCompilerSingletonPlugin.addEntry(entry); } - getCompilationResult () { - const persistentChildCompilerSingletonPlugin = compilerMap.get(this.compiler); + getCompilationResult() { + const persistentChildCompilerSingletonPlugin = compilerMap.get( + this.compiler, + ); if (!persistentChildCompilerSingletonPlugin) { throw new Error( - 'PersistentChildCompilerSingletonPlugin instance not found.' + "PersistentChildCompilerSingletonPlugin instance not found.", ); } return persistentChildCompilerSingletonPlugin.getLatestResult(); @@ -99,16 +104,18 @@ class CachedChildCompilation { | { mainCompilationHash: string, compiledEntry: ChildCompilationTemplateResult } } */ - getCompilationEntryResult (entry) { + getCompilationEntryResult(entry) { const latestResult = this.getCompilationResult(); const compilationResult = latestResult.compilationResult; - return 'error' in compilationResult ? { - mainCompilationHash: latestResult.mainCompilationHash, - error: compilationResult.error - } : { - mainCompilationHash: latestResult.mainCompilationHash, - compiledEntry: compilationResult.compiledEntries[entry] - }; + return "error" in compilationResult + ? { + mainCompilationHash: latestResult.mainCompilationHash, + error: compilationResult.error, + } + : { + mainCompilationHash: latestResult.mainCompilationHash, + compiledEntry: compilationResult.compiledEntries[entry], + }; } } @@ -119,7 +126,7 @@ class PersistentChildCompilerSingletonPlugin { * @param {Compilation} mainCompilation * @param {number} startTime */ - static createSnapshot (fileDependencies, mainCompilation, startTime) { + static createSnapshot(fileDependencies, mainCompilation, startTime) { return new Promise((resolve, reject) => { mainCompilation.fileSystemInfo.createSnapshot( startTime, @@ -133,7 +140,7 @@ class PersistentChildCompilerSingletonPlugin { return reject(err); } resolve(snapshot); - } + }, ); }); } @@ -146,7 +153,7 @@ class PersistentChildCompilerSingletonPlugin { * @param {Compilation} mainCompilation * @returns {Promise} */ - static isSnapshotValid (snapshot, mainCompilation) { + static isSnapshotValid(snapshot, mainCompilation) { return new Promise((resolve, reject) => { mainCompilation.fileSystemInfo.checkSnapshotValid( snapshot, @@ -155,20 +162,20 @@ class PersistentChildCompilerSingletonPlugin { reject(err); } resolve(isValid); - } + }, ); }); } - static watchFiles (mainCompilation, fileDependencies) { - Object.keys(fileDependencies).forEach((depencyTypes) => { - fileDependencies[depencyTypes].forEach(fileDependency => { - mainCompilation[depencyTypes].add(fileDependency); + static watchFiles(mainCompilation, fileDependencies) { + Object.keys(fileDependencies).forEach((dependencyType) => { + fileDependencies[dependencyType].forEach((fileDependency) => { + mainCompilation[dependencyType].add(fileDependency); }); }); } - constructor () { + constructor() { /** * @private * @type { @@ -198,15 +205,15 @@ class PersistentChildCompilerSingletonPlugin { isVerifyingCache: false, entries: [], compiledEntries: [], - mainCompilationHash: 'initial', + mainCompilationHash: "initial", compilationResult: { dependencies: { fileDependencies: [], contextDependencies: [], - missingDependencies: [] + missingDependencies: [], }, - compiledEntries: {} - } + compiledEntries: {}, + }, }; } @@ -214,31 +221,34 @@ class PersistentChildCompilerSingletonPlugin { * apply is called by the webpack main compiler during the start phase * @param {Compiler} compiler */ - apply (compiler) { + apply(compiler) { /** @type Promise */ let childCompilationResultPromise = Promise.resolve({ dependencies: { fileDependencies: [], contextDependencies: [], - missingDependencies: [] + missingDependencies: [], }, - compiledEntries: {} + compiledEntries: {}, }); /** * The main compilation hash which will only be updated * if the childCompiler changes */ /** @type {string} */ - let mainCompilationHashOfLastChildRecompile = ''; + let mainCompilationHashOfLastChildRecompile = ""; /** @type {Snapshot | undefined} */ let previousFileSystemSnapshot; let compilationStartTime = new Date().getTime(); compiler.hooks.make.tapAsync( - 'PersistentChildCompilerSingletonPlugin', + "PersistentChildCompilerSingletonPlugin", (mainCompilation, callback) => { - if (this.compilationState.isCompiling || this.compilationState.isVerifyingCache) { - return callback(new Error('Child compilation has already started')); + if ( + this.compilationState.isCompiling || + this.compilationState.isVerifyingCache + ) { + return callback(new Error("Child compilation has already started")); } // Update the time to the current compile start time @@ -250,83 +260,101 @@ class PersistentChildCompilerSingletonPlugin { isVerifyingCache: true, previousEntries: this.compilationState.compiledEntries, previousResult: this.compilationState.compilationResult, - entries: this.compilationState.entries + entries: this.compilationState.entries, }; // Validate cache: - const isCacheValidPromise = this.isCacheValid(previousFileSystemSnapshot, mainCompilation); + const isCacheValidPromise = this.isCacheValid( + previousFileSystemSnapshot, + mainCompilation, + ); let cachedResult = childCompilationResultPromise; - childCompilationResultPromise = isCacheValidPromise.then((isCacheValid) => { - // Reuse cache - if (isCacheValid) { - return cachedResult; - } - // Start the compilation - const compiledEntriesPromise = this.compileEntries( - mainCompilation, - this.compilationState.entries - ); - // Update snapshot as soon as we know the filedependencies - // this might possibly cause bugs if files were changed inbetween - // compilation start and snapshot creation - compiledEntriesPromise.then((childCompilationResult) => { - return PersistentChildCompilerSingletonPlugin.createSnapshot(childCompilationResult.dependencies, mainCompilation, compilationStartTime); - }).then((snapshot) => { - previousFileSystemSnapshot = snapshot; - }); - return compiledEntriesPromise; - }); + childCompilationResultPromise = isCacheValidPromise.then( + (isCacheValid) => { + // Reuse cache + if (isCacheValid) { + return cachedResult; + } + // Start the compilation + const compiledEntriesPromise = this.compileEntries( + mainCompilation, + this.compilationState.entries, + ); + // Update snapshot as soon as we know the fileDependencies + // this might possibly cause bugs if files were changed between + // compilation start and snapshot creation + compiledEntriesPromise + .then((childCompilationResult) => { + return PersistentChildCompilerSingletonPlugin.createSnapshot( + childCompilationResult.dependencies, + mainCompilation, + compilationStartTime, + ); + }) + .then((snapshot) => { + previousFileSystemSnapshot = snapshot; + }); + return compiledEntriesPromise; + }, + ); // Add files to compilation which needs to be watched: mainCompilation.hooks.optimizeTree.tapAsync( - 'PersistentChildCompilerSingletonPlugin', + "PersistentChildCompilerSingletonPlugin", (chunks, modules, callback) => { - const handleCompilationDonePromise = childCompilationResultPromise.then( - childCompilationResult => { + const handleCompilationDonePromise = + childCompilationResultPromise.then((childCompilationResult) => { this.watchFiles( mainCompilation, - childCompilationResult.dependencies + childCompilationResult.dependencies, ); }); // @ts-ignore - handleCompilationDonePromise.then(() => callback(null, chunks, modules), callback); - } + handleCompilationDonePromise.then( + () => callback(null, chunks, modules), + callback, + ); + }, ); // Store the final compilation once the main compilation hash is known mainCompilation.hooks.additionalAssets.tapAsync( - 'PersistentChildCompilerSingletonPlugin', + "PersistentChildCompilerSingletonPlugin", (callback) => { - const didRecompilePromise = Promise.all([childCompilationResultPromise, cachedResult]).then( - ([childCompilationResult, cachedResult]) => { - // Update if childCompilation changed - return (cachedResult !== childCompilationResult); - } - ); + const didRecompilePromise = Promise.all([ + childCompilationResultPromise, + cachedResult, + ]).then(([childCompilationResult, cachedResult]) => { + // Update if childCompilation changed + return cachedResult !== childCompilationResult; + }); - const handleCompilationDonePromise = Promise.all([childCompilationResultPromise, didRecompilePromise]).then( - ([childCompilationResult, didRecompile]) => { - // Update hash and snapshot if childCompilation changed - if (didRecompile) { - mainCompilationHashOfLastChildRecompile = /** @type {string} */ (mainCompilation.hash); - } - this.compilationState = { - isCompiling: false, - isVerifyingCache: false, - entries: this.compilationState.entries, - compiledEntries: this.compilationState.entries, - compilationResult: childCompilationResult, - mainCompilationHash: mainCompilationHashOfLastChildRecompile - }; - }); + const handleCompilationDonePromise = Promise.all([ + childCompilationResultPromise, + didRecompilePromise, + ]).then(([childCompilationResult, didRecompile]) => { + // Update hash and snapshot if childCompilation changed + if (didRecompile) { + mainCompilationHashOfLastChildRecompile = + /** @type {string} */ (mainCompilation.hash); + } + this.compilationState = { + isCompiling: false, + isVerifyingCache: false, + entries: this.compilationState.entries, + compiledEntries: this.compilationState.entries, + compilationResult: childCompilationResult, + mainCompilationHash: mainCompilationHashOfLastChildRecompile, + }; + }); handleCompilationDonePromise.then(() => callback(null), callback); - } + }, ); // Continue compilation: callback(null); - } + }, ); } @@ -334,12 +362,15 @@ class PersistentChildCompilerSingletonPlugin { * Add a new entry to the next compile run * @param {string} entry */ - addEntry (entry) { - if (this.compilationState.isCompiling || this.compilationState.isVerifyingCache) { + addEntry(entry) { + if ( + this.compilationState.isCompiling || + this.compilationState.isVerifyingCache + ) { throw new Error( - 'The child compiler has already started to compile. ' + - "Please add entries before the main compiler 'make' phase has started or " + - 'after the compilation is done.' + "The child compiler has already started to compile. " + + "Please add entries before the main compiler 'make' phase has started or " + + "after the compilation is done.", ); } if (this.compilationState.entries.indexOf(entry) === -1) { @@ -347,17 +378,20 @@ class PersistentChildCompilerSingletonPlugin { } } - getLatestResult () { - if (this.compilationState.isCompiling || this.compilationState.isVerifyingCache) { + getLatestResult() { + if ( + this.compilationState.isCompiling || + this.compilationState.isVerifyingCache + ) { throw new Error( - 'The child compiler is not done compiling. ' + - "Please access the result after the compiler 'make' phase has started or " + - 'after the compilation is done.' + "The child compiler is not done compiling. " + + "Please access the result after the compiler 'make' phase has started or " + + "after the compilation is done.", ); } return { mainCompilationHash: this.compilationState.mainCompilationHash, - compilationResult: this.compilationState.compilationResult + compilationResult: this.compilationState.compilationResult, }; } @@ -368,16 +402,22 @@ class PersistentChildCompilerSingletonPlugin { * @param {Compilation} mainCompilation * @returns {Promise} */ - isCacheValid (snapshot, mainCompilation) { + isCacheValid(snapshot, mainCompilation) { if (!this.compilationState.isVerifyingCache) { - return Promise.reject(new Error('Cache validation can only be done right before the compilation starts')); + return Promise.reject( + new Error( + "Cache validation can only be done right before the compilation starts", + ), + ); } // If there are no entries we don't need a new child compilation if (this.compilationState.entries.length === 0) { return Promise.resolve(true); } // If there are new entries the cache is invalid - if (this.compilationState.entries !== this.compilationState.previousEntries) { + if ( + this.compilationState.entries !== this.compilationState.previousEntries + ) { return Promise.resolve(false); } // Mark the cache as invalid if there is no snapshot @@ -385,7 +425,10 @@ class PersistentChildCompilerSingletonPlugin { return Promise.resolve(false); } - return PersistentChildCompilerSingletonPlugin.isSnapshotValid(snapshot, mainCompilation); + return PersistentChildCompilerSingletonPlugin.isSnapshotValid( + snapshot, + mainCompilation, + ); } /** @@ -396,29 +439,32 @@ class PersistentChildCompilerSingletonPlugin { * @param {string[]} entries * @returns {Promise} */ - compileEntries (mainCompilation, entries) { + compileEntries(mainCompilation, entries) { const compiler = new HtmlWebpackChildCompiler(entries); - return compiler.compileTemplates(mainCompilation).then((result) => { - return { - // The compiled sources to render the content - compiledEntries: result, + return compiler.compileTemplates(mainCompilation).then( + (result) => { + return { + // The compiled sources to render the content + compiledEntries: result, + // The file dependencies to find out if a + // recompilation is required + dependencies: compiler.fileDependencies, + // The main compilation hash can be used to find out + // if this compilation was done during the current compilation + mainCompilationHash: mainCompilation.hash, + }; + }, + (error) => ({ + // The compiled sources to render the content + error, // The file dependencies to find out if a // recompilation is required dependencies: compiler.fileDependencies, // The main compilation hash can be used to find out // if this compilation was done during the current compilation - mainCompilationHash: mainCompilation.hash - }; - }, error => ({ - // The compiled sources to render the content - error, - // The file dependencies to find out if a - // recompilation is required - dependencies: compiler.fileDependencies, - // The main compilation hash can be used to find out - // if this compilation was done during the current compilation - mainCompilationHash: mainCompilation.hash - })); + mainCompilationHash: mainCompilation.hash, + }), + ); } /** @@ -426,11 +472,11 @@ class PersistentChildCompilerSingletonPlugin { * @param {Compilation} mainCompilation * @param {FileDependencies} files */ - watchFiles (mainCompilation, files) { + watchFiles(mainCompilation, files) { PersistentChildCompilerSingletonPlugin.watchFiles(mainCompilation, files); } } module.exports = { - CachedChildCompilation + CachedChildCompilation, }; diff --git a/lib/child-compiler.js b/lib/child-compiler.js index ea5760f3..e4ba4f91 100644 --- a/lib/child-compiler.js +++ b/lib/child-compiler.js @@ -1,5 +1,5 @@ // @ts-check -'use strict'; +"use strict"; /** * @file @@ -22,7 +22,7 @@ class HtmlWebpackChildCompiler { * * @param {string[]} templates */ - constructor (templates) { + constructor(templates) { /** * @type {string[]} templateIds * The template array will allow us to keep track which input generated which output @@ -38,7 +38,11 @@ class HtmlWebpackChildCompiler { * All file dependencies of the child compiler * @type {{fileDependencies: string[], contextDependencies: string[], missingDependencies: string[]}} */ - this.fileDependencies = { fileDependencies: [], contextDependencies: [], missingDependencies: [] }; + this.fileDependencies = { + fileDependencies: [], + contextDependencies: [], + missingDependencies: [], + }; } /** @@ -46,7 +50,7 @@ class HtmlWebpackChildCompiler { * * @returns {boolean} */ - isCompiling () { + isCompiling() { return !this.didCompile() && this.compilationStartedTimestamp !== undefined; } @@ -55,7 +59,7 @@ class HtmlWebpackChildCompiler { * * @returns {boolean} */ - didCompile () { + didCompile() { return this.compilationEndedTimestamp !== undefined; } @@ -66,7 +70,7 @@ class HtmlWebpackChildCompiler { * @param {import('webpack').Compilation} mainCompilation * @returns {Promise<{[templatePath: string]: ChildCompilationTemplateResult}>} */ - compileTemplates (mainCompilation) { + compileTemplates(mainCompilation) { const webpack = mainCompilation.compiler.webpack; const Compilation = webpack.Compilation; @@ -83,46 +87,62 @@ class HtmlWebpackChildCompiler { } const outputOptions = { - filename: '__child-[name]', - publicPath: '', + filename: "__child-[name]", + publicPath: "", library: { - type: 'var', - name: 'HTML_WEBPACK_PLUGIN_RESULT' + type: "var", + name: "HTML_WEBPACK_PLUGIN_RESULT", }, - scriptType: /** @type {'text/javascript'} */('text/javascript'), - iife: true + scriptType: /** @type {'text/javascript'} */ ("text/javascript"), + iife: true, }; - const compilerName = 'HtmlWebpackCompiler'; + const compilerName = "HtmlWebpackCompiler"; // Create an additional child compiler which takes the template // and turns it into an Node.JS html factory. // This allows us to use loaders during the compilation - const childCompiler = mainCompilation.createChildCompiler(compilerName, outputOptions, [ - // Compile the template to nodejs javascript - new NodeTargetPlugin(), - new NodeTemplatePlugin(), - new LoaderTargetPlugin('node'), - new webpack.library.EnableLibraryPlugin('var') - ]); + const childCompiler = mainCompilation.createChildCompiler( + compilerName, + outputOptions, + [ + // Compile the template to nodejs javascript + new NodeTargetPlugin(), + new NodeTemplatePlugin(), + new LoaderTargetPlugin("node"), + new webpack.library.EnableLibraryPlugin("var"), + ], + ); // The file path context which webpack uses to resolve all relative files to childCompiler.context = mainCompilation.compiler.context; // Generate output file names - const temporaryTemplateNames = this.templates.map((template, index) => `__child-HtmlWebpackPlugin_${index}-${template}`); + const temporaryTemplateNames = this.templates.map( + (template, index) => `__child-HtmlWebpackPlugin_${index}-${template}`, + ); // Add all templates this.templates.forEach((template, index) => { - new EntryPlugin(childCompiler.context, 'data:text/javascript,__webpack_public_path__ = __webpack_base_uri__ = htmlWebpackPluginPublicPath;', `HtmlWebpackPlugin_${index}-${template}`).apply(childCompiler); - new EntryPlugin(childCompiler.context, template, `HtmlWebpackPlugin_${index}-${template}`).apply(childCompiler); + new EntryPlugin( + childCompiler.context, + "data:text/javascript,__webpack_public_path__ = __webpack_base_uri__ = htmlWebpackPluginPublicPath;", + `HtmlWebpackPlugin_${index}-${template}`, + ).apply(childCompiler); + new EntryPlugin( + childCompiler.context, + template, + `HtmlWebpackPlugin_${index}-${template}`, + ).apply(childCompiler); }); // The templates are compiled and executed by NodeJS - similar to server side rendering // Unfortunately this causes issues as some loaders require an absolute URL to support ES Modules // The following config enables relative URL support for the child compiler childCompiler.options.module = { ...childCompiler.options.module }; - childCompiler.options.module.parser = { ...childCompiler.options.module.parser }; + childCompiler.options.module.parser = { + ...childCompiler.options.module.parser, + }; childCompiler.options.module.parser.javascript = { ...childCompiler.options.module.parser.javascript, - url: 'relative' + url: "relative", }; this.compilationStartedTimestamp = new Date().getTime(); @@ -131,23 +151,26 @@ class HtmlWebpackChildCompiler { /** @type {Source[]} */ const extractedAssets = []; - childCompiler.hooks.thisCompilation.tap('HtmlWebpackPlugin', (compilation) => { - compilation.hooks.processAssets.tap( - { - name: 'HtmlWebpackPlugin', - stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONS - }, - (assets) => { - temporaryTemplateNames.forEach((temporaryTemplateName) => { - if (assets[temporaryTemplateName]) { - extractedAssets.push(assets[temporaryTemplateName]); - - compilation.deleteAsset(temporaryTemplateName); - } - }); - } - ); - }); + childCompiler.hooks.thisCompilation.tap( + "HtmlWebpackPlugin", + (compilation) => { + compilation.hooks.processAssets.tap( + { + name: "HtmlWebpackPlugin", + stage: Compilation.PROCESS_ASSETS_STAGE_ADDITIONS, + }, + (assets) => { + temporaryTemplateNames.forEach((temporaryTemplateName) => { + if (assets[temporaryTemplateName]) { + extractedAssets.push(assets[temporaryTemplateName]); + + compilation.deleteAsset(temporaryTemplateName); + } + }); + }, + ); + }, + ); childCompiler.runAsChild((err, entries, childCompilation) => { // Extract templates @@ -158,20 +181,34 @@ class HtmlWebpackChildCompiler { // Extract file dependencies if (entries && childCompilation) { - this.fileDependencies = { fileDependencies: Array.from(childCompilation.fileDependencies), contextDependencies: Array.from(childCompilation.contextDependencies), missingDependencies: Array.from(childCompilation.missingDependencies) }; + this.fileDependencies = { + fileDependencies: Array.from(childCompilation.fileDependencies), + contextDependencies: Array.from( + childCompilation.contextDependencies, + ), + missingDependencies: Array.from( + childCompilation.missingDependencies, + ), + }; } // Reject the promise if the childCompilation contains error - if (childCompilation && childCompilation.errors && childCompilation.errors.length) { - const errorDetails = childCompilation.errors.map(error => { - let message = error.message; - if (error.stack) { - message += '\n' + error.stack; - } - return message; - }).join('\n'); + if ( + childCompilation && + childCompilation.errors && + childCompilation.errors.length + ) { + const errorDetails = childCompilation.errors + .map((error) => { + let message = error.message; + if (error.stack) { + message += "\n" + error.stack; + } + return message; + }) + .join("\n"); - reject(new Error('Child compilation failed:\n' + errorDetails)); + reject(new Error("Child compilation failed:\n" + errorDetails)); return; } @@ -183,7 +220,7 @@ class HtmlWebpackChildCompiler { } if (!childCompilation || !entries) { - reject(new Error('Empty child compilation')); + reject(new Error("Empty child compilation")); return; } @@ -206,9 +243,9 @@ class HtmlWebpackChildCompiler { result[this.templates[entryIndex]] = { // TODO, can we have Buffer here? content: /** @type {string} */ (templateSource), - hash: childCompilation.hash || 'XXXX', + hash: childCompilation.hash || "XXXX", entry: entries[entryIndex], - assets + assets, }; }); @@ -223,5 +260,5 @@ class HtmlWebpackChildCompiler { } module.exports = { - HtmlWebpackChildCompiler + HtmlWebpackChildCompiler, }; diff --git a/lib/chunksorter.js b/lib/chunksorter.js index 689abecc..2cabf172 100644 --- a/lib/chunksorter.js +++ b/lib/chunksorter.js @@ -1,5 +1,5 @@ // @ts-check -'use strict'; +"use strict"; /** @typedef {import("webpack").Compilation} Compilation */ @@ -14,7 +14,7 @@ module.exports = {}; * @param {Array} chunks the chunks to sort * @return {Array} The sorted chunks */ -module.exports.none = chunks => chunks; +module.exports.none = (chunks) => chunks; /** * Sort manually by the chunks @@ -23,7 +23,11 @@ module.exports.none = chunks => chunks; * @param {any} htmlWebpackPluginOptions the plugin options * @return {string[]} The sorted chunks */ -module.exports.manual = (entryPointNames, compilation, htmlWebpackPluginOptions) => { +module.exports.manual = ( + entryPointNames, + compilation, + htmlWebpackPluginOptions, +) => { const chunks = htmlWebpackPluginOptions.chunks; if (!Array.isArray(chunks)) { return entryPointNames; diff --git a/lib/errors.js b/lib/errors.js index b3057722..c9be9157 100644 --- a/lib/errors.js +++ b/lib/errors.js @@ -1,18 +1,18 @@ // @ts-nocheck -'use strict'; +"use strict"; let prettyError; -function getPrettyError () { +function getPrettyError() { if (!prettyError) { // lazily require to improve startup time since pretty-error is rather heavy package - const PrettyError = require('pretty-error'); + const PrettyError = require("pretty-error"); prettyError = new PrettyError(); prettyError.withoutColors(); - prettyError.skipPackage('html-plugin-evaluation'); + prettyError.skipPackage("html-plugin-evaluation"); prettyError.skipNodeFiles(); prettyError.skip(function (traceLine) { - return traceLine.path === 'html-plugin-evaluation'; + return traceLine.path === "html-plugin-evaluation"; }); } return prettyError; @@ -21,20 +21,22 @@ function getPrettyError () { module.exports = function (err, context) { return { toHtml: function () { - return 'Html Webpack Plugin:\n
\n' + this.toString() + '
'; + return "Html Webpack Plugin:\n
\n" + this.toString() + "
"; }, toJsonHtml: function () { return JSON.stringify(this.toHtml()); }, toString: function () { try { - return getPrettyError().render(err).replace(/webpack:\/\/\/\./g, context); + return getPrettyError() + .render(err) + .replace(/webpack:\/\/\/\./g, context); } catch (e) { // This can sometimes fail. We don't know why, but returning the // original error is better than returning the error thrown by // pretty-error. return err; } - } + }, }; }; diff --git a/lib/html-tags.js b/lib/html-tags.js index 3dd3df92..391fbbbe 100644 --- a/lib/html-tags.js +++ b/lib/html-tags.js @@ -17,7 +17,23 @@ * All html tag elements which must not contain innerHTML * @see https://www.w3.org/TR/html5/syntax.html#void-elements */ -const voidTags = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; +const voidTags = [ + "area", + "base", + "br", + "col", + "embed", + "hr", + "img", + "input", + "keygen", + "link", + "meta", + "param", + "source", + "track", + "wbr", +]; /** * Turn a tag definition into a html string @@ -27,20 +43,32 @@ const voidTags = ['area', 'base', 'br', 'col', 'embed', 'hr', 'img', 'input', 'k * @param xhtml {boolean} * Whether the generated html should add closing slashes to be xhtml compliant */ -function htmlTagObjectToString (tagDefinition, xhtml) { +function htmlTagObjectToString(tagDefinition, xhtml) { const attributes = Object.keys(tagDefinition.attributes || {}) .filter(function (attributeName) { - return tagDefinition.attributes[attributeName] === '' || tagDefinition.attributes[attributeName]; + return ( + tagDefinition.attributes[attributeName] === "" || + tagDefinition.attributes[attributeName] + ); }) .map(function (attributeName) { if (tagDefinition.attributes[attributeName] === true) { - return xhtml ? attributeName + '="' + attributeName + '"' : attributeName; + return xhtml + ? attributeName + '="' + attributeName + '"' + : attributeName; } - return attributeName + '="' + tagDefinition.attributes[attributeName] + '"'; + return ( + attributeName + '="' + tagDefinition.attributes[attributeName] + '"' + ); }); - return '<' + [tagDefinition.tagName].concat(attributes).join(' ') + (tagDefinition.voidTag && xhtml ? '/' : '') + '>' + - (tagDefinition.innerHTML || '') + - (tagDefinition.voidTag ? '' : ''); + return ( + "<" + + [tagDefinition.tagName].concat(attributes).join(" ") + + (tagDefinition.voidTag && xhtml ? "/" : "") + + ">" + + (tagDefinition.innerHTML || "") + + (tagDefinition.voidTag ? "" : "") + ); } /** @@ -59,13 +87,13 @@ function htmlTagObjectToString (tagDefinition, xhtml) { * * @returns {HtmlTagObject} */ -function createHtmlTagObject (tagName, attributes, innerHTML, meta) { +function createHtmlTagObject(tagName, attributes, innerHTML, meta) { return { tagName: tagName, voidTag: voidTags.indexOf(tagName) !== -1, attributes: attributes || {}, meta: meta || {}, - innerHTML: innerHTML + innerHTML: innerHTML, }; } @@ -87,13 +115,13 @@ function createHtmlTagObject (tagName, attributes, innerHTML, meta) { * */ class HtmlTagArray extends Array { - toString () { - return this.join(''); + toString() { + return this.join(""); } } module.exports = { HtmlTagArray: HtmlTagArray, createHtmlTagObject: createHtmlTagObject, - htmlTagObjectToString: htmlTagObjectToString + htmlTagObjectToString: htmlTagObjectToString, }; diff --git a/lib/loader.js b/lib/loader.js index 3e466a9a..8c385921 100644 --- a/lib/loader.js +++ b/lib/loader.js @@ -1,14 +1,16 @@ /* This loader renders the template with underscore if no other loader was found */ // @ts-nocheck -'use strict'; -const _ = require('lodash'); +"use strict"; +const _ = require("lodash"); module.exports = function (source) { // Get templating options const options = this.getOptions(); const force = options.force || false; - const allLoadersButThisOne = this.loaders.filter((loader) => loader.normal !== module.exports); + const allLoadersButThisOne = this.loaders.filter( + (loader) => loader.normal !== module.exports, + ); // This loader shouldn't kick in if there is any other loader (unless it's explicitly enforced) if (allLoadersButThisOne.length > 0 && !force) { @@ -16,8 +18,11 @@ module.exports = function (source) { } // Allow only one html-webpack-plugin loader to allow loader options in the webpack config - const htmlWebpackPluginLoaders = this.loaders.filter((loader) => loader.normal === module.exports); - const lastHtmlWebpackPluginLoader = htmlWebpackPluginLoaders[htmlWebpackPluginLoaders.length - 1]; + const htmlWebpackPluginLoaders = this.loaders.filter( + (loader) => loader.normal === module.exports, + ); + const lastHtmlWebpackPluginLoader = + htmlWebpackPluginLoaders[htmlWebpackPluginLoaders.length - 1]; if (this.loaders[this.loaderIndex] !== lastHtmlWebpackPluginLoader) { return source; } @@ -29,12 +34,22 @@ module.exports = function (source) { // The following part renders the template with lodash as a minimalistic loader // - const template = _.template(source, { interpolate: /<%=([\s\S]+?)%>/g, variable: 'data', ...options }); + const template = _.template(source, { + interpolate: /<%=([\s\S]+?)%>/g, + variable: "data", + ...options, + }); // Use `eval("require")("lodash")` to enforce using the native nodejs require // during template execution - return 'var _ = eval("require")(' + JSON.stringify(require.resolve('lodash')) + ');' + - 'module.exports = function (templateParams) { with(templateParams) {' + - // Execute the lodash template - 'return (' + template.source + ')();' + - '}}'; + return ( + 'var _ = eval("require")(' + + JSON.stringify(require.resolve("lodash")) + + ");" + + "module.exports = function (templateParams) { with(templateParams) {" + + // Execute the lodash template + "return (" + + template.source + + ")();" + + "}}" + ); }; diff --git a/lint-staged.config.js b/lint-staged.config.js new file mode 100644 index 00000000..30108433 --- /dev/null +++ b/lint-staged.config.js @@ -0,0 +1,7 @@ +module.exports = { + "*": [ + "prettier --cache --write --ignore-unknown", + "cspell --cache --no-must-find-files", + ], + "*.js": ["eslint --cache --fix"], +}; diff --git a/logs b/logs new file mode 100644 index 00000000..91f0e1e7 --- /dev/null +++ b/logs @@ -0,0 +1,13 @@ + [webpack-dev-server] Project is running at: + [webpack-dev-server] Loopback: http://localhost:8080/ + [webpack-dev-server] On Your Network (IPv4): http://172.20.10.2:8080/ + [webpack-dev-server] Content not from webpack is served from '/home/akait/IdeaProjects/html-webpack-plugin/dist' directory +/home/akait/IdeaProjects/html-webpack-plugin/node_modules/image-minimizer-webpack-plugin/dist/loader.js:43 + loaderContext.request = request.replace(".png", ".webp"); + ^ + +ReferenceError: request is not defined + at changeResource (/home/akait/IdeaProjects/html-webpack-plugin/node_modules/image-minimizer-webpack-plugin/dist/loader.js:43:27) + at Object.loader (/home/akait/IdeaProjects/html-webpack-plugin/node_modules/image-minimizer-webpack-plugin/dist/loader.js:191:5) + +Node.js v18.15.0 diff --git a/migration.md b/migration.md index 120b80c2..8860d46c 100644 --- a/migration.md +++ b/migration.md @@ -8,73 +8,74 @@ As of 2.x the `inject` options is set to true by default which means that all yo The default template has changed according to the inject option - but should behave like the previous version did. - ```js -var HtmlWebpackPlugin = require('html-webpack-plugin'); +var HtmlWebpackPlugin = require("html-webpack-plugin"); module.exports = { - // ... - plugins: [ - new HtmlWebpackPlugin() - ] + // ... + plugins: [new HtmlWebpackPlugin()], }; ``` ## Custom template -This inject feature aims to simpify your custom templates: +This inject feature aims to simplify your custom templates: https://github.com/ampedandwired/html-webpack-plugin/tree/master/examples/custom-template ```js -var HtmlWebpackPlugin = require('html-webpack-plugin'); +var HtmlWebpackPlugin = require("html-webpack-plugin"); module.exports = { - // ... - plugins: [ - new HtmlWebpackPlugin({ - template: 'template.html' - }) - ] + // ... + plugins: [ + new HtmlWebpackPlugin({ + template: "template.html", + }), + ], }; ``` ```html - - - Webpack App - - - + + + Webpack App + + ``` Although we did not specify any script tags or link tags they will be injected automatically and the result will be: + ```html - - - Webpack App - - - - - + + + Webpack App + + + + + ``` ## Templating and variables As of 2.x blueimp was replaced by lodash/underscore/ejs templates as they are more common. -This also removes the `o` in template variables. ` ` becomes `` it also allows to escape variables by using `<%-` instead of `<%=` to prevent unexpected behaviours: `` +This also removes the `o` in template variables. ` ` becomes `` it also allows to escape variables by using `<%-` instead of `<%=` to prevent unexpected behaviours: `` # Loaders in templates + Loaders may now be used inside the template the same way as you would expect in your javascript files. ```html - + <%= require('partial.html') %> ``` @@ -83,19 +84,18 @@ For the above example you would have to configure a [html](https://github.com/we ```js module: { rules: [ - { test: /\.png$/, type: 'asset/resource' }, + { test: /\.png$/, type: "asset/resource" }, { test: /\.html$/, exclude: /index\.html$/, // you need to exclude your base template (unless you do not want this plugin own templating feature) - loader: "html" - } - ] + loader: "html", + }, + ]; } ``` This configuration allows you to require partial html from your main `index.html` without being itself parsed by the html-loader instead of this html-webpack-plugin. - ## Custom template engines Maybe you prefer pug or blueimp over underscore - or your project is using pug for the front end part. @@ -103,15 +103,15 @@ With 2.x you can use the webpack loaders either once only for the template as in where we use pug (requires the [pug-loader](https://github.com/webpack/pug-loader)): ```js -var HtmlWebpackPlugin = require('html-webpack-plugin'); +var HtmlWebpackPlugin = require("html-webpack-plugin"); module.exports = { - // ... - plugins: [ - new HtmlWebpackPlugin({ - template: 'pug-loader!template.pug' - }) - ] + // ... + plugins: [ + new HtmlWebpackPlugin({ + template: "pug-loader!template.pug", + }), + ], }; ``` @@ -121,15 +121,13 @@ or by configuring webpack to handle all `.pug` files: module.exports = { // ... module: { - rules: [ - { test: /\.pug$/, loader: 'pug-loader' } - ] + rules: [{ test: /\.pug$/, loader: "pug-loader" }], }, plugins: [ new HtmlWebpackPlugin({ - template: 'template.pug' - }) - ] + template: "template.pug", + }), + ], }; ``` @@ -145,28 +143,36 @@ module.exports = { // ... plugins: [ new HtmlWebpackPlugin({ - template: 'template.js' - }) - ] + template: "template.js", + }), + ], }; ``` + Simple template.js + ```js -module.exports = '...'; +module.exports = "..."; ``` + More advanced template.js + ```js - module.exports = function(templateParams) { - return '..'; - }; +module.exports = function (templateParams) { + return ".."; +}; ``` + Using loaders inside a template.js + ```js - // This function has to return a string or promised string: - module.exports = function(templateParams) { - // Play around with the arguments and then use the webpack pug loader to load the pug: - return require('./template.pug')({assets: templateParams.htmlWebpackPlugin.files}); - }; +// This function has to return a string or promised string: +module.exports = function (templateParams) { + // Play around with the arguments and then use the webpack pug loader to load the pug: + return require("./template.pug")({ + assets: templateParams.htmlWebpackPlugin.files, + }); +}; ``` Unfortunately `__dirname` does not work correctly. diff --git a/package-lock.json b/package-lock.json index e5776dd1..16c73e77 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4,6 +4,12 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true + }, "@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -395,30 +401,157 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "@commitlint/cli": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/cli/-/cli-18.6.0.tgz", + "integrity": "sha512-FiH23cr9QG8VdfbmvJJZmdfHGVMCouOOAzoXZ3Cd7czGC52RbycwNt8YCI7SA69pAl+t30vh8LMaO/N+kcel6w==", + "dev": true, + "requires": { + "@commitlint/format": "^18.6.0", + "@commitlint/lint": "^18.6.0", + "@commitlint/load": "^18.6.0", + "@commitlint/read": "^18.6.0", + "@commitlint/types": "^18.6.0", + "execa": "^5.0.0", + "lodash.isfunction": "^3.0.9", + "resolve-from": "5.0.0", + "resolve-global": "1.0.0", + "yargs": "^17.0.0" + }, + "dependencies": { + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + } + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + } + } + }, + "@commitlint/config-conventional": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/config-conventional/-/config-conventional-18.6.0.tgz", + "integrity": "sha512-CDCOf2eJz9D/TL44IBks0stM9TmdLCNE2B48owIU3YCadwzts/bobXPScagIgPQF6hhKYMEdj5zpUDlmbwuqwQ==", + "dev": true, + "requires": { + "conventional-changelog-conventionalcommits": "^7.0.2" + }, + "dependencies": { + "conventional-changelog-conventionalcommits": { + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-7.0.2.tgz", + "integrity": "sha512-NKXYmMR/Hr1DevQegFB4MwfM5Vv0m4UIxKZTTYuD98lpTknaZlSRrDOG4X7wIXpGkfsYxZTghUN+Qq+T0YQI7w==", + "dev": true, + "requires": { + "compare-func": "^2.0.0" + } + } + } + }, "@commitlint/config-validator": { "version": "18.6.0", "resolved": "https://registry.npmjs.org/@commitlint/config-validator/-/config-validator-18.6.0.tgz", "integrity": "sha512-Ptfa865arNozlkjxrYG3qt6wT9AlhNUHeuDyKEZiTL/l0ftncFhK/KN0t/EAMV2tec+0Mwxo0FmhbESj/bI+1g==", "dev": true, - "optional": true, "requires": { "@commitlint/types": "^18.6.0", "ajv": "^8.11.0" } }, + "@commitlint/ensure": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/ensure/-/ensure-18.6.0.tgz", + "integrity": "sha512-xY07NmOBJ7JuhX3tic021PaeLepZARIQyqpAQoNQZoml1keBFfB6MbA7XlWZv0ebbarUFE4yhKxOPw+WFv7/qw==", + "dev": true, + "requires": { + "@commitlint/types": "^18.6.0", + "lodash.camelcase": "^4.3.0", + "lodash.kebabcase": "^4.1.1", + "lodash.snakecase": "^4.1.1", + "lodash.startcase": "^4.4.0", + "lodash.upperfirst": "^4.3.1" + } + }, "@commitlint/execute-rule": { "version": "18.4.4", "resolved": "https://registry.npmjs.org/@commitlint/execute-rule/-/execute-rule-18.4.4.tgz", "integrity": "sha512-a37Nd3bDQydtg9PCLLWM9ZC+GO7X5i4zJvrggJv5jBhaHsXeQ9ZWdO6ODYR+f0LxBXXNYK3geYXJrCWUCP8JEg==", + "dev": true + }, + "@commitlint/format": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/format/-/format-18.6.0.tgz", + "integrity": "sha512-8UNWfs2slPPSQiiVpLGJTnPHv7Jkd5KYxfbNXbmLL583bjom4RrylvyrCVnmZReA8nNad7pPXq6mDH4FNVj6xg==", "dev": true, - "optional": true + "requires": { + "@commitlint/types": "^18.6.0", + "chalk": "^4.1.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } + } + }, + "@commitlint/is-ignored": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/is-ignored/-/is-ignored-18.6.0.tgz", + "integrity": "sha512-Xjx/ZyyJ4FdLuz0FcOvqiqSFgiO2yYj3QN9XlvyrxqbXTxPVC7QFEXJYBVPulUSN/gR7WXH1Udw+HYYfD17xog==", + "dev": true, + "requires": { + "@commitlint/types": "^18.6.0", + "semver": "7.5.4" + } + }, + "@commitlint/lint": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/lint/-/lint-18.6.0.tgz", + "integrity": "sha512-ycbuDWfyykPmslgiHzhz8dL6F0BJYltXLVfc+M49z0c+FNITM0v+r0Vd2+Tdtq06VTc894p2+YSmZhulY8Jn3Q==", + "dev": true, + "requires": { + "@commitlint/is-ignored": "^18.6.0", + "@commitlint/parse": "^18.6.0", + "@commitlint/rules": "^18.6.0", + "@commitlint/types": "^18.6.0" + } }, "@commitlint/load": { "version": "18.6.0", "resolved": "https://registry.npmjs.org/@commitlint/load/-/load-18.6.0.tgz", "integrity": "sha512-RRssj7TmzT0bowoEKlgwg8uQ7ORXWkw7lYLsZZBMi9aInsJuGNLNWcMxJxRZbwxG3jkCidGUg85WmqJvRjsaDA==", "dev": true, - "optional": true, "requires": { "@commitlint/config-validator": "^18.6.0", "@commitlint/execute-rule": "^18.4.4", @@ -438,7 +571,6 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, - "optional": true, "requires": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -446,12 +578,90 @@ } } }, + "@commitlint/message": { + "version": "18.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/message/-/message-18.4.4.tgz", + "integrity": "sha512-lHF95mMDYgAI1LBXveJUyg4eLaMXyOqJccCK3v55ZOEUsMPrDi8upqDjd/NmzWmESYihaOMBTAnxm+6oD1WoDQ==", + "dev": true + }, + "@commitlint/parse": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/parse/-/parse-18.6.0.tgz", + "integrity": "sha512-Y/G++GJpATFw54O0jikc/h2ibyGHgghtPnwsOk3O/aU092ydJ5XEHYcd7xGNQYuLweLzQis2uEwRNk9AVIPbQQ==", + "dev": true, + "requires": { + "@commitlint/types": "^18.6.0", + "conventional-changelog-angular": "^7.0.0", + "conventional-commits-parser": "^5.0.0" + }, + "dependencies": { + "conventional-changelog-angular": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-7.0.0.tgz", + "integrity": "sha512-ROjNchA9LgfNMTTFSIWPzebCwOGFdgkEq45EnvvrmSLvCtAw0HSmrCs7/ty+wAeYUZyNay0YMUNYFTRL72PkBQ==", + "dev": true, + "requires": { + "compare-func": "^2.0.0" + } + }, + "conventional-commits-parser": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-5.0.0.tgz", + "integrity": "sha512-ZPMl0ZJbw74iS9LuX9YIAiW8pfM5p3yh2o/NbXHbkFuZzY5jvdi5jFycEOkmBW5H5I7nA+D6f3UcsCLP2vvSEA==", + "dev": true, + "requires": { + "JSONStream": "^1.3.5", + "is-text-path": "^2.0.0", + "meow": "^12.0.1", + "split2": "^4.0.0" + } + }, + "is-text-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", + "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==", + "dev": true, + "requires": { + "text-extensions": "^2.0.0" + } + }, + "meow": { + "version": "12.1.1", + "resolved": "https://registry.npmjs.org/meow/-/meow-12.1.1.tgz", + "integrity": "sha512-BhXM0Au22RwUneMPwSCnyhTOizdWoIEPU9sp0Aqa1PnDMR5Wv2FGXYDjuzJEIX+Eo2Rb8xuYe5jrnm5QowQFkw==", + "dev": true + }, + "split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true + }, + "text-extensions": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.4.0.tgz", + "integrity": "sha512-te/NtwBwfiNRLf9Ijqx3T0nlqZiQ2XrrtBvu+cLL8ZRrGkO0NHTug8MYFKyoSrv/sHTaSKfilUkizV6XhxMJ3g==", + "dev": true + } + } + }, + "@commitlint/read": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/read/-/read-18.6.0.tgz", + "integrity": "sha512-w39ji8VfWhPKRquPhRHB3Yd8XIHwaNHgOh28YI1QEmZ59qVpuVUQo6h/NsVb+uoC6LbXZiofTZv2iFR084jKEA==", + "dev": true, + "requires": { + "@commitlint/top-level": "^18.4.4", + "@commitlint/types": "^18.6.0", + "git-raw-commits": "^2.0.11", + "minimist": "^1.2.6" + } + }, "@commitlint/resolve-extends": { "version": "18.6.0", "resolved": "https://registry.npmjs.org/@commitlint/resolve-extends/-/resolve-extends-18.6.0.tgz", "integrity": "sha512-k2Xp+Fxeggki2i90vGrbiLDMefPius3zGSTFFlRAPKce/SWLbZtI+uqE9Mne23mHO5lmcSV8z5m6ziiJwGpOcg==", "dev": true, - "optional": true, "requires": { "@commitlint/config-validator": "^18.6.0", "@commitlint/types": "^18.6.0", @@ -461,147 +671,80 @@ "resolve-global": "^1.0.0" } }, - "@commitlint/types": { + "@commitlint/rules": { "version": "18.6.0", - "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-18.6.0.tgz", - "integrity": "sha512-oavoKLML/eJa2rJeyYSbyGAYzTxQ6voG5oeX3OrxpfrkRWhJfm4ACnhoRf5tgiybx2MZ+EVFqC1Lw3W8/uwpZA==", + "resolved": "https://registry.npmjs.org/@commitlint/rules/-/rules-18.6.0.tgz", + "integrity": "sha512-pTalvCEvuCWrBWZA/YqO/3B3nZnY3Ncc+TmQsRajBdC1tkQIm5Iovdo4Ec7f2Dw1tVvpYMUUNAgcWqsY0WckWg==", "dev": true, - "optional": true, "requires": { - "chalk": "^4.1.0" - }, - "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "optional": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - } + "@commitlint/ensure": "^18.6.0", + "@commitlint/message": "^18.4.4", + "@commitlint/to-lines": "^18.4.4", + "@commitlint/types": "^18.6.0", + "execa": "^5.0.0" } }, - "@discoveryjs/json-ext": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", - "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", - "dev": true - }, - "@hutson/parse-repository-url": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz", - "integrity": "sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==", + "@commitlint/to-lines": { + "version": "18.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/to-lines/-/to-lines-18.4.4.tgz", + "integrity": "sha512-mwe2Roa59NCz/krniAdCygFabg7+fQCkIhXqBHw00XQ8Y7lw4poZLLxeGI3p3bLpcEOXdqIDrEGLwHmG5lBdwQ==", "dev": true }, - "@istanbuljs/load-nyc-config": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", - "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "@commitlint/top-level": { + "version": "18.4.4", + "resolved": "https://registry.npmjs.org/@commitlint/top-level/-/top-level-18.4.4.tgz", + "integrity": "sha512-PBwW1drgeavl9CadB7IPRUk6rkUP/O8jEkxjlC+ofuh3pw0bzJdAT+Kw7M1Yc9KtTb9xTaqUB8uvRtaybHa/tQ==", "dev": true, "requires": { - "camelcase": "^5.3.1", - "find-up": "^4.1.0", - "get-package-type": "^0.1.0", - "js-yaml": "^3.13.1", - "resolve-from": "^5.0.0" + "find-up": "^5.0.0" }, "dependencies": { - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { - "sprintf-js": "~1.0.2" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" } }, - "camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" + "yocto-queue": "^0.1.0" } - } - } - }, - "@istanbuljs/schema": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", - "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", - "dev": true - }, - "@jest/console": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", - "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", - "dev": true, - "requires": { - "@jest/types": "^27.5.1", - "@types/node": "*", - "chalk": "^4.0.0", - "jest-message-util": "^27.5.1", - "jest-util": "^27.5.1", - "slash": "^3.0.0" - }, - "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "p-limit": "^3.0.2" } } } }, - "@jest/core": { - "version": "27.5.1", - "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", - "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", + "@commitlint/types": { + "version": "18.6.0", + "resolved": "https://registry.npmjs.org/@commitlint/types/-/types-18.6.0.tgz", + "integrity": "sha512-oavoKLML/eJa2rJeyYSbyGAYzTxQ6voG5oeX3OrxpfrkRWhJfm4ACnhoRf5tgiybx2MZ+EVFqC1Lw3W8/uwpZA==", "dev": true, "requires": { - "@jest/console": "^27.5.1", - "@jest/reporters": "^27.5.1", - "@jest/test-result": "^27.5.1", - "@jest/transform": "^27.5.1", - "@jest/types": "^27.5.1", - "@types/node": "*", - "ansi-escapes": "^4.2.1", - "chalk": "^4.0.0", - "emittery": "^0.8.1", - "exit": "^0.1.2", - "graceful-fs": "^4.2.9", - "jest-changed-files": "^27.5.1", - "jest-config": "^27.5.1", - "jest-haste-map": "^27.5.1", - "jest-message-util": "^27.5.1", - "jest-regex-util": "^27.5.1", - "jest-resolve": "^27.5.1", - "jest-resolve-dependencies": "^27.5.1", - "jest-runner": "^27.5.1", - "jest-runtime": "^27.5.1", - "jest-snapshot": "^27.5.1", - "jest-util": "^27.5.1", - "jest-validate": "^27.5.1", - "jest-watcher": "^27.5.1", - "micromatch": "^4.0.4", - "rimraf": "^3.0.0", - "slash": "^3.0.0", - "strip-ansi": "^6.0.0" + "chalk": "^4.1.0" }, "dependencies": { "chalk": { @@ -613,10 +756,707 @@ "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + } + } + }, + "@cspell/cspell-bundled-dicts": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-bundled-dicts/-/cspell-bundled-dicts-8.3.2.tgz", + "integrity": "sha512-3ubOgz1/MDixJbq//0rQ2omB3cSdhVJDviERZeiREGz4HOq84aaK1Fqbw5SjNZHvhpoq+AYXm6kJbIAH8YhKgg==", + "dev": true, + "requires": { + "@cspell/dict-ada": "^4.0.2", + "@cspell/dict-aws": "^4.0.1", + "@cspell/dict-bash": "^4.1.3", + "@cspell/dict-companies": "^3.0.29", + "@cspell/dict-cpp": "^5.0.10", + "@cspell/dict-cryptocurrencies": "^5.0.0", + "@cspell/dict-csharp": "^4.0.2", + "@cspell/dict-css": "^4.0.12", + "@cspell/dict-dart": "^2.0.3", + "@cspell/dict-django": "^4.1.0", + "@cspell/dict-docker": "^1.1.7", + "@cspell/dict-dotnet": "^5.0.0", + "@cspell/dict-elixir": "^4.0.3", + "@cspell/dict-en-common-misspellings": "^2.0.0", + "@cspell/dict-en-gb": "1.1.33", + "@cspell/dict-en_us": "^4.3.13", + "@cspell/dict-filetypes": "^3.0.3", + "@cspell/dict-fonts": "^4.0.0", + "@cspell/dict-fsharp": "^1.0.1", + "@cspell/dict-fullstack": "^3.1.5", + "@cspell/dict-gaming-terms": "^1.0.4", + "@cspell/dict-git": "^3.0.0", + "@cspell/dict-golang": "^6.0.5", + "@cspell/dict-haskell": "^4.0.1", + "@cspell/dict-html": "^4.0.5", + "@cspell/dict-html-symbol-entities": "^4.0.0", + "@cspell/dict-java": "^5.0.6", + "@cspell/dict-k8s": "^1.0.2", + "@cspell/dict-latex": "^4.0.0", + "@cspell/dict-lorem-ipsum": "^4.0.0", + "@cspell/dict-lua": "^4.0.3", + "@cspell/dict-makefile": "^1.0.0", + "@cspell/dict-node": "^4.0.3", + "@cspell/dict-npm": "^5.0.14", + "@cspell/dict-php": "^4.0.5", + "@cspell/dict-powershell": "^5.0.3", + "@cspell/dict-public-licenses": "^2.0.5", + "@cspell/dict-python": "^4.1.11", + "@cspell/dict-r": "^2.0.1", + "@cspell/dict-ruby": "^5.0.2", + "@cspell/dict-rust": "^4.0.1", + "@cspell/dict-scala": "^5.0.0", + "@cspell/dict-software-terms": "^3.3.15", + "@cspell/dict-sql": "^2.1.3", + "@cspell/dict-svelte": "^1.0.2", + "@cspell/dict-swift": "^2.0.1", + "@cspell/dict-typescript": "^3.1.2", + "@cspell/dict-vue": "^3.0.0" + } + }, + "@cspell/cspell-json-reporter": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-json-reporter/-/cspell-json-reporter-8.3.2.tgz", + "integrity": "sha512-gHSz4jXMJPcxx+lOGfXhHuoyenAWQ8PVA/atHFrWYKo1LzKTbpkEkrsDnlX8QNJubc3EMH63Uy+lOIaFDVyHiQ==", + "dev": true, + "requires": { + "@cspell/cspell-types": "8.3.2" + } + }, + "@cspell/cspell-pipe": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-pipe/-/cspell-pipe-8.3.2.tgz", + "integrity": "sha512-GZmDwvQGOjQi3IjD4k9xXeVTDANczksOsgVKb3v2QZk9mR4Qj8c6Uarjd4AgSiIhu/wBliJfzr5rWFJu4X2VfQ==", + "dev": true + }, + "@cspell/cspell-resolver": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-resolver/-/cspell-resolver-8.3.2.tgz", + "integrity": "sha512-w2Tmb95bzdEz9L4W5qvsP5raZbyEzKL7N2ksU/+yh8NEJcTuExmAl/nMnb3aIk7m2b+kPHnMOcJuwfUMLmyv4A==", + "dev": true, + "requires": { + "global-directory": "^4.0.1" + } + }, + "@cspell/cspell-service-bus": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-service-bus/-/cspell-service-bus-8.3.2.tgz", + "integrity": "sha512-skTHNyVi74//W/O+f4IauDhm6twA9S2whkylonsIzPxEl4Pn3y2ZEMXNki/MWUwZfDIzKKSxlcREH61g7zCvhg==", + "dev": true + }, + "@cspell/cspell-types": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@cspell/cspell-types/-/cspell-types-8.3.2.tgz", + "integrity": "sha512-qS/gWd9ItOrN6ZX5pwC9lJjnBoyiAyhxYq0GUXuV892LQvwrBmECGk6KhsA1lPW7JJS7o57YTAS1jmXnmXMEpg==", + "dev": true + }, + "@cspell/dict-ada": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-ada/-/dict-ada-4.0.2.tgz", + "integrity": "sha512-0kENOWQeHjUlfyId/aCM/mKXtkEgV0Zu2RhUXCBr4hHo9F9vph+Uu8Ww2b0i5a4ZixoIkudGA+eJvyxrG1jUpA==", + "dev": true + }, + "@cspell/dict-aws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-aws/-/dict-aws-4.0.1.tgz", + "integrity": "sha512-NXO+kTPQGqaaJKa4kO92NAXoqS+i99dQzf3/L1BxxWVSBS3/k1f3uhmqIh7Crb/n22W793lOm0D9x952BFga3Q==", + "dev": true + }, + "@cspell/dict-bash": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-bash/-/dict-bash-4.1.3.tgz", + "integrity": "sha512-tOdI3QVJDbQSwPjUkOiQFhYcu2eedmX/PtEpVWg0aFps/r6AyjUQINtTgpqMYnYuq8O1QUIQqnpx21aovcgZCw==", + "dev": true + }, + "@cspell/dict-companies": { + "version": "3.0.31", + "resolved": "https://registry.npmjs.org/@cspell/dict-companies/-/dict-companies-3.0.31.tgz", + "integrity": "sha512-hKVpV/lcGKP4/DpEPS8P4osPvFH/YVLJaDn9cBIOH6/HSmL5LbFgJNKpMGaYRbhm2FEX56MKE3yn/MNeNYuesQ==", + "dev": true + }, + "@cspell/dict-cpp": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-cpp/-/dict-cpp-5.1.3.tgz", + "integrity": "sha512-sqnriXRAInZH9W75C+APBh6dtben9filPqVbIsiRMUXGg+s02ekz0z6LbS7kXeJ5mD2qXoMLBrv13qH2eIwutQ==", + "dev": true + }, + "@cspell/dict-cryptocurrencies": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-cryptocurrencies/-/dict-cryptocurrencies-5.0.0.tgz", + "integrity": "sha512-Z4ARIw5+bvmShL+4ZrhDzGhnc9znaAGHOEMaB/GURdS/jdoreEDY34wdN0NtdLHDO5KO7GduZnZyqGdRoiSmYA==", + "dev": true + }, + "@cspell/dict-csharp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-csharp/-/dict-csharp-4.0.2.tgz", + "integrity": "sha512-1JMofhLK+4p4KairF75D3A924m5ERMgd1GvzhwK2geuYgd2ZKuGW72gvXpIV7aGf52E3Uu1kDXxxGAiZ5uVG7g==", + "dev": true + }, + "@cspell/dict-css": { + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/@cspell/dict-css/-/dict-css-4.0.12.tgz", + "integrity": "sha512-vGBgPM92MkHQF5/2jsWcnaahOZ+C6OE/fPvd5ScBP72oFY9tn5GLuomcyO0z8vWCr2e0nUSX1OGimPtcQAlvSw==", + "dev": true + }, + "@cspell/dict-dart": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-dart/-/dict-dart-2.0.3.tgz", + "integrity": "sha512-cLkwo1KT5CJY5N5RJVHks2genFkNCl/WLfj+0fFjqNR+tk3tBI1LY7ldr9piCtSFSm4x9pO1x6IV3kRUY1lLiw==", + "dev": true + }, + "@cspell/dict-data-science": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-data-science/-/dict-data-science-1.0.11.tgz", + "integrity": "sha512-TaHAZRVe0Zlcc3C23StZqqbzC0NrodRwoSAc8dis+5qLeLLnOCtagYQeROQvDlcDg3X/VVEO9Whh4W/z4PAmYQ==", + "dev": true + }, + "@cspell/dict-django": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-django/-/dict-django-4.1.0.tgz", + "integrity": "sha512-bKJ4gPyrf+1c78Z0Oc4trEB9MuhcB+Yg+uTTWsvhY6O2ncFYbB/LbEZfqhfmmuK/XJJixXfI1laF2zicyf+l0w==", + "dev": true + }, + "@cspell/dict-docker": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/@cspell/dict-docker/-/dict-docker-1.1.7.tgz", + "integrity": "sha512-XlXHAr822euV36GGsl2J1CkBIVg3fZ6879ZOg5dxTIssuhUOCiV2BuzKZmt6aIFmcdPmR14+9i9Xq+3zuxeX0A==", + "dev": true + }, + "@cspell/dict-dotnet": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-dotnet/-/dict-dotnet-5.0.0.tgz", + "integrity": "sha512-EOwGd533v47aP5QYV8GlSSKkmM9Eq8P3G/eBzSpH3Nl2+IneDOYOBLEUraHuiCtnOkNsz0xtZHArYhAB2bHWAw==", + "dev": true + }, + "@cspell/dict-elixir": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-elixir/-/dict-elixir-4.0.3.tgz", + "integrity": "sha512-g+uKLWvOp9IEZvrIvBPTr/oaO6619uH/wyqypqvwpmnmpjcfi8+/hqZH8YNKt15oviK8k4CkINIqNhyndG9d9Q==", + "dev": true + }, + "@cspell/dict-en-common-misspellings": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-common-misspellings/-/dict-en-common-misspellings-2.0.0.tgz", + "integrity": "sha512-NOg8dlv37/YqLkCfBs5OXeJm/Wcfb/CzeOmOZJ2ZXRuxwsNuolb4TREUce0yAXRqMhawahY5TSDRJJBgKjBOdw==", + "dev": true + }, + "@cspell/dict-en-gb": { + "version": "1.1.33", + "resolved": "https://registry.npmjs.org/@cspell/dict-en-gb/-/dict-en-gb-1.1.33.tgz", + "integrity": "sha512-tKSSUf9BJEV+GJQAYGw5e+ouhEe2ZXE620S7BLKe3ZmpnjlNG9JqlnaBhkIMxKnNFkLY2BP/EARzw31AZnOv4g==", + "dev": true + }, + "@cspell/dict-en_us": { + "version": "4.3.15", + "resolved": "https://registry.npmjs.org/@cspell/dict-en_us/-/dict-en_us-4.3.15.tgz", + "integrity": "sha512-h1kwvU2w/e4ngXAbesU3z3GnK9kAUJVGRUcQJiBHGg4cY7+hsAD506JezoBD+kus2+cuYVkoeSKdi0FyqS7xyg==", + "dev": true + }, + "@cspell/dict-filetypes": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-filetypes/-/dict-filetypes-3.0.3.tgz", + "integrity": "sha512-J9UP+qwwBLfOQ8Qg9tAsKtSY/WWmjj21uj6zXTI9hRLD1eG1uUOLcfVovAmtmVqUWziPSKMr87F6SXI3xmJXgw==", + "dev": true + }, + "@cspell/dict-fonts": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-fonts/-/dict-fonts-4.0.0.tgz", + "integrity": "sha512-t9V4GeN/m517UZn63kZPUYP3OQg5f0OBLSd3Md5CU3eH1IFogSvTzHHnz4Wqqbv8NNRiBZ3HfdY/pqREZ6br3Q==", + "dev": true + }, + "@cspell/dict-fsharp": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-fsharp/-/dict-fsharp-1.0.1.tgz", + "integrity": "sha512-23xyPcD+j+NnqOjRHgW3IU7Li912SX9wmeefcY0QxukbAxJ/vAN4rBpjSwwYZeQPAn3fxdfdNZs03fg+UM+4yQ==", + "dev": true + }, + "@cspell/dict-fullstack": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-fullstack/-/dict-fullstack-3.1.5.tgz", + "integrity": "sha512-6ppvo1dkXUZ3fbYn/wwzERxCa76RtDDl5Afzv2lijLoijGGUw5yYdLBKJnx8PJBGNLh829X352ftE7BElG4leA==", + "dev": true + }, + "@cspell/dict-gaming-terms": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-gaming-terms/-/dict-gaming-terms-1.0.5.tgz", + "integrity": "sha512-C3riccZDD3d9caJQQs1+MPfrUrQ+0KHdlj9iUR1QD92FgTOF6UxoBpvHUUZ9YSezslcmpFQK4xQQ5FUGS7uWfw==", + "dev": true + }, + "@cspell/dict-git": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-git/-/dict-git-3.0.0.tgz", + "integrity": "sha512-simGS/lIiXbEaqJu9E2VPoYW1OTC2xrwPPXNXFMa2uo/50av56qOuaxDrZ5eH1LidFXwoc8HROCHYeKoNrDLSw==", + "dev": true + }, + "@cspell/dict-golang": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-golang/-/dict-golang-6.0.5.tgz", + "integrity": "sha512-w4mEqGz4/wV+BBljLxduFNkMrd3rstBNDXmoX5kD4UTzIb4Sy0QybWCtg2iVT+R0KWiRRA56QKOvBsgXiddksA==", + "dev": true + }, + "@cspell/dict-haskell": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-haskell/-/dict-haskell-4.0.1.tgz", + "integrity": "sha512-uRrl65mGrOmwT7NxspB4xKXFUenNC7IikmpRZW8Uzqbqcu7ZRCUfstuVH7T1rmjRgRkjcIjE4PC11luDou4wEQ==", + "dev": true + }, + "@cspell/dict-html": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-html/-/dict-html-4.0.5.tgz", + "integrity": "sha512-p0brEnRybzSSWi8sGbuVEf7jSTDmXPx7XhQUb5bgG6b54uj+Z0Qf0V2n8b/LWwIPJNd1GygaO9l8k3HTCy1h4w==", + "dev": true + }, + "@cspell/dict-html-symbol-entities": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-html-symbol-entities/-/dict-html-symbol-entities-4.0.0.tgz", + "integrity": "sha512-HGRu+48ErJjoweR5IbcixxETRewrBb0uxQBd6xFGcxbEYCX8CnQFTAmKI5xNaIt2PKaZiJH3ijodGSqbKdsxhw==", + "dev": true + }, + "@cspell/dict-java": { + "version": "5.0.6", + "resolved": "https://registry.npmjs.org/@cspell/dict-java/-/dict-java-5.0.6.tgz", + "integrity": "sha512-kdE4AHHHrixyZ5p6zyms1SLoYpaJarPxrz8Tveo6gddszBVVwIUZ+JkQE1bWNLK740GWzIXdkznpUfw1hP9nXw==", + "dev": true + }, + "@cspell/dict-k8s": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-k8s/-/dict-k8s-1.0.2.tgz", + "integrity": "sha512-tLT7gZpNPnGa+IIFvK9SP1LrSpPpJ94a/DulzAPOb1Q2UBFwdpFd82UWhio0RNShduvKG/WiMZf/wGl98pn+VQ==", + "dev": true + }, + "@cspell/dict-latex": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-latex/-/dict-latex-4.0.0.tgz", + "integrity": "sha512-LPY4y6D5oI7D3d+5JMJHK/wxYTQa2lJMSNxps2JtuF8hbAnBQb3igoWEjEbIbRRH1XBM0X8dQqemnjQNCiAtxQ==", + "dev": true + }, + "@cspell/dict-lorem-ipsum": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-lorem-ipsum/-/dict-lorem-ipsum-4.0.0.tgz", + "integrity": "sha512-1l3yjfNvMzZPibW8A7mQU4kTozwVZVw0AvFEdy+NcqtbxH+TvbSkNMqROOFWrkD2PjnKG0+Ea0tHI2Pi6Gchnw==", + "dev": true + }, + "@cspell/dict-lua": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-lua/-/dict-lua-4.0.3.tgz", + "integrity": "sha512-lDHKjsrrbqPaea13+G9s0rtXjMO06gPXPYRjRYawbNmo4E/e3XFfVzeci3OQDQNDmf2cPOwt9Ef5lu2lDmwfJg==", + "dev": true + }, + "@cspell/dict-makefile": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-makefile/-/dict-makefile-1.0.0.tgz", + "integrity": "sha512-3W9tHPcSbJa6s0bcqWo6VisEDTSN5zOtDbnPabF7rbyjRpNo0uHXHRJQF8gAbFzoTzBBhgkTmrfSiuyQm7vBUQ==", + "dev": true + }, + "@cspell/dict-node": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-node/-/dict-node-4.0.3.tgz", + "integrity": "sha512-sFlUNI5kOogy49KtPg8SMQYirDGIAoKBO3+cDLIwD4MLdsWy1q0upc7pzGht3mrjuyMiPRUV14Bb0rkVLrxOhg==", + "dev": true + }, + "@cspell/dict-npm": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/@cspell/dict-npm/-/dict-npm-5.0.15.tgz", + "integrity": "sha512-sX0X5YWNW54F4baW7b5JJB6705OCBIZtUqjOghlJNORS5No7QY1IX1zc5FxNNu4gsaCZITAmfMi4ityXEsEThA==", + "dev": true + }, + "@cspell/dict-php": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-php/-/dict-php-4.0.5.tgz", + "integrity": "sha512-9r8ao7Z/mH9Z8pSB7yLtyvcCJWw+/MnQpj7xGVYzIV7V2ZWDRjXZAMgteHMJ37m8oYz64q5d4tiipD300QSetQ==", + "dev": true + }, + "@cspell/dict-powershell": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-powershell/-/dict-powershell-5.0.3.tgz", + "integrity": "sha512-lEdzrcyau6mgzu1ie98GjOEegwVHvoaWtzQnm1ie4DyZgMr+N6D0Iyj1lzvtmt0snvsDFa5F2bsYzf3IMKcpcA==", + "dev": true + }, + "@cspell/dict-public-licenses": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@cspell/dict-public-licenses/-/dict-public-licenses-2.0.5.tgz", + "integrity": "sha512-91HK4dSRri/HqzAypHgduRMarJAleOX5NugoI8SjDLPzWYkwZ1ftuCXSk+fy8DLc3wK7iOaFcZAvbjmnLhVs4A==", + "dev": true + }, + "@cspell/dict-python": { + "version": "4.1.11", + "resolved": "https://registry.npmjs.org/@cspell/dict-python/-/dict-python-4.1.11.tgz", + "integrity": "sha512-XG+v3PumfzUW38huSbfT15Vqt3ihNb462ulfXifpQllPok5OWynhszCLCRQjQReV+dgz784ST4ggRxW452/kVg==", + "dev": true, + "requires": { + "@cspell/dict-data-science": "^1.0.11" + } + }, + "@cspell/dict-r": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-r/-/dict-r-2.0.1.tgz", + "integrity": "sha512-KCmKaeYMLm2Ip79mlYPc8p+B2uzwBp4KMkzeLd5E6jUlCL93Y5Nvq68wV5fRLDRTf7N1LvofkVFWfDcednFOgA==", + "dev": true + }, + "@cspell/dict-ruby": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-ruby/-/dict-ruby-5.0.2.tgz", + "integrity": "sha512-cIh8KTjpldzFzKGgrqUX4bFyav5lC52hXDKo4LbRuMVncs3zg4hcSf4HtURY+f2AfEZzN6ZKzXafQpThq3dl2g==", + "dev": true + }, + "@cspell/dict-rust": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-rust/-/dict-rust-4.0.2.tgz", + "integrity": "sha512-RhziKDrklzOntxAbY3AvNR58wnFGIo3YS8+dNeLY36GFuWOvXDHFStYw5Pod4f/VXbO/+1tXtywCC4zWfB2p1w==", + "dev": true + }, + "@cspell/dict-scala": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-scala/-/dict-scala-5.0.0.tgz", + "integrity": "sha512-ph0twaRoV+ylui022clEO1dZ35QbeEQaKTaV2sPOsdwIokABPIiK09oWwGK9qg7jRGQwVaRPEq0Vp+IG1GpqSQ==", + "dev": true + }, + "@cspell/dict-software-terms": { + "version": "3.3.17", + "resolved": "https://registry.npmjs.org/@cspell/dict-software-terms/-/dict-software-terms-3.3.17.tgz", + "integrity": "sha512-IspxnhSbriGNME+jE/vveC0lK/0K/a0JSLa6ANvE+W1SuBwYPJqAChWjTgvWWYWC1ZEmnXdwfaNzB6fJNkc85w==", + "dev": true + }, + "@cspell/dict-sql": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@cspell/dict-sql/-/dict-sql-2.1.3.tgz", + "integrity": "sha512-SEyTNKJrjqD6PAzZ9WpdSu6P7wgdNtGV2RV8Kpuw1x6bV+YsSptuClYG+JSdRExBTE6LwIe1bTklejUp3ZP8TQ==", + "dev": true + }, + "@cspell/dict-svelte": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-svelte/-/dict-svelte-1.0.2.tgz", + "integrity": "sha512-rPJmnn/GsDs0btNvrRBciOhngKV98yZ9SHmg8qI6HLS8hZKvcXc0LMsf9LLuMK1TmS2+WQFAan6qeqg6bBxL2Q==", + "dev": true + }, + "@cspell/dict-swift": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@cspell/dict-swift/-/dict-swift-2.0.1.tgz", + "integrity": "sha512-gxrCMUOndOk7xZFmXNtkCEeroZRnS2VbeaIPiymGRHj5H+qfTAzAKxtv7jJbVA3YYvEzWcVE2oKDP4wcbhIERw==", + "dev": true + }, + "@cspell/dict-typescript": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@cspell/dict-typescript/-/dict-typescript-3.1.2.tgz", + "integrity": "sha512-lcNOYWjLUvDZdLa0UMNd/LwfVdxhE9rKA+agZBGjL3lTA3uNvH7IUqSJM/IXhJoBpLLMVEOk8v1N9xi+vDuCdA==", + "dev": true + }, + "@cspell/dict-vue": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@cspell/dict-vue/-/dict-vue-3.0.0.tgz", + "integrity": "sha512-niiEMPWPV9IeRBRzZ0TBZmNnkK3olkOPYxC1Ny2AX4TGlYRajcW0WUtoSHmvvjZNfWLSg2L6ruiBeuPSbjnG6A==", + "dev": true + }, + "@cspell/dynamic-import": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@cspell/dynamic-import/-/dynamic-import-8.3.2.tgz", + "integrity": "sha512-4t0xM5luA3yQhar2xWvYK4wQSDB2r0u8XkpzzJqd57MnJXd7uIAxI0awGUrDXukadRaCo0tDIlMUBemH48SNVg==", + "dev": true, + "requires": { + "import-meta-resolve": "^4.0.0" + } + }, + "@cspell/strong-weak-map": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/@cspell/strong-weak-map/-/strong-weak-map-8.3.2.tgz", + "integrity": "sha512-Mte/2000ap278kRYOUhiGWI7MNr1+A7WSWJmlcdP4CAH5SO20sZI3/cyZLjJJEyapdhK5vaP1L5J9sUcVDHd3A==", + "dev": true + }, + "@discoveryjs/json-ext": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", + "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", + "dev": true + }, + "@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^3.3.0" + } + }, + "@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true + }, + "@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + } + } + }, + "@eslint/js": { + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", + "dev": true + }, + "@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "dev": true, + "requires": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + } + }, + "@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true + }, + "@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "dev": true + }, + "@hutson/parse-repository-url": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz", + "integrity": "sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==", + "dev": true + }, + "@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "requires": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "requires": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "requires": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + } + } + } + }, + "@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + } + } + }, + "@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true + }, + "@jest/console": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/console/-/console-27.5.1.tgz", + "integrity": "sha512-kZ/tNpS3NXn0mlXXXPNuDZnb4c0oZ20r4K5eemM2k30ZC3G0T02nXUvyhf5YdbXWHPEJLc9qGLxEZ216MdL+Zg==", + "dev": true, + "requires": { + "@jest/types": "^27.5.1", + "@types/node": "*", + "chalk": "^4.0.0", + "jest-message-util": "^27.5.1", + "jest-util": "^27.5.1", + "slash": "^3.0.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } + } + }, + "@jest/core": { + "version": "27.5.1", + "resolved": "https://registry.npmjs.org/@jest/core/-/core-27.5.1.tgz", + "integrity": "sha512-AK6/UTrvQD0Cd24NSqmIA6rKsu0tKIxfiCducZvqxYdmMisOYAsdItspT+fQDQYARPf8XgjAFZi0ogW2agH5nQ==", + "dev": true, + "requires": { + "@jest/console": "^27.5.1", + "@jest/reporters": "^27.5.1", + "@jest/test-result": "^27.5.1", + "@jest/transform": "^27.5.1", + "@jest/types": "^27.5.1", + "@types/node": "*", + "ansi-escapes": "^4.2.1", + "chalk": "^4.0.0", + "emittery": "^0.8.1", + "exit": "^0.1.2", + "graceful-fs": "^4.2.9", + "jest-changed-files": "^27.5.1", + "jest-config": "^27.5.1", + "jest-haste-map": "^27.5.1", + "jest-message-util": "^27.5.1", + "jest-regex-util": "^27.5.1", + "jest-resolve": "^27.5.1", + "jest-resolve-dependencies": "^27.5.1", + "jest-runner": "^27.5.1", + "jest-runtime": "^27.5.1", + "jest-snapshot": "^27.5.1", + "jest-util": "^27.5.1", + "jest-validate": "^27.5.1", + "jest-watcher": "^27.5.1", + "micromatch": "^4.0.4", + "rimraf": "^3.0.0", + "slash": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", "dev": true, "requires": { @@ -845,6 +1685,39 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, + "@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true + }, "@sinonjs/commons": { "version": "1.8.6", "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.6.tgz", @@ -1028,6 +1901,12 @@ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, "@webassemblyjs/ast": { "version": "1.11.6", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.6.tgz", @@ -1284,7 +2163,6 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dev": true, - "optional": true, "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -1341,8 +2219,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true, - "optional": true + "dev": true }, "array-buffer-byte-length": { "version": "1.0.1", @@ -1360,18 +2237,11 @@ "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==", "dev": true }, - "array-includes": { - "version": "3.1.7", - "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", - "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==", - "dev": true, - "requires": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "get-intrinsic": "^1.2.1", - "is-string": "^1.0.7" - } + "array-timsort": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/array-timsort/-/array-timsort-1.0.3.tgz", + "integrity": "sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==", + "dev": true }, "arraybuffer.prototype.slice": { "version": "1.0.3", @@ -1413,77 +2283,12 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, - "at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true - }, "available-typed-arrays": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.6.tgz", "integrity": "sha512-j1QzY8iPNPG4o4xmO3ptzpRxTciqD3MgEHtifP/YnJpIo58Xu+ne4BejlbkuaLfXn/nz6HFiw29bLpj2PNMdGg==", "dev": true }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha512-XqYMR2dfdGMW+hd0IUZ2PwK+fGeFkOxZJ0wY+JaQAHzt1Zx8LcvpiZD2NiGkEG8qx0CfkAOr5xt76d1e8vG90g==", - "dev": true, - "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha512-RjTcuD4xjtthQkaWH7dFlH85L+QaVtSoOyGdZ3g6HFhS9dFNDfLyqgm2NFe2X6cQpeFmt0452FJjFG5UameExg==", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - } - } - }, "babel-jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-27.5.1.tgz", @@ -1582,29 +2387,12 @@ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, "big.js": { "version": "5.2.2", "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", "dev": true }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, "boolbase": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", @@ -1656,16 +2444,6 @@ "node-int64": "^0.4.0" } }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, "buffer-equal": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", @@ -1677,12 +2455,6 @@ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==" }, - "cachedir": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", - "integrity": "sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw==", - "dev": true - }, "call-bind": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz", @@ -1694,23 +2466,6 @@ "set-function-length": "^1.1.1" } }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha512-UJiE1otjXPF5/x+T3zTnSFiTOEmJoGTD9HmBoxnCUwho61a2eSNn/VwtwuIBDAo2SEOv1AJ7ARI5gCmohFLu/g==", - "dev": true, - "requires": { - "callsites": "^0.2.0" - }, - "dependencies": { - "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha512-Zv4Dns9IbXXmPkgRRUjAaJQgfN4xX5p6+RQFhWUqscdvvK2xK/ZL8b3IXIJsj+4sD+f24NwnWy2BY8AJ82JB0A==", - "dev": true - } - } - }, "callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -1809,6 +2564,23 @@ } } }, + "chalk-template": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/chalk-template/-/chalk-template-1.1.0.tgz", + "integrity": "sha512-T2VJbcDuZQ0Tb2EWwSotMPJjgpy1/tGee1BTpUNsGZ/qgNjV2t7Mvu+d4600U564nbLesN1x2dPL+xii174Ekg==", + "dev": true, + "requires": { + "chalk": "^5.2.0" + }, + "dependencies": { + "chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true + } + } + }, "char-regex": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", @@ -1824,12 +2596,6 @@ "is-regex": "^1.0.3" } }, - "chardet": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", - "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", - "dev": true - }, "chrome-trace-event": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", @@ -1842,12 +2608,6 @@ "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", "dev": true }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", - "dev": true - }, "cjs-module-lexer": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", @@ -1862,26 +2622,79 @@ "source-map": "~0.6.0" } }, - "cli-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", - "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "clear-module": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/clear-module/-/clear-module-4.1.2.tgz", + "integrity": "sha512-LWAxzHqdHsAZlPlEyJ2Poz6AIs384mPeqLVCru2p0BrP9G/kVGuhNyZYClLO6cXlnuJjzC8xtsJIuMjKqLXoAw==", "dev": true, "requires": { - "restore-cursor": "^3.1.0" + "parent-module": "^2.0.0", + "resolve-from": "^5.0.0" + }, + "dependencies": { + "parent-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-2.0.0.tgz", + "integrity": "sha512-uo0Z9JJeWzv8BG+tRcapBKNJ0dro9cLyczGzulS6EfeyAdeC9sbojtW6XwvYxJkEne9En+J2XEl4zyglVeIwFg==", + "dev": true, + "requires": { + "callsites": "^3.1.0" + } + } } }, - "cli-spinners": { - "version": "2.9.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", - "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", - "dev": true + "cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "dev": true, + "requires": { + "restore-cursor": "^4.0.0" + } }, - "cli-width": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", - "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", - "dev": true + "cli-truncate": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-4.0.0.tgz", + "integrity": "sha512-nPdaFdQ0h/GEigbPClz11D0v/ZJEwxmeVZGeMo3Z5StPtUTkA9o1lD6QwoirYiSDzbcwn2XcjwmCp68W1IS4TA==", + "dev": true, + "requires": { + "slice-ansi": "^5.0.0", + "string-width": "^7.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", + "dev": true, + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } }, "cliui": { "version": "7.0.4", @@ -1894,12 +2707,6 @@ "wrap-ansi": "^7.0.0" } }, - "clone": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.4.tgz", - "integrity": "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==", - "dev": true - }, "clone-deep": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", @@ -1958,43 +2765,17 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-8.3.0.tgz", "integrity": "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww==" }, - "commitizen": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/commitizen/-/commitizen-4.3.0.tgz", - "integrity": "sha512-H0iNtClNEhT0fotHvGV3E9tDejDeS04sN1veIebsKYGMuGscFaswRoYJKmT3eW85eIJAs0F28bG2+a/9wCOfPw==", - "dev": true, - "requires": { - "cachedir": "2.3.0", - "cz-conventional-changelog": "3.3.0", - "dedent": "0.7.0", - "detect-indent": "6.1.0", - "find-node-modules": "^2.1.2", - "find-root": "1.1.0", - "fs-extra": "9.1.0", - "glob": "7.2.3", - "inquirer": "8.2.5", - "is-utf8": "^0.2.1", - "lodash": "4.17.21", - "minimist": "1.2.7", - "strip-bom": "4.0.0", - "strip-json-comments": "3.1.1" - }, - "dependencies": { - "cz-conventional-changelog": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/cz-conventional-changelog/-/cz-conventional-changelog-3.3.0.tgz", - "integrity": "sha512-U466fIzU5U22eES5lTNiNbZ+d8dfcHcssH4o7QsdWaCcRs/feIPCxKYSWkYBNs5mny7MvEfwpTLWjvbm94hecw==", - "dev": true, - "requires": { - "@commitlint/load": ">6.1.1", - "chalk": "^2.4.1", - "commitizen": "^4.0.3", - "conventional-commit-types": "^3.0.0", - "lodash.map": "^4.5.1", - "longest": "^2.0.1", - "word-wrap": "^1.0.3" - } - } + "comment-json": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/comment-json/-/comment-json-4.2.3.tgz", + "integrity": "sha512-SsxdiOf064DWoZLH799Ata6u7iV658A11PlWtZATDlXPpKGJnbJZ5Z24ybixAi+LUUqJ/GKowAejtC5GFUG7Tw==", + "dev": true, + "requires": { + "array-timsort": "^1.0.3", + "core-util-is": "^1.0.3", + "esprima": "^4.0.1", + "has-own-prop": "^2.0.0", + "repeat-string": "^1.6.1" } }, "compare-func": { @@ -2025,6 +2806,30 @@ "typedarray": "^0.0.6" } }, + "configstore": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/configstore/-/configstore-6.0.0.tgz", + "integrity": "sha512-cD31W1v3GqUlQvbBCGcXmd2Nj9SvLDOP1oQ0YFuLETufzSPaKp11rYBsSOm7rCsW3OnIRAFM3OxRhceaXNYHkA==", + "dev": true, + "requires": { + "dot-prop": "^6.0.1", + "graceful-fs": "^4.2.6", + "unique-string": "^3.0.0", + "write-file-atomic": "^3.0.3", + "xdg-basedir": "^5.0.1" + }, + "dependencies": { + "dot-prop": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-6.0.1.tgz", + "integrity": "sha512-tE7ztYzXHIeyvc7N+hR3oi7FIbf/NIjVP9hmAt3yMXzrQ072/fpjGLx2GxNxGxUl5V73MEqYzioOMoVhGMJ5cA==", + "dev": true, + "requires": { + "is-obj": "^2.0.0" + } + } + } + }, "constantinople": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/constantinople/-/constantinople-4.0.1.tgz", @@ -2035,12 +2840,6 @@ "@babel/types": "^7.6.1" } }, - "contains-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", - "integrity": "sha512-OKZnPGeMQy2RPaUIBPFFd71iNf4791H12MCRuVQDnzGRwCYNYmTDy5pdafo2SLAcEMKzTOQnLWG4QdcjeJUMEg==", - "dev": true - }, "conventional-changelog": { "version": "3.1.25", "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-3.1.25.tgz", @@ -2366,12 +3165,6 @@ } } }, - "conventional-commit-types": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/conventional-commit-types/-/conventional-commit-types-3.0.0.tgz", - "integrity": "sha512-SmmCYnOniSsAa9GqWOeLqc179lfr5TRu5b4QFDkbsrJ5TZjPJx85wtOr3zn+1dbeNiXDKGPbZ72IKbPhLXh/Lg==", - "dev": true - }, "conventional-commits-filter": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-2.0.7.tgz", @@ -2429,7 +3222,6 @@ "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", "dev": true, - "optional": true, "requires": { "import-fresh": "^3.3.0", "js-yaml": "^4.1.0", @@ -2442,11 +3234,19 @@ "resolved": "https://registry.npmjs.org/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-5.0.0.tgz", "integrity": "sha512-+8cK7jRAReYkMwMiG+bxhcNKiHJDM6bR9FD/nGBXOWdMLuYawjF5cGrtLilJ+LGd3ZjCXnJjR5DkfWPoIVlqJA==", "dev": true, - "optional": true, "requires": { "jiti": "^1.19.1" } }, + "cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2469,6 +3269,240 @@ } } }, + "crypto-random-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/crypto-random-string/-/crypto-random-string-4.0.0.tgz", + "integrity": "sha512-x8dy3RnvYdlUcPOjkEHqozhiwzKNSq7GcPuXFbnyMOCHxX8V3OgIg/pYuabl2sbUPfIJaeAQB7PMOK8DFIdoRA==", + "dev": true, + "requires": { + "type-fest": "^1.0.1" + }, + "dependencies": { + "type-fest": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-1.4.0.tgz", + "integrity": "sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==", + "dev": true + } + } + }, + "cspell": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/cspell/-/cspell-8.3.2.tgz", + "integrity": "sha512-V8Ub3RO/a5lwSsltW/ib3Z3G/sczKtSpBBN1JChzbSCfEgaY2mJY8JW0BpkSV+Ug6uJitpXNOOaxa3Xr489i7g==", + "dev": true, + "requires": { + "@cspell/cspell-json-reporter": "8.3.2", + "@cspell/cspell-pipe": "8.3.2", + "@cspell/cspell-types": "8.3.2", + "@cspell/dynamic-import": "8.3.2", + "chalk": "^5.3.0", + "chalk-template": "^1.1.0", + "commander": "^11.1.0", + "cspell-gitignore": "8.3.2", + "cspell-glob": "8.3.2", + "cspell-io": "8.3.2", + "cspell-lib": "8.3.2", + "fast-glob": "^3.3.2", + "fast-json-stable-stringify": "^2.1.0", + "file-entry-cache": "^8.0.0", + "get-stdin": "^9.0.0", + "semver": "^7.5.4", + "strip-ansi": "^7.1.0", + "vscode-uri": "^3.0.8" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true + }, + "commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "dev": true + }, + "file-entry-cache": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", + "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", + "dev": true, + "requires": { + "flat-cache": "^4.0.0" + } + }, + "flat-cache": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.0.tgz", + "integrity": "sha512-EryKbCE/wxpxKniQlyas6PY1I9vwtF3uCBweX+N8KYTCn3Y12RTGtQAJ/bd5pl7kxUAc8v/R3Ake/N17OZiFqA==", + "dev": true, + "requires": { + "flatted": "^3.2.9", + "keyv": "^4.5.4", + "rimraf": "^5.0.5" + } + }, + "glob": { + "version": "10.3.10", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", + "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", + "dev": true, + "requires": { + "foreground-child": "^3.1.0", + "jackspeak": "^2.3.5", + "minimatch": "^9.0.1", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", + "path-scurry": "^1.10.1" + } + }, + "minimatch": { + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", + "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } + }, + "rimraf": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", + "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", + "dev": true, + "requires": { + "glob": "^10.3.7" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + } + } + }, + "cspell-config-lib": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/cspell-config-lib/-/cspell-config-lib-8.3.2.tgz", + "integrity": "sha512-Wc98XhBNLwDxnxCzMtgRJALI9a69cu3C5Gf1rGjNTKSFo9JYiQmju0Ur3z25Pkx9Sa86f+2IjvNCf33rUDSoBQ==", + "dev": true, + "requires": { + "@cspell/cspell-types": "8.3.2", + "comment-json": "^4.2.3", + "yaml": "^2.3.4" + } + }, + "cspell-dictionary": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/cspell-dictionary/-/cspell-dictionary-8.3.2.tgz", + "integrity": "sha512-xyK95hO2BMPFxIo8zBwGml8035qOxSBdga1BMhwW/p2wDrQP8S4Cdm/54//tCDmKn6uRkFQvyOfWGaX2l8WMEg==", + "dev": true, + "requires": { + "@cspell/cspell-pipe": "8.3.2", + "@cspell/cspell-types": "8.3.2", + "cspell-trie-lib": "8.3.2", + "fast-equals": "^5.0.1", + "gensequence": "^6.0.0" + } + }, + "cspell-gitignore": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/cspell-gitignore/-/cspell-gitignore-8.3.2.tgz", + "integrity": "sha512-3Qc9P5BVvl/cg//s2s+zIMGKcoH5v7oOtRgwn4UQry8yiyo19h0tiTKkSR574FMhF5NtcShTnwIwPSIXVBPFHA==", + "dev": true, + "requires": { + "cspell-glob": "8.3.2", + "find-up-simple": "^1.0.0" + } + }, + "cspell-glob": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/cspell-glob/-/cspell-glob-8.3.2.tgz", + "integrity": "sha512-KtIFxE+3l5dGEofND4/CdZffXP8XN1+XGQKxJ96lIzWsc01mkotfhxTkla6mgvfH039t7BsY/SWv0460KyGslQ==", + "dev": true, + "requires": { + "micromatch": "^4.0.5" + } + }, + "cspell-grammar": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/cspell-grammar/-/cspell-grammar-8.3.2.tgz", + "integrity": "sha512-tYCkOmRzJe1a6/R+8QGSwG7TwTgznLPqsHtepKzLmnS4YX54VXjKRI9zMARxXDzUVfyCSVdW5MyiY/0WTNoy+A==", + "dev": true, + "requires": { + "@cspell/cspell-pipe": "8.3.2", + "@cspell/cspell-types": "8.3.2" + } + }, + "cspell-io": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/cspell-io/-/cspell-io-8.3.2.tgz", + "integrity": "sha512-WYpKsyBCQP0SY4gXnhW5fPuxcYchKYKG1PIXVV3ezFU4muSgW6GuLNbGuSfwv/8YNXRgFSN0e3hYH0rdBK2Aow==", + "dev": true, + "requires": { + "@cspell/cspell-service-bus": "8.3.2" + } + }, + "cspell-lib": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/cspell-lib/-/cspell-lib-8.3.2.tgz", + "integrity": "sha512-wTvdaev/TyGB/ln6CVD1QbVs2D7/+QiajQ67S7yj1suLHM6YcNQQb/5sPAM8VPtj0E7PgwgPXf3bq18OtPvnFg==", + "dev": true, + "requires": { + "@cspell/cspell-bundled-dicts": "8.3.2", + "@cspell/cspell-pipe": "8.3.2", + "@cspell/cspell-resolver": "8.3.2", + "@cspell/cspell-types": "8.3.2", + "@cspell/dynamic-import": "8.3.2", + "@cspell/strong-weak-map": "8.3.2", + "clear-module": "^4.1.2", + "comment-json": "^4.2.3", + "configstore": "^6.0.0", + "cspell-config-lib": "8.3.2", + "cspell-dictionary": "8.3.2", + "cspell-glob": "8.3.2", + "cspell-grammar": "8.3.2", + "cspell-io": "8.3.2", + "cspell-trie-lib": "8.3.2", + "fast-equals": "^5.0.1", + "gensequence": "^6.0.0", + "import-fresh": "^3.3.0", + "resolve-from": "^5.0.0", + "vscode-languageserver-textdocument": "^1.0.11", + "vscode-uri": "^3.0.8" + } + }, + "cspell-trie-lib": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/cspell-trie-lib/-/cspell-trie-lib-8.3.2.tgz", + "integrity": "sha512-8qh2FqzkLMwzlTlvO/5Z+89fhi30rrfekocpight/BmqKbE2XFJQD7wS2ml24e7q/rdHJLXVpJbY/V5mByucCA==", + "dev": true, + "requires": { + "@cspell/cspell-pipe": "8.3.2", + "@cspell/cspell-types": "8.3.2", + "gensequence": "^6.0.0" + } + }, "css-loader": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-5.0.1.tgz", @@ -2594,12 +3628,6 @@ "ms": "2.1.2" } }, - "debug-log": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/debug-log/-/debug-log-1.0.1.tgz", - "integrity": "sha512-gV/pe1YIaKNgLYnd1g9VNW80tcb7oV5qvNUxG7NM8rbDpnl6RGunzlAtlGSb0wEs3nesu2vHNiX9TSsZ+Y+RjA==", - "dev": true - }, "decamelize": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", @@ -2648,15 +3676,6 @@ "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", "dev": true }, - "defaults": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.4.tgz", - "integrity": "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==", - "dev": true, - "requires": { - "clone": "^1.0.2" - } - }, "define-data-property": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz", @@ -2679,40 +3698,12 @@ "object-keys": "^1.1.1" } }, - "deglob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/deglob/-/deglob-3.1.0.tgz", - "integrity": "sha512-al10l5QAYaM/PeuXkAr1Y9AQz0LCtWsnJG23pIgh44hDxHFOj36l6qvhfjnIWBYwZOqM1fXUFV9tkjL7JPdGvw==", - "dev": true, - "requires": { - "find-root": "^1.0.0", - "glob": "^7.0.5", - "ignore": "^5.0.0", - "pkg-config": "^1.1.0", - "run-parallel": "^1.1.2", - "uniq": "^1.0.1" - }, - "dependencies": { - "ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", - "dev": true - } - } - }, "delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", "dev": true }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", - "dev": true - }, "detect-indent": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", @@ -2742,9 +3733,9 @@ } }, "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -2878,6 +3869,12 @@ } } }, + "eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, "electron-to-chromium": { "version": "1.4.656", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.656.tgz", @@ -3048,496 +4045,164 @@ } }, "eslint": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.4.0.tgz", - "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", - "dev": true, - "requires": { - "ajv": "^6.5.0", - "babel-code-frame": "^6.26.0", - "chalk": "^2.1.0", - "cross-spawn": "^6.0.5", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^4.0.0", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^4.0.0", - "esquery": "^1.0.1", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", + "dev": true, + "requires": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", - "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", - "globals": "^11.7.0", - "ignore": "^4.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", "imurmurhash": "^0.1.4", - "inquirer": "^5.2.0", - "is-resolvable": "^1.1.0", - "js-yaml": "^3.11.0", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", "json-stable-stringify-without-jsonify": "^1.0.1", - "levn": "^0.3.0", - "lodash": "^4.17.5", - "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", - "natural-compare": "^1.4.0", - "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", - "progress": "^2.0.0", - "regexpp": "^2.0.0", - "require-uncached": "^1.0.3", - "semver": "^5.5.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^4.0.3", - "text-table": "^0.2.0" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-escapes": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", - "integrity": "sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha512-j/Toj7f1z98Hh2cYo2BVr85EpIRWqUi7rtRSGxh/cqUjqrnJe9l9UE7IUGd2vQ2p+kSHLkSzObQPZPLUC6TQwg==", - "dev": true - }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha512-8lgKz8LmCRYZZQDpRyT2m5rKJ08TnU4tR9FFFW2rxpxR1FzWi4PQ/NfyODchAatHaUgnSPVcx/R5w6NuTBzFiw==", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.1.tgz", - "integrity": "sha512-GRMWDxpOB6Dgk2E5Uo+3eEBvtOOlimMmpbFiKuLFnQzYDavtLFY3K5ona41jgN/WdRZtG7utuVSVTL4HbZHGkw==", - "dev": true - }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", - "dev": true, - "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", - "tmp": "^0.0.33" - } - }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, - "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^2.1.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^5.5.2", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - } - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - } - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "mimic-fn": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.2.0.tgz", - "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", - "dev": true - }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha512-r65nCZhrbXXb6dXOACihYApHw2Q6pV0M3V0PSxd74N0+D8nzAdEAITq2oAjA1jVnKI+tGvEBUpqiMh0+rW6zDQ==", - "dev": true - }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha512-oyyPpiMaKARvvcgip+JV+7zci5L8D1W9RZIz2l1o08AM3pfspitVWnPt3mzHcBPp12oYMTy0pqrFs/C+m3EwsQ==", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, - "path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", - "dev": true - }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha512-6IzJLuGi4+R14vwagDHX+JrXmPVtPpn4mffDJ1UdR7/Edm87fl6yi8mMBIVvFtJaNTUvjughmW4hwLhRG7gC1Q==", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, - "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "dependencies": { + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { - "symbol-observable": "1.0.1" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, "requires": { - "shebang-regex": "^1.0.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" } }, - "shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" } }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", + "globals": { + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "type-fest": "^0.20.2" } }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true - } - } - }, - "eslint-config-semistandard": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-semistandard/-/eslint-config-semistandard-13.0.0.tgz", - "integrity": "sha512-ZuImKnf/9LeZjr6dtRJ0zEdQbjBwXu0PJR3wXJXoQeMooICMrYPyD70O1tIA9Ng+wutgLjB7UXvZOKYPvzHg+w==", - "dev": true - }, - "eslint-config-standard": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", - "integrity": "sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==", - "dev": true - }, - "eslint-config-standard-jsx": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-6.0.2.tgz", - "integrity": "sha512-D+YWAoXw+2GIdbMBRAzWwr1ZtvnSf4n4yL0gKGg7ShUOGXkSOLerI17K4F6LdQMJPNMoWYqepzQD/fKY+tXNSg==", - "dev": true - }, - "eslint-import-resolver-node": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", - "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", - "dev": true, - "requires": { - "debug": "^3.2.7", - "is-core-module": "^2.13.0", - "resolve": "^1.22.4" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } - } - }, - "eslint-module-utils": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz", - "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==", - "dev": true, - "requires": { - "debug": "^3.2.7" - }, - "dependencies": { - "debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "requires": { - "ms": "^2.1.1" + "p-locate": "^5.0.0" } - } - } - }, - "eslint-plugin-es": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.1.tgz", - "integrity": "sha512-5fa/gR2yR3NxQf+UXkeLeP8FBBl6tSgdrAz1+cF84v1FMM4twGwQoqTnn+QxFLcPOrF4pdKEJKDB/q9GoyJrCA==", - "dev": true, - "requires": { - "eslint-utils": "^1.4.2", - "regexpp": "^2.0.1" - } - }, - "eslint-plugin-import": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", - "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", - "dev": true, - "requires": { - "contains-path": "^0.1.0", - "debug": "^2.6.8", - "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.1", - "eslint-module-utils": "^2.2.0", - "has": "^1.0.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.3", - "read-pkg-up": "^2.0.0", - "resolve": "^1.6.0" - }, - "dependencies": { - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, "requires": { - "ms": "2.0.0" + "yocto-queue": "^0.1.0" } }, - "doctrine": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", - "integrity": "sha512-lsGyRuYr4/PIB0txi+Fy2xOMI2dGaTguCaotzFGkVZuKR5usKfcRWIFKNM3QNrU7hh/+w2bwTW+ZeXPK5l8uVg==", + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "requires": { - "esutils": "^2.0.2", - "isarray": "^1.0.0" + "p-limit": "^3.0.2" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - } - } - }, - "eslint-plugin-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", - "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", - "dev": true, - "requires": { - "eslint-plugin-es": "^1.3.1", - "eslint-utils": "^1.3.1", - "ignore": "^4.0.2", - "minimatch": "^3.0.4", - "resolve": "^1.8.1", - "semver": "^5.5.0" - }, - "dependencies": { - "semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", "dev": true } } }, - "eslint-plugin-promise": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz", - "integrity": "sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg==", - "dev": true - }, - "eslint-plugin-react": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz", - "integrity": "sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==", - "dev": true, - "requires": { - "array-includes": "^3.0.3", - "doctrine": "^2.1.0", - "has": "^1.0.3", - "jsx-ast-utils": "^2.0.1", - "prop-types": "^15.6.2" - } - }, - "eslint-plugin-standard": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.2.tgz", - "integrity": "sha512-nKptN8l7jksXkwFk++PhJB3cCDTcXOEyhISIN86Ue2feJ1LFyY3PrY3/xT2keXlJSY5bpmbiTG0f885/YKAvTA==", - "dev": true - }, "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", - "dev": true, - "requires": { - "esrecurse": "^4.1.0", - "estraverse": "^4.1.1" - }, - "dependencies": { - "estraverse": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", - "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", - "dev": true - } - } - }, - "eslint-utils": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", - "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dev": true, "requires": { - "eslint-visitor-keys": "^1.1.0" + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" } }, "eslint-visitor-keys": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", - "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true }, "espree": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", - "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", "dev": true, "requires": { - "acorn": "^6.0.2", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" - }, - "dependencies": { - "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==", - "dev": true - } + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" } }, "esprima": { @@ -3576,6 +4241,12 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, + "eventemitter3": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-5.0.1.tgz", + "integrity": "sha512-GWkBvjiSZK87ELrYOSESUYeVIc9mvLLf/nXalMOS5dYrgZq9o5OVkbZAVM06CVxYsCwH9BDZFPlQTlPA1j4ahA==", + "dev": true + }, "events": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", @@ -3605,15 +4276,6 @@ "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", "dev": true }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, "expect": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/expect/-/expect-27.5.1.tgz", @@ -3626,23 +4288,42 @@ "jest-message-util": "^27.5.1" } }, - "external-editor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", - "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", - "dev": true, - "requires": { - "chardet": "^0.7.0", - "iconv-lite": "^0.4.24", - "tmp": "^0.0.33" - } - }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true }, + "fast-equals": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/fast-equals/-/fast-equals-5.0.1.tgz", + "integrity": "sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==", + "dev": true + }, + "fast-glob": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "dependencies": { + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + } + } + }, "fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -3661,6 +4342,15 @@ "integrity": "sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==", "dev": true }, + "fastq": { + "version": "1.17.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz", + "integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, "fb-watchman": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.2.tgz", @@ -3680,13 +4370,12 @@ } }, "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha512-uXP/zGzxxFvFfcZGgBIwotm+Tdc55ddPAzF7iHshP4YGaXMww7rSF9peD9D1sui5ebONg5UobsZv+FfgEpGv/w==", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "^3.0.4" } }, "fill-range": { @@ -3698,22 +4387,6 @@ "to-regex-range": "^5.0.1" } }, - "find-node-modules": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/find-node-modules/-/find-node-modules-2.1.3.tgz", - "integrity": "sha512-UC2I2+nx1ZuOBclWVNdcnbDR5dlrOdVb7xNjmT/lHE+LsgztWks3dG7boJ37yTS/venXw84B/mAW9uHVoC5QRg==", - "dev": true, - "requires": { - "findup-sync": "^4.0.0", - "merge": "^2.1.1" - } - }, - "find-root": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", - "integrity": "sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==", - "dev": true - }, "find-up": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", @@ -3724,17 +4397,11 @@ "path-exists": "^4.0.0" } }, - "findup-sync": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", - "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^4.0.2", - "resolve-dir": "^1.0.1" - } + "find-up-simple": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/find-up-simple/-/find-up-simple-1.0.0.tgz", + "integrity": "sha512-q7Us7kcjj2VMePAa02hDAF6d+MzsdsAWEwYyOpwUtlerRBkOEPBCRZrAV4XfcSN8fHAgaD0hP7miwoay6DCprw==", + "dev": true }, "flat": { "version": "5.0.2", @@ -3743,17 +4410,33 @@ "dev": true }, "flat-cache": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", - "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "requires": { - "circular-json": "^0.3.1", - "graceful-fs": "^4.1.2", - "rimraf": "~2.6.2", - "write": "^0.2.1" + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, + "flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true + }, "for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -3763,6 +4446,24 @@ "is-callable": "^1.1.3" } }, + "foreground-child": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", + "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "dependencies": { + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + } + } + }, "form-data": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.1.tgz", @@ -3774,18 +4475,6 @@ "mime-types": "^2.1.12" } }, - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -3817,18 +4506,18 @@ "functions-have-names": "^1.2.3" } }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g==", - "dev": true - }, "functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true }, + "gensequence": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gensequence/-/gensequence-6.0.0.tgz", + "integrity": "sha512-8WwuywE9pokJRAcg2QFR/plk3cVPebSUqRPzpGQh3WQ0wIiHAw+HyOQj5IuHyUTQBHpBKFoB2JUMu9zT3vJ16Q==", + "dev": true + }, "gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -3841,6 +4530,12 @@ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, + "get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true + }, "get-intrinsic": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.3.tgz", @@ -3924,9 +4619,9 @@ } }, "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-9.0.0.tgz", + "integrity": "sha512-dVKBjfWisLAicarI2Sf+JuBE/DghV4UzNAVe9yhEJuzeREd3JhOTE9cUaJTeSa77fsbQUK3pcOpJfM59+VKZaA==", "dev": true }, "get-stream": { @@ -4009,46 +4704,47 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "requires": { + "is-glob": "^4.0.3" + } + }, "glob-to-regexp": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "dev": true }, + "global-directory": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/global-directory/-/global-directory-4.0.1.tgz", + "integrity": "sha512-wHTUcDUoZ1H5/0iVqEudYW4/kAlN5cZ3j/bXn0Dpbizl9iaUVeWSHqiOjsgk6OW2bkLclbBjzewBz6weQ1zA2Q==", + "dev": true, + "requires": { + "ini": "4.1.1" + }, + "dependencies": { + "ini": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.1.tgz", + "integrity": "sha512-QQnnxNyfvmHFIsj7gkPcYymR8Jdw/o7mp5ZFihxn6h8Ci6fh3Dx4E1gPjpQEpIuPo9XVNY/ZUwh4BPMjGyL01g==", + "dev": true + } + } + }, "global-dirs": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", "integrity": "sha512-NknMLn7F2J7aflwFOlGdNIuCDpN3VGoSoB+aap3KABFWbHVn1TCgFC+np23J8W2BiZbjfEw3BFBycSMv1AFblg==", "dev": true, - "optional": true, "requires": { "ini": "^1.3.4" } }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - } - }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -4079,6 +4775,12 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, + "graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, "handlebars": { "version": "4.7.8", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", @@ -4098,29 +4800,6 @@ "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", "dev": true }, - "has": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", - "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", - "dev": true - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - } - } - }, "has-bigints": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz", @@ -4133,6 +4812,12 @@ "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true }, + "has-own-prop": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/has-own-prop/-/has-own-prop-2.0.0.tgz", + "integrity": "sha512-Pq0h+hvsVm6dDEa8x82GnLSYHOzNDt7f0ddFa3FqcQlgzEiptPqL+XrOJNavjOzSYiYWIrgeVYYgGlLmnxwilQ==", + "dev": true + }, "has-property-descriptors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz", @@ -4177,15 +4862,6 @@ "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==" }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, "hosted-git-info": { "version": "2.8.9", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", @@ -4320,6 +4996,12 @@ "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", "dev": true }, + "husky": { + "version": "9.0.10", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.0.10.tgz", + "integrity": "sha512-TQGNknoiy6bURzIO77pPRu+XHi6zI7T93rX+QnJsoYFf3xdjKOur+IlfqzJGMHIK/wXrLg+GsvMs8Op7vI2jVA==", + "dev": true + }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", @@ -4335,16 +5017,10 @@ "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", "dev": true }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, "ignore": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", - "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", + "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", "dev": true }, "import-fresh": { @@ -4352,7 +5028,6 @@ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, - "optional": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -4362,8 +5037,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true, - "optional": true + "dev": true } } }, @@ -4377,6 +5051,12 @@ "resolve-cwd": "^3.0.0" } }, + "import-meta-resolve": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-4.0.0.tgz", + "integrity": "sha512-okYUR7ZQPH+efeuMJGlq4f8ubUgO50kByRPyt/Cy1Io4PSRsPjxME+YlVaCOx+NIToW7hCsZNFJyTPFFKepRSA==", + "dev": true + }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -4411,41 +5091,6 @@ "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", "dev": true }, - "inquirer": { - "version": "8.2.5", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-8.2.5.tgz", - "integrity": "sha512-QAgPDQMEgrDssk1XiwwHoOGYF9BAbUcc1+j+FhEvaOt8/cKRqyLn0U5qA6F74fGhTMGxf92pOvPBeh29jQJDTQ==", - "dev": true, - "requires": { - "ansi-escapes": "^4.2.1", - "chalk": "^4.1.1", - "cli-cursor": "^3.1.0", - "cli-width": "^3.0.0", - "external-editor": "^3.0.3", - "figures": "^3.0.0", - "lodash": "^4.17.21", - "mute-stream": "0.0.8", - "ora": "^5.4.1", - "run-async": "^2.4.0", - "rxjs": "^7.5.5", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0", - "through": "^2.3.6", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - } - } - }, "internal-slot": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz", @@ -4567,12 +5212,6 @@ "is-extglob": "^2.1.1" } }, - "is-interactive": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-1.0.0.tgz", - "integrity": "sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==", - "dev": true - }, "is-negative-zero": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", @@ -4600,6 +5239,12 @@ "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", "dev": true }, + "is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true + }, "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", @@ -4637,12 +5282,6 @@ "has-tostringtag": "^1.0.0" } }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, "is-shared-array-buffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz", @@ -4700,18 +5339,6 @@ "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", "dev": true }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true - }, "is-weakref": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", @@ -4721,12 +5348,6 @@ "call-bind": "^1.0.2" } }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -4804,6 +5425,16 @@ "istanbul-lib-report": "^3.0.0" } }, + "jackspeak": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz", + "integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==", + "dev": true, + "requires": { + "@isaacs/cliui": "^8.0.2", + "@pkgjs/parseargs": "^0.11.0" + } + }, "jest": { "version": "27.5.1", "resolved": "https://registry.npmjs.org/jest/-/jest-27.5.1.tgz", @@ -5458,8 +6089,7 @@ "version": "1.21.0", "resolved": "https://registry.npmjs.org/jiti/-/jiti-1.21.0.tgz", "integrity": "sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==", - "dev": true, - "optional": true + "dev": true }, "js-stringify": { "version": "1.0.2", @@ -5478,7 +6108,6 @@ "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, - "optional": true, "requires": { "argparse": "^2.0.1" } @@ -5524,6 +6153,12 @@ "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", "dev": true }, + "json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true + }, "json-parse-better-errors": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", @@ -5540,8 +6175,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true, - "optional": true + "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -5561,16 +6195,6 @@ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } - }, "jsonparse": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", @@ -5587,14 +6211,13 @@ "promise": "^7.0.1" } }, - "jsx-ast-utils": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.4.1.tgz", - "integrity": "sha512-z1xSldJ6imESSzOjd3NNkieVJKRlKYSOtMG8SFyCj2FIrvSaSuli/WjpBkEzCBoR9bYYYFgqJw61Xhu7Lcgk+w==", + "keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "requires": { - "array-includes": "^3.1.1", - "object.assign": "^4.1.0" + "json-buffer": "3.0.1" } }, "kind-of": { @@ -5616,42 +6239,241 @@ "dev": true }, "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" } }, + "lilconfig": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-3.0.0.tgz", + "integrity": "sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==", + "dev": true + }, "lines-and-columns": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", "dev": true }, + "lint-staged": { + "version": "15.2.2", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.2.tgz", + "integrity": "sha512-TiTt93OPh1OZOsb5B7k96A/ATl2AjIZo+vnzFZ6oHK5FuTk63ByDtxGQpHm+kFETjEWqgkF95M8FRXKR/LEBcw==", + "dev": true, + "requires": { + "chalk": "5.3.0", + "commander": "11.1.0", + "debug": "4.3.4", + "execa": "8.0.1", + "lilconfig": "3.0.0", + "listr2": "8.0.1", + "micromatch": "4.0.5", + "pidtree": "0.6.0", + "string-argv": "0.3.2", + "yaml": "2.3.4" + }, + "dependencies": { + "chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true + }, + "commander": { + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.1.0.tgz", + "integrity": "sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==", + "dev": true + }, + "execa": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-8.0.1.tgz", + "integrity": "sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^8.0.1", + "human-signals": "^5.0.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^4.1.0", + "strip-final-newline": "^3.0.0" + } + }, + "get-stream": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-8.0.1.tgz", + "integrity": "sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==", + "dev": true + }, + "human-signals": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-5.0.0.tgz", + "integrity": "sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==", + "dev": true + }, + "is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true + }, + "mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true + }, + "npm-run-path": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.2.0.tgz", + "integrity": "sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==", + "dev": true, + "requires": { + "path-key": "^4.0.0" + } + }, + "onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "requires": { + "mimic-fn": "^4.0.0" + } + }, + "path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true + }, + "pidtree": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.6.0.tgz", + "integrity": "sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==", + "dev": true + }, + "signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true + }, + "strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true + } + } + }, + "listr2": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/listr2/-/listr2-8.0.1.tgz", + "integrity": "sha512-ovJXBXkKGfq+CwmKTjluEqFi3p4h8xvkxGQQAQan22YCgef4KZ1mKGjzfGh6PL6AW5Csw0QiQPNuQyH+6Xk3hA==", + "dev": true, + "requires": { + "cli-truncate": "^4.0.0", + "colorette": "^2.0.20", + "eventemitter3": "^5.0.1", + "log-update": "^6.0.0", + "rfdc": "^1.3.0", + "wrap-ansi": "^9.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "colorette": { + "version": "2.0.20", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-2.0.20.tgz", + "integrity": "sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==", + "dev": true + }, + "emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", + "dev": true, + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "requires": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + } + } + } + }, "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha512-3p6ZOGNbiX4CdvEd1VcE6yi78UrGNpjHO33noGwHCnT/o2fyllJDepsm8+mFFv/DvtwFHht5HIHSyOy5a+ChVQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", + "parse-json": "^4.0.0", + "pify": "^3.0.0", "strip-bom": "^3.0.0" }, "dependencies": { "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true + }, "strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -5691,6 +6513,18 @@ "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" }, + "lodash.camelcase": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz", + "integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==", + "dev": true + }, + "lodash.isfunction": { + "version": "3.0.9", + "resolved": "https://registry.npmjs.org/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz", + "integrity": "sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==", + "dev": true + }, "lodash.ismatch": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", @@ -5701,8 +6535,13 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", "integrity": "sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==", - "dev": true, - "optional": true + "dev": true + }, + "lodash.kebabcase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.kebabcase/-/lodash.kebabcase-4.1.1.tgz", + "integrity": "sha512-N8XRTIMMqqDgSy4VLKPnJ/+hpGZN+PHQiJnSenYqPaVV/NCqEogTnAdZLQiGKhxX+JCs8waWq2t1XHWKOmlY8g==", + "dev": true }, "lodash.map": { "version": "4.6.0", @@ -5714,60 +6553,136 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true, - "optional": true + "dev": true }, "lodash.mergewith": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz", "integrity": "sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ==", - "dev": true, - "optional": true + "dev": true + }, + "lodash.snakecase": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.snakecase/-/lodash.snakecase-4.1.1.tgz", + "integrity": "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw==", + "dev": true + }, + "lodash.startcase": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz", + "integrity": "sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==", + "dev": true }, "lodash.uniq": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/lodash.uniq/-/lodash.uniq-4.5.0.tgz", "integrity": "sha512-xfBaXQd9ryd9dlSDvnvI0lvxfLJlYAZzXomUYzLKtUeOQvOP5piqAWuGtrhWeqaXK9hhoM/iyJc5AV+XfsX3HQ==", - "dev": true, - "optional": true + "dev": true }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "lodash.upperfirst": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/lodash.upperfirst/-/lodash.upperfirst-4.3.1.tgz", + "integrity": "sha512-sReKOYJIJf74dhJONhU4e0/shzi1trVbSWDOhKYE5XV2O+H7Sb2Dihwuc7xWxVl+DgFPyTqIN3zMfT9cq5iWDg==", + "dev": true + }, + "log-update": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-update/-/log-update-6.0.0.tgz", + "integrity": "sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==", "dev": true, "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" + "ansi-escapes": "^6.2.0", + "cli-cursor": "^4.0.0", + "slice-ansi": "^7.0.0", + "strip-ansi": "^7.1.0", + "wrap-ansi": "^9.0.0" }, "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "ansi-escapes": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-6.2.0.tgz", + "integrity": "sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==", + "dev": true, + "requires": { + "type-fest": "^3.0.0" + } + }, + "ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true + }, + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, + "emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-5.0.0.tgz", + "integrity": "sha512-OVa3u9kkBbw7b8Xw5F9P+D/T9X+Z4+JruYVNapTjPYZYUznQ5YfWeFkOj606XYYW8yugTfC8Pj0hYqvi4ryAhA==", + "dev": true, + "requires": { + "get-east-asian-width": "^1.0.0" + } + }, + "slice-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-7.1.0.tgz", + "integrity": "sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==", "dev": true, "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "ansi-styles": "^6.2.1", + "is-fullwidth-code-point": "^5.0.0" + } + }, + "string-width": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.1.0.tgz", + "integrity": "sha512-SEIJCWiX7Kg4c129n48aDRwLbFb2LJmXXFrWBG4NGaRtMQ3myKPKbwrD1BKqQn74oCoNMBVrfDEr5M9YxCsrkw==", + "dev": true, + "requires": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + } + }, + "strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "requires": { + "ansi-regex": "^6.0.1" + } + }, + "type-fest": { + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-3.13.1.tgz", + "integrity": "sha512-tLq3bSNx+xSpwvAJnzrK0Ep5CLNWjvFTOp71URMaAEWBfRb9nnJiBoUe0tF8bI4ZFO3omgBR6NvnbzVUT3Ly4g==", + "dev": true + }, + "wrap-ansi": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.0.tgz", + "integrity": "sha512-G8ura3S+3Z2G+mkgNRq8dqaFZAuxfsxpBB8OCTGRTCtp+l/v9nbFNmCUP1BZMts3G1142MsZfn6eeUKrr4PD1Q==", + "dev": true, + "requires": { + "ansi-styles": "^6.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" } } } }, - "longest": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-2.0.1.tgz", - "integrity": "sha512-Ajzxb8CM6WAnFjgiloPsI3bF+WCxcvhdIG3KNA2KN962+tdBsHcuQ4k4qX/EcS/2CRkcc0iAkR956Nib6aXU/Q==", - "dev": true - }, - "loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "requires": { - "js-tokens": "^3.0.0 || ^4.0.0" - } - }, "lower-case": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", @@ -5809,6 +6724,12 @@ "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", "dev": true }, + "memorystream": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz", + "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==", + "dev": true + }, "meow": { "version": "8.1.2", "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", @@ -5920,18 +6841,18 @@ } } }, - "merge": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/merge/-/merge-2.1.1.tgz", - "integrity": "sha512-jz+Cfrg9GWOZbQAnDQ4hlVnQky+341Yk5ru8bZSe6sIDTCIg8n9i/u7hSQGSVOF3C7lH6mGtqjkiT9G4wFLL0w==", - "dev": true - }, "merge-stream": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", "dev": true }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, "micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -6006,14 +6927,11 @@ "kind-of": "^6.0.3" } }, - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } + "minipass": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", + "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", + "dev": true }, "modify-values": { "version": "1.0.1", @@ -6027,12 +6945,6 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, "nanoid": { "version": "3.3.7", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", @@ -6104,6 +7016,89 @@ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", "dev": true }, + "npm-run-all": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz", + "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "chalk": "^2.4.1", + "cross-spawn": "^6.0.5", + "memorystream": "^0.3.1", + "minimatch": "^3.0.4", + "pidtree": "^0.3.0", + "read-pkg": "^3.0.0", + "shell-quote": "^1.6.1", + "string.prototype.padend": "^3.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + } + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==", + "dev": true + }, + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==", + "dev": true + } + } + }, "npm-run-path": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", @@ -6176,54 +7171,19 @@ } }, "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "ora": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/ora/-/ora-5.4.1.tgz", - "integrity": "sha512-5b6Y85tPxZZ7QytO+BQzysW31HJku27cRIlkbAXaNx+BdcVi+LlRFmVXzeF6a7JCwJpyw5c4b+YSVImQIrBpuQ==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "requires": { - "bl": "^4.1.0", - "chalk": "^4.1.0", - "cli-cursor": "^3.1.0", - "cli-spinners": "^2.5.0", - "is-interactive": "^1.0.0", - "is-unicode-supported": "^0.1.0", - "log-symbols": "^4.1.0", - "strip-ansi": "^6.0.0", - "wcwidth": "^1.0.1" - }, - "dependencies": { - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - } + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" } }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true - }, "p-limit": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", @@ -6262,7 +7222,6 @@ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, - "optional": true, "requires": { "callsites": "^3.0.0" } @@ -6279,12 +7238,6 @@ "lines-and-columns": "^1.1.6" } }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", - "dev": true - }, "parse5": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-6.0.1.tgz", @@ -6312,12 +7265,6 @@ "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", "dev": true }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", - "dev": true - }, "path-key": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", @@ -6330,12 +7277,29 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "path-scurry": { + "version": "1.10.1", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz", + "integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==", + "dev": true, + "requires": { + "lru-cache": "^9.1.1 || ^10.0.0", + "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.2.0.tgz", + "integrity": "sha512-2bIM8x+VAf6JT4bKAljS1qUWgMsqZRPGJS6FSahIMPVvctcNhyVp7AJu7quxOW9jwkryBReKZY5tY5JYv2n/7Q==", + "dev": true + } + } + }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", - "dev": true, - "optional": true + "dev": true }, "picocolors": { "version": "1.0.0", @@ -6349,6 +7313,12 @@ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", "dev": true }, + "pidtree": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz", + "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==", + "dev": true + }, "pify": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", @@ -6359,113 +7329,7 @@ "version": "4.0.6", "resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.6.tgz", "integrity": "sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==", - "dev": true - }, - "pkg-conf": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", - "integrity": "sha512-C+VUP+8jis7EsQZIhDYmS5qlNtjv2yP4SNtjXK9AP1ZcTRlnSfuumaTnRfYZnYgUUYVIKqL0fRvmUGDV2fmp6g==", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "load-json-file": "^4.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", - "dev": true, - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", - "dev": true - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", - "dev": true - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", - "dev": true - }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", - "dev": true - } - } - }, - "pkg-config": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pkg-config/-/pkg-config-1.1.1.tgz", - "integrity": "sha512-ft/WI9YK6FuTuw4Ql+QUaNXtm/ASQNqDUUsZEgFZKyFpW6amyP8Gx01xrRs8KdiNbbqXfYxkOXplpq1euWbOjw==", - "dev": true, - "requires": { - "debug-log": "^1.0.0", - "find-root": "^1.0.0", - "xtend": "^4.0.1" - } + "dev": true }, "pkg-dir": { "version": "4.2.0", @@ -6476,12 +7340,6 @@ "find-up": "^4.0.0" } }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, "postcss": { "version": "8.4.33", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz", @@ -6545,9 +7403,15 @@ "dev": true }, "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prettier": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz", + "integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==", "dev": true }, "pretty-error": { @@ -6584,12 +7448,6 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, "promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", @@ -6609,25 +7467,6 @@ "sisteransi": "^1.0.5" } }, - "prop-types": { - "version": "15.8.1", - "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", - "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, - "requires": { - "loose-envify": "^1.4.0", - "object-assign": "^4.1.1", - "react-is": "^16.13.1" - }, - "dependencies": { - "react-is": { - "version": "16.13.1", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true - } - } - }, "psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -6853,84 +7692,29 @@ "dev": true }, "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha512-eFIBOPW7FGjzBuk3hdXEuNSiTZS/xEMlH49HxMyzb0hyPfu4EhVjT2DH32K1hSSmVq4sebAWnZuuY5auISUTGA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", "dev": true, "requires": { - "load-json-file": "^2.0.0", + "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "path-type": "^3.0.0" }, "dependencies": { "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha512-dUnb5dXUf+kzhC/W/F4e5/SkluXIFf5VUHolW1Eg1irn1hGWjPGdsRcvYJ1nD6lhk8Ir7VM0bHJKsYTx8Jx9OQ==", - "dev": true, - "requires": { - "pify": "^2.0.0" - } - } - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha512-1orxQfbWGUiTn9XsPlChs6rLie/AV9jwZTGmu2NZw/CUDJQchXJFYE0Fq5j7+n558T1JhDWLdhyd1Zj+wLY//w==", - "dev": true, - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - }, - "dependencies": { - "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", - "dev": true, - "requires": { - "locate-path": "^2.0.0" - } - }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", - "dev": true, - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "dev": true, - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "p-limit": "^1.1.0" + "pify": "^3.0.0" } }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", - "dev": true - }, - "path-exists": { + "pify": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "dev": true } } @@ -6976,12 +7760,6 @@ "set-function-name": "^2.0.0" } }, - "regexpp": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", - "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", - "dev": true - }, "relateurl": { "version": "0.2.7", "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", @@ -6999,6 +7777,12 @@ "strip-ansi": "^6.0.1" } }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -7009,26 +7793,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "optional": true - }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha512-Xct+41K3twrbBHdxAgMoOS+cNcoqIjfM2/VxBF4LL2hVph7YsF8VSKyQ3BDFZwEVbok9yeDl2le/qo0S77WG2w==", - "dev": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - }, - "dependencies": { - "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha512-kT10v4dhrlLNcnO084hEjvXCI1wUG9qZLoz2RogxqDQQYy7IxjI/iMUkOtQTNEh6rzHxvdQWHsJyel1pKOVCxg==", - "dev": true - } - } + "dev": true }, "requires-port": { "version": "1.0.0", @@ -7056,16 +7821,6 @@ "resolve-from": "^5.0.0" } }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, "resolve-from": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", @@ -7077,7 +7832,6 @@ "resolved": "https://registry.npmjs.org/resolve-global/-/resolve-global-1.0.0.tgz", "integrity": "sha512-zFa12V4OLtT5XUX/Q4VLvTfBf+Ok0SPc1FNGM/z9ctUdiU618qwKpWnd0CHs3+RqROfyEg/DhuHbMWYqcgljEw==", "dev": true, - "optional": true, "requires": { "global-dirs": "^0.1.1" } @@ -7089,15 +7843,27 @@ "dev": true }, "restore-cursor": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", - "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", "dev": true, "requires": { "onetime": "^5.1.0", "signal-exit": "^3.0.2" } }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rfdc": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.1.tgz", + "integrity": "sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg==", + "dev": true + }, "right-pad": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/right-pad/-/right-pad-1.0.1.tgz", @@ -7113,12 +7879,6 @@ "glob": "^7.1.3" } }, - "run-async": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", - "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", - "dev": true - }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -7128,15 +7888,6 @@ "queue-microtask": "^1.2.2" } }, - "rxjs": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.1.tgz", - "integrity": "sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==", - "dev": true, - "requires": { - "tslib": "^2.1.0" - } - }, "safe-array-concat": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz", @@ -7220,24 +7971,6 @@ } } }, - "semistandard": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/semistandard/-/semistandard-13.0.1.tgz", - "integrity": "sha512-2GkuX4BsoMEYoufJYRz8/ERbYDfgOO3yP29IBaoXtxl202azlkV1MsFyoSFiM6GBUfL7MSUxSy38KfM9oDAE2g==", - "dev": true, - "requires": { - "eslint": "~5.4.0", - "eslint-config-semistandard": "13.0.0", - "eslint-config-standard": "12.0.0", - "eslint-config-standard-jsx": "6.0.2", - "eslint-plugin-import": "~2.14.0", - "eslint-plugin-node": "~7.0.1", - "eslint-plugin-promise": "~4.0.0", - "eslint-plugin-react": "~7.11.1", - "eslint-plugin-standard": "~4.0.0", - "standard-engine": "~10.0.0" - } - }, "semver": { "version": "7.5.4", "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", @@ -7304,6 +8037,12 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, + "shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true + }, "side-channel": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", @@ -7334,18 +8073,25 @@ "dev": true }, "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", + "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", "dev": true, "requires": { - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^6.0.0", + "is-fullwidth-code-point": "^4.0.0" }, "dependencies": { + "ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true + }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", + "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", "dev": true } } @@ -7449,18 +8195,6 @@ } } }, - "standard-engine": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-10.0.0.tgz", - "integrity": "sha512-91BjmzIRZbFmyOY73R6vaDd/7nw5qDWsfpJW5/N+BCXFgmvreyfrRg7oBSu4ihL0gFGXfnwCImJm6j+sZDQQyw==", - "dev": true, - "requires": { - "deglob": "^3.0.0", - "get-stdin": "^6.0.0", - "minimist": "^1.1.0", - "pkg-conf": "^2.0.0" - } - }, "standard-version": { "version": "9.5.0", "resolved": "https://registry.npmjs.org/standard-version/-/standard-version-9.5.0.tgz", @@ -7522,6 +8256,12 @@ } } }, + "string-argv": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/string-argv/-/string-argv-0.3.2.tgz", + "integrity": "sha512-aqD2Q0144Z+/RqG52NeHEkZauTAUWJO8c6yTftGJKO3Tja5tUgIfmIl6kExvhtxSDP7fXB6DvzkfMpCd/F3G+Q==", + "dev": true + }, "string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -7543,6 +8283,28 @@ "strip-ansi": "^6.0.1" } }, + "string-width-cjs": { + "version": "npm:string-width@4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "string.prototype.padend": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.5.tgz", + "integrity": "sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==", + "dev": true, + "requires": { + "call-bind": "^1.0.2", + "define-properties": "^1.2.0", + "es-abstract": "^1.22.1" + } + }, "string.prototype.trim": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz", @@ -7599,6 +8361,15 @@ "ansi-regex": "^5.0.1" } }, + "strip-ansi-cjs": { + "version": "npm:strip-ansi@6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.1" + } + }, "strip-bom": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", @@ -7661,83 +8432,12 @@ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha512-Kb3PrPYz4HanVF1LVGuAdW6LoVgIwjUYJGzFe7NDrBLCN4lsV/5J0MFurV+ygS4bRVwrCEt2c7MQ1R2a72oJDw==", - "dev": true - }, "symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", "integrity": "sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==", "dev": true }, - "table": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", - "dev": true, - "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" - }, - "dependencies": { - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -7848,15 +8548,6 @@ "readable-stream": "3" } }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, "tmpl": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/tmpl/-/tmpl-1.0.5.tgz", @@ -7925,12 +8616,12 @@ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" }, "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "requires": { - "prelude-ls": "~1.1.2" + "prelude-ls": "^1.2.1" } }, "type-detect": { @@ -8038,17 +8729,14 @@ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", "dev": true }, - "uniq": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", - "integrity": "sha512-Gw+zz50YNKPDKXs+9d+aKAjVwpjNwqzvNpLigIruT4HA9lMZNdMqs9x07kKHB/L9WRzqp4+DlTU5s4wG2esdoA==", - "dev": true - }, - "universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true + "unique-string": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/unique-string/-/unique-string-3.0.0.tgz", + "integrity": "sha512-VGXBUVwxKMBUznyffQweQABPRRW1vHZAbadFZud4pLFAqRGvv/96vafgjWFqzourzr8YonlQiPgH0YCJfawoGQ==", + "dev": true, + "requires": { + "crypto-random-string": "^4.0.0" + } }, "update-browserslist-db": { "version": "1.0.13", @@ -8131,6 +8819,18 @@ "integrity": "sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==", "dev": true }, + "vscode-languageserver-textdocument": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", + "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==", + "dev": true + }, + "vscode-uri": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.8.tgz", + "integrity": "sha512-AyFQ0EVmsOZOlAnxoFOGOq1SQDWAB7C6aqMGS23svWAllfOaxbuFvcT8D1i8z3Gyn8fraVeZNNmN6e9bxxXkKw==", + "dev": true + }, "w3c-hr-time": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.2.tgz", @@ -8168,15 +8868,6 @@ "graceful-fs": "^4.1.2" } }, - "wcwidth": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", - "integrity": "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg==", - "dev": true, - "requires": { - "defaults": "^1.0.3" - } - }, "webidl-conversions": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-6.1.0.tgz", @@ -8401,21 +9092,23 @@ "strip-ansi": "^6.0.0" } }, + "wrap-ansi-cjs": { + "version": "npm:wrap-ansi@7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + }, "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, - "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha512-CJ17OoULEKXpA5pef3qLj5AxTJ6mSt7g84he2WIskKwqFO4T97d5V7Tadl0DYDk7qyUOQD5WlUlOMChaYrhxeA==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, "write-file-atomic": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", @@ -8434,6 +9127,12 @@ "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "dev": true }, + "xdg-basedir": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/xdg-basedir/-/xdg-basedir-5.1.0.tgz", + "integrity": "sha512-GCPAHLvrIH13+c0SuacwvRYj2SxJXQ4kaVTT5xgL3kPrz56XxkF21IGhjSE1+W0aw7gpBWRGXLCPnPby6lSpmQ==", + "dev": true + }, "xml-name-validator": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz", @@ -8464,6 +9163,12 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, + "yaml": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.3.4.tgz", + "integrity": "sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==", + "dev": true + }, "yargs": { "version": "16.2.0", "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", diff --git a/package.json b/package.json index f540c472..dc6bd44b 100644 --- a/package.json +++ b/package.json @@ -13,34 +13,48 @@ "typings.d.ts" ], "scripts": { - "pretest": "semistandard", "posttest": "tsc", - "commit": "git-cz", - "build-examples": "node examples/build-examples.js", - "test": "jest --runInBand --verbose --coverage", - "test-watch": "jest --runInBand --watch", "puml": "npx puml generate flow.puml -o flow.png", + "build-examples": "node examples/build-examples.js", + "commitlint": "commitlint --from=master", + "security": "npm audit --omit=dev", + "lint:prettier": "prettier --cache --list-different .", + "lint:js": "eslint --cache .", + "lint:spelling": "cspell --cache --no-must-find-files --quiet \"**/*.*\"", + "lint": "npm-run-all -l -p \"lint:**\"", + "fix:js": "npm run lint:js -- --fix", + "fix:prettier": "npm run lint:prettier -- --write", + "fix": "npm-run-all -l fix:js fix:prettier", + "test:only": "cross-env NODE_ENV=test jest", + "test:watch": "npm run test:only -- --watch", + "test:manual": "npm run build && webpack-dev-server test/manual/src/index.js --open --config test/manual/webpack.config.js", + "test:coverage": "npm run test:only -- --coverage", + "pretest": "npm run lint", + "test": "npm run test:coverage", + "prepare": "husky", "release": "standard-version" }, - "semistandard": { - "ignore": [ - "examples/*/dist/**/*.*" - ] - }, "devDependencies": { + "@commitlint/cli": "^18.4.4", + "@commitlint/config-conventional": "^18.4.4", "@types/node": "^20.2.5", - "commitizen": "^4.2.4", + "cross-env": "^7.0.3", + "cspell": "^8.3.2", "css-loader": "5.0.1", "cz-conventional-changelog": "2.1.0", "dir-compare": "^3.3.0", + "eslint": "^8.56.0", "html-loader": "2.1.1", + "husky": "^9.0.10", "jest": "^27.2.5", + "lint-staged": "^15.2.2", "mini-css-extract-plugin": "^1.6.0", + "npm-run-all": "^4.1.5", + "prettier": "^3.2.5", "pug": "3.0.2", "pug-loader": "2.4.0", "raw-loader": "4.0.2", "rimraf": "2.6.3", - "semistandard": "^13.0.1", "standard-version": "^9.3.0", "style-loader": "2.0.0", "typescript": "4.9.4", @@ -79,11 +93,6 @@ "engines": { "node": ">=10.13.0" }, - "config": { - "commitizen": { - "path": "./node_modules/cz-conventional-changelog" - } - }, "jest": { "watchPathIgnorePatterns": [ "/dist" diff --git a/spec/basic.spec.js b/spec/basic.spec.js index 744e546e..6a415ea9 100644 --- a/spec/basic.spec.js +++ b/spec/basic.spec.js @@ -3,79 +3,97 @@ */ /* eslint-env jest */ -'use strict'; - -const path = require('path'); -const fs = require('fs'); -const webpack = require('webpack'); -const rimraf = require('rimraf'); -const _ = require('lodash'); -const MiniCssExtractPlugin = require('mini-css-extract-plugin'); -const webpackMajorVersion = Number(require('webpack/package.json').version.split('.')[0]); -const itUnixOnly = (process.platform === 'win32' || process.platform === 'win64') ? it.skip : it; +"use strict"; + +const path = require("path"); +const fs = require("fs"); +const webpack = require("webpack"); +const rimraf = require("rimraf"); +const _ = require("lodash"); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +const webpackMajorVersion = Number( + require("webpack/package.json").version.split(".")[0], +); +const itUnixOnly = + process.platform === "win32" || process.platform === "win64" ? it.skip : it; if (isNaN(webpackMajorVersion)) { - throw new Error('Cannot parse webpack major version'); + throw new Error("Cannot parse webpack major version"); } -const HtmlWebpackPlugin = require('../index.js'); +const HtmlWebpackPlugin = require("../index.js"); -const OUTPUT_DIR = path.resolve(__dirname, '../dist/basic-spec'); +const OUTPUT_DIR = path.resolve(__dirname, "../dist/basic-spec"); jest.setTimeout(30000); -process.on('unhandledRejection', r => console.log(r)); - -function testHtmlPlugin (webpackConfig, expectedResults, outputFile, done, expectErrors, expectWarnings) { - outputFile = outputFile || 'index.html'; +process.on("unhandledRejection", (r) => console.log(r)); + +function testHtmlPlugin( + webpackConfig, + expectedResults, + outputFile, + done, + expectErrors, + expectWarnings, +) { + outputFile = outputFile || "index.html"; webpack(webpackConfig, (err, stats) => { expect(err).toBeFalsy(); - const compilationErrors = (stats.compilation.errors || []).join('\n'); + const compilationErrors = (stats.compilation.errors || []).join("\n"); if (expectErrors) { - expect(compilationErrors).not.toBe(''); + expect(compilationErrors).not.toBe(""); } else { - expect(compilationErrors).toBe(''); + expect(compilationErrors).toBe(""); } - const compilationWarnings = (stats.compilation.warnings || []).join('\n'); + const compilationWarnings = (stats.compilation.warnings || []).join("\n"); if (expectWarnings) { - expect(compilationWarnings).not.toBe(''); + expect(compilationWarnings).not.toBe(""); } else { - expect(compilationWarnings).toBe(''); + expect(compilationWarnings).toBe(""); } if (outputFile instanceof RegExp) { const fileNames = Object.keys(stats.compilation.assets); - const matches = Object.keys(stats.compilation.assets).filter(item => outputFile.test(item)); + const matches = Object.keys(stats.compilation.assets).filter((item) => + outputFile.test(item), + ); expect(matches[0] || fileNames).not.toEqual(fileNames); outputFile = matches[0]; } - expect(outputFile.indexOf('[hash]') === -1).toBe(true); + expect(outputFile.indexOf("[hash]") === -1).toBe(true); const outputFileExists = fs.existsSync(path.join(OUTPUT_DIR, outputFile)); expect(outputFileExists).toBe(true); if (!outputFileExists) { return done(); } - const htmlContent = fs.readFileSync(path.join(OUTPUT_DIR, outputFile)).toString(); + const htmlContent = fs + .readFileSync(path.join(OUTPUT_DIR, outputFile)) + .toString(); let chunksInfo; for (let i = 0; i < expectedResults.length; i++) { const expectedResult = expectedResults[i]; if (expectedResult instanceof RegExp) { expect(htmlContent).toMatch(expectedResult); - } else if (typeof expectedResult === 'object') { - if (expectedResult.type === 'chunkhash') { + } else if (typeof expectedResult === "object") { + if (expectedResult.type === "chunkhash") { if (!chunksInfo) { chunksInfo = getChunksInfoFromStats(stats); } const chunkhash = chunksInfo[expectedResult.chunkName].hash; - expect(htmlContent).toContain(expectedResult.containStr.replace('%chunkhash%', chunkhash)); + expect(htmlContent).toContain( + expectedResult.containStr.replace("%chunkhash%", chunkhash), + ); } } else { - expect(htmlContent).toContain(expectedResult.replace('%hash%', stats.hash)); + expect(htmlContent).toContain( + expectedResult.replace("%hash%", stats.hash), + ); } } done(); }); } -function getChunksInfoFromStats (stats) { +function getChunksInfoFromStats(stats) { const chunks = stats.compilation.getStats().toJson().chunks; const chunksInfo = {}; for (let i = 0; i < chunks.length; i++) { @@ -88,2775 +106,3673 @@ function getChunksInfoFromStats (stats) { return chunksInfo; } -describe('HtmlWebpackPlugin', () => { - beforeEach(done => { +describe("HtmlWebpackPlugin", () => { + beforeEach((done) => { rimraf(OUTPUT_DIR, done); }); - it('generates a default index.html file for a single entry point', done => { - testHtmlPlugin({ - mode: 'production', - entry: path.join(__dirname, 'fixtures/index.js'), - output: { - path: OUTPUT_DIR, - filename: 'index_bundle.js' - }, - plugins: [new HtmlWebpackPlugin()] - }, [/'], null, done); - }); - - it('should allow to use headTags and bodyTags directly in string literals', done => { - testHtmlPlugin({ - mode: 'production', - entry: path.join(__dirname, 'fixtures/theme.js'), - output: { - path: OUTPUT_DIR, - filename: 'index_bundle.js' - }, - module: { - rules: [ - { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] } - ] - }, - plugins: [ - new MiniCssExtractPlugin({ filename: 'styles.css' }), - new HtmlWebpackPlugin({ - scriptLoading: 'blocking', - inject: false, - templateContent: ({ htmlWebpackPlugin }) => ` + }, + plugins: [new HtmlWebpackPlugin()], + }, + [ + /', + ], + null, + done, + ); + }); + + it("should allow to use headTags and bodyTags directly in string literals", (done) => { + testHtmlPlugin( + { + mode: "production", + entry: path.join(__dirname, "fixtures/theme.js"), + output: { + path: OUTPUT_DIR, + filename: "index_bundle.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, + plugins: [ + new MiniCssExtractPlugin({ filename: "styles.css" }), + new HtmlWebpackPlugin({ + scriptLoading: "blocking", + inject: false, + templateContent: ({ htmlWebpackPlugin }) => ` ${htmlWebpackPlugin.tags.headTags} ${htmlWebpackPlugin.tags.bodyTags} - ` - }) - ] - }, ['', ''], null, done); - }); - - it('should add the javascript assets to the head for inject:true with scriptLoading:defer', done => { - testHtmlPlugin({ - mode: 'production', - entry: path.join(__dirname, 'fixtures/theme.js'), - output: { - path: OUTPUT_DIR, - filename: 'index_bundle.js' - }, - module: { - rules: [ - { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] } - ] - }, - plugins: [ - new MiniCssExtractPlugin({ filename: 'styles.css' }), - new HtmlWebpackPlugin({ - scriptLoading: 'defer', - inject: true - }) - ] - }, [''], null, done); - }); - - it('should allow to use headTags and bodyTags directly in string literals', done => { - testHtmlPlugin({ - mode: 'production', - entry: path.join(__dirname, 'fixtures/theme.js'), - output: { - path: OUTPUT_DIR, - filename: 'index_bundle.js' - }, - module: { - rules: [ - { test: /\.css$/, use: [MiniCssExtractPlugin.loader, 'css-loader'] } - ] - }, - plugins: [ - new MiniCssExtractPlugin({ filename: 'styles.css' }), - new HtmlWebpackPlugin({ - inject: false, - templateContent: ({ htmlWebpackPlugin }) => ` + `, + }), + ], + }, + [ + '', + '', + ], + null, + done, + ); + }); + + it("should add the javascript assets to the head for inject:true with scriptLoading:defer", (done) => { + testHtmlPlugin( + { + mode: "production", + entry: path.join(__dirname, "fixtures/theme.js"), + output: { + path: OUTPUT_DIR, + filename: "index_bundle.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, + plugins: [ + new MiniCssExtractPlugin({ filename: "styles.css" }), + new HtmlWebpackPlugin({ + scriptLoading: "defer", + inject: true, + }), + ], + }, + [ + '', + ], + null, + done, + ); + }); + + it("should allow to use headTags and bodyTags directly in string literals", (done) => { + testHtmlPlugin( + { + mode: "production", + entry: path.join(__dirname, "fixtures/theme.js"), + output: { + path: OUTPUT_DIR, + filename: "index_bundle.js", + }, + module: { + rules: [ + { + test: /\.css$/, + use: [MiniCssExtractPlugin.loader, "css-loader"], + }, + ], + }, + plugins: [ + new MiniCssExtractPlugin({ filename: "styles.css" }), + new HtmlWebpackPlugin({ + inject: false, + templateContent: ({ htmlWebpackPlugin }) => ` ${htmlWebpackPlugin.tags.headTags} ${htmlWebpackPlugin.tags.bodyTags} - ` - }) - ] - }, [''], null, done); - }); - - it('should allow to use experiments:{outputModule:true}', done => { - testHtmlPlugin({ - mode: 'production', - entry: path.join(__dirname, 'fixtures/index.js'), - output: { - path: OUTPUT_DIR, - filename: 'index_bundle.js', - module: true - }, - experiments: { outputModule: true }, - plugins: [ - new HtmlWebpackPlugin({ - }) - ] - }, [''], null, done); - }); - - it('generates relative path for asset/resource', done => { - testHtmlPlugin({ - mode: 'development', - entry: path.join(__dirname, 'fixtures/index.js'), - output: { - path: OUTPUT_DIR, - filename: 'index_bundle.js', - assetModuleFilename: 'assets/demo[ext]' - }, - module: { - rules: [ - { test: /\.png$/, type: 'asset/resource' } - ] - }, - plugins: [ - new HtmlWebpackPlugin({ - template: 'html-loader!' + path.join(__dirname, 'fixtures/logo.html'), - filename: 'demo/index.js' - }) - ] - }, [' { - testHtmlPlugin({ - mode: 'development', - entry: {}, - output: { - path: OUTPUT_DIR, - filename: 'index_bundle.js', - assetModuleFilename: 'assets/demo[ext]' - }, - plugins: [ - new HtmlWebpackPlugin({}) - ] - }, [''], null, done); - }); - - it('allows to set custom loader interpolation settings', done => { - testHtmlPlugin({ - mode: 'production', - entry: { - app: path.join(__dirname, 'fixtures/index.js') - }, - output: { - path: OUTPUT_DIR, - filename: '[name]_bundle.js' - }, - module: { - rules: [ - { - test: /\.html$/, - loader: require.resolve('../lib/loader.js'), - options: { - interpolate: /\{%=([\s\S]+?)%\}/g - } - } - ] - }, - plugins: [ - new HtmlWebpackPlugin({ - title: 'Interpolation Demo', - template: path.join(__dirname, 'fixtures/interpolation.html') - }) - ] - }, ['Interpolation Demo'], null, () => { - done(); - }); + `, + }), + ], + }, + [ + '', + ], + null, + done, + ); + }); + + it("should allow to use experiments:{outputModule:true}", (done) => { + testHtmlPlugin( + { + mode: "production", + entry: path.join(__dirname, "fixtures/index.js"), + output: { + path: OUTPUT_DIR, + filename: "index_bundle.js", + module: true, + }, + experiments: { outputModule: true }, + plugins: [new HtmlWebpackPlugin({})], + }, + [''], + null, + done, + ); + }); + + it("generates relative path for asset/resource", (done) => { + testHtmlPlugin( + { + mode: "development", + entry: path.join(__dirname, "fixtures/index.js"), + output: { + path: OUTPUT_DIR, + filename: "index_bundle.js", + assetModuleFilename: "assets/demo[ext]", + }, + module: { + rules: [{ test: /\.png$/, type: "asset/resource" }], + }, + plugins: [ + new HtmlWebpackPlugin({ + template: + "html-loader!" + path.join(__dirname, "fixtures/logo.html"), + filename: "demo/index.js", + }), + ], + }, + [' { + testHtmlPlugin( + { + mode: "development", + entry: path.join(__dirname, "fixtures/index.js"), + output: { + path: OUTPUT_DIR, + filename: "index_bundle.js", + assetModuleFilename: "assets/demo[ext]", + }, + module: { + rules: [{ test: /\.png$/, type: "asset/resource" }], + }, + plugins: [ + new HtmlWebpackPlugin({ + template: + "html-loader!" + path.join(__dirname, "fixtures/logo.html"), + filename: "demo/index.js", + publicPath: "/foo/", + }), + ], + }, + [' { + testHtmlPlugin( + { + mode: "development", + entry: {}, + output: { + path: OUTPUT_DIR, + filename: "index_bundle.js", + assetModuleFilename: "assets/demo[ext]", + }, + plugins: [new HtmlWebpackPlugin({})], + }, + [""], + null, + done, + ); + }); + + it("allows to set custom loader interpolation settings", (done) => { + testHtmlPlugin( + { + mode: "production", + entry: { + app: path.join(__dirname, "fixtures/index.js"), + }, + output: { + path: OUTPUT_DIR, + filename: "[name]_bundle.js", + }, + module: { + rules: [ + { + test: /\.html$/, + loader: require.resolve("../lib/loader.js"), + options: { + interpolate: /\{%=([\s\S]+?)%\}/g, + }, + }, + ], + }, + plugins: [ + new HtmlWebpackPlugin({ + title: "Interpolation Demo", + template: path.join(__dirname, "fixtures/interpolation.html"), + }), + ], + }, + ["Interpolation Demo"], + null, + () => { + done(); + }, + ); }); }); diff --git a/spec/caching.spec.js b/spec/caching.spec.js index 38f7e7ec..c61352e0 100644 --- a/spec/caching.spec.js +++ b/spec/caching.spec.js @@ -3,51 +3,53 @@ */ /* eslint-env jest */ -'use strict'; +"use strict"; -const path = require('path'); -const webpack = require('webpack'); -const rimraf = require('rimraf'); -const WebpackRecompilationSimulator = require('webpack-recompilation-simulator'); -const HtmlWebpackPlugin = require('../index.js'); +const path = require("path"); +const webpack = require("webpack"); +const rimraf = require("rimraf"); +const WebpackRecompilationSimulator = require("webpack-recompilation-simulator"); +const HtmlWebpackPlugin = require("../index.js"); -const OUTPUT_DIR = path.join(__dirname, '../dist/caching-spec'); +const OUTPUT_DIR = path.join(__dirname, "../dist/caching-spec"); jest.setTimeout(30000); -process.on('unhandledRejection', r => console.log(r)); +process.on("unhandledRejection", (r) => console.log(r)); -function setUpCompiler (htmlWebpackPlugin) { - jest.spyOn(htmlWebpackPlugin, 'evaluateCompilationResult'); +function setUpCompiler(htmlWebpackPlugin) { + jest.spyOn(htmlWebpackPlugin, "evaluateCompilationResult"); const webpackConfig = { stats: { all: true }, // Caching works only in development - mode: 'development', - entry: path.join(__dirname, 'fixtures/index.js'), + mode: "development", + entry: path.join(__dirname, "fixtures/index.js"), module: { rules: [ { test: /\.html$/, - loader: require.resolve('../lib/loader.js'), + loader: require.resolve("../lib/loader.js"), options: { - force: true - } - } - ] + force: true, + }, + }, + ], }, output: { path: OUTPUT_DIR, - filename: 'index_bundle.js' + filename: "index_bundle.js", }, - plugins: Array.from(arguments) + plugins: Array.from(arguments), }; const compiler = new WebpackRecompilationSimulator(webpack(webpackConfig)); return compiler; } -function getCompiledModules (statsJson) { - const builtModules = statsJson.modules.filter(webpackModule => webpackModule.built).map((webpackModule) => { - return webpackModule.name; - }); +function getCompiledModules(statsJson) { + const builtModules = statsJson.modules + .filter((webpackModule) => webpackModule.built) + .map((webpackModule) => { + return webpackModule.name; + }); statsJson.children.forEach((childCompilationStats) => { const builtChildModules = getCompiledModules(childCompilationStats); Array.prototype.push.apply(builtModules, builtChildModules); @@ -55,235 +57,262 @@ function getCompiledModules (statsJson) { return builtModules; } -function getCompiledModuleCount (statsJson) { +function getCompiledModuleCount(statsJson) { return getCompiledModules(statsJson).length; } -function expectNoErrors (stats) { +function expectNoErrors(stats) { const errors = { main: stats.compilation.errors, - childCompilation: [] + childCompilation: [], }; stats.compilation.children.forEach((child) => { Array.prototype.push.apply(errors.childCompilation, child.errors); }); if (errors.main.length) { errors.main.forEach((error) => { - console.log('Error => ', error); + console.log("Error => ", error); + }); + console.dir(stats.toJson({ errorDetails: true, moduleTrace: true }), { + depth: 5, }); - console.dir(stats.toJson({ errorDetails: true, moduleTrace: true }), { depth: 5 }); } expect(errors.main).toEqual([]); expect(errors.childCompilation).toEqual([]); } -describe('HtmlWebpackPluginCaching', () => { - beforeEach(done => { +describe("HtmlWebpackPluginCaching", () => { + beforeEach((done) => { rimraf(OUTPUT_DIR, done); }); - it('should compile nothing if no file was changed', done => { - const template = path.join(__dirname, 'fixtures/plain.html'); + it("should compile nothing if no file was changed", (done) => { + const template = path.join(__dirname, "fixtures/plain.html"); const htmlWebpackPlugin = new HtmlWebpackPlugin({ - template: template + template: template, }); let childCompilerHash; const compiler = setUpCompiler(htmlWebpackPlugin); - compiler.addTestFile(path.join(__dirname, 'fixtures/index.js')); - compiler.run() + compiler.addTestFile(path.join(__dirname, "fixtures/index.js")); + compiler + .run() // Change the template file and compile again .then(() => { childCompilerHash = htmlWebpackPlugin.childCompilerHash; return compiler.run(); }) - .then(stats => { + .then((stats) => { // Expect no errors: expectNoErrors(stats); // Verify that no file was built - expect(getCompiledModules(stats.toJson())) - .toEqual([]); + expect(getCompiledModules(stats.toJson())).toEqual([]); // Verify that the html was processed only during the initial build - expect(htmlWebpackPlugin.evaluateCompilationResult.mock.calls.length) - .toBe(1); + expect( + htmlWebpackPlugin.evaluateCompilationResult.mock.calls.length, + ).toBe(1); // Verify that the child compilation was executed twice - expect(htmlWebpackPlugin.childCompilerHash) - .toBe(childCompilerHash); + expect(htmlWebpackPlugin.childCompilerHash).toBe(childCompilerHash); }) .then(done); }); - it('should not compile the webpack html file if only a javascript file was changed', done => { + it("should not compile the webpack html file if only a javascript file was changed", (done) => { const htmlWebpackPlugin = new HtmlWebpackPlugin(); const compiler = setUpCompiler(htmlWebpackPlugin); let childCompilerHash; - compiler.addTestFile(path.join(__dirname, 'fixtures/index.js')); - compiler.run() + compiler.addTestFile(path.join(__dirname, "fixtures/index.js")); + compiler + .run() // Change a js file and compile again .then(() => { childCompilerHash = htmlWebpackPlugin.childCompilerHash; - compiler.simulateFileChange(path.join(__dirname, 'fixtures/index.js'), { footer: '//1' }); + compiler.simulateFileChange(path.join(__dirname, "fixtures/index.js"), { + footer: "//1", + }); return compiler.run(); }) - .then(stats => { + .then((stats) => { // Expect no errors: expectNoErrors(stats); // Verify that only one file was built - expect(getCompiledModuleCount(stats.toJson())) - .toBe(1); + expect(getCompiledModuleCount(stats.toJson())).toBe(1); // Verify that the html was processed only during the initial build - expect(htmlWebpackPlugin.evaluateCompilationResult.mock.calls.length) - .toBe(1); + expect( + htmlWebpackPlugin.evaluateCompilationResult.mock.calls.length, + ).toBe(1); // Verify that the child compilation was executed only once - expect(htmlWebpackPlugin.childCompilerHash) - .toBe(childCompilerHash); + expect(htmlWebpackPlugin.childCompilerHash).toBe(childCompilerHash); }) .then(done); }); - it('should compile the webpack html file even if only a javascript file was changed if caching is disabled', done => { + it("should compile the webpack html file even if only a javascript file was changed if caching is disabled", (done) => { const htmlWebpackPlugin = new HtmlWebpackPlugin({ - cache: false + cache: false, }); let childCompilerHash; const compiler = setUpCompiler(htmlWebpackPlugin); - compiler.addTestFile(path.join(__dirname, 'fixtures/index.js')); - compiler.run() + compiler.addTestFile(path.join(__dirname, "fixtures/index.js")); + compiler + .run() // Change a js file and compile again .then(() => { childCompilerHash = htmlWebpackPlugin.childCompilerHash; - compiler.simulateFileChange(path.join(__dirname, 'fixtures/index.js'), { footer: '//1' }); + compiler.simulateFileChange(path.join(__dirname, "fixtures/index.js"), { + footer: "//1", + }); return compiler.run(); }) - .then(stats => { + .then((stats) => { // Expect no errors: expectNoErrors(stats); // Verify that only one file was built - expect(getCompiledModuleCount(stats.toJson())) - .toBe(1); + expect(getCompiledModuleCount(stats.toJson())).toBe(1); // Verify that the html was processed on every run - expect(htmlWebpackPlugin.evaluateCompilationResult.mock.calls.length) - .toBe(2); + expect( + htmlWebpackPlugin.evaluateCompilationResult.mock.calls.length, + ).toBe(2); // Verify that the child compilation was executed only once - expect(htmlWebpackPlugin.childCompilerHash) - .toBe(childCompilerHash); + expect(htmlWebpackPlugin.childCompilerHash).toBe(childCompilerHash); }) .then(done); }); - it('should compile the webpack html if the template file was changed', done => { - const template = path.join(__dirname, 'fixtures/plain.html'); + it("should compile the webpack html if the template file was changed", (done) => { + const template = path.join(__dirname, "fixtures/plain.html"); const htmlWebpackPlugin = new HtmlWebpackPlugin({ - template: template + template: template, }); const compiler = setUpCompiler(htmlWebpackPlugin); compiler.addTestFile(template); - compiler.run() + compiler + .run() // Change the template file and compile again .then(() => { - compiler.simulateFileChange(template, { footer: '' }); + compiler.simulateFileChange(template, { footer: "" }); return compiler.run(); }) - .then(stats => { + .then((stats) => { // Expect no errors: expectNoErrors(stats); // Verify that only one file was built - expect(getCompiledModuleCount(stats.toJson())) - .toBe(1); + expect(getCompiledModuleCount(stats.toJson())).toBe(1); // Verify that the html was processed twice - expect(htmlWebpackPlugin.evaluateCompilationResult.mock.calls.length) - .toBe(2); + expect( + htmlWebpackPlugin.evaluateCompilationResult.mock.calls.length, + ).toBe(2); - const [evaluateCompilationResultArgs1, evaluateCompilationResultArgs2] = htmlWebpackPlugin.evaluateCompilationResult.mock.calls; + const [evaluateCompilationResultArgs1, evaluateCompilationResultArgs2] = + htmlWebpackPlugin.evaluateCompilationResult.mock.calls; const compiledSource = evaluateCompilationResultArgs1[0]; const compiledSourceSecondRun = evaluateCompilationResultArgs2[0]; // Verify that the child compilation was executed twice - expect(compiledSource) - .not.toBe(compiledSourceSecondRun); + expect(compiledSource).not.toBe(compiledSourceSecondRun); }) .then(done); }); - it('should not slow down linear (10 plugins should not take 2.5 as much time as a 1 plugin)', done => { - const template = path.join(__dirname, 'fixtures/plain.html'); - const createHtmlWebpackPlugin = () => new HtmlWebpackPlugin({ - template: template, - minify: false - }); + it("should not slow down linear (10 plugins should not take 2.5 as much time as a 1 plugin)", (done) => { + const template = path.join(__dirname, "fixtures/plain.html"); + const createHtmlWebpackPlugin = () => + new HtmlWebpackPlugin({ + template: template, + minify: false, + }); let singlePluginCompileStart; let singleCompileRunDuration; - let multiPluginComileStart; + let multiPluginCompileStart; let multiCompileRunDuration; let singleCompiler = setUpCompiler(createHtmlWebpackPlugin()); - let multiCompiler = setUpCompiler.apply(null, Array(10).fill(0).map(() => createHtmlWebpackPlugin())); + let multiCompiler = setUpCompiler.apply( + null, + Array(10) + .fill(0) + .map(() => createHtmlWebpackPlugin()), + ); Promise.resolve() - .then(function singleCompileRun () { + .then(function singleCompileRun() { singlePluginCompileStart = process.hrtime(); - return singleCompiler.run() - // Change the template file and compile again - .then(() => { - singleCompileRunDuration = process.hrtime(singlePluginCompileStart); - }); + return ( + singleCompiler + .run() + // Change the template file and compile again + .then(() => { + singleCompileRunDuration = process.hrtime( + singlePluginCompileStart, + ); + }) + ); }) - .then(function multiCompileRun () { - multiPluginComileStart = process.hrtime(); - return multiCompiler.run() - // Change the template file and compile again - .then(() => { - multiCompileRunDuration = process.hrtime(multiPluginComileStart); - }); - }).then(function meassureTime () { - const singleCompileRunDurationInNs = singleCompileRunDuration[0] * 1e9 + singleCompileRunDuration[1]; - const multiCompileRunDurationInNs = multiCompileRunDuration[0] * 1e9 + multiCompileRunDuration[1]; - const speedComarision = multiCompileRunDurationInNs / singleCompileRunDurationInNs * 100; + .then(function multiCompileRun() { + multiPluginCompileStart = process.hrtime(); + return ( + multiCompiler + .run() + // Change the template file and compile again + .then(() => { + multiCompileRunDuration = process.hrtime(multiPluginCompileStart); + }) + ); + }) + .then(function measureTime() { + const singleCompileRunDurationInNs = + singleCompileRunDuration[0] * 1e9 + singleCompileRunDuration[1]; + const multiCompileRunDurationInNs = + multiCompileRunDuration[0] * 1e9 + multiCompileRunDuration[1]; + const speedComparison = + (multiCompileRunDurationInNs / singleCompileRunDurationInNs) * 100; - expect(speedComarision).toBeLessThan(250); + expect(speedComparison).toBeLessThan(250); done(); }); }); - it('should keep watching the webpack html if only a js file was changed', done => { - const template = path.join(__dirname, 'fixtures/plain.html'); - const jsFile = path.join(__dirname, 'fixtures/index.js'); + it("should keep watching the webpack html if only a js file was changed", (done) => { + const template = path.join(__dirname, "fixtures/plain.html"); + const jsFile = path.join(__dirname, "fixtures/index.js"); const htmlWebpackPlugin = new HtmlWebpackPlugin({ - template: template + template: template, }); const compiler = setUpCompiler(htmlWebpackPlugin); compiler.addTestFile(template); compiler.addTestFile(jsFile); // Build the template file for the first time - compiler.startWatching() + compiler + .startWatching() // Change the template file (second build) .then(() => { - compiler.simulateFileChange(template, { footer: '' }); + compiler.simulateFileChange(template, { footer: "" }); return compiler.waitForWatchRunComplete(); }) // Change js .then(() => { - compiler.simulateFileChange(jsFile, { footer: '// 1' }); + compiler.simulateFileChange(jsFile, { footer: "// 1" }); return compiler.waitForWatchRunComplete(); }) // Change js .then(() => { - compiler.simulateFileChange(jsFile, { footer: '// 2' }); + compiler.simulateFileChange(jsFile, { footer: "// 2" }); return compiler.waitForWatchRunComplete(); }) // Change js .then(() => { - compiler.simulateFileChange(jsFile, { footer: '// 3' }); + compiler.simulateFileChange(jsFile, { footer: "// 3" }); return compiler.waitForWatchRunComplete(); }) // Change the template file (third build) .then(() => { - compiler.simulateFileChange(template, { footer: '' }); + compiler.simulateFileChange(template, { footer: "" }); return compiler.waitForWatchRunComplete(); }) .then(() => { // Verify that the html was processed trice - expect(htmlWebpackPlugin.evaluateCompilationResult.mock.calls.length) - .toBe(3); + expect( + htmlWebpackPlugin.evaluateCompilationResult.mock.calls.length, + ).toBe(3); }) .then(() => compiler.stopWatching()) .then(done); diff --git a/spec/example.spec.js b/spec/example.spec.js index 7b241c1f..11208928 100644 --- a/spec/example.spec.js +++ b/spec/example.spec.js @@ -4,38 +4,46 @@ */ /* eslint-env jest */ -'use strict'; +"use strict"; -const path = require('path'); -const webpack = require('webpack'); -const rimraf = require('rimraf'); -const fs = require('fs'); -const webpackMajorVersion = require('webpack/package.json').version.split('.')[0]; +const path = require("path"); +const webpack = require("webpack"); +const rimraf = require("rimraf"); +const fs = require("fs"); +const webpackMajorVersion = require("webpack/package.json").version.split( + ".", +)[0]; -const OUTPUT_DIR = path.resolve(__dirname, '../dist'); +const OUTPUT_DIR = path.resolve(__dirname, "../dist"); jest.setTimeout(30000); -function runExample (exampleName, done) { - const examplePath = path.resolve(__dirname, '..', 'examples', exampleName); +function runExample(exampleName, done) { + const examplePath = path.resolve(__dirname, "..", "examples", exampleName); const exampleOutput = path.join(OUTPUT_DIR, exampleName); - const fixturePath = path.resolve(examplePath, 'dist', 'webpack-' + webpackMajorVersion); + const fixturePath = path.resolve( + examplePath, + "dist", + "webpack-" + webpackMajorVersion, + ); // Clear old results rimraf(exampleOutput, () => { - const options = require(path.join(examplePath, 'webpack.config.js')); + const options = require(path.join(examplePath, "webpack.config.js")); options.context = examplePath; options.output.path = exampleOutput + path.sep; if (Number(webpackMajorVersion) >= 4) { - options.plugins.unshift(new webpack.LoaderOptionsPlugin({ - options: { - context: process.cwd() // or the same value as `context` - } - })); + options.plugins.unshift( + new webpack.LoaderOptionsPlugin({ + options: { + context: process.cwd(), // or the same value as `context` + }, + }), + ); if (options.module && options.module.loaders) { options.module.rules = options.module.loaders; delete options.module.loaders; } - options.mode = 'production'; + options.mode = "production"; options.optimization = { minimizer: [] }; } @@ -44,15 +52,23 @@ function runExample (exampleName, done) { expect(err).toBeFalsy(); expect(stats.compilation.errors).toEqual([]); - const dircompare = require('dir-compare'); - const res = dircompare.compareSync(fixturePath, exampleOutput, { compareSize: true }); - - res.diffSet.filter(diff => diff.state === 'distinct').forEach(diff => { - const file1Contents = fs.readFileSync(path.join(diff.path1, diff.name1)).toString(); - const file2Contents = fs.readFileSync(path.join(diff.path2, diff.name2)).toString(); - expect(file1Contents).toEqual(file2Contents); + const dircompare = require("dir-compare"); + const res = dircompare.compareSync(fixturePath, exampleOutput, { + compareSize: true, }); + res.diffSet + .filter((diff) => diff.state === "distinct") + .forEach((diff) => { + const file1Contents = fs + .readFileSync(path.join(diff.path1, diff.name1)) + .toString(); + const file2Contents = fs + .readFileSync(path.join(diff.path2, diff.name2)) + .toString(); + expect(file1Contents).toEqual(file2Contents); + }); + expect(res.same).toBe(true); rimraf(exampleOutput, done); } catch (e) { @@ -62,48 +78,48 @@ function runExample (exampleName, done) { }); } -describe('HtmlWebpackPlugin Examples', () => { - it('custom-template example', done => { - runExample('custom-template', done); +describe("HtmlWebpackPlugin Examples", () => { + it("custom-template example", (done) => { + runExample("custom-template", done); }); - it('default example', done => { - runExample('default', done); + it("default example", (done) => { + runExample("default", done); }); - it('favicon example', done => { - runExample('favicon', done); + it("favicon example", (done) => { + runExample("favicon", done); }); - it('html-loader example', done => { - runExample('html-loader', done); + it("html-loader example", (done) => { + runExample("html-loader", done); }); - it('inline example', done => { - runExample('inline', done); + it("inline example", (done) => { + runExample("inline", done); }); - it('pug-loader example', done => { - runExample('pug-loader', done); + it("pug-loader example", (done) => { + runExample("pug-loader", done); }); - it('javascript example', done => { - runExample('javascript', done); + it("javascript example", (done) => { + runExample("javascript", done); }); - it('javascript-advanced example', done => { - runExample('javascript-advanced', done); + it("javascript-advanced example", (done) => { + runExample("javascript-advanced", done); }); - it('sort manually example', done => { - runExample('sort-manually', done); + it("sort manually example", (done) => { + runExample("sort-manually", done); }); - it('multi-page example', done => { - runExample('multi-page', done); + it("multi-page example", (done) => { + runExample("multi-page", done); }); - it('template-parameters example', done => { - runExample('template-parameters', done); + it("template-parameters example", (done) => { + runExample("template-parameters", done); }); }); diff --git a/spec/hot.spec.js b/spec/hot.spec.js index 2a99be6e..d95130ed 100644 --- a/spec/hot.spec.js +++ b/spec/hot.spec.js @@ -3,223 +3,309 @@ */ /* eslint-env jest */ -'use strict'; +"use strict"; -const path = require('path'); -const fs = require('fs'); -const webpack = require('webpack'); -const rimraf = require('rimraf'); -const WebpackRecompilationSimulator = require('webpack-recompilation-simulator'); -const HtmlWebpackPlugin = require('../index.js'); +const path = require("path"); +const fs = require("fs"); +const webpack = require("webpack"); +const rimraf = require("rimraf"); +const WebpackRecompilationSimulator = require("webpack-recompilation-simulator"); +const HtmlWebpackPlugin = require("../index.js"); -const OUTPUT_DIR = path.join(__dirname, '../dist/caching-spec'); +const OUTPUT_DIR = path.join(__dirname, "../dist/caching-spec"); // The WebpackRecompilationSimulator uses a loader to redirect the file writes to a temp directory. // As this would disable the default loader behaviour by design it has to be run in force mode -const DEFAULT_LOADER = require.resolve('../lib/loader.js') + '?force'; -const DEFAULT_TEMPLATE = DEFAULT_LOADER + '!' + require.resolve('../default_index.ejs'); +const DEFAULT_LOADER = require.resolve("../lib/loader.js") + "?force"; +const DEFAULT_TEMPLATE = + DEFAULT_LOADER + "!" + require.resolve("../default_index.ejs"); jest.setTimeout(30000); -process.on('unhandledRejection', r => console.log(r)); +process.on("unhandledRejection", (r) => console.log(r)); -describe('HtmlWebpackPluginHMR', () => { - beforeEach(done => { +describe("HtmlWebpackPluginHMR", () => { + beforeEach((done) => { rimraf(OUTPUT_DIR, done); }); - it('should not cause errors for the main compilation if hot-reload is active', () => { + it("should not cause errors for the main compilation if hot-reload is active", () => { const config = { - mode: 'development', - entry: path.join(__dirname, 'fixtures/index.js'), + mode: "development", + entry: path.join(__dirname, "fixtures/index.js"), output: { - path: OUTPUT_DIR + path: OUTPUT_DIR, }, plugins: [ new webpack.HotModuleReplacementPlugin(), - new HtmlWebpackPlugin({ template: DEFAULT_TEMPLATE }) - ] + new HtmlWebpackPlugin({ template: DEFAULT_TEMPLATE }), + ], }; const compiler = new WebpackRecompilationSimulator(webpack(config)); - const jsFileTempPath = compiler.addTestFile(path.join(__dirname, 'fixtures/index.js')); - fs.writeFileSync(jsFileTempPath, 'module.exports = function calc(a, b){ return a + b };'); - return compiler.startWatching() - // Change the template file and compile again - .then(() => { - fs.writeFileSync(jsFileTempPath, 'module.exports = function calc(a, b){ return a - b };'); - return compiler.waitForWatchRunComplete(); - }) - .then(stats => { - expect(stats.compilation.errors).toEqual([]); - }) - .then(() => compiler.stopWatching()); + const jsFileTempPath = compiler.addTestFile( + path.join(__dirname, "fixtures/index.js"), + ); + fs.writeFileSync( + jsFileTempPath, + "module.exports = function calc(a, b){ return a + b };", + ); + return ( + compiler + .startWatching() + // Change the template file and compile again + .then(() => { + fs.writeFileSync( + jsFileTempPath, + "module.exports = function calc(a, b){ return a - b };", + ); + return compiler.waitForWatchRunComplete(); + }) + .then((stats) => { + expect(stats.compilation.errors).toEqual([]); + }) + .then(() => compiler.stopWatching()) + ); }); - it('should not cause missing hot-reloaded code of the main compilation', () => { + it("should not cause missing hot-reloaded code of the main compilation", () => { const config = { - mode: 'development', - entry: path.join(__dirname, 'fixtures/index.js'), - target: 'node', + mode: "development", + entry: path.join(__dirname, "fixtures/index.js"), + target: "node", output: { - path: OUTPUT_DIR + path: OUTPUT_DIR, }, plugins: [ new webpack.HotModuleReplacementPlugin(), - new HtmlWebpackPlugin({ template: DEFAULT_TEMPLATE }) - ] + new HtmlWebpackPlugin({ template: DEFAULT_TEMPLATE }), + ], }; const compiler = new WebpackRecompilationSimulator(webpack(config)); - const jsFileTempPath = compiler.addTestFile(path.join(__dirname, 'fixtures/index.js')); - fs.writeFileSync(jsFileTempPath, 'global = 1; module.hot.accept();'); - return compiler.startWatching() - // Change the template file and compile again - .then(() => { - fs.writeFileSync(jsFileTempPath, 'global = 2; module.hot.accept();'); - return compiler.waitForWatchRunComplete(); - }) - .then(stats => { - const hotUpdateJsFileNames = Object.keys(stats.compilation.assets).filter((fileName) => /\.hot-update\.js$/.test(fileName)); - expect(hotUpdateJsFileNames).not.toEqual([]); - expect(hotUpdateJsFileNames.length).toEqual(1); - const hotUpdateFileSize = stats.compilation.assets[hotUpdateJsFileNames[0]].size(); - expect(hotUpdateFileSize).not.toEqual(0); - }) - .then(() => compiler.stopWatching()); + const jsFileTempPath = compiler.addTestFile( + path.join(__dirname, "fixtures/index.js"), + ); + fs.writeFileSync(jsFileTempPath, "global = 1; module.hot.accept();"); + return ( + compiler + .startWatching() + // Change the template file and compile again + .then(() => { + fs.writeFileSync(jsFileTempPath, "global = 2; module.hot.accept();"); + return compiler.waitForWatchRunComplete(); + }) + .then((stats) => { + const hotUpdateJsFileNames = Object.keys( + stats.compilation.assets, + ).filter((fileName) => /\.hot-update\.js$/.test(fileName)); + expect(hotUpdateJsFileNames).not.toEqual([]); + expect(hotUpdateJsFileNames.length).toEqual(1); + const hotUpdateFileSize = + stats.compilation.assets[hotUpdateJsFileNames[0]].size(); + expect(hotUpdateFileSize).not.toEqual(0); + }) + .then(() => compiler.stopWatching()) + ); }); - it('should re-emit favicon and assets from a loader if watch is active', () => { - const template = path.join(__dirname, './fixtures/html-template-with-image.html'); + it("should re-emit favicon and assets from a loader if watch is active", () => { + const template = path.join( + __dirname, + "./fixtures/html-template-with-image.html", + ); const config = { - mode: 'development', - entry: path.join(__dirname, 'fixtures/index.js'), + mode: "development", + entry: path.join(__dirname, "fixtures/index.js"), output: { - assetModuleFilename: '[name][ext]', - path: OUTPUT_DIR + assetModuleFilename: "[name][ext]", + path: OUTPUT_DIR, }, module: { rules: [ { test: /\.html$/, - loader: 'html-loader' - } - ] + loader: "html-loader", + }, + ], }, plugins: [ new HtmlWebpackPlugin({ - favicon: path.join(__dirname, './fixtures/favicon.ico'), - template - }) - ] + favicon: path.join(__dirname, "./fixtures/favicon.ico"), + template, + }), + ], }; - const templateContent = fs.readFileSync(template, 'utf-8'); + const templateContent = fs.readFileSync(template, "utf-8"); const compiler = new WebpackRecompilationSimulator(webpack(config)); - const jsFileTempPath = compiler.addTestFile(path.join(__dirname, 'fixtures/index.js')); - const expected = ['logo.png', 'main.js', 'favicon.ico', 'index.html']; - - return compiler.startWatching() - // Change the template file and compile again - .then((stats) => { - expect(expected.every(val => Object.keys(stats.compilation.assets).includes(val))).toBe(true); - expect(stats.compilation.errors).toEqual([]); - expect(stats.compilation.warnings).toEqual([]); - - fs.writeFileSync(jsFileTempPath, 'module.exports = function calc(a, b){ return a - b };'); - - return compiler.waitForWatchRunComplete(); - }) - .then(stats => { - expect(expected.every(val => Object.keys(stats.compilation.assets).includes(val))).toBe(true); - expect(stats.compilation.errors).toEqual([]); - expect(stats.compilation.warnings).toEqual([]); - - fs.writeFileSync(template, templateContent.replace(/Some unique text/, 'Some other unique text')); - - return compiler.waitForWatchRunComplete(); - }) - .then((stats) => { - expect(expected.every(val => Object.keys(stats.compilation.assets).includes(val))).toBe(true); - expect(stats.compilation.errors).toEqual([]); - expect(stats.compilation.warnings).toEqual([]); - - fs.writeFileSync(template, templateContent); - }) - .then(() => compiler.stopWatching()); + const jsFileTempPath = compiler.addTestFile( + path.join(__dirname, "fixtures/index.js"), + ); + const expected = ["logo.png", "main.js", "favicon.ico", "index.html"]; + + return ( + compiler + .startWatching() + // Change the template file and compile again + .then((stats) => { + expect( + expected.every((val) => + Object.keys(stats.compilation.assets).includes(val), + ), + ).toBe(true); + expect(stats.compilation.errors).toEqual([]); + expect(stats.compilation.warnings).toEqual([]); + + fs.writeFileSync( + jsFileTempPath, + "module.exports = function calc(a, b){ return a - b };", + ); + + return compiler.waitForWatchRunComplete(); + }) + .then((stats) => { + expect( + expected.every((val) => + Object.keys(stats.compilation.assets).includes(val), + ), + ).toBe(true); + expect(stats.compilation.errors).toEqual([]); + expect(stats.compilation.warnings).toEqual([]); + + fs.writeFileSync( + template, + templateContent.replace( + /Some unique text/, + "Some other unique text", + ), + ); + + return compiler.waitForWatchRunComplete(); + }) + .then((stats) => { + expect( + expected.every((val) => + Object.keys(stats.compilation.assets).includes(val), + ), + ).toBe(true); + expect(stats.compilation.errors).toEqual([]); + expect(stats.compilation.warnings).toEqual([]); + + fs.writeFileSync(template, templateContent); + }) + .then(() => compiler.stopWatching()) + ); }); - it('should re-emit favicon and assets from a loader if watch is active and clean enabled', () => { - const expected = ['logo.png', 'main.js', 'favicon.ico', 'index.html']; + it("should re-emit favicon and assets from a loader if watch is active and clean enabled", () => { + const expected = ["logo.png", "main.js", "favicon.ico", "index.html"]; class MyPlugin { - apply (compiler) { - compiler.hooks.thisCompilation.tap({ name: this.constructor.name }, (compilation) => { - return compilation.hooks.processAssets.tap( - { name: this.constructor.name, stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ANALYSE }, - (assets) => { - expect(expected.every(val => Object.keys(assets).includes(val))).toBe(true); - } - ); - }); + apply(compiler) { + compiler.hooks.thisCompilation.tap( + { name: this.constructor.name }, + (compilation) => { + return compilation.hooks.processAssets.tap( + { + name: this.constructor.name, + stage: webpack.Compilation.PROCESS_ASSETS_STAGE_ANALYSE, + }, + (assets) => { + expect( + expected.every((val) => Object.keys(assets).includes(val)), + ).toBe(true); + }, + ); + }, + ); } } - const template = path.join(__dirname, './fixtures/html-template-with-image.html'); + const template = path.join( + __dirname, + "./fixtures/html-template-with-image.html", + ); const config = { - mode: 'development', - entry: path.join(__dirname, 'fixtures/index.js'), + mode: "development", + entry: path.join(__dirname, "fixtures/index.js"), output: { clean: true, - assetModuleFilename: '[name][ext]', - path: OUTPUT_DIR + assetModuleFilename: "[name][ext]", + path: OUTPUT_DIR, }, module: { rules: [ { test: /\.html$/, - loader: 'html-loader' - } - ] + loader: "html-loader", + }, + ], }, plugins: [ new HtmlWebpackPlugin({ - favicon: path.join(__dirname, './fixtures/favicon.ico'), - template + favicon: path.join(__dirname, "./fixtures/favicon.ico"), + template, }), - new MyPlugin() - ] + new MyPlugin(), + ], }; - const templateContent = fs.readFileSync(template, 'utf-8'); + const templateContent = fs.readFileSync(template, "utf-8"); const compiler = new WebpackRecompilationSimulator(webpack(config)); - const jsFileTempPath = compiler.addTestFile(path.join(__dirname, 'fixtures/index.js')); - - return compiler.startWatching() - // Change the template file and compile again - .then((stats) => { - expect(expected.every(val => Object.keys(stats.compilation.assets).includes(val))).toBe(true); - expect(stats.compilation.errors).toEqual([]); - expect(stats.compilation.warnings).toEqual([]); - - fs.writeFileSync(jsFileTempPath, 'module.exports = function calc(a, b){ return a - b };'); - - return compiler.waitForWatchRunComplete(); - }) - .then(stats => { - expect(expected.every(val => Object.keys(stats.compilation.assets).includes(val))).toBe(true); - expect(stats.compilation.errors).toEqual([]); - expect(stats.compilation.warnings).toEqual([]); - - fs.writeFileSync(template, templateContent.replace(/Some unique text/, 'Some other unique text')); - - return compiler.waitForWatchRunComplete(); - }) - .then((stats) => { - expect(expected.every(val => Object.keys(stats.compilation.assets).includes(val))).toBe(true); - expect(stats.compilation.errors).toEqual([]); - expect(stats.compilation.warnings).toEqual([]); - - fs.writeFileSync(template, templateContent); - }) - .then(() => compiler.stopWatching()); + const jsFileTempPath = compiler.addTestFile( + path.join(__dirname, "fixtures/index.js"), + ); + + return ( + compiler + .startWatching() + // Change the template file and compile again + .then((stats) => { + expect( + expected.every((val) => + Object.keys(stats.compilation.assets).includes(val), + ), + ).toBe(true); + expect(stats.compilation.errors).toEqual([]); + expect(stats.compilation.warnings).toEqual([]); + + fs.writeFileSync( + jsFileTempPath, + "module.exports = function calc(a, b){ return a - b };", + ); + + return compiler.waitForWatchRunComplete(); + }) + .then((stats) => { + expect( + expected.every((val) => + Object.keys(stats.compilation.assets).includes(val), + ), + ).toBe(true); + expect(stats.compilation.errors).toEqual([]); + expect(stats.compilation.warnings).toEqual([]); + + fs.writeFileSync( + template, + templateContent.replace( + /Some unique text/, + "Some other unique text", + ), + ); + + return compiler.waitForWatchRunComplete(); + }) + .then((stats) => { + expect( + expected.every((val) => + Object.keys(stats.compilation.assets).includes(val), + ), + ).toBe(true); + expect(stats.compilation.errors).toEqual([]); + expect(stats.compilation.warnings).toEqual([]); + + fs.writeFileSync(template, templateContent); + }) + .then(() => compiler.stopWatching()) + ); }); }); diff --git a/tsconfig.json b/tsconfig.json index 7d22c001..7100877d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,14 @@ { "compilerOptions": { /* Basic Options */ - "allowJs": true, /* Allow javascript files to be compiled. */ - "checkJs": true, /* Report errors in .js files. */ - "noEmit": true, /* Do not emit outputs. */ + "allowJs": true /* Allow javascript files to be compiled. */, + "checkJs": true /* Report errors in .js files. */, + "noEmit": true /* Do not emit outputs. */, "lib": ["es2017"], /* Strict Type-Checking Options */ - "strict": true, /* Enable all strict type-checking options. */ - "noImplicitAny": false, /* Raise error on expressions and declarations with an implied 'any' type. */ + "strict": true /* Enable all strict type-checking options. */, + "noImplicitAny": false /* Raise error on expressions and declarations with an implied 'any' type. */, // "strictNullChecks": true, /* Enable strict null checks. */ // "strictFunctionTypes": true, /* Enable strict checking of function types. */ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ @@ -22,19 +22,13 @@ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ /* Module Resolution Options */ - "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ - "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */, + "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */, + "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */, "resolveJsonModule": true, "skipLibCheck": true, "useUnknownInCatchVariables": false }, "types": ["node"], - "exclude": [ - "node_modules", - "spec", - "examples", - "dist", - "coverage" - ] + "exclude": ["node_modules", "spec", "examples", "dist", "coverage"] } diff --git a/typings.d.ts b/typings.d.ts index 5de022b5..d6b2068d 100644 --- a/typings.d.ts +++ b/typings.d.ts @@ -28,7 +28,7 @@ declare class HtmlWebpackPlugin { static createHtmlTagObject( tagName: string, attributes?: { [attributeName: string]: string | boolean }, - innerHTML?: string + innerHTML?: string, ): HtmlWebpackPlugin.HtmlTagObject; static readonly version: number; @@ -113,8 +113,8 @@ declare namespace HtmlWebpackPlugin { }; /** * HTML Minification options accepts the following values: - * - Set to `false` to disable minifcation - * - Set to `'auto'` to enable minifcation only for production mode + * - Set to `false` to disable minification + * - Set to `'auto'` to enable minification only for production mode * - Set to custom minification according to * {@link https://github.com/kangax/html-minifier#options-quick-reference} */ @@ -156,7 +156,7 @@ declare namespace HtmlWebpackPlugin { headTags: HtmlTagObject[]; bodyTags: HtmlTagObject[]; }, - options: ProcessedOptions + options: ProcessedOptions, ) => { [option: string]: any } | Promise<{ [option: string]: any }>) | { [option: string]: any }; /** @@ -212,7 +212,7 @@ declare namespace HtmlWebpackPlugin { styles: HtmlTagObject[]; meta: HtmlTagObject[]; }; - publicPath: string, + publicPath: string; outputName: string; plugin: HtmlWebpackPlugin; }>; @@ -221,7 +221,7 @@ declare namespace HtmlWebpackPlugin { headTags: HtmlTagObject[]; bodyTags: HtmlTagObject[]; outputName: string; - publicPath: string, + publicPath: string; plugin: HtmlWebpackPlugin; }>; @@ -286,7 +286,7 @@ declare namespace HtmlWebpackPlugin { * E.g. `{'plugin': 'html-webpack-plugin'}` */ meta: { - plugin?: string, + plugin?: string; [metaAttributeName: string]: any; }; }