From b3cee4267e705454e285c71964a6878f2ea02f09 Mon Sep 17 00:00:00 2001 From: Thomas Allmer Date: Mon, 31 May 2021 13:20:15 +0200 Subject: [PATCH] chore: improve lit 2 release info and only release if needed --- .changeset/big-hotels-exercise.md | 2 +- .changeset/fuzzy-snails-attack.md | 47 ++++++++++++++++++++++++++++--- 2 files changed, 44 insertions(+), 5 deletions(-) diff --git a/.changeset/big-hotels-exercise.md b/.changeset/big-hotels-exercise.md index 282404e20..92a9c6d4f 100644 --- a/.changeset/big-hotels-exercise.md +++ b/.changeset/big-hotels-exercise.md @@ -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 diff --git a/.changeset/fuzzy-snails-attack.md b/.changeset/fuzzy-snails-attack.md index dcfb37af2..43900830e 100644 --- a/.changeset/fuzzy-snails-attack.md +++ b/.changeset/fuzzy-snails-attack.md @@ -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` click me `; + } +} +``` + +```html + + + #shadow-root + click me + + + + + #shadow-root + click me + +```