Skip to content

update deps#100

Merged
mattcosta7 merged 5 commits intomainfrom
update-deps
Mar 31, 2026
Merged

update deps#100
mattcosta7 merged 5 commits intomainfrom
update-deps

Conversation

@mattcosta7
Copy link
Copy Markdown
Member

No description provided.

@mattcosta7 mattcosta7 temporarily deployed to github-pages-preview March 31, 2026 01:29 — with GitHub Actions Inactive
@mattcosta7 mattcosta7 marked this pull request as ready for review March 31, 2026 01:42
@mattcosta7 mattcosta7 requested a review from a team as a code owner March 31, 2026 01:42
Copilot AI review requested due to automatic review settings March 31, 2026 01:42
@mattcosta7 mattcosta7 self-assigned this Mar 31, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates dependency versions across the monorepo (website + storybook addon) and makes small internal adjustments in the performance panel code to align with the upgraded toolchain/runtime.

Changes:

  • Bump website build deps (Vite + plugin-react) and UI/router deps (@primer/react, @tanstack/react-*).
  • Bump storybook addon dev tooling (Vitest, tsdown, plugin-react) and update internal profiler/input collector code.
  • Update repo-level tooling (TypeScript, typescript-eslint) and adjust npm overrides/devDependency aliasing for h3.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/website/package.json Dependency bumps for the website build/runtime stack (Vite/plugin-react, Primer, TanStack).
packages/storybook-addon-performance-panel/react/react-profiler-wrapper.tsx Refactor metrics ref initialization and add null-guards around store updates.
packages/storybook-addon-performance-panel/package.json Dev dependency bumps for building/testing the addon.
packages/storybook-addon-performance-panel/collectors/input-collector.ts Adjust interactionCount retrieval logic in Event Timing processing.
package.json Update TS/tooling versions and modify h3 override strategy via h3-v2 alias.
package-lock.json Lockfile updates reflecting dependency/tooling upgrades.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}: ReactProfilerWrapperProps) {
// Store metrics in a ref to avoid re-renders on metric updates
const metricsRef = useRef<ProfilerMetricsRef>(createMetricsRef())
const metricsRef = useRef<ProfilerMetricsRef>(null)
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

useRef<ProfilerMetricsRef>(null) is not type-safe under strict/strictNullChecks (null isn’t assignable to ProfilerMetricsRef). Change the ref type to include null (or initialize with a non-null value) so this compiles without relying on unsound casts, and then you can avoid repeatedly guarding metricsRef.current at each use-site.

Suggested change
const metricsRef = useRef<ProfilerMetricsRef>(null)
const metricsRef = useRef<ProfilerMetricsRef | null>(null)

Copilot uses AI. Check for mistakes.
Comment on lines 253 to 256
// Update interaction tracking - prefer browser's count if available
const perfWithEventTiming = performance as PerformanceWithEventTiming
this.#interactionCount = perfWithEventTiming.interactionCount ?? this.#interactionMap.size
const perfWithEventTiming = performance
this.#interactionCount = perfWithEventTiming.interactionCount
addToWindow(this.#interactionLatencies, duration, INTERACTION_LATENCIES_WINDOW)
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

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

performance.interactionCount is not part of the standard Performance type (and may be undefined at runtime). As written, this will fail TypeScript compilation under strict, and it can also assign undefined into #interactionCount even though it’s typed as number. Consider reintroducing a narrow type assertion/augmentation for interactionCount?: number and keep a numeric fallback (e.g., to this.#interactionMap.size) when the browser value is unavailable.

Copilot uses AI. Check for mistakes.
@mattcosta7 mattcosta7 merged commit 569c4ab into main Mar 31, 2026
14 checks passed
@mattcosta7 mattcosta7 deleted the update-deps branch March 31, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants