From 5c7ff49cebf79d5865bd4316ebc154ed7e75e35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Naoki=20Tomita=F0=9F=90=B1?= Date: Wed, 1 Nov 2023 20:40:56 +0900 Subject: [PATCH] Update library --- app/pages/demos/stargazers.tsx | 3 +- app/pages/documents/_id_.tsx | 8 +-- app/yarn.lock | 112 ++++++--------------------------- 3 files changed, 22 insertions(+), 101 deletions(-) diff --git a/app/pages/demos/stargazers.tsx b/app/pages/demos/stargazers.tsx index 6a7a170..e4f57c4 100644 --- a/app/pages/demos/stargazers.tsx +++ b/app/pages/demos/stargazers.tsx @@ -1,5 +1,4 @@ import { Component, h } from "nzxt/h"; -import fetch from "node-fetch"; const Counter: Component<{ stargazersCount: number }> = ({ stargazersCount }) => { return ( @@ -16,4 +15,4 @@ Counter.getInitialPrpos = async () => { return { stargazersCount: repo.stargazers_count }; } -export default Counter \ No newline at end of file +export default Counter diff --git a/app/pages/documents/_id_.tsx b/app/pages/documents/_id_.tsx index f0f94c4..275e4a2 100644 --- a/app/pages/documents/_id_.tsx +++ b/app/pages/documents/_id_.tsx @@ -1,5 +1,5 @@ import { h, Component } from "nzxt/h"; -import marked from "marked"; +import { marked } from "marked"; import { Header } from "../../components/Header"; import { Content } from "../../components/Content"; import { Html } from "../../components/Html"; @@ -7,10 +7,6 @@ import { readFileAsync } from "../../FSUtils"; import { styled } from "zstyl"; import { Title } from "../../components/Title"; -function markedAsync(md: string) { - return new Promise((ok, ng) => marked(md, (e, d) => e ? ng(e) : ok(d))); -} - interface Content { title: string; file?: string; @@ -111,7 +107,7 @@ const Document: Component<{ Document.getInitialPrpos = async ({ params }) => { const [toc, html]: [Content[], string] = await Promise.all([ readFileAsync("./docs/table-of-contents.json").then(it => JSON.parse(it)), - readFileAsync(`./docs/${params.id}.md`).then(markedAsync), + readFileAsync(`./docs/${params.id}.md`).then(marked), ]); const flatToc = toc.map(it => it.contents ? it.contents : it).flat(); const currentIndex = flatToc.findIndex(it => it.file === params.id); diff --git a/app/yarn.lock b/app/yarn.lock index 9c5d2ef..fbb54d6 100644 --- a/app/yarn.lock +++ b/app/yarn.lock @@ -112,48 +112,25 @@ resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz#faad84c41ba12e3a0acb52571df9bff37bee75f6" integrity sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw== -"@types/marked@^2.0.1": - version "2.0.5" - resolved "https://registry.yarnpkg.com/@types/marked/-/marked-2.0.5.tgz#453e27f1e97199d45bb25297b0dd2b9bbc1e05ea" - integrity sha512-shRZ7XnYFD/8n8zSjKvFdto1QNSf4tONZIlNEZGrJe8GsOE8DL/hG1Hbl8gZlfLnjS7+f5tZGIaTgfpyW38h4w== - -"@types/node-fetch@^2.6.2": - version "2.6.8" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.6.8.tgz#9a2993583975849c2e1f360b6ca2f11755b2c504" - integrity sha512-nnH5lV9QCMPsbEVdTb5Y+F3GQxLSw1xQgIydrb2gSfEavRPs50FnMr+KUaa+LoPSqibm2N+ZZxH7lavZlAT4GA== +"@types/marked@^6.0.0": + version "6.0.0" + resolved "https://registry.yarnpkg.com/@types/marked/-/marked-6.0.0.tgz#4dbc7df4add578ef87eb6ca2c6927c97b0531abf" + integrity sha512-jmjpa4BwUsmhxcfsgUit/7A9KbrC48Q0q8KvnY107ogcjGgTFDlIL3RpihNpx2Mu1hM4mdFQjoVc4O6JoGKHsA== dependencies: - "@types/node" "*" - form-data "^4.0.0" + marked "*" -"@types/node@*": +"@types/node@^20.8.10": version "20.8.10" resolved "https://registry.yarnpkg.com/@types/node/-/node-20.8.10.tgz#a5448b895c753ae929c26ce85cab557c6d4a365e" integrity sha512-TlgT8JntpcbmKUFzjhsyhGfP2fsiz1Mv56im6enJ905xG1DAYesxJaeSbGqQmAw8OWPdhyJGhGSQGKRNJ45u9w== dependencies: undici-types "~5.26.4" -"@types/node@^16.0.0": - version "16.18.60" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.60.tgz#0b0f4316906f1bd0e03b640363f67bd4e86958bd" - integrity sha512-ZUGPWx5vKfN+G2/yN7pcSNLkIkXEvlwNaJEd4e0ppX7W2S8XAkdc/37hM4OUNJB9sa0p12AOvGvxL4JCPiz9DA== - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q== - buffer-from@^1.0.0: version "1.1.2" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -combined-stream@^1.0.8: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" @@ -161,11 +138,6 @@ debug@^4.3.4: dependencies: ms "2.1.2" -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ== - esbuild-register@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/esbuild-register/-/esbuild-register-3.5.0.tgz#449613fb29ab94325c722f560f800dd946dc8ea8" @@ -201,45 +173,17 @@ esbuild@^0.19.5: "@esbuild/win32-ia32" "0.19.5" "@esbuild/win32-x64" "0.19.5" -form-data@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" - integrity sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -marked@^2.1.3: - version "2.1.3" - resolved "https://registry.yarnpkg.com/marked/-/marked-2.1.3.tgz#bd017cef6431724fd4b27e0657f5ceb14bff3753" - integrity sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA== - -mime-db@1.52.0: - version "1.52.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70" - integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== - -mime-types@^2.1.12: - version "2.1.35" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a" - integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== - dependencies: - mime-db "1.52.0" +marked@*, marked@^9.1.4: + version "9.1.4" + resolved "https://registry.yarnpkg.com/marked/-/marked-9.1.4.tgz#68d50848f1b1e264b8fa031946b4b0c3352827e9" + integrity sha512-Mq83CCaClhXqhf8sLQ57c1unNelHEuFadK36ga+GeXR4FeT/5ssaC5PaCRVqMA74VYorzYRqdAaxxteIanh3Kw== ms@2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -node-fetch@^2.6.1: - version "2.7.0" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.7.0.tgz#d0f0fa6e3e2dc1d27efcd8ad99d550bda94d187d" - integrity sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A== - dependencies: - whatwg-url "^5.0.0" - -nzxt@^0.3.10: +nzxt@^0.3.11: version "0.3.11" resolved "https://registry.yarnpkg.com/nzxt/-/nzxt-0.3.11.tgz#aefe965958c545487af5a3d93f4641dd0bac2ae2" integrity sha512-X9K4l+ynttJgQHB49Q8JyWXI/gdgS3NwVKV/vqZP9SM+6kr8r6vx97WTWx4c4NHUJhENe49g2PnH05rAhbyxHA== @@ -267,35 +211,17 @@ summer-framework@^0.3.0: resolved "https://registry.yarnpkg.com/summer-framework/-/summer-framework-0.3.0.tgz#4459c2b42a31b7445d7e5b21f9950f2e63fc8fe3" integrity sha512-2aZ98+6qwacaMjQoIYsl6qDwYgGQofsEhqhBaR24vAJI5ihQIjtT1cZlBMTv0oMcNkh+QhxtFCG+8TIXcIUvnQ== -tr46@~0.0.3: - version "0.0.3" - resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a" - integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw== - undici-types@~5.26.4: version "5.26.5" resolved "https://registry.yarnpkg.com/undici-types/-/undici-types-5.26.5.tgz#bcd539893d00b56e964fd2657a4866b221a65617" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -webidl-conversions@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871" - integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +zheleznaya@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/zheleznaya/-/zheleznaya-0.2.3.tgz#a953b9862f45ca1dc3a6e69ba75250a1e3139ee1" + integrity sha512-Is3bAA5DFxneIfwEErPAipdPWlGzW8cCWRpk+K3Zm0sdzRhK+pAE1GPGhPP+69eIvZN2dwNTtfKTJhanS3mAcA== -whatwg-url@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d" - integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw== - dependencies: - tr46 "~0.0.3" - webidl-conversions "^3.0.0" - -zheleznaya@^0.1.21: - version "0.1.21" - resolved "https://registry.yarnpkg.com/zheleznaya/-/zheleznaya-0.1.21.tgz#3b893a78960900b22c5b8b71790ce9e3580c9c1a" - integrity sha512-xdW8gjfOPeQIJK6tR/9/U8wmzNdd6RC7Eefy+d7hNQVt8U3L13AG/LCoHoVs5knTt+rOCO9+mXbI0EUU16QJYw== - -zstyl@^0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/zstyl/-/zstyl-0.1.5.tgz#274af163f2a8f0db812e43802522e21298578294" - integrity sha512-WjvvCd+AjTRCNdoM4hFrUjWz0JOXIQS7xW1yUPIH48jBOiSjbEJw7Y9QemFir+wQqlQkjuxNEF2TVSYd62WQVQ== +zstyl@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/zstyl/-/zstyl-0.2.1.tgz#d881445b70ca5ba2d64e2d3bb0b4439de1b05a0d" + integrity sha512-8xKq1IWH4LEoPiTpqNOESVBaJTGW4+md8fB3exoEpgcQdS5Eh4NI6+E78wv5cPV0IqDERu1+nxtOG622DgyNrg==