From 2fe2053fe04e7226e5fa4e8b730e91a62a547b27 Mon Sep 17 00:00:00 2001 From: Alexander Marks Date: Fri, 15 Jul 2022 10:51:44 -0700 Subject: [PATCH] [infra] Replace custom test module remapping with package exports (#3132) Switches from a custom web test runner plugin to the now built-in export conditions configuration, in order to switch between dev and prod builds in our browser tests. ### Background Some of our packages contain 2 separate builds: dev and prod. Dev is the raw output from TypeScript and includes extra debugging features. Prod is the minified build that users will get in production, and excludes those debugging features. The two modes are described in our `package.json` files using [export conditions](https://nodejs.org/api/packages.html#conditional-exports). By default, users get the prod build. If they set the `development` export condition in tools like rollup, webpack, node, they will get the dev build. We run all of our tests against both builds to get full coverage. Previously, we did this with a custom plugin for web test runner which rewrote `development/` paths to production paths when needed. We did this because web test runner did not, at the time, have support for export conditions. Now, web test runner does have support for export conditions. ### Changes - Switches all tests to import their respective libraries using *package self-references*, instead of relative paths. This allows export conditions to take effect *even from within the same package*. - Switches to the `NodeNext` mode for the `module` and `moduleResolution` settings in our `tsconfig.json` files. This is needed for package self-references. - Adds `types` entries to the export conditions in our `package.json` files. This is needed when using `NodeNext`, and is how TypeScript discovers the typings for each specific package export. (Side note, in the future, this feature will allow us to remove the `.d.ts` files that we currently duplicate into the top-level of the package, but we can't do that until our users are also using `NodeNext`). - Added a new web test runner middleware that enforces that we only import dev sources in dev mode, and prod sources in prod mode. It serves a 403 forbidden when this is violated, which fails the test. This should prevent us from accidentally using relative imports in tests in the future. - Deleted the old path-rewriting web test runner plugin, which is no longer needed. - Upgraded all `@web/test-runner` and `@web/dev-server` packages, and consolidated them where possible into the top-level `package.json` for easier upgrades. Fixes https://github.com/lit/lit/issues/2844 Fixes https://github.com/lit/lit/issues/3091 --- .changeset/three-hounds-rush.md | 13 + .eslintignore | 8 - .prettierignore | 8 - package-lock.json | 829 +----------------- package.json | 6 + packages/labs/context/package.json | 2 +- .../context/src/test/context-provider_test.ts | 4 +- .../context/src/test/context-request_test.ts | 8 +- .../context/src/test/late-provider_test.ts | 12 +- .../src/test/provider-and-consumer_test.ts | 4 +- .../src/test/provider-consumer_test.ts | 3 +- packages/labs/context/tsconfig.json | 4 +- .../labs/eleventy-plugin-lit/package.json | 1 - packages/labs/motion/package.json | 3 +- packages/labs/motion/src/test/animate_test.ts | 2 +- packages/labs/motion/src/test/test-helpers.ts | 2 +- packages/labs/motion/tsconfig.json | 4 +- packages/labs/observers/package.json | 6 +- .../src/test/intersection_controller_test.ts | 2 +- .../src/test/mutation_controller_test.ts | 2 +- .../src/test/performance_controller_test.ts | 2 +- .../src/test/resize_controller_test.ts | 2 +- packages/labs/observers/tsconfig.json | 4 +- packages/labs/react/package.json | 3 +- packages/labs/react/src/create-component.ts | 4 +- .../react/src/test/create-component_test.tsx | 6 +- .../react/src/test/use-controller_test.ts | 2 +- packages/labs/react/src/use-controller.ts | 5 +- packages/labs/react/tsconfig.json | 7 +- packages/labs/router/package.json | 4 +- packages/labs/router/src/routes.ts | 2 + packages/labs/router/src/test/router_test.ts | 2 +- .../labs/router/src/test/router_test_code.ts | 4 +- packages/labs/router/tsconfig.json | 7 +- .../labs/scoped-registry-mixin/package.json | 2 +- .../src/test/scoped-registry-mixin_test.ts | 2 +- .../labs/scoped-registry-mixin/tsconfig.json | 7 +- packages/labs/ssr/package.json | 1 - packages/labs/task/package.json | 3 +- packages/labs/task/src/test/task_test.ts | 2 +- packages/labs/task/tsconfig.json | 4 +- packages/labs/testing/package.json | 4 +- packages/labs/virtualizer/package.json | 2 - packages/labs/vue-utils/package.json | 1 - packages/lit-element/package.json | 15 + .../src/test/lit-element_dev_mode_test.ts | 2 +- .../test/lit-element_styling_apply_test.ts | 4 +- .../src/test/lit-element_styling_test.ts | 2 +- .../lit-element/src/test/lit-element_test.ts | 2 +- .../lit-element-ce-sd-noPatch_test.html | 4 +- .../lit-element-sd-ce-cp_test.html | 2 +- .../lit-element-sd-ce_test.html | 2 +- .../polyfill-support/lit-element-sd_test.html | 2 +- .../polyfill-support/lit-element_html-test.ts | 2 +- .../polyfill-support/lit-element_test.html | 2 +- packages/lit-element/tsconfig.json | 4 +- .../tsconfig.polyfill-support.json | 4 +- packages/lit-html/package.json | 29 +- .../src/test/directive-helpers_test.ts | 10 +- .../src/test/directives/async-append_test.ts | 4 +- .../src/test/directives/async-replace_test.ts | 4 +- .../src/test/directives/cache_test.ts | 6 +- .../src/test/directives/choose_test.ts | 2 +- .../src/test/directives/class-map_test.ts | 4 +- .../src/test/directives/guard_test.ts | 6 +- .../src/test/directives/if-defined_test.ts | 4 +- .../lit-html/src/test/directives/join_test.ts | 4 +- .../src/test/directives/keyed_test.ts | 4 +- .../lit-html/src/test/directives/live_test.ts | 4 +- .../lit-html/src/test/directives/map_test.ts | 4 +- .../src/test/directives/range_test.ts | 2 +- .../lit-html/src/test/directives/ref_test.ts | 4 +- .../src/test/directives/repeat_test.ts | 4 +- .../src/test/directives/style-map_test.ts | 6 +- .../test/directives/template-content_test.ts | 4 +- .../src/test/directives/unsafe-html_test.ts | 4 +- .../src/test/directives/unsafe-svg_test.ts | 4 +- .../src/test/directives/until_test.ts | 4 +- .../lit-html/src/test/directives/when_test.ts | 4 +- packages/lit-html/src/test/lit-html_test.ts | 14 +- .../lit-html-apply-force-polyfill_test.html | 2 +- .../lit-html-apply_html-test.ts | 4 +- .../polyfill-support/lit-html-apply_test.html | 2 +- .../lit-html-no-wc_html-test.ts | 4 +- .../polyfill-support/lit-html-no-wc_test.html | 2 +- .../lit-html-noPatch_test.html | 4 +- .../lit-html-scoping-shim_html-test.ts | 4 +- .../lit-html-scoping-shim_test.html | 2 +- .../polyfill-support/lit-html_html-test.ts | 12 +- .../test/polyfill-support/lit-html_test.html | 2 +- packages/lit-html/src/test/static_test.ts | 4 +- .../src/test/test-utils/assert-render.ts | 2 +- .../src/test/test-utils/shadow-root.ts | 2 +- .../src/test/version-stability_test.js | 18 +- packages/lit-html/tsconfig.json | 4 +- .../lit-html/tsconfig.polyfill-support.json | 4 +- .../lit/src/test/lit-element-bundle_test.html | 2 +- packages/lit/tsconfig.json | 4 +- packages/lit/tsconfig.polyfill-support.json | 4 +- packages/localize/package.json | 2 - packages/reactive-element/package.json | 15 + .../reactive-element/src/test/css-tag_test.ts | 2 +- .../src/test/decorators/customElement_test.ts | 2 +- .../src/test/decorators/eventOptions_test.ts | 4 +- .../decorators/initializer_decorators_test.ts | 6 +- .../src/test/decorators/property_test.ts | 4 +- .../src/test/decorators/queryAll_test.ts | 2 +- .../decorators/queryAssignedElements_test.ts | 4 +- .../decorators/queryAssignedNodes_test.ts | 4 +- .../src/test/decorators/queryAsync_test.ts | 2 +- .../src/test/decorators/query_test.ts | 2 +- .../src/test/decorators/state_test.ts | 4 +- .../reactive-element-ce-sd-noPatch_test.html | 2 +- .../reactive-element-sd-ce-cp_test.html | 2 +- .../reactive-element-sd-ce_test.html | 2 +- .../reactive-element-sd_test.html | 2 +- .../reactive-element_html-test.ts | 2 +- .../reactive-element_test.html | 2 +- .../test/reactive-element-controllers_test.ts | 2 +- .../src/test/reactive-element-csp_test.html | 2 +- .../test/reactive-element_dev_mode_test.ts | 2 +- .../src/test/reactive-element_styling_test.ts | 2 +- .../src/test/reactive-element_test.ts | 2 +- .../reactive-element/src/test/test-helpers.ts | 2 +- packages/reactive-element/tsconfig.json | 4 +- .../tsconfig.polyfill-support.json | 4 +- packages/tests/.gitignore | 8 - packages/tests/package.json | 8 - packages/tests/src/rollup-resolve-remap.ts | 50 -- packages/tests/src/web-test-runner.config.ts | 59 +- packages/tests/src/wtr-config.ts | 68 -- 131 files changed, 352 insertions(+), 1195 deletions(-) create mode 100644 .changeset/three-hounds-rush.md delete mode 100644 packages/tests/src/rollup-resolve-remap.ts delete mode 100644 packages/tests/src/wtr-config.ts diff --git a/.changeset/three-hounds-rush.md b/.changeset/three-hounds-rush.md new file mode 100644 index 0000000000..82d4c91296 --- /dev/null +++ b/.changeset/three-hounds-rush.md @@ -0,0 +1,13 @@ +--- +'@lit-labs/context': patch +'@lit-labs/motion': patch +'@lit-labs/observers': patch +'@lit-labs/react': patch +'@lit-labs/scoped-registry-mixin': patch +'@lit-labs/task': patch +'lit-element': patch +'lit-html': patch +'@lit/reactive-element': patch +--- + +Added "types" entry to package exports. This tells newer versions of TypeScript where to look for typings for each module. diff --git a/.eslintignore b/.eslintignore index a686e9b798..4ec7c50df3 100644 --- a/.eslintignore +++ b/.eslintignore @@ -127,10 +127,6 @@ packages/reactive-element/reactive-controller.* packages/tests/node_modules/ packages/tests/utils/ -packages/tests/**/rollup-resolve-remap.js -packages/tests/**/rollup-resolve-remap.js.map -packages/tests/**/rollup-resolve-remap.d.ts -packages/tests/**/rollup-resolve-remap.d.ts.map packages/tests/**/run-web-tests.js packages/tests/**/run-web-tests.js.map packages/tests/**/run-web-tests.d.ts @@ -139,10 +135,6 @@ packages/tests/**/web-test-runner.config.js packages/tests/**/web-test-runner.config.js.map packages/tests/**/web-test-runner.config.d.ts packages/tests/**/web-test-runner.config.d.ts.map -packages/tests/**/wtr-config.js -packages/tests/**/wtr-config.js.map -packages/tests/**/wtr-config.d.ts -packages/tests/**/wtr-config.d.ts.map packages/ts-transformers/*.js packages/ts-transformers/*.js.map diff --git a/.prettierignore b/.prettierignore index e6f79cbbde..58d33fa037 100644 --- a/.prettierignore +++ b/.prettierignore @@ -113,10 +113,6 @@ packages/reactive-element/reactive-controller.* packages/tests/node_modules/ packages/tests/utils/ -packages/tests/**/rollup-resolve-remap.js -packages/tests/**/rollup-resolve-remap.js.map -packages/tests/**/rollup-resolve-remap.d.ts -packages/tests/**/rollup-resolve-remap.d.ts.map packages/tests/**/run-web-tests.js packages/tests/**/run-web-tests.js.map packages/tests/**/run-web-tests.d.ts @@ -125,10 +121,6 @@ packages/tests/**/web-test-runner.config.js packages/tests/**/web-test-runner.config.js.map packages/tests/**/web-test-runner.config.d.ts packages/tests/**/web-test-runner.config.d.ts.map -packages/tests/**/wtr-config.js -packages/tests/**/wtr-config.js.map -packages/tests/**/wtr-config.d.ts -packages/tests/**/wtr-config.d.ts.map packages/ts-transformers/*.js packages/ts-transformers/*.js.map diff --git a/package-lock.json b/package-lock.json index ae0a11c6d2..6611850f2d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21,6 +21,12 @@ "@rollup/plugin-virtual": "^2.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", + "@web/dev-server": "^0.1.32", + "@web/dev-server-legacy": "^1.0.0", + "@web/test-runner": "^0.13.31", + "@web/test-runner-mocha": "^0.7.5", + "@web/test-runner-playwright": "^0.8.9", + "@web/test-runner-saucelabs": "^0.8.0", "as-table": "^1.0.55", "chalk": "^4.1.0", "eslint": "^8.13.0", @@ -5810,86 +5816,6 @@ "node": ">=10.0.0" } }, - "node_modules/@web/dev-server-rollup": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.3.15.tgz", - "integrity": "sha512-hhxvBmNIY19vXeocYB1IBOuhpVpy1L7jbwBarmvC0QJKZsgkxssNTzXJ8iga70c2+H0c/rBz1xUaKuAcov0uOA==", - "dev": true, - "dependencies": { - "@rollup/plugin-node-resolve": "^11.0.1", - "@web/dev-server-core": "^0.3.16", - "nanocolors": "^0.2.1", - "parse5": "^6.0.1", - "rollup": "^2.66.1", - "whatwg-url": "^11.0.0" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "node_modules/@web/dev-server-rollup/node_modules/@rollup/plugin-node-resolve": { - "version": "11.2.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", - "integrity": "sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==", - "dev": true, - "dependencies": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", - "builtin-modules": "^3.1.0", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.19.0" - }, - "engines": { - "node": ">= 10.0.0" - }, - "peerDependencies": { - "rollup": "^1.20.0||^2.0.0" - } - }, - "node_modules/@web/dev-server-rollup/node_modules/@types/resolve": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", - "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@web/dev-server-rollup/node_modules/tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dev": true, - "dependencies": { - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@web/dev-server-rollup/node_modules/webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true, - "engines": { - "node": ">=12" - } - }, - "node_modules/@web/dev-server-rollup/node_modules/whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "dependencies": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/@web/dev-server/node_modules/@web/dev-server-rollup": { "version": "0.3.18", "resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.3.18.tgz", @@ -6148,15 +6074,16 @@ } }, "node_modules/@web/test-runner-mocha": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.3.7.tgz", - "integrity": "sha512-k1oNSEHh6GqLhsXiqfFH49JKrwOFDhfD3qHMGwXdmqgv2/hQ2Qd1z+47LIN/gPWHjhFG8QrmwSS3Rh/KnwCT6A==", + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", + "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", "dev": true, "dependencies": { - "@types/mocha": "^8.0.1" + "@types/mocha": "^8.2.0", + "@web/test-runner-core": "^0.10.20" }, "engines": { - "node": ">=10.0.0" + "node": ">=12.0.0" } }, "node_modules/@web/test-runner-mocha/node_modules/@types/mocha": { @@ -6209,25 +6136,6 @@ "node": ">=12.0.0" } }, - "node_modules/@web/test-runner/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, - "node_modules/@web/test-runner/node_modules/@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "dependencies": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, "node_modules/@web/test-runner/node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -27457,7 +27365,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^8.0.3", "@types/trusted-types": "^1.0.1", - "@web/test-runner-mocha": "^0.3.5", "chokidar-cli": "^2.1.0", "concurrently": "^5.3.0", "mocha": "^8.1.3", @@ -27480,7 +27387,6 @@ }, "devDependencies": { "@11ty/eleventy": "^1.0.0", - "@web/dev-server": "^0.1.11", "@webcomponents/template-shadowroot": "^0.1.0", "rimraf": "^3.0.2", "uvu": "^0.5.3" @@ -27598,8 +27504,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/dev-server": "^0.1.22", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", @@ -27612,25 +27516,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "packages/labs/motion/node_modules/@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "dependencies": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "packages/labs/motion/node_modules/@web/test-runner-mocha/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, "packages/labs/motion/node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -28270,7 +28155,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", @@ -28283,25 +28167,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "packages/labs/observers/node_modules/@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "dependencies": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "packages/labs/observers/node_modules/@web/test-runner-mocha/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, "packages/labs/observers/node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -28941,7 +28806,6 @@ "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", @@ -28956,25 +28820,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "packages/labs/react/node_modules/@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "dependencies": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "packages/labs/react/node_modules/@web/test-runner-mocha/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, "packages/labs/react/node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -29614,7 +29459,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", @@ -29628,25 +29472,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "packages/labs/router/node_modules/@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "dependencies": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "packages/labs/router/node_modules/@web/test-runner-mocha/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, "packages/labs/router/node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -30287,7 +30112,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "@webcomponents/scoped-custom-element-registry": "^0.0.3", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", @@ -30301,25 +30125,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "packages/labs/scoped-registry-mixin/node_modules/@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "dependencies": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "packages/labs/scoped-registry-mixin/node_modules/@web/test-runner-mocha/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, "packages/labs/scoped-registry-mixin/node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -30975,7 +30780,6 @@ "@types/node-fetch": "^2.5.7", "@types/parse5": "^6.0.1", "@types/resolve": "^1.14.0", - "@web/test-runner": "^0.13.16", "@webcomponents/template-shadowroot": "^0.1.0", "chai": "^4.2.0", "command-line-args": "^5.1.1", @@ -31348,7 +31152,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", @@ -31361,25 +31164,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "packages/labs/task/node_modules/@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "dependencies": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "packages/labs/task/node_modules/@web/test-runner-mocha/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, "packages/labs/task/node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -32027,9 +31811,7 @@ "lit": "^2.2.5" }, "devDependencies": { - "@open-wc/testing": "^3.1.5", - "@web/test-runner": "^0.13.28", - "@web/test-runner-playwright": "^0.8.8" + "@open-wc/testing": "^3.1.5" } }, "packages/labs/virtualizer": { @@ -32045,8 +31827,6 @@ "@esm-bundle/chai": "^4.3.4-fix.0", "@types/selenium-webdriver": "^4.0.19", "@web/dev-server-esbuild": "^0.3.0", - "@web/test-runner": "^0.13.27", - "@web/test-runner-mocha": "^0.7.5", "chai": "^4.2.0", "copyfiles": "^2.4.1", "http-server": "^14.1.0", @@ -32060,25 +31840,6 @@ "tachometer": "^0.6.0" } }, - "packages/labs/virtualizer/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, - "packages/labs/virtualizer/node_modules/@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "dependencies": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, "packages/labs/virtualizer/node_modules/acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -32853,7 +32614,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", @@ -32866,25 +32626,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "packages/labs/vue-utils/node_modules/@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "dependencies": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "packages/labs/vue-utils/node_modules/@web/test-runner-mocha/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, "packages/labs/vue-utils/node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -34106,7 +33847,6 @@ "@lit-internal/scripts": "^1.0.0", "@types/mocha": "^9.0.0", "@types/web-ie11": "^0.0.0", - "@web/test-runner-mocha": "^0.7.4", "@webcomponents/shadycss": "^1.8.0", "@webcomponents/template": "^1.4.4", "@webcomponents/webcomponentsjs": "^2.6.0", @@ -34121,25 +33861,6 @@ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==" }, - "packages/lit-html/node_modules/@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "dependencies": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "packages/lit-html/node_modules/@web/test-runner-mocha/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, "packages/lit-html/node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -35523,8 +35244,6 @@ "@esm-bundle/chai": "^4.1.5", "@types/chai": "^4.2.12", "@types/mocha": "^9.0.0", - "@web/test-runner": "^0.13.16", - "@web/test-runner-playwright": "^0.8.4", "chai": "^4.2.0", "mocha": "^9.1.1" } @@ -36516,12 +36235,6 @@ "@types/fs-extra": "^9.0.1", "@types/node": "^16.7.8", "@types/prettier": "^2.0.1", - "@web/dev-server": "=0.1.30", - "@web/dev-server-legacy": "^0.1.7", - "@web/dev-server-rollup": "=0.3.15", - "@web/test-runner": "=0.13.30", - "@web/test-runner-playwright": "^0.8.8", - "@web/test-runner-saucelabs": "^0.8.0", "@webcomponents/webcomponentsjs": "^2.6.0", "diff": "^5.0.0", "dir-compare": "^3.1.5", @@ -36529,141 +36242,6 @@ "uvu": "^0.5.1" } }, - "packages/tests/node_modules/@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, - "packages/tests/node_modules/@web/dev-server": { - "version": "0.1.30", - "resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.1.30.tgz", - "integrity": "sha512-nUKR+lq06gaCvH6vKmfhPe/Kka1Xp7yN1FN5NEx+Yk4+9CyxZ3UJt2eHXedrcz+XCafxExW114ElEDgCahJowg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.12.11", - "@types/command-line-args": "^5.0.0", - "@web/config-loader": "^0.1.3", - "@web/dev-server-core": "^0.3.17", - "@web/dev-server-rollup": "^0.3.13", - "camelcase": "^6.2.0", - "command-line-args": "^5.1.1", - "command-line-usage": "^6.1.1", - "debounce": "^1.2.0", - "deepmerge": "^4.2.2", - "ip": "^1.1.5", - "nanocolors": "^0.2.1", - "open": "^8.0.2", - "portfinder": "^1.0.28" - }, - "bin": { - "wds": "dist/bin.js", - "web-dev-server": "dist/bin.js" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "packages/tests/node_modules/@web/dev-server-legacy": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@web/dev-server-legacy/-/dev-server-legacy-0.1.7.tgz", - "integrity": "sha512-mWQP4S4mn9OZyFmOBCJM6GfuiOGaaAhWpVYiRgJ8Ib6GlpNCbO3uqslCRHnlvIzTiEkKG/Y6HrymfQAznlUXhw==", - "dev": true, - "dependencies": { - "@babel/core": "^7.12.10", - "@babel/plugin-proposal-dynamic-import": "^7.12.1", - "@babel/plugin-syntax-class-properties": "^7.12.1", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-transform-modules-systemjs": "^7.12.1", - "@babel/plugin-transform-template-literals": "^7.12.1", - "@babel/preset-env": "^7.12.11", - "@web/dev-server-core": "^0.3.0", - "browserslist": "^4.16.0", - "browserslist-useragent": "^3.0.3", - "caniuse-api": "^3.0.0", - "parse5": "^6.0.1", - "polyfills-loader": "^1.7.6", - "valid-url": "^1.0.9" - }, - "engines": { - "node": ">=10.0.0" - } - }, - "packages/tests/node_modules/@web/test-runner": { - "version": "0.13.30", - "resolved": "https://registry.npmjs.org/@web/test-runner/-/test-runner-0.13.30.tgz", - "integrity": "sha512-bMrrpenmPf/NrYUxEWcEx5zWvKBp6EwqnYc451Yl4OLyWSEC4VubwP0TFkNano5o57ADpaRZkTqB0BNb9IGHFw==", - "dev": true, - "dependencies": { - "@web/browser-logs": "^0.2.2", - "@web/config-loader": "^0.1.3", - "@web/dev-server": "^0.1.24", - "@web/test-runner-chrome": "^0.10.7", - "@web/test-runner-commands": "^0.6.2", - "@web/test-runner-core": "^0.10.26", - "@web/test-runner-mocha": "^0.7.5", - "camelcase": "^6.2.0", - "command-line-args": "^5.1.1", - "command-line-usage": "^6.1.1", - "convert-source-map": "^1.7.0", - "diff": "^5.0.0", - "globby": "^11.0.1", - "nanocolors": "^0.2.1", - "portfinder": "^1.0.28", - "source-map": "^0.7.3" - }, - "bin": { - "web-test-runner": "dist/bin.js", - "wtr": "dist/bin.js" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "packages/tests/node_modules/@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "dependencies": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "packages/tests/node_modules/globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "dependencies": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "packages/tests/node_modules/slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, "packages/ts-transformers": { "name": "@lit/ts-transformers", "version": "1.1.2", @@ -39055,125 +38633,11 @@ "@types/fs-extra": "^9.0.1", "@types/node": "^16.7.8", "@types/prettier": "^2.0.1", - "@web/dev-server": "=0.1.30", - "@web/dev-server-legacy": "^0.1.7", - "@web/dev-server-rollup": "=0.3.15", - "@web/test-runner": "=0.13.30", - "@web/test-runner-playwright": "^0.8.8", - "@web/test-runner-saucelabs": "^0.8.0", "@webcomponents/webcomponentsjs": "^2.6.0", "diff": "^5.0.0", "dir-compare": "^3.1.5", "prettier": "^2.3.2", "uvu": "^0.5.1" - }, - "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, - "@web/dev-server": { - "version": "0.1.30", - "resolved": "https://registry.npmjs.org/@web/dev-server/-/dev-server-0.1.30.tgz", - "integrity": "sha512-nUKR+lq06gaCvH6vKmfhPe/Kka1Xp7yN1FN5NEx+Yk4+9CyxZ3UJt2eHXedrcz+XCafxExW114ElEDgCahJowg==", - "dev": true, - "requires": { - "@babel/code-frame": "^7.12.11", - "@types/command-line-args": "^5.0.0", - "@web/config-loader": "^0.1.3", - "@web/dev-server-core": "^0.3.17", - "@web/dev-server-rollup": "^0.3.13", - "camelcase": "^6.2.0", - "command-line-args": "^5.1.1", - "command-line-usage": "^6.1.1", - "debounce": "^1.2.0", - "deepmerge": "^4.2.2", - "ip": "^1.1.5", - "nanocolors": "^0.2.1", - "open": "^8.0.2", - "portfinder": "^1.0.28" - } - }, - "@web/dev-server-legacy": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/@web/dev-server-legacy/-/dev-server-legacy-0.1.7.tgz", - "integrity": "sha512-mWQP4S4mn9OZyFmOBCJM6GfuiOGaaAhWpVYiRgJ8Ib6GlpNCbO3uqslCRHnlvIzTiEkKG/Y6HrymfQAznlUXhw==", - "dev": true, - "requires": { - "@babel/core": "^7.12.10", - "@babel/plugin-proposal-dynamic-import": "^7.12.1", - "@babel/plugin-syntax-class-properties": "^7.12.1", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.10.4", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-transform-modules-systemjs": "^7.12.1", - "@babel/plugin-transform-template-literals": "^7.12.1", - "@babel/preset-env": "^7.12.11", - "@web/dev-server-core": "^0.3.0", - "browserslist": "^4.16.0", - "browserslist-useragent": "^3.0.3", - "caniuse-api": "^3.0.0", - "parse5": "^6.0.1", - "polyfills-loader": "^1.7.6", - "valid-url": "^1.0.9" - } - }, - "@web/test-runner": { - "version": "0.13.30", - "resolved": "https://registry.npmjs.org/@web/test-runner/-/test-runner-0.13.30.tgz", - "integrity": "sha512-bMrrpenmPf/NrYUxEWcEx5zWvKBp6EwqnYc451Yl4OLyWSEC4VubwP0TFkNano5o57ADpaRZkTqB0BNb9IGHFw==", - "dev": true, - "requires": { - "@web/browser-logs": "^0.2.2", - "@web/config-loader": "^0.1.3", - "@web/dev-server": "^0.1.24", - "@web/test-runner-chrome": "^0.10.7", - "@web/test-runner-commands": "^0.6.2", - "@web/test-runner-core": "^0.10.26", - "@web/test-runner-mocha": "^0.7.5", - "camelcase": "^6.2.0", - "command-line-args": "^5.1.1", - "command-line-usage": "^6.1.1", - "convert-source-map": "^1.7.0", - "diff": "^5.0.0", - "globby": "^11.0.1", - "nanocolors": "^0.2.1", - "portfinder": "^1.0.28", - "source-map": "^0.7.3" - } - }, - "@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "requires": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - } - }, - "globby": { - "version": "11.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", - "integrity": "sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==", - "dev": true, - "requires": { - "array-union": "^2.1.0", - "dir-glob": "^3.0.1", - "fast-glob": "^3.2.9", - "ignore": "^5.2.0", - "merge2": "^1.4.1", - "slash": "^3.0.0" - } - }, - "slash": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", - "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", - "dev": true - } } }, "@lit-labs/analyzer": { @@ -39603,7 +39067,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^8.0.3", "@types/trusted-types": "^1.0.1", - "@web/test-runner-mocha": "^0.3.5", "chokidar-cli": "^2.1.0", "concurrently": "^5.3.0", "lit": "^2.0.0", @@ -39624,7 +39087,6 @@ "requires": { "@11ty/eleventy": "^1.0.0", "@lit-labs/ssr": "^2.0.1", - "@web/dev-server": "^0.1.11", "@webcomponents/template-shadowroot": "^0.1.0", "lit": "^2.0.2", "rimraf": "^3.0.2", @@ -39714,8 +39176,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/dev-server": "^0.1.22", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "lit": "^2.0.0", @@ -39729,24 +39189,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "requires": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - } - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -40233,7 +39675,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", @@ -40246,24 +39687,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "requires": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - } - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -40752,7 +40175,6 @@ "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", @@ -40767,24 +40189,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "requires": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - } - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -41270,7 +40674,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "lit": "^2.1.0", @@ -41285,24 +40688,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "requires": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - } - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -41789,7 +41174,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "@webcomponents/scoped-custom-element-registry": "^0.0.3", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", @@ -41804,24 +41188,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "requires": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - } - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -42318,7 +41684,6 @@ "@types/node-fetch": "^2.5.7", "@types/parse5": "^6.0.1", "@types/resolve": "^1.14.0", - "@web/test-runner": "^0.13.16", "@webcomponents/template-shadowroot": "^0.1.0", "chai": "^4.2.0", "command-line-args": "^5.1.1", @@ -42593,7 +41958,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", @@ -42606,24 +41970,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "requires": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - } - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -43106,9 +42452,7 @@ "requires": { "@lit-labs/ssr": "^2.2.0", "@open-wc/testing": "^3.1.5", - "@web/test-runner": "^0.13.28", "@web/test-runner-commands": "^0.6.1", - "@web/test-runner-playwright": "^0.8.8", "@webcomponents/template-shadowroot": "^0.1.0", "lit": "^2.2.5" } @@ -43119,8 +42463,6 @@ "@esm-bundle/chai": "^4.3.4-fix.0", "@types/selenium-webdriver": "^4.0.19", "@web/dev-server-esbuild": "^0.3.0", - "@web/test-runner": "^0.13.27", - "@web/test-runner-mocha": "^0.7.5", "chai": "^4.2.0", "copyfiles": "^2.4.1", "event-target-shim": "^5.0.1", @@ -43137,22 +42479,6 @@ "tslib": "^1.10.0" }, "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, - "@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "requires": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - } - }, "acorn": { "version": "7.4.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", @@ -43757,7 +43083,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", @@ -43771,24 +43096,6 @@ "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==", "dev": true }, - "@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "requires": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - } - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -44433,8 +43740,6 @@ "@lit/reactive-element": "^1.0.0", "@types/chai": "^4.2.12", "@types/mocha": "^9.0.0", - "@web/test-runner": "^0.13.16", - "@web/test-runner-playwright": "^0.8.4", "chai": "^4.2.0", "lit": "^2.0.0", "mocha": "^9.1.1" @@ -47457,70 +46762,6 @@ "valid-url": "^1.0.9" } }, - "@web/dev-server-rollup": { - "version": "0.3.15", - "resolved": "https://registry.npmjs.org/@web/dev-server-rollup/-/dev-server-rollup-0.3.15.tgz", - "integrity": "sha512-hhxvBmNIY19vXeocYB1IBOuhpVpy1L7jbwBarmvC0QJKZsgkxssNTzXJ8iga70c2+H0c/rBz1xUaKuAcov0uOA==", - "dev": true, - "requires": { - "@rollup/plugin-node-resolve": "^11.0.1", - "@web/dev-server-core": "^0.3.16", - "nanocolors": "^0.2.1", - "parse5": "^6.0.1", - "rollup": "^2.66.1", - "whatwg-url": "^11.0.0" - }, - "dependencies": { - "@rollup/plugin-node-resolve": { - "version": "11.2.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", - "integrity": "sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==", - "dev": true, - "requires": { - "@rollup/pluginutils": "^3.1.0", - "@types/resolve": "1.17.1", - "builtin-modules": "^3.1.0", - "deepmerge": "^4.2.2", - "is-module": "^1.0.0", - "resolve": "^1.19.0" - } - }, - "@types/resolve": { - "version": "1.17.1", - "resolved": "https://registry.npmjs.org/@types/resolve/-/resolve-1.17.1.tgz", - "integrity": "sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "tr46": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-3.0.0.tgz", - "integrity": "sha512-l7FvfAHlcmulp8kr+flpQZmVwtu7nfRV7NZujtN0OqES8EL4O4e0qqzL0DC5gAvx/ZC/9lk6rhcUwYvkBnBnYA==", - "dev": true, - "requires": { - "punycode": "^2.1.1" - } - }, - "webidl-conversions": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", - "integrity": "sha512-VwddBukDzu71offAQR975unBIGqfKZpM+8ZX6ySk8nYhVoo5CYaZyzt3YBvYtRtO+aoGlqxPg/B87NGVZ/fu6g==", - "dev": true - }, - "whatwg-url": { - "version": "11.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-11.0.0.tgz", - "integrity": "sha512-RKT8HExMpoYx4igMiVMY83lN6UeITKJlBQ+vR/8ZJ8OCdSiN3RwCq+9gH0+Xzj0+5IrM6i4j/6LuvzbZIQgEcQ==", - "dev": true, - "requires": { - "tr46": "^3.0.0", - "webidl-conversions": "^7.0.0" - } - } - } - }, "@web/parse5-utils": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/@web/parse5-utils/-/parse5-utils-1.3.0.tgz", @@ -47605,22 +46846,6 @@ "source-map": "^0.7.3" }, "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - }, - "@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "requires": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - } - }, "globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -47730,12 +46955,13 @@ } }, "@web/test-runner-mocha": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.3.7.tgz", - "integrity": "sha512-k1oNSEHh6GqLhsXiqfFH49JKrwOFDhfD3qHMGwXdmqgv2/hQ2Qd1z+47LIN/gPWHjhFG8QrmwSS3Rh/KnwCT6A==", + "version": "0.7.5", + "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", + "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", "dev": true, "requires": { - "@types/mocha": "^8.0.1" + "@types/mocha": "^8.2.0", + "@web/test-runner-core": "^0.10.20" }, "dependencies": { "@types/mocha": { @@ -57241,7 +56467,6 @@ "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", "@types/web-ie11": "^0.0.0", - "@web/test-runner-mocha": "^0.7.4", "@webcomponents/shadycss": "^1.8.0", "@webcomponents/template": "^1.4.4", "@webcomponents/webcomponentsjs": "^2.6.0", @@ -57256,24 +56481,6 @@ "resolved": "https://registry.npmjs.org/@types/trusted-types/-/trusted-types-2.0.2.tgz", "integrity": "sha512-F5DIZ36YVLE+PN+Zwws4kJogq47hNgX3Nx6WyDJ3kcplxyke3XIzB8uK5n/Lpm1HBsbGzd6nmGehL8cPekP+Tg==" }, - "@web/test-runner-mocha": { - "version": "0.7.5", - "resolved": "https://registry.npmjs.org/@web/test-runner-mocha/-/test-runner-mocha-0.7.5.tgz", - "integrity": "sha512-12/OBq6efPCAvJpcz3XJs2OO5nHe7GtBibZ8Il1a0QtsGpRmuJ4/m1EF0Fj9f6KHg7JdpGo18A37oE+5hXjHwg==", - "dev": true, - "requires": { - "@types/mocha": "^8.2.0", - "@web/test-runner-core": "^0.10.20" - }, - "dependencies": { - "@types/mocha": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.2.3.tgz", - "integrity": "sha512-ekGvFhFgrc2zYQoX4JeZPmVzZxw6Dtllga7iGHzfbYIYkAMUx/sAFP2GdFpLff+vdHXu5fl7WX9AT+TtqYcsyw==", - "dev": true - } - } - }, "ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", diff --git a/package.json b/package.json index 986e39fe4f..8399f9c522 100644 --- a/package.json +++ b/package.json @@ -164,6 +164,12 @@ "@rollup/plugin-virtual": "^2.1.0", "@typescript-eslint/eslint-plugin": "^5.20.0", "@typescript-eslint/parser": "^5.20.0", + "@web/dev-server": "^0.1.32", + "@web/dev-server-legacy": "^1.0.0", + "@web/test-runner": "^0.13.31", + "@web/test-runner-mocha": "^0.7.5", + "@web/test-runner-playwright": "^0.8.9", + "@web/test-runner-saucelabs": "^0.8.0", "as-table": "^1.0.55", "chalk": "^4.1.0", "eslint": "^8.13.0", diff --git a/packages/labs/context/package.json b/packages/labs/context/package.json index b62f0e9e15..064216596c 100644 --- a/packages/labs/context/package.json +++ b/packages/labs/context/package.json @@ -18,6 +18,7 @@ }, "exports": { ".": { + "types": "./development/index.d.ts", "development": "./development/index.js", "default": "./index.js" } @@ -139,7 +140,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^8.0.3", "@types/trusted-types": "^1.0.1", - "@web/test-runner-mocha": "^0.3.5", "chokidar-cli": "^2.1.0", "concurrently": "^5.3.0", "@lit-internal/scripts": "^1.0.0", diff --git a/packages/labs/context/src/test/context-provider_test.ts b/packages/labs/context/src/test/context-provider_test.ts index cbef45e2b0..0a4031b869 100644 --- a/packages/labs/context/src/test/context-provider_test.ts +++ b/packages/labs/context/src/test/context-provider_test.ts @@ -7,9 +7,7 @@ import {LitElement, html, TemplateResult} from 'lit'; import {property} from 'lit/decorators/property.js'; -import {ContextKey} from '../index.js'; -import {contextProvided} from '../lib/decorators/context-provided.js'; -import {contextProvider} from '../lib/decorators/context-provider.js'; +import {ContextKey, contextProvided, contextProvider} from '@lit-labs/context'; import {assert} from '@esm-bundle/chai'; const simpleContext = 'simple-context' as ContextKey<'simple-context', number>; diff --git a/packages/labs/context/src/test/context-request_test.ts b/packages/labs/context/src/test/context-request_test.ts index 943e034e50..0afa993482 100644 --- a/packages/labs/context/src/test/context-request_test.ts +++ b/packages/labs/context/src/test/context-request_test.ts @@ -7,9 +7,13 @@ import {html, LitElement} from 'lit'; import {property} from 'lit/decorators/property.js'; -import {ContextConsumer, ContextProvider, createContext} from '../index.js'; +import { + ContextConsumer, + ContextProvider, + createContext, + contextProvided, +} from '@lit-labs/context'; import {assert} from '@esm-bundle/chai'; -import {contextProvided} from '../lib/decorators/context-provided.js'; const simpleContext = createContext('simple-context'); diff --git a/packages/labs/context/src/test/late-provider_test.ts b/packages/labs/context/src/test/late-provider_test.ts index c911c916c8..e311666e53 100644 --- a/packages/labs/context/src/test/late-provider_test.ts +++ b/packages/labs/context/src/test/late-provider_test.ts @@ -7,11 +7,13 @@ import {LitElement, html, TemplateResult} from 'lit'; import {property} from 'lit/decorators/property.js'; -import {ContextKey} from '../index.js'; -import {contextProvided} from '../lib/decorators/context-provided.js'; -import {contextProvider} from '../lib/decorators/context-provider.js'; +import { + ContextKey, + contextProvided, + contextProvider, + ContextRoot, +} from '@lit-labs/context'; import {assert} from '@esm-bundle/chai'; -import {ContextRoot} from '../lib/context-root.js'; const simpleContext = 'simple-context' as ContextKey<'simple-context', number>; @@ -55,7 +57,7 @@ suite('late context provider', () => { new ContextRoot().attach(container); container.innerHTML = ` - + `; diff --git a/packages/labs/context/src/test/provider-and-consumer_test.ts b/packages/labs/context/src/test/provider-and-consumer_test.ts index 9168d6ba73..7340c2a656 100644 --- a/packages/labs/context/src/test/provider-and-consumer_test.ts +++ b/packages/labs/context/src/test/provider-and-consumer_test.ts @@ -7,9 +7,7 @@ import {LitElement, html, TemplateResult} from 'lit'; import {property} from 'lit/decorators/property.js'; -import {ContextKey} from '../index.js'; -import {contextProvided} from '../lib/decorators/context-provided.js'; -import {contextProvider} from '../lib/decorators/context-provider.js'; +import {ContextKey, contextProvided, contextProvider} from '@lit-labs/context'; import {assert} from '@esm-bundle/chai'; const simpleContext = 'simple-context' as ContextKey<'simple-context', number>; diff --git a/packages/labs/context/src/test/provider-consumer_test.ts b/packages/labs/context/src/test/provider-consumer_test.ts index a1d89d39c1..3fb2ba4f4c 100644 --- a/packages/labs/context/src/test/provider-consumer_test.ts +++ b/packages/labs/context/src/test/provider-consumer_test.ts @@ -7,9 +7,8 @@ import {LitElement, html, TemplateResult} from 'lit'; import {property} from 'lit/decorators/property.js'; -import {ContextProvider, ContextKey} from '../index.js'; +import {ContextProvider, ContextKey, ContextConsumer} from '@lit-labs/context'; import {assert} from '@esm-bundle/chai'; -import {ContextConsumer} from '../lib/controllers/context-consumer.js'; const simpleContext = 'simple-context' as ContextKey<'simple-context', number>; diff --git a/packages/labs/context/tsconfig.json b/packages/labs/context/tsconfig.json index 093cd4ee85..590b243296 100644 --- a/packages/labs/context/tsconfig.json +++ b/packages/labs/context/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es2019", - "module": "es2015", + "module": "NodeNext", "lib": ["es2021", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "experimentalDecorators": true }, diff --git a/packages/labs/eleventy-plugin-lit/package.json b/packages/labs/eleventy-plugin-lit/package.json index 4197f06287..3065e385c6 100644 --- a/packages/labs/eleventy-plugin-lit/package.json +++ b/packages/labs/eleventy-plugin-lit/package.json @@ -95,7 +95,6 @@ }, "devDependencies": { "@11ty/eleventy": "^1.0.0", - "@web/dev-server": "^0.1.11", "@webcomponents/template-shadowroot": "^0.1.0", "rimraf": "^3.0.2", "uvu": "^0.5.3" diff --git a/packages/labs/motion/package.json b/packages/labs/motion/package.json index 91f8826e3d..9b0f294e78 100644 --- a/packages/labs/motion/package.json +++ b/packages/labs/motion/package.json @@ -18,6 +18,7 @@ }, "exports": { ".": { + "types": "./development/index.d.ts", "development": "./development/index.js", "default": "./index.js" } @@ -143,8 +144,6 @@ "@types/mocha": "^9.0.0", "@types/chai": "^4.0.1", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", - "@web/dev-server": "^0.1.22", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "@lit-internal/scripts": "^1.0.0", diff --git a/packages/labs/motion/src/test/animate_test.ts b/packages/labs/motion/src/test/animate_test.ts index 924a9bae6a..30225cda66 100644 --- a/packages/labs/motion/src/test/animate_test.ts +++ b/packages/labs/motion/src/test/animate_test.ts @@ -22,7 +22,7 @@ import { fadeIn, flyAbove, flyBelow, -} from '../animate.js'; +} from '@lit-labs/motion'; import {assert} from '@esm-bundle/chai'; // Note, since tests are not built with production support, detect DEV_MODE diff --git a/packages/labs/motion/src/test/test-helpers.ts b/packages/labs/motion/src/test/test-helpers.ts index 66d409a138..811132267a 100644 --- a/packages/labs/motion/src/test/test-helpers.ts +++ b/packages/labs/motion/src/test/test-helpers.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {CSSValues} from '../animate.js'; +import {CSSValues} from '@lit-labs/motion'; import {assert} from '@esm-bundle/chai'; let count = 0; diff --git a/packages/labs/motion/tsconfig.json b/packages/labs/motion/tsconfig.json index 0177197caa..95b7142bc5 100644 --- a/packages/labs/motion/tsconfig.json +++ b/packages/labs/motion/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es2019", - "module": "es2015", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "noImplicitOverride": true diff --git a/packages/labs/observers/package.json b/packages/labs/observers/package.json index 202d75d85c..968c4fadea 100644 --- a/packages/labs/observers/package.json +++ b/packages/labs/observers/package.json @@ -18,22 +18,27 @@ }, "exports": { ".": { + "types": "./development/index.d.ts", "development": "./development/index.js", "default": "./index.js" }, "./mutation_controller.js": { + "types": "./development/mutation_controller.d.ts", "development": "./development/mutation_controller.js", "default": "./mutation_controller.js" }, "./performance_controller.js": { + "types": "./development/performance_controller.d.ts", "development": "./development/performance_controller.js", "default": "./performance_controller.js" }, "./resize_controller.js": { + "types": "./development/resize_controller.d.ts", "development": "./development/resize_controller.js", "default": "./resize_controller.js" }, "./intersection_controller.js": { + "types": "./development/intersection_controller.d.ts", "development": "./development/intersection_controller.js", "default": "./intersection_controller.js" } @@ -153,7 +158,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", diff --git a/packages/labs/observers/src/test/intersection_controller_test.ts b/packages/labs/observers/src/test/intersection_controller_test.ts index bf58c7bc22..afeaeabc4e 100644 --- a/packages/labs/observers/src/test/intersection_controller_test.ts +++ b/packages/labs/observers/src/test/intersection_controller_test.ts @@ -12,7 +12,7 @@ import { import { IntersectionController, IntersectionControllerConfig, -} from '../intersection_controller.js'; +} from '@lit-labs/observers/intersection_controller.js'; import {generateElementName, nextFrame} from './test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/labs/observers/src/test/mutation_controller_test.ts b/packages/labs/observers/src/test/mutation_controller_test.ts index 2a6e9cb230..4fb4b98655 100644 --- a/packages/labs/observers/src/test/mutation_controller_test.ts +++ b/packages/labs/observers/src/test/mutation_controller_test.ts @@ -12,7 +12,7 @@ import { import { MutationController, MutationControllerConfig, -} from '../mutation_controller.js'; +} from '@lit-labs/observers/mutation_controller.js'; import {generateElementName, nextFrame} from './test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/labs/observers/src/test/performance_controller_test.ts b/packages/labs/observers/src/test/performance_controller_test.ts index a4cbd7a693..ac59923ffc 100644 --- a/packages/labs/observers/src/test/performance_controller_test.ts +++ b/packages/labs/observers/src/test/performance_controller_test.ts @@ -12,7 +12,7 @@ import { import { PerformanceController, PerformanceControllerConfig, -} from '../performance_controller.js'; +} from '@lit-labs/observers/performance_controller.js'; import {generateElementName, nextFrame} from './test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/labs/observers/src/test/resize_controller_test.ts b/packages/labs/observers/src/test/resize_controller_test.ts index 201c1b3b5b..944ad24b3b 100644 --- a/packages/labs/observers/src/test/resize_controller_test.ts +++ b/packages/labs/observers/src/test/resize_controller_test.ts @@ -12,7 +12,7 @@ import { import { ResizeController, ResizeControllerConfig, -} from '../resize_controller.js'; +} from '@lit-labs/observers/resize_controller.js'; import {generateElementName, nextFrame} from './test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/labs/observers/tsconfig.json b/packages/labs/observers/tsconfig.json index 0177197caa..95b7142bc5 100644 --- a/packages/labs/observers/tsconfig.json +++ b/packages/labs/observers/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es2019", - "module": "es2015", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "noImplicitOverride": true diff --git a/packages/labs/react/package.json b/packages/labs/react/package.json index a4466ffafb..ae60998782 100644 --- a/packages/labs/react/package.json +++ b/packages/labs/react/package.json @@ -18,10 +18,12 @@ }, "exports": { ".": { + "types": "./development/index.d.ts", "development": "./development/index.js", "default": "./index.js" }, "./use-controller.js": { + "types": "./development/use-controller.d.ts", "development": "./development/use-controller.js", "default": "./use-controller.js" } @@ -142,7 +144,6 @@ "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "@lit-internal/scripts": "^1.0.0", diff --git a/packages/labs/react/src/create-component.ts b/packages/labs/react/src/create-component.ts index e86e20fbb8..07dfdecd7a 100644 --- a/packages/labs/react/src/create-component.ts +++ b/packages/labs/react/src/create-component.ts @@ -4,8 +4,6 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import * as ReactModule from 'react'; - const reservedReactProperties = new Set([ 'children', 'localName', @@ -124,7 +122,7 @@ type EventProps = { * registered via `customElements.define`. */ export const createComponent = ( - React: typeof ReactModule, + React: typeof window.React, tagName: string, elementClass: Constructor, events?: E, diff --git a/packages/labs/react/src/test/create-component_test.tsx b/packages/labs/react/src/test/create-component_test.tsx index 0eeb668e19..e1175b3da5 100644 --- a/packages/labs/react/src/test/create-component_test.tsx +++ b/packages/labs/react/src/test/create-component_test.tsx @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import type {EventName} from "../create-component.js"; +import type {EventName} from '@lit-labs/react'; import {ReactiveElement} from '@lit/reactive-element'; import {property} from '@lit/reactive-element/decorators/property.js'; @@ -12,7 +12,7 @@ import {customElement} from '@lit/reactive-element/decorators/custom-element.js' import type * as ReactModule from 'react'; import 'react/umd/react.development.js'; import 'react-dom/umd/react-dom.development.js'; -import {createComponent} from '../create-component.js'; +import {createComponent} from '@lit-labs/react'; import {assert} from '@esm-bundle/chai'; // Needed for JSX expressions @@ -137,7 +137,7 @@ suite('createComponent', () => { basicElementEvents, 'FooBar' ); - + assert.equal(NamedComponent.displayName, 'FooBar'); }); diff --git a/packages/labs/react/src/test/use-controller_test.ts b/packages/labs/react/src/test/use-controller_test.ts index 8e922e0529..6bfe89ec2e 100644 --- a/packages/labs/react/src/test/use-controller_test.ts +++ b/packages/labs/react/src/test/use-controller_test.ts @@ -7,7 +7,7 @@ // import * as ReactModule from 'react'; import 'react/umd/react.development.js'; import 'react-dom/umd/react-dom.development.js'; -import {useController} from '../use-controller.js'; +import {useController} from '@lit-labs/react/use-controller.js'; import {assert} from '@esm-bundle/chai'; import { ReactiveController, diff --git a/packages/labs/react/src/use-controller.ts b/packages/labs/react/src/use-controller.ts index 49d183effe..f2f82d28e5 100644 --- a/packages/labs/react/src/use-controller.ts +++ b/packages/labs/react/src/use-controller.ts @@ -4,14 +4,11 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import type * as ReactModule from 'react'; import { ReactiveController, ReactiveControllerHost, } from '@lit/reactive-element/reactive-controller.js'; -type React = typeof ReactModule; - export type ControllerConstructor = { // eslint-disable-next-line @typescript-eslint/no-explicit-any new (...args: Array): C; @@ -115,7 +112,7 @@ class ReactControllerHost * create function is only called once per component. */ export const useController = ( - React: React, + React: typeof window.React, createController: (host: ReactiveControllerHost) => C ): C => { const {useState, useLayoutEffect} = React; diff --git a/packages/labs/react/tsconfig.json b/packages/labs/react/tsconfig.json index a1ba530bf2..126d2ba49e 100644 --- a/packages/labs/react/tsconfig.json +++ b/packages/labs/react/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es2019", - "module": "es2015", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,11 +17,12 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "jsx": "react", - "noImplicitOverride": true + "noImplicitOverride": true, + "types": ["react", "react-dom", "mocha"] }, "include": ["src/**/*.ts", "src/**/*.tsx"], "exclude": [] diff --git a/packages/labs/router/package.json b/packages/labs/router/package.json index e9390ec983..8e1aeba973 100644 --- a/packages/labs/router/package.json +++ b/packages/labs/router/package.json @@ -21,14 +21,17 @@ }, "exports": { ".": { + "types": "./development/index.d.ts", "development": "./development/index.js", "default": "./index.js" }, "./router.js": { + "types": "./development/router.d.ts", "development": "./development/router.js", "default": "./router.js" }, "./routes.js": { + "types": "./development/routes.d.ts", "development": "./development/routes.js", "default": "./routes.js" } @@ -148,7 +151,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "@lit-internal/scripts": "^1.0.0", diff --git a/packages/labs/router/src/routes.ts b/packages/labs/router/src/routes.ts index 35ac54ce2f..2478d09855 100644 --- a/packages/labs/router/src/routes.ts +++ b/packages/labs/router/src/routes.ts @@ -4,6 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ +/// + import type {ReactiveController, ReactiveControllerHost} from 'lit'; export interface BaseRouteConfig { diff --git a/packages/labs/router/src/test/router_test.ts b/packages/labs/router/src/test/router_test.ts index 7777a81815..1768aa3c7d 100644 --- a/packages/labs/router/src/test/router_test.ts +++ b/packages/labs/router/src/test/router_test.ts @@ -6,7 +6,7 @@ import {assert} from '@esm-bundle/chai'; import type {Test1, Child1, Child2} from './router_test_code.js'; -import type {RouteConfig, PathRouteConfig} from '../routes.js'; +import type {RouteConfig, PathRouteConfig} from '@lit-labs/router/routes.js'; const isPathRouteConfig = (route: RouteConfig): route is PathRouteConfig => route.hasOwnProperty('path'); diff --git a/packages/labs/router/src/test/router_test_code.ts b/packages/labs/router/src/test/router_test_code.ts index 75bc40fe7d..3cdffe5e3c 100644 --- a/packages/labs/router/src/test/router_test_code.ts +++ b/packages/labs/router/src/test/router_test_code.ts @@ -6,8 +6,8 @@ import {LitElement, html} from 'lit'; import {customElement} from 'lit/decorators.js'; -import {Router} from '../router.js'; -import {Routes} from '../routes.js'; +import {Router} from '@lit-labs/router/router.js'; +import {Routes} from '@lit-labs/router/routes.js'; @customElement('router-test-1') export class Test1 extends LitElement { diff --git a/packages/labs/router/tsconfig.json b/packages/labs/router/tsconfig.json index c5e1d025d1..3193713a0f 100644 --- a/packages/labs/router/tsconfig.json +++ b/packages/labs/router/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es2019", - "module": "es2020", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -18,11 +18,10 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "experimentalDecorators": true, - "noImplicitOverride": true, - "types": ["urlpattern-polyfill", "chai", "mocha", "trusted-types"] + "noImplicitOverride": true }, "include": ["src/**/*.ts"], "exclude": [] diff --git a/packages/labs/scoped-registry-mixin/package.json b/packages/labs/scoped-registry-mixin/package.json index cd4f3cdffd..fc00ee92d9 100644 --- a/packages/labs/scoped-registry-mixin/package.json +++ b/packages/labs/scoped-registry-mixin/package.json @@ -18,6 +18,7 @@ }, "exports": { ".": { + "types": "./development/scoped-registry-mixin.d.ts", "development": "./development/scoped-registry-mixin.js", "default": "./scoped-registry-mixin.js" } @@ -142,7 +143,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "@webcomponents/scoped-custom-element-registry": "^0.0.3", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", diff --git a/packages/labs/scoped-registry-mixin/src/test/scoped-registry-mixin_test.ts b/packages/labs/scoped-registry-mixin/src/test/scoped-registry-mixin_test.ts index 7c5a70b223..8a45c3f6de 100644 --- a/packages/labs/scoped-registry-mixin/src/test/scoped-registry-mixin_test.ts +++ b/packages/labs/scoped-registry-mixin/src/test/scoped-registry-mixin_test.ts @@ -6,7 +6,7 @@ import '@webcomponents/scoped-custom-element-registry/scoped-custom-element-registry.min.js'; import {LitElement, html, css} from 'lit'; -import {ScopedRegistryHost} from '../scoped-registry-mixin.js'; +import {ScopedRegistryHost} from '@lit-labs/scoped-registry-mixin'; import {assert} from '@esm-bundle/chai'; // Prevent ie11 or other incompatible browsers from running diff --git a/packages/labs/scoped-registry-mixin/tsconfig.json b/packages/labs/scoped-registry-mixin/tsconfig.json index febc34bb3b..95b7142bc5 100644 --- a/packages/labs/scoped-registry-mixin/tsconfig.json +++ b/packages/labs/scoped-registry-mixin/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es2019", - "module": "es2015", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,12 +17,11 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "noImplicitOverride": true }, "include": ["src/**/*.ts"], - "exclude": [], - "references": [{"path": "../../lit"}] + "exclude": [] } diff --git a/packages/labs/ssr/package.json b/packages/labs/ssr/package.json index da5ed81e9a..176f6fe40b 100644 --- a/packages/labs/ssr/package.json +++ b/packages/labs/ssr/package.json @@ -142,7 +142,6 @@ "@types/node-fetch": "^2.5.7", "@types/parse5": "^6.0.1", "@types/resolve": "^1.14.0", - "@web/test-runner": "^0.13.16", "@webcomponents/template-shadowroot": "^0.1.0", "chai": "^4.2.0", "command-line-args": "^5.1.1", diff --git a/packages/labs/task/package.json b/packages/labs/task/package.json index 031752a6aa..76ad73a65a 100644 --- a/packages/labs/task/package.json +++ b/packages/labs/task/package.json @@ -18,10 +18,12 @@ }, "exports": { ".": { + "types": "./development/index.d.ts", "development": "./development/index.js", "default": "./index.js" }, "./task.js": { + "types": "./development/task.d.ts", "development": "./development/task.js", "default": "./task.js" } @@ -135,7 +137,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "mocha": "^9.1.1", diff --git a/packages/labs/task/src/test/task_test.ts b/packages/labs/task/src/test/task_test.ts index bcb9a1ac79..9ca43321b3 100644 --- a/packages/labs/task/src/test/task_test.ts +++ b/packages/labs/task/src/test/task_test.ts @@ -6,7 +6,7 @@ import {ReactiveElement, PropertyValues} from '@lit/reactive-element'; import {property} from '@lit/reactive-element/decorators/property.js'; -import {initialState, Task, TaskStatus, TaskConfig} from '../task.js'; +import {initialState, Task, TaskStatus, TaskConfig} from '@lit-labs/task'; import {generateElementName, nextFrame} from './test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/labs/task/tsconfig.json b/packages/labs/task/tsconfig.json index 0177197caa..95b7142bc5 100644 --- a/packages/labs/task/tsconfig.json +++ b/packages/labs/task/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es2019", - "module": "es2015", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "noImplicitOverride": true diff --git a/packages/labs/testing/package.json b/packages/labs/testing/package.json index f203395998..d92bf4d1bc 100644 --- a/packages/labs/testing/package.json +++ b/packages/labs/testing/package.json @@ -86,8 +86,6 @@ "lit": "^2.2.5" }, "devDependencies": { - "@open-wc/testing": "^3.1.5", - "@web/test-runner": "^0.13.28", - "@web/test-runner-playwright": "^0.8.8" + "@open-wc/testing": "^3.1.5" } } diff --git a/packages/labs/virtualizer/package.json b/packages/labs/virtualizer/package.json index 0299900dc7..15ed005f03 100644 --- a/packages/labs/virtualizer/package.json +++ b/packages/labs/virtualizer/package.json @@ -104,8 +104,6 @@ "@esm-bundle/chai": "^4.3.4-fix.0", "@types/selenium-webdriver": "^4.0.19", "@web/dev-server-esbuild": "^0.3.0", - "@web/test-runner": "^0.13.27", - "@web/test-runner-mocha": "^0.7.5", "chai": "^4.2.0", "copyfiles": "^2.4.1", "http-server": "^14.1.0", diff --git a/packages/labs/vue-utils/package.json b/packages/labs/vue-utils/package.json index f4d329486a..f78389a1e4 100644 --- a/packages/labs/vue-utils/package.json +++ b/packages/labs/vue-utils/package.json @@ -107,7 +107,6 @@ "@types/chai": "^4.0.1", "@types/mocha": "^9.0.0", "@types/trusted-types": "^2.0.2", - "@web/test-runner-mocha": "^0.7.4", "chokidar-cli": "^3.0.0", "concurrently": "^6.2.1", "@lit-internal/scripts": "^1.0.0", diff --git a/packages/lit-element/package.json b/packages/lit-element/package.json index 217e40725a..14a8a6fdde 100644 --- a/packages/lit-element/package.json +++ b/packages/lit-element/package.json @@ -19,62 +19,77 @@ "type": "module", "exports": { ".": { + "types": "./development/index.d.ts", "development": "./development/index.js", "default": "./index.js" }, "./decorators.js": { + "types": "./development/decorators.d.ts", "development": "./development/decorators.js", "default": "./decorators.js" }, "./decorators/custom-element.js": { + "types": "./development/decorators/custom-element.d.ts", "development": "./development/decorators/custom-element.js", "default": "./decorators/custom-element.js" }, "./decorators/event-options.js": { + "types": "./development/decorators/event-options.d.ts", "development": "./development/decorators/event-options.js", "default": "./decorators/event-options.js" }, "./decorators/property.js": { + "types": "./development/decorators/property.d.ts", "development": "./development/decorators/property.js", "default": "./decorators/property.js" }, "./decorators/query-all.js": { + "types": "./development/decorators/query-all.d.ts", "development": "./development/decorators/query-all.js", "default": "./decorators/query-all.js" }, "./decorators/query-assigned-elements.js": { + "types": "./development/decorators/query-assigned-elements.d.ts", "development": "./development/decorators/query-assigned-elements.js", "default": "./decorators/query-assigned-elements.js" }, "./decorators/query-assigned-nodes.js": { + "types": "./development/decorators/query-assigned-nodes.d.ts", "development": "./development/decorators/query-assigned-nodes.js", "default": "./decorators/query-assigned-nodes.js" }, "./decorators/query-async.js": { + "types": "./development/decorators/query-async.d.ts", "development": "./development/decorators/query-async.js", "default": "./decorators/query-async.js" }, "./decorators/query.js": { + "types": "./development/decorators/query.d.ts", "development": "./development/decorators/query.js", "default": "./decorators/query.js" }, "./decorators/state.js": { + "types": "./development/decorators/state.d.ts", "development": "./development/decorators/state.js", "default": "./decorators/state.js" }, "./experimental-hydrate-support.js": { + "types": "./development/experimental-hydrate-support.d.ts", "development": "./development/experimental-hydrate-support.js", "default": "./experimental-hydrate-support.js" }, "./lit-element.js": { + "types": "./development/lit-element.d.ts", "development": "./development/lit-element.js", "default": "./lit-element.js" }, "./polyfill-support.js": { + "types": "./development/polyfill-support.d.ts", "development": "./development/polyfill-support.js", "default": "./polyfill-support.js" }, "./private-ssr-support.js": { + "types": "./development/private-ssr-support.d.ts", "development": "./development/private-ssr-support.js", "default": "./private-ssr-support.js" } diff --git a/packages/lit-element/src/test/lit-element_dev_mode_test.ts b/packages/lit-element/src/test/lit-element_dev_mode_test.ts index 54d0057a1b..c77c131f4b 100644 --- a/packages/lit-element/src/test/lit-element_dev_mode_test.ts +++ b/packages/lit-element/src/test/lit-element_dev_mode_test.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {LitElement} from '../lit-element.js'; +import {LitElement} from 'lit-element'; import {generateElementName} from './test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/lit-element/src/test/lit-element_styling_apply_test.ts b/packages/lit-element/src/test/lit-element_styling_apply_test.ts index 730f5875c3..3483c1df0f 100644 --- a/packages/lit-element/src/test/lit-element_styling_apply_test.ts +++ b/packages/lit-element/src/test/lit-element_styling_apply_test.ts @@ -5,9 +5,9 @@ */ import '@webcomponents/shadycss/apply-shim.min.js'; -import '../polyfill-support.js'; +import 'lit-element/polyfill-support.js'; -import {html as htmlWithStyles, LitElement, css} from '../lit-element.js'; +import {html as htmlWithStyles, LitElement, css} from 'lit-element'; import { canTestLitElement, diff --git a/packages/lit-element/src/test/lit-element_styling_test.ts b/packages/lit-element/src/test/lit-element_styling_test.ts index 2016c7eca3..f4b9a4e956 100644 --- a/packages/lit-element/src/test/lit-element_styling_test.ts +++ b/packages/lit-element/src/test/lit-element_styling_test.ts @@ -3,7 +3,7 @@ * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import {css, html as htmlWithStyles, LitElement} from '../lit-element.js'; +import {css, html as htmlWithStyles, LitElement} from 'lit-element'; import {html as staticHtml, unsafeStatic} from 'lit-html/static.js'; import { diff --git a/packages/lit-element/src/test/lit-element_test.ts b/packages/lit-element/src/test/lit-element_test.ts index e708a08be2..c261ffaed8 100644 --- a/packages/lit-element/src/test/lit-element_test.ts +++ b/packages/lit-element/src/test/lit-element_test.ts @@ -11,7 +11,7 @@ import { ReactiveElement, Part, nothing, -} from '../lit-element.js'; +} from 'lit-element'; import {directive, AsyncDirective} from 'lit-html/async-directive.js'; import { canTestLitElement, diff --git a/packages/lit-element/src/test/polyfill-support/lit-element-ce-sd-noPatch_test.html b/packages/lit-element/src/test/polyfill-support/lit-element-ce-sd-noPatch_test.html index 023cf36510..6759b27c56 100644 --- a/packages/lit-element/src/test/polyfill-support/lit-element-ce-sd-noPatch_test.html +++ b/packages/lit-element/src/test/polyfill-support/lit-element-ce-sd-noPatch_test.html @@ -32,7 +32,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { @@ -42,7 +42,7 @@ // Note, only test `noPatch` if it's explicitly enabled. This is set // on the `litHtmlPolyfillSupport` object for this purpose. - await import('../../polyfill-support.js'); + await import('lit-element/polyfill-support.js'); if ( // Note, since this file is not built, it doesn't support DEV_MODE // so manually check both globals diff --git a/packages/lit-element/src/test/polyfill-support/lit-element-sd-ce-cp_test.html b/packages/lit-element/src/test/polyfill-support/lit-element-sd-ce-cp_test.html index cb8402f9e5..fdcdd1a996 100644 --- a/packages/lit-element/src/test/polyfill-support/lit-element-sd-ce-cp_test.html +++ b/packages/lit-element/src/test/polyfill-support/lit-element-sd-ce-cp_test.html @@ -22,7 +22,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/lit-element/src/test/polyfill-support/lit-element-sd-ce_test.html b/packages/lit-element/src/test/polyfill-support/lit-element-sd-ce_test.html index f5f1cfd038..97dde96e87 100644 --- a/packages/lit-element/src/test/polyfill-support/lit-element-sd-ce_test.html +++ b/packages/lit-element/src/test/polyfill-support/lit-element-sd-ce_test.html @@ -19,7 +19,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/lit-element/src/test/polyfill-support/lit-element-sd_test.html b/packages/lit-element/src/test/polyfill-support/lit-element-sd_test.html index abf45bc528..111ff65796 100644 --- a/packages/lit-element/src/test/polyfill-support/lit-element-sd_test.html +++ b/packages/lit-element/src/test/polyfill-support/lit-element-sd_test.html @@ -17,7 +17,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/lit-element/src/test/polyfill-support/lit-element_html-test.ts b/packages/lit-element/src/test/polyfill-support/lit-element_html-test.ts index ed30af3ad8..45fb05765f 100644 --- a/packages/lit-element/src/test/polyfill-support/lit-element_html-test.ts +++ b/packages/lit-element/src/test/polyfill-support/lit-element_html-test.ts @@ -3,7 +3,7 @@ * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import '../../polyfill-support.js'; +import 'lit-element/polyfill-support.js'; import '../lit-element_styling_test.js'; import '../lit-element_styling_apply_test.js'; import '../lit-element_test.js'; diff --git a/packages/lit-element/src/test/polyfill-support/lit-element_test.html b/packages/lit-element/src/test/polyfill-support/lit-element_test.html index 15d7b5c78e..efda156f93 100644 --- a/packages/lit-element/src/test/polyfill-support/lit-element_test.html +++ b/packages/lit-element/src/test/polyfill-support/lit-element_test.html @@ -14,7 +14,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/lit-element/tsconfig.json b/packages/lit-element/tsconfig.json index 173ddf13f1..abc7c5e86f 100644 --- a/packages/lit-element/tsconfig.json +++ b/packages/lit-element/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es2019", - "module": "es2015", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "importHelpers": true, diff --git a/packages/lit-element/tsconfig.polyfill-support.json b/packages/lit-element/tsconfig.polyfill-support.json index 7ab5319ed9..4359e844b5 100644 --- a/packages/lit-element/tsconfig.polyfill-support.json +++ b/packages/lit-element/tsconfig.polyfill-support.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es5", - "module": "es2020", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true }, "include": [ diff --git a/packages/lit-html/package.json b/packages/lit-html/package.json index 5a827d9203..35c89a2d55 100644 --- a/packages/lit-html/package.json +++ b/packages/lit-html/package.json @@ -14,114 +14,142 @@ "type": "module", "exports": { ".": { + "types": "./development/lit-html.d.ts", "development": "./development/lit-html.js", "default": "./lit-html.js" }, "./async-directive.js": { + "types": "./development/async-directive.d.ts", "development": "./development/async-directive.js", "default": "./async-directive.js" }, "./directive-helpers.js": { + "types": "./development/directive-helpers.d.ts", "development": "./development/directive-helpers.js", "default": "./directive-helpers.js" }, "./directive.js": { + "types": "./development/directive.d.ts", "development": "./development/directive.js", "default": "./directive.js" }, "./directives/async-append.js": { + "types": "./development/directives/async-append.d.ts", "development": "./development/directives/async-append.js", "default": "./directives/async-append.js" }, "./directives/async-replace.js": { + "types": "./development/directives/async-replace.d.ts", "development": "./development/directives/async-replace.js", "default": "./directives/async-replace.js" }, "./directives/cache.js": { + "types": "./development/directives/cache.d.ts", "development": "./development/directives/cache.js", "default": "./directives/cache.js" }, "./directives/choose.js": { + "types": "./development/directives/choose.d.ts", "development": "./development/directives/choose.js", "default": "./directives/choose.js" }, "./directives/class-map.js": { + "types": "./development/directives/class-map.d.ts", "development": "./development/directives/class-map.js", "default": "./directives/class-map.js" }, "./directives/guard.js": { + "types": "./development/directives/guard.d.ts", "development": "./development/directives/guard.js", "default": "./directives/guard.js" }, "./directives/if-defined.js": { + "types": "./development/directives/if-defined.d.ts", "development": "./development/directives/if-defined.js", "default": "./directives/if-defined.js" }, "./directives/join.js": { + "types": "./development/directives/join.d.ts", "development": "./development/directives/join.js", "default": "./directives/join.js" }, "./directives/keyed.js": { + "types": "./development/directives/keyed.d.ts", "development": "./development/directives/keyed.js", "default": "./directives/keyed.js" }, "./directives/live.js": { + "types": "./development/directives/live.d.ts", "development": "./development/directives/live.js", "default": "./directives/live.js" }, "./directives/map.js": { + "types": "./development/directives/map.d.ts", "development": "./development/directives/map.js", "default": "./directives/map.js" }, "./directives/range.js": { + "types": "./development/directives/range.d.ts", "development": "./development/directives/range.js", "default": "./directives/range.js" }, "./directives/ref.js": { + "types": "./development/directives/ref.d.ts", "development": "./development/directives/ref.js", "default": "./directives/ref.js" }, "./directives/repeat.js": { + "types": "./development/directives/repeat.d.ts", "development": "./development/directives/repeat.js", "default": "./directives/repeat.js" }, "./directives/style-map.js": { + "types": "./development/directives/style-map.d.ts", "development": "./development/directives/style-map.js", "default": "./directives/style-map.js" }, "./directives/template-content.js": { + "types": "./development/directives/template-content.d.ts", "development": "./development/directives/template-content.js", "default": "./directives/template-content.js" }, "./directives/unsafe-html.js": { + "types": "./development/directives/unsafe-html.d.ts", "development": "./development/directives/unsafe-html.js", "default": "./directives/unsafe-html.js" }, "./directives/unsafe-svg.js": { + "types": "./development/directives/unsafe-svg.d.ts", "development": "./development/directives/unsafe-svg.js", "default": "./directives/unsafe-svg.js" }, "./directives/until.js": { + "types": "./development/directives/until.d.ts", "development": "./development/directives/until.js", "default": "./directives/until.js" }, "./directives/when.js": { + "types": "./development/directives/when.d.ts", "development": "./development/directives/when.js", "default": "./directives/when.js" }, "./experimental-hydrate.js": { + "types": "./development/experimental-hydrate.d.ts", "development": "./development/experimental-hydrate.js", "default": "./experimental-hydrate.js" }, "./polyfill-support.js": { + "types": "./development/polyfill-support.d.ts", "development": "./development/polyfill-support.js", "default": "./polyfill-support.js" }, "./private-ssr-support.js": { + "types": "./development/private-ssr-support.d.ts", "development": "./development/private-ssr-support.js", "default": "./private-ssr-support.js" }, "./static.js": { + "types": "./development/static.d.ts", "development": "./development/static.js", "default": "./static.js" } @@ -284,7 +312,6 @@ "@esm-bundle/chai": "^4.1.5", "@types/mocha": "^9.0.0", "@types/web-ie11": "^0.0.0", - "@web/test-runner-mocha": "^0.7.4", "@webcomponents/shadycss": "^1.8.0", "@webcomponents/template": "^1.4.4", "@webcomponents/webcomponentsjs": "^2.6.0", diff --git a/packages/lit-html/src/test/directive-helpers_test.ts b/packages/lit-html/src/test/directive-helpers_test.ts index 56871650aa..6e16d75aea 100644 --- a/packages/lit-html/src/test/directive-helpers_test.ts +++ b/packages/lit-html/src/test/directive-helpers_test.ts @@ -3,8 +3,8 @@ * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import {html, ChildPart, render, svg} from '../lit-html.js'; -import {directive, Directive} from '../directive.js'; +import {html, ChildPart, render, svg} from 'lit-html'; +import {directive, Directive} from 'lit-html/directive.js'; import {assert} from '@esm-bundle/chai'; import {stripExpressionComments} from './test-utils/strip-markers.js'; import { @@ -16,9 +16,9 @@ import { removePart, setChildPartValue, TemplateResultType, -} from '../directive-helpers.js'; -import {classMap} from '../directives/class-map.js'; -import {AsyncDirective} from '../async-directive.js'; +} from 'lit-html/directive-helpers.js'; +import {classMap} from 'lit-html/directives/class-map.js'; +import {AsyncDirective} from 'lit-html/async-directive.js'; suite('directive-helpers', () => { let container: HTMLDivElement; diff --git a/packages/lit-html/src/test/directives/async-append_test.ts b/packages/lit-html/src/test/directives/async-append_test.ts index 5167ab5300..5d6baa8482 100644 --- a/packages/lit-html/src/test/directives/async-append_test.ts +++ b/packages/lit-html/src/test/directives/async-append_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {asyncAppend} from '../../directives/async-append.js'; -import {render, html, nothing} from '../../lit-html.js'; +import {asyncAppend} from 'lit-html/directives/async-append.js'; +import {render, html, nothing} from 'lit-html'; import {TestAsyncIterable} from './test-async-iterable.js'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/lit-html/src/test/directives/async-replace_test.ts b/packages/lit-html/src/test/directives/async-replace_test.ts index 2ad8f581f1..b017e4615e 100644 --- a/packages/lit-html/src/test/directives/async-replace_test.ts +++ b/packages/lit-html/src/test/directives/async-replace_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {asyncReplace} from '../../directives/async-replace.js'; -import {render, html, nothing} from '../../lit-html.js'; +import {asyncReplace} from 'lit-html/directives/async-replace.js'; +import {render, html, nothing} from 'lit-html'; import {TestAsyncIterable} from './test-async-iterable.js'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/lit-html/src/test/directives/cache_test.ts b/packages/lit-html/src/test/directives/cache_test.ts index 534841f1bb..1c9b91d98d 100644 --- a/packages/lit-html/src/test/directives/cache_test.ts +++ b/packages/lit-html/src/test/directives/cache_test.ts @@ -4,11 +4,11 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {html, render, nothing} from '../../lit-html.js'; -import {cache} from '../../directives/cache.js'; +import {html, render, nothing} from 'lit-html'; +import {cache} from 'lit-html/directives/cache.js'; import {stripExpressionComments} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; -import {directive, AsyncDirective} from '../../async-directive.js'; +import {directive, AsyncDirective} from 'lit-html/async-directive.js'; suite('cache directive', () => { let container: HTMLDivElement; diff --git a/packages/lit-html/src/test/directives/choose_test.ts b/packages/lit-html/src/test/directives/choose_test.ts index 949ac1dbf4..ba58bbedba 100644 --- a/packages/lit-html/src/test/directives/choose_test.ts +++ b/packages/lit-html/src/test/directives/choose_test.ts @@ -3,7 +3,7 @@ * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import {choose} from '../../directives/choose.js'; +import {choose} from 'lit-html/directives/choose.js'; import {assert} from '@esm-bundle/chai'; suite('choose', () => { diff --git a/packages/lit-html/src/test/directives/class-map_test.ts b/packages/lit-html/src/test/directives/class-map_test.ts index f976c7a90f..483318b52d 100644 --- a/packages/lit-html/src/test/directives/class-map_test.ts +++ b/packages/lit-html/src/test/directives/class-map_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {html, svg, render} from '../../lit-html.js'; -import {ClassInfo, classMap} from '../../directives/class-map.js'; +import {html, svg, render} from 'lit-html'; +import {ClassInfo, classMap} from 'lit-html/directives/class-map.js'; import {assert} from '@esm-bundle/chai'; suite('classMap directive', () => { diff --git a/packages/lit-html/src/test/directives/guard_test.ts b/packages/lit-html/src/test/directives/guard_test.ts index ab156e8f63..b03e115990 100644 --- a/packages/lit-html/src/test/directives/guard_test.ts +++ b/packages/lit-html/src/test/directives/guard_test.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {html, nothing, render} from '../../lit-html.js'; -import {guard} from '../../directives/guard.js'; -import {Directive, directive, PartInfo} from '../../directive.js'; +import {html, nothing, render} from 'lit-html'; +import {guard} from 'lit-html/directives/guard.js'; +import {Directive, directive, PartInfo} from 'lit-html/directive.js'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/lit-html/src/test/directives/if-defined_test.ts b/packages/lit-html/src/test/directives/if-defined_test.ts index aea77c5d2c..8569f1c744 100644 --- a/packages/lit-html/src/test/directives/if-defined_test.ts +++ b/packages/lit-html/src/test/directives/if-defined_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {ifDefined} from '../../directives/if-defined.js'; -import {html, render} from '../../lit-html.js'; +import {ifDefined} from 'lit-html/directives/if-defined.js'; +import {html, render} from 'lit-html'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/lit-html/src/test/directives/join_test.ts b/packages/lit-html/src/test/directives/join_test.ts index ef0f09b13f..18e5b49b59 100644 --- a/packages/lit-html/src/test/directives/join_test.ts +++ b/packages/lit-html/src/test/directives/join_test.ts @@ -3,10 +3,10 @@ * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import {html} from '../../lit-html.js'; +import {html} from 'lit-html'; import {makeAssertRender} from '../test-utils/assert-render.js'; -import {join} from '../../directives/join.js'; +import {join} from 'lit-html/directives/join.js'; suite('join', () => { let container: HTMLDivElement; diff --git a/packages/lit-html/src/test/directives/keyed_test.ts b/packages/lit-html/src/test/directives/keyed_test.ts index 36f0714703..964998ffad 100644 --- a/packages/lit-html/src/test/directives/keyed_test.ts +++ b/packages/lit-html/src/test/directives/keyed_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {keyed} from '../../directives/keyed.js'; -import {html, render} from '../../lit-html.js'; +import {keyed} from 'lit-html/directives/keyed.js'; +import {html, render} from 'lit-html'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/lit-html/src/test/directives/live_test.ts b/packages/lit-html/src/test/directives/live_test.ts index 0f6fe4965d..f5d1f18fcb 100644 --- a/packages/lit-html/src/test/directives/live_test.ts +++ b/packages/lit-html/src/test/directives/live_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {live} from '../../directives/live.js'; -import {html, noChange, nothing, render} from '../../lit-html.js'; +import {live} from 'lit-html/directives/live.js'; +import {html, noChange, nothing, render} from 'lit-html'; import {assert} from '@esm-bundle/chai'; class LiveTester extends HTMLElement { diff --git a/packages/lit-html/src/test/directives/map_test.ts b/packages/lit-html/src/test/directives/map_test.ts index f83306ff54..8c8a18297c 100644 --- a/packages/lit-html/src/test/directives/map_test.ts +++ b/packages/lit-html/src/test/directives/map_test.ts @@ -3,10 +3,10 @@ * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import {html} from '../../lit-html.js'; +import {html} from 'lit-html'; import {makeAssertRender} from '../test-utils/assert-render.js'; -import {map} from '../../directives/map.js'; +import {map} from 'lit-html/directives/map.js'; suite('map', () => { let container: HTMLDivElement; diff --git a/packages/lit-html/src/test/directives/range_test.ts b/packages/lit-html/src/test/directives/range_test.ts index 7d84cbf220..84b2966351 100644 --- a/packages/lit-html/src/test/directives/range_test.ts +++ b/packages/lit-html/src/test/directives/range_test.ts @@ -3,7 +3,7 @@ * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import {range} from '../../directives/range.js'; +import {range} from 'lit-html/directives/range.js'; import {assert} from '@esm-bundle/chai'; suite('range', () => { diff --git a/packages/lit-html/src/test/directives/ref_test.ts b/packages/lit-html/src/test/directives/ref_test.ts index 4d3a2c4f65..e1c6e1ea9e 100644 --- a/packages/lit-html/src/test/directives/ref_test.ts +++ b/packages/lit-html/src/test/directives/ref_test.ts @@ -3,8 +3,8 @@ * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import {html, render} from '../../lit-html.js'; -import {ref, createRef, RefOrCallback} from '../../directives/ref.js'; +import {html, render} from 'lit-html'; +import {ref, createRef, RefOrCallback} from 'lit-html/directives/ref.js'; import {assert} from '@esm-bundle/chai'; suite('ref', () => { diff --git a/packages/lit-html/src/test/directives/repeat_test.ts b/packages/lit-html/src/test/directives/repeat_test.ts index fb46eb2df0..cd1f869bc2 100644 --- a/packages/lit-html/src/test/directives/repeat_test.ts +++ b/packages/lit-html/src/test/directives/repeat_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {repeat} from '../../directives/repeat.js'; -import {render, html} from '../../lit-html.js'; +import {repeat} from 'lit-html/directives/repeat.js'; +import {render, html} from 'lit-html'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/lit-html/src/test/directives/style-map_test.ts b/packages/lit-html/src/test/directives/style-map_test.ts index 88ae777beb..6f607e883f 100644 --- a/packages/lit-html/src/test/directives/style-map_test.ts +++ b/packages/lit-html/src/test/directives/style-map_test.ts @@ -4,9 +4,9 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {AttributePart, html, render} from '../../lit-html.js'; -import {directive} from '../../directive.js'; -import {StyleInfo, styleMap} from '../../directives/style-map.js'; +import {AttributePart, html, render} from 'lit-html'; +import {directive} from 'lit-html/directive.js'; +import {StyleInfo, styleMap} from 'lit-html/directives/style-map.js'; import {assert} from '@esm-bundle/chai'; const ua = window.navigator.userAgent; diff --git a/packages/lit-html/src/test/directives/template-content_test.ts b/packages/lit-html/src/test/directives/template-content_test.ts index ea3b7a7a72..e4dab27e76 100644 --- a/packages/lit-html/src/test/directives/template-content_test.ts +++ b/packages/lit-html/src/test/directives/template-content_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {templateContent} from '../../directives/template-content.js'; -import {html, render} from '../../lit-html.js'; +import {templateContent} from 'lit-html/directives/template-content.js'; +import {html, render} from 'lit-html'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/lit-html/src/test/directives/unsafe-html_test.ts b/packages/lit-html/src/test/directives/unsafe-html_test.ts index 90005ef119..3b00845d3c 100644 --- a/packages/lit-html/src/test/directives/unsafe-html_test.ts +++ b/packages/lit-html/src/test/directives/unsafe-html_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {unsafeHTML} from '../../directives/unsafe-html.js'; -import {render, html, nothing, noChange} from '../../lit-html.js'; +import {unsafeHTML} from 'lit-html/directives/unsafe-html.js'; +import {render, html, nothing, noChange} from 'lit-html'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/lit-html/src/test/directives/unsafe-svg_test.ts b/packages/lit-html/src/test/directives/unsafe-svg_test.ts index 81755fc601..1a0c984143 100644 --- a/packages/lit-html/src/test/directives/unsafe-svg_test.ts +++ b/packages/lit-html/src/test/directives/unsafe-svg_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {unsafeSVG} from '../../directives/unsafe-svg.js'; -import {render, html, nothing, noChange} from '../../lit-html.js'; +import {unsafeSVG} from 'lit-html/directives/unsafe-svg.js'; +import {render, html, nothing, noChange} from 'lit-html'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/lit-html/src/test/directives/until_test.ts b/packages/lit-html/src/test/directives/until_test.ts index 92dead55ba..09ddd6b6b8 100644 --- a/packages/lit-html/src/test/directives/until_test.ts +++ b/packages/lit-html/src/test/directives/until_test.ts @@ -5,8 +5,8 @@ */ import {assert} from '@esm-bundle/chai'; -import {until} from '../../directives/until.js'; -import {html, nothing, render} from '../../lit-html.js'; +import {until} from 'lit-html/directives/until.js'; +import {html, nothing, render} from 'lit-html'; import {Deferred} from '../test-utils/deferred.js'; import {stripExpressionMarkers} from '../test-utils/strip-markers.js'; import {memorySuite} from '../test-utils/memory.js'; diff --git a/packages/lit-html/src/test/directives/when_test.ts b/packages/lit-html/src/test/directives/when_test.ts index 7d76eba4af..04c4ea6d2d 100644 --- a/packages/lit-html/src/test/directives/when_test.ts +++ b/packages/lit-html/src/test/directives/when_test.ts @@ -3,10 +3,10 @@ * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import {html} from '../../lit-html.js'; +import {html} from 'lit-html'; import {makeAssertRender} from '../test-utils/assert-render.js'; -import {when} from '../../directives/when.js'; +import {when} from 'lit-html/directives/when.js'; suite('when', () => { let container: HTMLDivElement; diff --git a/packages/lit-html/src/test/lit-html_test.ts b/packages/lit-html/src/test/lit-html_test.ts index 94b9487d0c..f06f3b66d1 100644 --- a/packages/lit-html/src/test/lit-html_test.ts +++ b/packages/lit-html/src/test/lit-html_test.ts @@ -17,7 +17,7 @@ import { SanitizerFactory, Part, CompiledTemplate, -} from '../lit-html.js'; +} from 'lit-html'; import { directive, @@ -25,20 +25,20 @@ import { PartType, PartInfo, DirectiveParameters, -} from '../directive.js'; +} from 'lit-html/directive.js'; import {assert} from '@esm-bundle/chai'; import { stripExpressionComments, stripExpressionMarkers, } from './test-utils/strip-markers.js'; -import {repeat} from '../directives/repeat.js'; -import {AsyncDirective} from '../async-directive.js'; +import {repeat} from 'lit-html/directives/repeat.js'; +import {AsyncDirective} from 'lit-html/async-directive.js'; -import {createRef, ref} from '../directives/ref.js'; +import {createRef, ref} from 'lit-html/directives/ref.js'; // For compiled template tests -import {_$LH} from '../private-ssr-support.js'; -import {until} from '../directives/until.js'; +import {_$LH} from 'lit-html/private-ssr-support.js'; +import {until} from 'lit-html/directives/until.js'; const {AttributePart} = _$LH; type AttributePart = InstanceType; diff --git a/packages/lit-html/src/test/polyfill-support/lit-html-apply-force-polyfill_test.html b/packages/lit-html/src/test/polyfill-support/lit-html-apply-force-polyfill_test.html index a651befcbc..ad090f4ff8 100644 --- a/packages/lit-html/src/test/polyfill-support/lit-html-apply-force-polyfill_test.html +++ b/packages/lit-html/src/test/polyfill-support/lit-html-apply-force-polyfill_test.html @@ -23,7 +23,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/lit-html/src/test/polyfill-support/lit-html-apply_html-test.ts b/packages/lit-html/src/test/polyfill-support/lit-html-apply_html-test.ts index 12cdb6abc6..0e68601595 100644 --- a/packages/lit-html/src/test/polyfill-support/lit-html-apply_html-test.ts +++ b/packages/lit-html/src/test/polyfill-support/lit-html-apply_html-test.ts @@ -3,10 +3,10 @@ * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import '../../polyfill-support.js'; +import 'lit-html/polyfill-support.js'; // Rename the html tag so that CSS linting doesn't warn on the non-standard // @apply syntax -import {html as htmlWithApply} from '../../lit-html.js'; +import {html as htmlWithApply} from 'lit-html'; import {renderShadowRoot} from '../test-utils/shadow-root.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/lit-html/src/test/polyfill-support/lit-html-apply_test.html b/packages/lit-html/src/test/polyfill-support/lit-html-apply_test.html index 7b6714782c..685da2d69b 100644 --- a/packages/lit-html/src/test/polyfill-support/lit-html-apply_test.html +++ b/packages/lit-html/src/test/polyfill-support/lit-html-apply_test.html @@ -13,7 +13,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/lit-html/src/test/polyfill-support/lit-html-no-wc_html-test.ts b/packages/lit-html/src/test/polyfill-support/lit-html-no-wc_html-test.ts index cf82f61434..39ad684d5f 100644 --- a/packages/lit-html/src/test/polyfill-support/lit-html-no-wc_html-test.ts +++ b/packages/lit-html/src/test/polyfill-support/lit-html-no-wc_html-test.ts @@ -3,8 +3,8 @@ * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import '../../polyfill-support.js'; -import {html, render} from '../../lit-html.js'; +import 'lit-html/polyfill-support.js'; +import {html, render} from 'lit-html'; import {assert} from '@esm-bundle/chai'; import {ShadyRenderOptions} from '../test-utils/shadow-root.js'; diff --git a/packages/lit-html/src/test/polyfill-support/lit-html-no-wc_test.html b/packages/lit-html/src/test/polyfill-support/lit-html-no-wc_test.html index f40d30388f..458b3d30c2 100644 --- a/packages/lit-html/src/test/polyfill-support/lit-html-no-wc_test.html +++ b/packages/lit-html/src/test/polyfill-support/lit-html-no-wc_test.html @@ -25,7 +25,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/lit-html/src/test/polyfill-support/lit-html-noPatch_test.html b/packages/lit-html/src/test/polyfill-support/lit-html-noPatch_test.html index d984e153b2..dd2799506c 100644 --- a/packages/lit-html/src/test/polyfill-support/lit-html-noPatch_test.html +++ b/packages/lit-html/src/test/polyfill-support/lit-html-noPatch_test.html @@ -32,7 +32,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { @@ -42,7 +42,7 @@ // Note, only test `noPatch` if it's explicitly enabled. This is set // on the `litHtmlPolyfillSupport` object for this purpose. - await import('../../polyfill-support.js'); + await import('lit-html/polyfill-support.js'); if ( // Note, since this file is not built, it doesn't support DEV_MODE // so manually check both globals diff --git a/packages/lit-html/src/test/polyfill-support/lit-html-scoping-shim_html-test.ts b/packages/lit-html/src/test/polyfill-support/lit-html-scoping-shim_html-test.ts index 88cd5b2a31..e955f16907 100644 --- a/packages/lit-html/src/test/polyfill-support/lit-html-scoping-shim_html-test.ts +++ b/packages/lit-html/src/test/polyfill-support/lit-html-scoping-shim_html-test.ts @@ -3,9 +3,9 @@ * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import '../../polyfill-support.js'; +import 'lit-html/polyfill-support.js'; import {renderShadowRoot} from '../test-utils/shadow-root.js'; -import {html} from '../../lit-html.js'; +import {html} from 'lit-html'; import {assert} from '@esm-bundle/chai'; suite('ShadyCSS scoping shim', () => { diff --git a/packages/lit-html/src/test/polyfill-support/lit-html-scoping-shim_test.html b/packages/lit-html/src/test/polyfill-support/lit-html-scoping-shim_test.html index 58f74d4590..234639b374 100644 --- a/packages/lit-html/src/test/polyfill-support/lit-html-scoping-shim_test.html +++ b/packages/lit-html/src/test/polyfill-support/lit-html-scoping-shim_test.html @@ -20,7 +20,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/lit-html/src/test/polyfill-support/lit-html_html-test.ts b/packages/lit-html/src/test/polyfill-support/lit-html_html-test.ts index 30bc026e81..6581722b10 100644 --- a/packages/lit-html/src/test/polyfill-support/lit-html_html-test.ts +++ b/packages/lit-html/src/test/polyfill-support/lit-html_html-test.ts @@ -3,14 +3,14 @@ * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import '../../polyfill-support.js'; -import {html, render as litRender} from '../../lit-html.js'; -import {ref, createRef} from '../../directives/ref.js'; -import {repeat} from '../../directives/repeat.js'; -import {cache} from '../../directives/cache.js'; +import 'lit-html/polyfill-support.js'; +import {html, render as litRender} from 'lit-html'; +import {ref, createRef} from 'lit-html/directives/ref.js'; +import {repeat} from 'lit-html/directives/repeat.js'; +import {cache} from 'lit-html/directives/cache.js'; import {assert} from '@esm-bundle/chai'; import {renderShadowRoot, wrap, shadowRoot} from '../test-utils/shadow-root.js'; -import {html as staticHtml, unsafeStatic} from '../../static.js'; +import {html as staticHtml, unsafeStatic} from 'lit-html/static.js'; import '../lit-html_test.js'; // selected directive tests diff --git a/packages/lit-html/src/test/polyfill-support/lit-html_test.html b/packages/lit-html/src/test/polyfill-support/lit-html_test.html index 787b2a0400..63b8e54149 100644 --- a/packages/lit-html/src/test/polyfill-support/lit-html_test.html +++ b/packages/lit-html/src/test/polyfill-support/lit-html_test.html @@ -19,7 +19,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/lit-html/src/test/static_test.ts b/packages/lit-html/src/test/static_test.ts index 2e9f89886b..39ba789a93 100644 --- a/packages/lit-html/src/test/static_test.ts +++ b/packages/lit-html/src/test/static_test.ts @@ -3,8 +3,8 @@ * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import {render} from '../lit-html.js'; -import {html, literal, unsafeStatic} from '../static.js'; +import {render} from 'lit-html'; +import {html, literal, unsafeStatic} from 'lit-html/static.js'; import {assert} from '@esm-bundle/chai'; import {stripExpressionComments} from './test-utils/strip-markers.js'; diff --git a/packages/lit-html/src/test/test-utils/assert-render.ts b/packages/lit-html/src/test/test-utils/assert-render.ts index 596f8868dd..f2d693d1a8 100644 --- a/packages/lit-html/src/test/test-utils/assert-render.ts +++ b/packages/lit-html/src/test/test-utils/assert-render.ts @@ -3,7 +3,7 @@ * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import {render} from '../../lit-html.js'; +import {render} from 'lit-html'; import {assert} from '@esm-bundle/chai'; import {stripExpressionComments} from './strip-markers.js'; diff --git a/packages/lit-html/src/test/test-utils/shadow-root.ts b/packages/lit-html/src/test/test-utils/shadow-root.ts index b0a2e78b02..9f06724078 100644 --- a/packages/lit-html/src/test/test-utils/shadow-root.ts +++ b/packages/lit-html/src/test/test-utils/shadow-root.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {render, RenderOptions} from '../../lit-html.js'; +import {render, RenderOptions} from 'lit-html'; export interface ShadyRenderOptions extends RenderOptions { scope?: string; diff --git a/packages/lit-html/src/test/version-stability_test.js b/packages/lit-html/src/test/version-stability_test.js index 0d85db8a4e..417d3181ed 100644 --- a/packages/lit-html/src/test/version-stability_test.js +++ b/packages/lit-html/src/test/version-stability_test.js @@ -4,17 +4,17 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import * as litHtml1 from '../../lit-html.js'; -import * as directive1 from '../../directive.js'; -import * as asyncDirective1 from '../../async-directive.js'; -import * as repeat1 from '../../directives/repeat.js'; +import * as litHtml1 from 'lit-html'; +import * as directive1 from 'lit-html/directive.js'; +import * as asyncDirective1 from 'lit-html/async-directive.js'; +import * as repeat1 from 'lit-html/directives/repeat.js'; -import * as litHtml2 from '../../version-stability-build/lit-html.js'; -import * as directive2 from '../../version-stability-build/directive.js'; -import * as asyncDirective2 from '../../version-stability-build/async-directive.js'; -import * as repeat2 from '../../version-stability-build/directives/repeat.js'; +import * as litHtml2 from 'lit-html/version-stability-build/lit-html.js'; +import * as directive2 from 'lit-html/version-stability-build/directive.js'; +import * as asyncDirective2 from 'lit-html/version-stability-build/async-directive.js'; +import * as repeat2 from 'lit-html/version-stability-build/directives/repeat.js'; -import {stripExpressionComments} from '../../development/test/test-utils/strip-markers.js'; +import {stripExpressionComments} from 'lit-html/development/test/test-utils/strip-markers.js'; import {assert} from '@esm-bundle/chai'; const nextFrame = () => new Promise((r) => requestAnimationFrame(() => r())); diff --git a/packages/lit-html/tsconfig.json b/packages/lit-html/tsconfig.json index c353671ff9..a3dc1e0a01 100644 --- a/packages/lit-html/tsconfig.json +++ b/packages/lit-html/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es2019", - "module": "es2020", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "stripInternal": true, "noImplicitOverride": true diff --git a/packages/lit-html/tsconfig.polyfill-support.json b/packages/lit-html/tsconfig.polyfill-support.json index 7ab5319ed9..4359e844b5 100644 --- a/packages/lit-html/tsconfig.polyfill-support.json +++ b/packages/lit-html/tsconfig.polyfill-support.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es5", - "module": "es2020", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true }, "include": [ diff --git a/packages/lit/src/test/lit-element-bundle_test.html b/packages/lit/src/test/lit-element-bundle_test.html index b4176359d8..eebb6315e4 100644 --- a/packages/lit/src/test/lit-element-bundle_test.html +++ b/packages/lit/src/test/lit-element-bundle_test.html @@ -15,7 +15,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; import {assert} from '../node_modules/@esm-bundle/chai/esm/chai.js'; import { getComputedStyleValue, diff --git a/packages/lit/tsconfig.json b/packages/lit/tsconfig.json index f2b45cedcd..e6a120bb07 100644 --- a/packages/lit/tsconfig.json +++ b/packages/lit/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es2019", - "module": "es2015", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "importHelpers": true, diff --git a/packages/lit/tsconfig.polyfill-support.json b/packages/lit/tsconfig.polyfill-support.json index 7d5ce47d9a..2ad8e3b401 100644 --- a/packages/lit/tsconfig.polyfill-support.json +++ b/packages/lit/tsconfig.polyfill-support.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es5", - "module": "es2020", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true }, "include": ["src/env.d.ts", "src/polyfill-support.ts"] diff --git a/packages/localize/package.json b/packages/localize/package.json index 1628518b41..8903fc3ea3 100644 --- a/packages/localize/package.json +++ b/packages/localize/package.json @@ -74,8 +74,6 @@ "@esm-bundle/chai": "^4.1.5", "@types/chai": "^4.2.12", "@types/mocha": "^9.0.0", - "@web/test-runner": "^0.13.16", - "@web/test-runner-playwright": "^0.8.4", "chai": "^4.2.0", "mocha": "^9.1.1" } diff --git a/packages/reactive-element/package.json b/packages/reactive-element/package.json index 5ea1a7fab6..37f47c86a6 100644 --- a/packages/reactive-element/package.json +++ b/packages/reactive-element/package.json @@ -18,62 +18,77 @@ "type": "module", "exports": { ".": { + "types": "./development/reactive-element.d.ts", "development": "./development/reactive-element.js", "default": "./reactive-element.js" }, "./css-tag.js": { + "types": "./development/css-tag.d.ts", "development": "./development/css-tag.js", "default": "./css-tag.js" }, "./decorators.js": { + "types": "./development/decorators.d.ts", "development": "./development/decorators.js", "default": "./decorators.js" }, "./decorators/base.js": { + "types": "./development/decorators/base.d.ts", "development": "./development/decorators/base.js", "default": "./decorators/base.js" }, "./decorators/custom-element.js": { + "types": "./development/decorators/custom-element.d.ts", "development": "./development/decorators/custom-element.js", "default": "./decorators/custom-element.js" }, "./decorators/event-options.js": { + "types": "./development/decorators/event-options.d.ts", "development": "./development/decorators/event-options.js", "default": "./decorators/event-options.js" }, "./decorators/property.js": { + "types": "./development/decorators/property.d.ts", "development": "./development/decorators/property.js", "default": "./decorators/property.js" }, "./decorators/query-all.js": { + "types": "./development/decorators/query-all.d.ts", "development": "./development/decorators/query-all.js", "default": "./decorators/query-all.js" }, "./decorators/query-assigned-elements.js": { + "types": "./development/decorators/query-assigned-elements.d.ts", "development": "./development/decorators/query-assigned-elements.js", "default": "./decorators/query-assigned-elements.js" }, "./decorators/query-assigned-nodes.js": { + "types": "./development/decorators/query-assigned-nodes.d.ts", "development": "./development/decorators/query-assigned-nodes.js", "default": "./decorators/query-assigned-nodes.js" }, "./decorators/query-async.js": { + "types": "./development/decorators/query-async.d.ts", "development": "./development/decorators/query-async.js", "default": "./decorators/query-async.js" }, "./decorators/query.js": { + "types": "./development/decorators/query.d.ts", "development": "./development/decorators/query.js", "default": "./decorators/query.js" }, "./decorators/state.js": { + "types": "./development/decorators/state.d.ts", "development": "./development/decorators/state.js", "default": "./decorators/state.js" }, "./polyfill-support.js": { + "types": "./development/polyfill-support.d.ts", "development": "./development/polyfill-support.js", "default": "./polyfill-support.js" }, "./reactive-controller.js": { + "types": "./development/reactive-controller.d.ts", "development": "./development/reactive-controller.js", "default": "./reactive-controller.js" } diff --git a/packages/reactive-element/src/test/css-tag_test.ts b/packages/reactive-element/src/test/css-tag_test.ts index 2dd24e15cd..1ed1537ba8 100644 --- a/packages/reactive-element/src/test/css-tag_test.ts +++ b/packages/reactive-element/src/test/css-tag_test.ts @@ -9,7 +9,7 @@ import { CSSResult, unsafeCSS, supportsAdoptingStyleSheets, -} from '../css-tag.js'; +} from '@lit/reactive-element/css-tag.js'; import {assert} from '@esm-bundle/chai'; suite('Styling', () => { diff --git a/packages/reactive-element/src/test/decorators/customElement_test.ts b/packages/reactive-element/src/test/decorators/customElement_test.ts index ab86d9faa3..798d6d62b3 100644 --- a/packages/reactive-element/src/test/decorators/customElement_test.ts +++ b/packages/reactive-element/src/test/decorators/customElement_test.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {customElement} from '../../decorators/custom-element.js'; +import {customElement} from '@lit/reactive-element/decorators/custom-element.js'; import {generateElementName} from '../test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/reactive-element/src/test/decorators/eventOptions_test.ts b/packages/reactive-element/src/test/decorators/eventOptions_test.ts index efb50bb1df..2aaf02db4d 100644 --- a/packages/reactive-element/src/test/decorators/eventOptions_test.ts +++ b/packages/reactive-element/src/test/decorators/eventOptions_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {ReactiveElement} from '../../reactive-element.js'; -import {eventOptions} from '../../decorators/event-options.js'; +import {ReactiveElement} from '@lit/reactive-element'; +import {eventOptions} from '@lit/reactive-element/decorators/event-options.js'; import { canTestReactiveElement, generateElementName, diff --git a/packages/reactive-element/src/test/decorators/initializer_decorators_test.ts b/packages/reactive-element/src/test/decorators/initializer_decorators_test.ts index 6ddddf4048..bebf1bf609 100644 --- a/packages/reactive-element/src/test/decorators/initializer_decorators_test.ts +++ b/packages/reactive-element/src/test/decorators/initializer_decorators_test.ts @@ -4,11 +4,11 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {ReactiveElement} from '../../reactive-element.js'; +import {ReactiveElement} from '@lit/reactive-element'; import {generateElementName} from '../test-helpers.js'; -import {decorateProperty} from '../../decorators/base.js'; +import {decorateProperty} from '@lit/reactive-element/decorators/base.js'; import {assert} from '@esm-bundle/chai'; -import {property} from '../../decorators/property.js'; +import {property} from '@lit/reactive-element/decorators/property.js'; suite('Decorators using initializers', () => { let container: HTMLDivElement; diff --git a/packages/reactive-element/src/test/decorators/property_test.ts b/packages/reactive-element/src/test/decorators/property_test.ts index 5511d09a89..e2d6ffa532 100644 --- a/packages/reactive-element/src/test/decorators/property_test.ts +++ b/packages/reactive-element/src/test/decorators/property_test.ts @@ -8,8 +8,8 @@ import { ReactiveElement, PropertyValues, PropertyDeclaration, -} from '../../reactive-element.js'; -import {property} from '../../decorators/property.js'; +} from '@lit/reactive-element'; +import {property} from '@lit/reactive-element/decorators/property.js'; import {generateElementName} from '../test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/reactive-element/src/test/decorators/queryAll_test.ts b/packages/reactive-element/src/test/decorators/queryAll_test.ts index d8932d5be6..f3769fbd5e 100644 --- a/packages/reactive-element/src/test/decorators/queryAll_test.ts +++ b/packages/reactive-element/src/test/decorators/queryAll_test.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {queryAll} from '../../decorators/query-all.js'; +import {queryAll} from '@lit/reactive-element/decorators/query-all.js'; import { canTestReactiveElement, generateElementName, diff --git a/packages/reactive-element/src/test/decorators/queryAssignedElements_test.ts b/packages/reactive-element/src/test/decorators/queryAssignedElements_test.ts index ef8bed4f2b..8239e5aae9 100644 --- a/packages/reactive-element/src/test/decorators/queryAssignedElements_test.ts +++ b/packages/reactive-element/src/test/decorators/queryAssignedElements_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {queryAssignedElements} from '../../decorators/query-assigned-elements.js'; -import {customElement} from '../../decorators/custom-element.js'; +import {queryAssignedElements} from '@lit/reactive-element/decorators/query-assigned-elements.js'; +import {customElement} from '@lit/reactive-element/decorators/custom-element.js'; import { canTestReactiveElement, generateElementName, diff --git a/packages/reactive-element/src/test/decorators/queryAssignedNodes_test.ts b/packages/reactive-element/src/test/decorators/queryAssignedNodes_test.ts index 87c3585c36..f99d0b77f5 100644 --- a/packages/reactive-element/src/test/decorators/queryAssignedNodes_test.ts +++ b/packages/reactive-element/src/test/decorators/queryAssignedNodes_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {queryAssignedNodes} from '../../decorators/query-assigned-nodes.js'; -import {queryAssignedElements} from '../../decorators/query-assigned-elements.js'; +import {queryAssignedNodes} from '@lit/reactive-element/decorators/query-assigned-nodes.js'; +import {queryAssignedElements} from '@lit/reactive-element/decorators/query-assigned-elements.js'; import { canTestReactiveElement, generateElementName, diff --git a/packages/reactive-element/src/test/decorators/queryAsync_test.ts b/packages/reactive-element/src/test/decorators/queryAsync_test.ts index 754fd521a9..cc496644da 100644 --- a/packages/reactive-element/src/test/decorators/queryAsync_test.ts +++ b/packages/reactive-element/src/test/decorators/queryAsync_test.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {queryAsync} from '../../decorators/query-async.js'; +import {queryAsync} from '@lit/reactive-element/decorators/query-async.js'; import { canTestReactiveElement, generateElementName, diff --git a/packages/reactive-element/src/test/decorators/query_test.ts b/packages/reactive-element/src/test/decorators/query_test.ts index 06fccaa6fc..d4524e239f 100644 --- a/packages/reactive-element/src/test/decorators/query_test.ts +++ b/packages/reactive-element/src/test/decorators/query_test.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {query} from '../../decorators/query.js'; +import {query} from '@lit/reactive-element/decorators/query.js'; import { canTestReactiveElement, generateElementName, diff --git a/packages/reactive-element/src/test/decorators/state_test.ts b/packages/reactive-element/src/test/decorators/state_test.ts index 4e9d86f3a8..a5c04e8cff 100644 --- a/packages/reactive-element/src/test/decorators/state_test.ts +++ b/packages/reactive-element/src/test/decorators/state_test.ts @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {ReactiveElement, PropertyValues} from '../../reactive-element.js'; -import {state} from '../../decorators/state.js'; +import {ReactiveElement, PropertyValues} from '@lit/reactive-element'; +import {state} from '@lit/reactive-element/decorators/state.js'; import {generateElementName} from '../test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/reactive-element/src/test/polyfill-support/reactive-element-ce-sd-noPatch_test.html b/packages/reactive-element/src/test/polyfill-support/reactive-element-ce-sd-noPatch_test.html index 3c0ea02001..0a23b96131 100644 --- a/packages/reactive-element/src/test/polyfill-support/reactive-element-ce-sd-noPatch_test.html +++ b/packages/reactive-element/src/test/polyfill-support/reactive-element-ce-sd-noPatch_test.html @@ -32,7 +32,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/reactive-element/src/test/polyfill-support/reactive-element-sd-ce-cp_test.html b/packages/reactive-element/src/test/polyfill-support/reactive-element-sd-ce-cp_test.html index 46214f88e4..8d8845ee8b 100644 --- a/packages/reactive-element/src/test/polyfill-support/reactive-element-sd-ce-cp_test.html +++ b/packages/reactive-element/src/test/polyfill-support/reactive-element-sd-ce-cp_test.html @@ -22,7 +22,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/reactive-element/src/test/polyfill-support/reactive-element-sd-ce_test.html b/packages/reactive-element/src/test/polyfill-support/reactive-element-sd-ce_test.html index f57b91ec20..be14f94e0e 100644 --- a/packages/reactive-element/src/test/polyfill-support/reactive-element-sd-ce_test.html +++ b/packages/reactive-element/src/test/polyfill-support/reactive-element-sd-ce_test.html @@ -19,7 +19,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/reactive-element/src/test/polyfill-support/reactive-element-sd_test.html b/packages/reactive-element/src/test/polyfill-support/reactive-element-sd_test.html index c62f685ec7..249ba0f41f 100644 --- a/packages/reactive-element/src/test/polyfill-support/reactive-element-sd_test.html +++ b/packages/reactive-element/src/test/polyfill-support/reactive-element-sd_test.html @@ -17,7 +17,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/reactive-element/src/test/polyfill-support/reactive-element_html-test.ts b/packages/reactive-element/src/test/polyfill-support/reactive-element_html-test.ts index c078699017..b5b8b2eb47 100644 --- a/packages/reactive-element/src/test/polyfill-support/reactive-element_html-test.ts +++ b/packages/reactive-element/src/test/polyfill-support/reactive-element_html-test.ts @@ -3,7 +3,7 @@ * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause */ -import '../../polyfill-support.js'; +import '@lit/reactive-element/polyfill-support.js'; import '../reactive-element_test.js'; import '../reactive-element_styling_test.js'; import '../css-tag_test.js'; diff --git a/packages/reactive-element/src/test/polyfill-support/reactive-element_test.html b/packages/reactive-element/src/test/polyfill-support/reactive-element_test.html index d21f02f6dd..5876a737e3 100644 --- a/packages/reactive-element/src/test/polyfill-support/reactive-element_test.html +++ b/packages/reactive-element/src/test/polyfill-support/reactive-element_test.html @@ -14,7 +14,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/reactive-element/src/test/reactive-element-controllers_test.ts b/packages/reactive-element/src/test/reactive-element-controllers_test.ts index 501fc1ece7..170f2159dd 100644 --- a/packages/reactive-element/src/test/reactive-element-controllers_test.ts +++ b/packages/reactive-element/src/test/reactive-element-controllers_test.ts @@ -8,7 +8,7 @@ import { PropertyValues, ReactiveElement, ReactiveController, -} from '../reactive-element.js'; +} from '@lit/reactive-element'; import {generateElementName} from './test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/reactive-element/src/test/reactive-element-csp_test.html b/packages/reactive-element/src/test/reactive-element-csp_test.html index a342466537..6fbf42aa10 100644 --- a/packages/reactive-element/src/test/reactive-element-csp_test.html +++ b/packages/reactive-element/src/test/reactive-element-csp_test.html @@ -17,7 +17,7 @@ mocha, sessionFinished, sessionFailed, - } from '../../../tests/node_modules/@web/test-runner-mocha/dist/standalone.js'; + } from '../../../../node_modules/@web/test-runner-mocha/dist/standalone.js'; // import { mocha, sessionFinished, sessionFailed } from '@web/test-runner-mocha'; (async () => { diff --git a/packages/reactive-element/src/test/reactive-element_dev_mode_test.ts b/packages/reactive-element/src/test/reactive-element_dev_mode_test.ts index fe724ae893..ef568a1c94 100644 --- a/packages/reactive-element/src/test/reactive-element_dev_mode_test.ts +++ b/packages/reactive-element/src/test/reactive-element_dev_mode_test.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {ReactiveElement} from '../reactive-element.js'; +import {ReactiveElement} from '@lit/reactive-element'; import {generateElementName} from './test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/reactive-element/src/test/reactive-element_styling_test.ts b/packages/reactive-element/src/test/reactive-element_styling_test.ts index c9931813ef..b23d0a9112 100644 --- a/packages/reactive-element/src/test/reactive-element_styling_test.ts +++ b/packages/reactive-element/src/test/reactive-element_styling_test.ts @@ -8,7 +8,7 @@ import { ReactiveElement, unsafeCSS, CSSResultGroup, -} from '../reactive-element.js'; +} from '@lit/reactive-element'; import { canTestReactiveElement, diff --git a/packages/reactive-element/src/test/reactive-element_test.ts b/packages/reactive-element/src/test/reactive-element_test.ts index b998a24af9..468f46341d 100644 --- a/packages/reactive-element/src/test/reactive-element_test.ts +++ b/packages/reactive-element/src/test/reactive-element_test.ts @@ -11,7 +11,7 @@ import { PropertyDeclarations, PropertyValues, ReactiveElement, -} from '../reactive-element.js'; +} from '@lit/reactive-element'; import {generateElementName, nextFrame} from './test-helpers.js'; import {assert} from '@esm-bundle/chai'; diff --git a/packages/reactive-element/src/test/test-helpers.ts b/packages/reactive-element/src/test/test-helpers.ts index e63388bbfc..4ef1aac871 100644 --- a/packages/reactive-element/src/test/test-helpers.ts +++ b/packages/reactive-element/src/test/test-helpers.ts @@ -4,7 +4,7 @@ * SPDX-License-Identifier: BSD-3-Clause */ -import {ReactiveElement, PropertyValues} from '../reactive-element.js'; +import {ReactiveElement, PropertyValues} from '@lit/reactive-element'; let count = 0; export const generateElementName = () => `x-${count++}`; diff --git a/packages/reactive-element/tsconfig.json b/packages/reactive-element/tsconfig.json index 1836dd4ee0..f2056d3a25 100644 --- a/packages/reactive-element/tsconfig.json +++ b/packages/reactive-element/tsconfig.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es2019", - "module": "es2015", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true, "experimentalDecorators": true, "stripInternal": true, diff --git a/packages/reactive-element/tsconfig.polyfill-support.json b/packages/reactive-element/tsconfig.polyfill-support.json index 7ab5319ed9..4359e844b5 100644 --- a/packages/reactive-element/tsconfig.polyfill-support.json +++ b/packages/reactive-element/tsconfig.polyfill-support.json @@ -2,7 +2,7 @@ "compilerOptions": { "composite": true, "target": "es5", - "module": "es2020", + "module": "NodeNext", "lib": ["es2020", "DOM", "DOM.Iterable"], "declaration": true, "declarationMap": true, @@ -17,7 +17,7 @@ "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitThis": true, - "moduleResolution": "node", + "moduleResolution": "NodeNext", "allowSyntheticDefaultImports": true }, "include": [ diff --git a/packages/tests/.gitignore b/packages/tests/.gitignore index 03a35248a8..158f08898b 100644 --- a/packages/tests/.gitignore +++ b/packages/tests/.gitignore @@ -1,9 +1,5 @@ /node_modules/ /utils/ -rollup-resolve-remap.js -rollup-resolve-remap.js.map -rollup-resolve-remap.d.ts -rollup-resolve-remap.d.ts.map run-web-tests.js run-web-tests.js.map run-web-tests.d.ts @@ -12,7 +8,3 @@ web-test-runner.config.js web-test-runner.config.js.map web-test-runner.config.d.ts web-test-runner.config.d.ts.map -wtr-config.js -wtr-config.js.map -wtr-config.d.ts -wtr-config.d.ts.map diff --git a/packages/tests/package.json b/packages/tests/package.json index f7eb42c275..9f04b68014 100644 --- a/packages/tests/package.json +++ b/packages/tests/package.json @@ -12,12 +12,6 @@ "@types/prettier": "^2.0.1", "@types/diff": "^5.0.0", "@types/fs-extra": "^9.0.1", - "@web/dev-server": "=0.1.30", - "@web/dev-server-legacy": "^0.1.7", - "@web/dev-server-rollup": "=0.3.15", - "@web/test-runner": "=0.13.30", - "@web/test-runner-playwright": "^0.8.8", - "@web/test-runner-saucelabs": "^0.8.0", "@webcomponents/webcomponentsjs": "^2.6.0", "diff": "^5.0.0", "dir-compare": "^3.1.5", @@ -33,10 +27,8 @@ ], "output": [ "utils", - "rollup-resolve-remap.{js,js.map}", "run-web-tests.{js,js.map}", "web-test-runner.config.{js,js.map}", - "wtr-config.{js,js.map}", "tsconfig.tsbuildinfo" ], "clean": "if-file-deleted" diff --git a/packages/tests/src/rollup-resolve-remap.ts b/packages/tests/src/rollup-resolve-remap.ts deleted file mode 100644 index 95d167db1f..0000000000 --- a/packages/tests/src/rollup-resolve-remap.ts +++ /dev/null @@ -1,50 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ - -import * as pathLib from 'path'; -import type {PluginContext, Plugin} from 'rollup'; - -export interface RemapConfig { - root: string; - remap: ReadonlyArray<{from: string; to: string | null}>; -} - -/** - * Rollup plugin that remaps import module specifiers. - * - * Similar to @rollup/plugin-alias, but different in that it works better with - * relative path module specifiers, not just bare module specifiers. - * - * Instead of applying substitutions directly to the original module specifier - * as @rollup/plugin-alias does, we instead first run the standard module - * resolver, giving us a fully qualified path to a module on disk. We then apply - * the given substutitions to that path. This way, the paths we substitute are - * always normalized and relative to a given root directory. - */ -export function resolveRemap({root, remap}: RemapConfig): Plugin { - return { - name: 'resolve-remap', - async resolveId(this: PluginContext, importee: string, importer?: string) { - const resolved = await this.resolve(importee, importer, { - skipSelf: true, - }); - if (!resolved?.id) { - return null; - } - const fullResolvedPath = resolved.id; - const rootRelativePath = pathLib.relative(root, fullResolvedPath); - for (const {from, to} of remap) { - if (rootRelativePath.startsWith(from)) { - if (to == null) { - return null; - } - return pathLib.join(root, rootRelativePath.replace(from, to)); - } - } - return null; - }, - }; -} diff --git a/packages/tests/src/web-test-runner.config.ts b/packages/tests/src/web-test-runner.config.ts index a320ef5e29..d852b9f71f 100644 --- a/packages/tests/src/web-test-runner.config.ts +++ b/packages/tests/src/web-test-runner.config.ts @@ -10,28 +10,16 @@ import { PlaywrightLauncherArgs, ProductType, } from '@web/test-runner-playwright'; -import {fromRollup} from '@web/dev-server-rollup'; import {createSauceLabsLauncher} from '@web/test-runner-saucelabs'; import {legacyPlugin} from '@web/dev-server-legacy'; -import {RemapConfig, resolveRemap} from './rollup-resolve-remap.js'; -import {prodResolveRemapConfig, devResolveRemapConfig} from './wtr-config.js'; import type {BrowserLauncher, TestRunnerConfig} from '@web/test-runner'; -import type {PolyfillConfig} from 'polyfills-loader'; +import type {PolyfillConfig} from '@web/polyfills-loader'; const mode = process.env.MODE || 'dev'; if (!['dev', 'prod'].includes(mode)) { throw new Error(`MODE must be "dev" or "prod", was "${mode}"`); } -let resolveRemapConfig: RemapConfig; -if (mode === 'prod') { - console.log('Using production builds'); - resolveRemapConfig = prodResolveRemapConfig; -} else { - console.log('Using development builds'); - resolveRemapConfig = devResolveRemapConfig; -} - const browserPresets = { // Default set of Playwright browsers to test when running locally. local: [ @@ -188,12 +176,13 @@ const config: TestRunnerConfig = { '../lit-html/development/**/*_test.(js|html)', '../reactive-element/development/**/*_test.(js|html)', ], - nodeResolve: true, + nodeResolve: { + exportConditions: mode === 'dev' ? ['development'] : [], + }, concurrency: Number(process.env.CONCURRENT_FRAMES || 6), // default cores / 2 concurrentBrowsers: Number(process.env.CONCURRENT_BROWSERS || 3), // default 3 browsers, plugins: [ - fromRollup(resolveRemap)(resolveRemapConfig), // Detect browsers without modules (e.g. IE11) and transform to SystemJS // (https://modern-web.dev/docs/dev-server/plugins/legacy/). legacyPlugin({ @@ -226,6 +215,46 @@ const config: TestRunnerConfig = { ], // Only actually log errors. This helps make test output less spammy. filterBrowserLogs: ({type}) => type === 'error', + middleware: [ + /** + * Ensures that when we're in dev mode we only load dev sources, and when + * we're in prod mode we only load prod sources. + * + * The most common way to get an error here is to have a relative import in + * a /test/ module (e.g. `import '../lit-element.js'`). A bare module should + * instead always be used in test modules (e.g. `import + * '../lit-element.js'`). The bare module is necessary, even for imports + * from the same package, so that export conditions take effect. + */ + function devVsProdSourcesChecker(context, next) { + if (mode === 'dev') { + if ( + context.url.includes('/packages/') && + !context.url.includes('/development/') && + // lit doesn't have a dev mode + !context.url.includes('/packages/lit/') && + // some 3rd party modles can come from e.g. /packages/node_modules/* + !context.url.includes('/node_modules/') + ) { + console.log('Unexpected prod request in dev mode:', context.url); + context.response.status = 403; + return; + } + } else { + if ( + context.url.includes('/packages/') && + context.url.includes('/development/') && + // test are always served from /development/ + !context.url.includes('/development/test/') + ) { + console.log('Unexpected dev request in prod mode:', context.url); + context.response.status = 403; + return; + } + } + return next(); + }, + ], browserStartTimeout: 60000, // default 30000 // For ie11 where tests run more slowly, this timeout needs to be long // enough so that blocked tests have time to wait for all previous test files diff --git a/packages/tests/src/wtr-config.ts b/packages/tests/src/wtr-config.ts deleted file mode 100644 index 72ccbfefc0..0000000000 --- a/packages/tests/src/wtr-config.ts +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: BSD-3-Clause - */ - -import * as pathLib from 'path'; -import {fileURLToPath} from 'url'; -import {RemapConfig} from './rollup-resolve-remap.js'; - -const packagesDir = pathLib.resolve( - pathLib.dirname(fileURLToPath(import.meta.url)), - '..' -); - -/** - * rollup-resolve-remap config that remaps any lit-html or lit-element imports - * to their minified production versions (works for both bare and path module - * specifiers). - */ -export const prodResolveRemapConfig: RemapConfig = { - root: packagesDir, - remap: [ - // The development/test/ directories are special, there are no production - // versions of these. - {from: 'lit-html/development/test/', to: null}, - {from: 'lit-element/development/test/', to: null}, - {from: 'reactive-element/development/test/', to: null}, - {from: 'labs/router/development/test/', to: null}, - {from: 'labs/react/development/test/', to: null}, - {from: 'labs/task/development/test/', to: null}, - {from: 'labs/context/development/test/', to: null}, - {from: 'labs/motion/development/test/', to: null}, - // Remap any other development/ modules up one level to the production - // version. - {from: 'lit-html/development/', to: 'lit-html/'}, - {from: 'lit-element/development/', to: 'lit-element/'}, - {from: 'reactive-element/development/', to: 'reactive-element/'}, - {from: 'labs/router/development/', to: 'labs/router/'}, - {from: 'labs/react/development/', to: 'labs/react/'}, - {from: 'labs/task/development/', to: 'labs/task/'}, - {from: 'labs/context/development/', to: 'labs/context/'}, - {from: 'labs/motion/development/', to: 'labs/motion/'}, - ], -}; - -/** - * rollup-resolve-remap config that remaps any lit-html or lit-element imports - * to the un-minified development versions. - */ -export const devResolveRemapConfig: RemapConfig = { - root: packagesDir, - remap: [ - // Don't remap external dependencies. - {from: 'lit-html/node_modules/', to: null}, - {from: 'lit-element/node_modules/', to: null}, - {from: 'reactive-element/node_modules/', to: null}, - // If we're already reaching into development/, nothing to change. - {from: 'lit-html/development/', to: null}, - {from: 'lit-element/development/', to: null}, - {from: 'reactive-element/development/', to: null}, - // Everything else is a production version; remap to the development - // version. - {from: 'lit-html/', to: 'lit-html/development/'}, - {from: 'lit-element/', to: 'lit-element/development/'}, - {from: 'reactive-element/', to: 'reactive-element/development/'}, - ], -};