René's URL Explorer Experiment


Title: Design Meeting Notes, 5/19/2021 · Issue #44256 · microsoft/TypeScript · GitHub

Open Graph Title: Design Meeting Notes, 5/19/2021 · Issue #44256 · microsoft/TypeScript

X Title: Design Meeting Notes, 5/19/2021 · Issue #44256 · microsoft/TypeScript

Description: ES Modules in Node https://gist.github.com/weswigham/22a064ffa961d5921077132ae2f8da78 Resolution Settings Last meeting: exports, types, typesVersions types@VERSION_SPECIFIER moduleResolution flag node12 module target flag? node Uhhhh but...

Open Graph Description: ES Modules in Node https://gist.github.com/weswigham/22a064ffa961d5921077132ae2f8da78 Resolution Settings Last meeting: exports, types, typesVersions types@VERSION_SPECIFIER moduleResolution flag n...

X Description: ES Modules in Node https://gist.github.com/weswigham/22a064ffa961d5921077132ae2f8da78 Resolution Settings Last meeting: exports, types, typesVersions types@VERSION_SPECIFIER moduleResolution flag n...

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

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Design Meeting Notes, 5/19/2021","articleBody":"# ES Modules in Node\r\n\r\nhttps://gist.github.com/weswigham/22a064ffa961d5921077132ae2f8da78\r\n\r\n## Resolution Settings\r\n\r\n* Last meeting: `exports`, `types`, `typesVersions`\r\n    * `types@VERSION_SPECIFIER`\r\n* `moduleResolution` flag\r\n    * `node12`\r\n* `module` target flag?\r\n    * `node`\r\n        * Uhhhh but...~~that could change~~ already does exist and changed.\r\n        * Let's say it does change in the future - how do you opt into the old behavior?\r\n        * Is there potential for shifting behavior to \"bork\" an existing program?\r\n    * So `node12` as well?\r\n        * Should have these match.\r\n    * What about a rolling `node-esm` flag that accumulates more?\r\n        * `node-next`?\r\n        * `node14` could come out, etc. so `node-next` could be that rolling target.\r\n        * Is there an official name?\r\n            * No, it's just an update in the docs really.\r\n            * Could ask for a name?\r\n                * The name is there, it's Node 12 😄\r\n* Could `module` and `moduleResolution` be one flag?\r\n    * `module` toggles a specific `moduleResolution`\r\n    * Do we need a new `moduleResolution` flag?\r\n        * Yeah.\r\n* Is `node` backwards-compatible?\r\n    * Ehhh, they *layer* on the existing behavior.\r\n    * But if you continue following the existing resolution rules (e.g. `main` field in `package.json`), you'll get the wrong behavior.\r\n* Kind of weird that `package.json`s have more and more of our configuration.\r\n* Sounds like `node12` for both\r\n    * Eventually `node-next` or `node-esm` or something along those lines.\r\n* So `\"module\": \"node12\"` implies `\"moduleResolution\": \"node12\"`.\r\n\r\n## Emit\r\n\r\n* Implementation strategy: don't want to ship in stable with a partial implementation - lots of moving parts.\r\n* What other things do we have to support?\r\n    * `.cjs`\r\n    * `.mjs`\r\n    * Unfortunate reality in Node.\r\n    * Potentially not used all that often, but users keep asking about them even though there's `\"type\": \"module\"`.\r\n        * Under that, we have a path forward for `.ts` -> `.js` which is still good.\r\n    * But still need `.mjs` output. So `.mts`?\r\n        * What about `.mtsx`?\r\n            * What if you just have `.mts`?\r\n                * `.mts` just supports JSX, doesn't support `\u003cAngleBracketCastSyntaxOn>values`\r\n                * Also type parameter lists with no  constraint or trailing comma.\r\n\r\n                  ```ts\r\n                  const f = \u003cT>(t: T) => {};\r\n\r\n                  // no good, have to rewrite as\r\n\r\n                  const f = \u003cT extends unknown>() => {}\r\n                  const f = \u003cT,>() => {}\r\n                  ```\r\n                * What about `.tsx` for modules?\r\n                    * Well, doesn't generate an `.mjs`.\r\n                * API isn't set up to disambiguate.\r\n            * Feels bad to say \"JSX is allowed in this file.\"\r\n            * `.mtx`? 🤯\r\n            * Supporting multiple extensions: we can do that, but we have special support `include` and `exclude` globs being specialized for TypeScript. Already got burned by this with `JSON` files.\r\n            * How realistic would it be for us to say \"no `.mts` and `.cts`\"?\r\n                * Probably for a bit, but we would inevitably get demand.\r\n                * Still could start with something prescriptive. Maybe don't do it until we get an absolute need, along with a better sense of how people will organize their projects.\r\n                * Our own experience: sometimes when you're in ESM fully, with `\"type\": \"module\"`, you'll end up with times that you want to break out.\r\n                    * If you want to use native ESM with Electron, you need to break out and jump into CJS land to get `require`\r\n                    * Maybe `.cts` is more important than `.mts`.\r\n                    * Is there a way to say \"this is CJS in a `package.json`?\"\r\n                        * Nope.\r\n                        * You can put it in a sub-folder with a `package.json` that says `\"type\": \"whatever-is-not-module\"`.\r\n* File extension madness! Can't imagine the cost of `.cts`, `.cd.ts`, etc.\r\n    * We already use `readDirectory`, luckily it's not too bad anymore.\r\n* Luckily, a lot of resolution \"just works\" today but we need module disambiguation with modules.\r\n* We can start working on this, but we will not ship until we feel feature-complete. ✅\r\n\r\n# Performance\r\n\r\n* Our team has been working hard off thinking about how to help speed up TypeScript, and to help big projects scale.\r\n* Lots of anecdotes\r\n* One internal team switched from 1100 projects to way fewer. Hour-long compilation goes from 10 minutes.\r\n* Massive React projects that use project references.\r\n    * Much of the time, projects incorrectly set up. Our bad, we had poor docs.\r\n    * Often look for hot spots in check time - didn't see it.\r\n        * React's `ComponentProps` - maybe takes 500ms to check?\r\n            * If you have 100 projects that have to re-check this thing over and over, that's like 50 seconds on that one declaration alone.\r\n        * Declaration emit\r\n            * Checking + transforms\r\n            * Also, `--incremental`/`--watch` needs to compute shape. Declaration emit happens twice. #43995.\r\n                * #44043, #44042\r\n                * We now do some caching, cache and clone the nodes of declaration (#43973)\r\n            * Found that a lot of anonymous generated types are massive. A lot of duplicated text. #44044.\r\n                * Feels weird to add `imports` that weren't there.\r\n                * `import type`, bam, make everyone feel better.\r\n            * Feels like we conflate a lot in declaration files.\r\n* One codebase used this huge set of path mappings - 1800 of them.\r\n    * We were re-checking the mappings over and over and over again. Now we cache the patterns.\r\n    * #44078\r\n* Normalizing slashes - one massive codebase does it 3 million times, 2 seconds total on its own, generates a ton of garbage\r\n    * But MOST paths always have correct slashes, and on Unix they're ALWAYS the same.\r\n    * Basically, just see if you can skip that work ahead of time.\r\n* Normalizing paths - removing relative intermediate components of paths. \r\n    * #44173\r\n    * Our regex was wrong.\r\n    * Seeing if we need to even process these paths before splitting etc. gives a 5% boost in project load across codebases.\r\n* Been using pprof\r\n    * Basically the same info as the regular profiler, but its internal format actually allows you to handle longer profiling runs.\r\n    * Also some visualizer properties.\r\n    * Seems to have bugs on recursive functions though!","author":{"url":"https://github.com/DanielRosenwasser","@type":"Person","name":"DanielRosenwasser"},"datePublished":"2021-05-25T23:21:05Z","url":"https://github.com/microsoft/TypeScript/issues/44256"}

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:ce82d348-9537-03d4-debb-78641281959f
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id9DF2:7A60E:339EEB0:423D94A:6B01D899
html-safe-nonce5f696bb16a383ca0806f984a1edb2ae4eb721cc46a4cda0c0fc8428c302a3a34
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5REYyOjdBNjBFOjMzOUVFQjA6NDIzRDk0QTo2QjAxRDg5OSIsInZpc2l0b3JfaWQiOiI4OTQ4MjE2MTg2MTcwMTQ0MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac58351f0838620f69a1623fb11061d2b34ad592d04ae0a5d9efa7434a298f7a5d
hovercard-subject-tagissue:901499285
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/44256/issue_layout
twitter:imagehttps://opengraph.githubassets.com/403d580a59296432905ce47ae3bdd7bb2ca5f99cfde8972dc740459d1b7b1754/microsoft/TypeScript/issues/44256
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/403d580a59296432905ce47ae3bdd7bb2ca5f99cfde8972dc740459d1b7b1754/microsoft/TypeScript/issues/44256
og:image:altES Modules in Node https://gist.github.com/weswigham/22a064ffa961d5921077132ae2f8da78 Resolution Settings Last meeting: exports, types, typesVersions types@VERSION_SPECIFIER moduleResolution flag n...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameDanielRosenwasser
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
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
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/microsoft/TypeScript/issues/44256#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FTypeScript%2Fissues%2F44256
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%2F44256
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/44256
Reloadhttps://github.com/microsoft/TypeScript/issues/44256
Reloadhttps://github.com/microsoft/TypeScript/issues/44256
microsofthttps://github.com/microsoft
TypeScripthttps://github.com/microsoft/TypeScript
Codehttps://github.com/microsoft/TypeScript
Issues5k (5k)https://github.com/microsoft/TypeScript/issues
Pull requests312 (312)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/44256
New issuehttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/44256
Design Meeting Notes, 5/19/2021https://github.com/microsoft/TypeScript/issues/44256#top
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%22
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on May 25, 2021https://github.com/microsoft/TypeScript/issues/44256#issue-901499285
https://gist.github.com/weswigham/22a064ffa961d5921077132ae2f8da78https://gist.github.com/weswigham/22a064ffa961d5921077132ae2f8da78
Initial build mode build emits twice #43995https://github.com/microsoft/TypeScript/issues/43995
Idea: Can we cache the result of typeToTypeNode? #44043https://github.com/microsoft/TypeScript/issues/44043
Fix logic for determining whether to simplify keyof on mapped types #44042https://github.com/microsoft/TypeScript/pull/44042
Cache accessibe symbol chains and serialized type parameter name generation #43973https://github.com/microsoft/TypeScript/pull/43973
Idea: Can declaration emit synthesize imports? #44044https://github.com/microsoft/TypeScript/issues/44044
Cache parsed path mapping patterns #44078https://github.com/microsoft/TypeScript/pull/44078
Kick out of normalizePath if there's nothing to do #44173https://github.com/microsoft/TypeScript/pull/44173
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%22
on May 25, 2021https://github.com/microsoft/TypeScript/issues/44256#event-4795758710
https://github.com/Kingwl
Wenlu Wang (Kingwl)https://github.com/Kingwl
on May 26, 2021https://github.com/microsoft/TypeScript/issues/44256#issuecomment-848438046
https://github.com/DanielRosenwasser
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
on May 26, 2021https://github.com/microsoft/TypeScript/issues/44256#issuecomment-848440489
Daniel Rosenwasser (DanielRosenwasser)https://github.com/DanielRosenwasser
completedhttps://github.com/microsoft/TypeScript/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on May 4, 2022https://github.com/microsoft/TypeScript/issues/44256#event-6545156447
Sign up for freehttps://github.com/signup?return_to=https://github.com/microsoft/TypeScript/issues/44256
Sign in to commenthttps://github.com/login?return_to=https://github.com/microsoft/TypeScript/issues/44256
Design NotesNotes from our design meetingshttps://github.com/microsoft/TypeScript/issues?q=state%3Aopen%20label%3A%22Design%20Notes%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.