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

feat(perf): tsconfck perf improvement #7055

Merged
merged 3 commits into from Mar 3, 2022

Conversation

dominikg
Copy link
Contributor

Description

tsconfck 1.1.0 always traverses the parent directories for each code file to find the closest tsconfig.json, needlessly calling fs.stat multiple times.
Initial report here: #7023

tsconfck 1.2.0 gained new options to avoid this by providing a pre-composed list of tsconfig paths that is used instead of the actual filesystem.

This is a potentially breaking change because to be able to provide a complete list of tsconfig files, a root directory has to be set. This PR uses the detected workspace root which should cover most real project setups.

But still it is possible that someone somewhere uses a tsconfig.json outside their workspace root and they will see an error after this is merged

Additional context

for performance reasons, tsconfig.json files are not searched in node_modules or .git directories. Again this could be breaking if someone had something like src/node_modules/tsconfig.json or somehow used ts files and an acccompanying tsconfig directly from an npm package.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines and follow the Commit Convention.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

@Niputi Niputi changed the title Feat/tsconfck perf feat(perf): tsconfck perf improvement Feb 23, 2022
@Niputi Niputi added the p2-nice-to-have Not breaking anything but nice to have (priority) label Feb 23, 2022
@patak-dev patak-dev added this to the 2.9 milestone Feb 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants