Releases: rozsazoltan/illuminate-typescript
v0.0.1
0.0.1 (2024-10-17)
The laravel-typescript package has inspired my development. My package, named illuminate-typescript, is coming with Laravel 11 support and is based on the aforementioned laravel-typescript. I would like to take this opportunity to thank them for their work!
Starting from Laravel 11, we are dropping support for Doctrine DBAL. My package follows this as well, and instead, I have built the default functionality of the ModelGenerator on Laravel's Schema ecosystem.
Furthermore, I have created the option to set custom configurations in the Generators. Using this new feature, I have introduced two new settings for the ModelGenerator. We have the option to display the database type of columns as comments in the TypeScript interfaces. Additionally, for columns of the ENUM type, we can strictly enumerate the ENUM values as the column type.
The package collects the appropriate PHP classes using Symfony Finder. Unfortunately, this method organizes the classes based on the order of the folder structure, which can lead to ugly discrepancies in version control when creating new models, files, and folders. As a fix, we process the PHP classes strictly in alphabetical order and place them into the TypeScript file.
Warning
Please note that this is the result of a brief development, so I recommend using the 0.x versions with great caution. I am still working on the documentation, and I will try to summarize the package's capabilities, use cases, and customizability as soon as possible.
BREAKING CHANGES
- PHP 8.2, 8.3 support
- Laravel 11 support
- Dropped Laravel 10.x support (the original package is also perfect for this)
- Dropped "Doctrine DBAL"; Package will use Laravel Schema instead of
Feature
- Added custom settings handling to Generator(s)
- Added DB Type to TS file as comment like:
/*timestamp*/ | string
- Added shouldDBType setting to ModelGenerator (default: true)
- DB Enum handling (strict or permissive):
"OPTION 1" | "OPTION 2"
orstring
- Added shouldStrictEnum setting to ModelGenerator (default: true)
Fixes
- Sort generated classes by name
Change
- Use Rose special directory structure
- Use Rose special ServiceProvider structure
- New namespaces
- Use PestPHP for tests