diff --git a/package.json b/package.json index 24c35d39bf8..4f145156458 100644 --- a/package.json +++ b/package.json @@ -126,7 +126,7 @@ "typescript": "~4.9.5", "validator": "~13.9.0", "vite": "~4.1.4", - "vitepress": "1.0.0-alpha.49", + "vitepress": "1.0.0-alpha.58", "vitest": "~0.29.2", "vue": "~3.2.47" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a0a74bbb731..17f3bc99a68 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,7 +44,7 @@ specifiers: typescript: ~4.9.5 validator: ~13.9.0 vite: ~4.1.4 - vitepress: 1.0.0-alpha.49 + vitepress: 1.0.0-alpha.58 vitest: ~0.29.2 vue: ~3.2.47 @@ -92,7 +92,7 @@ devDependencies: typescript: 4.9.5 validator: 13.9.0 vite: 4.1.4_@types+node@18.15.3 - vitepress: 1.0.0-alpha.49_6x66empz7tvqv233bjwlvs4b7i + vitepress: 1.0.0-alpha.58_6x66empz7tvqv233bjwlvs4b7i vitest: 0.29.2_@vitest+ui@0.29.2 vue: 3.2.47 @@ -5304,8 +5304,8 @@ packages: fsevents: 2.3.2 dev: true - /vitepress/1.0.0-alpha.49_6x66empz7tvqv233bjwlvs4b7i: - resolution: {integrity: sha512-3nUZJow4qL8NHRWYatqqVj45AJDxWst/TuOj+IbQRhxesEswa+Fpwayj9/FxzRzBl665fuiG5y+QeVhOeUm0OA==} + /vitepress/1.0.0-alpha.58_6x66empz7tvqv233bjwlvs4b7i: + resolution: {integrity: sha512-aENSAiE2uKMoQPwBTELY8Nig5qSWrmAl+MgsO3l/TE8At6kXii+2rseEId/bVfT700JeucYdqtCgWxu+LwpYIw==} hasBin: true dependencies: '@docsearch/css': 3.3.3 diff --git a/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap b/test/scripts/apidoc/__snapshots__/signature.spec.ts.snap index 86d9a40d6db..cfdbce2f196 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": undefined, "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": undefined,
   "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": undefined, "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": undefined, "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", @@ -191,7 +191,7 @@ exports[`signature > analyzeSignature() > methodWithDeprecated 1`] = ` ", "description": "

Test with deprecated and see marker.

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

Test with example marker.

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

Test with multiple see markers.

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

Test with multiple see markers and backticks.

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

Test with since marker.

", - "examples": "
ts
faker.methodWithSinceMarker(): number
+  "examples": "
ts
faker.methodWithSinceMarker(): number
 
", "name": "methodWithSinceMarker", @@ -290,7 +290,7 @@ exports[`signature > analyzeSignature() > multiParamMethod 1`] = ` "deprecated": undefined, "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", @@ -330,7 +330,7 @@ exports[`signature > analyzeSignature() > noParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with no parameters.

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

Test with an optional parameter.

", - "examples": "
ts
faker.optionalStringParamMethod(b?: string): number
+  "examples": "
ts
faker.optionalStringParamMethod(b?: string): number
 
", "name": "optionalStringParamMethod", @@ -374,7 +374,7 @@ exports[`signature > analyzeSignature() > optionsInlineParamMethodWithDefaults 1 "deprecated": undefined, "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
@@ -443,7 +443,7 @@ exports[`signature > analyzeSignature() > optionsInterfaceParamMethodWithDefault
   "deprecated": undefined,
   "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", @@ -483,7 +483,7 @@ exports[`signature > analyzeSignature() > optionsParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with a function parameters.

", - "examples": "
ts
faker.optionsParamMethod(options: {
+  "examples": "
ts
faker.optionsParamMethod(options: {
   a: number,
   b: string,
   c: boolean,
@@ -542,7 +542,7 @@ exports[`signature > analyzeSignature() > optionsTypeParamMethodWithDefaults 1`]
   "deprecated": undefined,
   "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", @@ -582,7 +582,7 @@ exports[`signature > analyzeSignature() > requiredNumberParamMethod 1`] = ` "deprecated": undefined, "description": "

Test with a required parameter.

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

Test with string union.

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