Skip to content

Port type acquisition parsing from tsconfig.json #852

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 6 commits into from
May 9, 2025

Conversation

iisaduan
Copy link
Member

@iisaduan iisaduan commented May 8, 2025

This uses the beginning of the type acquisition definitions from #844

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements the initial parsing support for the new "typeAcquisition" configuration in tsconfig/json files. Key changes include adding baseline tests and updating the parsing logic to process "typeAcquisition" properties, introducing new core types and option declaration for typeAcquisition, and integrating these changes into existing test and parsing functions.

Reviewed Changes

Copilot reviewed 61 out of 61 changed files in this pull request and generated no comments.

Show a summary per file
File Description
testdata/baselines/reference/config/tsconfigParsing/* Added new baselines that verify the conversion of jsconfig/tsconfig files with typeAcquisition data
internal/tsoptions/* Updated parsing logic and added default handling functions (e.g. getDefaultTypeAcquisition) for typeAcquisition
internal/tsoptions/parsinghelpers.go Introduced ParseTypeAcquisition and related helper types to process typeAcquisition entries
internal/tsoptions/declstypeacquisition.go New file declaring the typeAcquisition options for tsconfig parsing
internal/core/* Added the TypeAcquisition structure and updated ParsedOptions to include typeAcquisition
internal/execute/tsc_test.go Added tests to verify typeAcquisition parsing logic

@andrewbranch
Copy link
Member

This uses the beginning of the type acquisition definitions from #806

Wrong PR mentioned I think :)

options := getDefaultCompilerOptions(configFileName)
// var typeAcquisition *compiler.TypeAcquisition
compilerOptions := getDefaultCompilerOptions(configFileName)
var typeAcquisition *core.TypeAcquisition
Copy link
Member

Choose a reason for hiding this comment

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

"maxNodeModuleJsDepth": 2,
"configFilePath": "/apath/jsconfig.json"
}

Copy link
Member

Choose a reason for hiding this comment

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

Here you should have gotten "enable": true

@iisaduan iisaduan added this pull request to the merge queue May 9, 2025
Merged via the queue into microsoft:main with commit 4252f06 May 9, 2025
22 checks passed
@iisaduan iisaduan deleted the parse-type-acq branch May 9, 2025 17:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants