diff --git a/.codecov.yml b/.codecov.yml index 9941d293..a45570f1 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -88,4 +88,5 @@ ignore: - src/types/ profiling: - critical_files_paths: [] + critical_files_paths: + - src/plugin.ts diff --git a/.commitlintrc.cts b/.commitlintrc.ts similarity index 75% rename from .commitlintrc.cts rename to .commitlintrc.ts index 9ba443a4..6521ed88 100644 --- a/.commitlintrc.cts +++ b/.commitlintrc.ts @@ -18,13 +18,7 @@ import { scopes } from '@flex-development/commitlint-config' const config: UserConfig = { extends: ['@flex-development'], rules: { - 'scope-enum': [Severity.Error, 'always', scopes([ - 'attacher', - 'grammar', - 'lexer', - 'parser', - 'reader' - ])] + 'scope-enum': [Severity.Error, 'always', scopes(['plugin'])] } } diff --git a/.dictionary.txt b/.dictionary.txt index ba4db56e..da2d77f1 100644 --- a/.dictionary.txt +++ b/.dictionary.txt @@ -4,6 +4,7 @@ cefc codecov commitlintrc dedupe +deno dessant docast dohm @@ -16,6 +17,7 @@ iife jchen jsdoc kaisugi +lcov lintstagedrc mdast mkbuild diff --git a/.dprint.jsonc b/.dprint.jsonc index 78c371d6..12d78877 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -10,7 +10,9 @@ "**/.temp/", "**/.vercel/", "**/__fixtures__/git/**/*.txt", + "**/__tests__/benchmark.json", "**/__tests__/report.json", + "**/__tests__/typecheck.json", "**/coverage/", "**/dist/", "**/node_modules", diff --git a/.eslintignore b/.eslintignore index 70565844..df0fe1b7 100644 --- a/.eslintignore +++ b/.eslintignore @@ -8,7 +8,9 @@ **/*config.*.timestamp* **/.DS_Store **/.temp/ +**/__tests__/benchmark.json **/__tests__/report.* +**/__tests__/typecheck.json **/coverage/ **/dist/ **/node_modules/ diff --git a/.eslintrc.base.cjs b/.eslintrc.base.cjs index 11a81939..495cc201 100644 --- a/.eslintrc.base.cjs +++ b/.eslintrc.base.cjs @@ -16,7 +16,7 @@ const fs = require('node:fs') */ const config = { env: { - [require('./tsconfig.build.json').compilerOptions.target]: true, + es2023: true, node: true }, extends: [], @@ -33,15 +33,8 @@ const config = { }, parser: '@typescript-eslint/parser', parserOptions: { - ecmaFeatures: { - jsx: true - }, extraFileExtensions: [], - project: [ - '**/tsconfig.json', - './tsconfig.cjs.json' - ], - sourceType: require('./package.json').type, + project: ['**/tsconfig.json'], tsconfigRootDir: process.cwd(), warnOnUnsupportedTypeScriptVersion: true }, @@ -630,7 +623,7 @@ const config = { 2, { version: require('./package.json').engines?.node ?? - '>=' + fs.readFileSync('./.nvmrc', 'utf8') + '>=' + fs.readFileSync('.nvmrc', 'utf8') } ], 'node/prefer-global/buffer': 2, @@ -925,6 +918,68 @@ const config = { '@typescript-eslint/explicit-member-accessibility': 0 } }, + { + files: ['**/*.html'], + parser: '@html-eslint/parser', + plugins: ['@html-eslint', 'html'], + rules: { + '@html-eslint/element-newline': 2, + '@html-eslint/id-naming-convention': 2, + '@html-eslint/indent': [2, 2], + '@html-eslint/lowercase': 2, + '@html-eslint/no-abstract-roles': 2, + '@html-eslint/no-accesskey-attrs': 2, + '@html-eslint/no-aria-hidden-body': 2, + '@html-eslint/no-duplicate-attrs': 2, + '@html-eslint/no-duplicate-id': 2, + '@html-eslint/no-extra-spacing-attrs': 2, + '@html-eslint/no-inline-styles': 2, + '@html-eslint/no-multiple-empty-lines': 2, + '@html-eslint/no-multiple-h1': 2, + '@html-eslint/no-non-scalable-viewport': 2, + '@html-eslint/no-obsolete-tags': 2, + '@html-eslint/no-positive-tabindex': 2, + '@html-eslint/no-restricted-attr-values': [ + 2, + { + attrPatterns: [], + attrValuePatterns: [] + } + ], + '@html-eslint/no-restricted-attrs': [ + 2, + { + attrPatterns: [], + tagPatterns: [] + } + ], + '@html-eslint/no-script-style-type': 2, + '@html-eslint/no-skip-heading-levels': 2, + '@html-eslint/no-target-blank': 2, + '@html-eslint/no-trailing-spaces': 2, + '@html-eslint/quotes': 2, + '@html-eslint/require-attrs': [2], + '@html-eslint/require-button-type': 2, + '@html-eslint/require-closing-tags': [2, { selfClosing: 'always' }], + '@html-eslint/require-doctype': 2, + '@html-eslint/require-frame-title': 2, + '@html-eslint/require-img-alt': 2, + '@html-eslint/require-lang': 2, + '@html-eslint/require-li-container': 2, + '@html-eslint/require-meta-charset': 2, + '@html-eslint/require-meta-description': 2, + '@html-eslint/require-meta-viewport': 2, + '@html-eslint/require-open-graph-protocol': 0, + '@html-eslint/require-title': 2, + '@html-eslint/sort-attrs': 2 + }, + settings: { + html: { + extensions: ['.html'], + indent: '+2' + } + } + }, { files: '**/*.+(json|json5|jsonc)', parser: 'jsonc-eslint-parser', @@ -981,14 +1036,6 @@ const config = { React: false }, parser: 'eslint-mdx', - parserOptions: { - ecmaFeatures: { - impliedStrict: true, - jsx: true - }, - ecmaVersion: 'latest', - sourceType: 'module' - }, plugins: ['markdown', 'markdownlint', 'mdx'], processor: 'mdx/remark', rules: { @@ -1257,6 +1304,14 @@ const config = { } } ], + parserOptions: { + ecmaFeatures: { + impliedStrict: true, + jsx: true + }, + ecmaVersion: 'latest', + sourceType: require('./package.json').type + }, plugins: [], reportUnusedDisableDirectives: true, rules: {}, diff --git a/.eslintrc.cjs b/.eslintrc.cjs index d8ece9e9..2a033acb 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -10,37 +10,6 @@ */ const config = { extends: ['./.eslintrc.base.cjs'], - overrides: [ - ...require('./.eslintrc.base.cjs').overrides, - { - files: ['__fixtures__/calculate.ts'], - rules: { - '@typescript-eslint/strict-boolean-expressions': 0, - 'unicorn/no-unreadable-array-destructuring': 0 - } - }, - { - files: ['__fixtures__/dbl-linear.ts', '__fixtures__/fibonacci.ts'], - rules: { - '@typescript-eslint/require-await': 0 - } - }, - { - files: ['src/parser-abstract.ts'], - rules: { - '@typescript-eslint/no-unused-vars': [ - 2, - { - args: 'none', - caughtErrors: 'all', - ignoreRestSiblings: false, - vars: 'all' - } - ], - '@typescript-eslint/no-useless-constructor': 0 - } - } - ], root: true } diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6ad9d47e..47dfb968 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -45,8 +45,6 @@ updates: patterns: - '@vitest/*' - vitest* - ignore: - - dependency-name: unist-util-inspect labels: - scope:dependencies - type:build diff --git a/.github/infrastructure.yml b/.github/infrastructure.yml index 15fcd82e..3f7c931c 100644 --- a/.github/infrastructure.yml +++ b/.github/infrastructure.yml @@ -65,9 +65,6 @@ labels: - name: flag:needs-refactor description: code improvements required before being merged color: fbca04 - - name: scope:attacher - description: unified attacher - color: 74cefc - name: scope:dependencies description: dependency updates color: 74cefc @@ -77,12 +74,12 @@ labels: - name: scope:install description: package install color: 74cefc - - name: scope:parser - description: file parser - color: 74cefc - name: scope:patches description: patches color: 74cefc + - name: scope:plugin + description: unified plugin + color: 74cefc - name: scope:release description: package release color: 74cefc @@ -174,7 +171,7 @@ repository: automated_security_fixes: true default_branch: main delete_branch_on_merge: true - description: unified compliant file parser for docast + description: unified compliant parser for docast has_issues: true has_projects: true has_wiki: false diff --git a/.gitignore b/.gitignore index adc540da..330fc04b 100644 --- a/.gitignore +++ b/.gitignore @@ -45,7 +45,9 @@ yarn-error.log* # Testing # ------------------------------------------------------------------------------ **/*config.*.timestamp* +**/__tests__/benchmark.json **/__tests__/report.* +**/__tests__/typecheck.json **/coverage/ **/tsconfig*temp.json *.lcov diff --git a/.lintstagedrc.json b/.lintstagedrc.json index eed989dc..c42c61fe 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -4,7 +4,7 @@ "eslint --exit-on-fatal-error", "cspell lint --color --no-progress --relative $@" ], - "**/*.{cts,mts,ts}": "vitest run --changed --typecheck", + "**/*.{cts,mts,ts}": "vitest run --changed --mode=typecheck --typecheck", "**/yarn.lock": "yarn dedupe --check", "src/**/*.ts": [ "vitest run --changed --coverage", diff --git a/README.md b/README.md index 72899cd7..85d44581 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ [![vitest](https://img.shields.io/badge/-vitest-6e9f18?style=flat&logo=vitest&logoColor=ffffff)](https://vitest.dev/) [![yarn](https://img.shields.io/badge/-yarn-2c8ebb?style=flat&logo=yarn&logoColor=ffffff)](https://yarnpkg.com/) -[**unified**][unified] compliant file parser for [**docast**][docast]. +[**unified**][unified] compliant parser for [**docast**][docast]. ## Contents @@ -37,23 +37,34 @@ syntax tree][docast]. This package is [ESM only][esm]. -```sh -yarn add @flex-development/docast-parse @flex-development/docast @types/mdast @types/unist -``` - -From Git: +In Node.js (version 18+) with [yarn][yarn]: ```sh -yarn add @flex-development/docast-parse@flex-development/docast-parse +yarn add @flex-development/docast-parse +yarn add -D @flex-development/docast @types/mdast @types/unist micromark-util-types ```
- See Git - Protocols | Yarn -  for details on requesting a specific branch, commit, or tag. + See Git - Protocols | Yarn +  for details regarding installing from Git.
+In Deno with [`esm.sh`][esmsh]: + +```ts +import docastParse from 'https://esm.sh/@flex-development/docast-parse' +``` + +In browsers with [`esm.sh`][esmsh]: + +```html + +``` + ## Use **TODO**: use @@ -80,5 +91,7 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md). [docast]: https://github.com/flex-development/docast [esm]: https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c +[esmsh]: https://esm.sh/ [typescript]: https://www.typescriptlang.org [unified]: https://github.com/unifiedjs/unified +[yarn]: https://yarnpkg.com diff --git a/__fixtures__/.gitkeep b/__fixtures__/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/__fixtures__/fibonacci-sequence.ts b/__fixtures__/fibonacci-sequence.ts new file mode 100644 index 00000000..d5348958 --- /dev/null +++ b/__fixtures__/fibonacci-sequence.ts @@ -0,0 +1,94 @@ +/** + * @file Fixtures - FibonacciSequence + * @module fixtures/FibonacciSequence + * @see https://codewars.com/kata/55695bc4f75bbaea5100016b + */ + +/** + * Fibonacci sequence iterator. + * + * :::info + * A fibonacci sequence starts with two `1`s. Every element afterwards is the + * sum of the two previous elements: + * ```txt + * 1, 1, 2, 3, 5, 8, 13, ..., 89, 144, 233, 377, ... + * ``` + * ::: + * + * @implements {Iterator} + */ +class FibonacciSequence implements Iterator { + /** + * First managed sequence value. + * + * @public + * @instance + * @member {number} fib1 + */ + public fib1: number + + /** + * Second managed sequence value. + * + * @public + * @instance + * @member {number} fib2 + */ + public fib2: number + + /** + * Max sequence value. + * + * @private + * @instance + * @member {number} max + */ + readonly #max: number + + /** + * Create a new fibonacci sequence iterator. + * + * @param {number} [max=Number.MAX_SAFE_INTEGER] - Max sequence value + */ + constructor(max: number = Number.MAX_SAFE_INTEGER) { + this.#max = max < 0 ? 0 : max + this.fib1 = this.fib2 = 1 + } + + /** + * Iterable protocol. + * + * @public + * @instance + * + * @return {IterableIterator} Current sequence iterator + */ + public [Symbol.iterator](): IterableIterator { + return this + } + + /** + * Get the next value in the fibonacci sequence. + * + * @public + * @instance + * + * @return {IteratorResult} Next sequence value + */ + public next(): IteratorResult { + /** + * Temporary sequence value. + * + * @const {number} value + */ + const value: number = this.fib1 + + // reset current sequence values + this.fib1 = this.fib2 + this.fib2 = value + this.fib1 + + return { done: value >= this.#max, value } + } +} + +export default FibonacciSequence diff --git a/__tests__/setup/chai.ts b/__tests__/setup/chai.ts deleted file mode 100644 index feec190b..00000000 --- a/__tests__/setup/chai.ts +++ /dev/null @@ -1,20 +0,0 @@ -/** - * @file Test Setup - chai - * @module tests/setup/chai - * @see https://chaijs.com - */ - -import { JestExtend as extend } from '@vitest/expect' -import chaiQuantifiers from 'chai-quantifiers' -import chaiString from 'chai-string' -import { chai } from 'vitest' - -/** - * initialize chai plugins. - * - * @see https://github.com/funny-bytes/chai-quantifiers - * @see https://github.com/onechiporenko/chai-string - */ -extend(chai, chai.util) -chai.use(chaiQuantifiers) -chai.use(chaiString) diff --git a/__tests__/setup/index.ts b/__tests__/setup/index.ts index 65a9a5b4..9edeca5e 100644 --- a/__tests__/setup/index.ts +++ b/__tests__/setup/index.ts @@ -3,6 +3,4 @@ * @module tests/setup */ -import './chai' -import './matchers' -import './serializers' +export {} diff --git a/__tests__/setup/matchers/index.ts b/__tests__/setup/matchers/index.ts deleted file mode 100644 index 1dd460ec..00000000 --- a/__tests__/setup/matchers/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @file Entry Point - Custom Matchers - * @module tests/setup/matchers - * @see https://vitest.dev/guide/extending-matchers.html - */ - -export {} diff --git a/__tests__/setup/serializers/index.ts b/__tests__/setup/serializers/index.ts deleted file mode 100644 index 73e9e16e..00000000 --- a/__tests__/setup/serializers/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** - * @file Entry Point - Snapshot Serializers - * @module tests/setup/serializers - * @see https://vitest.dev/guide/snapshot.html#custom-serializer - */ - -export {} diff --git a/build.config.ts b/build.config.ts index df654f4a..e17886e7 100644 --- a/build.config.ts +++ b/build.config.ts @@ -17,7 +17,6 @@ const config: Config = defineBuildConfig({ charset: 'utf8', entries: [ { dts: 'only' }, - { dts: false, pattern: ['enums/*'] }, { dts: false, pattern: ['*.ts'], sourcemap: true, sourcesContent: false } ], target: [ diff --git a/loader.mjs b/loader.mjs index 2c9efc8a..24c8df58 100644 --- a/loader.mjs +++ b/loader.mjs @@ -44,6 +44,7 @@ const cwd = pathToFileURL(tsconfig.compilerOptions.baseUrl) */ export const load = async (url, context) => { // get module format + context.conditions = context.conditions ?? [] context.format = context.format ?? (await mlly.getFormat(url)) // validate import assertions @@ -65,6 +66,14 @@ export const load = async (url, context) => { */ let source = await mlly.getSource(url, { format: context.format }) + // add custom conditions + if (tutils.isArray(tsconfig.compilerOptions.customConditions)) { + context.conditions = [ + ...context.conditions, + ...tsconfig.compilerOptions.customConditions + ] + } + // emit decorator metadata DECORATOR_REGEX.lastIndex = 0 if (DECORATOR_REGEX.test(source)) { @@ -80,7 +89,6 @@ export const load = async (url, context) => { if (/^\.(?:cts|mts|tsx?)$/.test(ext) && !/\.d\.(?:cts|mts|ts)$/.test(url)) { // push require condition for .cts files and update format if (ext === '.cts') { - context.conditions = context.conditions ?? [] context.conditions.unshift('require', 'node') context.format = mlly.Format.MODULE } @@ -88,7 +96,7 @@ export const load = async (url, context) => { // resolve path aliases source = await mlly.resolveAliases(source, { aliases: tsconfig.compilerOptions.paths, - conditions: context.conditions, + conditions: new Set(context.conditions), cwd, ext: '', parent: url @@ -96,7 +104,7 @@ export const load = async (url, context) => { // resolve modules source = await mlly.resolveModules(source, { - conditions: context.conditions, + conditions: new Set(context.conditions), parent: url }) diff --git a/package.json b/package.json index 99c97ece..e50cfcea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@flex-development/docast-parse", - "description": "unified compliant file parser for docast", + "description": "unified compliant parser for docast", "version": "1.0.0-alpha.5", "keywords": [ "abstract-syntax-tree", @@ -74,16 +74,16 @@ "prepublishOnly": "toggle-scripts -prepack", "release": "bash ./scripts/release.sh", "test": "vitest run", + "test:bench": "vitest bench --run", "test:cov": "yarn clean:coverage; yarn test --coverage", "test:cov:serve": "vite preview --outDir ./coverage", "test:cov:upload": "./codecov -t $CODECOV_TOKEN -f ./coverage/lcov.info", "test:watch": "vitest", - "typecheck": "vitest --run --typecheck", - "typecheck:watch": "vitest --typecheck" + "typecheck": "vitest run --mode=typecheck --typecheck", + "typecheck:watch": "vitest --mode=typecheck --typecheck" }, "dependencies": { - "@flex-development/tutils": "6.0.0-alpha.25", - "unist-builder": "4.0.0" + "@flex-development/docast-util-from-docs": "1.0.0-alpha.1" }, "devDependencies": { "@arethetypeswrong/cli": "0.13.6", @@ -91,37 +91,37 @@ "@commitlint/types": "18.6.0", "@flex-development/commitlint-config": "1.0.1", "@flex-development/decorator-regex": "2.0.0", - "@flex-development/docast": "1.0.0-alpha.13", + "@flex-development/docast": "1.0.0-alpha.14", "@flex-development/esm-types": "2.0.0", "@flex-development/grease": "3.0.0-alpha.9", "@flex-development/mkbuild": "1.0.0-alpha.23", "@flex-development/mlly": "1.0.0-alpha.18", "@flex-development/pathe": "2.0.0", + "@flex-development/tutils": "6.0.0-alpha.25", + "@html-eslint/eslint-plugin": "0.23.1", + "@html-eslint/parser": "0.23.0", "@types/chai": "4.3.11", - "@types/chai-string": "1.4.5", "@types/eslint": "8.56.2", "@types/is-ci": "3.0.4", "@types/mdast": "4.0.3", - "@types/node": "20.11.16", + "@types/node": "20.11.19", "@types/node-notifier": "8.0.5", "@types/unist": "3.0.2", "@typescript-eslint/eslint-plugin": "6.20.0", "@typescript-eslint/parser": "6.20.0", "@vates/toggle-scripts": "1.0.0", - "@vitest/coverage-v8": "1.2.2", - "chai": "5.0.3", - "chai-quantifiers": "1.0.17", - "chai-string": "1.5.0", + "@vitest/coverage-v8": "1.3.0", + "chai": "5.1.0", "cross-env": "7.0.3", "cspell": "8.3.2", - "debug": "4.3.4", "dprint": "0.45.0", "editorconfig": "2.0.0", - "esbuild": "0.20.0", + "esbuild": "0.20.1", "eslint": "8.56.0", "eslint-import-resolver-typescript": "3.6.1", "eslint-mdx": "3.1.5", "eslint-plugin-chai-expect": "3.0.0", + "eslint-plugin-html": "8.0.0", "eslint-plugin-import": "2.29.1", "eslint-plugin-jest-formatting": "3.1.0", "eslint-plugin-jsdoc": "48.0.4", @@ -138,6 +138,10 @@ "is-ci": "3.0.1", "jsonc-eslint-parser": "2.4.0", "lint-staged": "15.2.1", + "mdast-util-directive": "3.0.0", + "mdast-util-from-markdown": "2.0.0", + "micromark-extension-directive": "3.0.0", + "micromark-util-types": "2.0.0", "node-notifier": "10.0.1", "prettier": "3.2.4", "remark": "15.0.1", @@ -145,25 +149,41 @@ "remark-frontmatter": "5.0.0", "remark-gfm": "4.0.0", "sh-syntax": "0.4.2", + "to-vfile": "8.0.0", "trash-cli": "5.0.0", "ts-dedent": "2.2.0", "typescript": "5.3.3", "unified": "11.0.4", "unist-util-inspect": "8.0.0", - "unist-util-source": "5.0.0", "vfile": "6.0.1", - "vite": "5.0.12", - "vite-tsconfig-paths": "4.2.3", - "vitest": "1.2.2", + "vite": "5.1.3", + "vite-tsconfig-paths": "4.3.1", + "vitest": "1.3.0", "yaml-eslint-parser": "1.2.2" }, "peerDependencies": { - "@flex-development/docast": ">=1.0.0-alpha.13", + "@flex-development/docast": ">=1.0.0-alpha.14", "@types/mdast": ">=4.0.3", - "@types/unist": ">=3.0.2" + "@types/unist": ">=3.0.2", + "micromark-util-types": ">=2.0.0", + "unified": ">=11.0.4" + }, + "peerDependenciesMeta": { + "@flex-development/docast": { + "optional": true + }, + "@types/mdast": { + "optional": true + }, + "@types/unist": { + "optional": true + }, + "micromark-util-types": { + "optional": true + } }, "resolutions": { - "chai": "5.0.3" + "chai": "5.1.0" }, "engines": { "node": ">=18.18.2" diff --git a/src/__snapshots__/plugin.integration.snap b/src/__snapshots__/plugin.integration.snap new file mode 100644 index 00000000..00ed6940 --- /dev/null +++ b/src/__snapshots__/plugin.integration.snap @@ -0,0 +1,121 @@ +// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html + +exports[`integration:plugin > empty document > should configure parser 1`] = `root[0]`; + +exports[`integration:plugin > non-empty document > should configure parser 1`] = ` +root[9] +├─0 comment[3] (1:1-5:4, 0-142) +│ │ code: null +│ ├─0 blockTag[1] (2:4-2:38, 7-41) +│ │ │ tag: "@file" +│ │ └─0 text "Fixtures - FibonacciSequence" (2:10-2:38, 13-41) +│ ├─1 blockTag[1] (3:4-3:38, 45-79) +│ │ │ tag: "@module" +│ │ └─0 text "fixtures/FibonacciSequence" (3:12-3:38, 53-79) +│ └─2 blockTag[1] (4:4-4:59, 83-138) +│ │ tag: "@see" +│ └─0 text "https://codewars.com/kata/55695bc4f75bbaea5100016b" (4:9-4:59, 88-138) +├─1 comment[2] (7:1-19:4, 144-434) +│ │ code: null +│ ├─0 description[4] (8:4-16:7, 151-385) +│ │ ├─0 paragraph[1] (8:4-8:32, 151-179) +│ │ │ └─0 text "Fibonacci sequence iterator." (8:4-8:32, 151-179) +│ │ ├─1 break (8:32-9:1, 179-180) +│ │ ├─2 break (9:3-10:1, 182-183) +│ │ │ data: {"blank":true} +│ │ └─3 containerDirective[2] (10:4-16:7, 186-385) +│ │ │ attributes: {} +│ │ ├─0 paragraph[3] (11:4-12:37, 197-308) +│ │ │ ├─0 text "A fibonacci sequence starts with two " (11:4-11:41, 197-234) +│ │ │ ├─1 inlineCode "1" (11:41-11:44, 234-237) +│ │ │ └─2 text "s. Every element afterwards is the sum of the two previous elements:" (11:44-12:37, 237-308) +│ │ └─1 code "1, 1, 2, 3, 5, 8, 13, ..., 89, 144, 233, 377, ..." (13:4-15:7, 312-378) +│ │ lang: "txt" +│ │ meta: null +│ └─1 blockTag[1] (18:4-18:42, 392-430) +│ │ tag: "@implements" +│ └─0 typeExpression "Iterator" (18:16-18:42, 404-430) +├─2 comment[4] (21:3-27:6, 499-603) +│ │ code: null +│ ├─0 description[1] (22:6-22:35, 508-537) +│ │ └─0 paragraph[1] (22:6-22:35, 508-537) +│ │ └─0 text "First managed sequence value." (22:6-22:35, 508-537) +│ ├─1 blockTag[0] (24:6-24:13, 548-555) +│ │ tag: "@public" +│ ├─2 blockTag[0] (25:6-25:15, 561-570) +│ │ tag: "@instance" +│ └─3 blockTag[2] (26:6-26:27, 576-597) +│ │ tag: "@member" +│ ├─0 typeExpression "number" (26:14-26:22, 584-592) +│ └─1 text "fib1" (26:23-26:27, 593-597) +├─3 comment[4] (30:3-36:6, 629-734) +│ │ code: null +│ ├─0 description[1] (31:6-31:36, 638-668) +│ │ └─0 paragraph[1] (31:6-31:36, 638-668) +│ │ └─0 text "Second managed sequence value." (31:6-31:36, 638-668) +│ ├─1 blockTag[0] (33:6-33:13, 679-686) +│ │ tag: "@public" +│ ├─2 blockTag[0] (34:6-34:15, 692-701) +│ │ tag: "@instance" +│ └─3 blockTag[2] (35:6-35:27, 707-728) +│ │ tag: "@member" +│ ├─0 typeExpression "number" (35:14-35:22, 715-723) +│ └─1 text "fib2" (35:23-35:27, 724-728) +├─4 comment[4] (39:3-45:6, 760-854) +│ │ code: null +│ ├─0 description[1] (40:6-40:25, 769-788) +│ │ └─0 paragraph[1] (40:6-40:25, 769-788) +│ │ └─0 text "Max sequence value." (40:6-40:25, 769-788) +│ ├─1 blockTag[0] (42:6-42:14, 799-807) +│ │ tag: "@private" +│ ├─2 blockTag[0] (43:6-43:15, 813-822) +│ │ tag: "@instance" +│ └─3 blockTag[2] (44:6-44:26, 828-848) +│ │ tag: "@member" +│ ├─0 typeExpression "number" (44:14-44:22, 836-844) +│ └─1 text "max" (44:23-44:26, 845-848) +├─5 comment[2] (48:3-52:6, 882-1015) +│ │ code: null +│ ├─0 description[1] (49:6-49:47, 891-932) +│ │ └─0 paragraph[1] (49:6-49:47, 891-932) +│ │ └─0 text "Create a new fibonacci sequence iterator." (49:6-49:47, 891-932) +│ └─1 blockTag[2] (51:6-51:72, 943-1009) +│ │ tag: "@param" +│ ├─0 typeExpression "number" (51:13-51:21, 950-958) +│ └─1 text "[max=Number.MAX_SAFE_INTEGER] - Max sequence value" (51:22-51:72, 959-1009) +├─6 comment[4] (58:3-65:6, 1142-1279) +│ │ code: null +│ ├─0 description[1] (59:6-59:24, 1151-1169) +│ │ └─0 paragraph[1] (59:6-59:24, 1151-1169) +│ │ └─0 text "Iterable protocol." (59:6-59:24, 1151-1169) +│ ├─1 blockTag[0] (61:6-61:13, 1180-1187) +│ │ tag: "@public" +│ ├─2 blockTag[0] (62:6-62:15, 1193-1202) +│ │ tag: "@instance" +│ └─3 blockTag[2] (64:6-64:66, 1213-1273) +│ │ tag: "@return" +│ ├─0 typeExpression "IterableIterator" (64:14-64:40, 1221-1247) +│ └─1 text "Current sequence iterator" (64:41-64:66, 1248-1273) +├─7 comment[4] (70:3-77:6, 1360-1524) +│ │ code: null +│ ├─0 description[1] (71:6-71:51, 1369-1414) +│ │ └─0 paragraph[1] (71:6-71:51, 1369-1414) +│ │ └─0 text "Get the next value in the fibonacci sequence." (71:6-71:51, 1369-1414) +│ ├─1 blockTag[0] (73:6-73:13, 1425-1432) +│ │ tag: "@public" +│ ├─2 blockTag[0] (74:6-74:15, 1438-1447) +│ │ tag: "@instance" +│ └─3 blockTag[2] (76:6-76:66, 1458-1518) +│ │ tag: "@return" +│ ├─0 typeExpression "IteratorResult" (76:14-76:46, 1466-1498) +│ └─1 text "Next sequence value" (76:47-76:66, 1499-1518) +└─8 comment[2] (79:5-83:8, 1579-1659) + │ code: null + ├─0 description[1] (80:8-80:33, 1590-1615) + │ └─0 paragraph[1] (80:8-80:33, 1590-1615) + │ └─0 text "Temporary sequence value." (80:8-80:33, 1590-1615) + └─1 blockTag[2] (82:8-82:29, 1630-1651) + │ tag: "@const" + ├─0 typeExpression "number" (82:15-82:23, 1637-1645) + └─1 text "value" (82:24-82:29, 1646-1651) +`; diff --git a/src/__tests__/plugin.integration.spec.ts b/src/__tests__/plugin.integration.spec.ts new file mode 100644 index 00000000..e4de8e66 --- /dev/null +++ b/src/__tests__/plugin.integration.spec.ts @@ -0,0 +1,48 @@ +/** + * @file Integration Tests - plugin + * @module docast-parse/tests/integration/plugin + */ + +import type { Options } from '@flex-development/docast-util-from-docs' +import { constant, type Nilable } from '@flex-development/tutils' +import { directiveFromMarkdown } from 'mdast-util-directive' +import { directive } from 'micromark-extension-directive' +import { read } from 'to-vfile' +import { unified } from 'unified' +import { inspectNoColor } from 'unist-util-inspect' +import { VFile } from 'vfile' +import type { TestContext } from 'vitest' +import testSubject from '../plugin' + +describe('integration:plugin', () => { + beforeEach((ctx: TestContext): void => { + ctx.expect.addSnapshotSerializer({ + print: (val: unknown): string => inspectNoColor(val), + test: constant(true) + }) + }) + + describe.each<['empty' | 'non-empty', Nilable?]>([ + ['empty'], + ['non-empty', { + mdastExtensions: [directiveFromMarkdown()], + micromarkExtensions: [directive()] + }] + ])('%s document', (type, options) => { + let file: VFile + let value: string + + beforeAll(async () => { + value = type === 'empty' ? '' : '__fixtures__/fibonacci-sequence.ts' + file = type === 'empty' ? new VFile(value) : await read(value) + }) + + it('should configure parser', async () => { + // Act + const result = unified().use(testSubject, options).parse(file) + + // Expect + expect(result).toMatchSnapshot() + }) + }) +}) diff --git a/src/__tests__/plugin.spec-d.ts b/src/__tests__/plugin.spec-d.ts new file mode 100644 index 00000000..0283675f --- /dev/null +++ b/src/__tests__/plugin.spec-d.ts @@ -0,0 +1,30 @@ +/** + * @file Type Tests - plugin + * @module docast-parse/tests/unit-d/plugin + */ + +import type { Root } from '@flex-development/docast' +import type { Options } from '@flex-development/docast-util-from-docs' +import type { Nilable } from '@flex-development/tutils' +import type * as unified from 'unified' +import type TestSubject from '../plugin' + +describe('unit-d:plugin', () => { + it('should match unified.Plugin<[Nilable?], string, Root>', () => { + expectTypeOf() + .toMatchTypeOf?], string, Root>>() + }) + + describe('parameters', () => { + it('should be callable with [Nilable?]', () => { + expectTypeOf() + .parameters.toEqualTypeOf<[Nilable?]>() + }) + }) + + describe('returns', () => { + it('should return void', () => { + expectTypeOf().returns.toBeVoid() + }) + }) +}) diff --git a/src/index.ts b/src/index.ts index c5665c42..cc1c6ea8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,4 +3,4 @@ * @module docast-parse */ -export {} +export { default } from './plugin' diff --git a/src/plugin.ts b/src/plugin.ts new file mode 100644 index 00000000..8c77c1f8 --- /dev/null +++ b/src/plugin.ts @@ -0,0 +1,102 @@ +/** + * @file Plugin + * @module docast-parse/plugin + */ + +import type { Root } from '@flex-development/docast' +import { fromDocs, type Options } from '@flex-development/docast-util-from-docs' +import type { Nilable, Optional } from '@flex-development/tutils' +import type { Extension as MdastExtension } from 'mdast-util-from-markdown' +import type { Extension as MicromarkExtension } from 'micromark-util-types' +import type { Data, Plugin, Processor } from 'unified' +import type { VFile } from 'vfile' + +declare module 'unified' { + interface Data { + /** + * Markdown extensions to change how micromark tokens are converted to + * nodes. + * + * @see {@linkcode MdastExtension} + * @see https://github.com/syntax-tree/mdast-util-from-markdown#list-of-extensions + */ + fromMarkdownExtensions?: Optional + + /** + * Micromark extensions to change how markdown is parsed. + * + * @see {@linkcode MicromarkExtension} + * @see https://github.com/micromark/micromark#extensions + */ + micromarkExtensions?: Optional + } + + interface Settings extends Options {} +} + +/** + * Configure the docblock parser. + * + * @see {@linkcode Options} + * @see {@linkcode Processor} + * + * @this {Processor} + * + * @param {Nilable?} [options] - Configuration options + * @return {void} Nothing + */ +function plugin(this: Processor, options?: Nilable): void { + /** + * Processor data. + * + * @const {Data} data + */ + const data: Data = this.data() + + // initialize extensions + data.fromMarkdownExtensions ??= [] + data.micromarkExtensions ??= [] + + // initialize options + options ??= {} + options.mdastExtensions ??= [] + options.micromarkExtensions ??= [] + + // configure extensions + data.fromMarkdownExtensions.push(...options.mdastExtensions) + data.micromarkExtensions.push(...options.micromarkExtensions) + + /** + * Docblock parser. + * + * @param {string} document - Source document + * @param {VFile} file - Source file + * @return {Root} docast tree + */ + const parser = (document: string, file: VFile): Root => { + return fromDocs(String(file), { + ...this.data('settings'), + ...options, + mdastExtensions: data.fromMarkdownExtensions, + micromarkExtensions: data.micromarkExtensions + }) + } + + return void (this.parser = parser) +} + +/** + * Add support for docblock parsing. + * + * @see {@linkcode Options} + * @see {@linkcode Plugin} + * @see {@linkcode Root} + * + * @this {Processor} + * + * @param {Nilable?} [options] - Configuration options + * @return {void} Nothing + */ +const docastParse: Plugin<[Nilable?], string, Root> = plugin + +export default docastParse diff --git a/tsconfig.build.json b/tsconfig.build.json index 85e80f5e..e4e87048 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,5 +1,6 @@ { "compilerOptions": { + "customConditions": ["import", "node"], "declaration": true, "noEmitOnError": true, "skipLibCheck": false, diff --git a/tsconfig.cjs.json b/tsconfig.cjs.json deleted file mode 100644 index 20f92240..00000000 --- a/tsconfig.cjs.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "compilerOptions": { - "composite": true, - "customConditions": ["require", "node", "default"], - "declaration": true, - "emitDeclarationOnly": true, - "noEmit": false, - "outDir": ".", - "verbatimModuleSyntax": false - }, - "exclude": ["**/coverage", "**/dist", "**/node_modules"], - "extends": "./tsconfig.json", - "include": [ - "**/**.cjs", - "**/**.cts", - "**/**.json", - "**/.*.cjs", - "**/.*.cts", - "**/.*.json" - ] -} diff --git a/tsconfig.json b/tsconfig.json index b57a30d3..5b9a2ff2 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "alwaysStrict": false, "baseUrl": ".", "checkJs": false, - "customConditions": ["import", "node", "default"], + "customConditions": ["development", "import", "node"], "declaration": false, "declarationMap": false, "emitDecoratorMetadata": false, @@ -14,7 +14,7 @@ "exactOptionalPropertyTypes": true, "experimentalDecorators": false, "forceConsistentCasingInFileNames": true, - "lib": ["es2022"], + "lib": ["es2023"], "module": "esnext", "moduleResolution": "bundler", "newLine": "lf", @@ -29,9 +29,8 @@ "noUnusedParameters": false, "outDir": "dist", "paths": { - "#src": ["src/index"], - "#src/*": ["src/*"], - "#tests/*": ["__tests__/*"] + "#tests/*": ["__tests__/*"], + "@flex-development/docast-parse": ["src/index"] }, "preserveConstEnums": true, "preserveSymlinks": false, @@ -53,12 +52,15 @@ }, "exclude": ["**/coverage", "**/dist", "**/node_modules"], "include": [ + "**/**.json", "**/**.mjs", "**/**.mts", "**/**.ts", + "**/.*.json", "**/.*.mjs", "**/.*.mts", - "**/.*.ts" + "**/.*.ts", + ".eslintrc*cjs" ], "mdx": { "plugins": [ @@ -66,6 +68,5 @@ "remark-frontmatter", "remark-gfm" ] - }, - "references": [{ "path": "./tsconfig.cjs.json" }] + } } diff --git a/tsconfig.typecheck.json b/tsconfig.typecheck.json index 7451eaf4..aeee7e65 100644 --- a/tsconfig.typecheck.json +++ b/tsconfig.typecheck.json @@ -1,15 +1,5 @@ { - "compilerOptions": { - "target": "es2022" - }, "exclude": ["**/coverage", "**/dist", "**/node_modules"], "extends": "./tsconfig.json", - "include": [ - "**/**.cts", - "**/**.mts", - "**/**.ts", - "**/.*.cts", - "**/.*.mts", - "**/.*.ts" - ] + "include": ["**/**.ts", "**/.*.ts"] } diff --git a/vitest.config.ts b/vitest.config.ts index 851a6cec..a532f4c3 100644 --- a/vitest.config.ts +++ b/vitest.config.ts @@ -5,22 +5,24 @@ */ import pathe from '@flex-development/pathe' -import { ifelse, sift } from '@flex-development/tutils' +import { ifelse, includes, sift } from '@flex-development/tutils' import ci from 'is-ci' import tsconfigPaths from 'vite-tsconfig-paths' import { defineConfig, + type ConfigEnv, type UserConfig, type UserConfigExport } from 'vitest/config' import { BaseSequencer, type WorkspaceSpec } from 'vitest/node' +import Notifier from './__tests__/reporters/notifier' /** * Vitest configuration export. * * @const {UserConfigExport} config */ -const config: UserConfigExport = defineConfig((): UserConfig => { +const config: UserConfigExport = defineConfig((env: ConfigEnv): UserConfig => { /** * [`lint-staged`][1] check. * @@ -32,10 +34,18 @@ const config: UserConfigExport = defineConfig((): UserConfig => { return { define: {}, - plugins: [tsconfigPaths({ projects: [pathe.resolve('tsconfig.json')] })], + plugins: [ + tsconfigPaths({ + parseNative: true, + projects: [pathe.resolve('tsconfig.json')] + }) + ], test: { allowOnly: !ci, - benchmark: {}, + benchmark: { + include: ['**/__tests__/*.bench.spec.ts?(x)'], + reporters: [new Notifier(), 'json', 'verbose'] + }, chaiConfig: { includeStack: true, showDiff: true, @@ -62,6 +72,14 @@ const config: UserConfigExport = defineConfig((): UserConfig => { }, environment: 'node', environmentOptions: {}, + exclude: [ + '**/__tests__/*.bench.spec.ts?(x)', + '.cache', + '.git', + '.idea', + 'dist', + 'node_modules' + ], globalSetup: [], globals: true, hookTimeout: 10 * 1000, @@ -69,13 +87,13 @@ const config: UserConfigExport = defineConfig((): UserConfig => { `**/__tests__/*.${ifelse(LINT_STAGED, '{spec,spec-d}', 'spec')}.ts?(x)` ], mockReset: true, - outputFile: { json: './__tests__/report.json' }, + outputFile: { + json: includes(['benchmark', 'typecheck'], env.mode) + ? pathe.join('__tests__', pathe.addExt(env.mode, 'json')) + : '__tests__/report.json' + }, passWithNoTests: true, - reporters: sift([ - 'json', - 'verbose', - ifelse(ci, '', './__tests__/reporters/notifier.ts') - ]), + reporters: sift([ifelse(ci, null, new Notifier()), 'json', 'verbose']), /** * Stores snapshots next to `file`'s directory. * @@ -128,7 +146,7 @@ const config: UserConfigExport = defineConfig((): UserConfig => { ignoreSourceErrors: false, include: ['**/__tests__/*.spec-d.ts'], only: true, - tsconfig: pathe.resolve('tsconfig.typecheck.json') + tsconfig: 'tsconfig.typecheck.json' }, unstubEnvs: true, unstubGlobals: true diff --git a/yarn.lock b/yarn.lock index b3b294b4..a50d25f8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -845,9 +845,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/aix-ppc64@npm:0.20.0" +"@esbuild/aix-ppc64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/aix-ppc64@npm:0.20.1" conditions: os=aix & cpu=ppc64 languageName: node linkType: hard @@ -866,9 +866,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-arm64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/android-arm64@npm:0.20.0" +"@esbuild/android-arm64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/android-arm64@npm:0.20.1" conditions: os=android & cpu=arm64 languageName: node linkType: hard @@ -887,9 +887,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-arm@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/android-arm@npm:0.20.0" +"@esbuild/android-arm@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/android-arm@npm:0.20.1" conditions: os=android & cpu=arm languageName: node linkType: hard @@ -908,9 +908,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/android-x64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/android-x64@npm:0.20.0" +"@esbuild/android-x64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/android-x64@npm:0.20.1" conditions: os=android & cpu=x64 languageName: node linkType: hard @@ -929,9 +929,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/darwin-arm64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/darwin-arm64@npm:0.20.0" +"@esbuild/darwin-arm64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/darwin-arm64@npm:0.20.1" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard @@ -950,9 +950,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/darwin-x64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/darwin-x64@npm:0.20.0" +"@esbuild/darwin-x64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/darwin-x64@npm:0.20.1" conditions: os=darwin & cpu=x64 languageName: node linkType: hard @@ -971,9 +971,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/freebsd-arm64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/freebsd-arm64@npm:0.20.0" +"@esbuild/freebsd-arm64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/freebsd-arm64@npm:0.20.1" conditions: os=freebsd & cpu=arm64 languageName: node linkType: hard @@ -992,9 +992,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/freebsd-x64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/freebsd-x64@npm:0.20.0" +"@esbuild/freebsd-x64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/freebsd-x64@npm:0.20.1" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard @@ -1013,9 +1013,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-arm64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/linux-arm64@npm:0.20.0" +"@esbuild/linux-arm64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/linux-arm64@npm:0.20.1" conditions: os=linux & cpu=arm64 languageName: node linkType: hard @@ -1034,9 +1034,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-arm@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/linux-arm@npm:0.20.0" +"@esbuild/linux-arm@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/linux-arm@npm:0.20.1" conditions: os=linux & cpu=arm languageName: node linkType: hard @@ -1055,9 +1055,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-ia32@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/linux-ia32@npm:0.20.0" +"@esbuild/linux-ia32@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/linux-ia32@npm:0.20.1" conditions: os=linux & cpu=ia32 languageName: node linkType: hard @@ -1076,9 +1076,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-loong64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/linux-loong64@npm:0.20.0" +"@esbuild/linux-loong64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/linux-loong64@npm:0.20.1" conditions: os=linux & cpu=loong64 languageName: node linkType: hard @@ -1097,9 +1097,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-mips64el@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/linux-mips64el@npm:0.20.0" +"@esbuild/linux-mips64el@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/linux-mips64el@npm:0.20.1" conditions: os=linux & cpu=mips64el languageName: node linkType: hard @@ -1118,9 +1118,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-ppc64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/linux-ppc64@npm:0.20.0" +"@esbuild/linux-ppc64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/linux-ppc64@npm:0.20.1" conditions: os=linux & cpu=ppc64 languageName: node linkType: hard @@ -1139,9 +1139,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-riscv64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/linux-riscv64@npm:0.20.0" +"@esbuild/linux-riscv64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/linux-riscv64@npm:0.20.1" conditions: os=linux & cpu=riscv64 languageName: node linkType: hard @@ -1160,9 +1160,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-s390x@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/linux-s390x@npm:0.20.0" +"@esbuild/linux-s390x@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/linux-s390x@npm:0.20.1" conditions: os=linux & cpu=s390x languageName: node linkType: hard @@ -1181,9 +1181,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/linux-x64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/linux-x64@npm:0.20.0" +"@esbuild/linux-x64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/linux-x64@npm:0.20.1" conditions: os=linux & cpu=x64 languageName: node linkType: hard @@ -1202,9 +1202,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/netbsd-x64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/netbsd-x64@npm:0.20.0" +"@esbuild/netbsd-x64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/netbsd-x64@npm:0.20.1" conditions: os=netbsd & cpu=x64 languageName: node linkType: hard @@ -1223,9 +1223,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/openbsd-x64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/openbsd-x64@npm:0.20.0" +"@esbuild/openbsd-x64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/openbsd-x64@npm:0.20.1" conditions: os=openbsd & cpu=x64 languageName: node linkType: hard @@ -1244,9 +1244,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/sunos-x64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/sunos-x64@npm:0.20.0" +"@esbuild/sunos-x64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/sunos-x64@npm:0.20.1" conditions: os=sunos & cpu=x64 languageName: node linkType: hard @@ -1265,9 +1265,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-arm64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/win32-arm64@npm:0.20.0" +"@esbuild/win32-arm64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/win32-arm64@npm:0.20.1" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard @@ -1286,9 +1286,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-ia32@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/win32-ia32@npm:0.20.0" +"@esbuild/win32-ia32@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/win32-ia32@npm:0.20.1" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard @@ -1307,9 +1307,9 @@ __metadata: languageName: node linkType: hard -"@esbuild/win32-x64@npm:0.20.0": - version: 0.20.0 - resolution: "@esbuild/win32-x64@npm:0.20.0" +"@esbuild/win32-x64@npm:0.20.1": + version: 0.20.1 + resolution: "@esbuild/win32-x64@npm:0.20.1" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -1409,38 +1409,38 @@ __metadata: "@commitlint/types": "npm:18.6.0" "@flex-development/commitlint-config": "npm:1.0.1" "@flex-development/decorator-regex": "npm:2.0.0" - "@flex-development/docast": "npm:1.0.0-alpha.13" + "@flex-development/docast": "npm:1.0.0-alpha.14" + "@flex-development/docast-util-from-docs": "npm:1.0.0-alpha.1" "@flex-development/esm-types": "npm:2.0.0" "@flex-development/grease": "npm:3.0.0-alpha.9" "@flex-development/mkbuild": "npm:1.0.0-alpha.23" "@flex-development/mlly": "npm:1.0.0-alpha.18" "@flex-development/pathe": "npm:2.0.0" "@flex-development/tutils": "npm:6.0.0-alpha.25" + "@html-eslint/eslint-plugin": "npm:0.23.1" + "@html-eslint/parser": "npm:0.23.0" "@types/chai": "npm:4.3.11" - "@types/chai-string": "npm:1.4.5" "@types/eslint": "npm:8.56.2" "@types/is-ci": "npm:3.0.4" "@types/mdast": "npm:4.0.3" - "@types/node": "npm:20.11.16" + "@types/node": "npm:20.11.19" "@types/node-notifier": "npm:8.0.5" "@types/unist": "npm:3.0.2" "@typescript-eslint/eslint-plugin": "npm:6.20.0" "@typescript-eslint/parser": "npm:6.20.0" "@vates/toggle-scripts": "npm:1.0.0" - "@vitest/coverage-v8": "npm:1.2.2" - chai: "npm:5.0.3" - chai-quantifiers: "npm:1.0.17" - chai-string: "npm:1.5.0" + "@vitest/coverage-v8": "npm:1.3.0" + chai: "npm:5.1.0" cross-env: "npm:7.0.3" cspell: "npm:8.3.2" - debug: "npm:4.3.4" dprint: "npm:0.45.0" editorconfig: "npm:2.0.0" - esbuild: "npm:0.20.0" + esbuild: "npm:0.20.1" eslint: "npm:8.56.0" eslint-import-resolver-typescript: "npm:3.6.1" eslint-mdx: "npm:3.1.5" eslint-plugin-chai-expect: "npm:3.0.0" + eslint-plugin-html: "npm:8.0.0" eslint-plugin-import: "npm:2.29.1" eslint-plugin-jest-formatting: "npm:3.1.0" eslint-plugin-jsdoc: "npm:48.0.4" @@ -1457,6 +1457,10 @@ __metadata: is-ci: "npm:3.0.1" jsonc-eslint-parser: "npm:2.4.0" lint-staged: "npm:15.2.1" + mdast-util-directive: "npm:3.0.0" + mdast-util-from-markdown: "npm:2.0.0" + micromark-extension-directive: "npm:3.0.0" + micromark-util-types: "npm:2.0.0" node-notifier: "npm:10.0.1" prettier: "npm:3.2.4" remark: "npm:15.0.1" @@ -1464,33 +1468,64 @@ __metadata: remark-frontmatter: "npm:5.0.0" remark-gfm: "npm:4.0.0" sh-syntax: "npm:0.4.2" + to-vfile: "npm:8.0.0" trash-cli: "npm:5.0.0" ts-dedent: "npm:2.2.0" typescript: "npm:5.3.3" unified: "npm:11.0.4" - unist-builder: "npm:4.0.0" unist-util-inspect: "npm:8.0.0" - unist-util-source: "npm:5.0.0" vfile: "npm:6.0.1" - vite: "npm:5.0.12" - vite-tsconfig-paths: "npm:4.2.3" - vitest: "npm:1.2.2" + vite: "npm:5.1.3" + vite-tsconfig-paths: "npm:4.3.1" + vitest: "npm:1.3.0" yaml-eslint-parser: "npm:1.2.2" peerDependencies: - "@flex-development/docast": ">=1.0.0-alpha.13" + "@flex-development/docast": ">=1.0.0-alpha.14" "@types/mdast": ">=4.0.3" "@types/unist": ">=3.0.2" + micromark-util-types: ">=2.0.0" + unified: ">=11.0.4" + peerDependenciesMeta: + "@flex-development/docast": + optional: true + "@types/mdast": + optional: true + "@types/unist": + optional: true + micromark-util-types: + optional: true languageName: unknown linkType: soft -"@flex-development/docast@npm:1.0.0-alpha.13": - version: 1.0.0-alpha.13 - resolution: "@flex-development/docast@npm:1.0.0-alpha.13::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40flex-development%2Fdocast%2F1.0.0-alpha.13%2F6009bce2fa2ad58c448e3ccbb9e1a00e36411e19" +"@flex-development/docast-util-from-docs@npm:1.0.0-alpha.1": + version: 1.0.0-alpha.1 + resolution: "@flex-development/docast-util-from-docs@npm:1.0.0-alpha.1::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40flex-development%2Fdocast-util-from-docs%2F1.0.0-alpha.1%2Fe64892eeb850c6bc25f92ef5931582901eb9bf64" dependencies: - "@flex-development/tutils": "npm:6.0.0-alpha.12" + "@flex-development/tutils": "npm:6.0.0-alpha.25" + devlop: "npm:1.1.0" + mdast-util-from-markdown: "npm:2.0.0" + micromark-util-symbol: "npm:2.0.0" + unist-builder: "npm:4.0.0" + unist-util-source: "npm:5.0.0" + unist-util-visit: "npm:5.0.0" peerDependencies: - "@types/unist": ">=2.0.6" - checksum: 10/15ef36368111dc07236bd4f628439ab2f1e409f9223c29e9c16ca9bc706db0c2c31973d098a58ecdd882cbef5e0e49297d75dcc4bbd6dc117aaa56cab9158299 + "@flex-development/docast": ">=1.0.0-alpha.14" + "@types/mdast": ">=4.0.3" + "@types/unist": ">=3.0.2" + micromark-util-types: ">=2.0.0" + checksum: 10/698919d981bfef8397a5221fbeb8d3ae7f3efb07fc335484c7511ca85ff363c4c7586286a0f1918c3b72cc59f2248c6d2da0c4feb5e62200ea3b37c031eb9a78 + languageName: node + linkType: hard + +"@flex-development/docast@npm:1.0.0-alpha.14": + version: 1.0.0-alpha.14 + resolution: "@flex-development/docast@npm:1.0.0-alpha.14::__archiveUrl=https%3A%2F%2Fnpm.pkg.github.com%2Fdownload%2F%40flex-development%2Fdocast%2F1.0.0-alpha.14%2F3c67a24fc29455b681ef09f9541250c5b2cdff84" + dependencies: + "@flex-development/tutils": "npm:6.0.0-alpha.25" + peerDependencies: + "@types/mdast": ">=4.0.3" + "@types/unist": ">=3.0.2" + checksum: 10/4ed9a791cb4e6a5a456ec6d287b77d4def25db6e0060d4d22a9ea2e53b88864a5244778de53f671c80130032f26896ef0ab63f7cf6924e110a251db2c2508a23 languageName: node linkType: hard @@ -1867,6 +1902,22 @@ __metadata: languageName: node linkType: hard +"@html-eslint/eslint-plugin@npm:0.23.1": + version: 0.23.1 + resolution: "@html-eslint/eslint-plugin@npm:0.23.1" + checksum: 10/f4a0e93914021da9982286b9b17fdd8fcf749d5bbda51c4d6cf425455c4bbf3fa927c607f278c4e45c83b3ff3d7db3ca559f17fe5834ccd70463202cb9ddfec4 + languageName: node + linkType: hard + +"@html-eslint/parser@npm:0.23.0": + version: 0.23.0 + resolution: "@html-eslint/parser@npm:0.23.0" + dependencies: + es-html-parser: "npm:^0.0.9" + checksum: 10/063fed4d807b83e572c8e3ffca6e65fa1746d49e965e11dae083411fd5d10e57d45eeedb7d2d7bb3ae306c4d31475c24cc967a67150357a6c4239500a7b7c666 + languageName: node + linkType: hard + "@humanwhocodes/config-array@npm:^0.11.13": version: 0.11.14 resolution: "@humanwhocodes/config-array@npm:0.11.14" @@ -2274,16 +2325,7 @@ __metadata: languageName: node linkType: hard -"@types/chai-string@npm:1.4.5": - version: 1.4.5 - resolution: "@types/chai-string@npm:1.4.5" - dependencies: - "@types/chai": "npm:*" - checksum: 10/9bfceeab6afa67e904908032f459bd0cac94bd2fdf49160fd765c1b7e585b831bed08b7110904f5fdb6ec18c046f57912ede571c4bd654098ba488588db2476b - languageName: node - linkType: hard - -"@types/chai@npm:*, @types/chai@npm:4.3.11": +"@types/chai@npm:4.3.11": version: 4.3.11 resolution: "@types/chai@npm:4.3.11" checksum: 10/c83a00359684bf06114d5ad0ffa62c78b2fbfe09a985eda56e55cd3c191fe176052aef6e297a8c8a3608efb8ea7a44598cf7e0ae1a3a9311af892417e95b0b28 @@ -2446,12 +2488,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:*, @types/node@npm:20.11.16, @types/node@npm:^20.0.0": - version: 20.11.16 - resolution: "@types/node@npm:20.11.16" +"@types/node@npm:*, @types/node@npm:20.11.19, @types/node@npm:^20.0.0": + version: 20.11.19 + resolution: "@types/node@npm:20.11.19" dependencies: undici-types: "npm:~5.26.4" - checksum: 10/751f50ec5c9332b11515e82fe37c71479ac4449b711280aa3c7910edf67b1e3f5ac00041512add543f9a892096a68356406998bf02a2c809a73d176c44c28414 + checksum: 10/c7f4705d6c84aa21679ad180c33c13ca9567f650e66e14bcee77c7c43d14619c7cd3b4d7b2458947143030b7b1930180efa6d12d999b45366abff9fed7a17472 languageName: node linkType: hard @@ -2645,9 +2687,9 @@ __metadata: languageName: node linkType: hard -"@vitest/coverage-v8@npm:1.2.2": - version: 1.2.2 - resolution: "@vitest/coverage-v8@npm:1.2.2" +"@vitest/coverage-v8@npm:1.3.0": + version: 1.3.0 + resolution: "@vitest/coverage-v8@npm:1.3.0" dependencies: "@ampproject/remapping": "npm:^2.2.1" "@bcoe/v8-coverage": "npm:^0.2.3" @@ -2663,62 +2705,62 @@ __metadata: test-exclude: "npm:^6.0.0" v8-to-istanbul: "npm:^9.2.0" peerDependencies: - vitest: ^1.0.0 - checksum: 10/006468751dc3bebdbb833691a4713dd3fa0eda94a797f2c86eaf0b6ca7fa3e4d2574af37f9fe319ba9cba736b5c3ad2a97843ad78bac112db035e94940716e37 + vitest: 1.3.0 + checksum: 10/10cce5d97add269b5b17350fc76c4d84aea9f491f05744d22ad1e639bcfa588511589134a5e4bd9b6874df515f11f889a216f920e11cba54d87745bcf6be746a languageName: node linkType: hard -"@vitest/expect@npm:1.2.2": - version: 1.2.2 - resolution: "@vitest/expect@npm:1.2.2" +"@vitest/expect@npm:1.3.0": + version: 1.3.0 + resolution: "@vitest/expect@npm:1.3.0" dependencies: - "@vitest/spy": "npm:1.2.2" - "@vitest/utils": "npm:1.2.2" + "@vitest/spy": "npm:1.3.0" + "@vitest/utils": "npm:1.3.0" chai: "npm:^4.3.10" - checksum: 10/409bf9984a2901cd13bd8644d1dcc61a3b85a122e70f842626c83995b806c6fb1ed5a81685493e88df8bf76557e599bdeed5fd5e908d84a4cb0fa4947b90b631 + checksum: 10/32bc76108a608acb614dfb46ee9b588fc1a3f1fb68ba400a49d6ab80de463a2ab8a6a5dd51960ca76417b300d7c5ce16e2e346a0b0ebe25ca3b80232a378d6dc languageName: node linkType: hard -"@vitest/runner@npm:1.2.2": - version: 1.2.2 - resolution: "@vitest/runner@npm:1.2.2" +"@vitest/runner@npm:1.3.0": + version: 1.3.0 + resolution: "@vitest/runner@npm:1.3.0" dependencies: - "@vitest/utils": "npm:1.2.2" + "@vitest/utils": "npm:1.3.0" p-limit: "npm:^5.0.0" pathe: "npm:^1.1.1" - checksum: 10/e12a758a8c9ce762af470fc5a33e42a416b1e16469b69a077bc021044c460c468ed24fa892e80cba4bfc0448df8484d1bfc43a271db09560347455aa392cc8aa + checksum: 10/7212e457fa89425c1e0b75e1817b50dc9c7d554617faf2178784a5fe0b97e6e4fe417e20886bd189f5385d01ac3f389d90ebca2a01ea4dee8a26897921db70c1 languageName: node linkType: hard -"@vitest/snapshot@npm:1.2.2": - version: 1.2.2 - resolution: "@vitest/snapshot@npm:1.2.2" +"@vitest/snapshot@npm:1.3.0": + version: 1.3.0 + resolution: "@vitest/snapshot@npm:1.3.0" dependencies: magic-string: "npm:^0.30.5" pathe: "npm:^1.1.1" pretty-format: "npm:^29.7.0" - checksum: 10/73e669efdf8ba7270a2b71b988ca93fc9cbc9f9b4ad4cb7c7f8d44dbedfef3109fc8896867b8e1f22cd95494ce18cbc1026a0f89ef4a2e7e4546cf8e613ed302 + checksum: 10/b39bfee8ba9424e672e1c3076e3ee679d530ab8d38a5ad94ceec109063925caae10d4656d9256e331d2f8ed4a3169bfdc8ae584afe171fd51bbe70892dbce1b9 languageName: node linkType: hard -"@vitest/spy@npm:1.2.2": - version: 1.2.2 - resolution: "@vitest/spy@npm:1.2.2" +"@vitest/spy@npm:1.3.0": + version: 1.3.0 + resolution: "@vitest/spy@npm:1.3.0" dependencies: tinyspy: "npm:^2.2.0" - checksum: 10/8cf453f2b0c519b27d783dafbca8a4df6945b8f4723077e7ae153ef06bcb1422af608d2a09912284c3bd7bd1e66555d82d889497780295c73a14876807755a79 + checksum: 10/780c6b678aeb3cc1ccd730ff35fb6596e1a0adb78b39934e37bc6ae712b99bcf46a9387b34f8e76265c6805aef1dff72f47a921695ae5c567d59490d097c90a0 languageName: node linkType: hard -"@vitest/utils@npm:1.2.2": - version: 1.2.2 - resolution: "@vitest/utils@npm:1.2.2" +"@vitest/utils@npm:1.3.0": + version: 1.3.0 + resolution: "@vitest/utils@npm:1.3.0" dependencies: diff-sequences: "npm:^29.6.3" estree-walker: "npm:^3.0.3" loupe: "npm:^2.3.7" pretty-format: "npm:^29.7.0" - checksum: 10/f9a62bc8cbe05475b99e1f8bd96e0ee48cf819ca2e532ba18f071bf0371f044dffa006c33a69b1b276097e6b50f91342a776c830cfac19456b24a9bdad29abe5 + checksum: 10/9d544b24e25659d9f715f43906b9e40571450bbc14cb0320487dae67e4561acb61820200f4e185e1f7b805a17225b70802ebace9fb5c313bfff82ee3841278a9 languageName: node linkType: hard @@ -2764,7 +2806,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.0.0, acorn@npm:^8.10.0, acorn@npm:^8.11.3, acorn@npm:^8.5.0, acorn@npm:^8.9.0": +"acorn@npm:^8.0.0, acorn@npm:^8.11.3, acorn@npm:^8.5.0, acorn@npm:^8.9.0": version: 8.11.3 resolution: "acorn@npm:8.11.3" bin: @@ -3256,34 +3298,16 @@ __metadata: languageName: node linkType: hard -"chai-quantifiers@npm:1.0.17": - version: 1.0.17 - resolution: "chai-quantifiers@npm:1.0.17" - peerDependencies: - chai: ^4.x.x - checksum: 10/7277203fc7d8a17b44defd3f1f56a50891970b6d86e63a39cd94e926d5f5df7a3c00318919481902fffcb905ebbde25deeca6a0255e3ce418cdbf307d38880b1 - languageName: node - linkType: hard - -"chai-string@npm:1.5.0": - version: 1.5.0 - resolution: "chai-string@npm:1.5.0" - peerDependencies: - chai: ^4.1.2 - checksum: 10/39b9511525c99b9d378210897caf6352be34976c24f2e773680c2de4173d2071f3010ea0348bf681e2a201564524e28dd5541ebce8a181a455c8aeefe2a7bda3 - languageName: node - linkType: hard - -"chai@npm:5.0.3": - version: 5.0.3 - resolution: "chai@npm:5.0.3" +"chai@npm:5.1.0": + version: 5.1.0 + resolution: "chai@npm:5.1.0" dependencies: assertion-error: "npm:^2.0.1" check-error: "npm:^2.0.0" deep-eql: "npm:^5.0.1" loupe: "npm:^3.1.0" pathval: "npm:^2.0.0" - checksum: 10/d9b2bb0e4591b4a73ea98bb7a6423c4e50dd35f43ce4404be26126796af970d844269bb0b07b21866620c542f07957003b34c5cf60095e5a84878af6b120cc2d + checksum: 10/4d4eee5ec61eeff9e9dfe05ae49ef4b48f1cc8e14e4d4c72476482cea85d824aff0e76d5c4d357026fb276870d705341068eef98d240cd90f008b9bd250e7a69 languageName: node linkType: hard @@ -4025,7 +4049,7 @@ __metadata: languageName: node linkType: hard -"devlop@npm:^1.0.0, devlop@npm:^1.1.0": +"devlop@npm:1.1.0, devlop@npm:^1.0.0, devlop@npm:^1.1.0": version: 1.1.0 resolution: "devlop@npm:1.1.0" dependencies: @@ -4042,9 +4066,9 @@ __metadata: linkType: hard "diff@npm:^5.0.0": - version: 5.1.0 - resolution: "diff@npm:5.1.0" - checksum: 10/f4557032a98b2967fe27b1a91dfcf8ebb6b9a24b1afe616b5c2312465100b861e9b8d4da374be535f2d6b967ce2f53826d7f6edc2a0d32b2ab55abc96acc2f9d + version: 5.2.0 + resolution: "diff@npm:5.2.0" + checksum: 10/01b7b440f83a997350a988e9d2f558366c0f90f15be19f4aa7f1bb3109a4e153dfc3b9fbf78e14ea725717017407eeaa2271e3896374a0181e8f52445740846d languageName: node linkType: hard @@ -4084,6 +4108,44 @@ __metadata: languageName: node linkType: hard +"dom-serializer@npm:^2.0.0": + version: 2.0.0 + resolution: "dom-serializer@npm:2.0.0" + dependencies: + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.2" + entities: "npm:^4.2.0" + checksum: 10/e3bf9027a64450bca0a72297ecdc1e3abb7a2912268a9f3f5d33a2e29c1e2c3502c6e9f860fc6625940bfe0cfb57a44953262b9e94df76872fdfb8151097eeb3 + languageName: node + linkType: hard + +"domelementtype@npm:^2.3.0": + version: 2.3.0 + resolution: "domelementtype@npm:2.3.0" + checksum: 10/ee837a318ff702622f383409d1f5b25dd1024b692ef64d3096ff702e26339f8e345820f29a68bcdcea8cfee3531776b3382651232fbeae95612d6f0a75efb4f6 + languageName: node + linkType: hard + +"domhandler@npm:^5.0.2, domhandler@npm:^5.0.3": + version: 5.0.3 + resolution: "domhandler@npm:5.0.3" + dependencies: + domelementtype: "npm:^2.3.0" + checksum: 10/809b805a50a9c6884a29f38aec0a4e1b4537f40e1c861950ed47d10b049febe6b79ab72adaeeebb3cc8fc1cd33f34e97048a72a9265103426d93efafa78d3e96 + languageName: node + linkType: hard + +"domutils@npm:^3.1.0": + version: 3.1.0 + resolution: "domutils@npm:3.1.0" + dependencies: + dom-serializer: "npm:^2.0.0" + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.3" + checksum: 10/9a169a6e57ac4c738269a73ab4caf785114ed70e46254139c1bbc8144ac3102aacb28a6149508395ae34aa5d6a40081f4fa5313855dc8319c6d8359866b6dfea + languageName: node + linkType: hard + "dot-prop@npm:^5.1.0": version: 5.3.0 resolution: "dot-prop@npm:5.3.0" @@ -4218,6 +4280,13 @@ __metadata: languageName: node linkType: hard +"entities@npm:^4.2.0, entities@npm:^4.5.0": + version: 4.5.0 + resolution: "entities@npm:4.5.0" + checksum: 10/ede2a35c9bce1aeccd055a1b445d41c75a14a2bb1cd22e242f20cf04d236cdcd7f9c859eb83f76885327bfae0c25bf03303665ee1ce3d47c5927b98b0e3e3d48 + languageName: node + linkType: hard + "entities@npm:~3.0.1": version: 3.0.1 resolution: "entities@npm:3.0.1" @@ -4336,6 +4405,13 @@ __metadata: languageName: node linkType: hard +"es-html-parser@npm:^0.0.9": + version: 0.0.9 + resolution: "es-html-parser@npm:0.0.9" + checksum: 10/b22a2a74debb3c64041fd47a449dee09f1b4ea92f122d6098ffd98d2024c120bf3b72ccb6372b8a07038ff0c7b5af7e98293b15ae75adcf3c320d96b0c8a1e40 + languageName: node + linkType: hard + "es-set-tostringtag@npm:^2.0.1": version: 2.0.1 resolution: "es-set-tostringtag@npm:2.0.1" @@ -4444,33 +4520,33 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:0.20.0": - version: 0.20.0 - resolution: "esbuild@npm:0.20.0" - dependencies: - "@esbuild/aix-ppc64": "npm:0.20.0" - "@esbuild/android-arm": "npm:0.20.0" - "@esbuild/android-arm64": "npm:0.20.0" - "@esbuild/android-x64": "npm:0.20.0" - "@esbuild/darwin-arm64": "npm:0.20.0" - "@esbuild/darwin-x64": "npm:0.20.0" - "@esbuild/freebsd-arm64": "npm:0.20.0" - "@esbuild/freebsd-x64": "npm:0.20.0" - "@esbuild/linux-arm": "npm:0.20.0" - "@esbuild/linux-arm64": "npm:0.20.0" - "@esbuild/linux-ia32": "npm:0.20.0" - "@esbuild/linux-loong64": "npm:0.20.0" - "@esbuild/linux-mips64el": "npm:0.20.0" - "@esbuild/linux-ppc64": "npm:0.20.0" - "@esbuild/linux-riscv64": "npm:0.20.0" - "@esbuild/linux-s390x": "npm:0.20.0" - "@esbuild/linux-x64": "npm:0.20.0" - "@esbuild/netbsd-x64": "npm:0.20.0" - "@esbuild/openbsd-x64": "npm:0.20.0" - "@esbuild/sunos-x64": "npm:0.20.0" - "@esbuild/win32-arm64": "npm:0.20.0" - "@esbuild/win32-ia32": "npm:0.20.0" - "@esbuild/win32-x64": "npm:0.20.0" +"esbuild@npm:0.20.1": + version: 0.20.1 + resolution: "esbuild@npm:0.20.1" + dependencies: + "@esbuild/aix-ppc64": "npm:0.20.1" + "@esbuild/android-arm": "npm:0.20.1" + "@esbuild/android-arm64": "npm:0.20.1" + "@esbuild/android-x64": "npm:0.20.1" + "@esbuild/darwin-arm64": "npm:0.20.1" + "@esbuild/darwin-x64": "npm:0.20.1" + "@esbuild/freebsd-arm64": "npm:0.20.1" + "@esbuild/freebsd-x64": "npm:0.20.1" + "@esbuild/linux-arm": "npm:0.20.1" + "@esbuild/linux-arm64": "npm:0.20.1" + "@esbuild/linux-ia32": "npm:0.20.1" + "@esbuild/linux-loong64": "npm:0.20.1" + "@esbuild/linux-mips64el": "npm:0.20.1" + "@esbuild/linux-ppc64": "npm:0.20.1" + "@esbuild/linux-riscv64": "npm:0.20.1" + "@esbuild/linux-s390x": "npm:0.20.1" + "@esbuild/linux-x64": "npm:0.20.1" + "@esbuild/netbsd-x64": "npm:0.20.1" + "@esbuild/openbsd-x64": "npm:0.20.1" + "@esbuild/sunos-x64": "npm:0.20.1" + "@esbuild/win32-arm64": "npm:0.20.1" + "@esbuild/win32-ia32": "npm:0.20.1" + "@esbuild/win32-x64": "npm:0.20.1" dependenciesMeta: "@esbuild/aix-ppc64": optional: true @@ -4520,7 +4596,7 @@ __metadata: optional: true bin: esbuild: bin/esbuild - checksum: 10/d881b7462fac5ceea071417984bfb835f60c1ddf83bc018c755cbd7aefedfde13e9e1aec730d4605f5d7ac61cbe0ac5d37a73c9401abe8afb7c39458d84bbfa3 + checksum: 10/b672fd5df28ae917e2b16e77edbbf6b3099c390ab0a9d4cd331f78b4a4567cf33f506a055e1aa272ac90f7f522835b2173abea9bac6c38906acfda68e60a7ab7 languageName: node linkType: hard @@ -4729,6 +4805,15 @@ __metadata: languageName: node linkType: hard +"eslint-plugin-html@npm:8.0.0": + version: 8.0.0 + resolution: "eslint-plugin-html@npm:8.0.0" + dependencies: + htmlparser2: "npm:^9.1.0" + checksum: 10/2c613ebb6506fcb42ad4f057223696c2e73cc737501794d7550f82de75e719b0d577b3daae092947cccd3dcfb0c74d0a8d22abd760b579a4e832f37f732c1c58 + languageName: node + linkType: hard + "eslint-plugin-import@npm:2.29.1": version: 2.29.1 resolution: "eslint-plugin-import@npm:2.29.1" @@ -5790,6 +5875,18 @@ __metadata: languageName: node linkType: hard +"htmlparser2@npm:^9.1.0": + version: 9.1.0 + resolution: "htmlparser2@npm:9.1.0" + dependencies: + domelementtype: "npm:^2.3.0" + domhandler: "npm:^5.0.3" + domutils: "npm:^3.1.0" + entities: "npm:^4.5.0" + checksum: 10/6352fa2a5495781fa9a02c9049908334cd068ff36d753870d30cd13b841e99c19646717567a2f9e9c44075bbe43d364e102f9d013a731ce962226d63746b794f + languageName: node + linkType: hard + "http-cache-semantics@npm:^4.1.0": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -6421,6 +6518,13 @@ __metadata: languageName: node linkType: hard +"js-tokens@npm:^8.0.2": + version: 8.0.3 + resolution: "js-tokens@npm:8.0.3" + checksum: 10/af5ed8ddbc446a868c026599214f4a482ab52461edb82e547949255f98910a14bd81ddab88a8d570d74bd7dc96c6d4df7f963794ec5aaf13c53918cc46b9caa6 + languageName: node + linkType: hard + "js-yaml@npm:^4.1.0": version: 4.1.0 resolution: "js-yaml@npm:4.1.0" @@ -6956,7 +7060,7 @@ __metadata: languageName: node linkType: hard -"mdast-util-directive@npm:^3.0.0": +"mdast-util-directive@npm:3.0.0, mdast-util-directive@npm:^3.0.0": version: 3.0.0 resolution: "mdast-util-directive@npm:3.0.0" dependencies: @@ -6984,20 +7088,7 @@ __metadata: languageName: node linkType: hard -"mdast-util-from-markdown@npm:^0.8.5": - version: 0.8.5 - resolution: "mdast-util-from-markdown@npm:0.8.5" - dependencies: - "@types/mdast": "npm:^3.0.0" - mdast-util-to-string: "npm:^2.0.0" - micromark: "npm:~2.11.0" - parse-entities: "npm:^2.0.0" - unist-util-stringify-position: "npm:^2.0.0" - checksum: 10/f42166eb7a3c2a8cf17dffd868a6dfdab6a77d4e4c8f35d7c3d63247a16ddfeae45a59d9f5fa5eacc48d76d82d18cb0157961d03d1732bc616f9ddf3bb450984 - languageName: node - linkType: hard - -"mdast-util-from-markdown@npm:^2.0.0": +"mdast-util-from-markdown@npm:2.0.0, mdast-util-from-markdown@npm:^2.0.0": version: 2.0.0 resolution: "mdast-util-from-markdown@npm:2.0.0" dependencies: @@ -7017,6 +7108,19 @@ __metadata: languageName: node linkType: hard +"mdast-util-from-markdown@npm:^0.8.5": + version: 0.8.5 + resolution: "mdast-util-from-markdown@npm:0.8.5" + dependencies: + "@types/mdast": "npm:^3.0.0" + mdast-util-to-string: "npm:^2.0.0" + micromark: "npm:~2.11.0" + parse-entities: "npm:^2.0.0" + unist-util-stringify-position: "npm:^2.0.0" + checksum: 10/f42166eb7a3c2a8cf17dffd868a6dfdab6a77d4e4c8f35d7c3d63247a16ddfeae45a59d9f5fa5eacc48d76d82d18cb0157961d03d1732bc616f9ddf3bb450984 + languageName: node + linkType: hard + "mdast-util-frontmatter@npm:^2.0.0": version: 2.0.1 resolution: "mdast-util-frontmatter@npm:2.0.1" @@ -7303,7 +7407,7 @@ __metadata: languageName: node linkType: hard -"micromark-extension-directive@npm:^3.0.0": +"micromark-extension-directive@npm:3.0.0, micromark-extension-directive@npm:^3.0.0": version: 3.0.0 resolution: "micromark-extension-directive@npm:3.0.0" dependencies: @@ -7704,14 +7808,14 @@ __metadata: languageName: node linkType: hard -"micromark-util-symbol@npm:^2.0.0": +"micromark-util-symbol@npm:2.0.0, micromark-util-symbol@npm:^2.0.0": version: 2.0.0 resolution: "micromark-util-symbol@npm:2.0.0" checksum: 10/8c662644c326b384f02a5269974d843d400930cf6f5d6a8e6db1743fc8933f5ecc125b4203ad4ebca25447f5d23eb7e5bf1f75af34570c3fdd925cb618752fcd languageName: node linkType: hard -"micromark-util-types@npm:^2.0.0": +"micromark-util-types@npm:2.0.0, micromark-util-types@npm:^2.0.0": version: 2.0.0 resolution: "micromark-util-types@npm:2.0.0" checksum: 10/b88e0eefd4b7c8d86b54dbf4ed0094ef56a3b0c7774d040bd5c8146b8e4e05b1026bbf1cd9308c8fcd05ecdc0784507680c8cee9888a4d3c550e6e574f7aef62 @@ -8589,14 +8693,14 @@ __metadata: languageName: node linkType: hard -"postcss@npm:^8.4.32": - version: 8.4.33 - resolution: "postcss@npm:8.4.33" +"postcss@npm:^8.4.35": + version: 8.4.35 + resolution: "postcss@npm:8.4.35" dependencies: nanoid: "npm:^3.3.7" picocolors: "npm:^1.0.0" source-map-js: "npm:^1.0.2" - checksum: 10/e22a4594c255f26117f38419fb494d7ecab0f596cd409f7aadc8a6173abf180ed7ea970cd13fd366ab12b5840be901d2a09b25197700c2ebcb5a8077326bf519 + checksum: 10/93a7ce50cd6188f5f486a9ca98950ad27c19dfed996c45c414fa242944497e4d084a8760d3537f078630226f2bd3c6ab84b813b488740f4432e7c7039cd73a20 languageName: node linkType: hard @@ -9666,12 +9770,12 @@ __metadata: languageName: node linkType: hard -"strip-literal@npm:^1.3.0": - version: 1.3.0 - resolution: "strip-literal@npm:1.3.0" +"strip-literal@npm:^2.0.0": + version: 2.0.0 + resolution: "strip-literal@npm:2.0.0" dependencies: - acorn: "npm:^8.10.0" - checksum: 10/f5fa7e289df8ebe82e90091fd393974faf8871be087ca50114327506519323cf15f2f8fee6ebe68b5e58bfc795269cae8bdc7cb5a83e27b02b3fe953f37b0a89 + js-tokens: "npm:^8.0.2" + checksum: 10/efb3197175a7e403d0eaaaf5382b9574be77f8fa006b57b669856a38b58ca9caf76cbc75d9f69d56324dad0b8babe1d4ea7ad1eb12106228830bcdd5d4bf12b5 languageName: node linkType: hard @@ -9842,6 +9946,15 @@ __metadata: languageName: node linkType: hard +"to-vfile@npm:8.0.0": + version: 8.0.0 + resolution: "to-vfile@npm:8.0.0" + dependencies: + vfile: "npm:^6.0.0" + checksum: 10/95552e5c9158e65762cc1ce341f55e9b1ae3267e5a8fb3fa18f5710b588c51b03088c5011aef0a60ac334392cfee142ff4da132234bdfc9da822f3db5cbc8d81 + languageName: node + linkType: hard + "trash-cli@npm:5.0.0": version: 5.0.0 resolution: "trash-cli@npm:5.0.0" @@ -9914,17 +10027,17 @@ __metadata: languageName: node linkType: hard -"tsconfck@npm:^2.1.0": - version: 2.1.1 - resolution: "tsconfck@npm:2.1.1" +"tsconfck@npm:^3.0.1": + version: 3.0.2 + resolution: "tsconfck@npm:3.0.2" peerDependencies: - typescript: ^4.3.5 || ^5.0.0 + typescript: ^5.0.0 peerDependenciesMeta: typescript: optional: true bin: tsconfck: bin/tsconfck.js - checksum: 10/ecabfabfaaa2442babacc7ad7e261432c7be63428095df532b32d5b53cab9591b2d770a5749892d690451571952e1fd8fb62b866f3958a26cf52d472f901c858 + checksum: 10/bd0666cde64d576701b6b74b45795b76f002ea3c44279ce373426b075f56b47b4a34ee51083a4df7844b0077e2af4cb752a6c6ef246a80339a44351d6367c98c languageName: node linkType: hard @@ -10293,7 +10406,7 @@ __metadata: languageName: node linkType: hard -"unist-util-visit@npm:^5.0.0": +"unist-util-visit@npm:5.0.0, unist-util-visit@npm:^5.0.0": version: 5.0.0 resolution: "unist-util-visit@npm:5.0.0" dependencies: @@ -10479,9 +10592,9 @@ __metadata: languageName: node linkType: hard -"vite-node@npm:1.2.2": - version: 1.2.2 - resolution: "vite-node@npm:1.2.2" +"vite-node@npm:1.3.0": + version: 1.3.0 + resolution: "vite-node@npm:1.3.0" dependencies: cac: "npm:^6.7.14" debug: "npm:^4.3.4" @@ -10490,33 +10603,33 @@ __metadata: vite: "npm:^5.0.0" bin: vite-node: vite-node.mjs - checksum: 10/a4b39361011ebf890fb2be83babd24aa29de76185f1683f57a76b6dfcfbdcd7700b83c9d0cd3b5bebc4a114427d7c2612095ab59d0d12732ce21ef816fe86b07 + checksum: 10/39a473a927547416ee72e01310929b02ee6724f1671c20cd1f1bd65494850906624b6a06b813ba2e3f742c42e5e2d2718e4f4248032cf1ad9c95c696659dd832 languageName: node linkType: hard -"vite-tsconfig-paths@npm:4.2.3": - version: 4.2.3 - resolution: "vite-tsconfig-paths@npm:4.2.3" +"vite-tsconfig-paths@npm:4.3.1": + version: 4.3.1 + resolution: "vite-tsconfig-paths@npm:4.3.1" dependencies: debug: "npm:^4.1.1" globrex: "npm:^0.1.2" - tsconfck: "npm:^2.1.0" + tsconfck: "npm:^3.0.1" peerDependencies: vite: "*" peerDependenciesMeta: vite: optional: true - checksum: 10/ba6abe5d18fc1c1e494e1f1d8a7db56445c2a40e15aadb5d47a9c66cc5372d6f69b94ff0b1e47b67659d6ecaeddebab0a9d11e40b1c3c36c0115800736a6c760 + checksum: 10/1432f80750f5cbe181c265eb9fc2e9fff8b25a2858f176dc0a02311e3e826333526ee9c16bb0aaaa8555a417ea944d68a2e8225181215cd9502370f913eb3f79 languageName: node linkType: hard -"vite@npm:5.0.12, vite@npm:^5.0.0": - version: 5.0.12 - resolution: "vite@npm:5.0.12" +"vite@npm:5.1.3, vite@npm:^5.0.0": + version: 5.1.3 + resolution: "vite@npm:5.1.3" dependencies: esbuild: "npm:^0.19.3" fsevents: "npm:~2.3.3" - postcss: "npm:^8.4.32" + postcss: "npm:^8.4.35" rollup: "npm:^4.2.0" peerDependencies: "@types/node": ^18.0.0 || >=20.0.0 @@ -10546,21 +10659,20 @@ __metadata: optional: true bin: vite: bin/vite.js - checksum: 10/ed0bb26a0d0c8e1dae0b70af9e36adffd7e15d80297443fe4da762596dc81570bad7f0291f590a57c1553f5e435338d8c7ffc483bd9431a95c09d9ac90665fad + checksum: 10/6ba2223157e2cc2fa62dff9004ccba20fc409c6baf7354c64ed0f8e4bcd853092d08d06ec4dec37143e794a96e061879a870d85bad4f1eb9ee5c6d0a13cef30f languageName: node linkType: hard -"vitest@npm:1.2.2": - version: 1.2.2 - resolution: "vitest@npm:1.2.2" +"vitest@npm:1.3.0": + version: 1.3.0 + resolution: "vitest@npm:1.3.0" dependencies: - "@vitest/expect": "npm:1.2.2" - "@vitest/runner": "npm:1.2.2" - "@vitest/snapshot": "npm:1.2.2" - "@vitest/spy": "npm:1.2.2" - "@vitest/utils": "npm:1.2.2" + "@vitest/expect": "npm:1.3.0" + "@vitest/runner": "npm:1.3.0" + "@vitest/snapshot": "npm:1.3.0" + "@vitest/spy": "npm:1.3.0" + "@vitest/utils": "npm:1.3.0" acorn-walk: "npm:^8.3.2" - cac: "npm:^6.7.14" chai: "npm:^4.3.10" debug: "npm:^4.3.4" execa: "npm:^8.0.1" @@ -10569,17 +10681,17 @@ __metadata: pathe: "npm:^1.1.1" picocolors: "npm:^1.0.0" std-env: "npm:^3.5.0" - strip-literal: "npm:^1.3.0" + strip-literal: "npm:^2.0.0" tinybench: "npm:^2.5.1" tinypool: "npm:^0.8.2" vite: "npm:^5.0.0" - vite-node: "npm:1.2.2" + vite-node: "npm:1.3.0" why-is-node-running: "npm:^2.2.2" peerDependencies: "@edge-runtime/vm": "*" "@types/node": ^18.0.0 || >=20.0.0 - "@vitest/browser": ^1.0.0 - "@vitest/ui": ^1.0.0 + "@vitest/browser": 1.3.0 + "@vitest/ui": 1.3.0 happy-dom: "*" jsdom: "*" peerDependenciesMeta: @@ -10597,7 +10709,7 @@ __metadata: optional: true bin: vitest: vitest.mjs - checksum: 10/1dc90823cde249a60e955f82e67cef76c363c78a9783c4dae94a080199fa3e48a56a5c9d1f40667b4542862e183d05c444af846059477b3a66c6b952d168b9cb + checksum: 10/4aabfb972f5f2c165f1f751a063a07a5be952bc684f93ab19ea617fad633fd3db7473ebc7c59c1afdb902334364710476785f01d1cc3cc071a48fcaaf4bac2fa languageName: node linkType: hard