diff --git a/package.json b/package.json index e7d4245f9ed..fb70aa2bd16 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "@types/markdown-it": "~12.2.3", "@types/node": "~18.13.0", "@types/prettier": "~2.7.2", - "@types/react": "~18.0.27", + "@types/react": "~18.0.28", "@types/sanitize-html": "~2.8.0", "@types/semver": "~7.3.13", "@types/validator": "~13.7.12", @@ -118,12 +118,12 @@ "semver": "~7.3.8", "standard-version": "~9.5.0", "tsx": "~3.12.3", - "typedoc": "~0.23.24", + "typedoc": "~0.23.25", "typedoc-plugin-missing-exports": "~1.0.0", "typescript": "~4.9.5", "validator": "~13.9.0", "vite": "~4.1.1", - "vitepress": "1.0.0-alpha.43", + "vitepress": "1.0.0-alpha.46", "vitest": "~0.28.5", "vue": "~3.2.47" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f018c6e6a1d..322333bf537 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,7 +7,7 @@ specifiers: '@types/markdown-it': ~12.2.3 '@types/node': ~18.13.0 '@types/prettier': ~2.7.2 - '@types/react': ~18.0.27 + '@types/react': ~18.0.28 '@types/sanitize-html': ~2.8.0 '@types/semver': ~7.3.13 '@types/validator': ~13.7.12 @@ -38,12 +38,12 @@ specifiers: semver: ~7.3.8 standard-version: ~9.5.0 tsx: ~3.12.3 - typedoc: ~0.23.24 + typedoc: ~0.23.25 typedoc-plugin-missing-exports: ~1.0.0 typescript: ~4.9.5 validator: ~13.9.0 vite: ~4.1.1 - vitepress: 1.0.0-alpha.43 + vitepress: 1.0.0-alpha.46 vitest: ~0.28.5 vue: ~3.2.47 @@ -54,7 +54,7 @@ devDependencies: '@types/markdown-it': 12.2.3 '@types/node': 18.13.0 '@types/prettier': 2.7.2 - '@types/react': 18.0.27 + '@types/react': 18.0.28 '@types/sanitize-html': 2.8.0 '@types/semver': 7.3.13 '@types/validator': 13.7.12 @@ -85,12 +85,12 @@ devDependencies: semver: 7.3.8 standard-version: 9.5.0 tsx: 3.12.3 - typedoc: 0.23.24_typescript@4.9.5 - typedoc-plugin-missing-exports: 1.0.0_typedoc@0.23.24 + typedoc: 0.23.25_typescript@4.9.5 + typedoc-plugin-missing-exports: 1.0.0_typedoc@0.23.25 typescript: 4.9.5 validator: 13.9.0 vite: 4.1.1_@types+node@18.13.0 - vitepress: 1.0.0-alpha.43_3d47u4w3h5jmftc6ayxv55hpee + vitepress: 1.0.0-alpha.46_hzfxhvcwzectry2x7akkc5uh5a vitest: 0.28.5_@vitest+ui@0.28.5 vue: 3.2.47 @@ -315,10 +315,10 @@ packages: resolution: {integrity: sha512-dctFYiwbvDZkksMlsmc7pj6W6By/EjnVXJq5TEPd05MwQe+dcdHJgaIn1c8wfsucxHpIsdrUcgSkACHCq6aIhw==} dev: true - /@docsearch/js/3.3.2_y6lbs4o5th67cuzjdmtw5eqh7a: + /@docsearch/js/3.3.2_hf5ijsloe6gzee4vmv74rvas4u: resolution: {integrity: sha512-k2yiB9attFvKoiYswrRtKhIO+qHuzAj1FHYfFWrKz3wSzB2G6s/7EZL9Rf6iytUo1Ok00LUj2C6mWoOnsUTkxg==} dependencies: - '@docsearch/react': 3.3.2_y6lbs4o5th67cuzjdmtw5eqh7a + '@docsearch/react': 3.3.2_hf5ijsloe6gzee4vmv74rvas4u preact: 10.11.3 transitivePeerDependencies: - '@algolia/client-search' @@ -327,7 +327,7 @@ packages: - react-dom dev: true - /@docsearch/react/3.3.2_y6lbs4o5th67cuzjdmtw5eqh7a: + /@docsearch/react/3.3.2_hf5ijsloe6gzee4vmv74rvas4u: resolution: {integrity: sha512-ugILab2TYKSh6IEHf6Z9xZbOovsYbsdfo60PBj+Bw+oMJ1MHJ7pBt1TTcmPki1hSgg8mysgKy2hDiVdPm7XWSQ==} peerDependencies: '@types/react': '>= 16.8.0 < 19.0.0' @@ -344,7 +344,7 @@ packages: '@algolia/autocomplete-core': 1.7.4 '@algolia/autocomplete-preset-algolia': 1.7.4_dk4ct527ug5whbfokpeal2wzha '@docsearch/css': 3.3.2 - '@types/react': 18.0.27 + '@types/react': 18.0.28 algoliasearch: 4.14.3 react: 18.2.0 react-dom: 18.2.0_react@18.2.0 @@ -1040,8 +1040,8 @@ packages: resolution: {integrity: sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==} dev: true - /@types/react/18.0.27: - resolution: {integrity: sha512-3vtRKHgVxu3Jp9t718R9BuzoD4NcQ8YJ5XRzsSKxNDiDonD2MXIT1TmSkenxuCycZJoQT5d2vE8LwWJxBC1gmA==} + /@types/react/18.0.28: + resolution: {integrity: sha512-RD0ivG1kEztNBdoAK7lekI9M+azSnitIn85h4iOiaLjaTrMjzslhaqCGaI4IyCJ1RljWiLCEu4jyrLLgqxBTew==} dependencies: '@types/prop-types': 15.7.5 '@types/scheduler': 0.16.2 @@ -1491,6 +1491,10 @@ packages: engines: {node: '>=12'} dev: true + /ansi-sequence-parser/1.1.0: + resolution: {integrity: sha512-lEm8mt52to2fT8GhciPCGeCXACSz2UwIN4X2e2LJSnZ5uAbn2/dsYdOmUXq0AtWS5cpAupysIneExOgH0Vd2TQ==} + dev: true + /ansi-styles/3.2.1: resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} engines: {node: '>=4'} @@ -3848,8 +3852,8 @@ packages: engines: {node: '>=8'} dev: true - /marked/4.2.5: - resolution: {integrity: sha512-jPueVhumq7idETHkb203WDD4fMA3yV9emQ5vLwop58lu8bTclMghBWcYAavlDqIEMaisADinV1TooIFCfqOsYQ==} + /marked/4.2.12: + resolution: {integrity: sha512-yr8hSKa3Fv4D3jdZmtMMPghgVt6TWbk86WQaWhDloQjRSQhMMYCAro7jP7VDJrjjdV8pxVxMssXS8B8Y5DZ5aw==} engines: {node: '>= 12'} hasBin: true dev: true @@ -3928,6 +3932,13 @@ packages: brace-expansion: 2.0.1 dev: true + /minimatch/6.2.0: + resolution: {integrity: sha512-sauLxniAmvnhhRjFwPNnJKaPFYyddAgbYdeUpHULtCT/GhzdCx/MDNy+Y40lBxTQUrMzDE8e0S43Z5uqfO0REg==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + /minimist-options/4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} @@ -4656,17 +4667,10 @@ packages: resolution: {integrity: sha512-8o/QEhSSRb1a5i7TFR0iM4G16Z0vYB2OQVs4G3aAFXjn3T6yEx8AZxy1PgDF7I00LZHYA3WxaSYIf5e5sAX8Rw==} dev: true - /shiki/0.12.1: - resolution: {integrity: sha512-aieaV1m349rZINEBkjxh2QbBvFFQOlgqYTNtCal82hHj4dDZ76oMlQIX+C7ryerBTDiga3e5NfH6smjdJ02BbQ==} - dependencies: - jsonc-parser: 3.2.0 - vscode-oniguruma: 1.7.0 - vscode-textmate: 8.0.0 - dev: true - - /shiki/0.13.0: - resolution: {integrity: sha512-QucKtRFyoHgivnde/6tXu+7ZfUhcg02qiFlUSa4X0jQvHVKdtrimWPlbg+q06H2EeNSuj9DcMhtB18GgtDLsmw==} + /shiki/0.14.1: + resolution: {integrity: sha512-+Jz4nBkCBe0mEDqo1eKRcCdjRtrCjozmcbTUjbPTX7OOJfEbTZzlUWlZtGe3Gb5oV1/jnojhG//YZc3rs9zSEw==} dependencies: + ansi-sequence-parser: 1.1.0 jsonc-parser: 3.2.0 vscode-oniguruma: 1.7.0 vscode-textmate: 8.0.0 @@ -5149,25 +5153,25 @@ packages: resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} dev: true - /typedoc-plugin-missing-exports/1.0.0_typedoc@0.23.24: + /typedoc-plugin-missing-exports/1.0.0_typedoc@0.23.25: resolution: {integrity: sha512-7s6znXnuAj1eD9KYPyzVzR1lBF5nwAY8IKccP5sdoO9crG4lpd16RoFpLsh2PccJM+I2NASpr0+/NMka6ThwVA==} peerDependencies: typedoc: 0.22.x || 0.23.x dependencies: - typedoc: 0.23.24_typescript@4.9.5 + typedoc: 0.23.25_typescript@4.9.5 dev: true - /typedoc/0.23.24_typescript@4.9.5: - resolution: {integrity: sha512-bfmy8lNQh+WrPYcJbtjQ6JEEsVl/ce1ZIXyXhyW+a1vFrjO39t6J8sL/d6FfAGrJTc7McCXgk9AanYBSNvLdIA==} + /typedoc/0.23.25_typescript@4.9.5: + resolution: {integrity: sha512-O1he153qVyoCgJYSvIyY3bPP1wAJTegZfa6tL3APinSZhJOf8CSd8F/21M6ex8pUY/fuY6n0jAsT4fIuMGA6sA==} engines: {node: '>= 14.14'} hasBin: true peerDependencies: typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x dependencies: lunr: 2.3.9 - marked: 4.2.5 - minimatch: 5.1.2 - shiki: 0.12.1 + marked: 4.2.12 + minimatch: 6.2.0 + shiki: 0.14.1 typescript: 4.9.5 dev: true @@ -5320,17 +5324,17 @@ packages: fsevents: 2.3.2 dev: true - /vitepress/1.0.0-alpha.43_3d47u4w3h5jmftc6ayxv55hpee: - resolution: {integrity: sha512-bguPWYojF371vIfTY8jGmKeFroRe6UVGmDp3+PjTnVq57wTlz9x88OKm6KKF4l/1D7GugkHex5X9wNcOdCmCiQ==} + /vitepress/1.0.0-alpha.46_hzfxhvcwzectry2x7akkc5uh5a: + resolution: {integrity: sha512-HiKiHzC0iTPsRsKs8XcsMeMzCpcCt5LWcX9mpDr288Ju+nQf1G8A2+Wm44ZkBsVv4EHxFK4ChmWyZrL1OJUXpg==} hasBin: true dependencies: '@docsearch/css': 3.3.2 - '@docsearch/js': 3.3.2_y6lbs4o5th67cuzjdmtw5eqh7a + '@docsearch/js': 3.3.2_hf5ijsloe6gzee4vmv74rvas4u '@vitejs/plugin-vue': 4.0.0_vite@4.1.1+vue@3.2.47 '@vue/devtools-api': 6.5.0 '@vueuse/core': 9.12.0_vue@3.2.47 body-scroll-lock: 4.0.0-beta.0 - shiki: 0.13.0 + shiki: 0.14.1 vite: 4.1.1_@types+node@18.13.0 vue: 3.2.47 transitivePeerDependencies: diff --git a/scripts/apidoc/signature.ts b/scripts/apidoc/signature.ts index 9cdd7924fc8..d9e1cc440cb 100644 --- a/scripts/apidoc/signature.ts +++ b/scripts/apidoc/signature.ts @@ -70,7 +70,7 @@ const htmlSanitizeOptions: sanitizeHtml.IOptions = { a: ['href', 'target', 'rel'], button: ['class', 'title'], div: ['class'], - pre: ['class', 'v-pre'], + pre: ['class', 'tabindex', 'v-pre'], span: ['class', 'style'], }, selfClosing: [], diff --git a/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap b/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap index cb8ff8828d3..23b3867a4ca 100644 --- a/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap +++ b/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap @@ -5,7 +5,7 @@ exports[`signature > analyzeSignature() > complexArrayParameter 1`] = ` "deprecated": false, "description": "

Complex array parameter.

", - "examples": "
ts
faker.complexArrayParameter<T>(array: readonly Array<{
+  "examples": "
ts
faker.complexArrayParameter<T>(array: readonly Array<{
   value: T,
   weight: number
 }>): T
@@ -54,7 +54,7 @@ exports[`signature > analyzeSignature() > defaultBooleanParamMethod 1`] = `
   "deprecated": false,
   "description": "

Test with a default parameter.

", - "examples": "
ts
faker.defaultBooleanParamMethod(c: boolean = true): number
+  "examples": "
ts
faker.defaultBooleanParamMethod(c: boolean = true): number
 
", "name": "defaultBooleanParamMethod", @@ -103,7 +103,7 @@ exports[`signature > analyzeSignature() > functionParamMethod 1`] = ` "deprecated": false, "description": "

Test with a function parameters.

", - "examples": "
ts
faker.functionParamMethod(fn: (a: string) => number): number
+  "examples": "
ts
faker.functionParamMethod(fn: (a: string) => number): number
 
", "name": "functionParamMethod", @@ -129,7 +129,7 @@ exports[`signature > analyzeSignature() > literalUnionParamMethod 1`] = ` "deprecated": false, "description": "

Test with LiteralUnion.

", - "examples": "
ts
faker.literalUnionParamMethod(value: 'a' | 'b' | string, namedValue: AB | string, array: readonly Array<'a' | 'b' | string>, namedArray: readonly Array<AB | string>, mixed: 'a' | 'b' | string | readonly Array<'a' | 'b' | string>, namedMixed: AB | string | readonly Array<AB | string>): string
+  "examples": "
ts
faker.literalUnionParamMethod(value: 'a' | 'b' | string, namedValue: AB | string, array: readonly Array<'a' | 'b' | string>, namedArray: readonly Array<AB | string>, mixed: 'a' | 'b' | string | readonly Array<'a' | 'b' | string>, namedMixed: AB | string | readonly Array<AB | string>): string
 
", "name": "literalUnionParamMethod", @@ -190,7 +190,7 @@ exports[`signature > analyzeSignature() > methodWithDeprecated 1`] = ` "deprecated": true, "description": "

Test with deprecated and see marker.

", - "examples": "
ts
faker.methodWithDeprecated(): number
+  "examples": "
ts
faker.methodWithDeprecated(): number
 
", "name": "methodWithDeprecated", @@ -210,7 +210,7 @@ exports[`signature > analyzeSignature() > methodWithExample 1`] = ` "deprecated": false, "description": "

Test with example marker.

", - "examples": "
ts
faker.methodWithExample(): number
+  "examples": "
ts
faker.methodWithExample(): number
 test.apidoc.methodWithExample() // 0
 
", @@ -229,7 +229,7 @@ exports[`signature > analyzeSignature() > methodWithMultipleSeeMarkers 1`] = ` "deprecated": false, "description": "

Test with multiple see markers.

", - "examples": "
ts
faker.methodWithMultipleSeeMarkers(): number
+  "examples": "
ts
faker.methodWithMultipleSeeMarkers(): number
 
", "name": "methodWithMultipleSeeMarkers", @@ -250,7 +250,7 @@ exports[`signature > analyzeSignature() > methodWithMultipleSeeMarkersAndBacktic "deprecated": false, "description": "

Test with multiple see markers and backticks.

", - "examples": "
ts
faker.methodWithMultipleSeeMarkersAndBackticks(): number
+  "examples": "
ts
faker.methodWithMultipleSeeMarkersAndBackticks(): number
 
", "name": "methodWithMultipleSeeMarkersAndBackticks", @@ -271,7 +271,7 @@ exports[`signature > analyzeSignature() > methodWithSinceMarker 1`] = ` "deprecated": false, "description": "

Test with since marker.

", - "examples": "
ts
faker.methodWithSinceMarker(): number
+  "examples": "
ts
faker.methodWithSinceMarker(): number
 
", "name": "methodWithSinceMarker", @@ -289,7 +289,7 @@ exports[`signature > analyzeSignature() > multiParamMethod 1`] = ` "deprecated": false, "description": "

Test with multiple parameters.

", - "examples": "
ts
faker.multiParamMethod(a: number, b?: string, c: boolean = true): number
+  "examples": "
ts
faker.multiParamMethod(a: number, b?: string, c: boolean = true): number
 
", "name": "multiParamMethod", @@ -329,7 +329,7 @@ exports[`signature > analyzeSignature() > noParamMethod 1`] = ` "deprecated": false, "description": "

Test with no parameters.

", - "examples": "
ts
faker.noParamMethod(): number
+  "examples": "
ts
faker.noParamMethod(): number
 
", "name": "noParamMethod", @@ -347,7 +347,7 @@ exports[`signature > analyzeSignature() > optionalStringParamMethod 1`] = ` "deprecated": false, "description": "

Test with an optional parameter.

", - "examples": "
ts
faker.optionalStringParamMethod(b?: string): number
+  "examples": "
ts
faker.optionalStringParamMethod(b?: string): number
 
", "name": "optionalStringParamMethod", @@ -373,7 +373,7 @@ exports[`signature > analyzeSignature() > optionsInlineParamMethodWithDefaults 1 "deprecated": false, "description": "

Test with a function parameters (inline types) with defaults.

", - "examples": "
ts
faker.optionsInlineParamMethodWithDefaults(a: {
+  "examples": "
ts
faker.optionsInlineParamMethodWithDefaults(a: {
   value: number
 } = { value: 1 }, b: {
   value: number
@@ -442,7 +442,7 @@ exports[`signature > analyzeSignature() > optionsInterfaceParamMethodWithDefault
   "deprecated": false,
   "description": "

Test with a function parameters with defaults.

", - "examples": "
ts
faker.optionsInterfaceParamMethodWithDefaults(a: ParameterOptionsInterfaceA = { value: 1 }, b: ParameterOptionsInterfaceB = { value: 1 }, c: ParameterOptionsInterfaceC): number
+  "examples": "
ts
faker.optionsInterfaceParamMethodWithDefaults(a: ParameterOptionsInterfaceA = { value: 1 }, b: ParameterOptionsInterfaceB = { value: 1 }, c: ParameterOptionsInterfaceC): number
 
", "name": "optionsInterfaceParamMethodWithDefaults", @@ -482,7 +482,7 @@ exports[`signature > analyzeSignature() > optionsParamMethod 1`] = ` "deprecated": false, "description": "

Test with a function parameters.

", - "examples": "
ts
faker.optionsParamMethod(options: {
+  "examples": "
ts
faker.optionsParamMethod(options: {
   a: number,
   b: string,
   c: boolean,
@@ -541,7 +541,7 @@ exports[`signature > analyzeSignature() > optionsTypeParamMethodWithDefaults 1`]
   "deprecated": false,
   "description": "

Test with a function parameters with defaults.

", - "examples": "
ts
faker.optionsTypeParamMethodWithDefaults(a: ParameterOptionsTypeA = { value: 1 }, b: ParameterOptionsTypeB = { value: 1 }, c: ParameterOptionsTypeC): number
+  "examples": "
ts
faker.optionsTypeParamMethodWithDefaults(a: ParameterOptionsTypeA = { value: 1 }, b: ParameterOptionsTypeB = { value: 1 }, c: ParameterOptionsTypeC): number
 
", "name": "optionsTypeParamMethodWithDefaults", @@ -581,7 +581,7 @@ exports[`signature > analyzeSignature() > requiredNumberParamMethod 1`] = ` "deprecated": false, "description": "

Test with a required parameter.

", - "examples": "
ts
faker.requiredNumberParamMethod(a: number): number
+  "examples": "
ts
faker.requiredNumberParamMethod(a: number): number
 
", "name": "requiredNumberParamMethod", @@ -607,7 +607,7 @@ exports[`signature > analyzeSignature() > stringUnionParamMethod 1`] = ` "deprecated": false, "description": "

Test with string union.

", - "examples": "
ts
faker.stringUnionParamMethod(value: 'a' | 'b'): string
+  "examples": "
ts
faker.stringUnionParamMethod(value: 'a' | 'b'): string
 
", "name": "stringUnionParamMethod",