Skip to content

Fix module types when bundling code - #300

Merged
jeparlefrancais merged 6 commits into
mainfrom
improve-bundle-types
Sep 30, 2025
Merged

jeparlefrancais merged 6 commits into
mainfrom
improve-bundle-types

Conversation

@jeparlefrancais

@jeparlefrancais jeparlefrancais commented Aug 13, 2025 •

Copy link
Copy Markdown
Contributor

Closes #283

This changes how the generated code to bundle modules is structured so that the Luau types for each module is correctly preserved.

  • add entry to the changelog

This changes how the generated code to bundle modules is structured so
that the Luau types for each module is correctly preserved.
@jLn0n

jLn0n commented Aug 19, 2025

Copy link
Copy Markdown

may i see a bundled output with this fix enabled?

@jeparlefrancais

Copy link
Copy Markdown
Contributor Author

may i see a bundled output with this fix enabled?

Sure! For example this test https://github.com/seaofvoices/darklua/blob/main/tests/bundle.rs#L420-L428

Has this bundle snapshot:

https://github.com/seaofvoices/darklua/pull/300/files#diff-aba027bea1cfa98a08edfeee3d49867884173f3a22f696f272694a2ba9be7e23R5

If you follow the snapshot names you can find more examples in the bundle.rs files

@github-actions

Copy link
Copy Markdown

Coverage after merging improve-bundle-types into main will be

87.21%

Coverage Report for Changed Files
FileStmtsBranchesFuncsLinesUncovered Lines
src/rules/bundle
   rename_type_declaration.rs97.56%100%100%97.16%153–154, 80–81
src/rules/bundle/path_require_mode
   module_definitions.rs90.48%100%100%90%103–104, 130–134, 139, 158, 64–67, 70–73, 97

@jeparlefrancais
jeparlefrancais merged commit d1972d8 into main Sep 30, 2025
@jeparlefrancais
jeparlefrancais deleted the improve-bundle-types branch September 30, 2025 15:02
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.

Better support module types when bundling

2 participants