pretty-format
Advanced tools
+8
-4
@@ -111,4 +111,6 @@ /** | ||
| export declare interface Options | ||
| extends Omit<RequiredOptions, 'compareKeys' | 'theme'> { | ||
| export declare interface Options extends Omit< | ||
| RequiredOptions, | ||
| 'compareKeys' | 'theme' | ||
| > { | ||
| compareKeys: CompareKeys; | ||
@@ -140,4 +142,6 @@ theme: Required<RequiredOptions['theme']>; | ||
| export declare interface PrettyFormatOptions | ||
| extends Omit<SnapshotFormat, 'compareKeys'> { | ||
| export declare interface PrettyFormatOptions extends Omit< | ||
| SnapshotFormat, | ||
| 'compareKeys' | ||
| > { | ||
| compareKeys?: CompareKeys; | ||
@@ -144,0 +148,0 @@ plugins?: Plugins; |
+27
-27
@@ -13,4 +13,4 @@ /*! | ||
| /***/ "./src/collections.ts": | ||
| /***/ ((__unused_webpack_module, exports) => { | ||
| /***/ "./src/collections.ts" | ||
| (__unused_webpack_module, exports) { | ||
@@ -175,6 +175,6 @@ | ||
| /***/ }), | ||
| /***/ }, | ||
| /***/ "./src/plugins/AsymmetricMatcher.ts": | ||
| /***/ ((__unused_webpack_module, exports, __webpack_require__) => { | ||
| /***/ "./src/plugins/AsymmetricMatcher.ts" | ||
| (__unused_webpack_module, exports, __webpack_require__) { | ||
@@ -237,6 +237,6 @@ | ||
| /***/ }), | ||
| /***/ }, | ||
| /***/ "./src/plugins/DOMCollection.ts": | ||
| /***/ ((__unused_webpack_module, exports, __webpack_require__) => { | ||
| /***/ "./src/plugins/DOMCollection.ts" | ||
| (__unused_webpack_module, exports, __webpack_require__) { | ||
@@ -283,6 +283,6 @@ | ||
| /***/ }), | ||
| /***/ }, | ||
| /***/ "./src/plugins/DOMElement.ts": | ||
| /***/ ((__unused_webpack_module, exports, __webpack_require__) => { | ||
| /***/ "./src/plugins/DOMElement.ts" | ||
| (__unused_webpack_module, exports, __webpack_require__) { | ||
@@ -360,6 +360,6 @@ | ||
| /***/ }), | ||
| /***/ }, | ||
| /***/ "./src/plugins/Immutable.ts": | ||
| /***/ ((__unused_webpack_module, exports, __webpack_require__) => { | ||
| /***/ "./src/plugins/Immutable.ts" | ||
| (__unused_webpack_module, exports, __webpack_require__) { | ||
@@ -475,6 +475,6 @@ | ||
| /***/ }), | ||
| /***/ }, | ||
| /***/ "./src/plugins/ReactElement.ts": | ||
| /***/ ((__unused_webpack_module, exports, __webpack_require__) => { | ||
| /***/ "./src/plugins/ReactElement.ts" | ||
| (__unused_webpack_module, exports, __webpack_require__) { | ||
@@ -560,6 +560,6 @@ | ||
| /***/ }), | ||
| /***/ }, | ||
| /***/ "./src/plugins/ReactTestComponent.ts": | ||
| /***/ ((__unused_webpack_module, exports, __webpack_require__) => { | ||
| /***/ "./src/plugins/ReactTestComponent.ts" | ||
| (__unused_webpack_module, exports, __webpack_require__) { | ||
@@ -599,6 +599,6 @@ | ||
| /***/ }), | ||
| /***/ }, | ||
| /***/ "./src/plugins/lib/escapeHTML.ts": | ||
| /***/ ((__unused_webpack_module, exports) => { | ||
| /***/ "./src/plugins/lib/escapeHTML.ts" | ||
| (__unused_webpack_module, exports) { | ||
@@ -622,6 +622,6 @@ | ||
| /***/ }), | ||
| /***/ }, | ||
| /***/ "./src/plugins/lib/markup.ts": | ||
| /***/ ((__unused_webpack_module, exports, __webpack_require__) => { | ||
| /***/ "./src/plugins/lib/markup.ts" | ||
| (__unused_webpack_module, exports, __webpack_require__) { | ||
@@ -690,3 +690,3 @@ | ||
| /***/ }) | ||
| /***/ } | ||
@@ -693,0 +693,0 @@ /******/ }); |
+3
-3
| { | ||
| "name": "pretty-format", | ||
| "version": "30.2.0", | ||
| "version": "30.3.0", | ||
| "repository": { | ||
@@ -33,3 +33,3 @@ "type": "git", | ||
| "immutable": "^5.1.2", | ||
| "jest-util": "30.2.0", | ||
| "jest-util": "30.3.0", | ||
| "react": "18.3.1", | ||
@@ -45,3 +45,3 @@ "react-dom": "18.3.1", | ||
| }, | ||
| "gitHead": "855864e3f9751366455246790be2bf912d4d0dac" | ||
| "gitHead": "efb59c2e81083f8dc941f20d6d20a3af2dc8d068" | ||
| } |
| import { SnapshotFormat } from "@jest/schemas"; | ||
| //#region src/types.d.ts | ||
| type Colors = { | ||
| comment: { | ||
| close: string; | ||
| open: string; | ||
| }; | ||
| content: { | ||
| close: string; | ||
| open: string; | ||
| }; | ||
| prop: { | ||
| close: string; | ||
| open: string; | ||
| }; | ||
| tag: { | ||
| close: string; | ||
| open: string; | ||
| }; | ||
| value: { | ||
| close: string; | ||
| open: string; | ||
| }; | ||
| }; | ||
| type Indent = (arg0: string) => string; | ||
| type Refs = Array<unknown>; | ||
| type Print = (arg0: unknown) => string; | ||
| type Theme = Options['theme']; | ||
| type CompareKeys = ((a: string, b: string) => number) | null | undefined; | ||
| type RequiredOptions = Required<PrettyFormatOptions>; | ||
| interface Options extends Omit<RequiredOptions, 'compareKeys' | 'theme'> { | ||
| compareKeys: CompareKeys; | ||
| theme: Required<RequiredOptions['theme']>; | ||
| } | ||
| interface PrettyFormatOptions extends Omit<SnapshotFormat, 'compareKeys'> { | ||
| compareKeys?: CompareKeys; | ||
| plugins?: Plugins; | ||
| } | ||
| type OptionsReceived = PrettyFormatOptions; | ||
| type Config = { | ||
| callToJSON: boolean; | ||
| compareKeys: CompareKeys; | ||
| colors: Colors; | ||
| escapeRegex: boolean; | ||
| escapeString: boolean; | ||
| indent: string; | ||
| maxDepth: number; | ||
| maxWidth: number; | ||
| min: boolean; | ||
| plugins: Plugins; | ||
| printBasicPrototype: boolean; | ||
| printFunctionName: boolean; | ||
| spacingInner: string; | ||
| spacingOuter: string; | ||
| }; | ||
| type Printer = (val: unknown, config: Config, indentation: string, depth: number, refs: Refs, hasCalledToJSON?: boolean) => string; | ||
| type Test = (arg0: any) => boolean; | ||
| type NewPlugin = { | ||
| serialize: (val: any, config: Config, indentation: string, depth: number, refs: Refs, printer: Printer) => string; | ||
| test: Test; | ||
| }; | ||
| type PluginOptions = { | ||
| edgeSpacing: string; | ||
| min: boolean; | ||
| spacing: string; | ||
| }; | ||
| type OldPlugin = { | ||
| print: (val: unknown, print: Print, indent: Indent, options: PluginOptions, colors: Colors) => string; | ||
| test: Test; | ||
| }; | ||
| type Plugin = NewPlugin | OldPlugin; | ||
| type Plugins = Array<Plugin>; | ||
| //#endregion | ||
| //#region src/index.d.ts | ||
| declare const DEFAULT_OPTIONS: { | ||
| callToJSON: true; | ||
| compareKeys: undefined; | ||
| escapeRegex: false; | ||
| escapeString: true; | ||
| highlight: false; | ||
| indent: number; | ||
| maxDepth: number; | ||
| maxWidth: number; | ||
| min: false; | ||
| plugins: never[]; | ||
| printBasicPrototype: true; | ||
| printFunctionName: true; | ||
| theme: Required<{ | ||
| comment?: string | undefined; | ||
| content?: string | undefined; | ||
| prop?: string | undefined; | ||
| tag?: string | undefined; | ||
| value?: string | undefined; | ||
| }>; | ||
| }; | ||
| /** | ||
| * Returns a presentation string of your `val` object | ||
| * @param val any potential JavaScript object | ||
| * @param options Custom settings | ||
| */ | ||
| declare function format(val: unknown, options?: OptionsReceived): string; | ||
| declare const plugins: { | ||
| AsymmetricMatcher: NewPlugin; | ||
| DOMCollection: NewPlugin; | ||
| DOMElement: NewPlugin; | ||
| Immutable: NewPlugin; | ||
| ReactElement: NewPlugin; | ||
| ReactTestComponent: NewPlugin; | ||
| }; | ||
| //#endregion | ||
| export { Colors, CompareKeys, Config, DEFAULT_OPTIONS, NewPlugin, OldPlugin, Options, OptionsReceived, Plugin, Plugins, PrettyFormatOptions, Printer, Refs, Theme, format as default, format, plugins }; |
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
1134
0.35%60315
-4.96%6
-14.29%