build: consolidate tsconfig.json files, build as unified project #932
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.
Context
Step 4 for #928. View isolated diff and CI results here: ItsHarper#7
At time of writing, the isolated diff has
+112, -128lines added/removed.This change is ready-to-go, but I'm marking it as a draft until #929 has been merged, as it is relatively difficult to review in this context until that happens.
Description
This PR has two main effects:
Uses a single
tscinstance to build every package in the workspace instead of usingpnpmto call thebuildscript on each package individuallytsconfig-workspace-analyze.jsonandtsconfig-workspace-build.jsonfiles, which merely reference all of the packages so that they can be built or analyzed together.tsconfig.jsonthat points tots-config-workspace-analyze.json.Consolidates all of the shared
tsconfig.jsonandtsconfig.build.jsonoptions intotsconfig-base-analyze.jsonandtsconfig-base-build.jsonfiles located at the roottsc --showConfigto verify that I wasn't changing any important compilation options."lib": ["es2015", "es2016"].cli/tsconfig.jsonwas missing a reference toutil(which was present incli/tsconfig.build.json). Both ofcli'stsconfig.jsonfiles now have theutilreference.Note for Windows users about the root `tsconfig.json` symlink
Symlinks on Windows
If you're using Windows, that likely won't work correctly (you'll end up with a useless text file instead of a symlink), and you'll have to either point your IDE at
tsconfig-workspace-analyze.jsonmanually, or enable symlinks using dev mode and setcore.symlinkstotruein your git config.I added settings for the
zededitor to make it recognize all of the newtsconfigfiles as such. I do not know if the same would be needed for VS Code.