Skip to content

Commit

Permalink
Merge lit-html-1.x into security (#1941)
Browse files Browse the repository at this point in the history
* Remove trusted types mention from changelog

* Adds rendering test composing parts and slots (#1077)

* Adds rendering test composing parts and slots

Tests if #1046 has been addressed in the webcomponents polyfills.

* Update @webcomponents/webcomponentsjs dev dependency to required version

* Add 1.2.0 release notes (#1104)

* Don't disturb imperatively added classes in classMap (#1112)

Fix #1111

Revert classMap to previous implementation, but don't use classList or className.

* Fix lint errors (#1116)

* Prepare 1.2.0-pre.1 release (#1117)

* Link changelog issue (#1118)

* Prepare 1.2.0 release (#1128)

* Use downlevel-dts, test compile in TS 3.4 (#1129)

* Use downlevel-dts, test compile in TS 3.4

Related to lit/lit-element#935

Haven't heard anything about this being a problem for lit-html, but better to be ahead of any issues.

* Lock typescript version at ~3.8

Prevent breakage for devs coming into the lit-html repo and doing `npm install` after a new breaking release of TypeScript

* Prepare 1.2.1 release (#1130)

* Update new task template

* Update lint dependencies (#1099)

* Update a broken link in the documentation. (#1138)

* Doc usability improvements. Fixes #1133. (#1147)

* Doc usability improvements. Fixes #1133.

* Address feedback.

* Fix typo. (#1152)

* Update issue templates

added label

* Restore trusted types (#1153)

* Revert "Revert "Add trusted types support to lit html (#970)""

This reverts commit cedf4b3.

It also refactors the trusted types tests so that they can run with native trusted types enabled.

Also revamp the trusted types tests, and run all lit-html tests with trusted types enabled on browsers that support it natively.

* Adds the correct path information to the release notes links for #1163 (#1164)

* Updating links in guide to point to correct guides

https://lit-html.polymer-project.org/guide/release-notes

* Didn't need to actually go down a level in the dir

* Update docs/guide/release-notes/1.2.0.md

Co-authored-by: Arthur Evans <arthure@google.com>

* Update docs/guide/release-notes/1.2.0.md

Co-authored-by: Arthur Evans <arthure@google.com>

* Update docs/guide/release-notes/1.2.0.md

Co-authored-by: Arthur Evans <arthure@google.com>

Co-authored-by: Arthur Evans <arthure@google.com>

* Correct copyright dates. (#1171)

* Add BLM banner (#1172)

* docs: fixed small error (#1180)

Since this is just a typo fix in the README, I'm going to go ahead and merge it.

* Fix api doc (#1178)

* Fixes #1177.

* Fix links.

* Remove unneeded typedoc tags.

* Redirect old API URLs.

* Update firefox and edge logo (#1161)

Co-authored-by: Arthur Evans <arthure@google.com>

* Update dev server recommendations (#1059)

* Update dev server recommendations

Came here to fix a broken link, got more than I bargained for. Other recommendations (like linting and IDE plugins) may need updating as well.

* Address comments.

* Fix typos, add notes on attribute prefixes. (#933)

* Fix typos, add notes on attribute prefixes.

* More detail on strings param

* Run format.

* Make IDE plugins links, change recommendation (#956)

* Make IDE plugins links, change recommendation

I think we should recommend runem.lit-plugin because it supports type checking of template bindings, and it seems to be robust (I ran it across all of google3 and there were only a small number of issues, which I'm sending out PRs for)

* Address feedback, update linting suggestion.

* Address more feedback.

Co-authored-by: Arthur Evans <arthure@google.com>

* Bump lodash from 4.17.15 to 4.17.19 in /docs (#1183)

Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.19.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.15...4.17.19)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Arthur Evans <arthure@google.com>

* Set type in package.json to "module" (#1146)

This would let Node >=13 to load lit-html as ES modules without any other bundling tools.

Move check-version-tracker file extension to .cjs to continue loading it as cjs.

* Fix trusted types tests. (#1193)

* Fix trusted types tests.

Also fix support for trusted types in the unsafeSVG directive.

Have to handle IE separately in unsafe-svg because apparently the svgElement.innerHTML setter is a no op in IE :/

* chore(shady-render): export shadyTemplateFactory (#1135)

* Update changelog for 1.3.0

* Prepare 1.3.0-pre.1 release

* Add 1.3.0 release notes (#1202)

* Prep 1.3.0 release

* Update package lock

* Remove ts3.4 typings before generating

* Update Tachometer

* Add chromedriver as a devDependency

* Fix flaky async-append test

* Update build docs (#1201)

* Revised build docs WIP.

* Update build docs. Fixes #1148.

* Address feedback.

* Address feedback, fix typos.

* Create lit-html-next-bug-report.md (#1308)

* Create lit-html-next-bug-report.md

Add issue template

* Apply suggestions from code review

* Create lit-element@next-major issue template (#1320)

* Create lit-element-next-bug-report.md

* Apply suggestions from code review

* Fix issue template formatting

* Fix styleMap example (#1433)

Example function has a body, hence it doesn't have an implicit return value. An explicit return value is needed for the example to make sense.

* Fix typos in 03-styling-templates.md (#1511)

* Fix typos in 06-template-reference.md (#1562)

* [lit-html] add Lit 2 directive syntax to Lit 1 (#1654)

Co-authored-by: Kevin Schaaf <kschaaf@google.com>
Co-authored-by: Russell Bicknell <bicknellr@google.com>

* Small fixes to 1.3.0 release ntoes (#1719)

* Correct evasive typo (#1725)

change "current" -> "currently"

* Small tweaks to forward-compat directives (#1748)

* [lit-html] Update Twitter handle from polymer -> buildWithLit (#1779)

* Add version banner, landing page redirect. (#1786)

* [lit-html] Prepare v1.4.0 release (#1809)

* build: add lit 2 directive files for publish (#1841)

* Prepare lit-html 1.4.1 release (#1849)

* Update social media links. (#1813)

* [lit-html] Add `PropertyPart` to directives forward-compat file. (#1869)

* Add `PropertyPart` to directives forward-compat file.

* Test that `PartInfo`s provided to directives have the correct `.type`.

* Use better names in templates used to test PartInfo.

* Remove unnecessary constructor.

* format

* `lit-html-1.x`: Run tests on GitHub actions (#1967)

* Copy test workflow from main branch.

* Update test workflows to work with the lit-html-1.x branch.

* Run local tests in XVFB

* Update `actions/setup-node` and node version.

* Remove 'benchmarks.yml' reference in comments.

* Delete `.travis.yml` and `travis-bench.sh`.

* Initial attempt at porting the benchmarks to a GitHub action.

* Update tachometer.

* Copy benchmarks workflow from main branch.

* Update benchmark workflow to work with the lit-html-1.x branch.

* Fix node_modules key.

* Update to `actions/setup-node@v2`.

* Use `git+https` protocol to avoid SSH which doesn't seem to work.

* Move tachometer config to an external file.

* Fix benchmark names in report action.

* Update chromedriver.

* Update URLs and references in tachometer.json .

* Update ref in tachometer.json .

* Update badge in README.md .

* Remove `report-id` field from Tachometer reporter step.

* Upstream cl/376929825: Fix compilation issues with TypeScript 4.3. (#1940)

Co-authored-by: Justin Fagnani <justinfagnani@google.com>
Co-authored-by: Steve Orvell <sorvell@google.com>
Co-authored-by: Abraham Williams <4braham@gmail.com>
Co-authored-by: Peter Burns <rictic@google.com>
Co-authored-by: Abdón Rodríguez Davila <a@abdonrd.com>
Co-authored-by: Lukas Papay <papay.lukas@gmail.com>
Co-authored-by: Arthur Evans <arthure@google.com>
Co-authored-by: nicolejadeyee <nicolejadeyee@gmail.com>
Co-authored-by: Paul Kinlan <paul.kinlan@gmail.com>
Co-authored-by: 0xflotus <0xflotus@gmail.com>
Co-authored-by: Felix Schulze Sindern <47390169+FelixSchuSi@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: vikerman <vikerman@users.noreply.github.com>
Co-authored-by: Manuel Martín <manuel.martin@gmail.com>
Co-authored-by: tikotus <jahvenni@gmail.com>
Co-authored-by: Nicolás Font <nicolasfont@gmail.com>
Co-authored-by: Vadim Filimonov <philimonovvadim@gmail.com>
Co-authored-by: Elliott Marquez <emarquez@google.com>
Co-authored-by: Kevin Schaaf <kschaaf@google.com>
Co-authored-by: Todd Pressley <todd.pressley1@gmail.com>
Co-authored-by: Elliott Marquez <me@elliottmarquez.dev>
  • Loading branch information
22 people committed Jul 1, 2021
1 parent 52ba3d4 commit 4de580d
Show file tree
Hide file tree
Showing 19 changed files with 983 additions and 425 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/benchmarks.yml
@@ -0,0 +1,47 @@
name: Benchmarks

on: [pull_request]

jobs:
benchmarks:
name: benchmarks

# We can't currently run benchmarks on PRs from forked repos, because the
# tachometer action reports results by posting a comment, and we can't post
# comments without a github token.
if: github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 14

- name: Restore node_modules
id: cache
uses: actions/cache@v2
with:
path: node_modules
# Bump the number after `lit-1.x-node-modules` to force a cache
# update. Note there are multiple cache actions in `tests.yml` that
# should all keep keys in sync.
key: lit-1.x-node-modules-0-${{ runner.os }}-${{ hashFiles('package-lock.json') }}

- name: NPM install
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci

- name: Build
run: npm run build

- name: Benchmark
run: npx tach --config tachometer.json --json-file results.json

- name: Report
uses: andrewiggins/tachometer-reporter-action@v2
with:
path: results.json
pr-bench-name: this-change
base-bench-name: lit-html-1.x
90 changes: 90 additions & 0 deletions .github/workflows/tests.yml
@@ -0,0 +1,90 @@
name: Tests

on: [push, pull_request]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 14

- run: npm ci

- run: >-
npm run format && git diff --exit-code || (echo -e '\n\033[31mERROR:\033[0m
Project is not formatted. Please run "npm run format".' && false)
tests-local:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 14

- name: Restore node_modules
id: cache
uses: actions/cache@v2
with:
path: node_modules
# Bump the number after `lit-1.x-node-modules` to force a cache
# update. Note there are cache actions in other jobs in this file that
# should all keep keys in sync.
key: lit-1.x-node-modules-0-${{ runner.os }}-${{ hashFiles('package-lock.json') }}

- name: NPM install
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci

- name: Install XVFB
run: sudo apt-get install xvfb

- name: Build
run: npm run build

- name: Test
run: xvfb-run npx wct --npm

tests-sauce:
# We can't run Sauce tests on PRs from forked repos, since they don't have
# access to secrets.
if: github.event.pull_request == null || github.event.pull_request.head.repo.full_name == github.repository

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v2
with:
node-version: 14

- name: Restore node_modules
id: cache
uses: actions/cache@v2
with:
path: node_modules
# Bump the number after `lit-1.x-node-modules` to force a cache
# update. Note there are cache actions in other jobs in this file that
# should all keep keys in sync.
key: lit-1.x-node-modules-0-${{ runner.os }}-${{ hashFiles('package-lock.json') }}

- name: NPM install
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci

- name: Build
run: npm run build

- name: Test
env:
SAUCE_USERNAME: ${{ secrets.SAUCE_USERNAME }}
SAUCE_ACCESS_KEY: ${{ secrets.SAUCE_ACCESS_KEY }}
run: npx wct -s 'windows 10/microsoftedge@17' -s 'windows 10/microsoftedge@15' -s 'macos 10.13/safari@11' -s 'macos 10.12/safari@10' -s 'windows 8.1/internet explorer@11' -s 'Linux/chrome@41' --npm
35 changes: 0 additions & 35 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions CHANGELOG.md
Expand Up @@ -23,6 +23,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
<!-- ### Fixed -->
<!-- ### Removed -->

## [1.4.1] - 2021-05-05

### Fixed

* Added `directive.js`, `async-directive.js`, and `directive-helpers.js` to package.json files so they are actually published to npm! ([#1841](https://github.com/Polymer/lit-html/pull/1841))

## [1.4.0] - 2021-04-26

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
@@ -1,7 +1,7 @@
# lit-html
Efficient, Expressive, Extensible HTML templates in JavaScript

[![Build Status](https://travis-ci.org/lit/lit.svg?branch=lit-html-1.4.x)](https://travis-ci.org/Polymer/lit-html)
[![Build Status](https://github.com/lit/lit/actions/workflows/tests.yml/badge.svg?branch=lit-html-1.x)](https://github.com/lit/lit/actions/workflows/tests.yml?query=branch%3Alit-html-1.x)
[![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://lit.dev/slack-invite/)
[![Mentioned in Awesome Lit](https://awesome.re/mentioned-badge.svg)](https://github.com/web-padawan/awesome-lit)
Expand Down
2 changes: 1 addition & 1 deletion docs/.eleventy.js
Expand Up @@ -24,7 +24,7 @@ module.exports = function (eleventyConfig) {
eleventyConfig.addPassthroughCopy('app.yaml');
eleventyConfig.addPassthroughCopy('main.py');

const md = markdownIt({ html: true, breaks: true, linkify: true })
const md = markdownIt({ html: true, breaks: false, linkify: true })
.use(markdownItAttrs)
.use(markdownItAnchor, { slugify, permalink: false });
eleventyConfig.setLibrary('md', md);
Expand Down
8 changes: 3 additions & 5 deletions docs/_includes/default.html
Expand Up @@ -24,14 +24,12 @@
<footer>
<div class="wrapper">
<div class="social-links">
<a target="_blank" href="https://github.com/Polymer/lit-html" rel="noopener" aria-label="Github"><img src="/images/logos/logo_github.svg"></a>
<a target="_blank" href="https://github.com/lit/lit" rel="noopener" aria-label="Github"><img src="/images/logos/logo_github.svg"></a>
<a target="_blank" href="https://twitter.com/buildWithLit" rel="noopener" aria-label="Twitter"><img src="/images/logos/logo_twitter.svg"></a>
<a target="_blank" href="https://groups.google.com/forum/#!forum/polymer-dev" rel="noopener" aria-label="Email"><img src="/images/logos/logo_email.svg"></a>
<a target="_blank" href="https://www.polymer-project.org/slack-invite" rel="noopener" aria-label="Slack"><img src="/images/logos/logo_slack.svg"></a>
<a target="_blank" href="https://lit.dev/slack-invite/" rel="noopener" aria-label="Slack"><img src="/images/logos/logo_slack.svg" alt="Lit & Friends Slack workspace"/></a> </div>
</div>
<div class="attribution">
Brought to you by <a href="https://www.polymer-project.org">The Polymer Project</a>.<br>
Copyright 2017–{{ "now" | date:"%Y" }} The Polymer Project Authors. Code licensed under the
Copyright 2017–{{ "now" | date:"%Y" }} The Polymer Authors. Code licensed under the
<a target="_blank" href="http://polymer.github.io/LICENSE.txt">BSD License</a>.
Documentation licensed under CC BY 3.0.
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/_includes/topnav.html
Expand Up @@ -3,7 +3,7 @@
<div class="flex"></div>
<a class="nav-item{% if page.url contains '/guide' %} active{% endif %}" href="{{ site.baseurl }}/guide">Guide</a>
<a class="nav-item" href="{{ site.baseurl }}/api/index.html">API</a>
<a class="icon" href="https://github.com/polymer/lit-html" title="GitHub">
<a class="icon" href="https://github.com/lit/lit" title="GitHub">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentcolor">
<path d="M12,2C6.48,2,2,6.59,2,12.25c0,4.53,2.87,8.37,6.84,9.73c0.5,0.09,0.68-0.22,0.68-0.49c0-0.24-0.01-0.89-0.01-1.74c-2.78,0.62-3.37-1.37-3.37-1.37c-0.45-1.18-1.11-1.5-1.11-1.5c-0.91-0.64,0.07-0.62,0.07-0.62c1,0.07,1.53,1.06,1.53,1.06c0.89,1.57,2.34,1.11,2.91,0.85c0.09-0.66,0.35-1.11,0.63-1.37c-2.22-0.26-4.56-1.14-4.56-5.07c0-1.12,0.39-2.03,1.03-2.75c-0.1-0.26-0.45-1.3,0.1-2.71c0,0,0.84-0.28,2.75,1.05c0.8-0.23,1.65-0.34,2.5-0.34c0.85,0,1.7,0.12,2.5,0.34c1.91-1.33,2.75-1.05,2.75-1.05c0.55,1.41,0.2,2.45,0.1,2.71c0.64,0.72,1.03,1.63,1.03,2.75c0,3.94-2.34,4.81-4.57,5.06c0.36,0.32,0.68,0.94,0.68,1.9c0,1.37-0.01,2.48-0.01,2.81c0,0.27,0.18,0.59,0.69,0.49c3.97-1.36,6.83-5.2,6.83-9.73C22,6.59,17.52,2,12,2"/>
</svg>
Expand Down
4 changes: 2 additions & 2 deletions docs/_includes/version-banner.html
Expand Up @@ -2,6 +2,6 @@
<img src="/images/flame.svg">
<p>
lit-html is now part of the Lit library–see the new site at <a href="https://lit.dev">lit.dev</a>.
This site documents lit-html 1.0, no longer the current version.
This site documents lit-html 1.0, not the latest version.
</p>
</div>
</div>
20 changes: 8 additions & 12 deletions docs/guide/09-community.md
Expand Up @@ -3,25 +3,21 @@ title: Community
slug: community
---

There are many great resources and locations to learn about lit-html and LitElement,
share what you've built, and more. All community participation is subject to the Polymer Project's
<a href="https://github.com/Polymer/project/blob/master/Code_of_Conduct.md">Code of Conduct</a>—be
There are many great resources and locations to learn about Lit,
share what you've built, and more. All community participation is subject to the Lit
<a href="https://github.com/lit/lit/blob/main/CODE_OF_CONDUCT.md">Code of Conduct</a>—be
excellent to each other!

* <strong>Join us on <a href="https://www.polymer-project.org/slack-invite">Slack</a>!</strong> The
Polymer Project Slack workspace has thousands of users discussing lit-html, LitElement, and related topics.
* <strong>Join us on <a href="https://lit.dev/slack-invite/">Slack</a>!</strong> The
Lit & Friends Slack workspace has thousands of users discussing lit-html, LitElement, and related topics.
Check out <code>#general</code>, <code>#beginners</code>, or
<code>#tools</code> to get started.
<code>#tools</code> to get started.

* Follow us on <a href="https://twitter.com/buildWithLit">Twitter</a>
for the latest on web components and the Polymer Project. Many
of our team members can be found tweeting about lit-html, LitElement,
for the latest on Lit and web components. Many
of our team members can be found tweeting about Lit,
and the latest developments in the web platform.

* The <a href="https://groups.google.com/forum/?fromgroups=#!forum/polymer-dev">polymer-dev</a>
mailing list is great for long-form questions and discussion on any of the libraries, polyfills, or
standards the the Polymer Project works on.

* On <a href="https://stackoverflow.com/tags/lit-html">StackOverflow</a> use
the <code><a href="https://stackoverflow.com/tags/lit-html">lit-html</a></code> or <code><a href="https://stackoverflow.com/tags/lit-element">lit-element</a></code> tags when
looking for answers. You can also find help on underlying web standards like
Expand Down

0 comments on commit 4de580d

Please sign in to comment.