-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add flag for extended scope token syntax @W-17710895 (#5211)
* chore: add flag for extended scope token syntax * test(engine-server): remove `feature` feature it's unused * chore: remove feature from types * chore(tests): remove unused exports from tests * chore: rename x/test modules to x/static * chore: use static x-test for root fixture component tag name (x-test) may not match directory name of root component * chore: remove tag name that is no longer used * refactor(test): destructure! * chore: `fixture-test` feels better than `x-test` to make it more clear it's special * refactor: check scope token for static optimized on/off * test: invalid scope tokens * test: restore `features` feature just removed it yesterday lol * test(engine-server): add scope token validation tests * chore: remove unused file * chore: remove debuggery prop * chore: update to new test config * chore: prettier * chore: rename flag make it more accurate * chore: restore original validation location * chore: clean up duplicate check * test(karma): update test to new behavior
- Loading branch information
Showing
23 changed files
with
97 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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 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 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 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
packages/@lwc/engine-server/src/__tests__/fixtures/scope-token-extended/config.json
This file contains 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 @@ | ||
{ | ||
"entry": "x/component", | ||
"features": ["DISABLE_SCOPE_TOKEN_VALIDATION"] | ||
} |
Empty file.
8 changes: 8 additions & 0 deletions
8
packages/@lwc/engine-server/src/__tests__/fixtures/scope-token-extended/expected.html
This file contains 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,8 @@ | ||
<fixture-test class="stylesheet.token-host" data-lwc-host-scope-token="stylesheet.token-host"> | ||
<style class="stylesheet.token" type="text/css"> | ||
p.stylesheet.token {font-size: 2em;} | ||
</style> | ||
<p class="stylesheet.token"> | ||
je suis une pomme de terre | ||
</p> | ||
</fixture-test> |
3 changes: 3 additions & 0 deletions
3
...ine-server/src/__tests__/fixtures/scope-token-extended/modules/x/component/component.html
This file contains 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 lwc:render-mode="light"> | ||
<p>je suis une pomme de terre</p> | ||
</template> |
7 changes: 7 additions & 0 deletions
7
...ngine-server/src/__tests__/fixtures/scope-token-extended/modules/x/component/component.js
This file contains 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,7 @@ | ||
import { LightningElement } from 'lwc'; | ||
import cmp from './component.html'; | ||
cmp.stylesheetToken = 'stylesheet.token'; | ||
|
||
export default class HelloWorld extends LightningElement { | ||
static renderMode = 'light'; | ||
} |
3 changes: 3 additions & 0 deletions
3
...rver/src/__tests__/fixtures/scope-token-extended/modules/x/component/component.scoped.css
This file contains 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 @@ | ||
p { | ||
font-size: 2em; | ||
} |
3 changes: 3 additions & 0 deletions
3
...c/engine-server/src/__tests__/fixtures/scope-token-extended/modules/x/component/tmpl.html
This file contains 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 lwc:render-mode="light"> | ||
<p>je suis une pomme de terre</p> | ||
</template> |
3 changes: 3 additions & 0 deletions
3
packages/@lwc/engine-server/src/__tests__/fixtures/scope-token/config.json
This file contains 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 @@ | ||
{ | ||
"entry": "x/component" | ||
} |
1 change: 1 addition & 0 deletions
1
packages/@lwc/engine-server/src/__tests__/fixtures/scope-token/error.txt
This file contains 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 @@ | ||
stylesheet token must be a valid string |
Empty file.
3 changes: 3 additions & 0 deletions
3
.../@lwc/engine-server/src/__tests__/fixtures/scope-token/modules/x/component/component.html
This file contains 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 lwc:render-mode="light"> | ||
<p>je suis une pomme de terre</p> | ||
</template> |
7 changes: 7 additions & 0 deletions
7
...es/@lwc/engine-server/src/__tests__/fixtures/scope-token/modules/x/component/component.js
This file contains 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,7 @@ | ||
import { LightningElement } from 'lwc'; | ||
import cmp from './component.html'; | ||
cmp.stylesheetToken = 'stylesheet.token'; | ||
|
||
export default class HelloWorld extends LightningElement { | ||
static renderMode = 'light'; | ||
} |
3 changes: 3 additions & 0 deletions
3
...engine-server/src/__tests__/fixtures/scope-token/modules/x/component/component.scoped.css
This file contains 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 @@ | ||
p { | ||
font-size: 2em; | ||
} |
3 changes: 3 additions & 0 deletions
3
packages/@lwc/engine-server/src/__tests__/fixtures/scope-token/modules/x/component/tmpl.html
This file contains 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 lwc:render-mode="light"> | ||
<p>je suis une pomme de terre</p> | ||
</template> |
This file contains 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 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 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 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 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