From 1982b03b364fbd1a4bdc2b1ee814ee5caf6a1559 Mon Sep 17 00:00:00 2001 From: Mike Bland Date: Wed, 17 Jan 2024 16:56:45 -0500 Subject: [PATCH] Bump to v1.0.1, add docs, use tsc+tsconfig.json Greatly expanded the README documentation and updated some of the JSDoc comments. Had to adjust a couple of JSDoc @type casts as well with regard to Handlebars.CompileOptions and Handlebars.PrecompileOptions. Also switched from jsconfig.json to tsconfig.json, as it seems better supported out of the box. Adjusted `pnpm typecheck` to reflect this as well. Bumped vitest to v1.2.0. --- README.md | 218 ++++++++++++- lib/index.js | 5 +- lib/template.d.ts | 9 +- lib/types.js | 20 +- package.json | 29 +- pnpm-lock.yaml | 543 ++++++++++++++++++++----------- test/large/components/app.js | 1 - test/large/components/helpers.js | 2 +- test/plugin-impl.test.js | 7 +- test/vitest.d.ts | 4 +- jsconfig.json => tsconfig.json | 12 +- 11 files changed, 608 insertions(+), 242 deletions(-) rename jsconfig.json => tsconfig.json (54%) diff --git a/README.md b/README.md index cdd8d0f..29ce259 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ [Rollup][] plugin to precompile [Handlebars][] templates into [JavaScript modules][] -_**Note**: I still need to add more documentation, but the plugin is fully -functional and tested._ +_**Note**: I still need to add a little bit more documentation, but the plugin +is fully functional and tested._ Source: @@ -15,23 +15,32 @@ Source: ## Installation -Add this package to your project's `devDependencies`, e.g., using [pnpm][]: +Add both this package and Handlebars to your project's `devDependencies`, e.g., +using [pnpm][]: ```sh -pnpm add -D rollup-plugin-handlebars-precompiler +pnpm add -D handlebars rollup-plugin-handlebars-precompiler ``` +Even though `handlebars` is a production dependency of this plugin, your project +needs to install it directly. The JavaScript modules generated by this plugin +need to access the Handlebars runtime at +`node_modules/handlebars/lib/handlebars.runtime.js` and have it bundled into +your own project. + ## Features - Generates JavaScript/ECMAScript/ES6 modules (ESM) only. - [Modules are supported by all current browsers][esm-caniuse]. - [Modules are supported by all currently supported versions of Node.js][esm-node]. +- Supports TypeScript type checking, including [Visual Studio Code JavaScript + type checking][] and [IntelliJ IDEA/WebStorm JavaScript type checking][]. - Client code imports template files directly, as though they were JavaScript modules to begin with, as modules generated by this plugin will: - Import the Handlebars runtime - Import Handlebars helper files specified in the plugin configuration - - Automatically detect and register partials and automatically import them + - Automatically detect and register [partials][] and automatically import them where needed - Provides a convenient syntax for both accessing individual top-level child nodes and adding the entire template to the DOM at once. @@ -43,12 +52,185 @@ pnpm add -D rollup-plugin-handlebars-precompiler Each generated Handlebars template module exports two functions: -- `RawTemplate()` emits the raw string from applying a Handlebars template. -- The default export emits a [DocumentFragment][] created from the result of - `RawTemplate()`. +- `RawTemplate()` emits the raw HTML string generated by applying a Handlebars + template. +- The default export, conventionally imported as `Template()`, emits a + [DocumentFragment][] created from the result of `RawTemplate()`. + +This provides you with two options of using a given template: + +```js +import Template, { RawTemplate } from './component.hbs' + +const appElem = document.querySelector('#app') +const context = { + message: 'Hello, World!', + url: 'https://en.wikipedia.org/wiki/%22Hello,_World!%22_program' +} +const compilerOpts = {} + +// Use the DocumentFragment to append the entire template to a DOM Node at once. +// You can also extract individual element references from .children before +// doing so. +const tmpl = Template(context) +const [ firstChild, secondChild ] = tmpl.children +appElem.appendChild(tmpl) + +// Use the RawTemplate() string to render the template manually. +const newElem = document.createElement('div') +newElem.innerHTML = RawTemplate(context) +appElem.appendChild(newElem) +``` + +Both `Template()` and `RawTemplate()` take an optional [Handlebars runtime +options][] argument: + +```js +const runtimeOpts = { data: { '@foo': 'bar' } } +const tmpl = Template(context, runtimeOpts) +``` + +### Automatic helper and partial module imports + +The plugin configuration, described below, specifies which project files contain +[custom helper function modules][custom-helpers] and [partial templates][partials]. + +These custom helper modules, and modules generated for explicitly used partials, +are automatically imported by any generated modules that need them. There's no +need to import them explicitly in any other code. + +### Dynamic partials supported, but not automatically imported + +Any code using a template that contains [dynamic partials][] will need to import +the generated modules for those partials directly. However, those generated +modules will automatically register any imported partials via +`Handlebars.registerPartial()`. + +### TypeScript or TypeScript-based JavaScript type checking + +To enable TypeScript type checking, copy +[lib/template.d.ts](./lib/template.d.ts) from this package into your project: + +```sh +cp node_modules/rollup-plugin-handlebars-precompiler/lib/template.d.ts . +``` + +This is an [ambient module][] defining the types exported from each generated +module. Edit the contents to replace `.hbs` with your project's Handlebars +template file extension if necessary. If you want, you can change the file name +and locate it anywhere in your project that you wish (that TypeScript will find +it). + +This is necessary because the precompiled modules are generated in _your_ +project, not in `rollup-plugin-handlebars-precompiler`, so that's where +TypeScript needs to find the type declarations. + +### Configuration + +The function exported by this plugin takes a configuration object as an +argument. For example, in a [vite.config.js][] configuration file: + +```js +import HandlebarsPrecompiler from 'rollup-plugin-handlebars-precompiler' +import { defineConfig } from 'vite' + +export default defineConfig({ + plugins: [ + HandlebarsPrecompiler({ + helpers: ['components/helpers.js'] + }) + ] +}) +``` + +All of the configuration parameters are optional: + +- **helpers** _(string[])_: paths to modules containing [custom Handlebars + helper functions][custom-helpers] + +- **include** _(string | string[])_: one or more [picomatch patterns][] matching + Handlebars template files to transform + - _Default_: `['**/*.hbs', '**/*.handlebars', '**/*.mustache']` + +- **exclude** _(string | string[])_: one or more [picomatch patterns][] matching Handlebars + template files to exclude from transformation + - _Default_: `'node_modules/**'` + +- **partials** _(string | string[])_: one or more [picomatch patterns][] + matching Handlebars template files containing partials + - _Default_: `'**/_*'` + +- **partialName** _((string) => string)_: function to transform a partial file + name into the name used to apply the partial in other templates + - _Default_: + 1. Extracts the basename + 2. Removes the file extension, if present + 3. Strips leading non-alphanumeric characters + - _Example_: `components/_my_partial.hbs` yields `my_partial` + +- **partialPath** _((string, string) => string)_: function to transform a + partial's name and that of the module importing it into its import path + - _Default_: + 1. Expects a partial to reside in the same directory as another Handlebars + template that uses it + 2. Adds `./_` prefix to the partial name + 3. Adds the file extension of the module importing it + - _Example_: (`my_partial`, `components/other_template.hbs`) yields + `./_my_partial.hbs` + +- **compiler** _(Handlebars.PrecompileOptions)_: [Handlebars compiler options][] + passed through to `Handlebars.parse()` and `Handlebars.precompile()` + +- **sourcemap** or **sourceMap** _(boolean)_: disables source map generation when false + +As for why both **sourcemap** and **sourceMap** are supported, it's because: + +- [Rollup - Plugin Development - Source Code Transformations][] specifies that + source maps can be disabled via `sourceMap: false`. +- [Rollup - Troubleshooting - Warning: "Sourcemap is likely to be incorrect"][] + specifies that source maps can be disabled via `sourcemap: false`. + +### Defining helper modules + +Modules specified by the configuration as containing [custom +helpers][custom-helpers] should export a default function that takes the +[Handlebars runtime object][runtime] as an argument. It should then call +[Handlebars.registerHelper()][] or any other runtime functions as needed. + +Here's an example from [test/large/components/helpers.js][], adapted from +[Handlebars - Expressions - Helpers with Hash Arguments][]: + +```js +export default function(Handlebars) { + const linkHelper = function(text, options) { + const attrs = Object.keys(options.hash).map(key => { + return `${Handlebars.escapeExpression(key)}=` + + `"${Handlebars.escapeExpression(options.hash[key])}"` + }) + return new Handlebars.SafeString( + `${Handlebars.escapeExpression(text)}` + ) + } + Handlebars.registerHelper('link', linkHelper) +} +``` + +### Defining a partial template discovery schema + +Partials are first identified as Handlebars templates via the **include** +configuration option. Then the **partials**, **partialName**, and +**partialPath** options define a schema used to identify partial template files, +register them with the Handlebars runtime, and generate imports. + +The default behavior: + +- considers any Handlebars file name starting with `_` to contain a partial +- expects a partial to reside in the same directory as the template that uses it +- expects the partial to use the same Handlebars file extension as the template + that includes it -Most of the time, you'll want to use the default export, imported as -`Template()` by convention. +If you choose to use a different schema for organizing partials, make sure to +update any of these configuration options as necessary. ## Development @@ -126,9 +308,25 @@ level explanation. [npm-rphp]: https://www.npmjs.com/package/rollup-plugin-handlebars-precompiler [Handlebars source maps]: https://handlebarsjs.com/api-reference/compilation.html#handlebars-precompile-template-options [DocumentFragment]: https://developer.mozilla.org/en-US/docs/Web/API/DocumentFragment +[Handlebars runtime options]: https://handlebarsjs.com/api-reference/runtime-options.html +[custom-helpers]: https://handlebarsjs.com/guide/#custom-helpers +[ambient module]: https://www.typescriptlang.org/docs/handbook/modules/reference.html#ambient-modules +[runtime]: https://handlebarsjs.com/api-reference/runtime.html +[Handlebars.registerHelper()]: https://handlebarsjs.com/api-reference/runtime.html#handlebars-registerhelper-name-helper +[test/large/components/helpers.js]: ./test/large/components/helpers.js +[Handlebars - Expressions - Helpers with Hash Arguments]: https://handlebarsjs.com/guide/expressions.html#helpers-with-hash-arguments [pnpm]: https://pnpm.io/ [esm-caniuse]: https://caniuse.com/es6-module [esm-node]: https://nodejs.org/docs/latest-v18.x/api/esm.html +[Visual Studio Code JavaScript type checking]: https://code.visualstudio.com/docs/nodejs/working-with-javascript +[IntelliJ IDEA/WebStorm JavaScript type checking]: https://blog.jetbrains.com/webstorm/2019/09/using-typescript-to-check-your-javascript-code/ +[partials]: https://handlebarsjs.com/guide/partials.html +[dynamic partials]: https://handlebarsjs.com/guide/partials.html#dynamic-partials +[vite.config.js]: https://vitejs.dev/config/ +[picomatch patterns]: https://github.com/micromatch/picomatch#globbing-features +[Handlebars compiler options]: https://handlebarsjs.com/api-reference/compilation.html +[Rollup - Plugin Development - Source Code Transformations]: https://rollupjs.org/plugin-development/#source-code-transformations +[Rollup - Troubleshooting - Warning: "Sourcemap is likely to be incorrect"]: https://rollupjs.org/troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect [Vitest]: https://vitest.dev/ [GitHub Actions]: https://docs.github.com/actions [mbland/tomcat-servlet-testing-example]: https://github.com/mbland/tomcat-servlet-testing-example diff --git a/lib/index.js b/lib/index.js index a46f447..d1ae660 100644 --- a/lib/index.js +++ b/lib/index.js @@ -111,7 +111,10 @@ export default class PluginImpl { this.#partialName = options.partialName || DEFAULT_PARTIAL_NAME this.#partialPath = options.partialPath || DEFAULT_PARTIAL_PATH - const compilerOpts = { ...options.compiler } + // options.compiler is of type CompileOptions to encourage users that have + // type checking enabled not to include srcName and destName from + // PrecompileOptions. We still take defensive measures here. + const compilerOpts = /** @type {PrecompileOptions} */({...options.compiler}) delete compilerOpts.srcName delete compilerOpts.destName this.#compilerOpts = (id) => ({ srcName: id, ...compilerOpts }) diff --git a/lib/template.d.ts b/lib/template.d.ts index c9fef53..f1f3d6a 100644 --- a/lib/template.d.ts +++ b/lib/template.d.ts @@ -5,7 +5,10 @@ */ declare module "*.hbs" { - export const RawTemplate: HandlebarsTemplateDelegate - export default function (context: any, options?: RuntimeOptions): - DocumentFragment + export const RawTemplate: Handlebars.TemplateDelegate + export interface TemplateRenderer { + (context: any, options?: Handlebars.RuntimeOptions): DocumentFragment + } + const Template: TemplateRenderer + export default Template } diff --git a/lib/types.js b/lib/types.js index 83c5034..2f5b53e 100644 --- a/lib/types.js +++ b/lib/types.js @@ -59,22 +59,24 @@ export let PartialPath /** * @typedef {object} PluginOptions - * @property {string[]} [helpers] - an array of file paths to modules containing - * Handlebars helper functions - * @property {(string | string[])} [include] - one or more patterns matching - * Handlebars template files to transform - * @property {(string | string[])} [exclude] - one or more patterns matching - * Handlebars template files to exclude from transformation - * @property {(string | string[])} [partials] - one or more patterns matching - * Handlebars template files containing partials + * @property {string[]} [helpers] - paths to modules containing Handlebars + * helper functions + * @property {(string | string[])} [include] - one or more picomatch patterns + * matching Handlebars template files to transform + * @property {(string | string[])} [exclude] - one or more picomatch patterns + * matching Handlebars template files to exclude from transformation + * @property {(string | string[])} [partials] - one or more picomatch patterns + * matching Handlebars template files containing partials * @property {PartialName} [partialName] - function to transform a partial file * name into the name used to apply the partial in other templates * @property {PartialPath} [partialPath] - function to transform a partial's * name and that of the module importing it into its import path - * @property {PrecompileOptions} [compiler] - Handlebars compiler options passed + * @property {CompileOptions} [compiler] - Handlebars compiler options passed * through to Handlebars.parse() and Handlebars.precompile() * @property {boolean} [sourcemap] - disables source map generation when false * @property {boolean} [sourceMap] - disables source map generation when false + * @see https://handlebarsjs.com/guide/#custom-helpers + * @see https://github.com/micromatch/picomatch#globbing-features * @see https://handlebarsjs.com/api-reference/compilation.html */ /** @type {PluginOptions} */ diff --git a/package.json b/package.json index f0d23f0..2ce0dda 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rollup-plugin-handlebars-precompiler", - "version": "1.0.0", + "version": "1.0.1", "description": "Rollup plugin to precompile Handlebars templates into JavaScript modules", "main": "index.js", "types": "types/index.d.ts", @@ -9,13 +9,12 @@ "test": "vitest", "test:ci": "pnpm lint && pnpm typecheck && pnpm jsdoc && vitest run -c ci/vitest.config.js", "jsdoc": "jsdoc-cli-wrapper -c jsdoc.json .", - "typecheck": "npx -p typescript tsc -p jsconfig.json --noEmit --pretty", - "prepack": "npx -p typescript tsc ./index.js --allowJs --declaration --declarationMap --emitDeclarationOnly --outDir types" + "typecheck": "npx tsc", + "prepack": "npx rimraf types && npx tsc ./index.js --allowJs --declaration --declarationMap --emitDeclarationOnly --outDir types" }, "files": [ - "index.js", - "lib/*", - "types/*" + "lib/**", + "types/**" ], "keywords": [ "rollup", @@ -33,22 +32,22 @@ "bugs": "https://github.com/mbland/rollup-plugin-handlebars-precompiler/issues", "devDependencies": { "@stylistic/eslint-plugin-js": "^1.5.3", - "@types/chai": "^4.3.11", - "@types/node": "^20.10.8", - "@vitest/coverage-istanbul": "^1.1.3", - "@vitest/coverage-v8": "^1.1.3", - "@vitest/ui": "^1.1.3", + "@types/node": "^20.11.4", + "@vitest/coverage-istanbul": "^1.2.0", + "@vitest/coverage-v8": "^1.2.0", + "@vitest/ui": "^1.2.0", "eslint": "^8.56.0", "eslint-plugin-jsdoc": "^46.10.1", "eslint-plugin-vitest": "^0.3.20", "jsdoc": "^4.0.2", - "jsdoc-cli-wrapper": "^1.0.4", + "jsdoc-cli-wrapper": "^1.0.6", "jsdoc-plugin-typescript": "^2.2.1", "jsdom": "^23.2.0", - "rollup": "^4.9.4", - "test-page-opener": "^1.0.5", + "rimraf": "^5.0.5", + "rollup": "^4.9.5", + "test-page-opener": "^1.0.6", "typescript": "^5.3.3", - "vitest": "^1.1.3" + "vitest": "^1.2.0" }, "dependencies": { "@rollup/pluginutils": "^5.1.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7241b99..91534fc 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,7 +7,7 @@ settings: dependencies: '@rollup/pluginutils': specifier: ^5.1.0 - version: 5.1.0(rollup@4.9.4) + version: 5.1.0(rollup@4.9.5) handlebars: specifier: ^4.7.8 version: 4.7.8 @@ -16,21 +16,18 @@ devDependencies: '@stylistic/eslint-plugin-js': specifier: ^1.5.3 version: 1.5.3(eslint@8.56.0) - '@types/chai': - specifier: ^4.3.11 - version: 4.3.11 '@types/node': - specifier: ^20.10.8 - version: 20.10.8 + specifier: ^20.11.4 + version: 20.11.4 '@vitest/coverage-istanbul': - specifier: ^1.1.3 - version: 1.1.3(vitest@1.1.3) + specifier: ^1.2.0 + version: 1.2.0(vitest@1.2.0) '@vitest/coverage-v8': - specifier: ^1.1.3 - version: 1.1.3(vitest@1.1.3) + specifier: ^1.2.0 + version: 1.2.0(vitest@1.2.0) '@vitest/ui': - specifier: ^1.1.3 - version: 1.1.3(vitest@1.1.3) + specifier: ^1.2.0 + version: 1.2.0(vitest@1.2.0) eslint: specifier: ^8.56.0 version: 8.56.0 @@ -39,31 +36,34 @@ devDependencies: version: 46.10.1(eslint@8.56.0) eslint-plugin-vitest: specifier: ^0.3.20 - version: 0.3.20(eslint@8.56.0)(typescript@5.3.3)(vitest@1.1.3) + version: 0.3.20(eslint@8.56.0)(typescript@5.3.3)(vitest@1.2.0) jsdoc: specifier: ^4.0.2 version: 4.0.2 jsdoc-cli-wrapper: - specifier: ^1.0.4 - version: 1.0.4 + specifier: ^1.0.6 + version: 1.0.6 jsdoc-plugin-typescript: specifier: ^2.2.1 version: 2.2.1 jsdom: specifier: ^23.2.0 version: 23.2.0 + rimraf: + specifier: ^5.0.5 + version: 5.0.5 rollup: - specifier: ^4.9.4 - version: 4.9.4 + specifier: ^4.9.5 + version: 4.9.5 test-page-opener: - specifier: ^1.0.5 - version: 1.0.5 + specifier: ^1.0.6 + version: 1.0.6 typescript: specifier: ^5.3.3 version: 5.3.3 vitest: - specifier: ^1.1.3 - version: 1.1.3(@types/node@20.10.8)(@vitest/ui@1.1.3)(jsdom@23.2.0) + specifier: ^1.2.0 + version: 1.2.0(@types/node@20.11.4)(@vitest/ui@1.2.0)(jsdom@23.2.0) packages: @@ -77,11 +77,11 @@ packages: engines: {node: '>=6.0.0'} dependencies: '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.21 dev: true - /@asamuzakjp/dom-selector@2.0.1: - resolution: {integrity: sha512-QJAJffmCiymkv6YyQ7voyQb5caCth6jzZsQncYCpHXrJ7RqdYG5y43+is8mnFcYubdOkr7cn1+na9BdFMxqw7w==} + /@asamuzakjp/dom-selector@2.0.2: + resolution: {integrity: sha512-x1KXOatwofR6ZAYzXRBL5wrdV0vwNxlTCK9NCuLqAzQYARqGcvFwiJA6A1ERuh+dgeA4Dxm3JBYictIes+SqUQ==} dependencies: bidi-js: 1.0.3 css-tree: 2.3.1 @@ -110,7 +110,7 @@ packages: '@babel/generator': 7.23.6 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.7) - '@babel/helpers': 7.23.7 + '@babel/helpers': 7.23.8 '@babel/parser': 7.23.6 '@babel/template': 7.22.15 '@babel/traverse': 7.23.7 @@ -130,7 +130,7 @@ packages: dependencies: '@babel/types': 7.23.6 '@jridgewell/gen-mapping': 0.3.3 - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.21 jsesc: 2.5.2 dev: true @@ -215,8 +215,8 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helpers@7.23.7: - resolution: {integrity: sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==} + /@babel/helpers@7.23.8: + resolution: {integrity: sha512-KDqYz4PiOWvDFrdHLPhKtCThtIcKVy6avWD2oG4GEvyQ+XDZwHD4YQd+H2vNMnq2rkdxsDkU82T+Vk8U/WXHRQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 @@ -536,11 +536,11 @@ packages: engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dev: true - /@humanwhocodes/config-array@0.11.13: - resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} + /@humanwhocodes/config-array@0.11.14: + resolution: {integrity: sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==} engines: {node: '>=10.10.0'} dependencies: - '@humanwhocodes/object-schema': 2.0.1 + '@humanwhocodes/object-schema': 2.0.2 debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: @@ -552,8 +552,20 @@ packages: engines: {node: '>=12.22'} dev: true - /@humanwhocodes/object-schema@2.0.1: - resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} + /@humanwhocodes/object-schema@2.0.2: + resolution: {integrity: sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==} + dev: true + + /@isaacs/cliui@8.0.2: + resolution: {integrity: sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==} + engines: {node: '>=12'} + dependencies: + string-width: 5.1.2 + string-width-cjs: /string-width@4.2.3 + strip-ansi: 7.1.0 + strip-ansi-cjs: /strip-ansi@6.0.1 + wrap-ansi: 8.1.0 + wrap-ansi-cjs: /wrap-ansi@7.0.0 dev: true /@istanbuljs/schema@0.1.3: @@ -574,7 +586,7 @@ packages: dependencies: '@jridgewell/set-array': 1.1.2 '@jridgewell/sourcemap-codec': 1.4.15 - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.21 dev: true /@jridgewell/resolve-uri@3.1.1: @@ -591,8 +603,8 @@ packages: resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} dev: true - /@jridgewell/trace-mapping@0.3.20: - resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} + /@jridgewell/trace-mapping@0.3.21: + resolution: {integrity: sha512-SRfKmRe1KvYnxjEMtxEr+J4HIeMX5YBg/qhRHpxEIGjhX1rshcHlnFUE9K0GazhVKWM7B+nARSkV8LuvJdJ5/g==} dependencies: '@jridgewell/resolve-uri': 3.1.1 '@jridgewell/sourcemap-codec': 1.4.15 @@ -626,11 +638,18 @@ packages: fastq: 1.16.0 dev: true + /@pkgjs/parseargs@0.11.0: + resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} + engines: {node: '>=14'} + requiresBuild: true + dev: true + optional: true + /@polka/url@1.0.0-next.24: resolution: {integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==} dev: true - /@rollup/pluginutils@5.1.0(rollup@4.9.4): + /@rollup/pluginutils@5.1.0(rollup@4.9.5): resolution: {integrity: sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==} engines: {node: '>=14.0.0'} peerDependencies: @@ -642,95 +661,95 @@ packages: '@types/estree': 1.0.5 estree-walker: 2.0.2 picomatch: 2.3.1 - rollup: 4.9.4 + rollup: 4.9.5 dev: false - /@rollup/rollup-android-arm-eabi@4.9.4: - resolution: {integrity: sha512-ub/SN3yWqIv5CWiAZPHVS1DloyZsJbtXmX4HxUTIpS0BHm9pW5iYBo2mIZi+hE3AeiTzHz33blwSnhdUo+9NpA==} + /@rollup/rollup-android-arm-eabi@4.9.5: + resolution: {integrity: sha512-idWaG8xeSRCfRq9KpRysDHJ/rEHBEXcHuJ82XY0yYFIWnLMjZv9vF/7DOq8djQ2n3Lk6+3qfSH8AqlmHlmi1MA==} cpu: [arm] os: [android] requiresBuild: true optional: true - /@rollup/rollup-android-arm64@4.9.4: - resolution: {integrity: sha512-ehcBrOR5XTl0W0t2WxfTyHCR/3Cq2jfb+I4W+Ch8Y9b5G+vbAecVv0Fx/J1QKktOrgUYsIKxWAKgIpvw56IFNA==} + /@rollup/rollup-android-arm64@4.9.5: + resolution: {integrity: sha512-f14d7uhAMtsCGjAYwZGv6TwuS3IFaM4ZnGMUn3aCBgkcHAYErhV1Ad97WzBvS2o0aaDv4mVz+syiN0ElMyfBPg==} cpu: [arm64] os: [android] requiresBuild: true optional: true - /@rollup/rollup-darwin-arm64@4.9.4: - resolution: {integrity: sha512-1fzh1lWExwSTWy8vJPnNbNM02WZDS8AW3McEOb7wW+nPChLKf3WG2aG7fhaUmfX5FKw9zhsF5+MBwArGyNM7NA==} + /@rollup/rollup-darwin-arm64@4.9.5: + resolution: {integrity: sha512-ndoXeLx455FffL68OIUrVr89Xu1WLzAG4n65R8roDlCoYiQcGGg6MALvs2Ap9zs7AHg8mpHtMpwC8jBBjZrT/w==} cpu: [arm64] os: [darwin] requiresBuild: true optional: true - /@rollup/rollup-darwin-x64@4.9.4: - resolution: {integrity: sha512-Gc6cukkF38RcYQ6uPdiXi70JB0f29CwcQ7+r4QpfNpQFVHXRd0DfWFidoGxjSx1DwOETM97JPz1RXL5ISSB0pA==} + /@rollup/rollup-darwin-x64@4.9.5: + resolution: {integrity: sha512-UmElV1OY2m/1KEEqTlIjieKfVwRg0Zwg4PLgNf0s3glAHXBN99KLpw5A5lrSYCa1Kp63czTpVll2MAqbZYIHoA==} cpu: [x64] os: [darwin] requiresBuild: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.9.4: - resolution: {integrity: sha512-g21RTeFzoTl8GxosHbnQZ0/JkuFIB13C3T7Y0HtKzOXmoHhewLbVTFBQZu+z5m9STH6FZ7L/oPgU4Nm5ErN2fw==} + /@rollup/rollup-linux-arm-gnueabihf@4.9.5: + resolution: {integrity: sha512-Q0LcU61v92tQB6ae+udZvOyZ0wfpGojtAKrrpAaIqmJ7+psq4cMIhT/9lfV6UQIpeItnq/2QDROhNLo00lOD1g==} cpu: [arm] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.9.4: - resolution: {integrity: sha512-TVYVWD/SYwWzGGnbfTkrNpdE4HON46orgMNHCivlXmlsSGQOx/OHHYiQcMIOx38/GWgwr/po2LBn7wypkWw/Mg==} + /@rollup/rollup-linux-arm64-gnu@4.9.5: + resolution: {integrity: sha512-dkRscpM+RrR2Ee3eOQmRWFjmV/payHEOrjyq1VZegRUa5OrZJ2MAxBNs05bZuY0YCtpqETDy1Ix4i/hRqX98cA==} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-arm64-musl@4.9.4: - resolution: {integrity: sha512-XcKvuendwizYYhFxpvQ3xVpzje2HHImzg33wL9zvxtj77HvPStbSGI9czrdbfrf8DGMcNNReH9pVZv8qejAQ5A==} + /@rollup/rollup-linux-arm64-musl@4.9.5: + resolution: {integrity: sha512-QaKFVOzzST2xzY4MAmiDmURagWLFh+zZtttuEnuNn19AiZ0T3fhPyjPPGwLNdiDT82ZE91hnfJsUiDwF9DClIQ==} cpu: [arm64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.9.4: - resolution: {integrity: sha512-LFHS/8Q+I9YA0yVETyjonMJ3UA+DczeBd/MqNEzsGSTdNvSJa1OJZcSH8GiXLvcizgp9AlHs2walqRcqzjOi3A==} + /@rollup/rollup-linux-riscv64-gnu@4.9.5: + resolution: {integrity: sha512-HeGqmRJuyVg6/X6MpE2ur7GbymBPS8Np0S/vQFHDmocfORT+Zt76qu+69NUoxXzGqVP1pzaY6QIi0FJWLC3OPA==} cpu: [riscv64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-x64-gnu@4.9.4: - resolution: {integrity: sha512-dIYgo+j1+yfy81i0YVU5KnQrIJZE8ERomx17ReU4GREjGtDW4X+nvkBak2xAUpyqLs4eleDSj3RrV72fQos7zw==} + /@rollup/rollup-linux-x64-gnu@4.9.5: + resolution: {integrity: sha512-Dq1bqBdLaZ1Gb/l2e5/+o3B18+8TI9ANlA1SkejZqDgdU/jK/ThYaMPMJpVMMXy2uRHvGKbkz9vheVGdq3cJfA==} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-linux-x64-musl@4.9.4: - resolution: {integrity: sha512-RoaYxjdHQ5TPjaPrLsfKqR3pakMr3JGqZ+jZM0zP2IkDtsGa4CqYaWSfQmZVgFUCgLrTnzX+cnHS3nfl+kB6ZQ==} + /@rollup/rollup-linux-x64-musl@4.9.5: + resolution: {integrity: sha512-ezyFUOwldYpj7AbkwyW9AJ203peub81CaAIVvckdkyH8EvhEIoKzaMFJj0G4qYJ5sw3BpqhFrsCc30t54HV8vg==} cpu: [x64] os: [linux] requiresBuild: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.9.4: - resolution: {integrity: sha512-T8Q3XHV+Jjf5e49B4EAaLKV74BbX7/qYBRQ8Wop/+TyyU0k+vSjiLVSHNWdVd1goMjZcbhDmYZUYW5RFqkBNHQ==} + /@rollup/rollup-win32-arm64-msvc@4.9.5: + resolution: {integrity: sha512-aHSsMnUw+0UETB0Hlv7B/ZHOGY5bQdwMKJSzGfDfvyhnpmVxLMGnQPGNE9wgqkLUs3+gbG1Qx02S2LLfJ5GaRQ==} cpu: [arm64] os: [win32] requiresBuild: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.9.4: - resolution: {integrity: sha512-z+JQ7JirDUHAsMecVydnBPWLwJjbppU+7LZjffGf+Jvrxq+dVjIE7By163Sc9DKc3ADSU50qPVw0KonBS+a+HQ==} + /@rollup/rollup-win32-ia32-msvc@4.9.5: + resolution: {integrity: sha512-AiqiLkb9KSf7Lj/o1U3SEP9Zn+5NuVKgFdRIZkvd4N0+bYrTOovVd0+LmYCPQGbocT4kvFyK+LXCDiXPBF3fyA==} cpu: [ia32] os: [win32] requiresBuild: true optional: true - /@rollup/rollup-win32-x64-msvc@4.9.4: - resolution: {integrity: sha512-LfdGXCV9rdEify1oxlN9eamvDSjv9md9ZVMAbNHA87xqIfFCxImxan9qZ8+Un54iK2nnqPlbnSi4R54ONtbWBw==} + /@rollup/rollup-win32-x64-msvc@4.9.5: + resolution: {integrity: sha512-1q+mykKE3Vot1kaFJIDoUFv5TuW+QQVaf2FmTT9krg86pQrGStOSJJ0Zil7CFagyxDuouTepzt5Y5TVzyajOdQ==} cpu: [x64] os: [win32] requiresBuild: true @@ -753,10 +772,6 @@ packages: espree: 9.6.1 dev: true - /@types/chai@4.3.11: - resolution: {integrity: sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==} - dev: true - /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -764,6 +779,14 @@ packages: resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} dev: true + /@types/jsdom@21.1.6: + resolution: {integrity: sha512-/7kkMsC+/kMs7gAYmmBR9P0vGTnOoLhQhyhQJSlXGI5bzTHp6xdo0TtKWQAsz6pmSAeVqKSbqeyP6hytqr9FDw==} + dependencies: + '@types/node': 20.11.4 + '@types/tough-cookie': 4.0.5 + parse5: 7.1.2 + dev: true + /@types/json-schema@7.0.15: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true @@ -783,8 +806,8 @@ packages: resolution: {integrity: sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==} dev: true - /@types/node@20.10.8: - resolution: {integrity: sha512-f8nQs3cLxbAFc00vEU59yf9UyGUftkPaLGfvbVOIDdx2i1b8epBqj2aNGyP19fiyXWvlmZ7qC1XLjAzw/OKIeA==} + /@types/node@20.11.4: + resolution: {integrity: sha512-6I0fMH8Aoy2lOejL3s4LhyIYX34DPwY8bl5xlNjBvUEk8OHrcuzsFt+Ied4LvJihbtXPM+8zUqdydfIti86v9g==} dependencies: undici-types: 5.26.5 dev: true @@ -793,21 +816,25 @@ packages: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true - /@typescript-eslint/scope-manager@6.17.0: - resolution: {integrity: sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA==} + /@types/tough-cookie@4.0.5: + resolution: {integrity: sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==} + dev: true + + /@typescript-eslint/scope-manager@6.19.0: + resolution: {integrity: sha512-dO1XMhV2ehBI6QN8Ufi7I10wmUovmLU0Oru3n5LVlM2JuzB4M+dVphCPLkVpKvGij2j/pHBWuJ9piuXx+BhzxQ==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.17.0 - '@typescript-eslint/visitor-keys': 6.17.0 + '@typescript-eslint/types': 6.19.0 + '@typescript-eslint/visitor-keys': 6.19.0 dev: true - /@typescript-eslint/types@6.17.0: - resolution: {integrity: sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A==} + /@typescript-eslint/types@6.19.0: + resolution: {integrity: sha512-lFviGV/vYhOy3m8BJ/nAKoAyNhInTdXpftonhWle66XHAtT1ouBlkjL496b5H5hb8dWXHwtypTqgtb/DEa+j5A==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.17.0(typescript@5.3.3): - resolution: {integrity: sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==} + /@typescript-eslint/typescript-estree@6.19.0(typescript@5.3.3): + resolution: {integrity: sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -815,8 +842,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.17.0 - '@typescript-eslint/visitor-keys': 6.17.0 + '@typescript-eslint/types': 6.19.0 + '@typescript-eslint/visitor-keys': 6.19.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -828,8 +855,8 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.17.0(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ==} + /@typescript-eslint/utils@6.19.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -837,9 +864,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.6 - '@typescript-eslint/scope-manager': 6.17.0 - '@typescript-eslint/types': 6.17.0 - '@typescript-eslint/typescript-estree': 6.17.0(typescript@5.3.3) + '@typescript-eslint/scope-manager': 6.19.0 + '@typescript-eslint/types': 6.19.0 + '@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3) eslint: 8.56.0 semver: 7.5.4 transitivePeerDependencies: @@ -847,11 +874,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@6.17.0: - resolution: {integrity: sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==} + /@typescript-eslint/visitor-keys@6.19.0: + resolution: {integrity: sha512-hZaUCORLgubBvtGpp1JEFEazcuEdfxta9j4iUwdSAr7mEsYYAp3EAUyCZk3VEEqGj6W+AV4uWyrDGtrlawAsgQ==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.17.0 + '@typescript-eslint/types': 6.19.0 eslint-visitor-keys: 3.4.3 dev: true @@ -859,8 +886,8 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@vitest/coverage-istanbul@1.1.3(vitest@1.1.3): - resolution: {integrity: sha512-pqx/RaLjJ7oxsbi0Vc/CjyXBXd86yQ0lKq1PPnk9BMNLqMTEWwfcTelcNrl41yK+IVRhHlFtwcjDva3VslbMMQ==} + /@vitest/coverage-istanbul@1.2.0(vitest@1.2.0): + resolution: {integrity: sha512-hNN/pUR5la6P/L78+YcRl05Lpf6APXlH9ujkmCxxjVWtVG6WuKuqUMhHgYQBYfiOORBwDZ1MBgSUGCMPh4kpmQ==} peerDependencies: vitest: ^1.0.0 dependencies: @@ -870,16 +897,16 @@ packages: istanbul-lib-report: 3.0.1 istanbul-lib-source-maps: 4.0.1 istanbul-reports: 3.1.6 - magicast: 0.3.2 + magicast: 0.3.3 picocolors: 1.0.0 test-exclude: 6.0.0 - vitest: 1.1.3(@types/node@20.10.8)(@vitest/ui@1.1.3)(jsdom@23.2.0) + vitest: 1.2.0(@types/node@20.11.4)(@vitest/ui@1.2.0)(jsdom@23.2.0) transitivePeerDependencies: - supports-color dev: true - /@vitest/coverage-v8@1.1.3(vitest@1.1.3): - resolution: {integrity: sha512-Uput7t3eIcbSTOTQBzGtS+0kah96bX+szW9qQrLeGe3UmgL2Akn8POnyC2lH7XsnREZOds9aCUTxgXf+4HX5RA==} + /@vitest/coverage-v8@1.2.0(vitest@1.2.0): + resolution: {integrity: sha512-YvX8ULTUm1+zkvkl14IqXYGxE1h13OXKPoDsxazARKlp4YLrP28hHEBdplaU7ZTN/Yn6zy6Z3JadWNRJwcmyrQ==} peerDependencies: vitest: ^1.0.0 dependencies: @@ -891,63 +918,63 @@ packages: istanbul-lib-source-maps: 4.0.1 istanbul-reports: 3.1.6 magic-string: 0.30.5 - magicast: 0.3.2 + magicast: 0.3.3 picocolors: 1.0.0 std-env: 3.7.0 test-exclude: 6.0.0 v8-to-istanbul: 9.2.0 - vitest: 1.1.3(@types/node@20.10.8)(@vitest/ui@1.1.3)(jsdom@23.2.0) + vitest: 1.2.0(@types/node@20.11.4)(@vitest/ui@1.2.0)(jsdom@23.2.0) transitivePeerDependencies: - supports-color dev: true - /@vitest/expect@1.1.3: - resolution: {integrity: sha512-MnJqsKc1Ko04lksF9XoRJza0bGGwTtqfbyrsYv5on4rcEkdo+QgUdITenBQBUltKzdxW7K3rWh+nXRULwsdaVg==} + /@vitest/expect@1.2.0: + resolution: {integrity: sha512-H+2bHzhyvgp32o7Pgj2h9RTHN0pgYaoi26Oo3mE+dCi1PAqV31kIIVfTbqMO3Bvshd5mIrJLc73EwSRrbol9Lw==} dependencies: - '@vitest/spy': 1.1.3 - '@vitest/utils': 1.1.3 - chai: 4.4.0 + '@vitest/spy': 1.2.0 + '@vitest/utils': 1.2.0 + chai: 4.4.1 dev: true - /@vitest/runner@1.1.3: - resolution: {integrity: sha512-Va2XbWMnhSdDEh/OFxyUltgQuuDRxnarK1hW5QNN4URpQrqq6jtt8cfww/pQQ4i0LjoYxh/3bYWvDFlR9tU73g==} + /@vitest/runner@1.2.0: + resolution: {integrity: sha512-vaJkDoQaNUTroT70OhM0NPznP7H3WyRwt4LvGwCVYs/llLaqhoSLnlIhUClZpbF5RgAee29KRcNz0FEhYcgxqA==} dependencies: - '@vitest/utils': 1.1.3 + '@vitest/utils': 1.2.0 p-limit: 5.0.0 - pathe: 1.1.1 + pathe: 1.1.2 dev: true - /@vitest/snapshot@1.1.3: - resolution: {integrity: sha512-U0r8pRXsLAdxSVAyGNcqOU2H3Z4Y2dAAGGelL50O0QRMdi1WWeYHdrH/QWpN1e8juWfVKsb8B+pyJwTC+4Gy9w==} + /@vitest/snapshot@1.2.0: + resolution: {integrity: sha512-P33EE7TrVgB3HDLllrjK/GG6WSnmUtWohbwcQqmm7TAk9AVHpdgf7M3F3qRHKm6vhr7x3eGIln7VH052Smo6Kw==} dependencies: magic-string: 0.30.5 - pathe: 1.1.1 + pathe: 1.1.2 pretty-format: 29.7.0 dev: true - /@vitest/spy@1.1.3: - resolution: {integrity: sha512-Ec0qWyGS5LhATFQtldvChPTAHv08yHIOZfiNcjwRQbFPHpkih0md9KAbs7TfeIfL7OFKoe7B/6ukBTqByubXkQ==} + /@vitest/spy@1.2.0: + resolution: {integrity: sha512-MNxSAfxUaCeowqyyGwC293yZgk7cECZU9wGb8N1pYQ0yOn/SIr8t0l9XnGRdQZvNV/ZHBYu6GO/W3tj5K3VN1Q==} dependencies: tinyspy: 2.2.0 dev: true - /@vitest/ui@1.1.3(vitest@1.1.3): - resolution: {integrity: sha512-JKGgftXZgTtK7kfQNicE9Q2FuiUlYvCGyUENkA2/S1VBThtfQyGUwaJmiDFVAKBOrW305cNgjP67vsxMm9/SDQ==} + /@vitest/ui@1.2.0(vitest@1.2.0): + resolution: {integrity: sha512-AFU8FBiSioYacEd0b8+2R/4GJJhxseD6bNIiEVntb505u1B/mcNMTVRepZql7r3RQJZQ7uijY9QyLdhlbh4XvA==} peerDependencies: vitest: ^1.0.0 dependencies: - '@vitest/utils': 1.1.3 + '@vitest/utils': 1.2.0 fast-glob: 3.3.2 fflate: 0.8.1 flatted: 3.2.9 - pathe: 1.1.1 + pathe: 1.1.2 picocolors: 1.0.0 sirv: 2.0.4 - vitest: 1.1.3(@types/node@20.10.8)(@vitest/ui@1.1.3)(jsdom@23.2.0) + vitest: 1.2.0(@types/node@20.11.4)(@vitest/ui@1.2.0)(jsdom@23.2.0) dev: true - /@vitest/utils@1.1.3: - resolution: {integrity: sha512-Dyt3UMcdElTll2H75vhxfpZu03uFpXRCHxWnzcrFjZxT1kTbq8ALUYIeBgGolo1gldVdI0YSlQRacsqxTwNqwg==} + /@vitest/utils@1.2.0: + resolution: {integrity: sha512-FyD5bpugsXlwVpTcGLDf3wSPYy8g541fQt14qtzo8mJ4LdEpDKZ9mQy2+qdJm2TZRpjY5JLXihXCgIxiRJgi5g==} dependencies: diff-sequences: 29.6.3 estree-walker: 3.0.3 @@ -963,8 +990,8 @@ packages: acorn: 8.11.3 dev: true - /acorn-walk@8.3.1: - resolution: {integrity: sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==} + /acorn-walk@8.3.2: + resolution: {integrity: sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==} engines: {node: '>=0.4.0'} dev: true @@ -997,6 +1024,11 @@ packages: engines: {node: '>=8'} dev: true + /ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + engines: {node: '>=12'} + dev: true + /ansi-styles@3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -1016,6 +1048,11 @@ packages: engines: {node: '>=10'} dev: true + /ansi-styles@6.2.1: + resolution: {integrity: sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==} + engines: {node: '>=12'} + dev: true + /are-docs-informative@0.0.2: resolution: {integrity: sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==} engines: {node: '>=14'} @@ -1102,8 +1139,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001574 - electron-to-chromium: 1.4.623 + caniuse-lite: 1.0.30001577 + electron-to-chromium: 1.4.633 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.22.2) dev: true @@ -1123,7 +1160,7 @@ packages: dependencies: function-bind: 1.1.2 get-intrinsic: 1.2.2 - set-function-length: 1.1.1 + set-function-length: 1.2.0 dev: true /callsites@3.1.0: @@ -1131,8 +1168,8 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite@1.0.30001574: - resolution: {integrity: sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==} + /caniuse-lite@1.0.30001577: + resolution: {integrity: sha512-rs2ZygrG1PNXMfmncM0B5H1hndY5ZCC9b5TkFaVNfZ+AUlyqcMyVIQtc3fsezi0NUCk5XZfDf9WS6WxMxnfdrg==} dev: true /catharsis@0.9.0: @@ -1142,8 +1179,8 @@ packages: lodash: 4.17.21 dev: true - /chai@4.4.0: - resolution: {integrity: sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A==} + /chai@4.4.1: + resolution: {integrity: sha512-13sOfMv2+DWduEU+/xbun3LScLoqN17nBeTLUsmDfKdoiC1fr0n9PU4guu4AhRcOVFk/sW8LyZWHuhWtQZiF+g==} engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 @@ -1320,8 +1357,20 @@ packages: esutils: 2.0.3 dev: true - /electron-to-chromium@1.4.623: - resolution: {integrity: sha512-lKoz10iCYlP1WtRYdh5MvocQPWVRoI7ysp6qf18bmeBgR8abE6+I2CsfyNKztRDZvhdWc+krKT6wS7Neg8sw3A==} + /eastasianwidth@0.2.0: + resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} + dev: true + + /electron-to-chromium@1.4.633: + resolution: {integrity: sha512-7BvxzXrHFliyQ1oZc6NRMjyEaKOO1Ma1NY98sFZofogWlm+klLWSgrDw7EhatiMgi4R4NV+iWxDdxuIKXtPbOw==} + dev: true + + /emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + dev: true + + /emoji-regex@9.2.2: + resolution: {integrity: sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==} dev: true /entities@2.1.0: @@ -1365,7 +1414,7 @@ packages: object-keys: 1.1.1 object.assign: 4.1.5 regexp.prototype.flags: 1.5.1 - safe-array-concat: 1.0.1 + safe-array-concat: 1.1.0 safe-regex-test: 1.0.2 string.prototype.trim: 1.2.8 string.prototype.trimend: 1.0.7 @@ -1467,7 +1516,7 @@ packages: - supports-color dev: true - /eslint-plugin-vitest@0.3.20(eslint@8.56.0)(typescript@5.3.3)(vitest@1.1.3): + /eslint-plugin-vitest@0.3.20(eslint@8.56.0)(typescript@5.3.3)(vitest@1.2.0): resolution: {integrity: sha512-O05k4j9TGMOkkghj9dRgpeLDyOSiVIxQWgNDPfhYPm5ioJsehcYV/zkRLekQs+c8+RBCVXucSED3fYOyy2EoWA==} engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: @@ -1480,9 +1529,9 @@ packages: vitest: optional: true dependencies: - '@typescript-eslint/utils': 6.17.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.19.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 - vitest: 1.1.3(@types/node@20.10.8)(@vitest/ui@1.1.3)(jsdom@23.2.0) + vitest: 1.2.0(@types/node@20.11.4)(@vitest/ui@1.2.0)(jsdom@23.2.0) transitivePeerDependencies: - supports-color - typescript @@ -1510,7 +1559,7 @@ packages: '@eslint-community/regexpp': 4.10.0 '@eslint/eslintrc': 2.1.4 '@eslint/js': 8.56.0 - '@humanwhocodes/config-array': 0.11.13 + '@humanwhocodes/config-array': 0.11.14 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 '@ungap/structured-clone': 1.2.0 @@ -1680,6 +1729,14 @@ packages: is-callable: 1.2.7 dev: true + /foreground-child@3.1.1: + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + engines: {node: '>=14'} + dependencies: + cross-spawn: 7.0.3 + signal-exit: 4.1.0 + dev: true + /form-data@4.0.0: resolution: {integrity: sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==} engines: {node: '>= 6'} @@ -1763,6 +1820,18 @@ packages: is-glob: 4.0.3 dev: true + /glob@10.3.10: + resolution: {integrity: sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==} + engines: {node: '>=16 || 14 >=14.17'} + hasBin: true + dependencies: + foreground-child: 3.1.1 + jackspeak: 2.3.6 + minimatch: 9.0.3 + minipass: 7.0.4 + path-scurry: 1.10.1 + dev: true + /glob@7.2.3: resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==} dependencies: @@ -2003,6 +2072,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + dev: true + /is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} @@ -2136,6 +2210,15 @@ packages: istanbul-lib-report: 3.0.1 dev: true + /jackspeak@2.3.6: + resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} + engines: {node: '>=14'} + dependencies: + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + dev: true + /js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} dev: true @@ -2153,9 +2236,9 @@ packages: xmlcreate: 2.0.4 dev: true - /jsdoc-cli-wrapper@1.0.4: - resolution: {integrity: sha512-JzdBSsLkS5Q8BIaO8b9SC3kfUc7NsHc7egpJLJGqQQsm+X4rXooG0hClwGVm1LVNuca3bpeq/Mw99BcUiD4rQw==} - engines: {node: '>= 18.0.0'} + /jsdoc-cli-wrapper@1.0.6: + resolution: {integrity: sha512-5HXdTBukPOjkLrbIIoQP25glNV/6qJBz7uIgVkhDMOGlDJWiK6/WncaizTZt0nMghsgbwmF5hdu/rhxzcqJGpg==} + engines: {node: '>=18.0.0'} hasBin: true dev: true @@ -2201,7 +2284,7 @@ packages: canvas: optional: true dependencies: - '@asamuzakjp/dom-selector': 2.0.1 + '@asamuzakjp/dom-selector': 2.0.2 cssstyle: 4.0.1 data-urls: 5.0.0 decimal.js: 10.4.3 @@ -2286,7 +2369,7 @@ packages: resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} engines: {node: '>=14'} dependencies: - mlly: 1.4.2 + mlly: 1.5.0 pkg-types: 1.0.3 dev: true @@ -2311,6 +2394,11 @@ packages: get-func-name: 2.0.2 dev: true + /lru-cache@10.1.0: + resolution: {integrity: sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==} + engines: {node: 14 || >=16.14} + dev: true + /lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} dependencies: @@ -2331,8 +2419,8 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true - /magicast@0.3.2: - resolution: {integrity: sha512-Fjwkl6a0syt9TFN0JSYpOybxiMCkYNEeOTnOTNRbjphirLakznZXAqrXgj/7GG3D1dvETONNwrBfinvAbpunDg==} + /magicast@0.3.3: + resolution: {integrity: sha512-ZbrP1Qxnpoes8sz47AM0z08U+jW6TyRgZzcWy3Ma3vDhJttwMwAFDMMQFobwdBxByBD46JYmxRzeF7w2+wJEuw==} dependencies: '@babel/parser': 7.23.6 '@babel/types': 7.23.6 @@ -2432,17 +2520,22 @@ packages: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} dev: false + /minipass@7.0.4: + resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} + engines: {node: '>=16 || 14 >=14.17'} + dev: true + /mkdirp@1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} hasBin: true dev: true - /mlly@1.4.2: - resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} + /mlly@1.5.0: + resolution: {integrity: sha512-NPVQvAY1xr1QoVeG0cy8yUYC7FQcOx6evl/RjT1wL5FvzPnzOysoqB/jmx/DhssT2dYa8nxECLAaFI/+gVLhDQ==} dependencies: acorn: 8.11.3 - pathe: 1.1.1 + pathe: 1.1.2 pkg-types: 1.0.3 ufo: 1.3.2 dev: true @@ -2579,13 +2672,21 @@ packages: engines: {node: '>=12'} dev: true + /path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} + dependencies: + lru-cache: 10.1.0 + minipass: 7.0.4 + dev: true + /path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} dev: true - /pathe@1.1.1: - resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} + /pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} dev: true /pathval@1.1.1: @@ -2604,8 +2705,8 @@ packages: resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} dependencies: jsonc-parser: 3.2.0 - mlly: 1.4.2 - pathe: 1.1.1 + mlly: 1.5.0 + pathe: 1.1.2 dev: true /postcss@8.4.33: @@ -2693,26 +2794,34 @@ packages: glob: 7.2.3 dev: true - /rollup@4.9.4: - resolution: {integrity: sha512-2ztU7pY/lrQyXSCnnoU4ICjT/tCG9cdH3/G25ERqE3Lst6vl2BCM5hL2Nw+sslAvAf+ccKsAq1SkKQALyqhR7g==} + /rimraf@5.0.5: + resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==} + engines: {node: '>=14'} + hasBin: true + dependencies: + glob: 10.3.10 + dev: true + + /rollup@4.9.5: + resolution: {integrity: sha512-E4vQW0H/mbNMw2yLSqJyjtkHY9dslf/p0zuT1xehNRqUTBOFMqEjguDvqhXr7N7r/4ttb2jr4T41d3dncmIgbQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.9.4 - '@rollup/rollup-android-arm64': 4.9.4 - '@rollup/rollup-darwin-arm64': 4.9.4 - '@rollup/rollup-darwin-x64': 4.9.4 - '@rollup/rollup-linux-arm-gnueabihf': 4.9.4 - '@rollup/rollup-linux-arm64-gnu': 4.9.4 - '@rollup/rollup-linux-arm64-musl': 4.9.4 - '@rollup/rollup-linux-riscv64-gnu': 4.9.4 - '@rollup/rollup-linux-x64-gnu': 4.9.4 - '@rollup/rollup-linux-x64-musl': 4.9.4 - '@rollup/rollup-win32-arm64-msvc': 4.9.4 - '@rollup/rollup-win32-ia32-msvc': 4.9.4 - '@rollup/rollup-win32-x64-msvc': 4.9.4 + '@rollup/rollup-android-arm-eabi': 4.9.5 + '@rollup/rollup-android-arm64': 4.9.5 + '@rollup/rollup-darwin-arm64': 4.9.5 + '@rollup/rollup-darwin-x64': 4.9.5 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.5 + '@rollup/rollup-linux-arm64-gnu': 4.9.5 + '@rollup/rollup-linux-arm64-musl': 4.9.5 + '@rollup/rollup-linux-riscv64-gnu': 4.9.5 + '@rollup/rollup-linux-x64-gnu': 4.9.5 + '@rollup/rollup-linux-x64-musl': 4.9.5 + '@rollup/rollup-win32-arm64-msvc': 4.9.5 + '@rollup/rollup-win32-ia32-msvc': 4.9.5 + '@rollup/rollup-win32-x64-msvc': 4.9.5 fsevents: 2.3.3 /rrweb-cssom@0.6.0: @@ -2725,8 +2834,8 @@ packages: queue-microtask: 1.2.3 dev: true - /safe-array-concat@1.0.1: - resolution: {integrity: sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==} + /safe-array-concat@1.1.0: + resolution: {integrity: sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==} engines: {node: '>=0.4'} dependencies: call-bind: 1.0.5 @@ -2768,11 +2877,12 @@ packages: lru-cache: 6.0.0 dev: true - /set-function-length@1.1.1: - resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} + /set-function-length@1.2.0: + resolution: {integrity: sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==} engines: {node: '>= 0.4'} dependencies: define-data-property: 1.1.1 + function-bind: 1.1.2 get-intrinsic: 1.2.2 gopd: 1.0.1 has-property-descriptors: 1.0.1 @@ -2862,6 +2972,24 @@ packages: resolution: {integrity: sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==} dev: true + /string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} + engines: {node: '>=8'} + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 + dev: true + + /string-width@5.1.2: + resolution: {integrity: sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==} + engines: {node: '>=12'} + dependencies: + eastasianwidth: 0.2.0 + emoji-regex: 9.2.2 + strip-ansi: 7.1.0 + dev: true + /string.prototype.matchall@4.0.10: resolution: {integrity: sha512-rGXbGmOEosIQi6Qva94HUjgPs9vKW+dkG7Y8Q5O2OYkWL6wFaTRZO8zM4mhP94uX55wgyrXzfS2aGtGzUL7EJQ==} dependencies: @@ -2908,6 +3036,13 @@ packages: ansi-regex: 5.0.1 dev: true + /strip-ansi@7.1.0: + resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} + engines: {node: '>=12'} + dependencies: + ansi-regex: 6.0.1 + dev: true + /strip-final-newline@3.0.0: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} @@ -2951,10 +3086,12 @@ packages: minimatch: 3.1.2 dev: true - /test-page-opener@1.0.5: - resolution: {integrity: sha512-KglC6Rbauoy9Rr106TVYPmxA24r13a/xODd229s/1XowaJkmya/NlTtKIY6tkw8eIoAqzHBbDwhSBVwDIXuBEw==} - engines: {node: '>= 18.0.0'} + /test-page-opener@1.0.6: + resolution: {integrity: sha512-xxCPG6a0ykEU4fBu5BIbX6RJTpJtaHbvUMcAHzTY11j+UoU7bvzb9TfRNriGiHF2XPd6eL6RNY+fWHw5aWOrHg==} + engines: {node: '>=18.0.0'} dependencies: + '@types/istanbul-lib-coverage': 2.0.6 + '@types/jsdom': 21.1.6 istanbul-lib-coverage: 3.2.2 dev: true @@ -2962,8 +3099,8 @@ packages: resolution: {integrity: sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==} dev: true - /tinybench@2.5.1: - resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==} + /tinybench@2.6.0: + resolution: {integrity: sha512-N8hW3PG/3aOoZAN5V/NSAEDz0ZixDSSt5b/a05iqtpgfLWMSVuCo7w0k2vVvEjdrIoeGqZzweX2WlyioNIHchA==} dev: true /tinypool@0.8.1: @@ -3146,21 +3283,21 @@ packages: resolution: {integrity: sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==} engines: {node: '>=10.12.0'} dependencies: - '@jridgewell/trace-mapping': 0.3.20 + '@jridgewell/trace-mapping': 0.3.21 '@types/istanbul-lib-coverage': 2.0.6 convert-source-map: 2.0.0 dev: true - /vite-node@1.1.3(@types/node@20.10.8): - resolution: {integrity: sha512-BLSO72YAkIUuNrOx+8uznYICJfTEbvBAmWClY3hpath5+h1mbPS5OMn42lrTxXuyCazVyZoDkSRnju78GiVCqA==} + /vite-node@1.2.0(@types/node@20.11.4): + resolution: {integrity: sha512-ETnQTHeAbbOxl7/pyBck9oAPZZZo+kYnFt1uQDD+hPReOc+wCjXw4r4jHriBRuVDB5isHmPXxrfc1yJnfBERqg==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: cac: 6.7.14 debug: 4.3.4 - pathe: 1.1.1 + pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.0.11(@types/node@20.10.8) + vite: 5.0.11(@types/node@20.11.4) transitivePeerDependencies: - '@types/node' - less @@ -3172,7 +3309,7 @@ packages: - terser dev: true - /vite@5.0.11(@types/node@20.10.8): + /vite@5.0.11(@types/node@20.11.4): resolution: {integrity: sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -3200,16 +3337,16 @@ packages: terser: optional: true dependencies: - '@types/node': 20.10.8 + '@types/node': 20.11.4 esbuild: 0.19.11 postcss: 8.4.33 - rollup: 4.9.4 + rollup: 4.9.5 optionalDependencies: fsevents: 2.3.3 dev: true - /vitest@1.1.3(@types/node@20.10.8)(@vitest/ui@1.1.3)(jsdom@23.2.0): - resolution: {integrity: sha512-2l8om1NOkiA90/Y207PsEvJLYygddsOyr81wLQ20Ra8IlLKbyQncWsGZjnbkyG2KwwuTXLQjEPOJuxGMG8qJBQ==} + /vitest@1.2.0(@types/node@20.11.4)(@vitest/ui@1.2.0)(jsdom@23.2.0): + resolution: {integrity: sha512-Ixs5m7BjqvLHXcibkzKRQUvD/XLw0E3rvqaCMlrm/0LMsA0309ZqYvTlPzkhh81VlEyVZXFlwWnkhb6/UMtcaQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -3233,29 +3370,29 @@ packages: jsdom: optional: true dependencies: - '@types/node': 20.10.8 - '@vitest/expect': 1.1.3 - '@vitest/runner': 1.1.3 - '@vitest/snapshot': 1.1.3 - '@vitest/spy': 1.1.3 - '@vitest/ui': 1.1.3(vitest@1.1.3) - '@vitest/utils': 1.1.3 - acorn-walk: 8.3.1 + '@types/node': 20.11.4 + '@vitest/expect': 1.2.0 + '@vitest/runner': 1.2.0 + '@vitest/snapshot': 1.2.0 + '@vitest/spy': 1.2.0 + '@vitest/ui': 1.2.0(vitest@1.2.0) + '@vitest/utils': 1.2.0 + acorn-walk: 8.3.2 cac: 6.7.14 - chai: 4.4.0 + chai: 4.4.1 debug: 4.3.4 execa: 8.0.1 jsdom: 23.2.0 local-pkg: 0.5.0 magic-string: 0.30.5 - pathe: 1.1.1 + pathe: 1.1.2 picocolors: 1.0.0 std-env: 3.7.0 strip-literal: 1.3.0 - tinybench: 2.5.1 + tinybench: 2.6.0 tinypool: 0.8.1 - vite: 5.0.11(@types/node@20.10.8) - vite-node: 1.1.3(@types/node@20.10.8) + vite: 5.0.11(@types/node@20.11.4) + vite-node: 1.2.0(@types/node@20.11.4) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -3341,6 +3478,24 @@ packages: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} dev: false + /wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + dev: true + + /wrap-ansi@8.1.0: + resolution: {integrity: sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==} + engines: {node: '>=12'} + dependencies: + ansi-styles: 6.2.1 + string-width: 5.1.2 + strip-ansi: 7.1.0 + dev: true + /wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true diff --git a/test/large/components/app.js b/test/large/components/app.js index 09520cb..fad3453 100644 --- a/test/large/components/app.js +++ b/test/large/components/app.js @@ -9,7 +9,6 @@ import Template, { RawTemplate } from './introduction.hbs' // eslint-disable-next-line no-unused-vars import { InitParams } from '../types.js' - export default class App { /** * Initializes the Introduction within the document. diff --git a/test/large/components/helpers.js b/test/large/components/helpers.js index 3449e7c..864c5af 100644 --- a/test/large/components/helpers.js +++ b/test/large/components/helpers.js @@ -25,7 +25,7 @@ export default function(Handlebars) { /** * @typedef {object} LinkHelperOptions * @property {Object.} hash - hash arguments from the link tag - * @see https://handlebarsjs.com/guide/expressions.html#helpers + * @see https://handlebarsjs.com/guide/expressions.html#helpers-with-hash-arguments */ /** diff --git a/test/plugin-impl.test.js b/test/plugin-impl.test.js index def4c2b..5045793 100644 --- a/test/plugin-impl.test.js +++ b/test/plugin-impl.test.js @@ -150,9 +150,12 @@ describe('PluginImpl', () => { }) test('ignores options.compiler.{srcName,destName}', () => { - const impl = new PluginImpl({ - compiler: { srcName: 'bar/baz.handlebars', destName: 'quux/xyzzy.js' } + // Ensures we still remove srcName and destName in the absence of type + // checking. + const config = /** @type {CompileOptions} */ ({ + srcName: 'bar/baz.handlebars', destName: 'quux/xyzzy.js' }) + const impl = new PluginImpl({ compiler: config }) const { map } = impl.compile(templateStr, 'foo.hbs') ?? {} diff --git a/test/vitest.d.ts b/test/vitest.d.ts index 6048049..035d416 100644 --- a/test/vitest.d.ts +++ b/test/vitest.d.ts @@ -9,8 +9,8 @@ import type { Assertion, AsymmetricMatchersContaining } from 'vitest' interface CustomMatchers { - toStartWith(string): R - toEndWith(string): R + toStartWith(expected: string): R + toEndWith(expected: string): R } declare module 'vitest' { diff --git a/jsconfig.json b/tsconfig.json similarity index 54% rename from jsconfig.json rename to tsconfig.json index bc8325b..5755fef 100644 --- a/jsconfig.json +++ b/tsconfig.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "allowJs": true, "checkJs": true, "lib": [ "ES2022", @@ -7,11 +8,14 @@ ], "module": "node16", "target": "es2020", - "strict": true + "strict": true, + "noEmit": true, + "pretty": true }, "exclude": [ - "node_modules/**", - "coverage*/**", - "jsdoc/**" + "node_modules", + "coverage", + "jsdoc", + "types" ] }