Skip to content
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

update vitepress, fix a build crash, add a sitemap #1809

Merged
merged 3 commits into from
Aug 16, 2023

Conversation

Fil
Copy link
Contributor

@Fil Fil commented Aug 16, 2023

Re: the crash, I don't understand why it doesn't seem to happen in production. When I call yarn docs:build with the current main branch, I get dozens of errors:

✓ building client + server bundles...
⠹ rendering pages...TypeError: Function.prototype.apply was called on undefined, which is a undefined and not a function
    at Module.plot (file:///Users/fil/Sites/plot/docs/.vitepress/.temp/plot.c0318f47.js:5839:12)
    at Proxy.render (file:///Users/fil/Sites/plot/docs/.vitepress/.temp/PlotRender.53d19871.js:788:35)
    at renderComponentRoot (/Users/fil/Sites/plot/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js:399:16)
    at renderComponentSubTree (/Users/fil/Sites/plot/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:440:28)
    at renderComponentVNode (/Users/fil/Sites/plot/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:371:12)
    at ssrRenderComponent (/Users/fil/Sites/plot/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js:86:10)

plot.c0318f47.js:5839 is our figure.append(...legends, svg).

@Fil Fil requested a review from mbostock August 16, 2023 07:53
@@ -72,7 +72,7 @@
"ts-morph": "^19.0.0",
"typescript": "^5.0.2",
"vite": "^4.0.0",
"vitepress": "^1.0.0-beta.2"
"vitepress": "^1.0.0-rc.4"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn’t strictly necessary (we could have upgraded vitepress with just yarn upgrade and changing the yarn.lock file. But I guess since we’re using the sitemap feature added in beta.7, this is okay. The point being, 1.0.0-rc.4 is already consistent with ^1.0.0-beta.2.

yarn.lock Outdated
version "1.0.0-beta.6"
resolved "https://registry.yarnpkg.com/vitepress/-/vitepress-1.0.0-beta.6.tgz#f5439bcbb53ab9a51f6f2b2a57d1bfad19cff476"
integrity sha512-xK/ulKgQpKZVbvlL4+/vW49VG7ySi5nmSoKUNH1G4kM+Cj9JwYM+PDJO7jSJROv8zW99G0ise+maDYnaLlbGBQ==
vite@^4.4.9:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like we’ve picked up multiple copies of rollup and vite in this upgrade. This is why I generally prefer to upgrade everything at once via yarn upgrade rather than doing it piecemeal. I’ll do that now and push to this branch.

@mbostock mbostock enabled auto-merge (squash) August 16, 2023 16:13
Fil and others added 3 commits August 16, 2023 09:14
- fix a crash with docs:build and figure.append / el.append
- generate a sitemap at ./docs/.vitepress/dist/sitemap.xml
@mbostock mbostock merged commit ee0bf3e into main Aug 16, 2023
1 check passed
@mbostock mbostock deleted the fil/vitepress-1.0.0-rc.4 branch August 16, 2023 16:17
@mbostock
Copy link
Member

I had to downgrade Vite & Vitepress in 2511ef3 due to client-side navigation being broken. (The left nav would often scroll up to the top and reset which sections were open.)

@Fil
Copy link
Contributor Author

Fil commented Aug 16, 2023

issue reported upstream vuejs/vitepress#2796

Fil added a commit that referenced this pull request Aug 21, 2023
* - upgrade vitepress
- fix a crash with docs:build and figure.append / el.append
- generate a sitemap at ./docs/.vitepress/dist/sitemap.xml

* yarn upgrade

* append coerces to text

---------

Co-authored-by: Mike Bostock <[email protected]>
chaichontat pushed a commit to chaichontat/plot that referenced this pull request Jan 14, 2024
* - upgrade vitepress
- fix a crash with docs:build and figure.append / el.append
- generate a sitemap at ./docs/.vitepress/dist/sitemap.xml

* yarn upgrade

* append coerces to text

---------

Co-authored-by: Mike Bostock <[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.

2 participants