lit-element icon indicating copy to clipboard operation
lit-element copied to clipboard

Forward Compatibility With Lit 2 misleading

Open FelixSchuSi opened this issue 2 years ago • 2 comments

The readme states that you can import decorators in lit-element v2.5.1 the same way as in lit v.2.0.0:

Forward Compatibility With Lit 2

Lit 2 (LitElement 3.0) has a few breaking changes and deprecations that have been back-ported to LitElement 2.5 in order to ease upgrading. To prepare for Lit 2, update these APIs:

LitElement 2.4 LitElement 2.5/Lit 2
Decorator imports:
import {customElement} from 'lit-element';
import {customElement} from 'lit-element/decorators.js';
... ...

However importing decorators with lit-element v2.5.1 only works using: import {customElement} from 'lit-element'; or import {customElement} from 'lit-element/src/decorators.js';

FelixSchuSi avatar Nov 03 '21 10:11 FelixSchuSi

Oops, good catch. I wonder if it's worth adding lit-element/decorators.js to a 2.5.2 release at this point.

justinfagnani avatar Nov 18 '21 20:11 justinfagnani

This was fixed in https://github.com/lit/lit-element/pull/1171, but that change failed to add decorators.js to package.json's files, so it was not published in 2.5.1.

kevinpschaaf avatar Sep 08 '22 22:09 kevinpschaaf