Skip to content

Commit 526ec58

Browse files
committed
feat-docs-wasm-attempt
try using externals
1 parent 0fd7c84 commit 526ec58

10 files changed

Lines changed: 319 additions & 424 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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -759,17 +759,15 @@ defineOgImageComponent('Package', {
759759
:href="docsLink.href"
760760
target="_blank"
761761
rel="noopener noreferrer"
762-
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5"
762+
class="link-subtle font-mono text-sm inline-flex items-center pb-2"
763763
>
764-
<span class="i-carbon-document w-4 h-4" aria-hidden="true" />
765764
docs
766765
</a>
767766
<NuxtLink
768767
v-else
769768
:to="docsLink.to"
770-
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5"
769+
class="link-subtle font-mono text-sm inline-flex items-center pb-2"
771770
>
772-
<span class="i-carbon-document w-4 h-4" aria-hidden="true" />
773771
docs
774772
</NuxtLink>
775773
</li>
@@ -779,7 +777,7 @@ defineOgImageComponent('Package', {
779777
name: 'code',
780778
params: { path: [...pkg.name.split('/'), 'v', displayVersion.version] },
781779
}"
782-
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5"
780+
class="link-subtle font-mono text-sm inline-flex items-center gap-1.5 pb-2"
783781
aria-keyshortcuts="."
784782
>
785783
{{ t('package.links.code') }}

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
@@ -83,6 +83,9 @@ export default defineNuxtConfig({
8383
compatibilityDate: '2024-04-03',
8484

8585
nitro: {
86+
experimental: {
87+
wasm: true,
88+
},
8689
externals: {
8790
inline: [
8891
'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)