-
Notifications
You must be signed in to change notification settings - Fork 1k
Add explicit types to tsconfigs in Lit v3 unblocking generated API. #3894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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 detectedLatest commit: d04a3e3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen 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 |
📊 Tachometer Benchmark ResultsSummary⏳ Benchmarks are currently running. Results below are out of date. nop-update
render
update
Results⏳ Benchmarks are currently running. Results below are out of date. ⏱ lit-element-list
render
update
update-reflect
⏱ lit-html-kitchen-sink
render
update
nop-update
⏱ lit-html-repeat
render
update
⏱ lit-html-template-heavy
render
update
⏱ reactive-element-list
render
update
update-reflect
|
|
Should this be a PR against |
|
Benchmarks failing due to chromedriver issue. Everything else is now green. |
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/
|
@augustjk Found a much smaller and nicer solution: lit/lit.dev#1111 (comment) |
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/
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/
* 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]>
* 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]>
Unblock building the Lit 3 branch in Lit.dev repo for generated API. Issue: lit/lit.dev#1111
If the
typesfield is not set, then TypeScript will walk all parent directories collecting all thenode_modules/@typesit encounters. Issue: microsoft/TypeScript#30124This 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
@typesget loaded and break with version mismatches etc.Setting
typesfixes the issue by only loading the global@typesused by the package.Tested by building and testing this within the lit.dev repo. Kept fixing tsconfigs until
npm run buildworked.