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.
This changes the build system so that it no longer based on a stream of heterogenous build result objects. Instead a build is an async function that returns the built files and syntactic diagnostics. I think this makes it easier to work with the flow of the build as the types of build outputs are separated (files, diagnostics, and semantic diagnostics), it's easier to tell when a build is done, and it's easier to get important files from the inputs, like the package.json (we no longer have to pass a getPackageJson() function, but can pass the package.json data if it's available).
This change also sets the stage for further changes that I think will make the build easier to work with. It lifts up finding and parsing the package.json file to the top level of the build, which makes adding any diagnostics more straightforward. A similar thing could be done for computing the
NodeModulesDirectory
, which could be done early and used to resolve types and bare module specifiers (they each use a different process either now).Part of #391