feat(npm): API facade and first compile pipeline
Summary
Part of https://github.com/rome/tools/issues/3073
This PR starts works around the runtime APIs. This PR implements only few methods compared to the one proposed:
-
formatFiles -
formatContent -
parseContent
The return type of these methods are not final yet and should not be part of the review. For example having content for formatFiles doesn't make sense.
What's should be reviewed should be the input types for each API.
There are some tests that will fail once we start the actual work, there's some workflow with the GitHub actions and a compilation test with just TypeScript. Not sure if we really need a bundler for now.
Test Plan
Added new tests and updated an existing workflow. The reason why I didn't add npm/rome path to the existing format workflow is because we use setup-rome, which contains the old version, while I am using the current version on main to format and check the JS code.
I will make a new PR to change that across the board, so we are able to dogfood our JS code base while we develop.
Deploying with
Cloudflare Pages
| Latest commit: |
56e0c3e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://78b45818.tools-8rn.pages.dev |
| Branch Preview URL: | https://feature-facade-apis.tools-8rn.pages.dev |
@MichaReiser @xunilrj any chance to get this approved so I can move onto the next piece of logic?