salesforce / lwc-test

LWC plugins and utilities for testing
MIT License
46 stars 31 forks source link

fix(serializer): replace LWC scope tokens (BREAKING CHANGE) #185

Closed nolanlawson closed 1 year ago

nolanlawson commented 1 year ago

New version of #184

In serialized HTML, all scope tokens are replaced with __lwc_scope_token__. This is a breaking change because it breaks all existing snapshots, and because we now require the LWC peerDependency of 2.48+.

nolanlawson commented 1 year ago

I like it! Let's do lwc:scope-token

nolanlawson commented 1 year ago

Ah, unfortunately I just realized we can't do lwc:scope-token because the colon messes up the classes in the serialized CSS. This is invalid CSS.

Screenshot 2023-06-07 at 1 23 09 PM

nolanlawson commented 1 year ago

On second thought, how about lwc-xxxxxx? Since the new format we're going to use is lwc-<hash>, maybe it's a little less distracting of a name.

ekashida commented 1 year ago

I don't have a strong opinion but I'm leaning towards the previous version because it's self-descriptive.

nolanlawson commented 1 year ago

Sounds good, let's stick with the first one then!