Releases: EmranMR/tree-sitter-blade
v0.10.0 Release Notes
v0.9.2
v0.9.2 Release Notes ✨
Enhancement to The comment
Node 🧹:
- Thanks to the contribution #45 by @calebdw , the
comment
node definition has been improved, it is now more semantic. - If you are updating from
<v0.9.0
, make sure you change yourinjections.scm
content:
((text) @injection.content
(#not-has-ancestor? @injection.content "envoy")
(#set! injection.combined)
(#set! injection.language php))
; could be bash or zsh
; or whatever tree-sitter grammar you have.
((text) @injection.content
(#has-ancestor? @injection.content "envoy")
(#set! injection.combined)
(#set! injection.language bash))
; 🚧 Available for experimental split_parser see issue #5
;((php_only) @injection.content
; (#set! injection.language php_only))
;((parameter) @injection.content
; (#set! injection.language php_only))
v0.9.1 Release Note
v0.9.1 Release Notes ✨
If you have not done so, follow the upgrade guide outlined for v0.9.0
- I have adjusted the stubs there to take into account for the bug fix with this version
Bug Fixes 🐞:
1. Comment Bug #42
After the refactor, there was an issue, when parsingcomments
, that has been fixed so that it is no longer parsed ashtml
.README and stubs were adjusted to reflect the change.- Please use v0.9.2 better solution was implemented #45 😊
2. Experimental php_only
bug #41:
- This is mainly for Nova and of course upcoming new
tree-sitter-php
- Adjusted the stubs so you do not get oddities with the php parsing
v0.9.0 Release Note & Upgrade Guide
v0.9.0 Release Notes ✨
Laravel Envoy
This update brings full support for Laravel Envoy
New Directives:
Envoy Cores:
@servers
@import
@task
@story
@setup
Hooks
@before
@after
@error
@success
@finished
Notifications
@slack
@discord
@telegram
@microsoftTeams
Shell
injection! 😧🎉
Perhaps the most exciting part of the update is the ability for the parser to correctly recognise and parse shell
!! 🤯
Correct me if I am wrong, but I do not think there is any none-tree-sitter editor or parser out there, that can even remotely achieve this.
Blade is intrinsically a very complex file, having php
, html
, shell
, javascript
, css
... The list goes on, with lots of overlap. That is the main reason that no parser managed to nail it. Below is just a tiny example of how complex it can get in the same example.blade.php
!
As you can see the v0.9.0
correctly picks up everything!
Enhancements 🧹
- closed #39
- This should give you a much cleaner AST when parsing your
blade
files - Especially when parsing complicated
texts
orphp_only texts
Before
![Screenshot 2023-12-02 at 19 59 54](https://private-user-images.githubusercontent.com/11975985/287475543-dc6abc00-8fbe-4c2a-a315-a8fdd47991a5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwOTUwMzcsIm5iZiI6MTcyNDA5NDczNywicGF0aCI6Ii8xMTk3NTk4NS8yODc0NzU1NDMtZGM2YWJjMDAtOGZiZS00YzJhLWEzMTUtYThmZGQ0Nzk5MWE1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDE5MTIxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQzOTY4NGZiOTk2MjI3MzU0NjJiMzcyZTUzYmExMmFhY2NjNjA5ZjE5MGE5NWJjM2IzMWY1NzMwYTA3NjE5MTYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.P31DG_sgxNlDe5Wk8xuy9A_IE5V8ASMOUUA3CYiFm1w)
![Screenshot 2023-12-03 at 10 56 43](https://private-user-images.githubusercontent.com/11975985/287520784-322dc21a-7fbf-4dd3-b0f9-d4781d7480ce.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwOTUwMzcsIm5iZiI6MTcyNDA5NDczNywicGF0aCI6Ii8xMTk3NTk4NS8yODc1MjA3ODQtMzIyZGMyMWEtN2ZiZi00ZGQzLWIwZjktZDQ3ODFkNzQ4MGNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDE5MTIxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWI5YWFlNzM4NGUzZThkMjMyNjI1ZDMxODljMTk1OWMzNTZjMDVlMThlZTk5YTUzYjdjYjgyN2E4MjdkZDA3MGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Lw_4sbHOcwwcF4WpCUumEt5_e4Zoq7xAM59Li7ZWPkw)
After
![Screenshot 2023-12-02 at 20 01 04](https://private-user-images.githubusercontent.com/11975985/287475589-86d25d2b-ede0-43b4-bafb-94c7116bae83.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwOTUwMzcsIm5iZiI6MTcyNDA5NDczNywicGF0aCI6Ii8xMTk3NTk4NS8yODc0NzU1ODktODZkMjVkMmItZWRlMC00M2I0LWJhZmItOTRjNzExNmJhZTgzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDE5MTIxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAzNmE3NjRhYzcyOWI1ZGNmYWFiODBhZmQxYzNlZGY4NjkyNjc2NGZjNmU0N2FjNTY0Njk3ZDMwYzNmMDRkOTMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LNKUFNeqsOtEhBNtu4QdPJNCXr9Ue32ba8ubbdcdF_Q)
![Screenshot 2023-12-03 at 11 00 21](https://private-user-images.githubusercontent.com/11975985/287520792-bda406e6-76af-4cd2-b8a5-863cbf0c0e3b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwOTUwMzcsIm5iZiI6MTcyNDA5NDczNywicGF0aCI6Ii8xMTk3NTk4NS8yODc1MjA3OTItYmRhNDA2ZTYtNzZhZi00Y2QyLWI4YTUtODYzY2JmMGMwZTNiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE5VDE5MTIxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA5NjdjOTgyMGQ0OGNiMjI2Y2U1NmMzZGM4NGJhYjhjZTA5ZDI2MDEwMmUyMGE5NjJkZDBkNzA4NWVkOTUwYmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0._nxkF2QoA_W54YOuj9s7oi5lS9upvkgk5AvByOSmKm0)
Upgrade Guide
There has been some major structural refactor to make the grammar future proof, semantic and flexible as it grows with Laravel. As a result there has been a breaking change. I can not promise you to be the last one, but there should be no breakage for a good while!
To Upgrade:
- Download the parser
v0.9.2^
and hook it up to your editor - just change your
injections.scm
to the following - You are good to go! ✅
Please note, as mentioned in the README, the php_only is experimental until merged to
tree-sitter-php
.
((text) @injection.content
(#not-has-ancestor? @injection.content "envoy")
(#set! injection.combined)
(#set! injection.language php))
; could be bash or zsh
; or whatever tree-sitter grammar you have.
((text) @injection.content
(#has-ancestor? @injection.content "envoy")
(#set! injection.combined)
(#set! injection.language bash))
; 🚧 Available for experimental split_parser see issue #5
;((php_only) @injection.content
; (#set! injection.language php_only))
;((parameter) @injection.content
; (#set! injection.language php_only))
v0.7.0 Release Notes
New Addition ✨:
- Full support for Template Inheritance , useful for legacy projects
- closes #35 and #10 ✅
- inline
@section
exclusive parsing support - nested
@section
support with either@show
or@endsection
@aware
@parent
v0.6.0 Release Notes
V0.4.0 Release Notes
New Addition:
- Support for Authorization:
@can
@canany
@cannot
v0.3.3 Release Notes
🐞 Bug Fix:
Fixes #27 and Laravel Suite#11
⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎
v0.3.2 Release Notes
Bug Fix: 🐞
- Fixed the bug, that resulted in breakage when the comments ended with punctuations #24
- Added new tests for future development
v0.3.1 Release Note
Bug Fix: 🐞
- Fixed the bug/conflict when parsing undeclared
@directives
so that the parser gracefully handle them rather than throwing an error #23 - This will be important in following scenarios:
- Email address entry
- Editor tree targeting for potential completion suggestion see EmranMR/Laravel-Nova-Extension#7
- The attribute directives relating to upcoming Livewire v3.0 such as
@click