Skip to content

Type-check .astro files with the TypeScript 7.1 content mapper - #202

Merged
kixelated merged 6 commits into
mainfrom
quest/m0/astro-typecheck
Oct 28, 2026
Merged

kixelated merged 6 commits into
mainfrom
quest/m0/astro-typecheck

Conversation

@kixelated

@kixelated kixelated commented Oct 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

just check and CI now type-check the .astro files under src/ with @astrojs/ts-content-mapper:

  • typescript moves to 7.1.0-beta, per the quest's decision to adopt the beta now (7.1 stable isn't out; latest is 7.0.2).
  • tsconfig.json registers the mapper under contentMappers, and check passes --runExternalCode.
  • moq/ stays excluded: the only submodule files checked are the ones src/ imports, the same set as before.

The existing .astro files surface no errors. I confirmed the mapper is live by injecting a frontmatter type error, a bad expression, a missing Astro prop, and an unknown prop on a Solid island; all four were reported. withastro/astro#18471 doesn't reproduce here on strict. MDX stays unchecked.

TypeScript 7.1's DOM lib types more of WebTransport, which @moq/qmux's Session failed to satisfy. moq-dev/moq#6625 fixed that upstream, and the moq pin on main (d140840) already includes it, so this PR carries no submodule change.

Choices made

  • typescript is pinned exactly to 7.1.0-beta rather than ^7.1.0-beta. In semver, 7.1.0-dev.* sorts above 7.1.0-beta, so the caret resolved to the daily nightly (7.1.0-dev.20261027.1) on a lockfile refresh. Moving to 7.1 stable is now a deliberate bump.

Verification

  • just fix, then just check: passes, quest check ok.
  • Injected const probe: number = "not a number" into src/pages/index.astro: tsc reports TS2322 at that line.
  • Dev server: home, blog, watch, and publish pages render.

Follow-ups

  • Move to TypeScript 7.1 stable when it ships.

(Written by Claude Opus 5.5)

🤖 Generated with Claude Code

@kixelated

Copy link
Copy Markdown
Collaborator Author

Status: implementation done; blocked on moq-dev/moq#6625. CI fails only on the expected @moq/qmux congestionControl error from TypeScript 7.1's DOM lib. Next step after that merges: bump the moq submodule here, rerun CI, mark ready.

Decision for the maintainer: the upstream fix gives qmux Session reliability = "reliable-only" and an empty getStats() to complete the WebTransport interface under 7.1. Recommended, since it matches the W3C semantics for a WebSocket-carried session and stays compatible with 7.0.2.

(Written by Claude Opus 5.5)

main's moq pin contains moq-dev/moq#6625. A caret on 7.1.0-beta resolves
to the 7.1 nightlies, since dev sorts above beta.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kixelated
kixelated marked this pull request as ready for review October 28, 2026 05:59
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 54bfd0b0-96d4-49d3-ac40-9a49715c5031
Commits

Reviewing files that changed from the base of the PR and between b030066 and f8ff8ba.

Files ignored due to path filters: 1
  • bun.lock is excluded by !**/*.lock
Files selected for processing: 2
  • package.json
  • quest/m0/README.md
Files with no reviewable changes: 1
  • quest/m0/README.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

The TypeScript check command adds --runExternalCode. The development dependencies add @astrojs/ts-content-mapper and pin TypeScript to 7.1.0-beta. The TypeScript configuration sets the mapper to process .astro files. The README entry and related planning document were removed.

Priority: Normal

Merge Risk: Minimal · up to f8ff8

No actionable merge-blocking risk remains.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the primary change: type-checking .astro files with the TypeScript 7.1 content mapper.
Description check Passed The description is directly related to the changeset and explains the mapper setup, TypeScript version, verification, and scope.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
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.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 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-10-28T15:27:59.006834Z f8ff8ba New commits
🔒 Security Review ✅ Completed 2026-10-28T15:29:21.992678Z f8ff8ba New commits
ℹ️ 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.

kixelated and others added 2 commits October 28, 2026 08:26
Main finished dogfood-assets and this PR finishes astro-typecheck, leaving
m0 with no children.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@kixelated

Copy link
Copy Markdown
Collaborator Author

Merge summary:

Landing as a squash.

(Written by Claude Opus 5.5)

@kixelated
kixelated merged commit fc7fefc into main Oct 28, 2026
3 checks passed
@kixelated
kixelated deleted the quest/m0/astro-typecheck branch October 28, 2026 15:37
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.

1 participant