Import upstream changes (99cd7571ad8c17ca7edc4398d57c8b03fcb272a7)

This commit is contained in:
Lit Robot
2022-03-04 22:59:12 +00:00
parent 9b52767bf6
commit 540e2eb289
10 changed files with 30824 additions and 30822 deletions

View File

@@ -3,3 +3,4 @@ docs/*
docs-src/*
rollup-config.js
custom-elements.json
web-dev-server.config.js

View File

@@ -40,8 +40,8 @@
"files": [
"*_test.ts",
"**/custom_typings/*.ts",
"packages/lit-ssr/src/test/integration/tests/**",
"packages/lit-ssr/src/lib/util/parse5-utils.ts"
"packages/labs/ssr/src/test/integration/tests/**",
"packages/labs/ssr/src/lib/util/parse5-utils.ts"
],
"rules": {
"@typescript-eslint/no-explicit-any": "off"

View File

@@ -1,5 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: File Issue
url: https://github.com/lit/lit/issues/new/choose
about: Please file new issues in the lit/lit monorepo

2
.gitignore vendored
View File

@@ -1,4 +1,4 @@
node_modules/
/node_modules/
/lib/
/test/
custom-elements.json

View File

@@ -1,5 +1,20 @@
# @lit/lit-starter-ts
## 1.0.2
### Patch Changes
- [#2535](https://github.com/lit/lit/pull/2535) [`d1359856`](https://github.com/lit/lit/commit/d1359856698d1af381b335fb757f9282574690b0) - Update the README to indicate that issues and PRs should be filed on the main Lit repo.
## 1.0.1
### Patch Changes
- [#2300](https://github.com/lit/lit/pull/2300) [`8b9dcb4d`](https://github.com/lit/lit/commit/8b9dcb4d10e4161083146ae40d0b12174a63d31d) - Fix starter kits so `npm run serve` serves the root directory, and add a link to the `/dev/index.html` component example from `/`.
- Updated dependencies [[`fcc2b3d0`](https://github.com/lit/lit/commit/fcc2b3d0054e69e6f76588ea9f440117b6d0deed), [`49ecf623`](https://github.com/lit/lit/commit/49ecf6239033e9578184d46116e6b89676d091db), [`1d563e83`](https://github.com/lit/lit/commit/1d563e830c02a2d1a22e1e939f1ace971b1d1ae7)]:
- lit@2.1.0
## 1.0.0
### Patch Changes

View File

@@ -2,6 +2,10 @@
This project includes a sample component using LitElement with TypeScript.
This template is generated from the `lit-starter-ts` package in [the main Lit
repo](https://github.com/lit/lit). Issues and PRs for this template should be
filed in that repo.
## Setup
Install dependencies:

View File

@@ -1,70 +0,0 @@
{
"version": "experimental",
"tags": [
{
"name": "my-element",
"path": "./src/my-element.ts",
"description": "An example element.",
"attributes": [
{
"name": "name",
"description": "The name to say \"Hello\" to.",
"type": "string",
"default": "\"World\""
},
{
"name": "count",
"description": "The number of times the button has been clicked.",
"type": "number",
"default": "0"
}
],
"properties": [
{
"name": "name",
"attribute": "name",
"description": "The name to say \"Hello\" to.",
"type": "string",
"default": "\"World\""
},
{
"name": "count",
"attribute": "count",
"description": "The number of times the button has been clicked.",
"type": "number",
"default": "0"
},
{
"name": "renderRoot",
"description": "Node or ShadowRoot into which element DOM should be rendered. Defaults\nto an open shadowRoot.",
"type": "HTMLElement | ShadowRoot"
},
{
"name": "isUpdatePending",
"type": "boolean"
},
{
"name": "hasUpdated",
"type": "boolean"
},
{
"name": "updateComplete",
"description": "Returns a Promise that resolves when the element has completed updating.\nThe Promise value is a boolean that is `true` if the element completed the\nupdate without triggering another update. The Promise result is `false` if\na property was set inside `updated()`. If the Promise is rejected, an\nexception was thrown during the update.\n\nTo await additional asynchronous work, override the `getUpdateComplete`\nmethod. For example, it is sometimes useful to await a rendered element\nbefore fulfilling this Promise. To do this, first await\n`super.getUpdateComplete()`, then any subsequent state.",
"type": "Promise<boolean>"
}
],
"slots": [
{
"name": "",
"description": "This element has a slot"
}
],
"cssParts": [
{
"name": "button",
"description": "The button"
}
]
}
]
}

210
package-lock.json generated
View File

@@ -1,17 +1,20 @@
{
"name": "@lit/lit-starter-ts",
"version": "1.0.0",
"version": "1.0.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@lit/lit-starter-ts",
"version": "1.0.0",
"version": "1.0.1",
"license": "BSD-3-Clause",
"dependencies": {
"lit": "^2.1.0"
},
"devDependencies": {
"@11ty/eleventy": "^0.12.1",
"@11ty/eleventy-plugin-syntaxhighlight": "^3.0.1",
"@custom-elements-manifest/analyzer": "^0.5.3",
"@custom-elements-manifest/analyzer": "^0.5.7",
"@esm-bundle/chai": "^4.1.5",
"@open-wc/testing": "^3.0.0-next.1",
"@open-wc/testing-karma": "^4.0.9",
@@ -1755,25 +1758,62 @@
}
},
"node_modules/@custom-elements-manifest/analyzer": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/@custom-elements-manifest/analyzer/-/analyzer-0.5.3.tgz",
"integrity": "sha512-SnW+sWK1OFh2eiBSiwrnJjAmt9ZxNqWGKSioo5QrGpsm7XK9RryO7uFWCROLsnl1wS94Qx7RZCwt2bN38K4euA==",
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/@custom-elements-manifest/analyzer/-/analyzer-0.5.7.tgz",
"integrity": "sha512-pKQM0dAUPAaoAWJvPSpFtxAc1/pi0xb8wKYSUJbCBYwWA5L8vf/UowDaV0m9G3CtbiqkHI/4eKzFAqE14iY6vg==",
"dev": true,
"dependencies": {
"@web/config-loader": "^0.1.3",
"chokidar": "^3.5.2",
"command-line-args": "^5.1.2",
"comment-parser": "^1.2.0",
"custom-elements-manifest": "^1.0.0",
"debounce": "^1.2.1",
"globby": "^11.0.4",
"typescript": "^4.3.2"
"@web/config-loader": "0.1.3",
"chokidar": "3.5.2",
"command-line-args": "5.1.2",
"comment-parser": "1.2.4",
"custom-elements-manifest": "1.0.0",
"debounce": "1.2.1",
"globby": "11.0.4",
"typescript": "~4.3.2"
},
"bin": {
"cem": "index.js",
"custom-elements-manifest": "index.js"
}
},
"node_modules/@custom-elements-manifest/analyzer/node_modules/array-back": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz",
"integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==",
"dev": true,
"engines": {
"node": ">=12.17"
}
},
"node_modules/@custom-elements-manifest/analyzer/node_modules/command-line-args": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.1.2.tgz",
"integrity": "sha512-fytTsbndLbl+pPWtS0CxLV3BEWw9wJayB8NnU2cbQqVPsNdYezQeT+uIQv009m+GShnMNyuoBrRo8DTmuTfSCA==",
"dev": true,
"dependencies": {
"array-back": "^6.1.2",
"find-replace": "^3.0.0",
"lodash.camelcase": "^4.3.0",
"typical": "^4.0.0"
},
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/@custom-elements-manifest/analyzer/node_modules/typescript": {
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
"integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
"dev": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"
},
"engines": {
"node": ">=4.2.0"
}
},
"node_modules/@eslint/eslintrc": {
"version": "0.4.3",
"resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.3.tgz",
@@ -1878,10 +1918,9 @@
}
},
"node_modules/@lit/reactive-element": {
"version": "1.0.0-rc.3",
"resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.0.0-rc.3.tgz",
"integrity": "sha512-Rs2px1keOQUNJUo5B+WExl5v244ZNCiN/iMVNO9evFdJjAdWCIupR/p14zRPkNHsciRBELLTcOZ379cI9O6PDg==",
"dev": true
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.2.2.tgz",
"integrity": "sha512-HkhTTO2rT8jlf4izz7ME/+YUjqz+ZHgmnOKorA+7tkDmQDg6QzDpWSFz//1YyiL193W4bc7rlQCiYyFiZa9pkQ=="
},
"node_modules/@mrmlnc/readdir-enhanced": {
"version": "2.2.1",
@@ -3412,10 +3451,9 @@
}
},
"node_modules/@types/trusted-types": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-1.0.6.tgz",
"integrity": "sha512-230RC8sFeHoT6sSUlRO6a8cAnclO06eeiq1QDfiv2FGCLWFvvERWgwIQD4FWqD9A69BN7Lzee4OXwoMVnnsWDw==",
"dev": true
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz",
"integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg=="
},
"node_modules/@types/uuid": {
"version": "8.3.1",
@@ -10375,14 +10413,13 @@
}
},
"node_modules/lit": {
"version": "2.0.0-rc.3",
"resolved": "https://registry.npmjs.org/lit/-/lit-2.0.0-rc.3.tgz",
"integrity": "sha512-UZDLWuspl7saA+WvS0e+TE3NdGGE05hOIwUPTWiibs34c5QupcEzpjB/aElt79V9bELQVNbUUwa0Ow7D1Wuszw==",
"dev": true,
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/lit/-/lit-2.1.3.tgz",
"integrity": "sha512-46KtKy7iDoY3wZ5VSqBlXll6J/tli5gRMPFRWi5qQ01lvIqcO+dYQwb1l1NYZjbzcHnGnCKrMb8nDv7/ZE4Y4g==",
"dependencies": {
"@lit/reactive-element": "^1.0.0-rc.2",
"lit-element": "^3.0.0-rc.2",
"lit-html": "^2.0.0-rc.4"
"@lit/reactive-element": "^1.1.0",
"lit-element": "^3.1.0",
"lit-html": "^2.1.0"
}
},
"node_modules/lit-analyzer": {
@@ -10652,22 +10689,20 @@
}
},
"node_modules/lit-element": {
"version": "3.0.0-rc.3",
"resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.0.0-rc.3.tgz",
"integrity": "sha512-NDe7yjW18gfYQb1GIEQr1T8sB1GUAb1HB62pdAEw+SK6lUW7OFPKQqCOlRhZ6qJXsw9KxMnyYIprLZT4FZdYdQ==",
"dev": true,
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.1.2.tgz",
"integrity": "sha512-5VLn5a7anAFH7oz6d7TRG3KiTZQ5GEFsAgOKB8Yc+HDyuDUGOT2cL1CYTz/U4b/xlJxO+euP14pyji+z3Z3kOg==",
"dependencies": {
"@lit/reactive-element": "^1.0.0-rc.2",
"lit-html": "^2.0.0-rc.4"
"@lit/reactive-element": "^1.1.0",
"lit-html": "^2.1.0"
}
},
"node_modules/lit-html": {
"version": "2.0.0-rc.4",
"resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.0.0-rc.4.tgz",
"integrity": "sha512-WSLGu3vxq7y8q/oOd9I3zxyBELNLLiDk6gAYoKK4PGctI5fbh6lhnO/jVBdy0PV/vTc+cLJCA/occzx3YoNPeg==",
"dev": true,
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.1.3.tgz",
"integrity": "sha512-WgvdwiNeuoT0mYEEJI+AAV2DEtlqzVM4lyDSaeQSg5ZwhS/CkGJBO/4n66alApEuSS9WXw9+ADBp8SPvtDEKSg==",
"dependencies": {
"@types/trusted-types": "^1.0.1"
"@types/trusted-types": "^2.0.2"
}
},
"node_modules/load-json-file": {
@@ -18331,19 +18366,45 @@
}
},
"@custom-elements-manifest/analyzer": {
"version": "0.5.3",
"resolved": "https://registry.npmjs.org/@custom-elements-manifest/analyzer/-/analyzer-0.5.3.tgz",
"integrity": "sha512-SnW+sWK1OFh2eiBSiwrnJjAmt9ZxNqWGKSioo5QrGpsm7XK9RryO7uFWCROLsnl1wS94Qx7RZCwt2bN38K4euA==",
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/@custom-elements-manifest/analyzer/-/analyzer-0.5.7.tgz",
"integrity": "sha512-pKQM0dAUPAaoAWJvPSpFtxAc1/pi0xb8wKYSUJbCBYwWA5L8vf/UowDaV0m9G3CtbiqkHI/4eKzFAqE14iY6vg==",
"dev": true,
"requires": {
"@web/config-loader": "^0.1.3",
"chokidar": "^3.5.2",
"command-line-args": "^5.1.2",
"comment-parser": "^1.2.0",
"custom-elements-manifest": "^1.0.0",
"debounce": "^1.2.1",
"globby": "^11.0.4",
"typescript": "^4.3.2"
"@web/config-loader": "0.1.3",
"chokidar": "3.5.2",
"command-line-args": "5.1.2",
"comment-parser": "1.2.4",
"custom-elements-manifest": "1.0.0",
"debounce": "1.2.1",
"globby": "11.0.4",
"typescript": "~4.3.2"
},
"dependencies": {
"array-back": {
"version": "6.2.2",
"resolved": "https://registry.npmjs.org/array-back/-/array-back-6.2.2.tgz",
"integrity": "sha512-gUAZ7HPyb4SJczXAMUXMGAvI976JoK3qEx9v1FTmeYuJj0IBiaKttG1ydtGKdkfqWkIkouke7nG8ufGy77+Cvw==",
"dev": true
},
"command-line-args": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/command-line-args/-/command-line-args-5.1.2.tgz",
"integrity": "sha512-fytTsbndLbl+pPWtS0CxLV3BEWw9wJayB8NnU2cbQqVPsNdYezQeT+uIQv009m+GShnMNyuoBrRo8DTmuTfSCA==",
"dev": true,
"requires": {
"array-back": "^6.1.2",
"find-replace": "^3.0.0",
"lodash.camelcase": "^4.3.0",
"typical": "^4.0.0"
}
},
"typescript": {
"version": "4.3.5",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.5.tgz",
"integrity": "sha512-DqQgihaQ9cUrskJo9kIyW/+g0Vxsk8cDtZ52a3NGh0YNTfpUSArXSohyUGnvbPazEPLu398C0UxmKSOrPumUzA==",
"dev": true
}
}
},
"@eslint/eslintrc": {
@@ -18428,10 +18489,9 @@
}
},
"@lit/reactive-element": {
"version": "1.0.0-rc.3",
"resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.0.0-rc.3.tgz",
"integrity": "sha512-Rs2px1keOQUNJUo5B+WExl5v244ZNCiN/iMVNO9evFdJjAdWCIupR/p14zRPkNHsciRBELLTcOZ379cI9O6PDg==",
"dev": true
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.2.2.tgz",
"integrity": "sha512-HkhTTO2rT8jlf4izz7ME/+YUjqz+ZHgmnOKorA+7tkDmQDg6QzDpWSFz//1YyiL193W4bc7rlQCiYyFiZa9pkQ=="
},
"@mrmlnc/readdir-enhanced": {
"version": "2.2.1",
@@ -19767,10 +19827,9 @@
}
},
"@types/trusted-types": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-1.0.6.tgz",
"integrity": "sha512-230RC8sFeHoT6sSUlRO6a8cAnclO06eeiq1QDfiv2FGCLWFvvERWgwIQD4FWqD9A69BN7Lzee4OXwoMVnnsWDw==",
"dev": true
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz",
"integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg=="
},
"@types/uuid": {
"version": "8.3.1",
@@ -25280,14 +25339,13 @@
"dev": true
},
"lit": {
"version": "2.0.0-rc.3",
"resolved": "https://registry.npmjs.org/lit/-/lit-2.0.0-rc.3.tgz",
"integrity": "sha512-UZDLWuspl7saA+WvS0e+TE3NdGGE05hOIwUPTWiibs34c5QupcEzpjB/aElt79V9bELQVNbUUwa0Ow7D1Wuszw==",
"dev": true,
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/lit/-/lit-2.1.3.tgz",
"integrity": "sha512-46KtKy7iDoY3wZ5VSqBlXll6J/tli5gRMPFRWi5qQ01lvIqcO+dYQwb1l1NYZjbzcHnGnCKrMb8nDv7/ZE4Y4g==",
"requires": {
"@lit/reactive-element": "^1.0.0-rc.2",
"lit-element": "^3.0.0-rc.2",
"lit-html": "^2.0.0-rc.4"
"@lit/reactive-element": "^1.1.0",
"lit-element": "^3.1.0",
"lit-html": "^2.1.0"
}
},
"lit-analyzer": {
@@ -25514,22 +25572,20 @@
}
},
"lit-element": {
"version": "3.0.0-rc.3",
"resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.0.0-rc.3.tgz",
"integrity": "sha512-NDe7yjW18gfYQb1GIEQr1T8sB1GUAb1HB62pdAEw+SK6lUW7OFPKQqCOlRhZ6qJXsw9KxMnyYIprLZT4FZdYdQ==",
"dev": true,
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.1.2.tgz",
"integrity": "sha512-5VLn5a7anAFH7oz6d7TRG3KiTZQ5GEFsAgOKB8Yc+HDyuDUGOT2cL1CYTz/U4b/xlJxO+euP14pyji+z3Z3kOg==",
"requires": {
"@lit/reactive-element": "^1.0.0-rc.2",
"lit-html": "^2.0.0-rc.4"
"@lit/reactive-element": "^1.1.0",
"lit-html": "^2.1.0"
}
},
"lit-html": {
"version": "2.0.0-rc.4",
"resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.0.0-rc.4.tgz",
"integrity": "sha512-WSLGu3vxq7y8q/oOd9I3zxyBELNLLiDk6gAYoKK4PGctI5fbh6lhnO/jVBdy0PV/vTc+cLJCA/occzx3YoNPeg==",
"dev": true,
"version": "2.1.3",
"resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.1.3.tgz",
"integrity": "sha512-WgvdwiNeuoT0mYEEJI+AAV2DEtlqzVM4lyDSaeQSg5ZwhS/CkGJBO/4n66alApEuSS9WXw9+ADBp8SPvtDEKSg==",
"requires": {
"@types/trusted-types": "^1.0.1"
"@types/trusted-types": "^2.0.2"
}
},
"load-json-file": {

View File

@@ -1,7 +1,7 @@
{
"name": "@lit/lit-starter-ts",
"private": true,
"version": "1.0.0",
"version": "1.0.2",
"description": "A simple web component",
"main": "my-element.js",
"module": "my-element.js",
@@ -41,12 +41,12 @@
"author": "Google LLC",
"license": "BSD-3-Clause",
"dependencies": {
"lit": "^2.0.0"
"lit": "^2.1.0"
},
"devDependencies": {
"@11ty/eleventy": "^0.12.1",
"@11ty/eleventy-plugin-syntaxhighlight": "^3.0.1",
"@custom-elements-manifest/analyzer": "^0.5.3",
"@custom-elements-manifest/analyzer": "^0.5.7",
"@esm-bundle/chai": "^4.1.5",
"@open-wc/testing": "^3.0.0-next.1",
"@open-wc/testing-karma": "^4.0.9",

View File

@@ -99,6 +99,7 @@ export default {
// https://mochajs.org/api/mocha
config: {
ui: 'tdd',
timeout: '60000',
},
},
plugins: [