Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@AndrewJakubowicz
Copy link
Contributor

@AndrewJakubowicz AndrewJakubowicz commented May 11, 2023

Unblock building the Lit 3 branch in Lit.dev repo for generated API. Issue: lit/lit.dev#1111

If the types field is not set, then TypeScript will walk all parent directories collecting all the node_modules/@types it encounters. Issue: microsoft/TypeScript#30124

This is a problem when generating the documentation because lit.dev nests the Lit monorepo within the Lit.dev repo. This means all the Lit.dev @types get loaded and break with version mismatches etc.

Setting types fixes the issue by only loading the global @types used by the package.

Tested by building and testing this within the lit.dev repo. Kept fixing tsconfigs until npm run build worked.

If this field is not set, then TypeScript will walk all parent
directories collecting all the `node_modules/@types` it encounters.

This is a problem when generating the documentation because lit.dev
nests the Lit monorepo within the Lit.dev repo. This means all the
Lit.dev `@types` get loaded and break with version mismatches etc.

Setting `types` fixes the issue by only loading the global `@types` used
by the package.

Tested by building and testing this within the lit.dev repo. Kept fixing
tsconfigs until `npm run build` worked.
@changeset-bot
Copy link

changeset-bot bot commented May 11, 2023

🦋 Changeset detected

Latest commit: d04a3e3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@AndrewJakubowicz AndrewJakubowicz removed the request for review from benjamind May 11, 2023 00:21
@github-actions
Copy link
Contributor

github-actions bot commented May 11, 2023

📊 Tachometer Benchmark Results

Summary

⏳ Benchmarks are currently running. Results below are out of date.

nop-update

  • lit-html-kitchen-sink: unsure 🔍 -10% - +5% (-1.68ms - +0.89ms)
    this-change vs tip-of-tree

render

  • lit-element-list: 72.18ms - 74.97ms
  • lit-html-kitchen-sink: unsure 🔍 -4% - +10% (-1.33ms - +3.33ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -4% - +2% (-0.48ms - +0.23ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -3% - +3% (-1.88ms - +1.78ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -5% - +1% (-2.47ms - +0.68ms)
    this-change vs tip-of-tree

update

  • lit-element-list: 707.47ms - 712.49ms
  • lit-html-kitchen-sink: unsure 🔍 -3% - +8% (-2.26ms - +6.04ms)
    this-change vs tip-of-tree
  • lit-html-repeat: unsure 🔍 -2% - +3% (-5.25ms - +7.21ms)
    this-change vs tip-of-tree
  • lit-html-template-heavy: unsure 🔍 -1% - +1% (-1.47ms - +1.11ms)
    this-change vs tip-of-tree
  • reactive-element-list: unsure 🔍 -1% - +0% (-9.07ms - +2.55ms)
    this-change vs tip-of-tree

update-reflect

  • lit-element-list: 694.66ms - 700.52ms
  • reactive-element-list: unsure 🔍 -1% - +1% (-6.02ms - +5.17ms)
    this-change vs tip-of-tree

Results

⏳ Benchmarks are currently running. Results below are out of date.
lit-element-list

render

VersionAvg timevs
74.78ms - 79.92ms-

update

VersionAvg timevs
789.13ms - 800.41ms-

update-reflect

VersionAvg timevs
763.10ms - 772.32ms-
lit-html-kitchen-sink

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
32.07ms - 35.35ms-unsure 🔍
-4% - +10%
-1.33ms - +3.33ms
unsure 🔍
-9% - +6%
-3.21ms - +1.93ms
tip-of-tree
tip-of-tree
31.06ms - 34.36msunsure 🔍
-10% - +4%
-3.33ms - +1.33ms
-unsure 🔍
-12% - +3%
-4.22ms - +0.94ms
previous-release
previous-release
32.37ms - 36.33msunsure 🔍
-6% - +10%
-1.93ms - +3.21ms
unsure 🔍
-3% - +13%
-0.94ms - +4.22ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
78.00ms - 83.81ms-unsure 🔍
-3% - +8%
-2.26ms - +6.04ms
unsure 🔍
-2% - +9%
-1.32ms - +6.74ms
tip-of-tree
tip-of-tree
76.05ms - 81.98msunsure 🔍
-7% - +3%
-6.04ms - +2.26ms
-unsure 🔍
-4% - +6%
-3.26ms - +4.90ms
previous-release
previous-release
75.40ms - 80.99msunsure 🔍
-8% - +2%
-6.74ms - +1.32ms
unsure 🔍
-6% - +4%
-4.90ms - +3.26ms
-

nop-update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
15.20ms - 16.30ms-unsure 🔍
-10% - +5%
-1.68ms - +0.89ms
unsure 🔍
-4% - +6%
-0.69ms - +0.88ms
tip-of-tree
tip-of-tree
14.98ms - 17.31msunsure 🔍
-6% - +11%
-0.89ms - +1.68ms
-unsure 🔍
-5% - +11%
-0.80ms - +1.78ms
previous-release
previous-release
15.10ms - 16.21msunsure 🔍
-6% - +4%
-0.88ms - +0.69ms
unsure 🔍
-11% - +5%
-1.78ms - +0.80ms
-
lit-html-repeat

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
10.43ms - 10.95ms-unsure 🔍
-4% - +2%
-0.48ms - +0.23ms
unsure 🔍
-6% - +1%
-0.67ms - +0.10ms
tip-of-tree
tip-of-tree
10.58ms - 11.06msunsure 🔍
-2% - +5%
-0.23ms - +0.48ms
-unsure 🔍
-5% - +2%
-0.53ms - +0.22ms
previous-release
previous-release
10.69ms - 11.26msunsure 🔍
-1% - +6%
-0.10ms - +0.67ms
unsure 🔍
-2% - +5%
-0.22ms - +0.53ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
253.02ms - 261.90ms-unsure 🔍
-2% - +3%
-5.25ms - +7.21ms
unsure 🔍
-3% - +2%
-7.92ms - +4.93ms
tip-of-tree
tip-of-tree
252.12ms - 260.85msunsure 🔍
-3% - +2%
-7.21ms - +5.25ms
-unsure 🔍
-3% - +1%
-8.85ms - +3.91ms
previous-release
previous-release
254.31ms - 263.60msunsure 🔍
-2% - +3%
-4.93ms - +7.92ms
unsure 🔍
-2% - +3%
-3.91ms - +8.85ms
-
lit-html-template-heavy

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
56.35ms - 58.59ms-unsure 🔍
-3% - +3%
-1.88ms - +1.78ms
unsure 🔍
-3% - +3%
-1.84ms - +1.65ms
tip-of-tree
tip-of-tree
56.07ms - 58.97msunsure 🔍
-3% - +3%
-1.78ms - +1.88ms
-unsure 🔍
-4% - +3%
-2.03ms - +1.93ms
previous-release
previous-release
56.23ms - 58.91msunsure 🔍
-3% - +3%
-1.65ms - +1.84ms
unsure 🔍
-3% - +4%
-1.93ms - +2.03ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
114.76ms - 116.60ms-unsure 🔍
-1% - +1%
-1.47ms - +1.11ms
unsure 🔍
-2% - +1%
-1.79ms - +1.05ms
tip-of-tree
tip-of-tree
114.96ms - 116.76msunsure 🔍
-1% - +1%
-1.11ms - +1.47ms
-unsure 🔍
-1% - +1%
-1.60ms - +1.22ms
previous-release
previous-release
114.97ms - 117.13msunsure 🔍
-1% - +2%
-1.05ms - +1.79ms
unsure 🔍
-1% - +1%
-1.22ms - +1.60ms
-
reactive-element-list

render

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
50.09ms - 52.34ms-unsure 🔍
-3% - +3%
-1.29ms - +1.76ms
unsure 🔍
-4% - +3%
-1.87ms - +1.41ms
tip-of-tree
tip-of-tree
49.95ms - 52.01msunsure 🔍
-3% - +3%
-1.76ms - +1.29ms
-unsure 🔍
-4% - +2%
-2.05ms - +1.11ms
previous-release
previous-release
50.26ms - 52.64msunsure 🔍
-3% - +4%
-1.41ms - +1.87ms
unsure 🔍
-2% - +4%
-1.11ms - +2.05ms
-

update

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
816.03ms - 826.26ms-unsure 🔍
-0% - +1%
-3.67ms - +10.94ms
unsure 🔍
-1% - +1%
-4.74ms - +11.49ms
tip-of-tree
tip-of-tree
812.29ms - 822.73msunsure 🔍
-1% - +0%
-10.94ms - +3.67ms
-unsure 🔍
-1% - +1%
-8.45ms - +7.92ms
previous-release
previous-release
811.47ms - 824.07msunsure 🔍
-1% - +1%
-11.49ms - +4.74ms
unsure 🔍
-1% - +1%
-7.92ms - +8.45ms
-

update-reflect

VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
vs previous-release
previous-release
this-change
809.07ms - 819.68ms-unsure 🔍
-1% - +1%
-6.39ms - +8.77ms
unsure 🔍
-1% - +1%
-6.76ms - +9.19ms
tip-of-tree
tip-of-tree
807.78ms - 818.59msunsure 🔍
-1% - +1%
-8.77ms - +6.39ms
-unsure 🔍
-1% - +1%
-8.01ms - +8.06ms
previous-release
previous-release
807.21ms - 819.11msunsure 🔍
-1% - +1%
-9.19ms - +6.76ms
unsure 🔍
-1% - +1%
-8.06ms - +8.01ms
-

tachometer-reporter-action v2 for Benchmarks

@AndrewJakubowicz
Copy link
Contributor Author

Should this be a PR against main? It only impacts version 3 as far as I can tell (from Lit.dev testing).

@AndrewJakubowicz AndrewJakubowicz requested a review from rictic May 11, 2023 18:55
@AndrewJakubowicz
Copy link
Contributor Author

Benchmarks failing due to chromedriver issue. Everything else is now green.

@AndrewJakubowicz AndrewJakubowicz requested a review from augustjk May 11, 2023 19:18
AndrewJakubowicz added a commit to lit/lit.dev that referenced this pull request May 11, 2023
Currently the Lit 3 commit being used is
d04a3e30eb3ae3520fb0ac163fb5ddbbf6030620 because
lit/lit#3894 fixes building Lit 3.

API docs are visible at /docs/api/v3/
@AndrewJakubowicz
Copy link
Contributor Author

@augustjk Found a much smaller and nicer solution: lit/lit.dev#1111 (comment)

@AndrewJakubowicz AndrewJakubowicz deleted the explicit-types-tsconfig branch May 11, 2023 21:36
AndrewJakubowicz added a commit to lit/lit.dev that referenced this pull request May 11, 2023
Currently the Lit 3 commit being used is
d04a3e30eb3ae3520fb0ac163fb5ddbbf6030620 because
lit/lit#3894 fixes building Lit 3.

API docs are visible at /docs/api/v3/
AndrewJakubowicz added a commit to lit/lit.dev that referenced this pull request May 12, 2023
Currently the Lit 3 commit being used is
d04a3e30eb3ae3520fb0ac163fb5ddbbf6030620 because
lit/lit#3894 fixes building Lit 3.

API docs are visible at /docs/api/v3/
AndrewJakubowicz added a commit to lit/lit.dev that referenced this pull request May 15, 2023
* Copy over all unversioned content into a versioned directory

The only file changed in the move is the root `docs.json` file. Instead
a `v2.json` file was added.

* Add initial build-unversioned-docs script.

This copies over and adds the correct permalinks to the selected
version content. Currently moving `v2` -> `unversioned`.

* Fix wireit so npm run dev doesnt spin infinitely.

* Add rel=canonical link from latestVersion to unversioned page.

* Make all authored cross links versioned.

Unversioned links will be generated automatically by the generated
unversioned pages.

* Add fixUnversionedCrossLinks so unversioned cross-linking work.

This works by piping all the content through a function that will
fix cross links on unversioned pages.

* Add integration tests checking added features.

* unblock failing link by adding it to the known good list.

* Fix api shortcode such that it uses a versioned URL

The versioned URL is stripped for unversioned URLs by our tooling.

Add a test to confirm this behavior.

* Apply code review feedback. Thank you!

* Code review feedback from Justin

 - Replaced sync fs with async fs.
 - Made lightweight YAML parser more robust using regex.

* Add undiscoverable v3 generated documentation.

Currently the Lit 3 commit being used is
d04a3e30eb3ae3520fb0ac163fb5ddbbf6030620 because
lit/lit#3894 fixes building Lit 3.

API docs are visible at /docs/api/v3/

* Explicitly bump node heap size.

This will hopefully avoid the Github Actions failures.

* Add types/codemirror to fix TS 5 error.

Thank you Augustine! Re-ran generator with no content changes.

* Remove unneeded dependency

Co-authored-by: Augustine Kim <[email protected]>

* Code review feedback with Wireit env.

* Fix formatting & filter out v3/api/index.html page

---------

Co-authored-by: Augustine Kim <[email protected]>
AndrewJakubowicz added a commit to lit/lit.dev that referenced this pull request May 15, 2023
* Copy over all unversioned content into a versioned directory

The only file changed in the move is the root `docs.json` file. Instead
a `v2.json` file was added.

* Add initial build-unversioned-docs script.

This copies over and adds the correct permalinks to the selected
version content. Currently moving `v2` -> `unversioned`.

* Fix wireit so npm run dev doesnt spin infinitely.

* Add rel=canonical link from latestVersion to unversioned page.

* Make all authored cross links versioned.

Unversioned links will be generated automatically by the generated
unversioned pages.

* Add fixUnversionedCrossLinks so unversioned cross-linking work.

This works by piping all the content through a function that will
fix cross links on unversioned pages.

* Add integration tests checking added features.

* unblock failing link by adding it to the known good list.

* Fix api shortcode such that it uses a versioned URL

The versioned URL is stripped for unversioned URLs by our tooling.

Add a test to confirm this behavior.

* Apply code review feedback. Thank you!

* Code review feedback from Justin

 - Replaced sync fs with async fs.
 - Made lightweight YAML parser more robust using regex.

* Add undiscoverable v3 generated documentation.

Currently the Lit 3 commit being used is
d04a3e30eb3ae3520fb0ac163fb5ddbbf6030620 because
lit/lit#3894 fixes building Lit 3.

API docs are visible at /docs/api/v3/

* Explicitly bump node heap size.

This will hopefully avoid the Github Actions failures.

* Add types/codemirror to fix TS 5 error.

Thank you Augustine! Re-ran generator with no content changes.

* Remove unneeded dependency

Co-authored-by: Augustine Kim <[email protected]>

* Code review feedback with Wireit env.

* Fix formatting & filter out v3/api/index.html page

* Copy over v2 docs to v3 unchanged.

* Add banner and config

* Fix all cross links in v3 docs to be v3 specific.

 - Find replace all /v2/ with /v3/
 - Replace api shortcode with api-v3 shortcode - linking to v3 api docs

* Add Lit 3.0 upgrade guide - first attempt.

* Add v3 to the Lit.dev dropdown.

* Upstream ssr client-usage docs to v3 page.

This makes the page a duplicate of the v2 page. Git for some reason did
not include these changes when merging from main.

* Remove pre-release v3 docs from search index

* Add version links so that v2 <-> v3 changing doesnt change page.

A user on v2 docs for a certain page should remain on that page when
switching to v3 and vice-versa. This change makes it so switching
between v2 and v3 will keep you on the same page, but provide the
different versions of the page.

Tested manually on every single page.

* Update tools section for v3 (#1118)

* Update tools section for v3

* Better wording for versions tested

* Add pre-releases banner content to v3 banner.

* Update packages/lit-dev-content/site/docs/v3/releases/upgrade.md

Co-authored-by: Augustine Kim <[email protected]>

* Update packages/lit-dev-content/site/docs/v3/releases/upgrade.md

Co-authored-by: Augustine Kim <[email protected]>

* Lit 3.0 pre-releases blog post (#1115)

* Lit 3.0 pre-releases blog post

* Apply suggestions from code review

* Add link to upgrade guide

---------

Co-authored-by: Augustine Kim <[email protected]>

* Remove a small paragraph that didn't really make sense from upgrade.

* Add missing word "can".

* Fix blog dropdown referring 3.0 -> v3

---------

Co-authored-by: Augustine Kim <[email protected]>
Co-authored-by: Justin Fagnani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant