chore: improve lit 2 release info and only release if needed

This commit is contained in:
Thomas Allmer 2021-05-31 13:20:15 +02:00
parent 0ca860315b
commit b3cee4267e
2 changed files with 44 additions and 5 deletions

View file

@ -9,5 +9,5 @@ This simplified the internal logic a lot. For more details please see [package e
BREAKING CHANGES:
- we no longer support relative import paths in demos
- no need to pass on a `rootPath` or `\_\_filePath`` anymore
- no need to pass on a `rootPath` or `__filePath` anymore
- option `throwOnNonExistingPathToFiles` and `throwOnNonExistingRootPath` got removed

View file

@ -1,8 +1,5 @@
---
'babel-plugin-extend-docs': minor
'providence-analytics': minor
'publish-docs': minor
'remark-extend': minor
'@lion/accordion': minor
'@lion/button': minor
'@lion/calendar': minor
@ -37,4 +34,46 @@
'@lion/validate-messages': minor
---
**BREAKING** Upgrade to lit version 2
**BREAKING** Upgrade to [lit](https://lit.dev/) version 2
This does not change any of the public APIs of lion.
It however effects you when you have your own extension layer or your own components especially when using directives.
See the [official lit upgrade guide](https://lit.dev/docs/releases/upgrade/).
**BREAKING** Upgrade to [ScopedElements](https://open-wc.org/docs/development/scoped-elements/) version 2
This version of `@open-wc/scoped-elements` is now following the [Scoped Custom Element Registries](https://github.com/WICG/webcomponents/blob/gh-pages/proposals/Scoped-Custom-Element-Registries.md) and automatically loads a polyfill [@webcomponents/scoped-custom-element-registry](https://github.com/webcomponents/polyfills/tree/master/packages/scoped-custom-element-registry).
This means tag names are no longer being rewritten with a hash.
```js
import { css, LitElement } from 'lit';
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
import { MyButton } from './MyButton.js';
export class MyElement extends ScopedElementsMixin(LitElement) {
static get scopedElements() {
return {
'my-button': MyButton,
};
}
render() {
return html` <my-button>click me</my-button> `;
}
}
```
```html
<!-- before (ScopedElements 1.x) -->
<my-element>
#shadow-root
<my-button-23243424>click me</my-button-23243424>
</my-element>
<!-- after (ScopedElements 2.x) -->
<my-element>
#shadow-root
<my-button>click me</my-button>
</my-element>
```