Skip to content

chore: update the entire app to use typescript 7 - #1114

Open
amadeus wants to merge 5 commits into
mainfrom
amadeus/tsgo-upgrade
Open

chore: update the entire app to use typescript 7#1114
amadeus wants to merge 5 commits into
mainfrom
amadeus/tsgo-upgrade

Conversation

@amadeus

@amadeus amadeus commented Sep 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Upgrade the monorepo to TypeScript 7 and replace the native-preview tsgo dependency with the TypeScript 7 tsc CLI.
  • Update Next.js, Oxlint, tsdown, and related lockfile entries to versions that support the new compiler.
  • Fix the type and lint regressions exposed by the toolchain upgrade across the diffs and trees packages, their tests, and the docs and DiffsHub apps.
  • Resolve React Compiler diagnostics without changing the existing UI and imperative model behavior.
  • Promote React Compiler safety rules from warnings to errors so new violations fail lint and CI.

Details

  • Update Moon typecheck tasks and repository guidance to use TypeScript 7's tsc implementation.
  • Replace removed or renamed dependency options in the Next.js and tsdown configurations.
  • Adjust code and test harnesses for stricter TypeScript 7 inference, DOM types, and callback signatures.
  • Remove synchronous state updates from effects where state can be derived, initialized, or updated at the originating event.
  • Move ref updates to the commit phase for callbacks owned by React, while keeping narrow compatibility boundaries around intentional imperative and Preact behavior.
  • Add app-local latest-value ref helpers for Docs and DiffsHub, and a small ref assignment helper for the diffs React bindings.
  • Keep React Compiler enforcement limited to compiler safety rules; unrelated React style rules retain their existing severity.

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
pierre-diffshub Ready Ready Preview Sep 4, 2026 1:18am UTC
pierre-docs-diffs Ready Ready Preview Sep 4, 2026 1:18am UTC
pierre-docs-trees Ready Ready Preview Sep 4, 2026 1:18am UTC
pierrejs-diff-demo Ready Ready Preview Sep 4, 2026 1:18am UTC

Request Review

@socket-security

socket-security Bot commented Sep 2, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednext@​16.2.9 ⏵ 16.3.361 -2100 +4090 +19970
Updated@​tsdown/​css@​0.22.3 ⏵ 0.22.1475 +11008098 +3100
Updatedtsdown@​0.22.3 ⏵ 0.22.1498 +110088 +197100
Updatedtypescript@​6.0.3 ⏵ 7.0.29910089 -1100100 +10
Updatedoxlint@​1.70.0 ⏵ 1.80.099 +11009196100
Updatedoxlint-tsgolint@​0.23.0 ⏵ 7.0.2001100 +11009792 +2100

View full report

@socket-security

socket-security Bot commented Sep 2, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
License policy violation: npm typescript

License: LicenseRef-W3C-Community-Final-Specification-Agreement - The applicable license policy does not permit this license (5) (package/ThirdPartyNoticeText.txt)

From: pnpm-lock.yamlnpm/@arethetypeswrong/core@0.18.2npm/typescript@5.6.1-rc

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/typescript@5.6.1-rc. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@amadeus

amadeus commented Sep 3, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-03T02:16:42.703080Z 894cd84 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 894cd84189

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

This involved updating a bunch of deps and cleaning up a bunch of
typescript configuration
Making something smol n reviewable for Alex

- `apps/docs/app/(trees)/_components/DemoContextMenuClient.tsx`
  - Replace effect-managed portal state with a stable
    `useSyncExternalStore` snapshot of the root portal container.

- `apps/docs/app/(trees)/_components/DemoDragDropClient.tsx`
  - Reset drag status directly when toggling the locked model instead of
    synchronously from the model-reset effect.

- `apps/docs/app/(trees)/_components/DemoThemingClient.tsx`
  - Subscribe to the system color scheme with `useSyncExternalStore`.
  - Move theme loading state changes into asynchronous resolution
    callbacks and associate errors with the requested theme.
  - Remove the unnecessary initial-theme loading indicator.

- `apps/docs/app/(trees)/_components/DemoTreeAppClient.tsx`
  - Add resettable local state that reconciles file and prerendered HTML
    maps before commit when server inputs change.
  - Read the stable portal container through `useSyncExternalStore`.
  - Include the resettable setters in the mutation subscription
    dependencies.

- `apps/docs/app/(trees)/_components/TreeApp.tsx`
  - Isolate intentional render-time ref reads and writes behind
    dedicated hook boundaries.
  - Collapse desktop tabs during the render that switches to the mobile
    layout instead of from an effect.

- `apps/docs/app/(trees)/trees-dev/_components/TreesDevShell.tsx`
  - Associate the open mobile menu with the current navigation identity
    so route changes close it without an effect-driven state update.

- `apps/docs/app/(trees)/trees-dev/_demos/ItemCustomizationDemoClient.tsx`
  - Isolate the intentional render-time selected-path ref read behind a
    hook boundary.

- `apps/docs/app/(trees)/trees-dev/_demos/MainDemoClient.tsx`
  - Reconcile the optimistic workload selection during render when the
    authoritative workload changes, removing the effect-driven state
    reset.

- `apps/docs/app/(trees)/trees-dev/_demos/ResponsivenessDemoClient.tsx`
  - Isolate the intentional render-time container measurement behind a
    hook boundary.

- `packages/trees/src/render/FileTreeView.tsx`
  - Disable the React ref rule for the Preact renderer, whose ref
    behavior is not governed by React Compiler rules.

- `packages/trees/test/file-tree-react.test.tsx`
  - Add targeted suppressions for intentional model capture in test
    harnesses.
  - Expand context-menu composition coverage to verify preservation,
    removal, stale-state invalidation, and reopening behavior.
Because it'll fuck with git stuff, and it's generally good to have these
checked in, imo...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant