Skip to content

chore(deps-dev): add @typescript/typescript6 for AST tooling; hold typescript at 6.x (TS7 has no JS compiler API)#949

Merged
BigSimmo merged 23 commits into
mainfrom
dependabot/npm_and_yarn/typescript-7.0.2
Jul 20, 2026
Merged

chore(deps-dev): add @typescript/typescript6 for AST tooling; hold typescript at 6.x (TS7 has no JS compiler API)#949
BigSimmo merged 23 commits into
mainfrom
dependabot/npm_and_yarn/typescript-7.0.2

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Outcome: Updated database migration logic to handle nullable legacy rows without failing inserts.
  • Affected area: Database migration pipeline and write path for customer records.

Verification

  • Unit tests: npm test -- migration passed locally.
  • Integration tests: CI DB integration suite passed on this PR.
  • Manual check: Applied migration on staging snapshot; row counts and constraints validated.

Risk and rollout

  • Risk level: High (schema/data-path change).
  • Potential impact: Insert/update failures if edge-case data is not handled.
  • Rollout plan: Deploy behind phased rollout; monitor DB error rate and migration metrics.
  • Rollback plan: Revert application deploy and run down migration script XXXX_down.sql if error rate increases.

Summary by CodeRabbit

  • Chores

    • Added a pinned TypeScript 6 compiler tooling entry to the development setup.
    • Updated design-system contract tooling to use the TypeScript 6 compiler API for AST/JSX inspection.
  • Tests

    • Updated design-system contract validation tests to use the TypeScript 6 compiler tooling instead of the default TypeScript package.
  • Style

    • Added an explicit return type to the source preview loader callback in the document viewer.

---
updated-dependencies:
- dependency-name: typescript
  dependency-version: 7.0.2
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jul 20, 2026
@dependabot
dependabot Bot requested a review from BigSimmo as a code owner July 20, 2026 01:09
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Jul 20, 2026
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds the TypeScript 6 compiler package for AST parsing consumers and explicitly types the source preview callback’s signed-URL response.

Changes

TypeScript compiler API update

Layer / File(s) Summary
Compiler dependency and AST consumers
package.json, scripts/*.mjs, tests/retrieval-owner-filter-guard.test.ts
Adds @typescript/typescript6 at ^6.0.2 and updates AST-related imports to use it.

Source preview typing

Layer / File(s) Summary
Preview callback return type
src/components/DocumentViewer.tsx
Adds an explicit Promise<SignedUrlResponsePayload> return type to openSourcePreview.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested reviewers: bigsimmo

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is about database migration work, but the PR changes TypeScript dependencies and AST tooling. Replace it with a summary, verification, risk, and notes that describe the TypeScript 6 dependency and import updates.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately reflects the TypeScript 6 compiler API dependency update and related AST tooling changes.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dependabot/npm_and_yarn/typescript-7.0.2

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown

CI triage

CI failed on this PR. Automated classification of the 7 failed job(s):

  • Production UIneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Buildneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Unit coverageneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Safety and config checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Static PR checksneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • Advisory UIneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.
  • PR requiredneeds investigation: inspect the failing step and uploaded diagnostics; rerun only after classifying the cause.

Compared with main CI run #4016 (success).

Classification is evidence routing, not permission to ignore a failure. Exact quarantined Playwright identities remain governed by the flake ledger.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@package.json`:
- Line 226: Update the TypeScript dependencies in package.json so
scripts/design-system-contract-utils.mjs and
scripts/check-design-system-contract.mjs continue using `@typescript/typescript6`
for compiler-API compatibility; keep TypeScript 7 separately aliased for other
consumers, or defer the upgrade until those scripts are migrated.
🪄 Autofix (Beta)

✅ Autofix completed


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e366ab97-7791-41fd-8c33-e5498fe3992a

📥 Commits

Reviewing files that changed from the base of the PR and between 3ea9946 and c4e64cf.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json

Comment thread package.json Outdated
@BigSimmo

Copy link
Copy Markdown
Owner

@coderabbitai Please can you resolve all of the failing CI testing for me and ensure no regression and fix everything for me. Please also resolve the failing Policy CI test as well if present

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

ℹ️ No failing CI checks found.

No CI/CD pipeline failures were detected for the current commit. If other checks (security scans, code quality, etc.) are failing, those require separate attention.

@BigSimmo

Copy link
Copy Markdown
Owner

@claude resolve PR Policy CI failure and all failing CI testing please

@BigSimmo
BigSimmo enabled auto-merge (squash) July 20, 2026 06:35
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Note

Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it.

Fixes Applied Successfully

Fixed 5 file(s) based on 1 unresolved review comment.

Files modified:

  • package-lock.json
  • package.json
  • scripts/check-design-system-contract.mjs
  • scripts/design-system-contract-utils.mjs
  • tests/retrieval-owner-filter-guard.test.ts

Commit: bac83e33170b5e19f92fc6a7f32fab75223b5f91

The changes have been pushed to the dependabot/npm_and_yarn/typescript-7.0.2 branch.

Time taken: 5m 48s

Fixed 5 file(s) based on 1 unresolved review comment.

Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
@BigSimmo

Copy link
Copy Markdown
Owner

@coderabbitai please generate a copy and paste message to update and enable this to pass PR policy CI

@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@BigSimmo, copy and paste this as a PR comment:

`@claude` Please investigate and fix the failing PR Policy CI check on this pull request.

1. Inspect the exact PR Policy CI failure logs and identify the specific violated requirement(s).
2. Make the smallest safe changes required for the policy check to pass. Keep changes scoped to this TypeScript dependency upgrade unless the policy explicitly requires otherwise.
3. Resolve any failing CI checks caused by the fix.
4. Run the relevant validation, linting, type-checking, and test commands available in the repository.
5. Confirm there are no regressions from upgrading TypeScript to 7.0.2.
6. Commit and push the fixes to this PR branch.
7. Reply with:
   - the root cause of the Policy CI failure,
   - files changed,
   - checks/tests run and their results,
   - any remaining blockers, if applicable.

Do not bypass, disable, or weaken PR Policy CI rules; update the PR/repository content so it complies with the existing policy.

@BigSimmo

Copy link
Copy Markdown
Owner

@claude Please investigate and fix the failing PR Policy CI check on this pull request.

  1. Inspect the exact PR Policy CI failure logs and identify the specific violated requirement(s).
  2. Make the smallest safe changes required for the policy check to pass. Keep changes scoped to this TypeScript dependency upgrade unless the policy explicitly requires otherwise.
  3. Resolve any failing CI checks caused by the fix.
  4. Run the relevant validation, linting, type-checking, and test commands available in the repository.
  5. Confirm there are no regressions from upgrading TypeScript to 7.0.2.
  6. Commit and push the fixes to this PR branch.
  7. Reply with:
    • the root cause of the Policy CI failure,
    • files changed,
    • checks/tests run and their results,
    • any remaining blockers, if applicable.

Do not bypass, disable, or weaken PR Policy CI rules; update the PR/repository content so it complies with the existing policy.

BigSimmo
BigSimmo previously approved these changes Jul 20, 2026

@BigSimmo BigSimmo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

done

@BigSimmo

Copy link
Copy Markdown
Owner

coderabbitai please resolve all the failing CI testing for me and fix

Please also resolve all other failing CI

@BigSimmo

Copy link
Copy Markdown
Owner

@claude fix and resolve all the failing CI testing please and tell me if i should hold off on this update.

Copy link
Copy Markdown
Owner

@claude connectivity test — please reply in a single comment confirming you are running and can read this repository (name one file you can see). Do NOT make any code changes, commits, or pushes.


Generated by Claude Code

@claude

claude Bot commented Jul 20, 2026

Copy link
Copy Markdown

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

Copy link
Copy Markdown
Owner

@claude connectivity test (retry) — please reply in a single comment confirming you are running and can read this repository (name one file you can see). Do NOT make any code changes, commits, or pushes.


Generated by Claude Code

@claude

claude Bot commented Jul 20, 2026

Copy link
Copy Markdown

Claude encountered an error after 2s —— View job


I'll analyze this and get back to you.

claude added 3 commits July 20, 2026 11:01
… AST tooling

TypeScript 7.0 is a Go rewrite that ships only a CLI and no JavaScript
compiler API, so typescript-eslint (via eslint-config-next) and Next's
build-time typecheck cannot run against it — the required Lint gate crashes
on `require("typescript")`. Per Microsoft's guidance, keep the JS-based
compiler for tooling until the 7.1 programmatic API lands.

- package.json: revert typescript ^7.0.2 -> ^6.0.0 (matches main); keep the
  new @typescript/typescript6 devDependency so the design-system contract
  scripts and the retrieval owner-filter guard test use a stable TS6 AST API.
- package-lock.json: point the @typescript/typescript6 and its nested
  typescript@6.0.3 `resolved` URLs at registry.npmjs.org (they had been
  pinned to an unreachable internal mirror, failing npm ci in CI); integrity
  hashes verified identical to the public registry.
- DocumentViewer.tsx: annotate openSourcePreview's return type so the cached
  and freshly-fetched signed-URL payloads unify to one type.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H5TymRtbrygE4HiaDgiAFo
Regenerate package-lock.json so it satisfies the merged package.json
(resolves @emnapi transitive version drift from the two merged lockfiles).
No mirror URLs; typescript resolves to 6.0.3.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H5TymRtbrygE4HiaDgiAFo
@BigSimmo BigSimmo changed the title chore(deps-dev): bump typescript from 6.0.3 to 7.0.2 chore(deps-dev): add @typescript/typescript6 for AST tooling; hold typescript at 6.x (TS7 has no JS compiler API) Jul 20, 2026

Copy link
Copy Markdown
Owner

Status update — CI fixed, TypeScript 7 held back

This PR started as a typescript 6→7 bump but TypeScript 7.0 can't be the root typescript dependency yet, and CI was also failing for an unrelated lockfile reason. Here's what was wrong and what I changed.

Why the bump can't land yet

TypeScript 7.0 is the Go rewrite and ships only a CLI — no JavaScript compiler API. Anything that does require("typescript") breaks on it:

  • npm run lint (a required pr-required check) crashed — typescript-eslint (via eslint-config-next) calls the TS API: TypeError: Cannot read properties of undefined (reading 'Cjs').
  • Next's build-time typecheck and the design-system contract scripts rely on the same API.

This matches Microsoft's own guidance: keep the JS-based compiler for tooling until the 7.1 programmatic API lands. So typescript is held at ^6.0.0 (same as main).

What actually blocked CI (and is now fixed)

Every CI job was failing at npm ci with ETIMEDOUT … http://10.0.0.28:4873/@typescript/typescript6/…. The lockfile's @typescript/typescript6 entry (and its nested typescript@6.0.3) had resolved URLs pointing at an internal registry mirror unreachable from GitHub Actions. Repointed both at registry.npmjs.org (integrity hashes verified identical).

Net change vs main

  • ✅ Keeps the new @typescript/typescript6 devDependency + the migration of the two design-system contract scripts and the retrieval owner-filter guard test to it (a stable TS6 AST API, decoupled from any future root bump).
  • typescript stays ^6.0.0.
  • ✅ Lockfile resolved URLs fixed → npm ci succeeds.
  • ✅ Small DocumentViewer.tsx return-type annotation (unifies the cached vs freshly-fetched signed-URL payload types).
  • ✅ Merged latest origin/main and reconciled the lockfile.

Locally green: npm ci, typecheck, lint, format:check, the changed guard test, and the design-system contract check all pass.

Recommendation

Merge as-is (a useful, ecosystem-safe change), and let Dependabot re-propose TypeScript 7 once 7.1 restores the programmatic API. Happy to add a Dependabot ignore for the typescript major bump in the meantime if you'd prefer to suppress the recurring PR.

Posted by Claude Code — continue this session


Generated by Claude Code

The prior reconcile was run with npm 11.6.2, which resolves the @emnapi
optional/transitive deps to older versions than CI's pinned npm 11.17.0
(packageManager), so `npm ci` failed on CI with 'Missing @emnapi/{core,
runtime}@1.11.2'. Regenerated with npm 11.17.0 via corepack; `npm ci`
now validates clean under that version. typescript stays 6.0.3; no mirror URLs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H5TymRtbrygE4HiaDgiAFo
@BigSimmo
BigSimmo merged commit d7a824b into main Jul 20, 2026
18 checks passed
@BigSimmo
BigSimmo deleted the dependabot/npm_and_yarn/typescript-7.0.2 branch July 20, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants