Skip to content

Commit 4ec4595

Browse files
authored
fix: add backward compatibility for dependency field is_resolved
fix: add backward compatibility for dependency field is_resolved - Support both `is_resolved` (legacy) and `is_pinned` (new) - Mark `is_resolved` as deprecated - Improve type documentation for clarity Signed-off-by: Kushal Prasad <your-email@example.com>
1 parent 0d592e2 commit 4ec4595

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/services/importedJsonTypes.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,17 @@ export interface Resource {
201201
is_runtime: boolean;
202202
is_optional: boolean;
203203

204-
// ✅ FIX: Support both old and new ScanCode fields
205-
is_resolved?: boolean;
204+
/**
205+
* Indicates whether the dependency is pinned (new field)
206+
*/
206207
is_pinned?: boolean;
207208

209+
/**
210+
* @deprecated Use `is_pinned` instead.
211+
* Kept for backward compatibility with older ScanCode outputs.
212+
*/
213+
is_resolved?: boolean;
214+
208215
resolved_package: unknown;
209216
extra_data: unknown;
210217
}[];

0 commit comments

Comments
 (0)