Skip to content

Commit

Permalink
refactor: remove useFormat Preserve
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxken committed Aug 11, 2024
1 parent 8374c2c commit 7759855
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,9 @@ export interface ExtendedStrategy<
) => Promise<(VulnFormat | StandardVulnerability)[]>;
}

export type BaseStrategyFormat = "Preserve" | "Standard" | "OSV";
export type BaseStrategyFormat = "Standard" | "OSV";

export interface BaseStrategyOptions {
/**
* @default "Preserve"
*/
useFormat?: BaseStrategyFormat;
}

Expand Down
4 changes: 3 additions & 1 deletion src/formats/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import {
StandardizeKind
} from "./standard/index.js";

export function formatVulnsPayload(format: BaseStrategyFormat = "Preserve") {
export function formatVulnsPayload(
format: BaseStrategyFormat | null = null
) {
return function formatVulnerabilities(
strategy: StandardizeKind,
vulnerabilities: any[]
Expand Down
5 changes: 1 addition & 4 deletions src/strategies/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ import type { Dependencies } from "./scanner.js";
import type { StandardVulnerability } from "../../formats/standard/index.js";
import type { Kind } from "../../constants.js";

export type BaseStrategyFormat = "Preserve" | "Standard" | "OSV";
export type BaseStrategyFormat = "Standard" | "OSV";

export interface BaseStrategyOptions {
/**
* @default "Preserve"
*/
useFormat?: BaseStrategyFormat;
}

Expand Down

0 comments on commit 7759855

Please sign in to comment.