UNPKG

14.2 kBMarkdownView Raw
1# Change Log
2
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a Changelog](http://keepachangelog.com/)
6and this project adheres to [Semantic Versioning](http://semver.org/).
7
8<!--
9 PRs should document their user-visible changes (if any) in the
10 Unreleased section, uncommenting the header as necessary.
11-->
12
13<!-- ## [x.y.z] - YYYY-MM-DD -->
14<!-- ## Unreleased -->
15<!-- ### Changed -->
16<!-- ### Added -->
17<!-- ### Removed -->
18<!-- ### Fixed -->
19
20## [2.3.1] - 2020-03-19
21
22### Fixed
23* Add TypeScript type declarations for older versions of TypeScript. We're currently testing back to TS 3.4. We can't commit to never breaking TypeScript builds, but we'll be supporting older versions as best we can.
24
25## [2.3.0] - 2020-03-18
26
27### Changed
28* Added a static `getPropertyDescriptor` method to allow easier customization of property accessors. This method should return a a `PropertyDescriptor` to install on the property. If no descriptor is returned, no property accessor is created. ([#911](https://github.com/Polymer/lit-element/issues/911))
29* The value returned by `render` is always rendered, even if it isn't a `TemplateResult`. ([#712](https://github.com/Polymer/lit-element/issues/712))
30
31### Added
32* Added `@queryAsync(selector)` decorator which returns a Promise that resolves to the result of querying for the given selector after the element's `updateComplete` Promise resolves ([#903](https://github.com/Polymer/lit-element/issues/903)).
33* Added `enableUpdating()` to `UpdatingElement` to enable customizing when updating is enabled [#860](https://github.com/Polymer/lit-element/pull/860).
34* Added `@queryAssignedNodes(slotName, flatten)` decorator to enable querying assignedNodes for a given slot [#860](https://github.com/Polymer/lit-element/pull/860).
35* Added `getStyles()` to `LitElement` to allow hooks into style gathering for component sets [#866](https://github.com/Polymer/lit-element/pull/866).
36
37### Fixed
38* Ensure `UpdatingElement` allows updates when properties are set after calling `super.update()`.
39`LitElement` renders when updates are triggered as a result of rendering ([#549](https://github.com/Polymer/lit-element/issues/549)).
40* Properties annotated with the `eventOptions` decorator will now survive property renaming optimizations when used with tsickle and Closure JS Compiler.
41* Moved style gathering from `finalize` to `initialize` to be more lazy, and create stylesheets on the first instance initializing [#866](https://github.com/Polymer/lit-element/pull/866).
42* Fixed behavior change for components that do not implement `render()` introduced in ([#712](https://github.com/Polymer/lit-element/pull/712)) ([#917](https://github.com/Polymer/lit-element/pull/917))
43
44## [2.2.1] - 2019-07-23
45### Changed
46* Elements should now override the new `_getUpdateComplete` method instead of the `updateComplete` getter, for compatibility with TypeScript ES5 output, which does not support calling a superclass getter (e.g.`super.updateComplete.then(...)`) due to [TypeScript#338](https://github.com/microsoft/TypeScript/issues/338).
47### Fixed
48* Fixed compatibility with Closure JS Compiler optimizations relating to static properties ([#732](https://github.com/Polymer/lit-element/issues/732)).
49
50## [2.2.0] - 2019-06-11
51### Added
52* css tagged template literals now allow numbers to be used in expressions ([#488](https://github.com/Polymer/lit-element/issues/488)).
53
54## [2.1.0] - 2019-03-21
55### Changed
56* `LitElement.renderRoot` is now `public readonly` instead of `protected`.
57
58### Fixed
59* Exceptions generated during update/render do not block subsequent updates ([#262](https://github.com/Polymer/lit-element/issues/262)).
60* Initial update is scheduled at construction time rather than connected time ([#594](https://github.com/Polymer/lit-element/issues/594)).
61* A reflecting property set immediately after a corresponding attribute
62now reflects properly ([#592](https://github.com/Polymer/lit-element/issues/592)).
63* Properties annotated with the `@query` and `@queryAll` decorators will now
64 survive property renaming optimizations when used with tsickle and Closure JS
65 Compiler.
66
67## [2.0.1] - 2019-02-05
68### Fixed
69* Use `lit-html` 1.0 ([#543](https://github.com/Polymer/lit-element/pull/543)).
70
71## [2.0.0] - 2019-02-05
72### Added
73* Add `toString()` function to `CSSResult` ([#508](https://github.com/Polymer/lit-element/pull/508))
74* Add a global version to `window` ([#536](https://github.com/Polymer/lit-element/pull/536))
75
76### Changed
77* [Breaking] Renamed `unsafeCss` to `unsafeCSS` for consistency with lit-html's `unsafeHTML` ([#524](https://github.com/Polymer/lit-element/pull/524))
78* Remove all uses of `any` outside of tests ([#457](https://github.com/Polymer/lit-element/pull/457))
79
80### Fixed
81* A bunch of docs fixes ([#464](https://github.com/Polymer/lit-element/pull/464)), ([#458](https://github.com/Polymer/lit-element/pull/458)), ([#493](https://github.com/Polymer/lit-element/pull/493)), ([#504](https://github.com/Polymer/lit-element/pull/504)), ([#505](https://github.com/Polymer/lit-element/pull/505)), ([#501](https://github.com/Polymer/lit-element/pull/501)), ([#494](https://github.com/Polymer/lit-element/pull/494)), ([#491](https://github.com/Polymer/lit-element/pull/491)), ([#509](https://github.com/Polymer/lit-element/pull/509)), ([#513](https://github.com/Polymer/lit-element/pull/513)), ([#515](https://github.com/Polymer/lit-element/pull/515)), ([#512](https://github.com/Polymer/lit-element/pull/512)), ([#503](https://github.com/Polymer/lit-element/pull/503)), ([#460](https://github.com/Polymer/lit-element/pull/460)), ([#413](https://github.com/Polymer/lit-element/pull/413)), ([#426](https://github.com/Polymer/lit-element/pull/426)), ([#516](https://github.com/Polymer/lit-element/pull/516)), ([#537](https://github.com/Polymer/lit-element/pull/537)), ([#535](https://github.com/Polymer/lit-element/pull/535)), ([#539](https://github.com/Polymer/lit-element/pull/539)), ([#540](https://github.com/Polymer/lit-element/pull/540))
82* Build on checkout ([#423](https://github.com/Polymer/lit-element/pull/423))
83
84### Fixed
85* Adds a check to ensure `CSSStyleSheet` is constructable ([#527](https://github.com/Polymer/lit-element/pull/527)).
86
87## [2.0.0-rc.5] - 2019-01-24
88### Fixed
89* Fixed a bug causing duplicate styles when an array was returned from `static get styles` ([#480](https://github.com/Polymer/lit-element/issues/480)).
90
91## [2.0.0-rc.4] - 2019-01-24
92### Added
93* [Maintenance] Added script to publish dev releases automatically ([#476](https://github.com/Polymer/lit-element/pull/476)).
94* Adds `unsafeCss` for composing "unsafe" values into `css`. Note, `CSSResult` is no longer constructable. ([#451](https://github.com/Polymer/lit-element/issues/451) and [#471](https://github.com/Polymer/lit-element/issues/471)).
95
96### Fixed
97* Fixed a bug where we broke compatibility with closure compiler's property renaming optimizations. JSCompiler_renameProperty can't be a module export ([#465](https://github.com/Polymer/lit-element/pull/465)).
98* Fixed an issue with inheriting from `styles` property when extending a superclass that is never instanced. ([#470](https://github.com/Polymer/lit-element/pull/470)).
99* Fixed an issue with Closure Compiler and ([#470](https://github.com/Polymer/lit-element/pull/470)) ([#476](https://github.com/Polymer/lit-element/pull/476)).
100
101## [2.0.0-rc.3] - 2019-01-18
102### Fixed
103* README: Fixed jsfiddle reference ([#435](https://github.com/Polymer/lit-element/pull/435)).
104* Compile with Closure Compiler cleanly ([#436](https://github.com/Polymer/lit-element/pull/436)).
105* Opt `@property` decorators out of Closure Compiler renaming ([#448](https://github.com/Polymer/lit-element/pull/448)).
106
107### Changed
108* [Breaking] Property accessors are no longer wrapped when they already exist. Instead the `noAccessor` flag should be set when a user-defined accessor exists on the prototype (and in this case, user-defined accessors must call `requestUpdate` themselves). ([#454](https://github.com/Polymer/lit-element/pull/454)).
109* Class fields can now be used to define styles, e.g. `static styles = css` and `styles` correctly compose when elements are extended ([#456](https://github.com/Polymer/lit-element/pull/456)).
110* Styles returned via `static styles` are automatically flattend ([#437](https://github.com/Polymer/lit-element/pull/437)).
111* Replace use of for/of loops over Maps with forEach ([#455](https://github.com/Polymer/lit-element/pull/455))
112
113## [2.0.0-rc.2] - 2019-01-11
114### Fixed
115* Fix references to `@polymer/lit-element` in README and docs ([#427](https://github.com/Polymer/lit-element/pull/427)).
116* Fix decorator types causing compiler errors for TypeScript users. ([#431](https://github.com/Polymer/lit-element/pull/431)).
117
118## [2.0.0-rc.1] - 2019-01-10
119### Changed
120* [Breaking] Changed NPM package name to `lit-element`
121
122## [0.7.0] - 2019-01-10
123### Added
124* Updated decorator implementations to support TC39 decorator API proposal (supported by Babel 7.1+) in addition to the legacy decorator API (supported by older Babel and TypeScript) ([#156](https://github.com/Polymer/lit-element/issues/156)).
125* Added `static get styles()` to allow defining element styling separate from `render` method.
126This takes advantage of [`adoptedStyleSheets`](https://wicg.github.io/construct-stylesheets/#using-constructed-stylesheets) when possible ([#391](https://github.com/Polymer/lit-element/issues/391)).
127* Added the `performUpdate` method to allow control of update timing ([#290](https://github.com/Polymer/lit-element/issues/290)).
128* Updates deferred until first connection ([#258](https://github.com/Polymer/lit-element/issues/258)).
129* Export `TemplateResult` and `SVGTemplateResult` ([#415](https://github.com/Polymer/lit-element/pull/415)).
130### Changed
131* [Breaking] The `createRenderRoot` method has moved from `UpdatingElement` to `LitElement`. Therefore, `UpdatingElement` no longer creates a `shadowRoot` by default ([#391](https://github.com/Polymer/lit-element/issues/391)).
132* [Breaking] Changes property options to add `converter`. This option works the same as the previous `type` option except that the `converter` methods now also get `type` as the second argument. This effectively changes `type` to be a hint for the `converter`. A default `converter` is used if none is provided and it now supports `Boolean`, `String`, `Number`, `Object`, and `Array` ([#264](https://github.com/Polymer/lit-element/issues/264)).
133* [Breaking] Numbers and strings now become null if their reflected attribute is removed (https://github.com/Polymer/lit-element/issues/264)).
134* [Breaking] Previously, when an attribute changed as a result of a reflecting property changing, the property was prevented from mutating again as can happen when a custom
135`converter` is used. Now, the oppose is also true. When a property changes as a result of an attribute changing, the attribute is prevented from mutating again (https://github.com/Polymer/lit-element/issues/264))
136### Fixed
137* [Breaking] User defined accessors are now wrapped to enable better composition ([#286](https://github.com/Polymer/lit-element/issues/286))
138* Type for `eventOptions` decorator now properly includes `passive` and `once` options ([#325](https://github.com/Polymer/lit-element/issues/325))
139
140## [0.6.5] - 2018-12-13
141### Changed:
142* Use lit-html 1.0 release candidate.
143
144### Fixed
145* Types for the `property` and `customElement` decorators updated ([#288](https://github.com/Polymer/lit-element/issues/288) and [#291](https://github.com/Polymer/lit-element/issues/291)).
146* Docs updated.
147
148## [0.6.4] - 2018-11-30
149### Changed
150* Update lit-html dependency to ^0.14.0 ([#324](https://github.com/Polymer/lit-element/pull/324)).
151
152## [0.6.3] - 2018-11-08
153### Changed
154* Update lit-html dependency to ^0.13.0 ([#298](https://github.com/Polymer/lit-element/pull/298)).
155
156## [0.6.2] - 2018-10-05
157
158### Changed
159* LitElement changed to a non-abstract class to be more compatible with the JavaScript mixin pattern
160([#227](https://github.com/Polymer/lit-element/issues/227)).
161* Update lit-html dependency to ^0.12.0 ([#244](https://github.com/Polymer/lit-element/pull/244)).
162* Passes the component's `this` reference to lit-html as the `eventContext`, allowing unbound event listener methods ([#244](https://github.com/Polymer/lit-element/pull/244)).
163### Added
164* A `disconnectedCallback()` method was added to UpdatingElement ([#213](https://github.com/Polymer/lit-element/pull/213)).
165* Added `@eventOptions()` decorator for setting event listener options on methods ([#244](https://github.com/Polymer/lit-element/pull/244)).
166
167## [0.6.1] - 2018-09-17
168
169### Fixed
170* Fixes part rendering and css custom properties issues introduced with lit-html 0.11.3 by updating to 0.11.4 (https://github.com/Polymer/lit-element/issues/202).
171
172### Removed
173* Removed custom_typings for Polymer as they are no longer needed
174(https://github.com/Polymer/lit-element/issues/186).
175
176## [0.6.0] - 2018-09-13
177
178### Added
179* Added `@query()`, `@queryAll()`, and `@customElement` decorators ([#159](https://github.com/Polymer/lit-element/pull/159))
180
181### Changed
182* Significantly changed update/render lifecycle and property API. Render lifecycle
183is now `requestUpdate`, `shouldUpdate`, `update`, `render`, `firstUpdated`
184(first time only), `updated`, `updateComplete`. Property options are now
185`{attribute, reflect, type, hasChanged}`. Properties may be defined in a
186`static get properties` or using the `@property` decorator.
187(https://github.com/Polymer/lit-element/pull/132).
188
189
190### Removed
191* Removed render helpers `classString` and `styleString`. Similar directives
192(`classMap` and `styleMap`) have been added to lit-html and should be used instead
193(https://github.com/Polymer/lit-element/pull/165 and
194https://github.com/Polymer/lit-html/pull/486).
195
196### Fixed
197* The `npm run checksize` command should now return the correct minified size
198(https://github.com/Polymer/lit-element/pull/153).
199* The `firstUpdated` method should now always be called the first time the element
200updates, even if `shouldUpdate` initially returned `false`
201(https://github.com/Polymer/lit-element/pull/173).