Socket
Socket
Sign inDemoInstall

lit-html

Package Overview
Dependencies
Maintainers
10
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lit-html - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

src/async-directive.ts

6

CHANGELOG.md

@@ -20,2 +20,8 @@ # Change Log

## [1.4.0] - 2021-04-26
### Added
* The lit-html 2.0 directive API has been added in order to enable writing libraries that work against both lit-html 1.4 and 2.0, easing upgrades. ([#1654](https://github.com/Polymer/lit-html/pull/1654)) See the [README](./README.md) for more information.
## [1.3.0] - 2020-08-19

@@ -22,0 +28,0 @@

2

lit-html.js

@@ -47,3 +47,3 @@ /**

if (typeof window !== 'undefined') {
(window['litHtmlVersions'] || (window['litHtmlVersions'] = [])).push('1.3.0');
(window['litHtmlVersions'] || (window['litHtmlVersions'] = [])).push('1.4.0');
}

@@ -50,0 +50,0 @@ /**

{
"name": "lit-html",
"version": "1.3.0",
"version": "1.4.0",
"description": "HTML template literals in JavaScript",

@@ -47,3 +47,2 @@ "license": "BSD-3-Clause",

"author": "The Polymer Authors",
"dependencies": {},
"devDependencies": {

@@ -50,0 +49,0 @@ "@types/chai": "^4.1.0",

# lit-html
Efficient, Expressive, Extensible HTML templates in JavaScript
[![Build Status](https://travis-ci.org/Polymer/lit-html.svg?branch=master)](https://travis-ci.org/Polymer/lit-html)
[![Build Status](https://travis-ci.org/lit/lit.svg?branch=lit-html-1.4.x)](https://travis-ci.org/Polymer/lit-html)
[![Published on npm](https://img.shields.io/npm/v/lit-html.svg)](https://www.npmjs.com/package/lit-html)
[![Join our Slack](https://img.shields.io/badge/slack-join%20chat-4a154b.svg)](https://www.polymer-project.org/slack-invite)
[![Mentioned in Awesome lit-html](https://awesome.re/mentioned-badge.svg)](https://github.com/web-padawan/awesome-lit-html)
[![Join our Slack](https://img.shields.io/badge/slack-join%20chat-4a154b.svg)](https://lit.dev/slack-invite/)
[![Mentioned in Awesome Lit](https://awesome.re/mentioned-badge.svg)](https://github.com/web-padawan/awesome-lit)

@@ -45,4 +45,31 @@ ## Documentation

## Forward compatibility with lit-html 2.0
lit-html 2.0 has a new directive authoring API that has been back-ported to lit-html 1.4 in order to ease upgrading.
The lit-html 2.0 directive API is available in new modules whose paths are the same in lit-html 1.4 and 2.0, allowing code to import and use the APIs against either version.
You can import the new APIs like so:
```ts
import {html} from 'lit-html';
import {directive, Directive, Part, PartInfo, PartType} from 'lit-html/directive.js';
```
Then implement a directive class and convert it to a directive function:
```ts
class MyDirective extends Directive {
// ...
}
/** My directive docs **/
export const myDirective = directive(MyDirective);
```
**Important note:** The `AsyncDirective` base class is available, but lit-html 1.4 does _not_ implement the `disconnected` and `reconnected` callbacks.
For more details on upgrading see the [Update custom directive implementations](https://lit.dev/docs/releases/upgrade/#update-custom-directive-implementations) guide.
## Contributing
Please see [CONTRIBUTING.md](./CONTRIBUTING.md).

@@ -59,3 +59,3 @@ /**

if (typeof window !== 'undefined') {
(window['litHtmlVersions'] || (window['litHtmlVersions'] = [])).push('1.3.0');
(window['litHtmlVersions'] || (window['litHtmlVersions'] = [])).push('1.4.0');
}

@@ -62,0 +62,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc