Skip to content

RFC split bundler code into multiple submodules #215

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

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Conversation

Charlie-XIAO
Copy link
Contributor

@Charlie-XIAO Charlie-XIAO commented Aug 28, 2024

This is a subtask of #66 to avoid crowding a single PR. Essentially, this:

  • replaces bundler.rs with bundler/mod.rs which is equivalent
  • moves custom AST transforms in bundler/mod.rs to bundler/transforms.rs
  • moves everything else except the pub(crate) bundle function in bundler/mod.rs to bundler/common.rs
  • decompose three subroutine functions that will be reused in ENH support external dependencies in widget development #66:
    • bundle_into_raw_module bundles entry point into a raw AST module without transforms
    • apply_basic_transforms applies TypeScript and JSX transforms
    • emit_module_to_buf emits a module to a writable buffer

This is just a pure refactoring of code and functionalities should not change. In particular, none of the unit tests for the bundler is modified so if we are passing in CI we are likely good to go :)

Copy link

✔️ Deskulpt Built Successfully!

Deskulpt binaries have been built successfully on all supported platforms. Your pull request is in excellent shape! You may check the built Deskulpt binaries here and download them to test locally.

Workflow file: .github/workflows/build.yaml. Generated for commit: ca2155d.

@Charlie-XIAO
Copy link
Contributor Author

CI is passing, let's see how this fits with #66.

@Charlie-XIAO Charlie-XIAO merged commit 9a2b514 into main Aug 28, 2024
11 checks passed
@Charlie-XIAO Charlie-XIAO deleted the rfc-bundler branch August 28, 2024 01:54
@Charlie-XIAO Charlie-XIAO added type:maintenance General maintenance type:refactor deskulpt:backend and removed type:maintenance General maintenance labels Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant