Skip to content

Tooling refresh - #1367

Merged
Jake Bailey (jakebailey) merged 30 commits into
microsoft:mainfrom
jakebailey:tooling-refresh
Nov 11, 2026
Merged

Jake Bailey (jakebailey) merged 30 commits into
microsoft:mainfrom
jakebailey:tooling-refresh

Conversation

@jakebailey

@jakebailey Jake Bailey (jakebailey) commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

This aims to update and replace a bunch of dependencies with more modern or simpler alternatives that have fewer dependencies.

  • Jest -> node:test, with native assertions, mocks, timers, and snapshots.
  • ts-jest -> compiled JavaScript tests emitted by the existing TypeScript build.
  • Remove Jest dependencies, configuration, globals, and custom test environment.
  • Replace test-time module substitution with injected clients and registry lookups.
  • GraphQL Code Generator -> gql.tada with cached query types, without requiring an editor plugin.
  • GraphQL 16 -> 17.
  • Add GraphQL schema/query freshness and standalone query validation checks to CI.
  • @octokit/webhooks-types -> @octokit/openapi-webhooks-types.
  • charm -> Node's built-in readline APIs for terminal progress.
  • glob -> node:fs.globSync.
  • rimraf -> node:fs.rmSync.
  • Remove prettyjson and mergebot's legacy YAML output; retain JSON and Node output.
  • Remove longjohn and the publisher's legacy LONGJOHN mode.
  • Remove the unused suggestions-cache subsystem and its cachedir dependency.
  • Update pnpm and dependencies, including npm publishing tools, Octokit, Azure SDKs, TypeScript-ESLint, Knip, Prettier, and esbuild.
  • Deduplicate TypeScript-ESLint dependencies without raising their supported peer minimums.
  • Raise package Node requirements to ^22.22.2 || ^24.15.0 || >=26, and workspace requirements to ^24.15.0 || >=26.
  • Use Node 24 in the DT PR pipeline and target Node 22 for the mergebot bundle.
  • Remove obsolete publisher commands, debugger configuration, and mergebot's unused start hook.
  • Update testing documentation and exclude compiled dts-critic tests from its npm package.

Keep the tooling on supported dependency releases and retire
unsupported dependencies. Raise the Node.js minimums to match the
runtime requirements of the updated packages.
Exercise the real tag updates and package manifest reads so publisher
checks cover the operations that reach the registry, including recovery
from failed temporary-tag cleanup.
Keep not-needed package checks independent of module loading so tests
can supply registry responses without replacing pacote globally.
Unexpected registry errors must still reach callers.
Test result publication without replacing the Octokit constructor.
A narrow client keeps tests isolated from GitHub while leaving CLI
authentication and result formatting unchanged.
Keep action fixtures independent of Jest module replacement while
preserving lazy GitHub lookups. No-op and project-only paths must not
fetch labels or project metadata they do not need.
Run tests in the actual Node module environment so modern ESM behavior
matches the shipped tools rather than the Jest VM. Keep package filters
and native runner options available through pnpm.

Retain existing snapshot expectations except the Lodash isBuffer
namespace, whose inherited prototype tree was a cross-realm artifact.
Include result-posting tests in the build so their native mocks are
checked rather than relying on transpilation alone.
Native execution no longer needs Jest globals, transformation, or VM
configuration. Remove the unused toolchain so dependency analysis and
type checking reflect the runner we actually use.

Dependency analysis must still treat suites as live after implicit
Jest discovery disappears. Explicit test credentials also avoid a
runtime dependency on Jest worker variables.
Tests should exercise the same JavaScript output as the shipped tools,
without another compiler transform at runtime. Emitting test projects
during the existing build removes the need for a TypeScript loader.

Fixture and snapshot paths must remain tied to checked-in sources,
rather than build directories, so updates preserve the existing
baselines.
Native test execution removes the Jest module-loader constraint that
blocked GraphQL 17. The current Apollo and codegen versions support
the new major without module-loader workarounds.

GitHub schema metadata fails the stricter interface-deprecation
validation, but the bot does not validate schemas and its existing
codegen output remains unchanged.
Native suites no longer need empty registration imports, and dependency
analysis now recognizes the entries that older suppressions covered.
The old parser debugger target and mergebot start hook have no runnable
entry points.
Supported Node versions provide the filesystem operations used for
result discovery, fixture discovery, and bundle cleanup. Separate
packages are no longer needed for those paths.

Result posting also must not depend at runtime on a development-only
package. Preserve nested JSON collection, hidden-file exclusions, and
absolute snapshot paths while removing that dependency.
The optional LONGJOHN mode retains a separate diagnostic dependency
for legacy asynchronous stack traces. Remove the retired mode so
publisher startup relies on normal Node diagnostics instead.
No lint rule writes suggestions through the legacy helper, but every
runner invocation still reads the cache and prints its empty section.
Remove the dormant producer and consumer together so utilities no
longer initialize a user cache merely when imported.

Retire the exported cache path and record the utility API removal in
the release metadata rather than retaining an unused dependency.
The optional YAML view is the only consumer of prettyjson and its
obsolete color dependency. Keep the existing JSON and Node displays
without retaining that formatting stack.
GraphQL Code Generator brings a large dependency tree for a small set
of inline queries. A generated gql.tada Turbo cache provides typed
documents without requiring editor-plugin integration or repeated
type-level parsing of unchanged queries.

Keep schema generation and validation outside the editor so builds
and contributors do not depend on language-service plugins.
Root lint rejects separate type and value imports from the same module.
Keep the generator migration compatible with that repository rule.
The ESLint plugin's auto-installed peers kept an older compatible
TypeScript-ESLint stack alongside the workspace toolchain. Reuse the
already-installed versions without raising supported peer minimums.
Committed schema and query types must stay aligned with the source
queries and scalar configuration. Regenerate from a cold Turbo cache
so cached entries cannot conceal stale or edited generated types.

Run standalone query validation without requiring editor plugins.
Compiling the native tests places their output alongside the package's
runtime entry point. Keep those test artifacts out of the npm tarball.
The Jest instructions no longer work after the test migration. Explain
the required build step and supported filtering and debugging commands.
The validation and tsNext test implementations no longer exist. Remove
the broken script entry points and the obsolete validation instructions.
The generator compares schema paths using different separators on
Windows, adding an unused import that fails the freshness check. Use
an inline schema type import so cache output stays platform-independent.
Routine patch and minor updates keep the refresh current without taking
on unrelated major-version migrations. Registry-neutral resolutions keep
the regenerated dependency graph portable beyond the holdback feed.
The compiled-test migration already exercises webhook module loading,
and the assertion overload change does not alter runtime behavior. The
CLI formatting harness adds coverage for third-party argument parsing
after the formatter removal.
Removed scripts and the long-stack-trace mode should not remain in
local-development instructions. Keep the documented CLI and Functions
commands usable after the tooling cleanup.
These packages left the dependency graph with the retired tooling.
Keeping their build-script exceptions obscures the remaining install
policy.
Node.js provides the required matcher throughout the supported runtime
range. Avoid maintaining a direct dependency for declaration-file
classification when the platform already supplies the functionality.
The shared dependency changeset feeds every public package changelog.
Utility-specific implementation notes should appear only in the
utilities release, not in unrelated package release notes.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

The argument parser omits coverage include/exclude options from its string-option list, causing space-separated values to be misread as test-path filters and fail instead of being forwarded to Node.

1 open issue
What changed in this PR

Modernizes the DefinitelyTyped tooling monorepo by replacing legacy dependencies with native Node.js APIs and simplifying test and GraphQL tooling.

Changes:

  • Migrates Jest tests, mocks, and snapshots to compiled JavaScript running under node:test.
  • Replaces GraphQL Code Generator with gql.tada and adds query validation and freshness checks.
  • Updates dependencies and Node.js requirements, replaces utility libraries, and removes obsolete commands and subsystems.
File Description
tsconfig.test.json Removes Jest-specific TypeScript configuration.
tsconfig.json Adds runner tests to the workspace build.
test-setup.cjs Configures test environment and snapshot serialization.
run-tests.mjs Discovers compiled tests and forwards runner options.
README.md Documents compiled-test workflows.
packages/​utils/​test/​tsconfig.json Enables test emission without Jest types.
packages/​utils/​test/​progress.test.ts Adds progress rendering and throttling tests.
packages/​utils/​test/​io.test.ts Migrates assertions and expands stream tests.
packages/​utils/​test/​expect-error-range.test.ts Migrates to native assertions and test imports.
packages/​utils/​test/​assertions.test.ts Uses Node test imports and compiled module paths.
packages/​utils/​src/​progress.ts Replaces charm with readline APIs.
packages/​utils/​src/​miscellany.ts Uses native declaration-path glob matching.
packages/​utils/​src/​io.ts Adapts stream typing for tar-stream compatibility.
packages/​utils/​src/​fs.ts Removes the suggestions-cache directory export.
packages/​utils/​src/​assertions.ts Narrows message types before assertion calls.
packages/​utils/​package.json Refreshes dependencies, test command, and Node requirements.
packages/​typescript-versions/​test/​tsconfig.json Enables compiled tests without Jest types.
packages/​typescript-versions/​test/​index.test.ts Migrates version tests to Node assertions.
packages/​typescript-versions/​package.json Raises supported Node requirements.
packages/​typescript-packages/​test/​tsconfig.json Enables compiled tests without Jest types.
packages/​typescript-packages/​test/​index.test.ts Migrates tests and adjusts manifest lookup.
packages/​typescript-packages/​package.json Raises supported Node requirements.
packages/​retag/​src/​index.ts Updates yargs initialization and narrows client contracts.
packages/​retag/​package.json Updates dependencies, test command, and Node requirements.
packages/​publisher/​test/​utils.ts Adapts test registration to Node test contexts.
packages/​publisher/​test/​tsconfig.json Enables compiled publisher tests.
packages/​publisher/​test/​package-publisher.test.ts Uses injected clients and expands publishing coverage.
packages/​publisher/​test/​isAlreadyDeprecated.test.ts Migrates deprecation checks to Node assertions.
packages/​publisher/​test/​generate-packages.test.ts Migrates generation assertions and snapshots.
packages/​publisher/​test/​__snapshots__/​generate-packages.test.ts.snapshot Converts snapshots to Node serialization.
packages/​publisher/​src/​publish-registry.ts Updates yargs import and initialization.
packages/​publisher/​src/​publish-packages.ts Updates yargs import and initialization.
packages/​publisher/​src/​main.ts Updates main-command argument parsing.
packages/​publisher/​src/​lib/​package-publisher.ts Supports injected clients and package directories.
packages/​publisher/​src/​lib/​common.ts Removes legacy LONGJOHN support.
packages/​publisher/​src/​get-definitely-typed.ts Initializes yargs with explicit arguments.
packages/​publisher/​src/​generate-packages.ts Updates yargs import and initialization.
packages/​publisher/​src/​full.ts Updates full-command argument parsing.
packages/​publisher/​src/​calculate-versions.ts Updates yargs usage and formatting.
packages/​publisher/​README.md Removes obsolete validation and LONGJOHN documentation.
packages/​publisher/​package.json Refreshes dependencies and removes obsolete scripts.
packages/​mergebot/​tsconfig.json Uses Node-aware module compilation.
packages/​mergebot/​tsconfig.gql-tada.json Configures schema and query-type generation.
packages/​mergebot/​src/​util/​webhooks.ts Defines webhook payload types from OpenAPI operations.
packages/​mergebot/​src/​util/​verify.ts Loads webhook verification through dynamic import.
packages/​mergebot/​src/​util/​cachedQueries.ts Derives query variables through gql.tada.
packages/​mergebot/​src/​side-effects/​merge-codeowner-prs.ts Uses the new webhook payload type.
packages/​mergebot/​src/​run.ts Removes legacy YAML output.
packages/​mergebot/​src/​queries/​SHA1-to-PR-query.ts Migrates SHA lookup to typed gql.tada queries.
packages/​mergebot/​src/​queries/​schema/​index.ts Removes the generated helper re-export.
packages/​mergebot/​src/​queries/​schema/​gql.ts Removes the generated query lookup helper.
packages/​mergebot/​src/​queries/​projectboard-cards.ts Migrates project-card queries to gql.tada.
packages/​mergebot/​src/​queries/​pr-query.ts Migrates PR queries and derives result types.
packages/​mergebot/​src/​queries/​label-columns-queries.ts Migrates label and project-field queries.
packages/​mergebot/​src/​queries/​graphql.ts Initializes gql.tada with schema and scalar types.
packages/​mergebot/​src/​queries/​file-query.ts Migrates file queries with explicit type discrimination.
packages/​mergebot/​src/​queries/​discussion-queries.ts Migrates discussion queries to gql.tada.
packages/​mergebot/​src/​queries/​card-id-to-pr-query.ts Migrates card lookup and infers return types.
packages/​mergebot/​src/​queries/​all-open-prs-query.ts Migrates open-PR queries to gql.tada.
packages/​mergebot/​src/​pr-info.ts Uses query-derived PR types.
packages/​mergebot/​src/​graphql-client.ts Parses dynamic mutations with GraphQL directly.
packages/​mergebot/​src/​github-auth.ts Removes Jest-specific token handling.
packages/​mergebot/​src/​functions/​pr-trigger.ts Updates webhook types and guards missing item IDs.
packages/​mergebot/​src/​execute-pr-actions.ts Injects label and project-column lookups.
packages/​mergebot/​src/​_tests/​verify.test.ts Adds webhook signature verification tests.
packages/​mergebot/​src/​_tests/​testEnvironment.js Removes the custom Jest environment.
packages/​mergebot/​src/​_tests/​fixturedActions.test.ts Migrates fixture snapshots and tests injected queries.
packages/​mergebot/​src/​_tests/​discussions.test.ts Migrates parameterized tests to Node.
packages/​mergebot/​src/​_tests/​cachedQueries.d.ts Corrects the cached-query declaration export.
packages/​mergebot/​README.md Updates build, test, debugging, and startup instructions.
packages/​mergebot/​package.json Refreshes GraphQL tooling, dependencies, and bundle target.
packages/​mergebot/​codegen.ts Removes GraphQL Code Generator configuration.
packages/​header-parser/​test/​tsconfig.json Enables compiled tests without Jest types.
packages/​header-parser/​test/​index.test.ts Migrates parser tests to native assertions.
packages/​header-parser/​package.json Updates dependencies, test command, and Node requirements.
packages/​eslint-plugin/​test/​util.ts Resolves fixtures from the repository root.
packages/​eslint-plugin/​test/​util.test.ts Migrates utility tests to Node.
packages/​eslint-plugin/​test/​tsconfig.json Enables compiled plugin tests.
packages/​eslint-plugin/​test/​plugin.test.ts Uses native snapshot assertions.
packages/​eslint-plugin/​test/​eslint.test.ts Uses native globbing and file snapshots.
packages/​eslint-plugin/​test/​__snapshots__/​plugin.test.ts.snapshot Converts the plugin snapshot to Node format.
packages/​eslint-plugin/​src/​suggestions.ts Removes the unused suggestions-file subsystem.
packages/​eslint-plugin/​src/​rules/​expect.ts Reformats the expectation-matching condition.
packages/​eslint-plugin/​package.json Refreshes dependencies and removes test-only libraries.
packages/​dtslint/​test/​tsconfig.json Enables compiled dtslint tests.
packages/​dtslint/​test/​index.test.ts Migrates assertions, timeouts, and fixture paths.
packages/​dtslint/​src/​util.ts Updates the strip-json-comments import.
packages/​dtslint/​package.json Refreshes lint dependencies and Node requirements.
packages/​dtslint-runner/​test/​tsconfig.json Adds compiled-test configuration.
packages/​dtslint-runner/​src/​validate-results.ts Uses native globbing for result discovery.
packages/​dtslint-runner/​src/​post-results.ts Supports an injected comments client and current Octokit APIs.
packages/​dtslint-runner/​src/​main.ts Removes obsolete suggestions output.
packages/​dtslint-runner/​src/​index.ts Updates yargs parser initialization.
packages/​dtslint-runner/​package.json Updates dependencies and enables package-local tests.
packages/​dts-gen/​test/​tsconfig.json Enables compiled generator tests.
packages/​dts-gen/​test/​index.test.ts Migrates snapshots and adds CLI tests.
packages/​dts-gen/​src/​run.ts Updates yargs and preserves custom version handling.
packages/​dts-gen/​package.json Refreshes runtime and fixture dependencies.
packages/​dts-critic/​tsconfig.json Removes Jest types from compilation.
packages/​dts-critic/​README.md Documents compiled Node tests.
packages/​dts-critic/​package.json Updates yargs, test command, and Node requirements.
packages/​dts-critic/​index.ts Updates yargs import and initialization.
packages/​dts-critic/​index.test.ts Migrates source-validation tests to Node.
packages/​dts-critic/​.npmignore Excludes compiled tests from publication.
packages/​definitions-parser/​test/​utils.ts Adapts shared test registration to Node.
packages/​definitions-parser/​test/​tsconfig.json Enables compiled parser tests.
packages/​definitions-parser/​test/​packages.test.ts Migrates hooks and package assertions.
packages/​definitions-parser/​test/​git.test.ts Injects registry lookups and tests error propagation.
packages/​definitions-parser/​test/​get-definitely-typed.test.ts Migrates filesystem assertions to Node.
packages/​definitions-parser/​test/​get-affected-packages.test.ts Migrates affected-package assertions.
packages/​definitions-parser/​test/​definition-parser.test.ts Migrates assertions and fixture resolution.
packages/​definitions-parser/​src/​git.ts Supports injected manifest fetching.
packages/​definitions-parser/​package.json Refreshes dependencies and test execution.
packages/​definitions-parser/​.vscode/​launch.json Removes obsolete debugger configuration.
package.json Replaces Jest and refreshes workspace tooling.
jest.config.js Removes root Jest configuration.
.vscode/​launch.json Configures debugging for compiled Node tests.
.knip.jsonc Updates Knip configuration and test entry points.
.github/​workflows/​ci.yml Adds GraphQL freshness and validation checks.
.changeset/​quiet-suggestions-retire.md Records suggestions-subsystem removal.
.changeset/​quiet-results-globs.md Records native result-globbing migration.
.changeset/​fresh-tools-dependencies.md Records dependency and Node requirement updates.
.azure-pipelines/​typescript-pr-dt.yml Moves DT PR pipeline jobs to Node 24.

Review effort: Balanced

Comment thread run-tests.mjs Resolved
Coverage filtering needs glob values forwarded to Node, not consumed as
package or test-file selectors. Space-separated arguments should behave
the same as their equals-form equivalents.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔵 Needs a closer look

The cross-package runtime and dependency migration requires publisher dry-run and Azure Functions bundle/webhook validation on Node 22/24, because isolated dependency-free checks cannot establish compatibility for production publishing and automated merges.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

@jakebailey
Jake Bailey (jakebailey) marked this pull request as ready for review November 10, 2026 22:53
Compiled tests should not depend on the repository-root working
directory enforced by the wrapper. Package-local execution and editor
launches need the same fixtures, snapshots, metadata, and CLI entry
points as the standard root invocation.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

flash-slothmore-zootopia

@jakebailey
Jake Bailey (jakebailey) added this pull request to the merge queue Nov 11, 2026
Merged via the queue into microsoft:main with commit e0e90b5 Nov 11, 2026
10 checks passed
@jakebailey
Jake Bailey (jakebailey) deleted the tooling-refresh branch November 11, 2026 17:56
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.

3 participants