Skip to content

Conversation

@justinfagnani
Copy link
Contributor

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

@justinfagnani justinfagnani requested a review from aomarks January 29, 2024 19:20
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.

1 participant