-
Notifications
You must be signed in to change notification settings - Fork 439
HTML compliant CTE support #5483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
634c148
feat: use default parse5 implementation
jhefferman-sfdc 7f9c107
fix: directive-if/template-expression
jhefferman-sfdc d6db47f
chore: fixture updates
jhefferman-sfdc 7b4beb1
feat: cte validation
jhefferman-sfdc 8957852
feat: attribute support and validation
jhefferman-sfdc fe01ffd
feat: revert fuzzy end brace computation
jhefferman-sfdc b9fee9f
feat: additional tests and restructuring
jhefferman-sfdc 3635240
feat: additional coverage
jhefferman-sfdc bad423f
Merge branch 'master' into jhefferman/cte-html-compliance
jhefferman-sfdc fe7a030
fix: perf test syntax
jhefferman-sfdc cbbddf5
chore: add comments
jhefferman-sfdc 666ea84
chore: add comments
jhefferman-sfdc 790aa03
fix: decode literals that precede expressions
jhefferman-sfdc ab7b49a
fix: turn off feature for compatibility test
jhefferman-sfdc b54c58d
Merge branch 'master' into jhefferman/cte-html-compliance
jhefferman-sfdc 9ec6fbe
fix: test corrections
jhefferman-sfdc 228c81b
fix: legacy comment
jhefferman-sfdc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...mpiler/src/__tests__/fixtures/expression-complex/invalid/arrow-function-async/actual.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <template> | ||
| <section> | ||
| <button onclick={async () => doSomething()}></button> | ||
| <button onclick="{async () => doSomething()}"></button> | ||
| </section> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...r/src/__tests__/fixtures/expression-complex/invalid/arrow-function-block-body/actual.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <template> | ||
| <section> | ||
| <button onblick={() => { doSomething(); }}></button> | ||
| <button onblick="{() => { doSomething(); }}"></button> | ||
| </section> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...er/src/__tests__/fixtures/expression-complex/invalid/assignment-outside-arrow/actual.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <template> | ||
| <section> | ||
| <button onclick={myField = 'foo'}></button> | ||
| <button onclick="{myField = 'foo'}"></button> | ||
| </section> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...lwc/template-compiler/src/__tests__/fixtures/expression-complex/invalid/await/actual.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <template> | ||
| <section> | ||
| <button onclick={await foo()}></button> | ||
| <button onclick="{await foo()}"></button> | ||
| </section> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ate-compiler/src/__tests__/fixtures/expression-complex/invalid/bigint-literal/actual.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <template> | ||
| <section> | ||
| <x-child foo={transformBigInt(1n)}></x-child> | ||
| <x-child foo="{transformBigInt(1n)}"></x-child> | ||
| </section> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...emplate-compiler/src/__tests__/fixtures/expression-complex/invalid/class-expr/actual.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| <template> | ||
| <section> | ||
| <x-foo jsclass={ | ||
| <x-foo jsclass="{ | ||
| class Bar { | ||
| method() {} | ||
| } | ||
| }></x-foo> | ||
| }"></x-foo> | ||
| </section> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ate-compiler/src/__tests__/fixtures/expression-complex/invalid/comma-operator/actual.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <template> | ||
| <section> | ||
| <button onclick={(one(), two(), three(), iAmTheCount())}></button> | ||
| <button onclick="{one(), two(), three(), iAmTheCount()}"></button> | ||
| </section> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
.../template-compiler/src/__tests__/fixtures/expression-complex/invalid/comments/actual.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| <template> | ||
| <section> | ||
| <x-foo field={ | ||
| <x-foo field="{ | ||
| /* what do you think ? */ | ||
| someValue | ||
| }></x-foo> | ||
| }"></x-foo> | ||
| </section> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...te-compiler/src/__tests__/fixtures/expression-complex/invalid/delete-operator/actual.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <template> | ||
| <section> | ||
| <button onclick={() => delete baz}></button> | ||
| <button onclick="{() => delete baz}"></button> | ||
| </section> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...late-compiler/src/__tests__/fixtures/expression-complex/invalid/function-expr/actual.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| <template> | ||
| <section> | ||
| <x-child onawesomething={function Awesomeness (foo) { bar(foo); }}></x-child> | ||
| <x-child onawesomething="{function Awesomeness (foo) { bar(foo); }}"></x-child> | ||
| </section> | ||
| </template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
...sion-complex/invalid/html-decoding/experimental-complex-expressions-true-attr/actual.html
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| <template> | ||
| <!-- This should fail as html characters are not decoded in complex or non-complex expressions --> | ||
| <x-foo>{foo < bar}</x-foo> | ||
| </template> |
1 change: 1 addition & 0 deletions
1
...ression-complex/invalid/html-decoding/experimental-complex-expressions-true-attr/ast.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmsjtu - you asked about this in the PR review. I double checked and this expected output now aligns with what the legacy expression parser produces. In other words, it is now correct and it was incorrect before this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanna say hi to the future person coming here because of an investigation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the contrary! The very existence of this change means such an investigation may never occur!