microsoft / microsoft/TypeScript
Move away from Classic module resolution as default for all module kinds
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
TypeScript's original module resolution strategy (the Classic resolution strategy) has some strange behavior that apparently doesn't actually reflect any other resolution strategy. It seems strange that those using non-CommonJS emit targets get this behavior by default.
Classic resolution also causes many disk probes during the walk up the project root - assuming that this strategy does eventually succeed in most cases, it seems like most uses could be subsumed by:
- Using relative paths.
- Modifying the
baseUrlandpathsproperties intsconfig.json.
After discussing with @vladima, we think it is worth considering switching the default resolution strategy for all module targets to Node.
Here's what needs to be done:
- Investigate existing
tsconfig.jsons that target esXXXX` and have no explicit/implied resolution strategy. - Determine the downstream effects to a change to defaults
- Determine if this change outweighs the potential breakage
- Implement if appropriate
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit der Untersuchung vorhandener tsconfig.json-Dateien, die auf esXXXX abzielen, ohne eine explizite oder implizite Auflösungsstrategie festzulegen. Vergleiche die nachgelagerten Auswirkungen und potenziellen Fehler, wenn der Standardwert von Classic auf Node geändert wird, und ermittle anschließend, ob eine Implementierung angemessen ist. Als erledigt gilt die Aufgabe, wenn eine begründete Entscheidung vorliegt und bei Genehmigung das Standardverhalten implementiert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- compilers
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100