-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Actually set impliedNodeFormat in more cases #59479
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
tests/baselines/reference/bundlerConditionsExcludesNode(module=esnext).trace.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
tests/baselines/reference/bundlerConditionsExcludesNode(module=preserve).trace.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
[ | ||
"Found 'package.json' at '/node_modules/dual/package.json'.", | ||
"======== Resolving module 'dual' from '/main.ts'. ========", | ||
"Explicitly specified module resolution kind: 'Bundler'.", | ||
"Resolving in CJS mode with conditions 'import', 'types'.", | ||
"File '/package.json' does not exist.", | ||
"Loading module 'dual' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", | ||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", | ||
"Found 'package.json' at '/node_modules/dual/package.json'.", | ||
"File '/node_modules/dual/package.json' exists according to earlier cached lookups.", | ||
"Entering conditional exports.", | ||
"Matched 'exports' condition 'import'.", | ||
"Using 'exports' subpath '.' with target './index.js'.", | ||
|
@@ -22,8 +23,23 @@ | |
"Resolution for module 'dual' was found in cache from location '/'.", | ||
"======== Module name 'dual' was successfully resolved to '/node_modules/dual/index.d.ts' with Package ID 'dual/[email protected]'. ========", | ||
"======== Resolving module 'dual' from '/main.cts'. ========", | ||
"Resolution for module 'dual' was found in cache from location '/'.", | ||
"======== Module name 'dual' was successfully resolved to '/node_modules/dual/index.d.ts' with Package ID 'dual/[email protected]'. ========", | ||
"Explicitly specified module resolution kind: 'Bundler'.", | ||
"Resolving in CJS mode with conditions 'require', 'types'.", | ||
"File '/package.json' does not exist according to earlier cached lookups.", | ||
"Loading module 'dual' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", | ||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", | ||
"File '/node_modules/dual/package.json' exists according to earlier cached lookups.", | ||
"Entering conditional exports.", | ||
"Saw non-matching condition 'import'.", | ||
"Matched 'exports' condition 'require'.", | ||
"Using 'exports' subpath '.' with target './index.cjs'.", | ||
"File name '/node_modules/dual/index.cjs' has a '.cjs' extension - stripping it.", | ||
"File '/node_modules/dual/index.cts' does not exist.", | ||
"File '/node_modules/dual/index.d.cts' exists - use it as a name resolution result.", | ||
"Resolved under condition 'require'.", | ||
"Exiting conditional exports.", | ||
"Resolving real path for '/node_modules/dual/index.d.cts', result '/node_modules/dual/index.d.cts'.", | ||
"======== Module name 'dual' was successfully resolved to '/node_modules/dual/index.d.cts' with Package ID 'dual/[email protected]'. ========", | ||
"======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", | ||
"Explicitly specified module resolution kind: 'Node10'.", | ||
"Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
[ | ||
"Found 'package.json' at '/node_modules/dual/package.json'.", | ||
"======== Resolving module 'dual' from '/main.ts'. ========", | ||
"Explicitly specified module resolution kind: 'Bundler'.", | ||
"Resolving in CJS mode with conditions 'import', 'types'.", | ||
"File '/package.json' does not exist.", | ||
"Loading module 'dual' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", | ||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", | ||
"Found 'package.json' at '/node_modules/dual/package.json'.", | ||
"File '/node_modules/dual/package.json' exists according to earlier cached lookups.", | ||
"Entering conditional exports.", | ||
"Matched 'exports' condition 'import'.", | ||
"Using 'exports' subpath '.' with target './index.js'.", | ||
|
@@ -22,8 +23,23 @@ | |
"Resolution for module 'dual' was found in cache from location '/'.", | ||
"======== Module name 'dual' was successfully resolved to '/node_modules/dual/index.d.ts' with Package ID 'dual/[email protected]'. ========", | ||
"======== Resolving module 'dual' from '/main.cts'. ========", | ||
"Resolution for module 'dual' was found in cache from location '/'.", | ||
"======== Module name 'dual' was successfully resolved to '/node_modules/dual/index.d.ts' with Package ID 'dual/[email protected]'. ========", | ||
"Explicitly specified module resolution kind: 'Bundler'.", | ||
"Resolving in CJS mode with conditions 'require', 'types'.", | ||
"File '/package.json' does not exist according to earlier cached lookups.", | ||
"Loading module 'dual' from 'node_modules' folder, target file types: TypeScript, JavaScript, Declaration, JSON.", | ||
"Searching all ancestor node_modules directories for preferred extensions: TypeScript, Declaration.", | ||
"File '/node_modules/dual/package.json' exists according to earlier cached lookups.", | ||
"Entering conditional exports.", | ||
"Saw non-matching condition 'import'.", | ||
"Matched 'exports' condition 'require'.", | ||
"Using 'exports' subpath '.' with target './index.cjs'.", | ||
"File name '/node_modules/dual/index.cjs' has a '.cjs' extension - stripping it.", | ||
"File '/node_modules/dual/index.cts' does not exist.", | ||
"File '/node_modules/dual/index.d.cts' exists - use it as a name resolution result.", | ||
"Resolved under condition 'require'.", | ||
"Exiting conditional exports.", | ||
"Resolving real path for '/node_modules/dual/index.d.cts', result '/node_modules/dual/index.d.cts'.", | ||
"======== Module name 'dual' was successfully resolved to '/node_modules/dual/index.d.cts' with Package ID 'dual/[email protected]'. ========", | ||
"======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", | ||
"Explicitly specified module resolution kind: 'Node10'.", | ||
"Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
...lines/reference/conditionalExportsResolutionFallback(moduleresolution=bundler).trace.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
tests/baselines/reference/customConditions(resolvepackagejsonexports=false).trace.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
tests/baselines/reference/customConditions(resolvepackagejsonexports=true).trace.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ | |
"File '/node_modules/a/index.d.ts' exists - use it as a name resolution result.", | ||
"Resolving real path for '/node_modules/a/index.d.ts', result '/node_modules/a/index.d.ts'.", | ||
"======== Module name 'a' was successfully resolved to '/node_modules/a/index.d.ts'. ========", | ||
"File '/node_modules/foo/package.json' exists according to earlier cached lookups.", | ||
"======== Resolving module './index' from '/node_modules/foo/use.d.ts'. ========", | ||
"Module resolution kind is not specified, using 'Node10'.", | ||
"Loading module as file / folder, candidate module location '/node_modules/foo/index', target file types: TypeScript, Declaration.", | ||
|
@@ -32,6 +33,10 @@ | |
"File '/node_modules/foo/index.d.ts' exists - use it as a name resolution result.", | ||
"File '/node_modules/foo/package.json' exists according to earlier cached lookups.", | ||
"======== Module name './index' was successfully resolved to '/node_modules/foo/index.d.ts' with Package ID 'foo/[email protected]'. ========", | ||
"File '/node_modules/foo/package.json' exists according to earlier cached lookups.", | ||
"File '/node_modules/a/package.json' does not exist according to earlier cached lookups.", | ||
"File '/node_modules/package.json' does not exist.", | ||
"File '/package.json' does not exist.", | ||
"======== Resolving module 'foo' from '/node_modules/a/index.d.ts'. ========", | ||
"Module resolution kind is not specified, using 'Node10'.", | ||
"Loading module 'foo' from 'node_modules' folder, target file types: TypeScript, Declaration.", | ||
|
@@ -50,6 +55,7 @@ | |
"'package.json' does not have a 'peerDependencies' field.", | ||
"Resolving real path for '/node_modules/a/node_modules/foo/index.d.ts', result '/node_modules/a/node_modules/foo/index.d.ts'.", | ||
"======== Module name 'foo' was successfully resolved to '/node_modules/a/node_modules/foo/index.d.ts' with Package ID 'foo/[email protected]'. ========", | ||
"File '/node_modules/a/node_modules/foo/package.json' exists according to earlier cached lookups.", | ||
"======== Resolving module '@typescript/lib-es5' from '/.src/__lib_node_modules_lookup_lib.es5.d.ts__.ts'. ========", | ||
"Explicitly specified module resolution kind: 'Node10'.", | ||
"Loading module '@typescript/lib-es5' from 'node_modules' folder, target file types: TypeScript, Declaration.", | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR but we copy and paste the arrays passed into
fileExtensionIsOneOf
all over the place; makes me wonder if we'd get a speed boost by lifting these arrays into common variables.