Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1484,7 +1484,7 @@ __metadata:
languageName: node
linkType: hard

"@blueprintjs/core@npm:^6.0.0, @blueprintjs/core@npm:^6.3.4, @blueprintjs/core@npm:^6.4.1":
"@blueprintjs/core@npm:^6.0.0, @blueprintjs/core@npm:^6.4.1":
version: 6.4.1
resolution: "@blueprintjs/core@npm:6.4.1"
dependencies:
Expand Down Expand Up @@ -1512,12 +1512,12 @@ __metadata:
linkType: hard

"@blueprintjs/datetime@npm:^6.0.0":
version: 6.0.8
resolution: "@blueprintjs/datetime@npm:6.0.8"
version: 6.0.10
resolution: "@blueprintjs/datetime@npm:6.0.10"
dependencies:
"@blueprintjs/core": "npm:^6.3.4"
"@blueprintjs/icons": "npm:^6.3.1"
"@blueprintjs/select": "npm:^6.0.8"
"@blueprintjs/core": "npm:^6.4.1"
"@blueprintjs/icons": "npm:^6.3.2"
"@blueprintjs/select": "npm:^6.0.10"
classnames: "npm:^2.3.1"
date-fns: "npm:^2.28.0"
date-fns-tz: "npm:^2.0.0"
Comment on lines 1513 to 1523
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The handleParseDate function in GroundControlEditCell.tsx returns false on failure, but the @blueprintjs/datetime v6.0.10 parseDate prop expects null.
Severity: HIGH | Confidence: High

🔍 Detailed Analysis

In GroundControlEditCell.tsx, the handleParseDate function returns false when date parsing fails. However, the parseDate prop for the @blueprintjs/datetime v6.0.10 DateInput component expects a function with the signature (str: string) => Date | null. Returning false instead of the expected null violates the component's API contract. This mismatch can lead to incorrect error handling or other unexpected behavior within the DateInput component, as it may not correctly identify an invalid date parsing attempt.

💡 Suggested Fix

Modify the handleParseDate function in GroundControlEditCell.tsx to return null instead of false when the date string is invalid. Change return date.isValid() ? date.toDate() : false; to return date.isValid() ? date.toDate() : null;.

🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: yarn.lock#L1512-L1523

Potential issue: In `GroundControlEditCell.tsx`, the `handleParseDate` function returns
`false` when date parsing fails. However, the `parseDate` prop for the
`@blueprintjs/datetime` v6.0.10 `DateInput` component expects a function with the
signature `(str: string) => Date | null`. Returning `false` instead of the expected
`null` violates the component's API contract. This mismatch can lead to incorrect error
handling or other unexpected behavior within the `DateInput` component, as it may not
correctly identify an invalid date parsing attempt.

Did we get this right? 👍 / 👎 to inform future reviews.
Reference ID: 7599549

Expand All @@ -1531,11 +1531,11 @@ __metadata:
peerDependenciesMeta:
"@types/react":
optional: true
checksum: 10c0/d555b3d50710f9570f4ab4f48513917c142bfaea92fb37a074bf385567823c4310612791433edaabcae37eef3316ffd174406bf48d5fbe3acae4e2a33ad9643a
checksum: 10c0/269117e43557f56f85eb00bf6ac114854e89b12dfa95f1e17a80618167e129182b49fd6fa49a036a5e885addfcd5c742da6fd714a4a7f38476dbe766029ae133
languageName: node
linkType: hard

"@blueprintjs/icons@npm:^6.0.0, @blueprintjs/icons@npm:^6.3.1, @blueprintjs/icons@npm:^6.3.2":
"@blueprintjs/icons@npm:^6.0.0, @blueprintjs/icons@npm:^6.3.2":
version: 6.3.2
resolution: "@blueprintjs/icons@npm:6.3.2"
dependencies:
Expand All @@ -1553,7 +1553,7 @@ __metadata:
languageName: node
linkType: hard

"@blueprintjs/select@npm:^6.0.0, @blueprintjs/select@npm:^6.0.8":
"@blueprintjs/select@npm:^6.0.0, @blueprintjs/select@npm:^6.0.10":
version: 6.0.10
resolution: "@blueprintjs/select@npm:6.0.10"
dependencies:
Expand Down
Loading