René's URL Explorer Experiment


Title: Transpile TypeScript code inside `node_modules`. · Issue #58429 · nodejs/node · GitHub

Open Graph Title: Transpile TypeScript code inside `node_modules`. · Issue #58429 · nodejs/node

X Title: Transpile TypeScript code inside `node_modules`. · Issue #58429 · nodejs/node

Description: What is the problem this feature will solve? I do not propose allowing transforms for all packages in node_modules. That would encourage publishing TypeScript directly to npm, which comes with significant downsides for the ecosystem. Wit...

Open Graph Description: What is the problem this feature will solve? I do not propose allowing transforms for all packages in node_modules. That would encourage publishing TypeScript directly to npm, which comes with sign...

X Description: What is the problem this feature will solve? I do not propose allowing transforms for all packages in node_modules. That would encourage publishing TypeScript directly to npm, which comes with sign...

Opengraph URL: https://github.com/nodejs/node/issues/58429

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Transpile TypeScript code inside `node_modules`.","articleBody":"### What is the problem this feature will solve?\n\n---\n\nI **do not** propose allowing transforms for all packages in `node_modules`. That would encourage publishing TypeScript directly to npm, which comes with significant downsides for the ecosystem.\n\n---\n\nWith the introduction of `--experimental-strip-types` and `--experimental-transform-types`, it is now feasible to run TypeScript code directly without a separate build step.\n\nHowever, in monorepo environments, this feature is limited by how Node.js currently handles `node_modules` resolution. In a typical monorepo setup, you might have a structure like:\n\n```mermaid\ngraph TD\n  libA --\u003e server\n  libB --\u003e server\n  libC --\u003e server\n  libD --\u003e libB\n```\n\nTools like `pnpm` (and similarly `yarn` and `npm` workspaces) install local packages via symlinks into the `node_modules` folder. For example, if `server` depends on `libA`, `pnpm` will symlink (or copy, depending on configuration) `libA` into `server/node_modules/libA`.\n\nThe issue is that Node.js currently **does not apply** `--experimental-strip-types` or `--experimental-transform-types` to anything inside a `node_modules` folder, even if it’s a symlink to a local workspace package.\n\nThis forces developers to pre-transpile any local dependencies, which essentially defeats the purpose of the feature in monorepos, where the `server` package often represents only a small percentage of the codebase compared to its locally installed dependencies.\n\nThis might introduce some complexity to the current implementation, since each package could have its own `tsconfig.json` with potentially different options. That said, I’m not deeply familiar with the internals of `--experimental-strip-types` and `--experimental-transform-types`, so this is just an assumption.\n\nBun and Deno come to mind as the major runtimes that support TypeScript out of the box. A study might be needed to determine how to handle `tsconfig` resolution when transpiling packages inside `node_modules`. Should it respect each subpackage's own `tsconfig`? Or should it transpile everything according to the `server`’s `tsconfig`? I’m also unsure what the best or most correct approach would be here.\n\n\u003cbr /\u003e\n\n### What is the feature you are proposing to solve the problem?\n\nI'm still unsure what the best decision would be here, as there are multiple ways to distinguish which folders inside `node_modules` come from local/owned packages and which do not. What about private registries? There's still a lot to decide.\n\n\u003cbr /\u003e\n\n### What alternatives have you considered?\n\nSome options have come to mind:\n\n1. Transpile all packages in `node_modules` that have `\"private\": true`. This ensures those packages did not come from a public registry.\n2. Add a flag like `--transpile-packages=@mycompany/*` to explicitly opt into transforming specific scoped packages.\n3. Automatically transpile all symlinked packages.\n4. Require each package that needs to be transpiled to include a field like `\"source\": \"./src/index.ts\"` or a custom flag such as `\"needsTranspilation\": true`.\n\nA flag like the latter would be especially useful, as it would enable users to publish TypeScript packages to private or internal registries while still opting into transformation behavior.\n\nSince this restriction was intentionally designed to prevent publishing uncompiled TypeScript to npm, perhaps a more consistent approach would be to **only** block transpilation for packages that clearly come from the public registry. Again, there's a lot to discuss here...\n","author":{"url":"https://github.com/arthurfiorette","@type":"Person","name":"arthurfiorette"},"datePublished":"2025-05-23T01:11:41.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":67},"url":"https://github.com/58429/node/issues/58429"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:73251a13-7494-5fc5-6170-1fce0309a5b6
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idCC5C:232EF3:11ACB87:18352D7:6A4D6ACB
html-safe-nonce566ff6ccb0c6b542ce547e7f98c9f8a486936a5375a44383315931d020664071
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzVDOjIzMkVGMzoxMUFDQjg3OjE4MzUyRDc6NkE0RDZBQ0IiLCJ2aXNpdG9yX2lkIjoiOTEwMzQ4NTQzNTM4ODk3OTkxNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaceade17c686b5837736ee6268a470a322f9c7c6707d66b6e952fabae787791ba5
hovercard-subject-tagissue:3084881636
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/nodejs/node/58429/issue_layout
twitter:imagehttps://opengraph.githubassets.com/587a180249aae98885416f20f0e48092e740aa38f7879337f97ebaec16c31dc4/nodejs/node/issues/58429
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/587a180249aae98885416f20f0e48092e740aa38f7879337f97ebaec16c31dc4/nodejs/node/issues/58429
og:image:altWhat is the problem this feature will solve? I do not propose allowing transforms for all packages in node_modules. That would encourage publishing TypeScript directly to npm, which comes with sign...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamearthurfiorette
hostnamegithub.com
expected-hostnamegithub.com
None7db3950e3f59095e20a9789440c3dd554efc62d434882ead06ae05b5815605b9
turbo-cache-controlno-preview
go-importgithub.com/nodejs/node git https://github.com/nodejs/node.git
octolytics-dimension-user_id9950313
octolytics-dimension-user_loginnodejs
octolytics-dimension-repository_id27193779
octolytics-dimension-repository_nwonodejs/node
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id27193779
octolytics-dimension-repository_network_root_nwonodejs/node
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
releasecd8f6a71db61d6012a0cbb134be844fdbe9b8a45
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/nodejs/node/issues/58429#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F58429
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fnodejs%2Fnode%2Fissues%2F58429
Sign up https://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=nodejs%2Fnode
Reloadhttps://github.com/nodejs/node/issues/58429
Reloadhttps://github.com/nodejs/node/issues/58429
Reloadhttps://github.com/nodejs/node/issues/58429
Please reload this pagehttps://github.com/nodejs/node/issues/58429
nodejs https://github.com/nodejs
nodehttps://github.com/nodejs/node
Please reload this pagehttps://github.com/nodejs/node/issues/58429
Notifications https://github.com/login?return_to=%2Fnodejs%2Fnode
Fork 36k https://github.com/login?return_to=%2Fnodejs%2Fnode
Star 118k https://github.com/login?return_to=%2Fnodejs%2Fnode
Code https://github.com/nodejs/node
Issues 1.4k https://github.com/nodejs/node/issues
Pull requests 962 https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality 0 https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Code https://github.com/nodejs/node
Issues https://github.com/nodejs/node/issues
Pull requests https://github.com/nodejs/node/pulls
Actions https://github.com/nodejs/node/actions
Projects https://github.com/nodejs/node/projects
Security and quality https://github.com/nodejs/node/security
Insights https://github.com/nodejs/node/pulse
Transpile TypeScript code inside node_modules.https://github.com/nodejs/node/issues/58429#top
discussIssues opened for discussions and feedbacks.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22discuss%22
strip-typesIssues or PRs related to strip-types supporthttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22strip-types%22
https://github.com/arthurfiorette
arthurfiorettehttps://github.com/arthurfiorette
on May 23, 2025https://github.com/nodejs/node/issues/58429#issue-3084881636
discussIssues opened for discussions and feedbacks.https://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22discuss%22
strip-typesIssues or PRs related to strip-types supporthttps://github.com/nodejs/node/issues?q=state%3Aopen%20label%3A%22strip-types%22
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

Viewport: width=device-width


URLs of crawlers that visited me.