feat: update to astro 5

This commit is contained in:
Fernando Araoz 2025-01-20 19:51:22 -05:00
parent c6469d4493
commit 479254aa07
4 changed files with 2246 additions and 2268 deletions

View File

@ -5,6 +5,7 @@ import mdx from "@astrojs/mdx";
// https://astro.build/config // https://astro.build/config
export default defineConfig({ export default defineConfig({
output: 'static',
integrations: [tailwind(), mdx()], integrations: [tailwind(), mdx()],
markdown: { markdown: {
syntaxHighlight: "prism", syntaxHighlight: "prism",

View File

@ -14,16 +14,16 @@
"dependencies": { "dependencies": {
"@astrojs/check": "^0.5.10", "@astrojs/check": "^0.5.10",
"@astrojs/mdx": "^2.3.1", "@astrojs/mdx": "^2.3.1",
"@astrojs/tailwind": "^5.1.0", "@astrojs/tailwind": "^5.1.5",
"astro": "^4.6.3", "astro": "^4.16.18",
"codejar": "^4.2.0", "codejar": "^4.2.0",
"lucide-astro": "^0.471.0", "lucide-astro": "^0.471.0",
"tailwindcss": "^3.4.3", "tailwindcss": "^3.4.17",
"typescript": "^5.4.5", "typescript": "^5.7.3",
"vitest": "^1.5.0" "vitest": "^1.6.0"
}, },
"devDependencies": { "devDependencies": {
"prettier": "^3.3.3", "prettier": "^3.4.2",
"prettier-plugin-astro": "^0.14.1" "prettier-plugin-astro": "^0.14.1"
} }
} }

File diff suppressed because it is too large Load Diff

View File

@ -311,7 +311,16 @@ const native_lex = (code: string, level: HighlightLevel) =>
// Get binary path from .env // Get binary path from .env
const binary = import.meta.env.THP_BINARY; const binary = import.meta.env.THP_BINARY;
if (!binary) { if (!binary) {
throw new Error("THP_BINARY not set in .env"); console.error("THP_BINARY not set in .env");
resolve({
Err: {
error_code: 0,
error_offset: 0,
labels: [],
note: null,
help: null,
}
})
} }
const subprocess = spawn(binary, ["tokenize", "-l", level.toString()]); const subprocess = spawn(binary, ["tokenize", "-l", level.toString()]);