Skip to content

Cut over from tsc to tsgo#4274

Merged
trevor-scheer merged 4 commits into
graphql:mainfrom
trevor-scheer:trevor/tsgo-cutover
May 15, 2026
Merged

Cut over from tsc to tsgo#4274
trevor-scheer merged 4 commits into
graphql:mainfrom
trevor-scheer:trevor/tsgo-cutover

Conversation

@trevor-scheer

Copy link
Copy Markdown
Contributor

Summary

  • Promotes the TypeScript Native Preview (tsgo) from a parallel CI sentinel to source of truth for all monorepo type-checking and emit.
  • Drops the Types Check (tsgo) sentinel CI job and the check:tsgo script in favor of the now-unified types:check.
  • Picks up three small fixes that tsgo's stricter checks surfaced: bump codemirror-graphql target off es5, add explicit describe/it imports to the one missed *.test-d.ts file, and add vite-env.d.ts to the four UI packages that were silently relying on tsc's laxness for CSS side-effect imports.
  • typescript stays in the dependency tree because graphql-language-service-server and vscode-graphql use it as a runtime dependency.

Validation Steps

  • yarn types:check runs tsgo per-package via turbo and over the root scripts/ tsconfig; all 24 turbo tasks pass.
  • yarn build runs tsgo --build for the composite emit; consumers (Vite, Next, Webpack, Vitest) consume the resulting dist/esm outputs without changes.

The default tsconfig base targets es6. codemirror-graphql was the only
package overriding it to es5, which mostly affected ancient browsers
(IE11) that CodeMirror 5 itself does not support. The emitted JavaScript
will use es6 syntax (const, arrow functions, native destructuring)
instead of down-leveled es5.

In practice, codemirror-graphql is consumed via a bundler in every
real-world setup; the bundler down-levels our emit to whatever target
the consumer needs. So this changes the intermediate emit but not what
consumers ship to end users.
Vitest globals were removed in graphql#4217, but `types.test-d.ts` was missed
because its globals usage was only flagged once a stricter type
checker actually ran over it. Add the explicit imports so the file
matches the rest of the test files.
graphiql-react and graphiql-plugin-explorer already reference
vite/client types via src/vite-env.d.ts so that side-effect imports of
CSS modules (e.g. `import './index.css'`) are typed. The other four
packages doing the same kind of CSS import (graphiql-plugin-code-exporter,
graphiql-plugin-doc-explorer, graphiql-plugin-history, graphiql) were
missing this and quietly relied on tsc's older laxness.
tsgo has been running in parallel as a non-blocking CI sentinel for a
while. Promote it to source of truth across the monorepo:

- Per-package `types:check` now runs `tsgo --noEmit`.
- Root build scripts (`build:tsc`, `build-clean`, `build:clean`,
  `build:watch`) call `tsgo` instead of `tsc`.
- Root `types:check` checks `scripts/` via `tsgo --noEmit` too.
- Drop the local `check` and `check:tsgo` scripts. `types:check` is the
  cache-aware path everyone should use.
- Remove the `Types Check (tsgo)` sentinel CI job. The primary `Types
  Check` job runs `tsgo` now.

`typescript` stays in the dependency tree because
`graphql-language-service-server` and `vscode-graphql` use it as a
runtime dependency.
@changeset-bot

changeset-bot Bot commented May 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 136dc95

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

This PR includes changesets to release 1 package
Name Type
codemirror-graphql 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

@trevor-scheer trevor-scheer marked this pull request as ready for review May 15, 2026 04:35
@trevor-scheer trevor-scheer merged commit d23f3b1 into graphql:main May 15, 2026
12 checks passed
@trevor-scheer trevor-scheer deleted the trevor/tsgo-cutover branch May 15, 2026 04:36
trevor-scheer pushed a commit that referenced this pull request May 15, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## monaco-graphql@1.8.0

### Minor Changes

- [#4264](#4264)
[`227f5ba`](227f5ba)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Add
`./monaco-editor` to the `exports` map.

`monaco-graphql/monaco-editor` re-exports `monaco-editor` with only the
graphql and json languages, skipping the css, html, and typescript
contributions that the default `monaco-editor` entry point bundles.
Consumers can use it to share a single `monaco-editor` instance with
`monaco-graphql` (for `editor`, `Uri`, `KeyMod`, `KeyCode`, `languages`,
etc.) without paying for those extras. Until now you had to reach for
the unstable `monaco-graphql/esm/monaco-editor` path, which only
resolves under legacy `node10`-style module resolution.

The legacy `monaco-graphql/esm/monaco-editor` path still works via the
existing `./*` wildcard, so this change is purely additive.

The `monaco-graphql/esm/*` import pattern is now considered deprecated.
It will continue to work throughout the `1.x` line, but the wildcard
`exports` entry that enables it is planned for removal in the next major
version. New code should prefer the canonical paths:
`monaco-graphql/monaco-editor`, `monaco-graphql/initializeMode`,
`monaco-graphql/graphql.worker`, and `monaco-graphql/lite`.

## codemirror-graphql@2.2.6

### Patch Changes

- [#4274](#4274)
[`d23f3b1`](d23f3b1)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Bump
TypeScript emit target from `es5` to `es6`.

The published JavaScript now uses ES6 syntax (`const`, arrow functions,
native destructuring) instead of down-leveled ES5. In practice this is
consumed via a bundler in every real-world setup (and paired with
CodeMirror 5, which already requires an ES6 runtime), so this changes
the intermediate emit but not what consumers end up shipping. Code that
loads the published `.js` directly in a strictly ES5-only environment
(e.g. IE11 without transpilation) is no longer supported. CodeMirror 5
itself does not support that configuration.

## @graphiql/react@0.37.5

### Patch Changes

- [#4232](#4232)
[`3934e4a`](3934e4a)
Thanks [@simmerer](https://github.com/simmerer)! - Bugfix for multiline
selection highlight styling: disabling Monaco's `roundedSelection`
option prevents selection highlight from appearing to extend beyond
actual text selection. See issue
[#4094](#4094).

- Updated dependencies
\[[`227f5ba`](227f5ba)]:
    -   monaco-graphql@1.8.0

## vscode-graphql@0.13.5

### Patch Changes

- [#4267](#4267)
[`e4f5148`](e4f5148)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Burning
patch version due to previous release failure.

## vscode-graphql-execution@0.3.5

### Patch Changes

- [#4267](#4267)
[`e4f5148`](e4f5148)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Burning
patch version due to previous release failure.

## vscode-graphql-syntax@1.3.11

### Patch Changes

- [#4267](#4267)
[`e4f5148`](e4f5148)
Thanks [@trevor-scheer](https://github.com/trevor-scheer)! - Burning
patch version due to previous release failure.

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
trevor-scheer added a commit that referenced this pull request May 19, 2026
Field was set as `typings: esm/index.d.ts`, pointing at the ESM build
output. The ESM build is emitted by a separate tsgo invocation that
doesn't coordinate with the CJS project reference graph that workspace
dependents (e.g. `graphql-language-service-cli`) walk. `tsc` tolerated
the misalignment by silently falling back to `dist/index.d.ts` next to
`main`; `tsgo` (cut over in #4274) resolves project references more
strictly and surfaces the gap as "Could not find a declaration file"
during cold builds, breaking CI when a release branch's `ci:version`
invokes a from-scratch `yarn build`.

Switch to the modern `types` field name pointing at `dist/index.d.ts`,
matching the sibling `graphql-language-service` package.
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