-
Notifications
You must be signed in to change notification settings - Fork 439
Api version limit for complex template expressions #5520
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
13 commits
Select commit
Hold shift + click to select a range
bd8aca0
feat: added ability to toggle experimentalComplexExpressions in ssr f…
jhefferman-sfdc 9035b03
chore: disable
jhefferman-sfdc eb7a327
feat: ssr cte support
jhefferman-sfdc d496ca5
Merge branch 'master' into jhefferman/cte-ssr
jhefferman-sfdc 59e2002
fix: ssr coverage
jhefferman-sfdc db07237
chore: revert test change
jhefferman-sfdc 3b9d43a
fix: additional testing around ssr specific codepaths
jhefferman-sfdc aaffccf
fix: additional testing around ssr specific codepaths
jhefferman-sfdc a8b5f88
feat: api specific errors, tests
jhefferman-sfdc a130ead
fix: merge master
jhefferman-sfdc 411b599
fix: bundlesize
jhefferman-sfdc 70e8971
fix: retain original switch logic
jhefferman-sfdc c0cb49d
fix: review comments
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
Some comments aren't visible on the classic Files Changed page.
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
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
5 changes: 5 additions & 0 deletions
5
..._/fixtures/expression-complex/invalid/invalid-api-version-call-expr-attribute/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,5 @@ | ||
| <template> | ||
| <section> | ||
| <x-child foo="{foo()}"></x-child> | ||
| </section> | ||
| </template> |
1 change: 1 addition & 0 deletions
1
...ts__/fixtures/expression-complex/invalid/invalid-api-version-call-expr-attribute/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 @@ | ||
| {} |
4 changes: 4 additions & 0 deletions
4
..._/fixtures/expression-complex/invalid/invalid-api-version-call-expr-attribute/config.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,4 @@ | ||
| { | ||
| "experimentalComplexExpressions": true, | ||
| "apiVersion": 59 | ||
| } |
Empty file.
15 changes: 15 additions & 0 deletions
15
...fixtures/expression-complex/invalid/invalid-api-version-call-expr-attribute/metadata.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,15 @@ | ||
| { | ||
| "warnings": [ | ||
| { | ||
| "code": 1210, | ||
| "message": "Invalid expression {foo()} - LWC1210: Template expression doesn't allow CallExpression. The current component API version (59) is insufficient and must be increased to at least 66 for this type of expression.", | ||
| "level": 1, | ||
| "location": { | ||
| "line": 3, | ||
| "column": 18, | ||
| "start": 42, | ||
| "length": 13 | ||
| } | ||
| } | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
..._/fixtures/expression-complex/invalid/invalid-api-version-call-expr-text-node/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,5 @@ | ||
| <template> | ||
| <section> | ||
| <x-child>{foo()}</x-child> | ||
| </section> | ||
| </template> |
1 change: 1 addition & 0 deletions
1
...ts__/fixtures/expression-complex/invalid/invalid-api-version-call-expr-text-node/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 @@ | ||
| {} |
4 changes: 4 additions & 0 deletions
4
..._/fixtures/expression-complex/invalid/invalid-api-version-call-expr-text-node/config.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,4 @@ | ||
| { | ||
| "experimentalComplexExpressions": true, | ||
| "apiVersion": 59 | ||
| } |
Empty file.
15 changes: 15 additions & 0 deletions
15
...fixtures/expression-complex/invalid/invalid-api-version-call-expr-text-node/metadata.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,15 @@ | ||
| { | ||
| "warnings": [ | ||
| { | ||
| "code": 1210, | ||
| "message": "Invalid expression {foo()} - LWC1210: Template expression doesn't allow CallExpression. The current component API version (59) is insufficient and must be increased to at least 66 for this type of expression.", | ||
| "level": 1, | ||
| "location": { | ||
| "line": 3, | ||
| "column": 18, | ||
| "start": 42, | ||
| "length": 7 | ||
| } | ||
| } | ||
| ] | ||
| } |
5 changes: 5 additions & 0 deletions
5
...xtures/expression-complex/invalid/invalid-api-version-computed-prop-attribute/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,5 @@ | ||
| <template> | ||
| <section> | ||
| <p class="{classNames[0]}"></p> | ||
| </section> | ||
| </template> |
1 change: 1 addition & 0 deletions
1
.../fixtures/expression-complex/invalid/invalid-api-version-computed-prop-attribute/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 @@ | ||
| {} |
4 changes: 4 additions & 0 deletions
4
...xtures/expression-complex/invalid/invalid-api-version-computed-prop-attribute/config.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,4 @@ | ||
| { | ||
| "experimentalComplexExpressions": true, | ||
| "apiVersion": 59 | ||
| } |
Empty file.
15 changes: 15 additions & 0 deletions
15
...ures/expression-complex/invalid/invalid-api-version-computed-prop-attribute/metadata.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,15 @@ | ||
| { | ||
| "warnings": [ | ||
| { | ||
| "code": 1209, | ||
| "message": "Invalid expression {classNames[0]} - LWC1209: Template expression doesn't allow computed property access. The current component API version (59) is insufficient and must be increased to at least 66 for this type of expression.", | ||
| "level": 1, | ||
| "location": { | ||
| "line": 3, | ||
| "column": 12, | ||
| "start": 36, | ||
| "length": 23 | ||
| } | ||
| } | ||
| ] | ||
| } |
3 changes: 3 additions & 0 deletions
3
...__/fixtures/expression-complex/invalid/invalid-api-version-computed-prop-node/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,3 @@ | ||
| <template> | ||
| {val[state.foo]} | ||
| </template> |
1 change: 1 addition & 0 deletions
1
...sts__/fixtures/expression-complex/invalid/invalid-api-version-computed-prop-node/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 @@ | ||
| {} |
4 changes: 4 additions & 0 deletions
4
...__/fixtures/expression-complex/invalid/invalid-api-version-computed-prop-node/config.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,4 @@ | ||
| { | ||
| "experimentalComplexExpressions": true, | ||
| "apiVersion": 59 | ||
| } |
Empty file.
15 changes: 15 additions & 0 deletions
15
.../fixtures/expression-complex/invalid/invalid-api-version-computed-prop-node/metadata.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,15 @@ | ||
| { | ||
| "warnings": [ | ||
| { | ||
| "code": 1209, | ||
| "message": "Invalid expression {val[state.foo]} - LWC1209: Template expression doesn't allow computed property access. The current component API version (59) is insufficient and must be increased to at least 66 for this type of expression.", | ||
| "level": 1, | ||
| "location": { | ||
| "line": 1, | ||
| "column": 11, | ||
| "start": 10, | ||
| "length": 22 | ||
| } | ||
| } | ||
| ] | ||
| } |
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
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.
Is it not already a number? 🤔
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.
It can be undefined (goes to NaN)