Skip to content

Commit a32aa8e

Browse files
committed
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> Signed-off-by: KUSHAL P <kushalmys55@gmail.com>
1 parent b4d871c commit a32aa8e

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

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)