Skip to content

Commit 42d30ed

Browse files
committed
🐛 Unblock CLI dependency update PR
Carry forward the Dependabot lockfile update and fix the Biome 2.4.13 lint findings so the dependency upgrade can merge cleanly.
1 parent d40f34b commit 42d30ed

14 files changed

Lines changed: 219 additions & 223 deletions

File tree

package-lock.json

Lines changed: 199 additions & 199 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/auth/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ export function buildTokenData(response, existingUser = null) {
173173
* @returns {{ valid: boolean, error: Error|null }}
174174
*/
175175
export function validateTokens(auth, requiredField = 'accessToken') {
176-
if (!auth || !auth[requiredField]) {
176+
if (!auth?.[requiredField]) {
177177
let message =
178178
requiredField === 'refreshToken'
179179
? 'No refresh token found. Please run "vizzly login" first.'

src/commands/logout.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function logoutCommand(options = {}, globalOptions = {}) {
2828
// Check if user is logged in
2929
let auth = await getAuthTokens();
3030

31-
if (!auth || !auth.accessToken) {
31+
if (!auth?.accessToken) {
3232
if (globalOptions.json) {
3333
output.data({ loggedOut: false, reason: 'not_logged_in' });
3434
} else {

src/commands/whoami.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export async function whoamiCommand(options = {}, globalOptions = {}) {
2828
// Check if user is logged in
2929
let auth = await getAuthTokens();
3030

31-
if (!auth || !auth.accessToken) {
31+
if (!auth?.accessToken) {
3232
if (globalOptions.json) {
3333
output.data({ authenticated: false });
3434
} else {

src/config/core.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ export function serializeConfig(config, filepath) {
408408
* @returns {{ config: Object|null, filepath: string|null }}
409409
*/
410410
export function extractCosmiconfigResult(result) {
411-
if (!result || !result.config) {
411+
if (!result?.config) {
412412
return { config: null, filepath: null };
413413
}
414414

src/reporter/src/components/comparison/screenshot-display.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export function ScreenshotDisplay({
5050
const container = screenshotContainerRef.current;
5151
const image = container?.querySelector('img');
5252

53-
if (!container || !image || !image.naturalWidth) return;
53+
if (!container || !image?.naturalWidth) return;
5454

5555
// Always track natural size for overflow calculations
5656
setNaturalImageSize({

src/reporter/src/components/static-report-view.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ function Header({ timestamp }) {
523523
}
524524

525525
export default function StaticReportView({ reportData }) {
526-
if (!reportData || !reportData.comparisons) {
526+
if (!reportData?.comparisons) {
527527
return (
528528
<div className="min-h-screen bg-slate-900 text-white flex items-center justify-center">
529529
<div className="text-center">

src/sdk/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ export class VizzlySDK extends EventEmitter {
231231
* @throws {VizzlyError} When file cannot be read due to permissions or I/O errors
232232
*/
233233
async screenshot(name, imageBuffer, options = {}) {
234-
if (!this.server || !this.server.isRunning()) {
234+
if (!this.server?.isRunning()) {
235235
throw new VizzlyError(
236236
'Server not running. Call start() first.',
237237
'SERVER_NOT_RUNNING'

src/tdd/core/hotspot-coverage.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,7 @@ export function calculateHotspotCoverage(diffClusters, hotspotAnalysis) {
2020
return { coverage: 0, linesInHotspots: 0, totalLines: 0 };
2121
}
2222

23-
if (
24-
!hotspotAnalysis ||
25-
!hotspotAnalysis.regions ||
26-
hotspotAnalysis.regions.length === 0
27-
) {
23+
if (!hotspotAnalysis?.regions || hotspotAnalysis.regions.length === 0) {
2824
return { coverage: 0, linesInHotspots: 0, totalLines: 0 };
2925
}
3026

src/tdd/services/hotspot-service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export async function downloadHotspots(options) {
2626
try {
2727
let response = await api.getHotspots(screenshotNames);
2828

29-
if (!response || !response.hotspots) {
29+
if (!response?.hotspots) {
3030
return { success: false, error: 'API returned no hotspot data' };
3131
}
3232

0 commit comments

Comments
 (0)