Skip to content
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

Fix self-name input linking for --allowJs --declaration projects #54819

Merged
merged 4 commits into from
Jul 3, 2023

Conversation

andrewbranch
Copy link
Member

Fixes #54299
Related: #52185

@typescript-bot typescript-bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Jun 28, 2023
// to ensure that self-name imports of their own package can resolve back to their
// input JS files via `tryLoadInputFileForPath` at a higher priority than their output
// declaration files, so we need to do a single pass with all extensions for that case.
if (getAllowJSCompilerOption(state.compilerOptions) && !pathContainsNodeModules(directory)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think with this we need to add affectsModuleResolution to "checkJs" in commandline options declaration.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ooh, yikes. I can do that for now, but maybe it would be better to update getCompilerOptionValue (called by optionsHaveChanges functions) to use all the computed compiler option getter functions sometime in the future.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checkJs doesn’t even have affectsSemanticDiagnostics. Does it need it?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it does. #53403 never made it in i guess.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ll leave it off of this one and then we should revisit #53403

andrewbranch and others added 3 commits June 28, 2023 15:33
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
@andrewbranch andrewbranch merged commit 5932420 into main Jul 3, 2023
18 checks passed
@andrewbranch andrewbranch deleted the bug/54299 branch July 3, 2023 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Milestone Bug PRs that fix a bug with a specific milestone
Projects
None yet
Development

Successfully merging this pull request may close these issues.

importing own package from test fails with error TS5055: Cannot write file
4 participants