Skip to content

Commit 791dc8f

Browse files
committed
feat-docs-wasm-attempt
try using externals
1 parent c714835 commit 791dc8f

10 files changed

Lines changed: 319 additions & 423 deletions

File tree

PLAN_MICRO.md

Lines changed: 0 additions & 201 deletions
This file was deleted.

PLAN_WASM.md

Lines changed: 0 additions & 110 deletions
This file was deleted.

app/pages/[...package].vue

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -757,16 +757,15 @@ defineOgImageComponent('Package', {
757757
:href="docsLink.href"
758758
target="_blank"
759759
rel="noopener noreferrer"
760-
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5"
760+
class="link-subtle font-mono text-sm inline-flex items-center pb-2"
761761
>
762762
docs
763763
</a>
764764
<NuxtLink
765765
v-else
766766
:to="docsLink.to"
767-
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5"
767+
class="link-subtle font-mono text-sm inline-flex items-center pb-2"
768768
>
769-
<span class="i-carbon-document w-4 h-4" aria-hidden="true" />
770769
docs
771770
</NuxtLink>
772771
</li>
@@ -776,7 +775,7 @@ defineOgImageComponent('Package', {
776775
name: 'code',
777776
params: { path: [...pkg.name.split('/'), 'v', displayVersion.version] },
778777
}"
779-
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5"
778+
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5 pb-2"
780779
aria-keyshortcuts="."
781780
>
782781
<span class="i-carbon-code w-4 h-4 sm:invisible" aria-hidden="true" />

app/utils/versions.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ import { compare, valid } from 'semver'
44
* Utilities for handling npm package versions and dist-tags
55
*/
66

7+
/**
8+
* Compare two version strings for sorting
9+
* @param a - First version string
10+
* @param b - Second version string
11+
* @returns -1 if a < b, 0 if a == b, 1 if a > b
12+
*/
13+
export const compareVersions = compare
14+
715
/**
816
* Check if a version string is an exact semver version.
917
* Returns true for "1.2.3", "1.0.0-beta.1", etc.

nuxt.config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ export default defineNuxtConfig({
8585
compatibilityDate: '2024-04-03',
8686

8787
nitro: {
88+
experimental: {
89+
wasm: true,
90+
},
8891
externals: {
8992
inline: [
9093
'shiki',

package.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"test:unit": "vite test --project unit"
2727
},
2828
"dependencies": {
29+
"@deno/doc": "jsr:^0.189.1",
2930
"@iconify-json/simple-icons": "^1.2.67",
3031
"@iconify-json/vscode-icons": "^1.2.40",
3132
"@nuxt/a11y": "1.0.0-alpha.1",
@@ -82,6 +83,24 @@
8283
"vitest": "npm:@voidzero-dev/vite-plus-test@latest",
8384
"vue-tsc": "3.2.2"
8485
},
86+
"resolutions": {
87+
"vite": "^8.0.0-beta.10"
88+
},
89+
"pnpm": {
90+
"overrides": {
91+
"sharp": "0.34.5"
92+
},
93+
"packageExtensions": {
94+
"@nuxt/scripts": {
95+
"dependencies": {
96+
"estree-walker": "^3.0.3"
97+
}
98+
}
99+
},
100+
"patchedDependencies": {
101+
"@jsr/deno__doc@0.189.1": "patches/@jsr__deno__doc@0.189.1.patch"
102+
}
103+
},
85104
"simple-git-hooks": {
86105
"pre-commit": "npx lint-staged"
87106
},

0 commit comments

Comments
 (0)