René's URL Explorer Experiment


Title: Automatic Backward/Forward .d.ts compatibility system · Issue #31907 · microsoft/TypeScript · GitHub

Open Graph Title: Automatic Backward/Forward .d.ts compatibility system · Issue #31907 · microsoft/TypeScript

X Title: Automatic Backward/Forward .d.ts compatibility system · Issue #31907 · microsoft/TypeScript

Description: Problem: When you are forced to upgrade a library for a security concern or because it has become non functional due to some other concern and that upgrade now uses a different version of typescript to generate its .d.ts files that sit n...

Open Graph Description: Problem: When you are forced to upgrade a library for a security concern or because it has become non functional due to some other concern and that upgrade now uses a different version of typescrip...

X Description: Problem: When you are forced to upgrade a library for a security concern or because it has become non functional due to some other concern and that upgrade now uses a different version of typescrip...

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

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":"Automatic Backward/Forward .d.ts compatibility system","articleBody":"**Problem**: When you are forced to upgrade a library for a security concern or because it has become non functional due to some other concern and that upgrade now uses a different version of typescript to generate its .d.ts files that sit next to the .js files, your entire code base can become problematic. In some cases there is no possible solution outside of forking the offending libraries and manually modifying it to work within the current state of your system based on the current version of the tsc you are using.\r\n\r\nTypescript was supposed to be only helpful (i.e. never harmful) in improving the system over javascript. And outside of this problem, that has always been the case. This brings that into question as the Javascript can be fine but the .d.ts files can make it so there is no path forward with a specific compiler version as some dependendencies can have .d.ts files from older incompatible versions and other dependencies have .d.ts files from newer incompatible versions.\r\n\r\n**Suggested Solution**: Make it so that multiple .d.ts files are generated whenever there would be incompatibilities for older versions of the typescript compiler. In the header of the standard .d.ts file include compiler metadata about the version this was generated for and the other versions that were generated. The multiple .d.ts files per .js file would have one version of the .d.ts file per incompatibile syntax.\r\nWhen all future compilers read the .d.ts file they would look for this metadata and choose the most appropriate .d.ts file for their build.\r\n\r\nSuggested configuration options within the tsconfig.json file:\r\nSetting 1: Enable the ability in the tsconfig.json file to generate multiple .d.ts files.\r\nSetting 2: Specify the oldest tsc version that should be considered to minimize the number of .d.ts files\r\nSetting 3: Specify the tsc version that the default .d.ts file will be created for. Newer versions of the compiler would read and inspect the meta data in this file and then use the appropriate .d.ts file for its capability.\r\n\r\n\r\n**My Experience**\r\nThe following is the situation that spawned this issue for me:\r\n\r\nWe have a build tool that used an old version (3.X) of the npm inquiry module. We found that once we upgraded node to 10.14.2, that node stopped working properly (node programs hung in future calls to console.log()) after any CLI UI from this library was accessed. We had been on tsc version 2.5.3 to avoid issues with tsc incompatibility. The version 6.x of inquiry came with .d.ts files that were incompatible with our typescript version. Being a good excuse to get the benefits of the new type checking we updated to 3.4.5 (after having a problem with 3.5.X). This solved our issue perfectly (or so we thought). All of our many apps/libraries now built with less than 3 source code changes and 2 tsconfig.json file changes. That was until we decided to perform a production build. In this case the 1.X version of ngbootstrap would no longer build with the newer tsc 3.4.5. And updating ngbootstrap can't happen without updating angular as the angular .d.ts files changed a type to a generic. Increasing the angular version in our web apps would have a laundry list of steps and testing to take care of updating these to version 7. But our cordova apps, dependent on Ionic3 requires an actual recreation of a newer Ionic4 app and then manually moving your old code over to the new framework. All of this to fix an issue with a command line tool unrelated to these projects but that shares a library is a serious problem.\r\n\r\nAt this point it became clear that our best path for now is to downgrade from node 10.14.2 back to 10.11.0. But this brings up a serious question about the viability of tsc when using libraries from other developers that we don't have control over and do not want to take over every time this problem rears its ugly head. Writing code that has an unknown cost of maintaining in the future while just trying to apply maintenance updates due to versioning conflicts just did not happen very much prior to npm type code library package distribution from parties without an obligation to maintain their libraries.\r\n\r\nThe urgency we hit with the problem was exasperated by our having all of our projects automatically use the latest build of all of our modules. This technique has been a substantial benefit in writing code in the proper library to share between multiple applications. Had we moved each of our modules forward in the slower semantic versioning process as if each module was created by a 3rd party, we would have hit this same issue and it would have caused more work, but in a slower fashion.  In other words is would have a larger amount of work, but the timing of the fixes would occur over time.  We would have had to update a core library to use the newer version of typescript so that the library could be used with a newer application. Other applications not currently being developed would have continued to use the old version until they needed a fix. As soon as they also needed a change to a core library, the problems we hit all at once would have to be resolved also.\r\n\r\n**Conclusion**\r\nThere is no path forward for developers, like those who developed the inquiry module even if they wanted to to create a .d.ts file that could work with all versions of tsc. They have no way to maintain their old work. With the suggestions described here, they would not need to and everyone could use the latest typescript compiler as soon as it came out without worrying about problems caused to users of their modules or their use of other modules.","author":{"url":"https://github.com/cordiosd","@type":"Person","name":"cordiosd"},"datePublished":"2019-06-14T17:37:30Z","url":"https://github.com/microsoft/TypeScript/issues/31907"}

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:2a25d1fd-3d0e-0fe7-dbca-91730cbad867
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB90C:259D98:1648BE:1EC7E1:6B04656C
html-safe-nonce86130ca632ca713bba17d0a530961bd3f55fdb34b66181dd42bcd7c918f765fd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTBDOjI1OUQ5ODoxNjQ4QkU6MUVDN0UxOjZCMDQ2NTZDIiwidmlzaXRvcl9pZCI6IjI3OTAwNTcyMzc0MTMxMjc1MzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccbcb35728c0e03b85dc443c88ae489f6f094427914db6c429c910259d494afcf
hovercard-subject-tagissue:456360099
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/31907/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9274474c72151108090f47fb31959c6efdda431db0bddd03297ab2767ff3934e/microsoft/TypeScript/issues/31907
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9274474c72151108090f47fb31959c6efdda431db0bddd03297ab2767ff3934e/microsoft/TypeScript/issues/31907
og:image:altProblem: When you are forced to upgrade a library for a security concern or because it has become non functional due to some other concern and that upgrade now uses a different version of typescrip...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamecordiosd
hostnamegithub.com
expected-hostnamegithub.com
None83e4c0e58c5162177f3c161c5fbad38527ae04c11ac14980f9f9d85ae2027b1f
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
releaseca4d07a7cef4e4b75f821dc25e7300d80c1450a9
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/31907#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F31907
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%2F31907
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/31907
Reloadhttps://github.com/microsoft/TypeScript/issues/31907
Reloadhttps://github.com/microsoft/TypeScript/issues/31907
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests319 (319)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/31907
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/31907
Automatic Backward/Forward .d.ts compatibility systemhttps://github.com/microsoft/TypeScript/issues/31907#top
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
Too ComplexAn issue which adding support for may be too complex for the value it addshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Too%20Complex%22
https://github.com/cordiosd
cordiosdhttps://github.com/cordiosd
on Jun 14, 2019https://github.com/microsoft/TypeScript/issues/31907#issue-456360099
https://github.com/MartinJohns
Martin Johns (MartinJohns)https://github.com/MartinJohns
on Jun 14, 2019https://github.com/microsoft/TypeScript/issues/31907#issuecomment-502230695
#22605https://github.com/microsoft/TypeScript/issues/22605
cordiosdhttps://github.com/cordiosd
on Jun 15, 2019https://github.com/microsoft/TypeScript/issues/31907#event-2415542506
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
Too ComplexAn issue which adding support for may be too complex for the value it addshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Too%20Complex%22
on Jun 25, 2019https://github.com/microsoft/TypeScript/issues/31907#event-2436149176
https://github.com/RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh)https://github.com/RyanCavanaugh
on Jun 25, 2019https://github.com/microsoft/TypeScript/issues/31907#issuecomment-505267618
#22605https://github.com/microsoft/TypeScript/issues/22605
https://github.com/cordiosd
cordiosdhttps://github.com/cordiosd
on Jun 25, 2019https://github.com/microsoft/TypeScript/issues/31907#issuecomment-505521807
#22605https://github.com/microsoft/TypeScript/issues/22605
https://docs.microsoft.com/en-us/dotnet/framework/migration-guide/version-compatibilityhttps://docs.microsoft.com/en-us/dotnet/framework/migration-guide/version-compatibility
https://github.com/typescript-bot
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
on Jun 21, 2023https://github.com/microsoft/TypeScript/issues/31907#issuecomment-1599939369
TypeScript Bot (typescript-bot)https://github.com/typescript-bot
not plannedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Jun 21, 2023https://github.com/microsoft/TypeScript/issues/31907#event-9586769730
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/31907
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/31907
SuggestionAn idea for TypeScripthttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Suggestion%22
Too ComplexAn issue which adding support for may be too complex for the value it addshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Too%20Complex%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

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.