Skip to content

Simpler build #392

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Simpler build #392

wants to merge 3 commits into from

Conversation

justinfagnani
Copy link
Collaborator

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