Skip to content

fix: TypeScript language server performance#10

Merged
jrolfs merged 2 commits into
mainfrom
jamie/fix/backport-pascal-ts7-commit
Jun 29, 2026
Merged

fix: TypeScript language server performance#10
jrolfs merged 2 commits into
mainfrom
jamie/fix/backport-pascal-ts7-commit

Conversation

@jrolfs

@jrolfs jrolfs commented Jun 29, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Address the terrible TypeScript language server performance in React DOM projects that depend on @meterup/pascal-✲ packages by Backporting the tsgo adoption change from upstream Pascal editor repository primarily for this change to the @react-three/fiber JSX interface module augmentation:

The blocker for TS 7 here was the react-three-fiber + three/webgpu JSX augmentation in viewer: mapping the whole three/webgpu namespace (ThreeToJSXElements<typeof THREE>) made the native checker fail with TS2320 (heritage conflict on PMREMGenerator: core-three's WebGLRenderer arg vs webgpu's abstract Renderer), TS2430, and TS2590 ("union too complex"). tsc 6 tolerated it. This narrows the augmentation to the one webgpu node material used as a JSX tag — <lineBasicNodeMaterial> — following R3F's "extract the classes you need" guidance. Types-only; runtime extend(THREE) is unchanged.

Additional

Add support for publishing Changesets snapshot releases to the scripts/publish-fork.ts script we use to publish packages from this fork in the @meterup scope without updating all the import specifiers with our fork package names.

Passing --snapshot to publish-fork.ts versions via changeset version --snapshot snapshot (+ bun install so pack resolves the ranges), publishes them to the snapshot dist-tag instead of latest, and skips git tags and GitHub Releases.

Run after bun changeset + bun run build (or bun snapshot). It dirties the working tree (version bumps + consumed changesets). Discard with git checkout .

Aymericr and others added 2 commits June 29, 2026 02:15
Make the editor packages compatible with, and benefit from, the native Go
compiler (TypeScript 7 / tsgo) while keeping the npm publish path on stable tsc.

- Add @typescript/native-preview (pinned 7.0.0-dev.20260624.1). tsgo coexists
  with typescript@6, which Next typegen and the IDE plugin still need until the
  TS 7.1 programmatic API ships.
- Fix two react-three-fiber JSX augmentations the native checker rejects but
  tsc tolerated:
  - viewer: map only LineBasicNodeMaterial (the one webgpu node material used as
    a JSX tag) instead of the whole three/webgpu namespace (TS2320/TS2590).
  - ~~plane-box-select-tool: drop the redundant `IntrinsicElements extends
    ThreeElements` block — it duplicated R3F's global augmentation and, by
    referencing @react-three/fiber's ThreeElements directly, hit a bun peer-dep
    variant-directory duplicate under tsgo (TS2320). r3f.d.ts already covers
    those JSX intrinsics. Types-only — no runtime change.~~ (this tool
    doesn't exist yet in @meterup/pascal-editor)
- check-types -> tsgo --noEmit (editor, @repo/ui, editor app, ifc-converter app)
- emit-package dev watch -> tsgo --build --watch
- build/publish stay tsc --build (prepublishOnly + release.yml unchanged;
  emitted .d.ts is byte-identical to tsc output)
- bump next 16.2.6 -> 16.2.9

tsc remains the source of truth and fallback. Published artifacts unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
--snapshot mints ephemeral 0.0.0-snapshot-<timestamp> versions via
`changeset version --snapshot snapshot` (+ bun install so pack resolves the
ranges), publishes them to the `snapshot` dist-tag instead of `latest`, and
skips git tags / GitHub Releases. Only packages with a pending changeset get a
snapshot version; the rest are skipped as already-published.

Run after `bun changeset` + `bun run build` (or `bun snapshot`). It dirties the
working tree (version bumps + consumed changesets) — discard with
`git checkout .` afterward; CI is ephemeral. The normal changesets/action PR
flow is unaffected (it calls ci:publish without --snapshot, which uses --tag latest).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 29, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a102c13

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@pascal-app/editor Patch
@pascal-app/viewer Patch
@pascal-app/nodes Patch
@pascal-app/core Patch
@pascal-app/mcp Patch
@pascal-app/ifc-converter Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@jrolfs jrolfs self-assigned this Jun 29, 2026
@jrolfs jrolfs requested a review from jacobmischka June 29, 2026 18:54
@jrolfs jrolfs merged commit 20632ec into main Jun 29, 2026
3 of 4 checks passed
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.

2 participants