diff --git a/.changeset/breezy-radios-grab.md b/.changeset/breezy-radios-grab.md new file mode 100644 index 0000000000..afb990a449 --- /dev/null +++ b/.changeset/breezy-radios-grab.md @@ -0,0 +1,5 @@ +--- +'@astrojs/db': patch +--- + +Fixes `isDbError()` guard for `LibsqlError` diff --git a/.changeset/bright-gifts-prove.md b/.changeset/bright-gifts-prove.md deleted file mode 100644 index 14b1a3bde1..0000000000 --- a/.changeset/bright-gifts-prove.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Updates a reference in an error message diff --git a/.changeset/fuzzy-windows-cover.md b/.changeset/fuzzy-windows-cover.md new file mode 100644 index 0000000000..7f3b766fc0 --- /dev/null +++ b/.changeset/fuzzy-windows-cover.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes an issue where Astro couldn't correctly handle i18n fallback when using the i18n middleware diff --git a/.changeset/hip-kids-ring.md b/.changeset/hip-kids-ring.md new file mode 100644 index 0000000000..5dc22c5b8e --- /dev/null +++ b/.changeset/hip-kids-ring.md @@ -0,0 +1,5 @@ +--- +'@astrojs/db': patch +--- + +Fixes the publishing of the package diff --git a/.changeset/neat-pumas-accept.md b/.changeset/neat-pumas-accept.md new file mode 100644 index 0000000000..8babf49e78 --- /dev/null +++ b/.changeset/neat-pumas-accept.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Adds type support for the `closedby` attribute for `` elements diff --git a/.changeset/selfish-paws-play.md b/.changeset/selfish-paws-play.md new file mode 100644 index 0000000000..6f0e3049b2 --- /dev/null +++ b/.changeset/selfish-paws-play.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes a bug where Astro couldn't correctly parse `params` and `props` when receiving i18n fallback URLs diff --git a/.changeset/spicy-guests-protect.md b/.changeset/spicy-guests-protect.md new file mode 100644 index 0000000000..5f77d5ee01 --- /dev/null +++ b/.changeset/spicy-guests-protect.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Trailing slash support for actions diff --git a/.changeset/tame-bags-remember.md b/.changeset/tame-bags-remember.md new file mode 100644 index 0000000000..3f4f61bce7 --- /dev/null +++ b/.changeset/tame-bags-remember.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes a bug that caused errors in dev when editing sites with large numbers of MDX pages diff --git a/.changeset/ten-moons-brake.md b/.changeset/ten-moons-brake.md deleted file mode 100644 index f034e1319e..0000000000 --- a/.changeset/ten-moons-brake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/markdown-remark': patch ---- - -Avoids parsing frontmatter that are not at the top of a file diff --git a/.changeset/twelve-donuts-hide.md b/.changeset/twelve-donuts-hide.md new file mode 100644 index 0000000000..504d1b5bea --- /dev/null +++ b/.changeset/twelve-donuts-hide.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +"Added `inert` to htmlBooleanAttributes" diff --git a/.changeset/twelve-pens-remain.md b/.changeset/twelve-pens-remain.md deleted file mode 100644 index 46023ea725..0000000000 --- a/.changeset/twelve-pens-remain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/markdown-remark": patch ---- - -Removes trailing new line in code blocks to prevent generating a trailing empty `` tag diff --git a/.changeset/twenty-keys-divide.md b/.changeset/twenty-keys-divide.md new file mode 100644 index 0000000000..9e84058674 --- /dev/null +++ b/.changeset/twenty-keys-divide.md @@ -0,0 +1,5 @@ +--- +'astro': patch +--- + +Fixes a case where failing content entries in `astro check` would not be surfaced diff --git a/.changeset/unlucky-wasps-refuse.md b/.changeset/unlucky-wasps-refuse.md deleted file mode 100644 index 5e0d4d664b..0000000000 --- a/.changeset/unlucky-wasps-refuse.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/markdown-remark': patch ---- - -Fixes frontmatter parsing if file is encoded in UTF8 with BOM diff --git a/benchmark/index.js b/benchmark/index.js index 956b9c3afa..0c62036d98 100755 --- a/benchmark/index.js +++ b/benchmark/index.js @@ -1,6 +1,6 @@ import fs from 'node:fs/promises'; import path from 'node:path'; -import { fileURLToPath, pathToFileURL } from 'node:url'; +import { pathToFileURL } from 'node:url'; import mri from 'mri'; import { makeProject } from './bench/_util.js'; diff --git a/benchmark/packages/adapter/src/index.ts b/benchmark/packages/adapter/src/index.ts index f2345deb08..0fc6d67f99 100644 --- a/benchmark/packages/adapter/src/index.ts +++ b/benchmark/packages/adapter/src/index.ts @@ -1,4 +1,4 @@ -import type { AstroAdapter, AstroIntegration } from 'astro'; +import type { AstroIntegration } from 'astro'; export default function createIntegration(): AstroIntegration { return { diff --git a/biome.jsonc b/biome.jsonc index bab1f1a05b..a1000760a7 100644 --- a/biome.jsonc +++ b/biome.jsonc @@ -34,6 +34,7 @@ "correctness": { "noUnusedVariables": "info", "noUnusedFunctionParameters": "info", + "noUnusedImports": "warn", }, }, }, @@ -87,11 +88,12 @@ }, }, { - "include": ["*.astro", "client.d.ts"], + "include": ["*.astro", "client.d.ts", "jsx-runtime.d.ts"], "linter": { "rules": { "correctness": { "noUnusedVariables": "off", + "noUnusedImports": "off", }, }, }, diff --git a/examples/basics/package.json b/examples/basics/package.json index 695d42eb5b..0791668c38 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.0.3" + "astro": "^5.0.5" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index c2ab4c69fe..52fd4ed3a1 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^4.0.1", + "@astrojs/mdx": "^4.0.2", "@astrojs/rss": "^4.0.10", "@astrojs/sitemap": "^3.2.1", - "astro": "^5.0.3" + "astro": "^5.0.5" } } diff --git a/examples/component/package.json b/examples/component/package.json index e3cce0dc38..794471fd9d 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^5.0.3" + "astro": "^5.0.5" }, "peerDependencies": { "astro": "^4.0.0 || ^5.0.0" diff --git a/examples/container-with-vitest/package.json b/examples/container-with-vitest/package.json index a4f5269843..8194688cfe 100644 --- a/examples/container-with-vitest/package.json +++ b/examples/container-with-vitest/package.json @@ -11,8 +11,8 @@ "test": "vitest run" }, "dependencies": { - "@astrojs/react": "^4.0.0", - "astro": "^5.0.3", + "@astrojs/react": "^4.1.0", + "astro": "^5.0.5", "react": "^18.3.1", "react-dom": "^18.3.1", "vitest": "^2.1.6" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 6c31cc904e..d48bcbc833 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -13,6 +13,6 @@ "@astrojs/alpinejs": "^0.4.0", "@types/alpinejs": "^3.13.10", "alpinejs": "^3.14.3", - "astro": "^5.0.3" + "astro": "^5.0.5" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index d3cb9171a9..6759f7ffc5 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -11,13 +11,13 @@ }, "dependencies": { "@astrojs/preact": "^4.0.0", - "@astrojs/react": "^4.0.0", + "@astrojs/react": "^4.1.0", "@astrojs/solid-js": "^5.0.0", "@astrojs/svelte": "^7.0.1", - "@astrojs/vue": "^5.0.1", + "@astrojs/vue": "^5.0.2", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", - "astro": "^5.0.3", + "astro": "^5.0.5", "preact": "^10.24.3", "react": "^18.3.1", "react-dom": "^18.3.1", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 3610e1af71..9cb7beae5e 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -12,7 +12,7 @@ "dependencies": { "@astrojs/preact": "^4.0.0", "@preact/signals": "^1.3.0", - "astro": "^5.0.3", + "astro": "^5.0.5", "preact": "^10.24.3" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index d651a384e7..affb83dadd 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -10,10 +10,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/react": "^4.0.0", + "@astrojs/react": "^4.1.0", "@types/react": "^18.3.12", "@types/react-dom": "^18.3.1", - "astro": "^5.0.3", + "astro": "^5.0.5", "react": "^18.3.1", "react-dom": "^18.3.1" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 57a2765467..091ec6531c 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@astrojs/solid-js": "^5.0.0", - "astro": "^5.0.3", + "astro": "^5.0.5", "solid-js": "^1.9.3" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 01bc92cbe4..3fa8a0cda5 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -11,7 +11,7 @@ }, "dependencies": { "@astrojs/svelte": "^7.0.1", - "astro": "^5.0.3", + "astro": "^5.0.5", "svelte": "^5.1.16" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index af66cba4fd..60a470e4ed 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -10,8 +10,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/vue": "^5.0.1", - "astro": "^5.0.3", + "@astrojs/vue": "^5.0.2", + "astro": "^5.0.5", "vue": "^3.5.12" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index c791dddbe3..8153be2ece 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -11,6 +11,6 @@ }, "dependencies": { "@astrojs/node": "^9.0.0", - "astro": "^5.0.3" + "astro": "^5.0.5" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index afc2de354f..320d3b6cd2 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^5.0.3" + "astro": "^5.0.5" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/minimal/package.json b/examples/minimal/package.json index c913c48e46..93faeabeab 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.0.3" + "astro": "^5.0.5" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 881563abb2..7db23b1f68 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -10,6 +10,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.0.3" + "astro": "^5.0.5" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 25144d1c55..00f1358841 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/node": "^9.0.0", "@astrojs/svelte": "^7.0.1", - "astro": "^5.0.3", + "astro": "^5.0.5", "svelte": "^5.1.16" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index e779f51947..8497f04595 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -9,7 +9,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^5.0.3", + "astro": "^5.0.5", "sass": "^1.80.6", "sharp": "^0.33.3" } diff --git a/examples/toolbar-app/package.json b/examples/toolbar-app/package.json index 8abafa93b2..701bb6ad0a 100644 --- a/examples/toolbar-app/package.json +++ b/examples/toolbar-app/package.json @@ -15,6 +15,6 @@ "./app": "./dist/app.js" }, "devDependencies": { - "astro": "^5.0.3" + "astro": "^5.0.5" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index af6d7c310e..4ebd866a95 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/markdoc": "^0.12.1", - "astro": "^5.0.3" + "@astrojs/markdoc": "^0.12.3", + "astro": "^5.0.5" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 1c01fb9900..974009ed55 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -10,9 +10,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^4.0.1", + "@astrojs/mdx": "^4.0.2", "@astrojs/preact": "^4.0.0", - "astro": "^5.0.3", + "astro": "^5.0.5", "preact": "^10.24.3" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 79e7f87578..b99ca790fa 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -12,7 +12,7 @@ "dependencies": { "@astrojs/preact": "^4.0.0", "@nanostores/preact": "^0.5.2", - "astro": "^5.0.3", + "astro": "^5.0.5", "nanostores": "^0.11.3", "preact": "^10.24.3" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 49ca8f2117..4cc92b511a 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -10,10 +10,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^4.0.1", + "@astrojs/mdx": "^4.0.2", "@astrojs/tailwind": "^5.1.3", "@types/canvas-confetti": "^1.6.4", - "astro": "^5.0.3", + "astro": "^5.0.5", "autoprefixer": "^10.4.20", "canvas-confetti": "^1.9.3", "postcss": "^8.4.49", diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index f1204bfb54..f20af36328 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -11,7 +11,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^5.0.3", + "astro": "^5.0.5", "vitest": "^2.1.6" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 3c227b94c2..58f4630de1 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,34 @@ # astro +## 5.0.5 + +### Patch Changes + +- [#12705](https://github.com/withastro/astro/pull/12705) [`0d1eab5`](https://github.com/withastro/astro/commit/0d1eab560d56c51c359bbd35e8bfb51e238611ee) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes a bug where MDX files with certain characters in the name would cause builds to fail + +- [#12707](https://github.com/withastro/astro/pull/12707) [`2aaed2d`](https://github.com/withastro/astro/commit/2aaed2d2a96ab35461af24e8d12b20f1da33983f) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a bug where the middleware was incorrectly imported during the build + +- [#12697](https://github.com/withastro/astro/pull/12697) [`1c4a032`](https://github.com/withastro/astro/commit/1c4a032247747c830be94dbdd0c953511a6bfa53) Thanks [@ascorbic](https://github.com/ascorbic)! - Fix a bug that caused builds to fail if an image had a quote mark in its name + +- [#12694](https://github.com/withastro/astro/pull/12694) [`495f46b`](https://github.com/withastro/astro/commit/495f46bca78665732e51c629d93a68fa392b88a4) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a bug where the experimental feature `experimental.svg` was incorrectly used when generating ESM images + +- [#12658](https://github.com/withastro/astro/pull/12658) [`3169593`](https://github.com/withastro/astro/commit/316959355c3d59723ecb3e0f417becf1f03ddd74) Thanks [@jurajkapsz](https://github.com/jurajkapsz)! - Fixes astro info copy to clipboard process not returning to prompt in certain cases. + +- [#12712](https://github.com/withastro/astro/pull/12712) [`b01c74a`](https://github.com/withastro/astro/commit/b01c74aeccc4ec76b64fa75d163df58274b37970) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes a bug which misidentified pages as markdown if a query string ended in a markdown extension + +## 5.0.4 + +### Patch Changes + +- [#12653](https://github.com/withastro/astro/pull/12653) [`e21c7e6`](https://github.com/withastro/astro/commit/e21c7e67fde1155cf593fd2b40010c5e2c2cd3f2) Thanks [@sarah11918](https://github.com/sarah11918)! - Updates a reference in an error message + +- [#12585](https://github.com/withastro/astro/pull/12585) [`a9373c0`](https://github.com/withastro/astro/commit/a9373c0c9a3c2e1773fc11bb14e156698b0d9d38) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Fixes a case where `process.env` would be frozen despite changes made to environment variables in development + +- [#12695](https://github.com/withastro/astro/pull/12695) [`a203d5d`](https://github.com/withastro/astro/commit/a203d5dd582166674c45e807a5dc9113e26e24f0) Thanks [@ascorbic](https://github.com/ascorbic)! - Throws a more helpful error when images are missing + +- Updated dependencies [[`f13417b`](https://github.com/withastro/astro/commit/f13417bfbf73130c224752379e2da33084f89554), [`87231b1`](https://github.com/withastro/astro/commit/87231b1168da66bb593f681206c42fa555dfcabc), [`a71e9b9`](https://github.com/withastro/astro/commit/a71e9b93b317edc0ded49d4d50f1b7841c8cd428)]: + - @astrojs/markdown-remark@6.0.1 + ## 5.0.3 ### Patch Changes diff --git a/packages/astro/astro-jsx.d.ts b/packages/astro/astro-jsx.d.ts index ca54b991ed..39cb40f61b 100644 --- a/packages/astro/astro-jsx.d.ts +++ b/packages/astro/astro-jsx.d.ts @@ -679,6 +679,7 @@ declare namespace astroHTML.JSX { interface DialogHTMLAttributes extends HTMLAttributes { open?: boolean | string | undefined | null; + closedby?: 'none' | 'closerequest' | 'any' | undefined | null; } interface EmbedHTMLAttributes extends HTMLAttributes { diff --git a/packages/astro/package.json b/packages/astro/package.json index 3ee650bb3e..8c7e85a445 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "5.0.3", + "version": "5.0.5", "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.", "type": "module", "author": "withastro", diff --git a/packages/astro/src/actions/plugins.ts b/packages/astro/src/actions/plugins.ts index 77cbddca15..f5bd074dfc 100644 --- a/packages/astro/src/actions/plugins.ts +++ b/packages/astro/src/actions/plugins.ts @@ -1,5 +1,6 @@ import type fsMod from 'node:fs'; import type { Plugin as VitePlugin } from 'vite'; +import { shouldAppendForwardSlash } from '../core/build/util.js'; import type { AstroSettings } from '../types/astro.js'; import { NOOP_ACTIONS, @@ -84,6 +85,12 @@ export function vitePluginActions({ code += `\nexport * from 'astro/actions/runtime/virtual/server.js';`; } else { code += `\nexport * from 'astro/actions/runtime/virtual/client.js';`; + code = code.replace( + "'/** @TRAILING_SLASH@ **/'", + JSON.stringify( + shouldAppendForwardSlash(settings.config.trailingSlash, settings.config.build.format), + ), + ); } return code; }, diff --git a/packages/astro/src/actions/runtime/virtual/server.ts b/packages/astro/src/actions/runtime/virtual/server.ts index 47decf18e5..10624134b2 100644 --- a/packages/astro/src/actions/runtime/virtual/server.ts +++ b/packages/astro/src/actions/runtime/virtual/server.ts @@ -1,6 +1,10 @@ import { z } from 'zod'; +import type { Pipeline } from '../../../core/base-pipeline.js'; +import { shouldAppendForwardSlash } from '../../../core/build/util.js'; import { ActionCalledFromServerError } from '../../../core/errors/errors-data.js'; import { AstroError } from '../../../core/errors/errors.js'; +import { removeTrailingForwardSlash } from '../../../core/path.js'; +import { apiContextRoutesSymbol } from '../../../core/render-context.js'; import type { APIContext } from '../../../types/public/index.js'; import { ACTION_RPC_ROUTE_PATTERN } from '../../consts.js'; import { @@ -279,7 +283,15 @@ export function getActionContext(context: APIContext): ActionMiddlewareContext { calledFrom: callerInfo.from, name: callerInfo.name, handler: async () => { - const baseAction = await getAction(callerInfo.name); + const pipeline: Pipeline = Reflect.get(context, apiContextRoutesSymbol); + const callerInfoName = shouldAppendForwardSlash( + pipeline.manifest.trailingSlash, + pipeline.manifest.buildFormat, + ) + ? removeTrailingForwardSlash(callerInfo.name) + : callerInfo.name; + + const baseAction = await getAction(callerInfoName); let input; try { input = await parseRequestBody(context.request); diff --git a/packages/astro/src/actions/runtime/virtual/shared.ts b/packages/astro/src/actions/runtime/virtual/shared.ts index 4067ad321d..02cc07b52c 100644 --- a/packages/astro/src/actions/runtime/virtual/shared.ts +++ b/packages/astro/src/actions/runtime/virtual/shared.ts @@ -3,6 +3,7 @@ import type { z } from 'zod'; import { REDIRECT_STATUS_CODES } from '../../../core/constants.js'; import { ActionsReturnedInvalidDataError } from '../../../core/errors/errors-data.js'; import { AstroError } from '../../../core/errors/errors.js'; +import { appendForwardSlash as _appendForwardSlash } from '../../../core/path.js'; import { ACTION_QUERY_PARAMS as _ACTION_QUERY_PARAMS } from '../../consts.js'; import type { ErrorInferenceObject, @@ -13,6 +14,8 @@ import type { export type ActionAPIContext = _ActionAPIContext; export const ACTION_QUERY_PARAMS = _ACTION_QUERY_PARAMS; +export const appendForwardSlash = _appendForwardSlash; + export const ACTION_ERROR_CODES = [ 'BAD_REQUEST', 'UNAUTHORIZED', diff --git a/packages/astro/src/assets/utils/imageAttributes.ts b/packages/astro/src/assets/utils/imageAttributes.ts index 1b17e11b63..aa67b528f2 100644 --- a/packages/astro/src/assets/utils/imageAttributes.ts +++ b/packages/astro/src/assets/utils/imageAttributes.ts @@ -1,5 +1,4 @@ import { toStyleString } from '../../runtime/server/render/util.js'; -import type { AstroConfig } from '../../types/public/config.js'; import type { GetImageResult, ImageLayout, LocalImageProps, RemoteImageProps } from '../types.js'; export function addCSSVarsToStyle( diff --git a/packages/astro/src/assets/utils/node/emitAsset.ts b/packages/astro/src/assets/utils/node/emitAsset.ts index 79a5287f64..1337ac8800 100644 --- a/packages/astro/src/assets/utils/node/emitAsset.ts +++ b/packages/astro/src/assets/utils/node/emitAsset.ts @@ -15,6 +15,7 @@ export async function emitESMImage( _watchMode: boolean, // FIX: in Astro 6, this function should not be passed in dev mode at all. // Or rethink the API so that a function that throws isn't passed through. + experimentalSvgEnabled: boolean, fileEmitter?: FileEmitter, ): Promise { if (!id) { @@ -44,7 +45,8 @@ export async function emitESMImage( }); // Attach file data for SVGs - if (fileMetadata.format === 'svg') { + // TODO: this is a workaround to prevent a memory leak, and it must be fixed before we remove the experimental flag, see + if (fileMetadata.format === 'svg' && experimentalSvgEnabled === true) { emittedImage.contents = fileData; } diff --git a/packages/astro/src/assets/vite-plugin-assets.ts b/packages/astro/src/assets/vite-plugin-assets.ts index e09fc15975..abce0c9b7e 100644 --- a/packages/astro/src/assets/vite-plugin-assets.ts +++ b/packages/astro/src/assets/vite-plugin-assets.ts @@ -205,7 +205,12 @@ export default function assets({ settings }: { settings: AstroSettings }): vite. } const emitFile = shouldEmitFile ? this.emitFile : undefined; - const imageMetadata = await emitESMImage(id, this.meta.watchMode, emitFile); + const imageMetadata = await emitESMImage( + id, + this.meta.watchMode, + !!settings.config.experimental.svg, + emitFile, + ); if (!imageMetadata) { throw new AstroError({ diff --git a/packages/astro/src/cli/check/index.ts b/packages/astro/src/cli/check/index.ts index c93e3b2f4c..b7e03aa30e 100644 --- a/packages/astro/src/cli/check/index.ts +++ b/packages/astro/src/cli/check/index.ts @@ -31,11 +31,7 @@ export async function check(flags: Flags) { // NOTE: In the future, `@astrojs/check` can expose a `before lint` hook so that this works during `astro check --watch` too. // For now, we run this once as usually `astro check --watch` is ran alongside `astro dev` which also calls `astro sync`. const { default: sync } = await import('../../core/sync/index.js'); - try { - await sync(flagsToAstroInlineConfig(flags)); - } catch (_) { - return process.exit(1); - } + await sync(flagsToAstroInlineConfig(flags)); } const { check: checker, parseArgsAsCheckConfig } = checkPackage; diff --git a/packages/astro/src/cli/info/index.ts b/packages/astro/src/cli/info/index.ts index 348d2fae3b..aca66ad719 100644 --- a/packages/astro/src/cli/info/index.ts +++ b/packages/astro/src/cli/info/index.ts @@ -66,7 +66,7 @@ export async function copyToClipboard(text: string, force?: boolean) { // Unix: check if a supported command is installed const unixCommands: Array<[string, Array]> = [ - ['xclip', ['-sel', 'clipboard', '-l', '1']], + ['xclip', ['-selection', 'clipboard', '-l', '1']], ['wl-copy', []], ]; for (const [unixCommand, unixArgs] of unixCommands) { @@ -101,7 +101,7 @@ export async function copyToClipboard(text: string, force?: boolean) { } try { - const result = spawnSync(command, args, { input: text }); + const result = spawnSync(command, args, { input: text, stdio: ['pipe', 'ignore', 'ignore'] }); if (result.error) { throw result.error; } diff --git a/packages/astro/src/container/index.ts b/packages/astro/src/container/index.ts index 9ca9d23001..7a31af8a7a 100644 --- a/packages/astro/src/container/index.ts +++ b/packages/astro/src/container/index.ts @@ -155,7 +155,6 @@ function createManifest( i18n: manifest?.i18n, checkOrigin: false, middleware: manifest?.middleware ?? middlewareInstance, - envGetSecretEnabled: false, key: createKey(), }; } diff --git a/packages/astro/src/content/content-layer.ts b/packages/astro/src/content/content-layer.ts index 235bbb1fd1..e8c772a2c9 100644 --- a/packages/astro/src/content/content-layer.ts +++ b/packages/astro/src/content/content-layer.ts @@ -206,6 +206,7 @@ export class ContentLayer { }, collectionWithResolvedSchema, false, + !!this.#settings.config.experimental.svg, ); return parsedData; diff --git a/packages/astro/src/content/mutable-data-store.ts b/packages/astro/src/content/mutable-data-store.ts index 18a7662ee6..7f125ed4b4 100644 --- a/packages/astro/src/content/mutable-data-store.ts +++ b/packages/astro/src/content/mutable-data-store.ts @@ -9,6 +9,8 @@ import { contentModuleToId } from './utils.js'; const SAVE_DEBOUNCE_MS = 500; +const MAX_DEPTH = 10; + /** * Extends the DataStore with the ability to change entries and write them to disk. * This is kept as a separate class to avoid needing node builtins at runtime, when read-only access is all that is needed. @@ -86,7 +88,7 @@ export class MutableDataStore extends ImmutableDataStore { if (this.#assetImports.size === 0) { try { - await fs.writeFile(filePath, 'export default new Map();'); + await this.#writeFileAtomic(filePath, 'export default new Map();'); } catch (err) { throw new AstroError(AstroErrorData.UnknownFilesystemError, { cause: err }); } @@ -102,7 +104,7 @@ export class MutableDataStore extends ImmutableDataStore { const exports: Array = []; this.#assetImports.forEach((id) => { const symbol = importIdToSymbolName(id); - imports.push(`import ${symbol} from '${id}';`); + imports.push(`import ${symbol} from ${JSON.stringify(id)};`); exports.push(`[${JSON.stringify(id)}, ${symbol}]`); }); const code = /* js */ ` @@ -110,7 +112,7 @@ ${imports.join('\n')} export default new Map([${exports.join(', ')}]); `; try { - await fs.writeFile(filePath, code); + await this.#writeFileAtomic(filePath, code); } catch (err) { throw new AstroError(AstroErrorData.UnknownFilesystemError, { cause: err }); } @@ -122,7 +124,7 @@ export default new Map([${exports.join(', ')}]); if (this.#moduleImports.size === 0) { try { - await fs.writeFile(filePath, 'export default new Map();'); + await this.#writeFileAtomic(filePath, 'export default new Map();'); } catch (err) { throw new AstroError(AstroErrorData.UnknownFilesystemError, { cause: err }); } @@ -137,13 +139,13 @@ export default new Map([${exports.join(', ')}]); // We then export them all, mapped by the import id, so we can find them again in the build. const lines: Array = []; for (const [fileName, specifier] of this.#moduleImports) { - lines.push(`['${fileName}', () => import('${specifier}')]`); + lines.push(`[${JSON.stringify(fileName)}, () => import(${JSON.stringify(specifier)})]`); } const code = ` export default new Map([\n${lines.join(',\n')}]); `; try { - await fs.writeFile(filePath, code); + await this.#writeFileAtomic(filePath, code); } catch (err) { throw new AstroError(AstroErrorData.UnknownFilesystemError, { cause: err }); } @@ -190,6 +192,42 @@ export default new Map([\n${lines.join(',\n')}]); } } + #writing = new Set(); + #pending = new Set(); + + async #writeFileAtomic(filePath: PathLike, data: string, depth = 0) { + if (depth > MAX_DEPTH) { + // If we hit the max depth, we skip a write to prevent the stack from growing too large + // In theory this means we may miss the latest data, but in practice this will only happen when the file is being written to very frequently + // so it will be saved on the next write. This is unlikely to ever happen in practice, as the writes are debounced. It requires lots of writes to very large files. + return; + } + const fileKey = filePath.toString(); + // If we are already writing this file, instead of writing now, flag it as pending and write it when we're done. + if (this.#writing.has(fileKey)) { + this.#pending.add(fileKey); + return; + } + // Prevent concurrent writes to this file by flagging it as being written + this.#writing.add(fileKey); + + const tempFile = filePath instanceof URL ? new URL(`${filePath.href}.tmp`) : `${filePath}.tmp`; + try { + // Write it to a temporary file first and then move it to prevent partial reads. + await fs.writeFile(tempFile, data); + await fs.rename(tempFile, filePath); + } finally { + // We're done writing. Unflag the file and check if there are any pending writes for this file. + this.#writing.delete(fileKey); + // If there are pending writes, we need to write again to ensure we flush the latest data. + if (this.#pending.has(fileKey)) { + this.#pending.delete(fileKey); + // Call ourself recursively to write the file again + await this.#writeFileAtomic(filePath, data, depth + 1); + } + } + } + scopedStore(collectionName: string): DataStore { return { get: = Record>(key: string) => @@ -298,7 +336,7 @@ export default new Map([\n${lines.join(',\n')}]); return; } try { - await fs.writeFile(filePath, this.toString()); + await this.#writeFileAtomic(filePath, this.toString()); this.#file = filePath; this.#dirty = false; } catch (err) { diff --git a/packages/astro/src/content/runtime-assets.ts b/packages/astro/src/content/runtime-assets.ts index 95b5092fe3..74204e127d 100644 --- a/packages/astro/src/content/runtime-assets.ts +++ b/packages/astro/src/content/runtime-assets.ts @@ -7,6 +7,7 @@ export function createImage( pluginContext: PluginContext, shouldEmitFile: boolean, entryFilePath: string, + experimentalSvgEnabled: boolean, ) { return () => { return z.string().transform(async (imagePath, ctx) => { @@ -14,6 +15,7 @@ export function createImage( const metadata = (await emitESMImage( resolvedFilePath, pluginContext.meta.watchMode, + experimentalSvgEnabled, shouldEmitFile ? pluginContext.emitFile : undefined, )) as OmitBrand; diff --git a/packages/astro/src/content/utils.ts b/packages/astro/src/content/utils.ts index 16d703fc78..3b9588c0b6 100644 --- a/packages/astro/src/content/utils.ts +++ b/packages/astro/src/content/utils.ts @@ -164,6 +164,7 @@ export async function getEntryDataAndImages< }, collectionConfig: CollectionConfig, shouldEmitFile: boolean, + experimentalSvgEnabled: boolean, pluginContext?: PluginContext, ): Promise<{ data: TOutputData; imageImports: Array }> { let data: TOutputData; @@ -182,7 +183,12 @@ export async function getEntryDataAndImages< if (typeof schema === 'function') { if (pluginContext) { schema = schema({ - image: createImage(pluginContext, shouldEmitFile, entry._internal.filePath), + image: createImage( + pluginContext, + shouldEmitFile, + entry._internal.filePath, + experimentalSvgEnabled, + ), }); } else if (collectionConfig.type === CONTENT_LAYER_TYPE) { schema = schema({ @@ -257,12 +263,14 @@ export async function getEntryData( }, collectionConfig: CollectionConfig, shouldEmitFile: boolean, + experimentalSvgEnabled: boolean, pluginContext?: PluginContext, ) { const { data } = await getEntryDataAndImages( entry, collectionConfig, shouldEmitFile, + experimentalSvgEnabled, pluginContext, ); return data; diff --git a/packages/astro/src/content/vite-plugin-content-assets.ts b/packages/astro/src/content/vite-plugin-content-assets.ts index f4b8ed98ec..33084d6e39 100644 --- a/packages/astro/src/content/vite-plugin-content-assets.ts +++ b/packages/astro/src/content/vite-plugin-content-assets.ts @@ -39,7 +39,7 @@ export function astroContentAssetPropagationPlugin({ ? fileURLToPath(new URL(importerParam, settings.config.root)) : importer; - const resolved = this.resolve(base, importerPath, { skipSelf: true, ...opts }); + const resolved = await this.resolve(base, importerPath, { skipSelf: true, ...opts }); if (!resolved) { throw new AstroError({ ...AstroErrorData.ImageNotFound, diff --git a/packages/astro/src/content/vite-plugin-content-imports.ts b/packages/astro/src/content/vite-plugin-content-imports.ts index 4950d2d9b2..68f9cf706f 100644 --- a/packages/astro/src/content/vite-plugin-content-imports.ts +++ b/packages/astro/src/content/vite-plugin-content-imports.ts @@ -245,6 +245,7 @@ async function getContentEntryModule( { id, collection, _internal, unvalidatedData }, collectionConfig, params.shouldEmitFile, + !!params.config.experimental.svg, pluginContext, ) : unvalidatedData; @@ -280,6 +281,7 @@ async function getDataEntryModule( { id, collection, _internal, unvalidatedData }, collectionConfig, params.shouldEmitFile, + !!params.config.experimental.svg, pluginContext, ) : unvalidatedData; diff --git a/packages/astro/src/core/app/index.ts b/packages/astro/src/core/app/index.ts index 36543b5cac..d23383133e 100644 --- a/packages/astro/src/core/app/index.ts +++ b/packages/astro/src/core/app/index.ts @@ -5,7 +5,6 @@ import { REROUTABLE_STATUS_CODES, REROUTE_DIRECTIVE_HEADER, clientAddressSymbol, - clientLocalsSymbol, responseSentSymbol, } from '../constants.js'; import { getSetCookiesFromResponse } from '../cookies/index.js'; diff --git a/packages/astro/src/core/app/types.ts b/packages/astro/src/core/app/types.ts index 0fb627f718..2417902500 100644 --- a/packages/astro/src/core/app/types.ts +++ b/packages/astro/src/core/app/types.ts @@ -69,7 +69,6 @@ export type SSRManifest = { i18n: SSRManifestI18n | undefined; middleware?: () => Promise | AstroMiddlewareInstance; checkOrigin: boolean; - envGetSecretEnabled: boolean; }; export type SSRManifestI18n = { diff --git a/packages/astro/src/core/build/generate.ts b/packages/astro/src/core/build/generate.ts index 47d6ef3def..75b138c27e 100644 --- a/packages/astro/src/core/build/generate.ts +++ b/packages/astro/src/core/build/generate.ts @@ -559,6 +559,5 @@ function createBuildManifest( checkOrigin: (settings.config.security?.checkOrigin && settings.buildOutput === 'server') ?? false, key, - envGetSecretEnabled: false, }; } diff --git a/packages/astro/src/core/build/pipeline.ts b/packages/astro/src/core/build/pipeline.ts index 14bb08662a..3908dffed2 100644 --- a/packages/astro/src/core/build/pipeline.ts +++ b/packages/astro/src/core/build/pipeline.ts @@ -131,11 +131,11 @@ export class BuildPipeline extends Pipeline { const renderers = await import(renderersEntryUrl.toString()); const middleware = internals.middlewareEntryPoint - ? await import(internals.middlewareEntryPoint.toString()).then((mod) => { - return function () { - return { onRequest: mod.onRequest }; - }; - }) + ? async function () { + // @ts-expect-error: the compiler can't understand the previous check + const mod = await import(internals.middlewareEntryPoint.toString()); + return { onRequest: mod.onRequest }; + } : manifest.middleware; if (!renderers) { diff --git a/packages/astro/src/core/build/plugins/plugin-manifest.ts b/packages/astro/src/core/build/plugins/plugin-manifest.ts index 12fdf65b17..f0589868f7 100644 --- a/packages/astro/src/core/build/plugins/plugin-manifest.ts +++ b/packages/astro/src/core/build/plugins/plugin-manifest.ts @@ -5,7 +5,6 @@ import type { Plugin as VitePlugin } from 'vite'; import { getAssetsPrefix } from '../../../assets/utils/getAssetsPrefix.js'; import { normalizeTheLocale } from '../../../i18n/index.js'; import { toFallbackType, toRoutingStrategy } from '../../../i18n/utils.js'; -import { unwrapSupportKind } from '../../../integrations/features-validation.js'; import { runHookBuildSsr } from '../../../integrations/hooks.js'; import { BEFORE_HYDRATION_SCRIPT_ID, PAGE_SCRIPT_ID } from '../../../vite-plugin-scripts/index.js'; import type { @@ -274,8 +273,5 @@ function buildManifest( (settings.config.security?.checkOrigin && settings.buildOutput === 'server') ?? false, serverIslandNameMap: Array.from(settings.serverIslandNameMap), key: encodedKey, - envGetSecretEnabled: - (unwrapSupportKind(settings.adapter?.supportedAstroFeatures.envGetSecret) ?? - 'unsupported') !== 'unsupported', }; } diff --git a/packages/astro/src/core/build/plugins/plugin-ssr.ts b/packages/astro/src/core/build/plugins/plugin-ssr.ts index 473aa95012..eea2be3e8e 100644 --- a/packages/astro/src/core/build/plugins/plugin-ssr.ts +++ b/packages/astro/src/core/build/plugins/plugin-ssr.ts @@ -1,5 +1,4 @@ import type { Plugin as VitePlugin } from 'vite'; -import type { AstroSettings } from '../../../types/astro.js'; import type { AstroAdapter } from '../../../types/public/integrations.js'; import { routeIsRedirect } from '../../redirects/index.js'; import { VIRTUAL_ISLAND_MAP_ID } from '../../server-islands/vite-plugin-server-islands.js'; diff --git a/packages/astro/src/core/create-vite.ts b/packages/astro/src/core/create-vite.ts index 7b680c4055..5d9e77b3d9 100644 --- a/packages/astro/src/core/create-vite.ts +++ b/packages/astro/src/core/create-vite.ts @@ -12,6 +12,7 @@ import { astroContentImportPlugin, astroContentVirtualModPlugin, } from '../content/index.js'; +import { createEnvLoader } from '../env/env-loader.js'; import { astroEnv } from '../env/vite-plugin-env.js'; import astroInternationalization from '../i18n/vite-plugin-i18n.js'; import astroPrefetch from '../prefetch/vite-plugin-prefetch.js'; @@ -123,6 +124,7 @@ export async function createVite( }); const srcDirPattern = glob.convertPathToPattern(fileURLToPath(settings.config.srcDir)); + const envLoader = createEnvLoader(); // Start with the Vite configuration that Astro core needs const commonConfig: vite.InlineConfig = { @@ -146,8 +148,8 @@ export async function createVite( // The server plugin is for dev only and having it run during the build causes // the build to run very slow as the filewatcher is triggered often. command === 'dev' && vitePluginAstroServer({ settings, logger, fs, manifest, ssrManifest }), // ssrManifest is only required in dev mode, where it gets created before a Vite instance is created, and get passed to this function - envVitePlugin({ settings }), - astroEnv({ settings, mode, sync }), + envVitePlugin({ envLoader }), + astroEnv({ settings, mode, sync, envLoader }), markdownVitePlugin({ settings, logger }), htmlVitePlugin(), astroPostprocessVitePlugin(), diff --git a/packages/astro/src/core/render/params-and-props.ts b/packages/astro/src/core/render/params-and-props.ts index c1fe318ceb..f8799115b0 100644 --- a/packages/astro/src/core/render/params-and-props.ts +++ b/packages/astro/src/core/render/params-and-props.ts @@ -47,7 +47,8 @@ export async function getProps(opts: GetParamsAndPropsOptions): Promise { base, }); - // The pathname used here comes from the server, which already encored. + if (!staticPaths.length) return {}; + // The pathname used here comes from the server, which already encoded. // Since we decided to not mess up with encoding anymore, we need to decode them back so the parameters can match // the ones expected from the users const params = getParams(route, decodeURI(pathname)); @@ -77,7 +78,11 @@ export function getParams(route: RouteData, pathname: string): Params { if (!route.params.length) return {}; // The RegExp pattern expects a decoded string, but the pathname is encoded // when the URL contains non-English characters. - const paramsMatch = route.pattern.exec(pathname); + const paramsMatch = + route.pattern.exec(pathname) || + route.fallbackRoutes + .map((fallbackRoute) => fallbackRoute.pattern.exec(pathname)) + .find((x) => x); if (!paramsMatch) return {}; const params: Params = {}; route.params.forEach((key, i) => { diff --git a/packages/astro/src/core/util.ts b/packages/astro/src/core/util.ts index f9dd0ced8b..f0447529a9 100644 --- a/packages/astro/src/core/util.ts +++ b/packages/astro/src/core/util.ts @@ -5,7 +5,7 @@ import type { AstroSettings } from '../types/astro.js'; import type { AstroConfig } from '../types/public/config.js'; import type { RouteType } from '../types/public/internal.js'; import { SUPPORTED_MARKDOWN_FILE_EXTENSIONS } from './constants.js'; -import { removeTrailingForwardSlash, slash } from './path.js'; +import { removeQueryString, removeTrailingForwardSlash, slash } from './path.js'; /** Returns true if argument is an object of any prototype/class (but not null). */ export function isObject(value: unknown): value is Record { @@ -18,9 +18,10 @@ export function isURL(value: unknown): value is URL { } /** Check if a file is a markdown file based on its extension */ export function isMarkdownFile(fileId: string, option?: { suffix?: string }): boolean { + const id = removeQueryString(fileId); const _suffix = option?.suffix ?? ''; for (let markdownFileExtension of SUPPORTED_MARKDOWN_FILE_EXTENSIONS) { - if (fileId.endsWith(`${markdownFileExtension}${_suffix}`)) return true; + if (id.endsWith(`${markdownFileExtension}${_suffix}`)) return true; } return false; } diff --git a/packages/astro/src/env/env-loader.ts b/packages/astro/src/env/env-loader.ts new file mode 100644 index 0000000000..d3893c6f90 --- /dev/null +++ b/packages/astro/src/env/env-loader.ts @@ -0,0 +1,60 @@ +import { fileURLToPath } from 'node:url'; +import { loadEnv } from 'vite'; +import type { AstroConfig } from '../types/public/index.js'; + +// Match valid JS variable names (identifiers), which accepts most alphanumeric characters, +// except that the first character cannot be a number. +const isValidIdentifierRe = /^[_$a-zA-Z][\w$]*$/; + +function getPrivateEnv( + fullEnv: Record, + astroConfig: AstroConfig, +): Record { + const viteConfig = astroConfig.vite; + let envPrefixes: string[] = ['PUBLIC_']; + if (viteConfig.envPrefix) { + envPrefixes = Array.isArray(viteConfig.envPrefix) + ? viteConfig.envPrefix + : [viteConfig.envPrefix]; + } + + const privateEnv: Record = {}; + for (const key in fullEnv) { + // Ignore public env var + if (isValidIdentifierRe.test(key) && envPrefixes.every((prefix) => !key.startsWith(prefix))) { + if (typeof process.env[key] !== 'undefined') { + let value = process.env[key]; + // Replacements are always strings, so try to convert to strings here first + if (typeof value !== 'string') { + value = `${value}`; + } + // Boolean values should be inlined to support `export const prerender` + // We already know that these are NOT sensitive values, so inlining is safe + if (value === '0' || value === '1' || value === 'true' || value === 'false') { + privateEnv[key] = value; + } else { + privateEnv[key] = `process.env.${key}`; + } + } else { + privateEnv[key] = JSON.stringify(fullEnv[key]); + } + } + } + return privateEnv; +} + +export const createEnvLoader = () => { + let privateEnv: Record = {}; + return { + load: (mode: string, config: AstroConfig) => { + const loaded = loadEnv(mode, config.vite.envDir ?? fileURLToPath(config.root), ''); + privateEnv = getPrivateEnv(loaded, config); + return loaded; + }, + getPrivateEnv: () => { + return privateEnv; + }, + }; +}; + +export type EnvLoader = ReturnType; diff --git a/packages/astro/src/env/runtime.ts b/packages/astro/src/env/runtime.ts index a2017b617f..25a87d4bcf 100644 --- a/packages/astro/src/env/runtime.ts +++ b/packages/astro/src/env/runtime.ts @@ -4,14 +4,14 @@ import type { ValidationResultInvalid } from './validators.js'; export { validateEnvVariable, getEnvFieldType } from './validators.js'; export type GetEnv = (key: string) => string | undefined; -type OnSetGetEnv = (reset: boolean) => void; +type OnSetGetEnv = () => void; let _getEnv: GetEnv = (key) => process.env[key]; -export function setGetEnv(fn: GetEnv, reset = false) { +export function setGetEnv(fn: GetEnv) { _getEnv = fn; - _onSetGetEnv(reset); + _onSetGetEnv(); } let _onSetGetEnv: OnSetGetEnv = () => {}; diff --git a/packages/astro/src/env/vite-plugin-env.ts b/packages/astro/src/env/vite-plugin-env.ts index 816f460b31..1d02839243 100644 --- a/packages/astro/src/env/vite-plugin-env.ts +++ b/packages/astro/src/env/vite-plugin-env.ts @@ -1,6 +1,5 @@ import { readFileSync } from 'node:fs'; -import { fileURLToPath } from 'node:url'; -import { type Plugin, loadEnv } from 'vite'; +import type { Plugin } from 'vite'; import { AstroError, AstroErrorData } from '../core/errors/index.js'; import type { AstroSettings } from '../types/astro.js'; import { @@ -8,6 +7,7 @@ import { VIRTUAL_MODULES_IDS, VIRTUAL_MODULES_IDS_VALUES, } from './constants.js'; +import type { EnvLoader } from './env-loader.js'; import { type InvalidVariable, invalidVariablesToError } from './errors.js'; import type { EnvSchema } from './schema.js'; import { getEnvFieldType, validateEnvVariable } from './validators.js'; @@ -16,21 +16,29 @@ interface AstroEnvPluginParams { settings: AstroSettings; mode: string; sync: boolean; + envLoader: EnvLoader; } -export function astroEnv({ settings, mode, sync }: AstroEnvPluginParams): Plugin { +export function astroEnv({ settings, mode, sync, envLoader }: AstroEnvPluginParams): Plugin { const { schema, validateSecrets } = settings.config.env; + let isDev: boolean; let templates: { client: string; server: string; internal: string } | null = null; return { name: 'astro-env-plugin', enforce: 'pre', + config(_, { command }) { + isDev = command !== 'build'; + }, buildStart() { - const loadedEnv = loadEnv(mode, fileURLToPath(settings.config.root), ''); - for (const [key, value] of Object.entries(loadedEnv)) { - if (value !== undefined) { - process.env[key] = value; + const loadedEnv = envLoader.load(mode, settings.config); + + if (!isDev) { + for (const [key, value] of Object.entries(loadedEnv)) { + if (value !== undefined) { + process.env[key] = value; + } } } @@ -42,7 +50,7 @@ export function astroEnv({ settings, mode, sync }: AstroEnvPluginParams): Plugin }); templates = { - ...getTemplates(schema, validatedVariables), + ...getTemplates(schema, validatedVariables, isDev ? loadedEnv : null), internal: `export const schema = ${JSON.stringify(schema)};`, }; }, @@ -122,6 +130,7 @@ function validatePublicVariables({ function getTemplates( schema: EnvSchema, validatedVariables: ReturnType, + loadedEnv: Record | null, ) { let client = ''; let server = readFileSync(MODULE_TEMPLATE_URL, 'utf-8'); @@ -142,10 +151,15 @@ function getTemplates( } server += `export let ${key} = _internalGetSecret(${JSON.stringify(key)});\n`; - onSetGetEnv += `${key} = reset ? undefined : _internalGetSecret(${JSON.stringify(key)});\n`; + onSetGetEnv += `${key} = _internalGetSecret(${JSON.stringify(key)});\n`; } server = server.replace('// @@ON_SET_GET_ENV@@', onSetGetEnv); + if (loadedEnv) { + server = server.replace('// @@GET_ENV@@', `return (${JSON.stringify(loadedEnv)})[key];`); + } else { + server = server.replace('// @@GET_ENV@@', 'return _getEnv(key);'); + } return { client, diff --git a/packages/astro/src/i18n/index.ts b/packages/astro/src/i18n/index.ts index 455e2e1414..e1e3750ea4 100644 --- a/packages/astro/src/i18n/index.ts +++ b/packages/astro/src/i18n/index.ts @@ -298,9 +298,14 @@ export function redirectToDefaultLocale({ } // NOTE: public function exported to the users via `astro:i18n` module -export function notFound({ base, locales }: MiddlewarePayload) { +export function notFound({ base, locales, fallback }: MiddlewarePayload) { return function (context: APIContext, response?: Response): Response | undefined { - if (response?.headers.get(REROUTE_DIRECTIVE_HEADER) === 'no') return response; + if ( + response?.headers.get(REROUTE_DIRECTIVE_HEADER) === 'no' && + typeof fallback === 'undefined' + ) { + return response; + } const url = context.url; // We return a 404 if: diff --git a/packages/astro/src/i18n/middleware.ts b/packages/astro/src/i18n/middleware.ts index eefb8a9dd5..c2805b1a32 100644 --- a/packages/astro/src/i18n/middleware.ts +++ b/packages/astro/src/i18n/middleware.ts @@ -83,7 +83,6 @@ export function createI18nMiddleware( } const { currentLocale } = context; - switch (i18n.strategy) { // NOTE: theoretically, we should never hit this code path case 'manual': { diff --git a/packages/astro/src/runtime/server/render/util.ts b/packages/astro/src/runtime/server/render/util.ts index 9c771a0de0..d693ad070f 100644 --- a/packages/astro/src/runtime/server/render/util.ts +++ b/packages/astro/src/runtime/server/render/util.ts @@ -7,7 +7,7 @@ import { HTMLString, markHTMLString } from '../escape.js'; export const voidElementNames = /^(area|base|br|col|command|embed|hr|img|input|keygen|link|meta|param|source|track|wbr)$/i; const htmlBooleanAttributes = - /^(?:allowfullscreen|async|autofocus|autoplay|checked|controls|default|defer|disabled|disablepictureinpicture|disableremoteplayback|formnovalidate|hidden|loop|nomodule|novalidate|open|playsinline|readonly|required|reversed|scoped|seamless|selected|itemscope)$/i; + /^(?:allowfullscreen|async|autofocus|autoplay|checked|controls|default|defer|disabled|disablepictureinpicture|disableremoteplayback|formnovalidate|hidden|inert|loop|nomodule|novalidate|open|playsinline|readonly|required|reversed|scoped|seamless|selected|itemscope)$/i; const AMPERSAND_REGEX = /&/g; const DOUBLE_QUOTE_REGEX = /"/g; diff --git a/packages/astro/src/virtual-modules/i18n.ts b/packages/astro/src/virtual-modules/i18n.ts index 8f85ae5f61..d2e193fd7c 100644 --- a/packages/astro/src/virtual-modules/i18n.ts +++ b/packages/astro/src/virtual-modules/i18n.ts @@ -378,10 +378,10 @@ if (i18n?.routing === 'manual') { fallbackType = toFallbackType(customOptions); const manifest: SSRManifest['i18n'] = { ...i18n, - fallback: undefined, strategy, domainLookupTable: {}, fallbackType, + fallback: i18n.fallback, }; return I18nInternals.createMiddleware(manifest, base, trailingSlash, format); }; diff --git a/packages/astro/src/vite-plugin-astro-server/plugin.ts b/packages/astro/src/vite-plugin-astro-server/plugin.ts index 871a123160..b706f967d3 100644 --- a/packages/astro/src/vite-plugin-astro-server/plugin.ts +++ b/packages/astro/src/vite-plugin-astro-server/plugin.ts @@ -191,7 +191,6 @@ export function createDevelopmentManifest(settings: AstroSettings): SSRManifest i18n: i18nManifest, checkOrigin: (settings.config.security?.checkOrigin && settings.buildOutput === 'server') ?? false, - envGetSecretEnabled: false, key: hasEnvironmentKey() ? getEnvironmentKey() : createKey(), middleware() { return { diff --git a/packages/astro/src/vite-plugin-astro-server/route.ts b/packages/astro/src/vite-plugin-astro-server/route.ts index b4b6598054..eb353e501f 100644 --- a/packages/astro/src/vite-plugin-astro-server/route.ts +++ b/packages/astro/src/vite-plugin-astro-server/route.ts @@ -11,7 +11,7 @@ import { req } from '../core/messages.js'; import { loadMiddleware } from '../core/middleware/loadMiddleware.js'; import { routeIsRedirect } from '../core/redirects/index.js'; import { RenderContext } from '../core/render-context.js'; -import { type SSROptions, getProps } from '../core/render/index.js'; +import { getProps } from '../core/render/index.js'; import { createRequest } from '../core/request.js'; import { redirectTemplate } from '../core/routing/3xx.js'; import { matchAllRoutes } from '../core/routing/index.js'; diff --git a/packages/astro/src/vite-plugin-env/index.ts b/packages/astro/src/vite-plugin-env/index.ts index f68012927c..76d295089f 100644 --- a/packages/astro/src/vite-plugin-env/index.ts +++ b/packages/astro/src/vite-plugin-env/index.ts @@ -1,63 +1,14 @@ -import { fileURLToPath } from 'node:url'; import { transform } from 'esbuild'; import MagicString from 'magic-string'; import type * as vite from 'vite'; -import { loadEnv } from 'vite'; -import type { AstroSettings } from '../types/astro.js'; -import type { AstroConfig } from '../types/public/config.js'; +import type { EnvLoader } from '../env/env-loader.js'; interface EnvPluginOptions { - settings: AstroSettings; + envLoader: EnvLoader; } // Match `import.meta.env` directly without trailing property access const importMetaEnvOnlyRe = /\bimport\.meta\.env\b(?!\.)/; -// Match valid JS variable names (identifiers), which accepts most alphanumeric characters, -// except that the first character cannot be a number. -const isValidIdentifierRe = /^[_$a-zA-Z][\w$]*$/; - -function getPrivateEnv( - viteConfig: vite.ResolvedConfig, - astroConfig: AstroConfig, -): Record { - let envPrefixes: string[] = ['PUBLIC_']; - if (viteConfig.envPrefix) { - envPrefixes = Array.isArray(viteConfig.envPrefix) - ? viteConfig.envPrefix - : [viteConfig.envPrefix]; - } - - // Loads environment variables from `.env` files and `process.env` - const fullEnv = loadEnv( - viteConfig.mode, - viteConfig.envDir ?? fileURLToPath(astroConfig.root), - '', - ); - - const privateEnv: Record = {}; - for (const key in fullEnv) { - // Ignore public env var - if (isValidIdentifierRe.test(key) && envPrefixes.every((prefix) => !key.startsWith(prefix))) { - if (typeof process.env[key] !== 'undefined') { - let value = process.env[key]; - // Replacements are always strings, so try to convert to strings here first - if (typeof value !== 'string') { - value = `${value}`; - } - // Boolean values should be inlined to support `export const prerender` - // We already know that these are NOT sensitive values, so inlining is safe - if (value === '0' || value === '1' || value === 'true' || value === 'false') { - privateEnv[key] = value; - } else { - privateEnv[key] = `process.env.${key}`; - } - } else { - privateEnv[key] = JSON.stringify(fullEnv[key]); - } - } - } - return privateEnv; -} function getReferencedPrivateKeys(source: string, privateEnv: Record): Set { const references = new Set(); @@ -114,13 +65,12 @@ async function replaceDefine( }; } -export default function envVitePlugin({ settings }: EnvPluginOptions): vite.Plugin { +export default function envVitePlugin({ envLoader }: EnvPluginOptions): vite.Plugin { let privateEnv: Record; let defaultDefines: Record; let isDev: boolean; let devImportMetaEnvPrepend: string; let viteConfig: vite.ResolvedConfig; - const { config: astroConfig } = settings; return { name: 'astro:vite-plugin-env', config(_, { command }) { @@ -152,7 +102,9 @@ export default function envVitePlugin({ settings }: EnvPluginOptions): vite.Plug } // Find matches for *private* env and do our own replacement. - privateEnv ??= getPrivateEnv(viteConfig, astroConfig); + // Env is retrieved before process.env is populated by astro:env + // so that import.meta.env is first replaced by values, not process.env + privateEnv ??= envLoader.getPrivateEnv(); // In dev, we can assign the private env vars to `import.meta.env` directly for performance if (isDev) { diff --git a/packages/astro/templates/actions.mjs b/packages/astro/templates/actions.mjs index 82a287448a..93aaa4d762 100644 --- a/packages/astro/templates/actions.mjs +++ b/packages/astro/templates/actions.mjs @@ -1,4 +1,9 @@ -import { ActionError, deserializeActionResult, getActionQueryString } from 'astro:actions'; +import { + ActionError, + appendForwardSlash, + deserializeActionResult, + getActionQueryString, +} from 'astro:actions'; const ENCODED_DOT = '%2E'; @@ -83,7 +88,15 @@ async function handleAction(param, path, context) { headers.set('Content-Length', '0'); } } - const rawResult = await fetch(`${import.meta.env.BASE_URL.replace(/\/$/, '')}/_actions/${path}`, { + + const shouldAppendTrailingSlash = '/** @TRAILING_SLASH@ **/'; + let actionPath = import.meta.env.BASE_URL.replace(/\/$/, '') + '/_actions/' + path; + + if (shouldAppendTrailingSlash) { + actionPath = appendForwardSlash(actionPath); + } + + const rawResult = await fetch(actionPath, { method: 'POST', body, headers, diff --git a/packages/astro/templates/env.mjs b/packages/astro/templates/env.mjs index 4144dde5b7..6526033514 100644 --- a/packages/astro/templates/env.mjs +++ b/packages/astro/templates/env.mjs @@ -1,13 +1,23 @@ // @ts-check import { schema } from 'virtual:astro:env/internal'; import { + // biome-ignore lint/correctness/noUnusedImports: `_getEnv` is used by the generated code + getEnv as _getEnv, createInvalidVariablesError, - getEnv, getEnvFieldType, setOnSetGetEnv, validateEnvVariable, } from 'astro/env/runtime'; +// @ts-expect-error +/** @returns {string} */ +// used while generating the virtual module +// biome-ignore lint/correctness/noUnusedFunctionParameters: `key` is used by the generated code +// biome-ignore lint/correctness/noUnusedVariables: `key` is used by the generated code +const getEnv = (key) => { + // @@GET_ENV@@ +}; + export const getSecret = (key) => { return getEnv(key); }; @@ -25,9 +35,6 @@ const _internalGetSecret = (key) => { throw createInvalidVariablesError(key, type, result); }; -// used while generating the virtual module -// biome-ignore lint/correctness/noUnusedFunctionParameters: `reset` is used by the generated code -// biome-ignore lint/correctness/noUnusedVariables: `reset` is used by the generated code -setOnSetGetEnv((reset) => { +setOnSetGetEnv(() => { // @@ON_SET_GET_ENV@@ }); diff --git a/packages/astro/test/actions.test.js b/packages/astro/test/actions.test.js index d8da4e72e3..2af8ebdd97 100644 --- a/packages/astro/test/actions.test.js +++ b/packages/astro/test/actions.test.js @@ -564,6 +564,30 @@ it('Base path should be used', async () => { await devServer.stop(); }); +it('Should support trailing slash', async () => { + const fixture = await loadFixture({ + root: './fixtures/actions/', + adapter: testAdapter(), + trailingSlash: 'always', + }); + const devServer = await fixture.startDevServer(); + const formData = new FormData(); + formData.append('channel', 'bholmesdev'); + formData.append('comment', 'Hello, World!'); + const res = await fixture.fetch('/_actions/comment/', { + method: 'POST', + body: formData, + }); + + assert.equal(res.ok, true); + assert.equal(res.headers.get('Content-Type'), 'application/json+devalue'); + + const data = devalue.parse(await res.text()); + assert.equal(data.channel, 'bholmesdev'); + assert.equal(data.comment, 'Hello, World!'); + await devServer.stop(); +}); + /** * Follow an expected redirect response. * diff --git a/packages/astro/test/astro-markdown.test.js b/packages/astro/test/astro-markdown.test.js index d0a49c873d..9d41673418 100644 --- a/packages/astro/test/astro-markdown.test.js +++ b/packages/astro/test/astro-markdown.test.js @@ -1,5 +1,5 @@ import assert from 'node:assert/strict'; -import { before, describe, it } from 'node:test'; +import { after, before, describe, it } from 'node:test'; import * as cheerio from 'cheerio'; import { fixLineEndings, loadFixture } from './test-utils.js'; @@ -154,4 +154,24 @@ describe('Astro Markdown', () => { assert.ok(title.includes('import.meta.env.TITLE')); }); }); + + describe('dev', () => { + let devServer; + + before(async () => { + devServer = await fixture.startDevServer(); + }); + + it('ignores .md extensions on query params', async () => { + const res = await fixture.fetch('/false-positive?page=page.md'); + assert.ok(res.ok); + const html = await res.text(); + const $ = cheerio.load(html); + assert.equal($('p').text(), 'the page is not markdown'); + }); + + after(async () => { + await devServer.stop(); + }); + }); }); diff --git a/packages/astro/test/fixtures/astro-markdown/src/pages/false-positive.astro b/packages/astro/test/fixtures/astro-markdown/src/pages/false-positive.astro new file mode 100644 index 0000000000..2f39eceadb --- /dev/null +++ b/packages/astro/test/fixtures/astro-markdown/src/pages/false-positive.astro @@ -0,0 +1,5 @@ +--- +let page = "not markdown" +--- + +

the page is {page}

diff --git a/packages/astro/test/fixtures/content-layer-rendering/content-outside-src-mdx/I'm back!.mdx b/packages/astro/test/fixtures/content-layer-rendering/content-outside-src-mdx/I'm back!.mdx new file mode 100644 index 0000000000..a4442fb6f2 --- /dev/null +++ b/packages/astro/test/fixtures/content-layer-rendering/content-outside-src-mdx/I'm back!.mdx @@ -0,0 +1,16 @@ +--- +title: I'm back! +description: 'Introduction to Iguana.' +publishedDate: 'Sat May 21 2022 00:00:00 GMT-0400 (Eastern Daylight Time)' +tags: [cats, felines] +--- + +import H2 from "../src/components/H2.astro"; + +

Iguana

+ +### Iguana + +This is a rendered entry + +![file](./I'm%20back.jpg) diff --git a/packages/astro/test/fixtures/content-layer-rendering/content-outside-src-mdx/I'm back.jpg b/packages/astro/test/fixtures/content-layer-rendering/content-outside-src-mdx/I'm back.jpg new file mode 100644 index 0000000000..7455a726ef Binary files /dev/null and b/packages/astro/test/fixtures/content-layer-rendering/content-outside-src-mdx/I'm back.jpg differ diff --git a/packages/astro/test/fixtures/content-layer/images/I'm back.jpg b/packages/astro/test/fixtures/content-layer/images/I'm back.jpg new file mode 100644 index 0000000000..7455a726ef Binary files /dev/null and b/packages/astro/test/fixtures/content-layer/images/I'm back.jpg differ diff --git a/packages/astro/test/fixtures/content-layer/src/content/space/endeavour.md b/packages/astro/test/fixtures/content-layer/src/content/space/endeavour.md index 51d6e8c421..43dfd97a1f 100644 --- a/packages/astro/test/fixtures/content-layer/src/content/space/endeavour.md +++ b/packages/astro/test/fixtures/content-layer/src/content/space/endeavour.md @@ -3,6 +3,8 @@ title: Endeavour description: 'Learn about the Endeavour NASA space shuttle.' publishedDate: 'Sun Jul 11 2021 00:00:00 GMT-0400 (Eastern Daylight Time)' tags: [space, 90s] +heroImage: "@images/I'm back.jpg" + --- **Source:** [Wikipedia](https://en.wikipedia.org/wiki/Space_Shuttle_Endeavour) diff --git a/packages/astro/test/fixtures/i18n-routing-fallback/src/pages/blog/[id].astro b/packages/astro/test/fixtures/i18n-routing-fallback/src/pages/blog/[id].astro index 97b41230d6..f277b93efe 100644 --- a/packages/astro/test/fixtures/i18n-routing-fallback/src/pages/blog/[id].astro +++ b/packages/astro/test/fixtures/i18n-routing-fallback/src/pages/blog/[id].astro @@ -1,18 +1,28 @@ --- +// for SSR +const blogs = { + 1: { content: "Hello world" }, + 2: { content: "Eat Something" }, + 3: { content: "How are you?" }, +} +const id = Astro.params?.id; +const ssrContent = id && blogs[id]?.content; + +// for SSG export function getStaticPaths() { return [ {params: {id: '1'}, props: { content: "Hello world" }}, {params: {id: '2'}, props: { content: "Eat Something" }}, {params: {id: '3'}, props: { content: "How are you?" }}, - ]; + ] } -const { content } = Astro.props; +const { content } = Astro.props --- Astro -{content} +{content || ssrContent} diff --git a/packages/astro/test/fixtures/i18n-routing-fallback/src/pages/pt/blog/[id].astro b/packages/astro/test/fixtures/i18n-routing-fallback/src/pages/pt/blog/[id].astro index e37f83a302..ed4415fc5b 100644 --- a/packages/astro/test/fixtures/i18n-routing-fallback/src/pages/pt/blog/[id].astro +++ b/packages/astro/test/fixtures/i18n-routing-fallback/src/pages/pt/blog/[id].astro @@ -1,4 +1,12 @@ --- +const blogs = { + 1: { content: "Hola mundo" }, + 2: { content: "Eat Something" }, + 3: { content: "How are you?" }, +} +const id = Astro.params?.id; +const ssrContent = id && blogs[id]?.content; + export function getStaticPaths() { return [ {params: {id: '1'}, props: { content: "Hola mundo" }}, @@ -13,6 +21,6 @@ const { content } = Astro.props; Astro -{content} +{content || ssrContent} diff --git a/packages/astro/test/fixtures/i18n-routing-manual-with-default-middleware/astro.config.mjs b/packages/astro/test/fixtures/i18n-routing-manual-with-default-middleware/astro.config.mjs index 0638988f06..8006c260f8 100644 --- a/packages/astro/test/fixtures/i18n-routing-manual-with-default-middleware/astro.config.mjs +++ b/packages/astro/test/fixtures/i18n-routing-manual-with-default-middleware/astro.config.mjs @@ -9,6 +9,9 @@ export default defineConfig({ codes: ["es", "es-ar"] } ], - routing: "manual" + routing: "manual", + fallback: { + it: 'en' + } } }) diff --git a/packages/astro/test/fixtures/i18n-routing-manual-with-default-middleware/src/middleware.js b/packages/astro/test/fixtures/i18n-routing-manual-with-default-middleware/src/middleware.js index 60d179ec71..afc3c6c607 100644 --- a/packages/astro/test/fixtures/i18n-routing-manual-with-default-middleware/src/middleware.js +++ b/packages/astro/test/fixtures/i18n-routing-manual-with-default-middleware/src/middleware.js @@ -18,5 +18,6 @@ export const onRequest = sequence( customLogic, middleware({ prefixDefaultLocale: true, + fallbackType: "rewrite" }) ); diff --git a/packages/astro/test/fixtures/middleware-full-ssr/package.json b/packages/astro/test/fixtures/middleware-full-ssr/package.json new file mode 100644 index 0000000000..4f8b625c0b --- /dev/null +++ b/packages/astro/test/fixtures/middleware-full-ssr/package.json @@ -0,0 +1,8 @@ +{ + "name": "@test/middleware-full-ssr", + "version": "0.0.0", + "private": true, + "dependencies": { + "astro": "workspace:*" + } +} diff --git a/packages/astro/test/fixtures/middleware-full-ssr/src/error.js b/packages/astro/test/fixtures/middleware-full-ssr/src/error.js new file mode 100644 index 0000000000..6eed03a82c --- /dev/null +++ b/packages/astro/test/fixtures/middleware-full-ssr/src/error.js @@ -0,0 +1 @@ +throw new Error("Shoud not error at build time") diff --git a/packages/astro/test/fixtures/middleware-full-ssr/src/middleware.js b/packages/astro/test/fixtures/middleware-full-ssr/src/middleware.js new file mode 100644 index 0000000000..0061049c13 --- /dev/null +++ b/packages/astro/test/fixtures/middleware-full-ssr/src/middleware.js @@ -0,0 +1,2 @@ +import "./error.js" +export const onRequest = (_ , next) => next(); diff --git a/packages/astro/test/fixtures/middleware-full-ssr/src/pages/index.astro b/packages/astro/test/fixtures/middleware-full-ssr/src/pages/index.astro new file mode 100644 index 0000000000..395a4d695c --- /dev/null +++ b/packages/astro/test/fixtures/middleware-full-ssr/src/pages/index.astro @@ -0,0 +1,14 @@ +--- +const data = Astro.locals; +--- + + + + Testing + + + + Index +

{data?.name}

+ + diff --git a/packages/astro/test/i18n-routing-manual-with-default-middleware.test.js b/packages/astro/test/i18n-routing-manual-with-default-middleware.test.js index af900a43b5..0b24c6aa7a 100644 --- a/packages/astro/test/i18n-routing-manual-with-default-middleware.test.js +++ b/packages/astro/test/i18n-routing-manual-with-default-middleware.test.js @@ -117,4 +117,13 @@ describe('SSR manual routing', () => { const $ = cheerio.load(html); assert.equal($('p').text(), '/en/blog/title/'); }); + + it('should use the fallback', async () => { + let request = new Request('http://example.com/it/start'); + let response = await app.render(request); + assert.equal(response.status, 200); + const html = await response.text(); + const $ = cheerio.load(html); + assert.equal($('p').text(), '/en/blog/title/'); + }); }); diff --git a/packages/astro/test/i18n-routing.test.js b/packages/astro/test/i18n-routing.test.js index 441823fc7a..27491069d3 100644 --- a/packages/astro/test/i18n-routing.test.js +++ b/packages/astro/test/i18n-routing.test.js @@ -2000,12 +2000,14 @@ describe('Fallback rewrite dev server', () => { root: './fixtures/i18n-routing-fallback/', i18n: { defaultLocale: 'en', - locales: ['en', 'fr'], + locales: ['en', 'fr', 'es', 'it', 'pt'], routing: { prefixDefaultLocale: false, }, fallback: { fr: 'en', + it: 'en', + es: 'pt', }, fallbackType: 'rewrite', }, @@ -2021,6 +2023,27 @@ describe('Fallback rewrite dev server', () => { assert.match(html, /Hello/); // assert.fail() }); + + it('should render fallback locale paths with path parameters correctly (fr)', async () => { + let response = await fixture.fetch('/fr/blog/1'); + assert.equal(response.status, 200); + const text = await response.text(); + assert.match(text, /Hello world/); + }); + + it('should render fallback locale paths with path parameters correctly (es)', async () => { + let response = await fixture.fetch('/es/blog/1'); + assert.equal(response.status, 200); + const text = await response.text(); + assert.match(text, /Hola mundo/); + }); + + it('should render fallback locale paths with query parameters correctly (it)', async () => { + let response = await fixture.fetch('/it/blog/1'); + assert.equal(response.status, 200); + const text = await response.text(); + assert.match(text, /Hello world/); + }); }); describe('Fallback rewrite SSG', () => { @@ -2032,13 +2055,15 @@ describe('Fallback rewrite SSG', () => { root: './fixtures/i18n-routing-fallback/', i18n: { defaultLocale: 'en', - locales: ['en', 'fr'], + locales: ['en', 'fr', 'es', 'it', 'pt'], routing: { prefixDefaultLocale: false, fallbackType: 'rewrite', }, fallback: { fr: 'en', + it: 'en', + es: 'pt', }, }, }); @@ -2051,6 +2076,21 @@ describe('Fallback rewrite SSG', () => { assert.match(html, /Hello/); // assert.fail() }); + + it('should render fallback locale paths with path parameters correctly (fr)', async () => { + const html = await fixture.readFile('/fr/blog/1/index.html'); + assert.match(html, /Hello world/); + }); + + it('should render fallback locale paths with path parameters correctly (es)', async () => { + const html = await fixture.readFile('/es/blog/1/index.html'); + assert.match(html, /Hola mundo/); + }); + + it('should render fallback locale paths with query parameters correctly (it)', async () => { + const html = await fixture.readFile('/it/blog/1/index.html'); + assert.match(html, /Hello world/); + }); }); describe('Fallback rewrite SSR', () => { @@ -2066,13 +2106,15 @@ describe('Fallback rewrite SSR', () => { adapter: testAdapter(), i18n: { defaultLocale: 'en', - locales: ['en', 'fr'], + locales: ['en', 'fr', 'es', 'it', 'pt'], routing: { prefixDefaultLocale: false, fallbackType: 'rewrite', }, fallback: { fr: 'en', + it: 'en', + es: 'pt', }, }, }); @@ -2087,4 +2129,28 @@ describe('Fallback rewrite SSR', () => { const html = await response.text(); assert.match(html, /Hello/); }); + + it('should render fallback locale paths with path parameters correctly (fr)', async () => { + let request = new Request('http://example.com/new-site/fr/blog/1'); + let response = await app.render(request); + assert.equal(response.status, 200); + const text = await response.text(); + assert.match(text, /Hello world/); + }); + + it('should render fallback locale paths with path parameters correctly (es)', async () => { + let request = new Request('http://example.com/new-site/es/blog/1'); + let response = await app.render(request); + assert.equal(response.status, 200); + const text = await response.text(); + assert.match(text, /Hola mundo/); + }); + + it('should render fallback locale paths with query parameters correctly (it)', async () => { + let request = new Request('http://example.com/new-site/it/blog/1'); + let response = await app.render(request); + assert.equal(response.status, 200); + const text = await response.text(); + assert.match(text, /Hello world/); + }); }); diff --git a/packages/astro/test/middleware.test.js b/packages/astro/test/middleware.test.js index 26bc06d77f..c7c95b5b66 100644 --- a/packages/astro/test/middleware.test.js +++ b/packages/astro/test/middleware.test.js @@ -171,6 +171,21 @@ describe('Middleware in PROD mode, SSG', () => { }); }); +describe('Middleware should not be executed or imported during', () => { + /** @type {import('./test-utils').Fixture} */ + let fixture; + + it('should build the project without errors', async () => { + fixture = await loadFixture({ + root: './fixtures/middleware-full-ssr/', + output: 'server', + adapter: testAdapter({}), + }); + await fixture.build(); + assert.ok('Should build'); + }); +}); + describe('Middleware API in PROD mode, SSR', () => { /** @type {import('./test-utils').Fixture} */ let fixture; diff --git a/packages/astro/test/units/routing/route-matching.test.js b/packages/astro/test/units/routing/route-matching.test.js index b524a7ea10..72900d3156 100644 --- a/packages/astro/test/units/routing/route-matching.test.js +++ b/packages/astro/test/units/routing/route-matching.test.js @@ -1,6 +1,5 @@ import * as assert from 'node:assert/strict'; import { after, before, describe, it } from 'node:test'; -import { fileURLToPath } from 'node:url'; import * as cheerio from 'cheerio'; import { createContainer } from '../../../dist/core/dev/container.js'; import { createViteLoader } from '../../../dist/core/module-loader/vite.js'; diff --git a/packages/db/package.json b/packages/db/package.json index 7bac47649a..16b9b17216 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/db", - "version": "0.14.1", + "version": "0.14.3", "description": "Add libSQL and Astro Studio support to your Astro site", "license": "MIT", "repository": { diff --git a/packages/db/src/core/cli/commands/execute/index.ts b/packages/db/src/core/cli/commands/execute/index.ts index 9a5a1b8e2f..0537362913 100644 --- a/packages/db/src/core/cli/commands/execute/index.ts +++ b/packages/db/src/core/cli/commands/execute/index.ts @@ -1,8 +1,8 @@ import { existsSync } from 'node:fs'; -import { LibsqlError } from '@libsql/client'; import type { AstroConfig } from 'astro'; import { green } from 'kleur/colors'; import type { Arguments } from 'yargs-parser'; +import { isDbError } from '../../../../runtime/utils.js'; import { EXEC_DEFAULT_EXPORT_ERROR, EXEC_ERROR, @@ -64,9 +64,7 @@ export async function cmd({ await mod.default(); console.info(`${green('✔')} File run successfully.`); } catch (e) { - if (e instanceof LibsqlError) { - throw new Error(EXEC_ERROR(e.message)); - } - throw e; + if (isDbError(e)) throw new Error(EXEC_ERROR(e.message)); + else throw e; } } diff --git a/packages/db/src/core/cli/migration-queries.ts b/packages/db/src/core/cli/migration-queries.ts index bd6360665d..db3972d095 100644 --- a/packages/db/src/core/cli/migration-queries.ts +++ b/packages/db/src/core/cli/migration-queries.ts @@ -1,5 +1,4 @@ import { stripVTControlCharacters } from 'node:util'; -import { LibsqlError } from '@libsql/client'; import deepDiff from 'deep-diff'; import { sql } from 'drizzle-orm'; import { SQLiteAsyncDialect } from 'drizzle-orm/sqlite-core'; @@ -8,7 +7,7 @@ import { customAlphabet } from 'nanoid'; import { hasPrimaryKey } from '../../runtime/index.js'; import { createRemoteDatabaseClient } from '../../runtime/index.js'; import { isSerializedSQL } from '../../runtime/types.js'; -import { safeFetch } from '../../runtime/utils.js'; +import { isDbError, safeFetch } from '../../runtime/utils.js'; import { MIGRATION_VERSION } from '../consts.js'; import { RENAME_COLUMN_ERROR, RENAME_TABLE_ERROR } from '../errors.js'; import { @@ -454,7 +453,7 @@ async function getDbCurrentSnapshot( } catch (error) { // Don't handle errors that are not from libSQL if ( - error instanceof LibsqlError && + isDbError(error) && // If the schema was never pushed to the database yet the table won't exist. // Treat a missing snapshot table as an empty table. diff --git a/packages/db/src/core/integration/index.ts b/packages/db/src/core/integration/index.ts index 200c7ddc25..36dc6b0f8b 100644 --- a/packages/db/src/core/integration/index.ts +++ b/packages/db/src/core/integration/index.ts @@ -3,7 +3,6 @@ import { mkdir, writeFile } from 'node:fs/promises'; import { dirname } from 'node:path'; import { fileURLToPath } from 'node:url'; import type { ManagedAppToken } from '@astrojs/studio'; -import { LibsqlError } from '@libsql/client'; import type { AstroIntegration } from 'astro'; import { blue, yellow } from 'kleur/colors'; import { @@ -15,7 +14,7 @@ import { mergeConfig, } from 'vite'; import parseArgs from 'yargs-parser'; -import { AstroDbError } from '../../runtime/utils.js'; +import { AstroDbError, isDbError } from '../../runtime/utils.js'; import { CONFIG_FILE_NAMES, DB_PATH, VIRTUAL_MODULE_ID } from '../consts.js'; import { EXEC_DEFAULT_EXPORT_ERROR, EXEC_ERROR } from '../errors.js'; import { resolveDbConfig } from '../load-file.js'; @@ -27,7 +26,6 @@ import { type LateSeedFiles, type LateTables, type SeedHandler, - resolved, vitePluginDb, } from './vite-plugin-db.js'; @@ -206,7 +204,7 @@ async function executeSeedFile({ try { await mod.default(); } catch (e) { - if (e instanceof LibsqlError) { + if (isDbError(e)) { throw new AstroDbError(EXEC_ERROR(e.message)); } throw e; diff --git a/packages/db/src/runtime/utils.ts b/packages/db/src/runtime/utils.ts index 64301c39ee..9a979b0627 100644 --- a/packages/db/src/runtime/utils.ts +++ b/packages/db/src/runtime/utils.ts @@ -42,6 +42,10 @@ export class DetailedLibsqlError extends LibsqlError { } } +export function isDbError(err: unknown): err is LibsqlError { + return err instanceof LibsqlError || (err instanceof Error && (err as any).libsqlError === true); +} + function slash(path: string) { const isExtendedLengthPath = path.startsWith('\\\\?\\'); diff --git a/packages/db/src/runtime/virtual.ts b/packages/db/src/runtime/virtual.ts index 6f008fe0d8..5f17823a85 100644 --- a/packages/db/src/runtime/virtual.ts +++ b/packages/db/src/runtime/virtual.ts @@ -1,4 +1,3 @@ -import { LibsqlError } from '@libsql/client'; import { sql as _sql } from 'drizzle-orm'; import type { BooleanColumnInput, @@ -21,10 +20,6 @@ function createColumn>(type: }; } -export function isDbError(err: unknown): err is LibsqlError { - return err instanceof LibsqlError; -} - export const column = { number: (opts: T = {} as T) => { return createColumn('number', opts) satisfies { type: 'number' }; @@ -90,3 +85,4 @@ export { } from 'drizzle-orm'; export { alias } from 'drizzle-orm/sqlite-core'; +export { isDbError } from './utils.js'; diff --git a/packages/db/test/test-utils.js b/packages/db/test/test-utils.js index 8315e85512..b608d75b8b 100644 --- a/packages/db/test/test-utils.js +++ b/packages/db/test/test-utils.js @@ -1,9 +1,10 @@ import { createServer } from 'node:http'; -import { LibsqlError, createClient } from '@libsql/client'; +import { createClient } from '@libsql/client'; import { z } from 'zod'; import { cli } from '../dist/core/cli/index.js'; import { resolveDbConfig } from '../dist/core/load-file.js'; import { getCreateIndexQueries, getCreateTableQuery } from '../dist/core/queries.js'; +import { isDbError } from '../dist/runtime/utils.js'; const singleQuerySchema = z.object({ sql: z.string(), @@ -142,7 +143,7 @@ function createRemoteDbServer() { JSON.stringify({ success: false, error: { - code: e instanceof LibsqlError ? e.code : 'SQLITE_QUERY_FAILED', + code: isDbError(e) ? e.code : 'SQLITE_QUERY_FAILED', details: e.message, }, }), diff --git a/packages/integrations/markdoc/CHANGELOG.md b/packages/integrations/markdoc/CHANGELOG.md index 3f192ca7de..1b752b85b2 100644 --- a/packages/integrations/markdoc/CHANGELOG.md +++ b/packages/integrations/markdoc/CHANGELOG.md @@ -1,5 +1,18 @@ # @astrojs/markdoc +## 0.12.3 + +### Patch Changes + +- [#12694](https://github.com/withastro/astro/pull/12694) [`495f46b`](https://github.com/withastro/astro/commit/495f46bca78665732e51c629d93a68fa392b88a4) Thanks [@ematipico](https://github.com/ematipico)! - Fixes a bug where the experimental feature `experimental.svg` was incorrectly used when generating ESM images + +## 0.12.2 + +### Patch Changes + +- Updated dependencies [[`f13417b`](https://github.com/withastro/astro/commit/f13417bfbf73130c224752379e2da33084f89554), [`87231b1`](https://github.com/withastro/astro/commit/87231b1168da66bb593f681206c42fa555dfcabc), [`a71e9b9`](https://github.com/withastro/astro/commit/a71e9b93b317edc0ded49d4d50f1b7841c8cd428)]: + - @astrojs/markdown-remark@6.0.1 + ## 0.12.1 ### Patch Changes diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index 09238b177e..5421f82c12 100644 --- a/packages/integrations/markdoc/package.json +++ b/packages/integrations/markdoc/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/markdoc", "description": "Add support for Markdoc in your Astro site", - "version": "0.12.1", + "version": "0.12.3", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/markdoc/src/content-entry-type.ts b/packages/integrations/markdoc/src/content-entry-type.ts index 67a8be5317..998d8fbb55 100644 --- a/packages/integrations/markdoc/src/content-entry-type.ts +++ b/packages/integrations/markdoc/src/content-entry-type.ts @@ -312,6 +312,7 @@ async function emitOptimizedImages( const src = await emitESMImage( resolved.id, ctx.pluginContext.meta.watchMode, + !!ctx.astroConfig.experimental.svg, ctx.pluginContext.emitFile, ); diff --git a/packages/integrations/markdoc/src/html/transform/html-token-transform.ts b/packages/integrations/markdoc/src/html/transform/html-token-transform.ts index 2c6a5d1e2f..b80595f97b 100644 --- a/packages/integrations/markdoc/src/html/transform/html-token-transform.ts +++ b/packages/integrations/markdoc/src/html/transform/html-token-transform.ts @@ -1,6 +1,7 @@ import type { Tokenizer } from '@markdoc/markdoc'; import { Parser } from 'htmlparser2'; // @ts-expect-error This type isn't exported +// biome-ignore lint/correctness/noUnusedImports: not correctly detected because type isn't exported import type * as Token from 'markdown-it/lib/token'; export function htmlTokenTransform(tokenizer: Tokenizer, tokens: Token[]): Token[] { diff --git a/packages/integrations/mdx/CHANGELOG.md b/packages/integrations/mdx/CHANGELOG.md index e60a7008e3..d6cd10fea1 100644 --- a/packages/integrations/mdx/CHANGELOG.md +++ b/packages/integrations/mdx/CHANGELOG.md @@ -1,5 +1,12 @@ # @astrojs/mdx +## 4.0.2 + +### Patch Changes + +- Updated dependencies [[`f13417b`](https://github.com/withastro/astro/commit/f13417bfbf73130c224752379e2da33084f89554), [`87231b1`](https://github.com/withastro/astro/commit/87231b1168da66bb593f681206c42fa555dfcabc), [`a71e9b9`](https://github.com/withastro/astro/commit/a71e9b93b317edc0ded49d4d50f1b7841c8cd428)]: + - @astrojs/markdown-remark@6.0.1 + ## 4.0.1 ### Patch Changes diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index 0a59585185..3979b3caed 100644 --- a/packages/integrations/mdx/package.json +++ b/packages/integrations/mdx/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/mdx", "description": "Add support for MDX pages in your Astro site", - "version": "4.0.1", + "version": "4.0.2", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/react/CHANGELOG.md b/packages/integrations/react/CHANGELOG.md index ad8fdd7301..794f34b25a 100644 --- a/packages/integrations/react/CHANGELOG.md +++ b/packages/integrations/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/react +## 4.1.0 + +### Minor Changes + +- [#12678](https://github.com/withastro/astro/pull/12678) [`97c9265`](https://github.com/withastro/astro/commit/97c9265754b78af12ad1e399cc75028435028dfa) Thanks [@bskimball](https://github.com/bskimball)! - Add React 19 stable to peer dependencies + ## 4.0.0 ### Major Changes diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index b7302a804c..205f5b0377 100644 --- a/packages/integrations/react/package.json +++ b/packages/integrations/react/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/react", "description": "Use React components within Astro", - "version": "4.0.0", + "version": "4.1.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -63,10 +63,10 @@ "react-dom": "^18.3.1" }, "peerDependencies": { - "@types/react": "^17.0.50 || ^18.0.21", - "@types/react-dom": "^17.0.17 || ^18.0.6", - "react": "^17.0.2 || ^18.0.0 || ^19.0.0-beta", - "react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0-beta" + "@types/react": "^17.0.50 || ^18.0.21 || ^19.0.0", + "@types/react-dom": "^17.0.17 || ^18.0.6 || ^19.0.0", + "react": "^17.0.2 || ^18.0.0 || ^19.0.0", + "react-dom": "^17.0.2 || ^18.0.0 || ^19.0.0" }, "engines": { "node": "^18.17.1 || ^20.3.0 || >=22.0.0" diff --git a/packages/integrations/tailwind/test/fixtures/basic/tailwind.config.js b/packages/integrations/tailwind/test/fixtures/basic/tailwind.config.js index f109096816..278abf14d6 100644 --- a/packages/integrations/tailwind/test/fixtures/basic/tailwind.config.js +++ b/packages/integrations/tailwind/test/fixtures/basic/tailwind.config.js @@ -1,6 +1,7 @@ import path from 'node:path'; +import {fileURLToPath} from "node:url"; /** @type {import('tailwindcss').Config} */ export default { - content: [path.join(__dirname, 'src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}')], + content: [path.join(path.dirname(fileURLToPath(import.meta.url)), 'src/**/*.{astro,html,js,jsx,md,mdx,svelte,ts,tsx,vue}')], }; diff --git a/packages/integrations/vue/CHANGELOG.md b/packages/integrations/vue/CHANGELOG.md index a1f1bb1ae9..d0f6b8ee7f 100644 --- a/packages/integrations/vue/CHANGELOG.md +++ b/packages/integrations/vue/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/vue +## 5.0.2 + +### Patch Changes + +- [#12688](https://github.com/withastro/astro/pull/12688) [`7dc2fca`](https://github.com/withastro/astro/commit/7dc2fca2eeb646bf3fd362d21c5bbfe273838b5a) Thanks [@yoyo837](https://github.com/yoyo837)! - fix vite peer dependency issue for vue integration + ## 5.0.1 ### Patch Changes diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index 3961939046..49928cefe1 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/vue", - "version": "5.0.1", + "version": "5.0.2", "description": "Use Vue components within Astro", "type": "module", "types": "./dist/index.d.ts", @@ -43,10 +43,10 @@ }, "dependencies": { "@vitejs/plugin-vue": "^5.2.1", - "@vitejs/plugin-vue-jsx": "^4.0.1", + "@vitejs/plugin-vue-jsx": "^4.1.1", "@vue/compiler-sfc": "^3.5.12", "vite": "^6.0.1", - "vite-plugin-vue-devtools": "^7.6.3" + "vite-plugin-vue-devtools": "^7.6.7" }, "devDependencies": { "astro": "workspace:*", diff --git a/packages/markdown/remark/CHANGELOG.md b/packages/markdown/remark/CHANGELOG.md index 683600f29c..f30f484298 100644 --- a/packages/markdown/remark/CHANGELOG.md +++ b/packages/markdown/remark/CHANGELOG.md @@ -1,5 +1,15 @@ # @astrojs/markdown-remark +## 6.0.1 + +### Patch Changes + +- [#12646](https://github.com/withastro/astro/pull/12646) [`f13417b`](https://github.com/withastro/astro/commit/f13417bfbf73130c224752379e2da33084f89554) Thanks [@bluwy](https://github.com/bluwy)! - Avoids parsing frontmatter that are not at the top of a file + +- [#12570](https://github.com/withastro/astro/pull/12570) [`87231b1`](https://github.com/withastro/astro/commit/87231b1168da66bb593f681206c42fa555dfcabc) Thanks [@GrimLink](https://github.com/GrimLink)! - Removes trailing new line in code blocks to prevent generating a trailing empty `` tag + +- [#12664](https://github.com/withastro/astro/pull/12664) [`a71e9b9`](https://github.com/withastro/astro/commit/a71e9b93b317edc0ded49d4d50f1b7841c8cd428) Thanks [@bluwy](https://github.com/bluwy)! - Fixes frontmatter parsing if file is encoded in UTF8 with BOM + ## 6.0.0 ### Major Changes diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json index a9c7f03be4..2d133873b5 100644 --- a/packages/markdown/remark/package.json +++ b/packages/markdown/remark/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/markdown-remark", - "version": "6.0.0", + "version": "6.0.1", "type": "module", "author": "withastro", "license": "MIT", diff --git a/packages/upgrade/CHANGELOG.md b/packages/upgrade/CHANGELOG.md index f0014da8d7..a41d315aab 100644 --- a/packages/upgrade/CHANGELOG.md +++ b/packages/upgrade/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/upgrade +## 0.4.2 + +### Patch Changes + +- [#12706](https://github.com/withastro/astro/pull/12706) [`f6c4214`](https://github.com/withastro/astro/commit/f6c4214042c68de137a69aa15dea81ed9cbc822a) Thanks [@ascorbic](https://github.com/ascorbic)! - Fixes a bug that caused registry URLs that specify a port to be incorrectly detected as offline. + ## 0.4.1 ### Patch Changes diff --git a/packages/upgrade/package.json b/packages/upgrade/package.json index c3cc86f00a..ae633f2302 100644 --- a/packages/upgrade/package.json +++ b/packages/upgrade/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/upgrade", - "version": "0.4.1", + "version": "0.4.2", "type": "module", "author": "withastro", "license": "MIT", diff --git a/packages/upgrade/src/actions/verify.ts b/packages/upgrade/src/actions/verify.ts index 384df5134a..3b7c15a9e1 100644 --- a/packages/upgrade/src/actions/verify.ts +++ b/packages/upgrade/src/actions/verify.ts @@ -43,8 +43,8 @@ export async function verify( } function isOnline(registry: string): Promise { - const { host } = new URL(registry); - return dns.lookup(host).then( + const { hostname } = new URL(registry); + return dns.lookup(hostname).then( () => true, () => false, ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cd97f9e318..e47377c548 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -142,13 +142,13 @@ importers: examples/basics: dependencies: astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro examples/blog: dependencies: '@astrojs/mdx': - specifier: ^4.0.1 + specifier: ^4.0.2 version: link:../../packages/integrations/mdx '@astrojs/rss': specifier: ^4.0.10 @@ -157,22 +157,22 @@ importers: specifier: ^3.2.1 version: link:../../packages/integrations/sitemap astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro examples/container-with-vitest: dependencies: '@astrojs/react': - specifier: ^4.0.0 + specifier: ^4.1.0 version: link:../../packages/integrations/react astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro react: specifier: ^18.3.1 @@ -203,7 +203,7 @@ importers: specifier: ^3.14.3 version: 3.14.3 astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro examples/framework-multiple: @@ -212,7 +212,7 @@ importers: specifier: ^4.0.0 version: link:../../packages/integrations/preact '@astrojs/react': - specifier: ^4.0.0 + specifier: ^4.1.0 version: link:../../packages/integrations/react '@astrojs/solid-js': specifier: ^5.0.0 @@ -221,7 +221,7 @@ importers: specifier: ^7.0.1 version: link:../../packages/integrations/svelte '@astrojs/vue': - specifier: ^5.0.1 + specifier: ^5.0.2 version: link:../../packages/integrations/vue '@types/react': specifier: ^18.3.12 @@ -230,7 +230,7 @@ importers: specifier: ^18.3.1 version: 18.3.1 astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro preact: specifier: ^10.24.3 @@ -260,7 +260,7 @@ importers: specifier: ^1.3.0 version: 1.3.0(preact@10.24.3) astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro preact: specifier: ^10.24.3 @@ -269,7 +269,7 @@ importers: examples/framework-react: dependencies: '@astrojs/react': - specifier: ^4.0.0 + specifier: ^4.1.0 version: link:../../packages/integrations/react '@types/react': specifier: ^18.3.12 @@ -278,7 +278,7 @@ importers: specifier: ^18.3.1 version: 18.3.1 astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro react: specifier: ^18.3.1 @@ -293,7 +293,7 @@ importers: specifier: ^5.0.0 version: link:../../packages/integrations/solid astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro solid-js: specifier: ^1.9.3 @@ -305,7 +305,7 @@ importers: specifier: ^7.0.1 version: link:../../packages/integrations/svelte astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro svelte: specifier: ^5.1.16 @@ -314,10 +314,10 @@ importers: examples/framework-vue: dependencies: '@astrojs/vue': - specifier: ^5.0.1 + specifier: ^5.0.2 version: link:../../packages/integrations/vue astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro vue: specifier: ^3.5.12 @@ -329,25 +329,25 @@ importers: specifier: ^9.0.0 version: 9.0.0(astro@packages+astro) astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro examples/minimal: dependencies: astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro examples/ssr: @@ -359,7 +359,7 @@ importers: specifier: ^7.0.1 version: link:../../packages/integrations/svelte astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro svelte: specifier: ^5.1.16 @@ -368,7 +368,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro sass: specifier: ^1.80.6 @@ -380,28 +380,28 @@ importers: examples/toolbar-app: devDependencies: astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro examples/with-markdoc: dependencies: '@astrojs/markdoc': - specifier: ^0.12.1 + specifier: ^0.12.3 version: link:../../packages/integrations/markdoc astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro examples/with-mdx: dependencies: '@astrojs/mdx': - specifier: ^4.0.1 + specifier: ^4.0.2 version: link:../../packages/integrations/mdx '@astrojs/preact': specifier: ^4.0.0 version: link:../../packages/integrations/preact astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro preact: specifier: ^10.24.3 @@ -416,7 +416,7 @@ importers: specifier: ^0.5.2 version: 0.5.2(nanostores@0.11.3)(preact@10.24.3) astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro nanostores: specifier: ^0.11.3 @@ -428,7 +428,7 @@ importers: examples/with-tailwindcss: dependencies: '@astrojs/mdx': - specifier: ^4.0.1 + specifier: ^4.0.2 version: link:../../packages/integrations/mdx '@astrojs/tailwind': specifier: ^5.1.3 @@ -437,7 +437,7 @@ importers: specifier: ^1.6.4 version: 1.6.4 astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro autoprefixer: specifier: ^10.4.20 @@ -455,7 +455,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^5.0.3 + specifier: ^5.0.5 version: link:../../packages/astro vitest: specifier: ^2.1.6 @@ -3324,6 +3324,12 @@ importers: specifier: workspace:* version: link:../../.. + packages/astro/test/fixtures/middleware-full-ssr: + dependencies: + astro: + specifier: workspace:* + version: link:../../.. + packages/astro/test/fixtures/middleware-no-user-middleware: dependencies: astro: @@ -5200,8 +5206,8 @@ importers: specifier: ^5.2.1 version: 5.2.1(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2)) '@vitejs/plugin-vue-jsx': - specifier: ^4.0.1 - version: 4.0.1(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2)) + specifier: ^4.1.1 + version: 4.1.1(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2)) '@vue/compiler-sfc': specifier: ^3.5.12 version: 3.5.12 @@ -5209,8 +5215,8 @@ importers: specifier: ^6.0.1 version: 6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) vite-plugin-vue-devtools: - specifier: ^7.6.3 - version: 7.6.4(rollup@4.27.4)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2)) + specifier: ^7.6.7 + version: 7.6.7(rollup@4.27.4)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2)) devDependencies: astro: specifier: workspace:* @@ -5675,10 +5681,20 @@ packages: peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-create-class-features-plugin@7.25.9': + resolution: {integrity: sha512-UTZQMvt0d/rSz6KI+qdu7GQze5TIajwTS++GUozlw8VBJDEOAqSXwm1WvmYEZwqdqSGQshRocPDqrt4HBZB3fQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-member-expression-to-functions@7.24.8': resolution: {integrity: sha512-LABppdt+Lp/RlBxqrh4qgf1oEH/WxdzQNDJIu5gC/W1GyvPVrOBiItmmM8wan2fm4oYqFuFfkXmlGpLQhPY8CA==} engines: {node: '>=6.9.0'} + '@babel/helper-member-expression-to-functions@7.25.9': + resolution: {integrity: sha512-wbfdZ9w5vk0C0oyHqAJbc62+vet5prjj01jjJ8sKn3j9h3MQQlflEdXYvuqRWjHnM12coDEqiC1IRCi0U/EKwQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-module-imports@7.18.6': resolution: {integrity: sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==} engines: {node: '>=6.9.0'} @@ -5697,6 +5713,10 @@ packages: resolution: {integrity: sha512-jKiTsW2xmWwxT1ixIdfXUZp+P5yURx2suzLZr5Hi64rURpDYdMW0pv+Uf17EYk2Rd428Lx4tLsnjGJzYKDM/6A==} engines: {node: '>=6.9.0'} + '@babel/helper-optimise-call-expression@7.25.9': + resolution: {integrity: sha512-FIpuNaz5ow8VyrYcnXQTDRGvV6tTjkNtCK/RYNDXGSLlUD6cBuQTSw43CShGxjvfBTfcUA/r6UhUCbtYqkhcuQ==} + engines: {node: '>=6.9.0'} + '@babel/helper-plugin-utils@7.25.9': resolution: {integrity: sha512-kSMlyUVdWe25rEsRGviIgOWnoT/nfABVWlqt9N19/dIPWViAOW2s9wznP5tURbs/IDuNk4gPy3YdYRgH3uxhBw==} engines: {node: '>=6.9.0'} @@ -5707,10 +5727,20 @@ packages: peerDependencies: '@babel/core': ^7.0.0 + '@babel/helper-replace-supers@7.25.9': + resolution: {integrity: sha512-IiDqTOTBQy0sWyeXyGSC5TBJpGFXBkRynjBeXsvbhQFKj2viwJC76Epz35YLU1fpe/Am6Vppb7W7zM4fPQzLsQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + '@babel/helper-skip-transparent-expression-wrappers@7.24.7': resolution: {integrity: sha512-IO+DLT3LQUElMbpzlatRASEyQtfhSE0+m465v++3jyyXeBTBUjtVZg28/gHeV5mrTJqvEKhKroBGAvhW+qPHiQ==} engines: {node: '>=6.9.0'} + '@babel/helper-skip-transparent-expression-wrappers@7.25.9': + resolution: {integrity: sha512-K4Du3BFa3gvyhzgPcntrkDgZzQaq6uozzcpGbOO1OEJaI+EJdqWIMTLgFgQf6lrfiDFo5FU+BxKepI9RmZqahA==} + engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.25.9': resolution: {integrity: sha512-4A/SCr/2KLd5jrtOMFzaKjVtAei3+2r/NChoBNoZ3EyP/+GlhoaEGoWOZUmFmoITP7zOJyHIMm+DYRd8o3PvHA==} engines: {node: '>=6.9.0'} @@ -5767,6 +5797,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-syntax-typescript@7.25.9': + resolution: {integrity: sha512-hjMgRy5hb8uJJjUcdWunWVcoi9bGpJp8p5Ol1229PoN6aytsLwNMgmdftO23wnCLMfVmTwZDWMPNq/D1SY60JQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-react-jsx-development@7.25.9': resolution: {integrity: sha512-9mj6rm7XVYs4mdLIpbZnHOYdpW42uoiBCTVowg7sP1thUOiANgMb4UtpRivR0pp5iL+ocvUv7X4mZgFRpJEzGw==} engines: {node: '>=6.9.0'} @@ -5797,6 +5833,12 @@ packages: peerDependencies: '@babel/core': ^7.0.0-0 + '@babel/plugin-transform-typescript@7.26.3': + resolution: {integrity: sha512-6+5hpdr6mETwSKjmJUdYw0EIkATiQhnELWlE3kJFBwSg/BGIVwVaVbX+gOXBCdc7Ln1RXZxyWGecIXhUfnl7oA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/runtime@7.25.6': resolution: {integrity: sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==} engines: {node: '>=6.9.0'} @@ -7039,6 +7081,9 @@ packages: cpu: [x64] os: [win32] + '@sec-ant/readable-stream@0.4.1': + resolution: {integrity: sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg==} + '@shikijs/core@1.23.1': resolution: {integrity: sha512-NuOVgwcHgVC6jBVH5V7iblziw6iQbWWHrj5IlZI3Fqu2yx9awH7OIQkXIcsHsUmY19ckwSgUMgrqExEyP5A0TA==} @@ -7058,6 +7103,10 @@ packages: resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} engines: {node: '>=18'} + '@sindresorhus/merge-streams@4.0.0': + resolution: {integrity: sha512-tlqY9xq5ukxTUZBmoOp+m61cqwQD5pHJtFY3Mn8CA8ps6yghLH/Hw8UPdqg4OLmFW3IFlcXnQNmo/dh8HzXYIQ==} + engines: {node: '>=18'} + '@solidjs/router@0.15.1': resolution: {integrity: sha512-lb5BRBqQqii/1dQCglx2K68xLkgu7QcrcajWKuuEx6FHTsK/hp5IgVhjy6RzPMLj+SFyrrRi/ldirCFNxtzh0Q==} peerDependencies: @@ -7324,11 +7373,11 @@ packages: peerDependencies: vite: ^4.2.0 || ^5.0.0 || ^6.0.0 - '@vitejs/plugin-vue-jsx@4.0.1': - resolution: {integrity: sha512-7mg9HFGnFHMEwCdB6AY83cVK4A6sCqnrjFYF4WIlebYAQVVJ/sC/CiTruVdrRlhrFoeZ8rlMxY9wYpPTIRhhAg==} + '@vitejs/plugin-vue-jsx@4.1.1': + resolution: {integrity: sha512-uMJqv/7u1zz/9NbWAD3XdjaY20tKTf17XVfQ9zq4wY1BjsB/PjpJPMe2xiG39QpP4ZdhYNhm4Hvo66uJrykNLA==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: - vite: ^5.0.0 + vite: ^5.0.0 || ^6.0.0 vue: ^3.0.0 '@vitejs/plugin-vue@5.2.1': @@ -7462,16 +7511,16 @@ packages: '@vue/compiler-ssr@3.5.13': resolution: {integrity: sha512-wMH6vrYHxQl/IybKJagqbquvxpWCuVYpoUJfCqFZwa/JY1GdATAQ+TgVtgrwwMZ0D07QhA99rs/EAAWfvG6KpA==} - '@vue/devtools-core@7.6.4': - resolution: {integrity: sha512-blSwGVYpb7b5TALMjjoBiAl5imuBF7WEOAtaJaBMNikR8SQkm6mkUt4YlIKh9874/qoimwmpDOm+GHBZ4Y5m+g==} + '@vue/devtools-core@7.6.7': + resolution: {integrity: sha512-6fW8Q0H1NHDXdEcuV6dylT5U2Yxg3SdMnVCey99Y6S4R2PNgFL2vC+VU9U9rHIiaoEUkeza42S7FfHxV4VI3Jg==} peerDependencies: vue: ^3.0.0 - '@vue/devtools-kit@7.6.4': - resolution: {integrity: sha512-Zs86qIXXM9icU0PiGY09PQCle4TI750IPLmAJzW5Kf9n9t5HzSYf6Rz6fyzSwmfMPiR51SUKJh9sXVZu78h2QA==} + '@vue/devtools-kit@7.6.7': + resolution: {integrity: sha512-V8/jrXY/swHgnblABG9U4QCbE60c6RuPasmv2d9FvVqc5d94t1vDiESuvRmdNJBdWz4/D3q6ffgyAfRVjwHYEw==} - '@vue/devtools-shared@7.6.4': - resolution: {integrity: sha512-nD6CUvBEel+y7zpyorjiUocy0nh77DThZJ0k1GRnJeOmY3ATq2fWijEp7wk37gb023Cb0R396uYh5qMSBQ5WFg==} + '@vue/devtools-shared@7.6.7': + resolution: {integrity: sha512-QggO6SviAsolrePAXZ/sA1dSicSPt4TueZibCvydfhNDieL1lAuyMTgQDGst7TEvMGb4vgYv2I+1sDkO4jWNnw==} '@vue/reactivity@3.1.5': resolution: {integrity: sha512-1tdfLmNjWG6t/CsPldh+foumYFo3cpyCHgBYQ34ylaMsJ+SNHQ1kApMIa8jN+i593zQuaw3AdWH0nJTARzCFhg==} @@ -8390,6 +8439,10 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} + execa@9.5.2: + resolution: {integrity: sha512-EHlpxMCpHWSAh1dgS6bVeoLAXGnJNdR93aabr4QCGbzOM73o5XmRfM/e5FUqsw3aagP8S8XEWUWFAxnRBnAF0Q==} + engines: {node: ^18.19.0 || >=20.5.0} + expect-type@1.1.0: resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} engines: {node: '>=12.0.0'} @@ -8435,6 +8488,10 @@ packages: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} + figures@6.1.0: + resolution: {integrity: sha512-d+l3qxjSesT4V7v2fh+QnmFnUWv9lSpjarhShNTgBOfA0ttejbQUAlHLitbjkoRiDulW0OPoQPYIGhIC8ohejg==} + engines: {node: '>=18'} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -8557,6 +8614,10 @@ packages: resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==} engines: {node: '>=16'} + get-stream@9.0.1: + resolution: {integrity: sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA==} + engines: {node: '>=18'} + github-slugger@2.0.0: resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} @@ -8723,6 +8784,10 @@ packages: resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==} engines: {node: '>=16.17.0'} + human-signals@8.0.0: + resolution: {integrity: sha512-/1/GPCpDUCCYwlERiYjxoczfP0zfvZMU/OWgQPMya9AbAE24vseigFdhAMObpc8Q4lc/kjutPfUddDYyAmejnA==} + engines: {node: '>=18.18.0'} + hyperid@3.3.0: resolution: {integrity: sha512-7qhCVT4MJIoEsNcbhglhdmBKb09QtcmJNiIQGq7js/Khf5FtQQ9bzcAuloeqBeee7XD7JqDeve9KNlQya5tSGQ==} @@ -8839,10 +8904,18 @@ packages: resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + is-stream@4.0.1: + resolution: {integrity: sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A==} + engines: {node: '>=18'} + is-subdir@1.2.0: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} engines: {node: '>=4'} + is-unicode-supported@2.1.0: + resolution: {integrity: sha512-mE00Gnza5EEB3Ds0HfMyllZzbBrmLOX3vfWoj9A9PEnTfratQ/BcaJOuMhnkhjXvb2+FkY3VuHqtAGpTPmglFQ==} + engines: {node: '>=18'} + is-what@4.1.16: resolution: {integrity: sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==} engines: {node: '>=12.13'} @@ -9466,6 +9539,10 @@ packages: resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + npm-run-path@6.0.0: + resolution: {integrity: sha512-9qny7Z9DsQU8Ou39ERsPU4OZQlSTP47ShQzuKZ6PRXpYLtIFgl/DEBYEXKlvcEa+9tHVcK8CF81Y2V72qaZhWA==} + engines: {node: '>=18'} + nth-check@2.1.1: resolution: {integrity: sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==} @@ -9588,6 +9665,10 @@ packages: parse-latin@7.0.0: resolution: {integrity: sha512-mhHgobPPua5kZ98EF4HWiH167JWBfl4pvAIXXdbaVohtK7a6YBOy56kvhCqduqyo/f3yrHFWmqmiMg/BkBkYYQ==} + parse-ms@4.0.0: + resolution: {integrity: sha512-TXfryirbmq34y8QBwgqCVLi+8oA3oWx2eAnSn62ITyEhEYaWRlVZ2DvMM9eZbMs/RfxPu/PK/aBLyGj4IrqMHw==} + engines: {node: '>=18'} + parse-numeric-range@1.3.0: resolution: {integrity: sha512-twN+njEipszzlMJd4ONUYgSfZPDxgHhT9Ahed5uTigpQn90FggW4SA/AIPq/6a149fTbE9qBEcSwE3FAEp6wQQ==} @@ -9944,6 +10025,10 @@ packages: resolution: {integrity: sha512-mQUvGU6aUFQ+rNvTIAcZuWGRT9a6f6Yrg9bHs4ImKF+HZCEK+plBvnAZYSIQztknZF2qnzNtr6F8s0+IuptdlQ==} engines: {node: ^14.13.1 || >=16.0.0} + pretty-ms@9.2.0: + resolution: {integrity: sha512-4yf0QO/sllf/1zbZWYnvWw3NxCQwLXKzIj0G849LSufP15BXKM0rbD2Z3wVnkMfjdn/CB0Dpp444gYAACdsplg==} + engines: {node: '>=18'} + prismjs@1.29.0: resolution: {integrity: sha512-Kx/1w86q/epKcmte75LNrEoT+lX8pBpavuAbvJWRXar7Hz8jrtF+e3vY751p0R8H9HdArwaCTNDDzHg/ScJK1Q==} engines: {node: '>=6'} @@ -10316,10 +10401,6 @@ packages: simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} - sirv@2.0.4: - resolution: {integrity: sha512-94Bdh3cC2PKrbgSOUqTiGPWVZeSiXfKOVZNJniWoqrWrRkB1CJzBU3NEbiTsPcYy1lDsANA/THzS+9WBiy5nfQ==} - engines: {node: '>= 10'} - sirv@3.0.0: resolution: {integrity: sha512-BPwJGUeDaDCHihkORDchNyyTvWFhcusy1XMmhEVTQTwGeybFbp8YEmB+njbPnth1FibULBSBVwCQni25XlCUDg==} engines: {node: '>=18'} @@ -10429,6 +10510,10 @@ packages: resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} engines: {node: '>=12'} + strip-final-newline@4.0.0: + resolution: {integrity: sha512-aulFJcD6YK8V1G7iRB5tigAP4TsHBZZrOV8pjV++zdUwmeV8uzbY7yn6h9MswN62adStNZFuCIx4haBnRuMDaw==} + engines: {node: '>=18'} + strip-json-comments@3.1.1: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} @@ -10709,6 +10794,10 @@ packages: resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} engines: {node: '>=18'} + unicorn-magic@0.3.0: + resolution: {integrity: sha512-+QBBXBCvifc56fsbuxZQ6Sic3wqqc3WWaqxs58gvJrcOuN83HGTCwz3oS5phzU9LthRNE9VrJCFCLUgHeeFnfA==} + engines: {node: '>=18'} + unified@11.0.5: resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==} @@ -10809,10 +10898,10 @@ packages: vfile@6.0.3: resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} - vite-hot-client@0.2.3: - resolution: {integrity: sha512-rOGAV7rUlUHX89fP2p2v0A2WWvV3QMX2UYq0fRqsWSvFvev4atHWqjwGoKaZT1VTKyLGk533ecu3eyd0o59CAg==} + vite-hot-client@0.2.4: + resolution: {integrity: sha512-a1nzURqO7DDmnXqabFOliz908FRmIppkBKsJthS8rbe8hBEXwEwe4C3Pp33Z1JoFCYfVL4kTOMLKk0ZZxREIeA==} peerDependencies: - vite: ^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 + vite: ^2.6.0 || ^3.0.0 || ^4.0.0 || ^5.0.0-0 || ^6.0.0-0 vite-node@2.1.6: resolution: {integrity: sha512-DBfJY0n9JUwnyLxPSSUmEePT21j8JZp/sR9n+/gBwQU6DcQOioPdb8/pibWfXForbirSagZCilseYIwaL3f95A==} @@ -10824,8 +10913,8 @@ packages: engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-plugin-inspect@0.8.7: - resolution: {integrity: sha512-/XXou3MVc13A5O9/2Nd6xczjrUwt7ZyI9h8pTnUMkr5SshLcb0PJUOVq2V+XVkdeU4njsqAtmK87THZuO2coGA==} + vite-plugin-inspect@0.8.8: + resolution: {integrity: sha512-aZlBuXsWUPJFmMK92GIv6lH7LrwG2POu4KJ+aEdcqnu92OAf+rhBnfMDQvxIJPEB7hE2t5EyY/PMgf5aDLT8EA==} engines: {node: '>=14'} peerDependencies: '@nuxt/kit': '*' @@ -10844,16 +10933,16 @@ packages: '@testing-library/jest-dom': optional: true - vite-plugin-vue-devtools@7.6.4: - resolution: {integrity: sha512-jxSsLyuETfmZ1OSrmnDp28BG6rmURrP7lkeyHW2gBFDyo+4dUcqVeQNMhbV7uKZn80mDdv06Mysw/5AdGxDvJQ==} + vite-plugin-vue-devtools@7.6.7: + resolution: {integrity: sha512-H1ZyjtpWjP5mHA5R15sQeYgAARuh2Myg3TDFXWZK6QOQRy8s3XjTIt319DogVjU/x3rC3L/jJQjIasRU04mWXA==} engines: {node: '>=v14.21.3'} peerDependencies: - vite: ^3.1.0 || ^4.0.0-0 || ^5.0.0-0 + vite: ^3.1.0 || ^4.0.0-0 || ^5.0.0-0 || ^6.0.0-0 - vite-plugin-vue-inspector@5.2.0: - resolution: {integrity: sha512-wWxyb9XAtaIvV/Lr7cqB1HIzmHZFVUJsTNm3yAxkS87dgh/Ky4qr2wDEWNxF23fdhVa3jQ8MZREpr4XyiuaRqA==} + vite-plugin-vue-inspector@5.3.1: + resolution: {integrity: sha512-cBk172kZKTdvGpJuzCCLg8lJ909wopwsu3Ve9FsL1XsnLBiRT9U3MePcqrgGHgCX2ZgkqZmAGR8taxw+TV6s7A==} peerDependencies: - vite: ^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0 + vite: ^3.0.0-0 || ^4.0.0-0 || ^5.0.0-0 || ^6.0.0-0 vite-svg-loader@5.1.0: resolution: {integrity: sha512-M/wqwtOEjgb956/+m5ZrYT/Iq6Hax0OakWbokj8+9PXOnB7b/4AxESHieEtnNEy7ZpjsjYW1/5nK8fATQMmRxw==} @@ -11485,6 +11574,19 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-create-class-features-plugin@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-member-expression-to-functions': 7.25.9 + '@babel/helper-optimise-call-expression': 7.25.9 + '@babel/helper-replace-supers': 7.25.9(@babel/core@7.26.0) + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/traverse': 7.25.9 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + '@babel/helper-member-expression-to-functions@7.24.8': dependencies: '@babel/traverse': 7.25.9 @@ -11492,6 +11594,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-member-expression-to-functions@7.25.9': + dependencies: + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + transitivePeerDependencies: + - supports-color + '@babel/helper-module-imports@7.18.6': dependencies: '@babel/types': 7.26.0 @@ -11516,6 +11625,10 @@ snapshots: dependencies: '@babel/types': 7.26.0 + '@babel/helper-optimise-call-expression@7.25.9': + dependencies: + '@babel/types': 7.26.0 + '@babel/helper-plugin-utils@7.25.9': {} '@babel/helper-replace-supers@7.25.0(@babel/core@7.26.0)': @@ -11527,6 +11640,15 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-replace-supers@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-member-expression-to-functions': 7.25.9 + '@babel/helper-optimise-call-expression': 7.25.9 + '@babel/traverse': 7.25.9 + transitivePeerDependencies: + - supports-color + '@babel/helper-skip-transparent-expression-wrappers@7.24.7': dependencies: '@babel/traverse': 7.25.9 @@ -11534,6 +11656,13 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/helper-skip-transparent-expression-wrappers@7.25.9': + dependencies: + '@babel/traverse': 7.25.9 + '@babel/types': 7.26.0 + transitivePeerDependencies: + - supports-color + '@babel/helper-string-parser@7.25.9': {} '@babel/helper-validator-identifier@7.25.9': {} @@ -11583,6 +11712,11 @@ snapshots: '@babel/core': 7.26.0 '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-syntax-typescript@7.25.9(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-plugin-utils': 7.25.9 + '@babel/plugin-transform-react-jsx-development@7.25.9(@babel/core@7.26.0)': dependencies: '@babel/core': 7.26.0 @@ -11622,6 +11756,17 @@ snapshots: transitivePeerDependencies: - supports-color + '@babel/plugin-transform-typescript@7.26.3(@babel/core@7.26.0)': + dependencies: + '@babel/core': 7.26.0 + '@babel/helper-annotate-as-pure': 7.25.9 + '@babel/helper-create-class-features-plugin': 7.25.9(@babel/core@7.26.0) + '@babel/helper-plugin-utils': 7.25.9 + '@babel/helper-skip-transparent-expression-wrappers': 7.25.9 + '@babel/plugin-syntax-typescript': 7.25.9(@babel/core@7.26.0) + transitivePeerDependencies: + - supports-color + '@babel/runtime@7.25.6': dependencies: regenerator-runtime: 0.14.1 @@ -12778,6 +12923,8 @@ snapshots: '@rollup/rollup-win32-x64-msvc@4.27.4': optional: true + '@sec-ant/readable-stream@0.4.1': {} + '@shikijs/core@1.23.1': dependencies: '@shikijs/engine-javascript': 1.23.1 @@ -12807,6 +12954,8 @@ snapshots: '@sindresorhus/merge-streams@2.3.0': {} + '@sindresorhus/merge-streams@4.0.0': {} + '@solidjs/router@0.15.1(solid-js@1.9.3)': dependencies: solid-js: 1.9.3 @@ -13110,10 +13259,10 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitejs/plugin-vue-jsx@4.0.1(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2))': + '@vitejs/plugin-vue-jsx@4.1.1(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2))': dependencies: '@babel/core': 7.26.0 - '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.26.0) + '@babel/plugin-transform-typescript': 7.26.3(@babel/core@7.26.0) '@vue/babel-plugin-jsx': 1.2.5(@babel/core@7.26.0) vite: 6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) vue: 3.5.13(typescript@5.7.2) @@ -13281,7 +13430,7 @@ snapshots: '@babel/helper-module-imports': 7.25.9 '@babel/helper-plugin-utils': 7.25.9 '@babel/parser': 7.26.2 - '@vue/compiler-sfc': 3.5.12 + '@vue/compiler-sfc': 3.5.13 transitivePeerDependencies: - supports-color @@ -13345,21 +13494,21 @@ snapshots: '@vue/compiler-dom': 3.5.13 '@vue/shared': 3.5.13 - '@vue/devtools-core@7.6.4(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2))': + '@vue/devtools-core@7.6.7(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2))': dependencies: - '@vue/devtools-kit': 7.6.4 - '@vue/devtools-shared': 7.6.4 + '@vue/devtools-kit': 7.6.7 + '@vue/devtools-shared': 7.6.7 mitt: 3.0.1 - nanoid: 3.3.7 + nanoid: 5.0.9 pathe: 1.1.2 - vite-hot-client: 0.2.3(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)) + vite-hot-client: 0.2.4(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)) vue: 3.5.13(typescript@5.7.2) transitivePeerDependencies: - vite - '@vue/devtools-kit@7.6.4': + '@vue/devtools-kit@7.6.7': dependencies: - '@vue/devtools-shared': 7.6.4 + '@vue/devtools-shared': 7.6.7 birpc: 0.2.19 hookable: 5.5.3 mitt: 3.0.1 @@ -13367,7 +13516,7 @@ snapshots: speakingurl: 14.0.1 superjson: 2.2.1 - '@vue/devtools-shared@7.6.4': + '@vue/devtools-shared@7.6.7': dependencies: rfdc: 1.4.1 @@ -14267,6 +14416,21 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 + execa@9.5.2: + dependencies: + '@sindresorhus/merge-streams': 4.0.0 + cross-spawn: 7.0.6 + figures: 6.1.0 + get-stream: 9.0.1 + human-signals: 8.0.0 + is-plain-obj: 4.1.0 + is-stream: 4.0.1 + npm-run-path: 6.0.0 + pretty-ms: 9.2.0 + signal-exit: 4.1.0 + strip-final-newline: 4.0.0 + yoctocolors: 2.1.1 + expect-type@1.1.0: {} extend@3.0.2: {} @@ -14310,6 +14474,10 @@ snapshots: node-domexception: 1.0.0 web-streams-polyfill: 3.3.3 + figures@6.1.0: + dependencies: + is-unicode-supported: 2.1.0 + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -14418,6 +14586,11 @@ snapshots: get-stream@8.0.1: {} + get-stream@9.0.1: + dependencies: + '@sec-ant/readable-stream': 0.4.1 + is-stream: 4.0.1 + github-slugger@2.0.0: {} glob-parent@5.1.2: @@ -14711,6 +14884,8 @@ snapshots: human-signals@5.0.0: {} + human-signals@8.0.0: {} + hyperid@3.3.0: dependencies: buffer: 5.7.1 @@ -14804,10 +14979,14 @@ snapshots: is-stream@3.0.0: {} + is-stream@4.0.1: {} + is-subdir@1.2.0: dependencies: better-path-resolve: 1.0.0 + is-unicode-supported@2.1.0: {} + is-what@4.1.16: {} is-windows@1.0.2: {} @@ -15701,6 +15880,11 @@ snapshots: dependencies: path-key: 4.0.0 + npm-run-path@6.0.0: + dependencies: + path-key: 4.0.0 + unicorn-magic: 0.3.0 + nth-check@2.1.1: dependencies: boolbase: 1.0.0 @@ -15832,6 +16016,8 @@ snapshots: unist-util-visit-children: 3.0.0 vfile: 6.0.3 + parse-ms@4.0.0: {} + parse-numeric-range@1.3.0: {} parse-srcset@1.0.2: {} @@ -16201,6 +16387,10 @@ snapshots: pretty-bytes@6.1.1: {} + pretty-ms@9.2.0: + dependencies: + parse-ms: 4.0.0 + prismjs@1.29.0: {} progress@2.0.3: {} @@ -16739,12 +16929,6 @@ snapshots: dependencies: is-arrayish: 0.3.2 - sirv@2.0.4: - dependencies: - '@polka/url': 1.0.0-next.25 - mrmime: 2.0.0 - totalist: 3.0.1 - sirv@3.0.0: dependencies: '@polka/url': 1.0.0-next.25 @@ -16852,6 +17036,8 @@ snapshots: strip-final-newline@3.0.0: {} + strip-final-newline@4.0.0: {} + strip-json-comments@3.1.1: {} strip-json-comments@5.0.1: {} @@ -17166,6 +17352,8 @@ snapshots: unicorn-magic@0.1.0: {} + unicorn-magic@0.3.0: {} + unified@11.0.5: dependencies: '@types/unist': 3.0.3 @@ -17296,7 +17484,7 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - vite-hot-client@0.2.3(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)): + vite-hot-client@0.2.4(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)): dependencies: vite: 6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) @@ -17339,7 +17527,7 @@ snapshots: - supports-color - terser - vite-plugin-inspect@0.8.7(rollup@4.27.4)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)): + vite-plugin-inspect@0.8.8(rollup@4.27.4)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)): dependencies: '@antfu/utils': 0.7.10 '@rollup/pluginutils': 5.1.3(rollup@4.27.4) @@ -17349,7 +17537,7 @@ snapshots: open: 10.1.0 perfect-debounce: 1.0.0 picocolors: 1.1.1 - sirv: 2.0.4 + sirv: 3.0.0 vite: 6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) transitivePeerDependencies: - rollup @@ -17368,23 +17556,23 @@ snapshots: transitivePeerDependencies: - supports-color - vite-plugin-vue-devtools@7.6.4(rollup@4.27.4)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2)): + vite-plugin-vue-devtools@7.6.7(rollup@4.27.4)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2)): dependencies: - '@vue/devtools-core': 7.6.4(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2)) - '@vue/devtools-kit': 7.6.4 - '@vue/devtools-shared': 7.6.4 - execa: 8.0.1 + '@vue/devtools-core': 7.6.7(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1))(vue@3.5.13(typescript@5.7.2)) + '@vue/devtools-kit': 7.6.7 + '@vue/devtools-shared': 7.6.7 + execa: 9.5.2 sirv: 3.0.0 vite: 6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) - vite-plugin-inspect: 0.8.7(rollup@4.27.4)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)) - vite-plugin-vue-inspector: 5.2.0(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)) + vite-plugin-inspect: 0.8.8(rollup@4.27.4)(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)) + vite-plugin-vue-inspector: 5.3.1(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)) transitivePeerDependencies: - '@nuxt/kit' - rollup - supports-color - vue - vite-plugin-vue-inspector@5.2.0(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)): + vite-plugin-vue-inspector@5.3.1(vite@6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1)): dependencies: '@babel/core': 7.26.0 '@babel/plugin-proposal-decorators': 7.24.7(@babel/core@7.26.0) @@ -17392,7 +17580,7 @@ snapshots: '@babel/plugin-syntax-import-meta': 7.10.4(@babel/core@7.26.0) '@babel/plugin-transform-typescript': 7.25.2(@babel/core@7.26.0) '@vue/babel-plugin-jsx': 1.2.5(@babel/core@7.26.0) - '@vue/compiler-dom': 3.5.12 + '@vue/compiler-dom': 3.5.13 kolorist: 1.8.0 magic-string: 0.30.14 vite: 6.0.1(@types/node@18.19.50)(jiti@1.21.6)(sass@1.81.0)(yaml@2.5.1) diff --git a/scripts/cmd/build.js b/scripts/cmd/build.js index cf0ee5ad2b..d5a9336d85 100644 --- a/scripts/cmd/build.js +++ b/scripts/cmd/build.js @@ -1,6 +1,5 @@ import fs from 'node:fs/promises'; import esbuild from 'esbuild'; -import { copy } from 'esbuild-plugin-copy'; import glob from 'fast-glob'; import { dim, green, red, yellow } from 'kleur/colors'; import prebuild from './prebuild.js';