A list of what's changed, and more.
- Calling
getPhpContent()
will take into account the directive's argument count
- Moved formatter specific dependencies to
devDependencies
- Compatibility with ECMAScript modules
- Improves parsing of Blade echo blocks that contain PHP comments (#79)
- Removes
out
andsrc/test
directory from npm bundle
- Improves formatting and indentation of certain condition-like directives (such as
@guest
) (#36) - Improves formatting of if statements containing echos (#35)
- Improves indentation of long arrays inside directives (#34)
- Improves formatting of match statements inside directive arguments (#33)
- Improves formatting of match statements (#31)
- Makes it possible to customize prettier PHP options via the
.blade.format.json
file (#27) - Internal prettier PHP version is now 8.0 by default (#27)
- Improves formatting of PHP arrow functions (#27)
- Improves formatting of some directives, such as
@can
(#28) - Improves formatting of directives inside HTML elements (#29)
- Updated dependencies to correct package installation (#30)
- Detected custom if statements are now treated as control structures
- Preserves inline echos as text (#25)
- Improves wrapping behavior inside conditions (#26)
- Improves formatting of empty arrays inside
@props
and other directives (#23) - Fixes a bug where
{{ $echo }}
echos inside component tags were missed (#22) - Improves wrapping behavior of array arguments inside directives (#24)
- Prevents email addresses from becoming directives (#21)
- Prevents email addresses from becoming directives (#21)
- Improves formatting of multi-line echos (#20, #19, #18)
- Improves formatting of
@props
(#17)
- Corrects an issue where NOT operator reflow breaks up inequality
- Improves relative indentation inside
@php
blocks (#16) - Corrects an issue where
@php
and@verbatim
block content is lost inside nested child documents (#15) - Improves formatting of conditions when the branch contains a single node, without any HTML fragments (#14)
- Improves formatting behavior of very long echo lines (#13)
- Prevents indentation of blank lines inside block structures (#12)
- Improves results of
DirectiveNode.getImmediateChildren()
- General formatting improvements
- Additional test coverage
- Adds coverage for short attribute syntax
<x-profile :user-id="$userId"></x-profile>
(from https://twitter.com/calebporzio/status/1568700635683627008)
- Improves
can
directive pairing
- Abstracts the PHP Validator so that it is no longer dependent on
php-parser
- Moves
php-parser
to a development dependency - Improves the management of internal parser references and child documents
- Adds an
.npmignore
file to prevent the/out
directory being purged when publishing - Additional dependency removal/cleanup
- Fixes an issue where
@for
and@endfor
regions were incorrectly labeled as not paired
- Improves parsing and formatting of directives with lots of spaces between the directive name and the opening
(
- Documentation updates
- Adds common JavaScript events to the default list of excluded directives
- Initial test release