Commit Graph
292 Commits
Author SHA1 Message Date
Jake Bailey 23156cb970 Error on unused eslint directives, reenable lost eslint rules (#57350) 2024-02-27 10:49:41 -08:00
Andrew Branch 61200368bb Use loader with extension substitution for package.json main, types, typesVersions (#57261) 2024-02-02 13:20:32 -08:00
Abraham Guo 3c9aea3ed1 enable @typescript-eslint/no-unused-vars (#57123) 2024-01-29 11:31:51 -08:00
Jake BaileyandRyan Cavanaugh 1982349339 Update dependencies to latest compatible versions (#56561)
Co-authored-by: Ryan Cavanaugh <RyanCavanaugh@users.noreply.github.com>
2024-01-19 12:44:01 -08:00
Andrew Branch 6cb6fc94ae Add --module preserve, support require in --moduleResolution bundler (#56785) 2024-01-19 12:03:24 -08:00
Andrew Branch 69f2e2ae65 Issue better error when unresolvable package in --moduleResolution node10 resolves with --moduleResolution bundler (#56949) 2024-01-16 09:36:14 -08:00
Andrew Branch 0ea57f6ca1 Let AutoImportProvider find non-declaration files in wildcard exports... (#56848) 2024-01-03 15:01:49 -08:00
fbcdb8cf4f Add auto-import for the package.json imports field (#55015)
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Andrew Branch <andrew@wheream.io>
2023-12-21 09:48:03 -08:00
Jake Bailey 1d7c0c977a Try and deal with CodeQL reports on replace("*", ...) (#56607) 2023-12-05 13:58:56 -08:00
Sheetal NandiandAndrew Branch b6121e400c Replace disk path operations to use fileNames instead of path (#56476)
Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
2023-11-27 22:21:29 -08:00
Andrew Branch 0ee2db33ca Fix declaration emit in --moduleResolution bundler using wrong exports conditions (#56265) 2023-10-30 15:39:57 -07:00
Sheetal Nandi 9473195b6c noDts project resolutions verification and updates for incremental behaviour (#56016) 2023-10-10 10:24:08 -07:00
Andrew Branch 1b70ac32b2 Support resolution-mode overrides in type-only constructs in all moduleResolution modes (#55725) 2023-09-26 14:20:05 -07:00
Andrew Branch 5b7b011518 Fix export path patterns with .d.ts target extensions in AutoImportProvider (#55815) 2023-09-21 15:03:11 -07:00
Sheetal Nandi ec1414f627 Source files not affected by all module resolution options (#55790) 2023-09-20 16:45:32 -07:00
Jake Bailey 41a914f00d Don't debug assert on broken link in moduleNameResolver (#55649) 2023-09-06 12:00:18 -07:00
Sampo Kivistö ec2bd4e252 perf: replace String and Array indexOf method calls with includes method call (#55482) 2023-08-25 11:27:55 -07:00
Jake Bailey 5e8c261b6a dprint the codebase (#54820) 2023-08-16 14:26:38 -07:00
Sheetal Nandi 9261ca7a13 Share redirects cache key calculation between multiple caches used for module resolution and type reference directive (#55376) 2023-08-14 18:46:55 -07:00
Jake Bailey 3b43d841d1 Enable eslint rules prefer-rest-params and prefer-spread (#55181) 2023-08-11 15:07:06 -07:00
Andrew Branch 22a9ae9eed Offer auto-imports from wildcard exports with AutoImportProvider (#54831) 2023-07-07 12:50:38 -05:00
Andrew BranchandJake Bailey 5932420b0f Fix self-name input linking for --allowJs --declaration projects (#54819)
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
2023-07-03 11:17:07 -07:00
Sheetal Nandi 3c4c060dff Adds tests and fixes issues by verifying incremental project updates are handling language service ref counting correctly (#54504) 2023-06-06 11:11:14 -07:00
Andrew Branch 23d48364e4 Add to module resolution tracing (#54478) 2023-06-01 10:03:40 -07:00
Nathan Shively-Sanders 72037a9796 Skip resolving files directly inside node_modules (#52809) 2023-05-11 08:16:17 -07:00
Sheetal Nandi 8b825f7aaa Handle module node found error reporting in incremental and watch scneario (#54115) 2023-05-09 13:42:26 -07:00
Sheetal Nandi ddd5084659 Add resolveLibrary method on hosts and store resolvedLibraries in program so that resolutions can be reused (#53877) 2023-04-20 13:50:22 -07:00
Sheetal Nandi 53d378720a When installing unrelated package inside scoped packages dont invalidate resolutions from everything in the scoped package (#53873) 2023-04-17 12:37:32 -07:00
Jake Bailey ac55b297b7 Upgrade "boolean-trivia" lint to new "argument-trivia" lint that uses type info, has quick fixes, etc. (#53002) 2023-03-23 16:26:39 -07:00
Andrew Branch 7009c76d00 Support wildcard exports in tsconfig lookup (#53443) 2023-03-22 15:21:50 -07:00
Jake Bailey a727ca1571 Make perfLogger potentially undefined rather than using a noop logger (#53229) 2023-03-15 15:58:26 -07:00
Sheetal Nandi 46d70d79cd When resolving type reference from custom typeRoot localtion use mangled scope name if the package is scoped name (#53166) 2023-03-10 09:58:41 -08:00
Sheetal Nandi 9c5b09cd21 Updates to type reference directive resolution and module resolution when failed (#51715) 2023-03-01 10:57:47 -08:00
Jake Bailey 6b75ce23ce Completely remove Push type (#52133) 2023-03-01 09:34:59 -08:00
Andrew Branch e9868e96e8 --moduleResolution bundler: Require ESM for module and remove node from hard-coded conditions (#52940) 2023-02-24 15:49:08 -08:00
Andrew Branch 7bfe6ac49a Make traces where #50762 happens machine analyzable (#52602) 2023-02-06 11:31:07 -08:00
Andrew Branch 0bf99914e7 Make emitModuleKindIsNonNodeESM internal (#52599) 2023-02-06 08:44:58 -08:00
Jake Bailey 2a8436c529 Use eslint-plugin-simple-import-sort (#52090) 2023-02-02 14:36:21 -08:00
Sheetal Nandi ab5067bd43 Always respect preserveSymlinks (#51842) 2023-02-02 12:37:35 -08:00
Stéphane Roucheray 41edecd26d Fix typo in diagnostic messages (#52465) 2023-01-27 11:44:12 -08:00
Andrew Branch 5e8bf480e4 Fix auto-imports with --moduleResolution bundler and customConditions (#52423) 2023-01-26 09:44:07 -08:00
Andrew Branch 436833aba1 Allow allowImportingTsExtensions to be set in any module resolution mode (#52230) 2023-01-17 15:13:17 -08:00
Andrew Branch 3e9703f126 Add additional diagnostic for packages that only resolve under non-exports-respecting modes (#52173) 2023-01-12 16:30:35 -08:00
Andrew Branch 14b0d6d4bf Fix nested package json lookup in modes that respect package.json exports (#51995) 2023-01-10 16:18:26 -08:00
Jake Bailey b3eca6883c Suppress resolvedUsingTsExtension during loadModuleFromDirectory (#52189) 2023-01-10 16:05:44 -08:00
Andrew Branch ec9f6a428b Ensure self-name resolution uses same extension priorities as external imports (#52185) 2023-01-10 13:57:50 -08:00
Wesley Wigham 89e928e8b4 Add --allowArbitraryExtensions, a flag for allowing arbitrary extensions on import paths (#51435) 2023-01-09 17:12:42 -08:00
5951ee9cff feat(48665): tsconfig "extends" field ignores "exports" field of source package (#50955)
* feat(48665): resolve configs from the exports field of the source package

* add missed property

* rename loadFileName to loadFileNameFromPackageJsonField

* Apply suggestions from code review

Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>

Co-authored-by: Andrew Branch <andrewbranch@users.noreply.github.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
2022-12-19 16:40:12 -08:00
Andrew Branch e0bfac531b Rename module resolution option node to node10 (preserving backward-compatible alias) (#51901)
* Rename `node` to `node10` (preserving alias)

* Revert dogfooding change because of LKG

* Update baselines
2022-12-15 10:07:33 -08:00
Andrew Branch a5dde88dce --moduleResolution bundler (formerly known as hybrid) (#51669)
* WIP

* Add extension error back unless noEmit is set

* Add non-relative tests

* Add error for importing from declaration file

* Update unit test

* Add explicit flag for importing from .ts extensions

* Add module specifier resolution changes

* Add auto-import tests

* Disallow relative imports into node_modules

* Ensure auto-imports don’t suggest ./node_modules;

* Test a non-portable declaration emit issue

* Test auto-importing TSX file

* Update path completions

* Fix lint due to merge

* Remove minimal-specific stuff

* Remove minimal tests

* Update unit tests

* Add options

* Add customConditions option

* Add first tests

* CJS constructs are not allowed

* Add another test

* Fix extension adding/replacing priority

* Update test to reflect the choice not to block on unrecognized extensions

* Add auto-imports and string completions tests

* Revamp string completions ending preferences

* Comment test

* Auto-imports of declaration files cannot use .ts extension

* Have declaration file auto imports default to extensionless instead

* Add test for custom conditions

* Fix indentation

* Add baseline showing resolvePackageJsonImports/Exports compatibility

* Fix test and prevent CJS require from resolving

* Update unit test baselines

* Fix bad merge conflict resolution

* Make resolvedUsingTsExtension optional

* Update missed baselines

* Revert now-unnecessary API implementation changes

* Clean up

* Update baselines to es5 emit

* Rename to `bundler`
2022-12-13 13:35:16 -08:00