René's URL Explorer Experiment


Title: tsc panics when a content mapper reports an option diagnostic for a `contentMappers` entry inherited through `extends` · Issue #65651 · microsoft/TypeScript · GitHub

Open Graph Title: tsc panics when a content mapper reports an option diagnostic for a `contentMappers` entry inherited through `extends` · Issue #65651 · microsoft/TypeScript

X Title: tsc panics when a content mapper reports an option diagnostic for a `contentMappers` entry inherited through `extends` · Issue #65651 · microsoft/TypeScript

Description: TypeScript Version The tested TypeScript version is 7.1.0-beta. It also reproduces with tsc built from main at 88071f4. User Goal The user is writing a content mapper. While testing it with the contentMappers entry in a base config that ...

Open Graph Description: TypeScript Version The tested TypeScript version is 7.1.0-beta. It also reproduces with tsc built from main at 88071f4. User Goal The user is writing a content mapper. While testing it with the con...

X Description: TypeScript Version The tested TypeScript version is 7.1.0-beta. It also reproduces with tsc built from main at 88071f4. User Goal The user is writing a content mapper. While testing it with the con...

Opengraph URL: https://github.com/microsoft/TypeScript/issues/65651

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.112.4


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"tsc panics when a content mapper reports an option diagnostic for a `contentMappers` entry inherited through `extends`","articleBody":"## TypeScript Version\n\nThe tested TypeScript version is `7.1.0-beta`. It also reproduces with `tsc` built from `main` at 88071f4e84b1517c58429b4e10908275824c225c.\n\n## User Goal\n\nThe user is writing a content mapper. While testing it with the `contentMappers` entry in a base config that `tsconfig.json` extends, they saw `tsc` crash when the mapper reported an invalid option, and asked me to reduce the crash to a minimal reproduction and report it.\n\n## Setup and Action\n\nRun this script in an empty directory. The last line runs `tsc --runExternalCode` in `repro`.\n\n```sh\nmkdir -p repro/node_modules/fake-mapper && cd repro\n\ncat > tsconfig.base.json \u003c\u003c'EOF'\n{ \"contentMappers\": [{ \"package\": \"fake-mapper\", \"extensions\": [\".fake\"], \"options\": { \"a\": 1 } }] }\nEOF\n\ncat > tsconfig.json \u003c\u003c'EOF'\n{ \"extends\": \"./tsconfig.base.json\" }\nEOF\n\necho 'x' > data.fake\n\ncat > node_modules/fake-mapper/package.json \u003c\u003c'EOF'\n{ \"name\": \"fake-mapper\", \"version\": \"1.0.0\", \"typescript\": { \"contentMapper\": { \"exec\": [\"node\", \"server.mjs\"] } } }\nEOF\n\n# Answers every request; openProject reports one invalid option.\ncat > node_modules/fake-mapper/server.mjs \u003c\u003c'EOF'\nlet buffer = Buffer.alloc(0);\nprocess.stdin.on(\"data\", chunk => {\n  buffer = Buffer.concat([buffer, chunk]);\n  for (let end; (end = buffer.indexOf(\"\\r\\n\\r\\n\")) >= 0;) {\n    const length = Number(/Content-Length: (\\d+)/i.exec(buffer.subarray(0, end))[1]);\n    if (buffer.length \u003c end + 4 + length) return;\n    const message = JSON.parse(buffer.subarray(end + 4, end + 4 + length));\n    buffer = buffer.subarray(end + 4 + length);\n    if (message.id === undefined) continue;\n    const result = message.method === \"initialize\" ? { protocolVersion: message.params.protocolVersion, positionEncoding: \"utf-16\", diagnosticSource: \"fake\" }\n      : message.method === \"openProject\" ? { optionDiagnostics: [{ path: [\"a\"], messageText: \"Option 'a' must be a string.\", code: 1 }] }\n      : message.method === \"transform\" ? { extension: \".ts\", text: \"export {};\\n\", mappings: [] }\n      : {};\n    const body = JSON.stringify({ jsonrpc: \"2.0\", id: message.id, result });\n    process.stdout.write(`Content-Length: ${Buffer.byteLength(body)}\\r\\n\\r\\n${body}`);\n  }\n});\nEOF\n\nnpx -y -p typescript@7.1.0-beta tsc --runExternalCode\n```\n\n## Expected and Actual Behavior\n\n**What actually happened**: `tsc` panics:\n\n```\npanic: runtime error: invalid memory address or nil pointer dereference\n[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x102dbf164]\n\ngoroutine 1 [running]:\ngithub.com/microsoft/TypeScript/tsc/internal/ast.IsObjectLiteralExpression(...)\n\tgithub.com/microsoft/TypeScript/tsc/internal/ast/ast_generated.go:4808\ngithub.com/microsoft/TypeScript/tsc/internal/tsoptions.GetContentMapperOptionDiagnosticLocation(0x6c7a8eeb1520, 0x10301cc70?, {0x6c7a8ee7b9c0, 0x1, 0x6c7a9003ec90?})\n\tgithub.com/microsoft/TypeScript/tsc/internal/tsoptions/tsconfigparsing.go:1690 +0x174\ngithub.com/microsoft/TypeScript/tsc/internal/compiler.(*Program).collectContentMapperOptionDiagnostics.func1(...)\n\tgithub.com/microsoft/TypeScript/tsc/internal/compiler/program.go:864\ngithub.com/microsoft/TypeScript/tsc/internal/core.Map[...](...)\n\tgithub.com/microsoft/TypeScript/tsc/internal/core/core.go:86\ngithub.com/microsoft/TypeScript/tsc/internal/compiler.(*Program).collectContentMapperOptionDiagnostics(0x6c7a8ef92e08)\n\tgithub.com/microsoft/TypeScript/tsc/internal/compiler/program.go:863 +0x13c\ngithub.com/microsoft/TypeScript/tsc/internal/compiler.NewProgram({{0x6c7a8eeb1520, 0x0, 0x0, {0x0, 0x0}, {0x0, 0x0}, 0x0}, {{0x104072240, 0x6c7a8eee4730}, ...}, ...})\n\tgithub.com/microsoft/TypeScript/tsc/internal/compiler/program.go:326 +0x398\ngithub.com/microsoft/TypeScript/tsc/internal/execute.performCompilation({0x1040713c0?, 0x6c7a8ef5c880?}, {0x104072a00, 0x6c7a8ee80a20}, 0x6c7a8eeb1520, 0x6c7a8efb6440, 0x104074b10, {0x10406f280, 0x6c7a8eea1d40}, 0x6c7a8eee4500, ...)\n\tgithub.com/microsoft/TypeScript/tsc/internal/execute/tsc.go:382 +0x2b4\ngithub.com/microsoft/TypeScript/tsc/internal/execute.tscCompilation({0x1040713c0, 0x6c7a8ef5c880}, {0x104072a00, 0x6c7a8ee80a20}, 0x6c7a8eeb1380, {0x0, 0x0})\n\tgithub.com/microsoft/TypeScript/tsc/internal/execute/tsc.go:262 +0xaa4\ngithub.com/microsoft/TypeScript/tsc/internal/execute.CommandLine({0x1040713c0, 0x6c7a8ef5c880}, {0x104072a00, 0x6c7a8ee80a20}, {0x6c7a8eeae090, 0x1, 0x1}, {0x0, 0x0})\n\tgithub.com/microsoft/TypeScript/tsc/internal/execute/tsc.go:63 +0x1dc\nmain.runMain()\n\tgithub.com/microsoft/TypeScript/tsc/cmd/tsc/main.go:31 +0x1ac\nmain.main()\n\tgithub.com/microsoft/TypeScript/tsc/cmd/tsc/main.go:15 +0x1c\n```\n\n**What I expected**: The mapper's diagnostic, as `tsc` reports it when the same `contentMappers` entry is written in `tsconfig.json` itself (`cp tsconfig.base.json tsconfig.json`):\n\n```\ntsconfig.json(1,93): error fake1: Option 'a' must be a string.\n```\n\n## Agent Info\n\nClaude Code 2.1.331 + Claude Opus 5.5 + Skill Version 1.0\n","author":{"url":"https://github.com/benpsnyder","@type":"Person","name":"benpsnyder"},"datePublished":"2026-11-24T04:17:47Z","url":"https://github.com/microsoft/TypeScript/issues/65651"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:84d3be36-d786-7577-05f3-1d76e300a060
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDD64:0DF6:BFDC4E:F984CB:6B063F7C
html-safe-noncecabb0f3e3e6c2e2ed82b4d63df5716307fbd1e4f3a175b345c3db5d382a83898
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDY0OjBERjY6QkZEQzRFOkY5ODRDQjo2QjA2M0Y3QyIsInZpc2l0b3JfaWQiOiIxODU5MTA5OTcyMDYwMDI4Nzk2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacae4b6591e942442a094fd8011d54fc0221f407cb53a6f0de72ea8dface72d8a2
hovercard-subject-tagissue:6574507684
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/microsoft/TypeScript/65651/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d35ec23f479ad9a308169677304cdcf907ab43db59b94bb2a9062606a9ec4e31/microsoft/TypeScript/issues/65651
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d35ec23f479ad9a308169677304cdcf907ab43db59b94bb2a9062606a9ec4e31/microsoft/TypeScript/issues/65651
og:image:altTypeScript Version The tested TypeScript version is 7.1.0-beta. It also reproduces with tsc built from main at 88071f4. User Goal The user is writing a content mapper. While testing it with the con...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamebenpsnyder
hostnamegithub.com
expected-hostnamegithub.com
None1bff4f6bfaa96dc9c42cacf315424c24ebb548b06142ced5e3aaccb2a42dd652
turbo-cache-controlno-preview
go-importgithub.com/microsoft/TypeScript git https://github.com/microsoft/TypeScript.git
octolytics-dimension-user_id6154722
octolytics-dimension-user_loginmicrosoft
octolytics-dimension-repository_id20929025
octolytics-dimension-repository_nwomicrosoft/TypeScript
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id20929025
octolytics-dimension-repository_network_root_nwomicrosoft/TypeScript
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseac613d3698d3d8565651455086e1f74da07bf277
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/65651#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F65651
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F65651
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=microsoft%2FTypeScript
Reloadhttps://github.com/microsoft/TypeScript/issues/65651
Reloadhttps://github.com/microsoft/TypeScript/issues/65651
Reloadhttps://github.com/microsoft/TypeScript/issues/65651
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests313 (313)https://github.com/microsoft/TypeScript/pulls
Actionshttps://github.com/microsoft/TypeScript/actions
Projectshttps://github.com/microsoft/TypeScript/projects
Wikihttps://github.com/microsoft/TypeScript/wiki
Security and qualityhttps://github.com/microsoft/TypeScript/security
Insightshttps://github.com/microsoft/TypeScript/insights
https://github.com/microsoft/TypeScript
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/65651
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/65651
#65652https://github.com/microsoft/TypeScript/pull/65652
tsc panics when a content mapper reports an option diagnostic for a contentMappers entry inherited through extendshttps://github.com/microsoft/TypeScript/issues/65651#top
#65652https://github.com/microsoft/TypeScript/pull/65652
https://github.com/benpsnyder
Ben Snyder (benpsnyder)https://github.com/benpsnyder
on Nov 24, 2026https://github.com/microsoft/TypeScript/issues/65651#issue-6574507684
88071f4https://github.com/microsoft/TypeScript/commit/88071f4e84b1517c58429b4e10908275824c225c
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/65651
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/65651
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.