fix(changelog-emitter): declare node types explicitly - #1072
Open
SnowboardTechie wants to merge 3 commits into
Open
fix(changelog-emitter): declare node types explicitly#1072SnowboardTechie wants to merge 3 commits into
SnowboardTechie wants to merge 3 commits into
Conversation
The package relied on automatic @types discovery to pick up @types/node, which it already declares as a devDependency. Under @typespec/compiler 1.14 that discovery stops finding it, and tsc fails on the node: imports and import.meta.url with errors that misleadingly point at @types/node.
karinamzalez
approved these changes
Aug 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
check-catalogjob, which currently fails on every PR it runs against@typespec/compiler1.14 combination; either one alone builds fineChanges proposed
Adds
"types": ["node"]tolib/changelog-emitter/tsconfig.json.Context for reviewers
check-catalogbumps the catalog to the latest in-range versions and rebuilds, a dry run of the next catalog update. That dry run has included@typespec/compiler1.14.0 since it published on 2026-07-14 and was still passing with it as late as this morning. What broke it is the TypeScript 6 bump (#932) landing onmain: under TS 6, building with compiler 1.14 fails inlib/changelog-emitter:PR CI builds the merge ref against
main, so every open PR inherited the failure at once, with no push of its own.The errors point at
@types/node, which is a red herring. The package already declares@types/nodeas a devDependency, but its tsconfig has notypesfield, so it relied on automatic@typesdiscovery to find it. Under TS 6 that discovery stops resolving node once compiler 1.14 is in the tree, and every node-typed reference in the package fails at once. Declaring the types explicitly is what the compiler error itself suggests, and it removes the reliance on automatic discovery.Combination grid without this change, bumping catalog entries against
mainwith the pinned pnpm 11.20.0:@typespec/compiler^6.0.3(current)^1.13.0(current)^6.0.3^1.14.0^5.9.3^1.14.0With this change, on this branch:
@typespec/compiler ^1.13.0):pnpm run ciexits 0, suites 40 passed / 6 skipped, 119, 548, 106, cspell 0 issues.@typespec/compilerbumped to^1.14.0: install exits 0, 0 TypeScript errors, emitter build exits 0.No changeset.
typespec-versioning-changelogis not published to npm, so there is nothing to release.Additional information
Run history on this branch pins the onset: the 16:37 UTC
check-catalogrun today passed and the 17:32 run failed, straddling the #932 merge at 17:18, with identical@typespec/compiler ^1.13.0 -> ^1.14.0bumps in both logs.