Skip to content

--moduleResolution hybrid #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 33 commits into
base: module-resolution/ts-extensions
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
86dd5da
Add options
andrewbranch Oct 20, 2022
8846f31
Add customConditions option
andrewbranch Oct 21, 2022
9bc0f07
Add first tests
andrewbranch Oct 24, 2022
4545afb
CJS constructs are not allowed
andrewbranch Oct 24, 2022
e82e61d
Add another test
andrewbranch Oct 24, 2022
038783d
Fix extension adding/replacing priority
andrewbranch Oct 25, 2022
870d807
Merge branch 'module-resolution/ts-extensions' into module-resolution…
andrewbranch Nov 8, 2022
a482180
Merge branch 'module-resolution/ts-extensions' into module-resolution…
andrewbranch Nov 15, 2022
89bcd01
Update test to reflect the choice not to block on unrecognized extens…
andrewbranch Nov 16, 2022
6074661
Add auto-imports and string completions tests
andrewbranch Nov 17, 2022
9e03db2
Merge branch 'module-resolution/ts-extensions' into module-resolution…
andrewbranch Nov 18, 2022
c4320a2
Comment test
andrewbranch Nov 18, 2022
f04f1b5
Auto-imports of declaration files cannot use .ts extension
andrewbranch Nov 18, 2022
29039de
Have declaration file auto imports default to extensionless instead
andrewbranch Nov 18, 2022
e83ca2a
Merge branch 'module-resolution/ts-extensions' into module-resolution…
andrewbranch Nov 18, 2022
f98730a
Add test for custom conditions
andrewbranch Nov 18, 2022
5a01dd6
Fix indentation
andrewbranch Nov 18, 2022
4dd6d01
Add baseline showing resolvePackageJsonImports/Exports compatibility
andrewbranch Nov 18, 2022
81b9e70
Merge branch 'module-resolution/ts-extensions' into module-resolution…
andrewbranch Nov 28, 2022
f6fa5f3
Fix test and prevent CJS require from resolving
andrewbranch Nov 28, 2022
aeb23be
Update unit test baselines
andrewbranch Nov 28, 2022
e0c0375
Merge branch 'module-resolution/ts-extensions' into module-resolution…
andrewbranch Dec 5, 2022
f9414aa
Fix bad merge conflict resolution
andrewbranch Dec 5, 2022
dadc1a8
Make resolvedUsingTsExtension optional
andrewbranch Dec 5, 2022
5089aab
Merge branch 'module-resolution/ts-extensions' into module-resolution…
andrewbranch Dec 5, 2022
a88b8ad
Update missed baselines
andrewbranch Dec 6, 2022
224bb10
Merge branch 'module-resolution/ts-extensions' into module-resolution…
andrewbranch Dec 6, 2022
b2e283c
Revert now-unnecessary API implementation changes
andrewbranch Dec 6, 2022
30afa86
Clean up
andrewbranch Dec 9, 2022
0baca5b
Merge branch 'module-resolution/ts-extensions' into module-resolution…
andrewbranch Dec 9, 2022
6e763d9
Update baselines to es5 emit
andrewbranch Dec 9, 2022
22fbb44
Merge branch 'module-resolution/ts-extensions' into module-resolution…
andrewbranch Dec 13, 2022
d4a3b3c
Rename to `bundler`
andrewbranch Dec 13, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update missed baselines
  • Loading branch information
andrewbranch committed Dec 6, 2022
commit a88b8ad2d2232d6fa9a472e2ed8d69e96b383a9b
2 changes: 1 addition & 1 deletion tests/baselines/reference/api/tsserverlibrary.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7264,7 +7264,7 @@ declare namespace ts {
* True if the original module reference used a .ts extension to refer directly to a .ts file,
* which should produce an error during checking if emit is enabled.
*/
resolvedUsingTsExtension: boolean;
resolvedUsingTsExtension?: boolean;
}
/**
* ResolvedModule with an explicitly provided `extension` property.
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines/reference/api/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3331,7 +3331,7 @@ declare namespace ts {
* True if the original module reference used a .ts extension to refer directly to a .ts file,
* which should produce an error during checking if emit is enabled.
*/
resolvedUsingTsExtension: boolean;
resolvedUsingTsExtension?: boolean;
}
/**
* ResolvedModule with an explicitly provided `extension` property.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
"File '/foo/zone.js.ts' does not exist.",
"File '/foo/zone.js.tsx' does not exist.",
"File '/foo/zone.js.d.ts' does not exist.",
"File name '/foo/zone.js' has a '.js' extension - stripping it.",
"File '/foo/zone.ts' does not exist.",
"File '/foo/zone.tsx' does not exist.",
"File '/foo/zone.d.ts' does not exist.",
"File '/foo/zone.js/package.json' does not exist.",
"File '/foo/zone.js/index.ts' does not exist.",
"File '/foo/zone.js/index.tsx' does not exist.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
"File '/node_modules/foo/bar/foobar.js.ts' does not exist.",
"File '/node_modules/foo/bar/foobar.js.tsx' does not exist.",
"File '/node_modules/foo/bar/foobar.js.d.ts' does not exist.",
"File name '/node_modules/foo/bar/foobar.js' has a '.js' extension - stripping it.",
"File '/node_modules/foo/bar/foobar.ts' does not exist.",
"File '/node_modules/foo/bar/foobar.tsx' does not exist.",
"File '/node_modules/foo/bar/foobar.d.ts' does not exist.",
"Directory '/node_modules/foo/bar/foobar.js' does not exist, skipping all lookups in it.",
"Trying substitution 'src/types', candidate module location: 'src/types'.",
"Loading module as file / folder, candidate module location '/src/types', target file types: TypeScript, Declaration.",
Expand All @@ -29,13 +25,8 @@
"File '/node_modules/foo/bar/foobar.js.ts' does not exist.",
"File '/node_modules/foo/bar/foobar.js.tsx' does not exist.",
"File '/node_modules/foo/bar/foobar.js.d.ts' does not exist.",
"File name '/node_modules/foo/bar/foobar.js' has a '.js' extension - stripping it.",
"File '/node_modules/foo/bar/foobar.ts' does not exist.",
"File '/node_modules/foo/bar/foobar.tsx' does not exist.",
"File '/node_modules/foo/bar/foobar.d.ts' does not exist.",
"Directory '/node_modules/@types' does not exist, skipping all lookups in it.",
"File name '/node_modules/@types/foo/bar/foobar.js' has a '.js' extension - stripping it.",
"File name '/node_modules/@types/foo/bar/foobar.js' has a '.js' extension - stripping it.",
"'baseUrl' option is set to '/', using this value to resolve non-relative module name 'foo/bar/foobar.js'.",
"'paths' option is specified, looking for a pattern to match module name 'foo/bar/foobar.js'.",
"Module name 'foo/bar/foobar.js', matched pattern '*'.",
Expand Down