Skip to content

Releases: EmranMR/tree-sitter-blade

v0.11.0 Release Notes

18 Sep 11:23
Compare
Choose a tag to compare

New Stuff ✨

  • Support for Inertia directives @inertia and @inertiaHead #72
  • Support for Ziggy directive @routes #72

Chore 🧹

  • Updated ESLint config file to flat config
  • Updated dependencies

v0.10.0 Release Notes

24 Feb 18:09
26b5b8f
Compare
Choose a tag to compare

New Stuff ✨

  • Support for @use #43
  • Support for @js #54
  • The following has been implemented thanks to @calebdw 🙏
    • Continuous Integration #57
    • PR templates #52
    • Ability to automate the parsing to find errors and inconsistencies #53

Changes/Updates

  • README & CONTRIBUTION guide has been updated to reflect :)

v0.9.2

06 Dec 12:55
Compare
Choose a tag to compare

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 your injections.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

04 Dec 20:51
Compare
Choose a tag to compare

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 parsing comments, that has been fixed so that it is no longer parsed as html.
  • 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

03 Dec 15:19
Compare
Choose a tag to compare

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!

php injection

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 or php_only texts

Before

Screenshot 2023-12-02 at 19 59 54 Screenshot 2023-12-03 at 10 56 43

After

Screenshot 2023-12-02 at 20 01 04 Screenshot 2023-12-03 at 11 00 21

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:

  1. Download the parser v0.9.2^ and hook it up to your editor
  2. just change your injections.scm to the following
  3. 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

19 Sep 22:50
Compare
Choose a tag to compare

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

02 Sep 17:03
Compare
Choose a tag to compare

New Addition ✨:

  • Laravel Pennant Support #30

Fixed 🧹:

  • Sorted the issue with comment that might have interfered with theming #37
  • All brackets are now targetable for highlighting purposes in the theme #36

V0.4.0 Release Notes

30 Aug 10:02
Compare
Choose a tag to compare

New Addition:

  • Support for Authorization:
    • @can
    • @canany
    • @cannot

v0.3.3 Release Notes

23 Aug 10:20
Compare
Choose a tag to compare

🐞 Bug Fix:

Fixes #27 and Laravel Suite#11
Screenshot 2023-08-22 at 23 56 12
⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎⬇︎
Screenshot 2023-08-23 at 11 18 36

v0.3.2 Release Notes

18 Aug 15:14
Compare
Choose a tag to compare

Bug Fix: 🐞

  • Fixed the bug, that resulted in breakage when the comments ended with punctuations #24
  • Added new tests for future development