Skip to content

v0.9.0 Release Note & Upgrade Guide

Compare
Choose a tag to compare
@EmranMR EmranMR released this 03 Dec 15:19
· 44 commits to main since this release

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))