diff --git a/.changeset/clever-moles-listen.md b/.changeset/clever-moles-listen.md deleted file mode 100644 index 96eede5a797d..000000000000 --- a/.changeset/clever-moles-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/db": patch ---- - -Seed database on dev server startup, and log whenever the seed file is reloaded. diff --git a/.changeset/cool-bulldogs-change.md b/.changeset/cool-bulldogs-change.md deleted file mode 100644 index fce9c1a2119c..000000000000 --- a/.changeset/cool-bulldogs-change.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"astro": patch ---- - -This patch allows astro to run in node-compat mode in Deno. Deno doesn't support -construction of response from async iterables in node-compat mode so we need to -use ReadableStream. diff --git a/.changeset/eighty-olives-destroy.md b/.changeset/eighty-olives-destroy.md deleted file mode 100644 index be8ae9808611..000000000000 --- a/.changeset/eighty-olives-destroy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Fixes an issue with outdated page titles in browser history when using text fragments in view transition navigation. diff --git a/.changeset/forty-turkeys-tap.md b/.changeset/forty-turkeys-tap.md deleted file mode 100644 index f7d6609abe8b..000000000000 --- a/.changeset/forty-turkeys-tap.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Fixes a bug where JSX runtime would error on components with nullish prop values in certain conditions. diff --git a/.changeset/gold-lies-behave.md b/.changeset/gold-lies-behave.md deleted file mode 100644 index bd2bf1c491c8..000000000000 --- a/.changeset/gold-lies-behave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/vue": patch ---- - -Remove the unnecessary and deprecated @vue/server-renderer package from the ssr.external vite config diff --git a/.changeset/khaki-otters-return.md b/.changeset/khaki-otters-return.md deleted file mode 100644 index 8d0873fe96be..000000000000 --- a/.changeset/khaki-otters-return.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/markdown-remark": major ---- - -Removes deprecated APIs including `remarkShiki`, `remarkPrism`, `replaceCssVariables` and several unused types diff --git a/.changeset/plenty-lobsters-design.md b/.changeset/plenty-lobsters-design.md deleted file mode 100644 index 5f2a6bb39bd9..000000000000 --- a/.changeset/plenty-lobsters-design.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/db": patch ---- - -Detailed error messages for remote database exceptions. diff --git a/.changeset/proud-books-hope.md b/.changeset/proud-books-hope.md deleted file mode 100644 index a330f58b62c7..000000000000 --- a/.changeset/proud-books-hope.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/preact": patch ---- - -Fixes (theoretical) edge case in Preact integration's JSX aliases diff --git a/.changeset/real-rabbits-bake.md b/.changeset/real-rabbits-bake.md deleted file mode 100644 index f750b56e347d..000000000000 --- a/.changeset/real-rabbits-bake.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/markdown-remark": major ---- - -Updates Shiki syntax highlighting to lazily load shiki languages by default (only preloading `plaintext`). Additionally, the `createShikiHighlighter()` API now returns an asynchronous `highlight()` function due to this. diff --git a/.changeset/selfish-spies-end.md b/.changeset/selfish-spies-end.md deleted file mode 100644 index d097bae53f25..000000000000 --- a/.changeset/selfish-spies-end.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/markdoc": patch ---- - -Moves `@astrojs/markdown-remark` as a dependency diff --git a/.changeset/small-islands-pump.md b/.changeset/small-islands-pump.md deleted file mode 100644 index 9df81a51e81c..000000000000 --- a/.changeset/small-islands-pump.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Fixes bug with head content being pushed into body diff --git a/.changeset/tidy-dancers-itch.md b/.changeset/tidy-dancers-itch.md deleted file mode 100644 index 56ee8ed631f7..000000000000 --- a/.changeset/tidy-dancers-itch.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/db": patch ---- - -Give proper error when seed missing default export diff --git a/.changeset/tough-years-fry.md b/.changeset/tough-years-fry.md deleted file mode 100644 index 102edd8a0e44..000000000000 --- a/.changeset/tough-years-fry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/db": patch ---- - -Make ASTRO_DATABASE_FILE work with file paths diff --git a/.changeset/unlucky-shoes-vanish.md b/.changeset/unlucky-shoes-vanish.md deleted file mode 100644 index f1ae77749dfa..000000000000 --- a/.changeset/unlucky-shoes-vanish.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/vercel": patch ---- - -Move nft warnings behind verbose logging diff --git a/examples/basics/.gitignore b/examples/basics/.gitignore index 6d4c0aa066aa..016b59ea143d 100644 --- a/examples/basics/.gitignore +++ b/examples/basics/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/basics/package.json b/examples/basics/package.json index 84ca32f2b8d9..24eb40597cf9 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.5.12" + "astro": "^4.5.15" } } diff --git a/examples/blog/.gitignore b/examples/blog/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/blog/.gitignore +++ b/examples/blog/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/blog/package.json b/examples/blog/package.json index 8f2dd8110dea..be0bec2022a2 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^2.2.2", + "@astrojs/mdx": "^2.2.3", "@astrojs/rss": "^4.0.5", "@astrojs/sitemap": "^3.1.2", - "astro": "^4.5.12" + "astro": "^4.5.15" } } diff --git a/examples/component/.gitignore b/examples/component/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/component/.gitignore +++ b/examples/component/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/component/package.json b/examples/component/package.json index 5a907dadd16b..17a56fe1acb2 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.5.12" + "astro": "^4.5.15" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/framework-alpine/.gitignore b/examples/framework-alpine/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/framework-alpine/.gitignore +++ b/examples/framework-alpine/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 45c34747a439..5086afc1386f 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -14,6 +14,6 @@ "@astrojs/alpinejs": "^0.4.0", "@types/alpinejs": "^3.13.5", "alpinejs": "^3.13.3", - "astro": "^4.5.12" + "astro": "^4.5.15" } } diff --git a/examples/framework-lit/.gitignore b/examples/framework-lit/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/framework-lit/.gitignore +++ b/examples/framework-lit/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index f008e848691c..09b2638084c7 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/lit": "^4.0.1", "@webcomponents/template-shadowroot": "^0.2.1", - "astro": "^4.5.12", + "astro": "^4.5.15", "lit": "^3.1.2" } } diff --git a/examples/framework-multiple/.gitignore b/examples/framework-multiple/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/framework-multiple/.gitignore +++ b/examples/framework-multiple/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index d39d1dedc145..d97b5b977d99 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -11,14 +11,14 @@ "astro": "astro" }, "dependencies": { - "@astrojs/preact": "^3.1.1", - "@astrojs/react": "^3.1.0", + "@astrojs/preact": "^3.1.2", + "@astrojs/react": "^3.1.1", "@astrojs/solid-js": "^4.0.1", - "@astrojs/svelte": "^5.2.0", - "@astrojs/vue": "^4.0.9", + "@astrojs/svelte": "^5.3.0", + "@astrojs/vue": "^4.0.10", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "astro": "^4.5.12", + "astro": "^4.5.15", "preact": "^10.19.2", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/framework-preact/.gitignore b/examples/framework-preact/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/framework-preact/.gitignore +++ b/examples/framework-preact/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 4718effb35af..5692252f4aa4 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/preact": "^3.1.1", + "@astrojs/preact": "^3.1.2", "@preact/signals": "^1.2.1", - "astro": "^4.5.12", + "astro": "^4.5.15", "preact": "^10.19.2" } } diff --git a/examples/framework-react/.gitignore b/examples/framework-react/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/framework-react/.gitignore +++ b/examples/framework-react/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 9b7078f0ec64..fffe2050b9ba 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -11,10 +11,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/react": "^3.1.0", + "@astrojs/react": "^3.1.1", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "astro": "^4.5.12", + "astro": "^4.5.15", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/.gitignore b/examples/framework-solid/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/framework-solid/.gitignore +++ b/examples/framework-solid/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index 20e6b39c5ab8..5ad58d071477 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^4.0.1", - "astro": "^4.5.12", + "astro": "^4.5.15", "solid-js": "^1.8.5" } } diff --git a/examples/framework-svelte/.gitignore b/examples/framework-svelte/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/framework-svelte/.gitignore +++ b/examples/framework-svelte/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 9493e8ba36e2..b1eda67fb6a8 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/svelte": "^5.2.0", - "astro": "^4.5.12", + "@astrojs/svelte": "^5.3.0", + "astro": "^4.5.15", "svelte": "^4.2.5" } } diff --git a/examples/framework-vue/.gitignore b/examples/framework-vue/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/framework-vue/.gitignore +++ b/examples/framework-vue/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index 19bac36d5078..a8654dedef96 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/vue": "^4.0.9", - "astro": "^4.5.12", + "@astrojs/vue": "^4.0.10", + "astro": "^4.5.15", "vue": "^3.3.8" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 203b70bd037a..66a38bc46302 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^8.2.5", - "astro": "^4.5.12" + "astro": "^4.5.15" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index 6cec3f181579..b1d5780581b9 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.5.12" + "astro": "^4.5.15" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index 212bd6f4b2ea..7bc04d717e1d 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^8.2.5", - "astro": "^4.5.12", + "astro": "^4.5.15", "html-minifier": "^4.0.0" }, "devDependencies": { diff --git a/examples/minimal/.gitignore b/examples/minimal/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/minimal/.gitignore +++ b/examples/minimal/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/minimal/package.json b/examples/minimal/package.json index bd4f2ff9a59e..8bba972313d7 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.5.12" + "astro": "^4.5.15" } } diff --git a/examples/non-html-pages/.gitignore b/examples/non-html-pages/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/non-html-pages/.gitignore +++ b/examples/non-html-pages/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 72aed85ac2e3..8e0b724517e6 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.5.12" + "astro": "^4.5.15" } } diff --git a/examples/portfolio/.gitignore b/examples/portfolio/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/portfolio/.gitignore +++ b/examples/portfolio/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 981aa5ef38f4..8f4fe30c99e5 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.5.12" + "astro": "^4.5.15" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index 4ba19d55c189..18a0e785ea5d 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -13,8 +13,8 @@ }, "dependencies": { "@astrojs/node": "^8.2.5", - "@astrojs/svelte": "^5.2.0", - "astro": "^4.5.12", + "@astrojs/svelte": "^5.3.0", + "astro": "^4.5.15", "svelte": "^4.2.5" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index d1592da4ea5a..bedde5a10803 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.5.12", + "astro": "^4.5.15", "sass": "^1.69.5", "sharp": "^0.32.6" } diff --git a/examples/view-transitions/package.json b/examples/view-transitions/package.json index 3b4ce857925f..d8a04c26c7ff 100644 --- a/examples/view-transitions/package.json +++ b/examples/view-transitions/package.json @@ -12,6 +12,6 @@ "devDependencies": { "@astrojs/tailwind": "^5.1.0", "@astrojs/node": "^8.2.5", - "astro": "^4.5.12" + "astro": "^4.5.15" } } diff --git a/examples/with-markdoc/.gitignore b/examples/with-markdoc/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/with-markdoc/.gitignore +++ b/examples/with-markdoc/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index 4f220183f1f0..1fc5381a8462 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "@astrojs/markdoc": "^0.9.3", - "astro": "^4.5.12" + "@astrojs/markdoc": "^0.9.5", + "astro": "^4.5.15" } } diff --git a/examples/with-markdown-plugins/.gitignore b/examples/with-markdown-plugins/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/with-markdown-plugins/.gitignore +++ b/examples/with-markdown-plugins/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 41c089295895..29f267e7b13a 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -11,8 +11,8 @@ "astro": "astro" }, "dependencies": { - "@astrojs/markdown-remark": "^4.3.2", - "astro": "^4.5.12", + "@astrojs/markdown-remark": "^5.0.0", + "astro": "^4.5.15", "hast-util-select": "^6.0.2", "rehype-autolink-headings": "^7.1.0", "rehype-slug": "^6.0.0", diff --git a/examples/with-markdown-shiki/.gitignore b/examples/with-markdown-shiki/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/with-markdown-shiki/.gitignore +++ b/examples/with-markdown-shiki/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index 37dfa5a42aac..8fadfb16522a 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.5.12" + "astro": "^4.5.15" } } diff --git a/examples/with-mdx/.gitignore b/examples/with-mdx/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/with-mdx/.gitignore +++ b/examples/with-mdx/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 2da34d5ba491..3d7db9ef38f5 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^2.2.2", - "@astrojs/preact": "^3.1.1", - "astro": "^4.5.12", + "@astrojs/mdx": "^2.2.3", + "@astrojs/preact": "^3.1.2", + "astro": "^4.5.15", "preact": "^10.19.2" } } diff --git a/examples/with-nanostores/.gitignore b/examples/with-nanostores/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/with-nanostores/.gitignore +++ b/examples/with-nanostores/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 6cf6e1885e79..fa389976fcfe 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -11,9 +11,9 @@ "astro": "astro" }, "dependencies": { - "@astrojs/preact": "^3.1.1", + "@astrojs/preact": "^3.1.2", "@nanostores/preact": "^0.5.0", - "astro": "^4.5.12", + "astro": "^4.5.15", "nanostores": "^0.9.5", "preact": "^10.19.2" } diff --git a/examples/with-tailwindcss/.gitignore b/examples/with-tailwindcss/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/with-tailwindcss/.gitignore +++ b/examples/with-tailwindcss/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index f37f83d87085..a195f861f30c 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -11,10 +11,10 @@ "astro": "astro" }, "dependencies": { - "@astrojs/mdx": "^2.2.2", + "@astrojs/mdx": "^2.2.3", "@astrojs/tailwind": "^5.1.0", "@types/canvas-confetti": "^1.6.3", - "astro": "^4.5.12", + "astro": "^4.5.15", "autoprefixer": "^10.4.15", "canvas-confetti": "^1.9.1", "postcss": "^8.4.28", diff --git a/examples/with-vitest/.gitignore b/examples/with-vitest/.gitignore index 6240da8b10bf..16d54bb13c8a 100644 --- a/examples/with-vitest/.gitignore +++ b/examples/with-vitest/.gitignore @@ -19,3 +19,6 @@ pnpm-debug.log* # macOS-specific files .DS_Store + +# jetbrains setting folder +.idea/ diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 3b9722e476ae..1a28cf5a767f 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^4.5.12", + "astro": "^4.5.15", "vitest": "^1.3.1" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 302bee37474c..173c51d889c4 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,42 @@ # astro +## 4.5.15 + +### Patch Changes + +- [#10666](https://github.com/withastro/astro/pull/10666) [`55ddb2ba4889480f776a8d29b9dcd531b9f5ab3e`](https://github.com/withastro/astro/commit/55ddb2ba4889480f776a8d29b9dcd531b9f5ab3e) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixes an issue where forwarded requests did not include hostname on node-based adapters. This also makes error pages more reliable. + +- [#10642](https://github.com/withastro/astro/pull/10642) [`4f5dc14f315eba7ea6ec5cc8e5dacb0cb81288dd`](https://github.com/withastro/astro/commit/4f5dc14f315eba7ea6ec5cc8e5dacb0cb81288dd) Thanks [@OliverSpeir](https://github.com/OliverSpeir)! - Fixes typing issues when using `format` and `quality` options with remote images + +- [#10616](https://github.com/withastro/astro/pull/10616) [`317d18ef8c9cf4fd13647518e3fd352774a86481`](https://github.com/withastro/astro/commit/317d18ef8c9cf4fd13647518e3fd352774a86481) Thanks [@NikolaRHristov](https://github.com/NikolaRHristov)! - This change disables the `sharp` `libvips` image cache as it errors when the + file is too small and operations are happening too fast (runs into a race + condition) + +## 4.5.14 + +### Patch Changes + +- [#10470](https://github.com/withastro/astro/pull/10470) [`320c309ca9fbe51c40e6ba846d04a0cb49aced5f`](https://github.com/withastro/astro/commit/320c309ca9fbe51c40e6ba846d04a0cb49aced5f) Thanks [@liruifengv](https://github.com/liruifengv)! - improves `client:only` error message + +- [#10496](https://github.com/withastro/astro/pull/10496) [`ce985631129e49f7ea90e6ea690ef9f9cf0e6987`](https://github.com/withastro/astro/commit/ce985631129e49f7ea90e6ea690ef9f9cf0e6987) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Makes the warning less scary when adding 3rd-party integrations using `astro add` + +## 4.5.13 + +### Patch Changes + +- [#10495](https://github.com/withastro/astro/pull/10495) [`046d69d517118ab5c0e71604b321729d66ddffff`](https://github.com/withastro/astro/commit/046d69d517118ab5c0e71604b321729d66ddffff) Thanks [@satyarohith](https://github.com/satyarohith)! - This patch allows astro to run in node-compat mode in Deno. Deno doesn't support + construction of response from async iterables in node-compat mode so we need to + use ReadableStream. + +- [#10605](https://github.com/withastro/astro/pull/10605) [`a16a829f4e25ad5c9a1b4557ec089fc8ab53320f`](https://github.com/withastro/astro/commit/a16a829f4e25ad5c9a1b4557ec089fc8ab53320f) Thanks [@martrapp](https://github.com/martrapp)! - Fixes an issue with outdated page titles in browser history when using text fragments in view transition navigation. + +- [#10584](https://github.com/withastro/astro/pull/10584) [`e648c5575a8774af739231cfa9fc27a32086aa5f`](https://github.com/withastro/astro/commit/e648c5575a8774af739231cfa9fc27a32086aa5f) Thanks [@duanwilliam](https://github.com/duanwilliam)! - Fixes a bug where JSX runtime would error on components with nullish prop values in certain conditions. + +- [#10608](https://github.com/withastro/astro/pull/10608) [`e31bea0704890ff92ce4f9b0ce536c1c90715f2c`](https://github.com/withastro/astro/commit/e31bea0704890ff92ce4f9b0ce536c1c90715f2c) Thanks [@matthewp](https://github.com/matthewp)! - Fixes bug with head content being pushed into body + +- Updated dependencies [[`2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de`](https://github.com/withastro/astro/commit/2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de), [`374efcdff9625ca43309d89e3b9cfc9174351512`](https://github.com/withastro/astro/commit/374efcdff9625ca43309d89e3b9cfc9174351512)]: + - @astrojs/markdown-remark@5.0.0 + ## 4.5.12 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 67f8bfafa957..7371b688ccec 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "4.5.12", + "version": "4.5.15", "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/assets/services/sharp.ts b/packages/astro/src/assets/services/sharp.ts index 59a461c6eba7..2493c530175a 100644 --- a/packages/astro/src/assets/services/sharp.ts +++ b/packages/astro/src/assets/services/sharp.ts @@ -32,6 +32,9 @@ async function loadSharp() { throw new AstroError(AstroErrorData.MissingSharp); } + // Disable the `sharp` `libvips` cache as it errors when the file is too small and operations are happening too fast (runs into a race condition) https://github.com/lovell/sharp/issues/3935#issuecomment-1881866341 + sharpImport.cache(false); + return sharpImport; } diff --git a/packages/astro/src/assets/types.ts b/packages/astro/src/assets/types.ts index 29cf1ef9ee8a..89610b05b05c 100644 --- a/packages/astro/src/assets/types.ts +++ b/packages/astro/src/assets/types.ts @@ -118,6 +118,28 @@ type ImageSharedProps = T & { * ``` */ height?: number | `${number}`; + /** + * Desired output format for the image. Defaults to `webp`. + * + * **Example**: + * ```astro + * ... + * ``` + */ + format?: ImageOutputFormat; + /** + * Desired quality for the image. Value can either be a preset such as `low` or `high`, or a numeric value from 0 to 100. + * + * The perceptual quality of the output image is service-specific. + * For instance, a certain service might decide that `high` results in a very beautiful image, but another could choose for it to be at best passable. + * + * **Example**: + * ```astro + * ... + * ... + * ``` + */ + quality?: ImageQuality; } & ( | { /** @@ -153,28 +175,6 @@ export type LocalImageProps = ImageSharedProps & { * ``` */ src: ImageMetadata | Promise<{ default: ImageMetadata }>; - /** - * Desired output format for the image. Defaults to `webp`. - * - * **Example**: - * ```astro - * ... - * ``` - */ - format?: ImageOutputFormat; - /** - * Desired quality for the image. Value can either be a preset such as `low` or `high`, or a numeric value from 0 to 100. - * - * The perceptual quality of the output image is service-specific. - * For instance, a certain service might decide that `high` results in a very beautiful image, but another could choose for it to be at best passable. - * - * **Example**: - * ```astro - * ... - * ... - * ``` - */ - quality?: ImageQuality; }; export type RemoteImageProps = diff --git a/packages/astro/src/cli/add/index.ts b/packages/astro/src/cli/add/index.ts index bc01d2f50d8d..d1c7eec2e9ca 100644 --- a/packages/astro/src/cli/add/index.ts +++ b/packages/astro/src/cli/add/index.ts @@ -859,9 +859,7 @@ export async function validateIntegrations(integrations: string[]): Promise, slots: any = {} ): Promise { - if (!Component && !_props['client:only']) { + if (!Component && 'client:only' in _props === false) { throw new Error( `Unable to render ${displayName} because it is ${Component}!\nDid you forget to import the component or is it possible there is a typo?` ); @@ -164,13 +165,14 @@ async function renderFrameworkComponent( } else { // Attempt: use explicitly passed renderer name if (metadata.hydrateArgs) { - const passedName = metadata.hydrateArgs; - const rendererName = rendererAliases.has(passedName) - ? rendererAliases.get(passedName) - : passedName; - renderer = renderers.find( - ({ name }) => name === `@astrojs/${rendererName}` || name === rendererName - ); + const rendererName = rendererAliases.has(metadata.hydrateArgs) + ? rendererAliases.get(metadata.hydrateArgs) + : metadata.hydrateArgs; + if (clientOnlyValues.has(rendererName)) { + renderer = renderers.find( + ({ name }) => name === `@astrojs/${rendererName}` || name === rendererName + ); + } } // Attempt: user only has a single renderer, default to that if (!renderer && validRenderers.length === 1) { @@ -189,13 +191,34 @@ async function renderFrameworkComponent( // If no one claimed the renderer if (!renderer) { if (metadata.hydrate === 'only') { - throw new AstroError({ - ...AstroErrorData.NoClientOnlyHint, - message: AstroErrorData.NoClientOnlyHint.message(metadata.displayName), - hint: AstroErrorData.NoClientOnlyHint.hint( - probableRendererNames.map((r) => r.replace('@astrojs/', '')).join('|') - ), - }); + const rendererName = rendererAliases.has(metadata.hydrateArgs) + ? rendererAliases.get(metadata.hydrateArgs) + : metadata.hydrateArgs; + if (clientOnlyValues.has(rendererName)) { + // throw an error if provide correct client:only directive but not find the renderer + const plural = validRenderers.length > 1; + throw new AstroError({ + ...AstroErrorData.NoMatchingRenderer, + message: AstroErrorData.NoMatchingRenderer.message( + metadata.displayName, + metadata?.componentUrl?.split('.').pop(), + plural, + validRenderers.length + ), + hint: AstroErrorData.NoMatchingRenderer.hint( + formatList(probableRendererNames.map((r) => '`' + r + '`')) + ), + }); + } else { + // throw an error if an invalid hydration directive was provided + throw new AstroError({ + ...AstroErrorData.NoClientOnlyHint, + message: AstroErrorData.NoClientOnlyHint.message(metadata.displayName), + hint: AstroErrorData.NoClientOnlyHint.hint( + probableRendererNames.map((r) => r.replace('@astrojs/', '')).join('|') + ), + }); + } } else if (typeof Component !== 'string') { const matchingRenderers = validRenderers.filter((r) => probableRendererNames.includes(r.name) @@ -241,6 +264,15 @@ If you're still stuck, please open an issue on GitHub or join us at https://astr } } else { if (metadata.hydrate === 'only') { + const rendererName = rendererAliases.has(metadata.hydrateArgs) + ? rendererAliases.get(metadata.hydrateArgs) + : metadata.hydrateArgs; + if (!clientOnlyValues.has(rendererName)) { + // warning if provide incorrect client:only directive but find the renderer by guess + console.warn( + `The client:only directive for ${metadata.displayName} is not recognized. The renderer ${renderer.name} will be used. If you intended to use a different renderer, please provide a valid client:only directive.` + ); + } html = await renderSlotToString(result, slots?.fallback); } else { const componentRenderStartTime = performance.now(); diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index e78c531be439..182077312f5f 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,5 +1,35 @@ # @astrojs/db +## 0.10.0 + +### Minor Changes + +- [#10638](https://github.com/withastro/astro/pull/10638) [`f395ebcc08279515f8d53bb82edeee288d8579db`](https://github.com/withastro/astro/commit/f395ebcc08279515f8d53bb82edeee288d8579db) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Rename internal import from `runtime/config` to `runtime/virtual` + +## 0.9.11 + +### Patch Changes + +- [#10655](https://github.com/withastro/astro/pull/10655) [`b1eda3dc5c33c1c6d50d5ee8a2a08d34851dc253`](https://github.com/withastro/astro/commit/b1eda3dc5c33c1c6d50d5ee8a2a08d34851dc253) Thanks [@matthewp](https://github.com/matthewp)! - Pass through appToken on static sites with Astro DB + +## 0.9.10 + +### Patch Changes + +- [#10646](https://github.com/withastro/astro/pull/10646) [`713f99e849b26edb831ea6527b7103ad7a6b200f`](https://github.com/withastro/astro/commit/713f99e849b26edb831ea6527b7103ad7a6b200f) Thanks [@lilnasy](https://github.com/lilnasy)! - Fixes an issue astro:db could not be used on serverless platforms. + +## 0.9.9 + +### Patch Changes + +- [#10599](https://github.com/withastro/astro/pull/10599) [`5a7733dde52d439402404d5207a2b1d897c4e025`](https://github.com/withastro/astro/commit/5a7733dde52d439402404d5207a2b1d897c4e025) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Seed database on dev server startup, and log whenever the seed file is reloaded. + +- [#10636](https://github.com/withastro/astro/pull/10636) [`504d15d77291f0fe36aa9fecc22f276b734f83cb`](https://github.com/withastro/astro/commit/504d15d77291f0fe36aa9fecc22f276b734f83cb) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Detailed error messages for remote database exceptions. + +- [#10635](https://github.com/withastro/astro/pull/10635) [`17badaf55c79cec460c74f4da58bf188eedef7e3`](https://github.com/withastro/astro/commit/17badaf55c79cec460c74f4da58bf188eedef7e3) Thanks [@matthewp](https://github.com/matthewp)! - Give proper error when seed missing default export + +- [#10631](https://github.com/withastro/astro/pull/10631) [`157392ee44db08de0d3c01222644dae0a904044d`](https://github.com/withastro/astro/commit/157392ee44db08de0d3c01222644dae0a904044d) Thanks [@matthewp](https://github.com/matthewp)! - Make ASTRO_DATABASE_FILE work with file paths + ## 0.9.8 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index b1b097ad8e23..3647f85b7474 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/db", - "version": "0.9.8", + "version": "0.10.0", "description": "", "license": "MIT", "type": "module", @@ -20,8 +20,8 @@ "types": "./dist/runtime/index.d.ts", "import": "./dist/runtime/index.js" }, - "./dist/runtime/config.js": { - "import": "./dist/runtime/config.js" + "./dist/runtime/virtual.js": { + "import": "./dist/runtime/virtual.js" }, "./types": { "types": "./dist/core/types.d.ts", @@ -55,8 +55,8 @@ "astro-integration" ], "scripts": { - "types:config": "tsc -p ./tsconfig.config-types.json", - "build": "astro-scripts build \"src/**/*.ts\" && tsc && pnpm types:config", + "types:virtual": "tsc -p ./tsconfig.virtual.json", + "build": "astro-scripts build \"src/**/*.ts\" && tsc && pnpm types:virtual", "build:ci": "astro-scripts build \"src/**/*.ts\"", "dev": "astro-scripts dev \"src/**/*.ts\"", "test": "mocha --exit --timeout 20000 \"test/*.js\" \"test/unit/**/*.js\"", diff --git a/packages/db/src/core/cli/commands/execute/index.ts b/packages/db/src/core/cli/commands/execute/index.ts index 44a2c44fd6b7..05a04ad61e85 100644 --- a/packages/db/src/core/cli/commands/execute/index.ts +++ b/packages/db/src/core/cli/commands/execute/index.ts @@ -45,6 +45,7 @@ export async function cmd({ tables: dbConfig.tables ?? {}, appToken: appToken.token, isBuild: false, + output: 'server', }); } else { virtualModContents = getLocalVirtualModContents({ diff --git a/packages/db/src/core/consts.ts b/packages/db/src/core/consts.ts index 3ba7b43d74ae..c37f1b99dc43 100644 --- a/packages/db/src/core/consts.ts +++ b/packages/db/src/core/consts.ts @@ -6,7 +6,7 @@ export const PACKAGE_NAME = JSON.parse( export const RUNTIME_IMPORT = JSON.stringify(`${PACKAGE_NAME}/runtime`); -export const RUNTIME_CONFIG_IMPORT = JSON.stringify(`${PACKAGE_NAME}/dist/runtime/config.js`); +export const RUNTIME_VIRTUAL_IMPORT = JSON.stringify(`${PACKAGE_NAME}/dist/runtime/virtual.js`); export const DB_TYPES_FILE = 'db-types.d.ts'; diff --git a/packages/db/src/core/integration/index.ts b/packages/db/src/core/integration/index.ts index c6ebf6ff3195..2e3c1f2ea174 100644 --- a/packages/db/src/core/integration/index.ts +++ b/packages/db/src/core/integration/index.ts @@ -7,7 +7,7 @@ import { blue, yellow } from 'kleur/colors'; import { loadEnv } from 'vite'; import parseArgs from 'yargs-parser'; import { SEED_DEV_FILE_NAME } from '../../runtime/queries.js'; -import { AstroDbError } from '../../utils.js'; +import { AstroDbError } from '../../runtime/utils.js'; import { CONFIG_FILE_NAMES, DB_PATH } from '../consts.js'; import { resolveDbConfig } from '../load-file.js'; import { type ManagedAppToken, getManagedAppTokenOrExit } from '../tokens.js'; @@ -59,6 +59,7 @@ function astroDBIntegration(): AstroIntegration { tables, root: config.root, srcDir: config.srcDir, + output: config.output, }); } else { dbPlugin = vitePluginDb({ @@ -67,6 +68,7 @@ function astroDBIntegration(): AstroIntegration { seedFiles, root: config.root, srcDir: config.srcDir, + output: config.output, }); } diff --git a/packages/db/src/core/integration/vite-plugin-db.ts b/packages/db/src/core/integration/vite-plugin-db.ts index 769070976b98..f1dc3ea7b015 100644 --- a/packages/db/src/core/integration/vite-plugin-db.ts +++ b/packages/db/src/core/integration/vite-plugin-db.ts @@ -1,7 +1,8 @@ import { fileURLToPath } from 'node:url'; +import type { AstroConfig } from 'astro'; import { normalizePath } from 'vite'; import { SEED_DEV_FILE_NAME } from '../../runtime/queries.js'; -import { DB_PATH, RUNTIME_CONFIG_IMPORT, RUNTIME_IMPORT, VIRTUAL_MODULE_ID } from '../consts.js'; +import { DB_PATH, RUNTIME_IMPORT, RUNTIME_VIRTUAL_IMPORT, VIRTUAL_MODULE_ID } from '../consts.js'; import type { DBTables } from '../types.js'; import { type VitePlugin, getDbDirectoryUrl, getRemoteDatabaseUrl } from '../utils.js'; @@ -26,6 +27,7 @@ type VitePluginDBParams = seedFiles: LateSeedFiles; srcDir: URL; root: URL; + output: AstroConfig['output']; } | { connectToStudio: true; @@ -33,6 +35,7 @@ type VitePluginDBParams = appToken: string; srcDir: URL; root: URL; + output: AstroConfig['output']; }; export function vitePluginDb(params: VitePluginDBParams): VitePlugin { @@ -66,6 +69,7 @@ export function vitePluginDb(params: VitePluginDBParams): VitePlugin { appToken: params.appToken, tables: params.tables.get(), isBuild: command === 'build', + output: params.output, }); } return getLocalVirtualModContents({ @@ -79,7 +83,7 @@ export function vitePluginDb(params: VitePluginDBParams): VitePlugin { } export function getConfigVirtualModContents() { - return `export * from ${RUNTIME_CONFIG_IMPORT}`; + return `export * from ${RUNTIME_VIRTUAL_IMPORT}`; } export function getLocalVirtualModContents({ @@ -132,7 +136,7 @@ ${ : '' } -export * from ${RUNTIME_CONFIG_IMPORT}; +export * from ${RUNTIME_VIRTUAL_IMPORT}; ${getStringifiedTableExports(tables)}`; } @@ -141,15 +145,22 @@ export function getStudioVirtualModContents({ tables, appToken, isBuild, + output, }: { tables: DBTables; appToken: string; isBuild: boolean; + output: AstroConfig['output']; }) { function appTokenArg() { if (isBuild) { - // In production build, always read the runtime environment variable. - return 'process.env.ASTRO_STUDIO_APP_TOKEN'; + if (output === 'server') { + // In production build, always read the runtime environment variable. + return 'process.env.ASTRO_STUDIO_APP_TOKEN'; + } else { + // Static mode or prerendering needs the local app token. + return `process.env.ASTRO_STUDIO_APP_TOKEN ?? ${JSON.stringify(appToken)}`; + } } else { return JSON.stringify(appToken); } @@ -166,7 +177,7 @@ import {asDrizzleTable, createRemoteDatabaseClient} from ${RUNTIME_IMPORT}; export const db = await createRemoteDatabaseClient(${appTokenArg()}, ${dbUrlArg()}); -export * from ${RUNTIME_CONFIG_IMPORT}; +export * from ${RUNTIME_VIRTUAL_IMPORT}; ${getStringifiedTableExports(tables)} `; diff --git a/packages/db/src/runtime/db-client.ts b/packages/db/src/runtime/db-client.ts index 7eddd60604e6..d52af72fce95 100644 --- a/packages/db/src/runtime/db-client.ts +++ b/packages/db/src/runtime/db-client.ts @@ -4,8 +4,7 @@ import type { LibSQLDatabase } from 'drizzle-orm/libsql'; import { drizzle as drizzleLibsql } from 'drizzle-orm/libsql'; import { type SqliteRemoteDatabase, drizzle as drizzleProxy } from 'drizzle-orm/sqlite-proxy'; import { z } from 'zod'; -import { AstroDbError } from '../utils.js'; -import { safeFetch } from './utils.js'; +import { AstroDbError, safeFetch } from './utils.js'; const isWebContainer = !!process.versions?.webcontainer; diff --git a/packages/db/src/runtime/seed-local.ts b/packages/db/src/runtime/seed-local.ts index 83e3acad5a53..3fb6c61d0c6b 100644 --- a/packages/db/src/runtime/seed-local.ts +++ b/packages/db/src/runtime/seed-local.ts @@ -3,9 +3,9 @@ import { type SQL, sql } from 'drizzle-orm'; import type { LibSQLDatabase } from 'drizzle-orm/libsql'; import { SQLiteAsyncDialect } from 'drizzle-orm/sqlite-core'; import { type DBTables } from '../core/types.js'; -import { AstroDbError } from '../utils.js'; import { SEED_DEFAULT_EXPORT_ERROR } from './errors.js'; import { getCreateIndexQueries, getCreateTableQuery } from './queries.js'; +import { AstroDbError } from './utils.js'; const sqlite = new SQLiteAsyncDialect(); diff --git a/packages/db/src/runtime/utils.ts b/packages/db/src/runtime/utils.ts index 29160b22df16..ac6cfeda6efb 100644 --- a/packages/db/src/runtime/utils.ts +++ b/packages/db/src/runtime/utils.ts @@ -1,3 +1,5 @@ +import { AstroError } from 'astro/errors'; + /** * Small wrapper around fetch that throws an error if the response is not OK. Allows for custom error handling as well through the onNotOK callback. */ @@ -16,3 +18,7 @@ export async function safeFetch( return response; } + +export class AstroDbError extends AstroError { + name = 'Astro DB Error'; +} diff --git a/packages/db/src/runtime/config.ts b/packages/db/src/runtime/virtual.ts similarity index 100% rename from packages/db/src/runtime/config.ts rename to packages/db/src/runtime/virtual.ts diff --git a/packages/db/src/utils.ts b/packages/db/src/utils.ts index 1e7b00b12698..4e1a18685ebf 100644 --- a/packages/db/src/utils.ts +++ b/packages/db/src/utils.ts @@ -1,8 +1,2 @@ -import { AstroError } from 'astro/errors'; - export { defineDbIntegration } from './core/utils.js'; export { asDrizzleTable } from './runtime/index.js'; - -export class AstroDbError extends AstroError { - name = 'Astro DB Error'; -} diff --git a/packages/db/test/fixtures/static-remote/astro.config.ts b/packages/db/test/fixtures/static-remote/astro.config.ts new file mode 100644 index 000000000000..bd6088769ffa --- /dev/null +++ b/packages/db/test/fixtures/static-remote/astro.config.ts @@ -0,0 +1,6 @@ +import astroDb from '@astrojs/db'; +import { defineConfig } from 'astro/config'; + +export default defineConfig({ + integrations: [astroDb()], +}); diff --git a/packages/db/test/fixtures/static-remote/db/config.ts b/packages/db/test/fixtures/static-remote/db/config.ts new file mode 100644 index 000000000000..8df4674d8f97 --- /dev/null +++ b/packages/db/test/fixtures/static-remote/db/config.ts @@ -0,0 +1,12 @@ +import { column, defineDb, defineTable } from 'astro:db'; + +const User = defineTable({ + columns: { + id: column.number({ primaryKey: true }), + name: column.text(), + }, +}); + +export default defineDb({ + tables: { User }, +}); diff --git a/packages/db/test/fixtures/static-remote/db/seed.ts b/packages/db/test/fixtures/static-remote/db/seed.ts new file mode 100644 index 000000000000..2c86f02a1004 --- /dev/null +++ b/packages/db/test/fixtures/static-remote/db/seed.ts @@ -0,0 +1,9 @@ +import { User, db } from 'astro:db'; + +export default async function () { + await db.insert(User).values([ + { + name: 'Houston', + }, + ]); +} diff --git a/packages/db/test/fixtures/static-remote/package.json b/packages/db/test/fixtures/static-remote/package.json new file mode 100644 index 000000000000..aa2c9c23cb83 --- /dev/null +++ b/packages/db/test/fixtures/static-remote/package.json @@ -0,0 +1,16 @@ +{ + "name": "@test/db-static-remote", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "@astrojs/db": "workspace:*", + "astro": "workspace:*" + } +} diff --git a/packages/db/test/fixtures/static-remote/src/pages/index.astro b/packages/db/test/fixtures/static-remote/src/pages/index.astro new file mode 100644 index 000000000000..849e65d18fd7 --- /dev/null +++ b/packages/db/test/fixtures/static-remote/src/pages/index.astro @@ -0,0 +1,19 @@ +--- +import { User, db } from 'astro:db'; + +const users = await db.select().from(User); +--- + + + + Testing + + +

Testing

+ +

Users

+
    + {users.map((user) =>
  • {user.name}
  • )} +
+ + diff --git a/packages/db/test/static-remote.test.js b/packages/db/test/static-remote.test.js new file mode 100644 index 000000000000..7adcf6976121 --- /dev/null +++ b/packages/db/test/static-remote.test.js @@ -0,0 +1,34 @@ +import { expect } from 'chai'; +import { load as cheerioLoad } from 'cheerio'; +import { loadFixture } from '../../astro/test/test-utils.js'; +import { setupRemoteDbServer } from './test-utils.js'; + +describe('astro:db', () => { + let fixture; + before(async () => { + fixture = await loadFixture({ + root: new URL('./fixtures/static-remote/', import.meta.url), + output: 'static', + }); + }); + + describe('static build --remote', () => { + let remoteDbServer; + + before(async () => { + remoteDbServer = await setupRemoteDbServer(fixture.config); + await fixture.build(); + }); + + after(async () => { + await remoteDbServer?.stop(); + }); + + it('Can render page', async () => { + const html = await fixture.readFile('/index.html'); + const $ = cheerioLoad(html); + + expect($('li').length).to.equal(1); + }); + }); +}); diff --git a/packages/db/test/test-utils.js b/packages/db/test/test-utils.js index 860033756281..2ff59e552e44 100644 --- a/packages/db/test/test-utils.js +++ b/packages/db/test/test-utils.js @@ -12,7 +12,7 @@ const singleQuerySchema = z.object({ const querySchema = singleQuerySchema.or(z.array(singleQuerySchema)); -let portIncrementer = 8081; +let portIncrementer = 8030; /** * @param {import('astro').AstroConfig} astroConfig diff --git a/packages/db/test/unit/column-queries.test.js b/packages/db/test/unit/column-queries.test.js index 68b018aecc17..ef4ac9693716 100644 --- a/packages/db/test/unit/column-queries.test.js +++ b/packages/db/test/unit/column-queries.test.js @@ -6,7 +6,7 @@ import { } from '../../dist/core/cli/migration-queries.js'; import { MIGRATION_VERSION } from '../../dist/core/consts.js'; import { tableSchema } from '../../dist/core/schemas.js'; -import { NOW, column, defineTable } from '../../dist/runtime/config.js'; +import { NOW, column, defineTable } from '../../dist/runtime/virtual.js'; const TABLE_NAME = 'Users'; diff --git a/packages/db/test/unit/index-queries.test.js b/packages/db/test/unit/index-queries.test.js index 5af1b8489c8a..ce0894d27453 100644 --- a/packages/db/test/unit/index-queries.test.js +++ b/packages/db/test/unit/index-queries.test.js @@ -2,7 +2,7 @@ import { expect } from 'chai'; import { describe, it } from 'mocha'; import { getTableChangeQueries } from '../../dist/core/cli/migration-queries.js'; import { dbConfigSchema, tableSchema } from '../../dist/core/schemas.js'; -import { column } from '../../dist/runtime/config.js'; +import { column } from '../../dist/runtime/virtual.js'; const userInitial = tableSchema.parse({ columns: { diff --git a/packages/db/test/unit/reference-queries.test.js b/packages/db/test/unit/reference-queries.test.js index 2321ef507d66..76f6341e164c 100644 --- a/packages/db/test/unit/reference-queries.test.js +++ b/packages/db/test/unit/reference-queries.test.js @@ -2,7 +2,7 @@ import { expect } from 'chai'; import { describe, it } from 'mocha'; import { getTableChangeQueries } from '../../dist/core/cli/migration-queries.js'; import { tablesSchema } from '../../dist/core/schemas.js'; -import { column, defineTable } from '../../dist/runtime/config.js'; +import { column, defineTable } from '../../dist/runtime/virtual.js'; const BaseUser = defineTable({ columns: { diff --git a/packages/db/test/unit/reset-queries.test.js b/packages/db/test/unit/reset-queries.test.js index 4d74e01482d7..4e91d1d8d7ed 100644 --- a/packages/db/test/unit/reset-queries.test.js +++ b/packages/db/test/unit/reset-queries.test.js @@ -3,7 +3,7 @@ import { describe, it } from 'mocha'; import { getMigrationQueries } from '../../dist/core/cli/migration-queries.js'; import { MIGRATION_VERSION } from '../../dist/core/consts.js'; import { tableSchema } from '../../dist/core/schemas.js'; -import { column, defineTable } from '../../dist/runtime/config.js'; +import { column, defineTable } from '../../dist/runtime/virtual.js'; const TABLE_NAME = 'Users'; diff --git a/packages/db/tsconfig.json b/packages/db/tsconfig.json index 96407d1d114a..7592ad8a1774 100644 --- a/packages/db/tsconfig.json +++ b/packages/db/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "../../tsconfig.base.json", "include": ["src"], - "exclude": ["src/runtime/config.ts"], + "exclude": ["src/runtime/virtual.ts"], "compilerOptions": { "outDir": "./dist" } diff --git a/packages/db/tsconfig.config-types.json b/packages/db/tsconfig.virtual.json similarity index 78% rename from packages/db/tsconfig.config-types.json rename to packages/db/tsconfig.virtual.json index f21f8445d573..41d2aef4a11b 100644 --- a/packages/db/tsconfig.config-types.json +++ b/packages/db/tsconfig.virtual.json @@ -1,11 +1,11 @@ { // We want to avoid defineTable() and defineDb() import hints // from the runtime config export instead of astro:db. - // We exclude runtime/config from the base types, + // We exclude runtime/virtual from the base types, // and generate to a separate _internal/ directory // for our virtual module (virtual.d.ts) to reference. "extends": "../../tsconfig.base.json", - "files": ["./src/runtime/config.ts"], + "files": ["./src/runtime/virtual.ts"], "compilerOptions": { "outDir": "./dist/_internal" } diff --git a/packages/db/virtual.d.ts b/packages/db/virtual.d.ts index bea4990a0efa..efe9e8387d30 100644 --- a/packages/db/virtual.d.ts +++ b/packages/db/virtual.d.ts @@ -1,7 +1,7 @@ declare module 'astro:db' { - type RuntimeConfig = typeof import('./dist/_internal/runtime/config.js'); + type RuntimeConfig = typeof import('./dist/_internal/runtime/virtual.js'); - export const db: import('./dist/_internal/runtime/config.js').Database; + export const db: import('./dist/_internal/runtime/virtual.js').Database; export const dbUrl: string; export const sql: RuntimeConfig['sql']; diff --git a/packages/integrations/markdoc/CHANGELOG.md b/packages/integrations/markdoc/CHANGELOG.md index cd2f3c4d4077..53b68a9eb025 100644 --- a/packages/integrations/markdoc/CHANGELOG.md +++ b/packages/integrations/markdoc/CHANGELOG.md @@ -1,5 +1,34 @@ # @astrojs/markdoc +## 0.9.5 + +### Patch Changes + +- [#10649](https://github.com/withastro/astro/pull/10649) [`90cfade88c2b9a34d8a5fe711ce329732d690409`](https://github.com/withastro/astro/commit/90cfade88c2b9a34d8a5fe711ce329732d690409) Thanks [@bholmesdev](https://github.com/bholmesdev)! - Add automatic resolution for Markdoc partials. This allows you to render other Markdoc files inside of a given entry. Reference files using the `partial` tag with a `file` attribute for the relative file path: + + ```md + + + {% partial file="my-partials/_diagram.mdoc" /%} + + + + ## Diagram + + This partial will render inside of `post.mdoc.` + + ![Diagram](./diagram.png) + ``` + +## 0.9.4 + +### Patch Changes + +- [#10632](https://github.com/withastro/astro/pull/10632) [`da2fb875fc58b65a21d37a3d29f570fa20b5219c`](https://github.com/withastro/astro/commit/da2fb875fc58b65a21d37a3d29f570fa20b5219c) Thanks [@bluwy](https://github.com/bluwy)! - Moves `@astrojs/markdown-remark` as a dependency + +- Updated dependencies [[`2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de`](https://github.com/withastro/astro/commit/2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de), [`374efcdff9625ca43309d89e3b9cfc9174351512`](https://github.com/withastro/astro/commit/374efcdff9625ca43309d89e3b9cfc9174351512)]: + - @astrojs/markdown-remark@5.0.0 + ## 0.9.3 ### Patch Changes diff --git a/packages/integrations/markdoc/package.json b/packages/integrations/markdoc/package.json index d0009acf9f7d..d67001e75ce1 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.9.3", + "version": "0.9.5", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", @@ -59,7 +59,7 @@ "build": "astro-scripts build \"src/**/*.ts\" && tsc", "build:ci": "astro-scripts build \"src/**/*.ts\"", "dev": "astro-scripts dev \"src/**/*.ts\"", - "test": "astro-scripts test --timeout 40000 \"test/**/*.test.js\"" + "test": "astro-scripts test --timeout 60000 \"test/**/*.test.js\"" }, "dependencies": { "@astrojs/internal-helpers": "workspace:*", diff --git a/packages/integrations/markdoc/src/content-entry-type.ts b/packages/integrations/markdoc/src/content-entry-type.ts index 89f9f9e8687b..5168c49c16a5 100644 --- a/packages/integrations/markdoc/src/content-entry-type.ts +++ b/packages/integrations/markdoc/src/content-entry-type.ts @@ -1,6 +1,6 @@ import fs from 'node:fs'; import path from 'node:path'; -import { fileURLToPath } from 'node:url'; +import { fileURLToPath, pathToFileURL } from 'node:url'; import type { Config as MarkdocConfig, Node } from '@markdoc/markdoc'; import Markdoc from '@markdoc/markdoc'; import type { AstroConfig, ContentEntryType } from 'astro'; @@ -38,9 +38,41 @@ export async function getContentEntryType({ } const ast = Markdoc.parse(tokens); - const usedTags = getUsedTags(ast); const userMarkdocConfig = markdocConfigResult?.config ?? {}; const markdocConfigUrl = markdocConfigResult?.fileUrl; + const pluginContext = this; + const markdocConfig = await setupConfig(userMarkdocConfig, options); + const filePath = fileURLToPath(fileUrl); + raiseValidationErrors({ + ast, + /* Raised generics issue with Markdoc core https://github.com/markdoc/markdoc/discussions/400 */ + markdocConfig: markdocConfig as MarkdocConfig, + entry, + viteId, + astroConfig, + filePath, + }); + await resolvePartials({ + ast, + markdocConfig: markdocConfig as MarkdocConfig, + fileUrl, + allowHTML: options?.allowHTML, + tokenizer, + pluginContext, + root: astroConfig.root, + raisePartialValidationErrors: (partialAst, partialPath) => { + raiseValidationErrors({ + ast: partialAst, + markdocConfig: markdocConfig as MarkdocConfig, + entry, + viteId, + astroConfig, + filePath: partialPath, + }); + }, + }); + + const usedTags = getUsedTags(ast); let componentConfigByTagMap: Record = {}; // Only include component imports for tags used in the document. @@ -59,42 +91,6 @@ export async function getContentEntryType({ } } - const pluginContext = this; - const markdocConfig = await setupConfig(userMarkdocConfig, options); - - const filePath = fileURLToPath(fileUrl); - - const validationErrors = Markdoc.validate( - ast, - /* Raised generics issue with Markdoc core https://github.com/markdoc/markdoc/discussions/400 */ - markdocConfig as MarkdocConfig - ).filter((e) => { - return ( - // Ignore `variable-undefined` errors. - // Variables can be configured at runtime, - // so we cannot validate them at build time. - e.error.id !== 'variable-undefined' && - (e.error.level === 'error' || e.error.level === 'critical') - ); - }); - if (validationErrors.length) { - // Heuristic: take number of newlines for `rawData` and add 2 for the `---` fences - const frontmatterBlockOffset = entry.rawData.split('\n').length + 2; - const rootRelativePath = path.relative(fileURLToPath(astroConfig.root), filePath); - throw new MarkdocError({ - message: [ - `**${String(rootRelativePath)}** contains invalid content:`, - ...validationErrors.map((e) => `- ${e.error.message}`), - ].join('\n'), - location: { - // Error overlay does not support multi-line or ranges. - // Just point to the first line. - line: frontmatterBlockOffset + validationErrors[0].lines[0], - file: viteId, - }, - }); - } - await emitOptimizedImages(ast.children, { astroConfig, pluginContext, @@ -142,6 +138,136 @@ export const Content = createContentComponent( }; } +/** + * Recursively resolve partial tags to their content. + * Note: Mutates the `ast` object directly. + */ +async function resolvePartials({ + ast, + fileUrl, + root, + tokenizer, + allowHTML, + markdocConfig, + pluginContext, + raisePartialValidationErrors, +}: { + ast: Node; + fileUrl: URL; + root: URL; + tokenizer: any; + allowHTML?: boolean; + markdocConfig: MarkdocConfig; + pluginContext: Rollup.PluginContext; + raisePartialValidationErrors: (ast: Node, filePath: string) => void; +}) { + const relativePartialPath = path.relative(fileURLToPath(root), fileURLToPath(fileUrl)); + for (const node of ast.walk()) { + if (node.type === 'tag' && node.tag === 'partial') { + const { file } = node.attributes; + if (!file) { + throw new MarkdocError({ + // Should be caught by Markdoc validation step. + message: `(Uncaught error) Partial tag requires a 'file' attribute`, + }); + } + + if (markdocConfig.partials?.[file]) continue; + + let partialPath: string; + let partialContents: string; + try { + const resolved = await pluginContext.resolve(file, fileURLToPath(fileUrl)); + let partialId = resolved?.id; + if (!partialId) { + const attemptResolveAsRelative = await pluginContext.resolve( + './' + file, + fileURLToPath(fileUrl) + ); + if (!attemptResolveAsRelative?.id) throw new Error(); + partialId = attemptResolveAsRelative.id; + } + + partialPath = fileURLToPath(new URL(prependForwardSlash(partialId), 'file://')); + partialContents = await fs.promises.readFile(partialPath, 'utf-8'); + } catch { + throw new MarkdocError({ + message: [ + `**${String(relativePartialPath)}** contains invalid content:`, + `Could not read partial file \`${file}\`. Does the file exist?`, + ].join('\n'), + }); + } + if (pluginContext.meta.watchMode) pluginContext.addWatchFile(partialPath); + let partialTokens = tokenizer.tokenize(partialContents); + if (allowHTML) { + partialTokens = htmlTokenTransform(tokenizer, partialTokens); + } + const partialAst = Markdoc.parse(partialTokens); + raisePartialValidationErrors(partialAst, partialPath); + await resolvePartials({ + ast: partialAst, + root, + fileUrl: pathToFileURL(partialPath), + tokenizer, + allowHTML, + markdocConfig, + pluginContext, + raisePartialValidationErrors, + }); + + Object.assign(node, partialAst); + } + } +} + +function raiseValidationErrors({ + ast, + markdocConfig, + entry, + viteId, + astroConfig, + filePath, +}: { + ast: Node; + markdocConfig: MarkdocConfig; + entry: ReturnType; + viteId: string; + astroConfig: AstroConfig; + filePath: string; +}) { + const validationErrors = Markdoc.validate(ast, markdocConfig).filter((e) => { + return ( + (e.error.level === 'error' || e.error.level === 'critical') && + // Ignore `variable-undefined` errors. + // Variables can be configured at runtime, + // so we cannot validate them at build time. + e.error.id !== 'variable-undefined' && + // Ignore missing partial errors. + // We will resolve these in `resolvePartials`. + !(e.error.id === 'attribute-value-invalid' && e.error.message.match(/^Partial .+ not found/)) + ); + }); + + if (validationErrors.length) { + // Heuristic: take number of newlines for `rawData` and add 2 for the `---` fences + const frontmatterBlockOffset = entry.rawData.split('\n').length + 2; + const rootRelativePath = path.relative(fileURLToPath(astroConfig.root), filePath); + throw new MarkdocError({ + message: [ + `**${String(rootRelativePath)}** contains invalid content:`, + ...validationErrors.map((e) => `- ${e.error.message}`), + ].join('\n'), + location: { + // Error overlay does not support multi-line or ranges. + // Just point to the first line. + line: frontmatterBlockOffset + validationErrors[0].lines[0], + file: viteId, + }, + }); + } +} + function getUsedTags(markdocAst: Node) { const tags = new Set(); const validationErrors = Markdoc.validate(markdocAst); diff --git a/packages/integrations/markdoc/test/fixtures/render-html/src/content/blog/_partial.mdoc b/packages/integrations/markdoc/test/fixtures/render-html/src/content/blog/_partial.mdoc new file mode 100644 index 000000000000..f8774e911af5 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-html/src/content/blog/_partial.mdoc @@ -0,0 +1,5 @@ +## HTML in a partial + +
    +
  • List item
  • +
diff --git a/packages/integrations/markdoc/test/fixtures/render-html/src/content/blog/with-partial.mdoc b/packages/integrations/markdoc/test/fixtures/render-html/src/content/blog/with-partial.mdoc new file mode 100644 index 000000000000..c42d3cd70a1a --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-html/src/content/blog/with-partial.mdoc @@ -0,0 +1,5 @@ +--- +title: With Partial +--- + +{% partial file="./_partial.mdoc" /%} diff --git a/packages/integrations/markdoc/test/fixtures/render-partials/astro.config.mjs b/packages/integrations/markdoc/test/fixtures/render-partials/astro.config.mjs new file mode 100644 index 000000000000..1bd8ba93f461 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-partials/astro.config.mjs @@ -0,0 +1,7 @@ +import markdoc from '@astrojs/markdoc'; +import { defineConfig } from 'astro/config'; + +// https://astro.build/config +export default defineConfig({ + integrations: [markdoc()], +}); diff --git a/packages/integrations/markdoc/test/fixtures/render-partials/markdoc.config.ts b/packages/integrations/markdoc/test/fixtures/render-partials/markdoc.config.ts new file mode 100644 index 000000000000..c9762aed5879 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-partials/markdoc.config.ts @@ -0,0 +1,7 @@ +import { Markdoc, defineMarkdocConfig } from '@astrojs/markdoc/config'; + +export default defineMarkdocConfig({ + partials: { + configured: Markdoc.parse('# Configured partial {% #configured %}'), + }, +}); diff --git a/packages/integrations/markdoc/test/fixtures/render-partials/package.json b/packages/integrations/markdoc/test/fixtures/render-partials/package.json new file mode 100644 index 000000000000..021e1c2d9b74 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-partials/package.json @@ -0,0 +1,9 @@ +{ + "name": "@test/markdoc-render-partials", + "version": "0.0.0", + "private": true, + "dependencies": { + "@astrojs/markdoc": "workspace:*", + "astro": "workspace:*" + } +} diff --git a/packages/integrations/markdoc/test/fixtures/render-partials/src/content/blog/_partial.mdoc b/packages/integrations/markdoc/test/fixtures/render-partials/src/content/blog/_partial.mdoc new file mode 100644 index 000000000000..4ace9a9d349a --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-partials/src/content/blog/_partial.mdoc @@ -0,0 +1,3 @@ +## Partial {% #top %} + +{% partial file="../nested/_partial.mdoc" /%} diff --git a/packages/integrations/markdoc/test/fixtures/render-partials/src/content/blog/with-partials.mdoc b/packages/integrations/markdoc/test/fixtures/render-partials/src/content/blog/with-partials.mdoc new file mode 100644 index 000000000000..2d9a871101d3 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-partials/src/content/blog/with-partials.mdoc @@ -0,0 +1,7 @@ +--- +title: Post with partials +--- + +{% partial file="_partial.mdoc" /%} + +{% partial file="configured" /%} diff --git a/packages/integrations/markdoc/test/fixtures/render-partials/src/content/nested/_partial.mdoc b/packages/integrations/markdoc/test/fixtures/render-partials/src/content/nested/_partial.mdoc new file mode 100644 index 000000000000..4193609bf7f1 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-partials/src/content/nested/_partial.mdoc @@ -0,0 +1 @@ +## Nested partial {% #nested %} diff --git a/packages/integrations/markdoc/test/fixtures/render-partials/src/pages/index.astro b/packages/integrations/markdoc/test/fixtures/render-partials/src/pages/index.astro new file mode 100644 index 000000000000..e9549f314926 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-partials/src/pages/index.astro @@ -0,0 +1,19 @@ +--- +import { getEntryBySlug } from 'astro:content'; + +const post = await getEntryBySlug('blog', 'with-partials'); +const { Content } = await post.render(); +--- + + + + + + + + Content + + + + + diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/astro.config.mjs b/packages/integrations/markdoc/test/fixtures/render-with-components/astro.config.mjs index 1bd8ba93f461..3023497aa562 100644 --- a/packages/integrations/markdoc/test/fixtures/render-with-components/astro.config.mjs +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/astro.config.mjs @@ -1,7 +1,8 @@ import markdoc from '@astrojs/markdoc'; +import preact from '@astrojs/preact'; import { defineConfig } from 'astro/config'; // https://astro.build/config export default defineConfig({ - integrations: [markdoc()], + integrations: [markdoc(), preact()], }); diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.ts b/packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.ts index 2016327a8a33..6093ec5938a5 100644 --- a/packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.ts +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/markdoc.config.ts @@ -1,4 +1,4 @@ -import { component, defineMarkdocConfig } from '@astrojs/markdoc/config'; +import { Markdoc, component, defineMarkdocConfig } from '@astrojs/markdoc/config'; export default defineMarkdocConfig({ nodes: { @@ -22,5 +22,11 @@ export default defineMarkdocConfig({ }, }, }, + counter: { + render: component('./src/components/CounterWrapper.astro'), + }, + 'deeply-nested': { + render: component('./src/components/DeeplyNested.astro'), + }, }, -}) +}); diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/package.json b/packages/integrations/markdoc/test/fixtures/render-with-components/package.json index b8103347319b..f70e2b6c123d 100644 --- a/packages/integrations/markdoc/test/fixtures/render-with-components/package.json +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/package.json @@ -4,6 +4,8 @@ "private": true, "dependencies": { "@astrojs/markdoc": "workspace:*", - "astro": "workspace:*" + "@astrojs/preact": "workspace:*", + "astro": "workspace:*", + "preact": "^10.20.1" } } diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/src/components/Counter.tsx b/packages/integrations/markdoc/test/fixtures/render-with-components/src/components/Counter.tsx new file mode 100644 index 000000000000..f1e239718cf8 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/src/components/Counter.tsx @@ -0,0 +1,10 @@ +import { useState } from 'preact/hooks'; + +export default function Counter() { + const [count, setCount] = useState(1); + return ( + + ); +} diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/src/components/CounterWrapper.astro b/packages/integrations/markdoc/test/fixtures/render-with-components/src/components/CounterWrapper.astro new file mode 100644 index 000000000000..e45ac6438152 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/src/components/CounterWrapper.astro @@ -0,0 +1,5 @@ +--- +import Counter from './Counter'; +--- + + diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/src/components/DeeplyNested.astro b/packages/integrations/markdoc/test/fixtures/render-with-components/src/components/DeeplyNested.astro new file mode 100644 index 000000000000..eb23f675a0f6 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/src/components/DeeplyNested.astro @@ -0,0 +1,5 @@ +--- + +--- + +

Deeply nested partial

diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/_nested.mdoc b/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/_nested.mdoc new file mode 100644 index 000000000000..68f529280124 --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/_nested.mdoc @@ -0,0 +1,3 @@ +Render components from a deeply nested partial: + +{% deeply-nested /%} diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/blog/_counter.mdoc b/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/blog/_counter.mdoc new file mode 100644 index 000000000000..4a015695c68e --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/blog/_counter.mdoc @@ -0,0 +1,7 @@ +# Hello from a partial! + +Render a component from a partial: + +{% counter /%} + +{% partial file="../_nested.mdoc" /%} diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/blog/with-components.mdoc b/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/blog/with-components.mdoc index 61f404a9701a..eb7d20426e59 100644 --- a/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/blog/with-components.mdoc +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/src/content/blog/with-components.mdoc @@ -10,6 +10,8 @@ This uses a custom marquee component with a shortcode: I'm a marquee too! {% /marquee-element %} +{% partial file="_counter.mdoc" /%} + And a code component for code blocks: ```js diff --git a/packages/integrations/markdoc/test/fixtures/render-with-components/tsconfig.json b/packages/integrations/markdoc/test/fixtures/render-with-components/tsconfig.json new file mode 100644 index 000000000000..99df2e61a11d --- /dev/null +++ b/packages/integrations/markdoc/test/fixtures/render-with-components/tsconfig.json @@ -0,0 +1,7 @@ +{ + "extends": "astro/tsconfigs/base", + "compilerOptions": { + "jsx": "react-jsx", + "jsxImportSource": "preact" + } +} \ No newline at end of file diff --git a/packages/integrations/markdoc/test/render-components.test.js b/packages/integrations/markdoc/test/render-components.test.js new file mode 100644 index 000000000000..b9ac8770f732 --- /dev/null +++ b/packages/integrations/markdoc/test/render-components.test.js @@ -0,0 +1,89 @@ +import assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; +import { parseHTML } from 'linkedom'; +import { loadFixture } from '../../../astro/test/test-utils.js'; + +const root = new URL('./fixtures/render-with-components/', import.meta.url); + +describe('Markdoc - render components', () => { + let fixture; + + before(async () => { + fixture = await loadFixture({ + root, + }); + }); + + describe('dev', () => { + let devServer; + + before(async () => { + devServer = await fixture.startDevServer(); + }); + + after(async () => { + await devServer.stop(); + }); + + it('renders content - with components', async () => { + const res = await fixture.fetch('/'); + const html = await res.text(); + + renderComponentsChecks(html); + }); + + it('renders content - with components inside partials', async () => { + const res = await fixture.fetch('/'); + const html = await res.text(); + + renderComponentsInsidePartialsChecks(html); + }); + }); + + describe('build', () => { + before(async () => { + await fixture.build(); + }); + + it('renders content - with components', async () => { + const html = await fixture.readFile('/index.html'); + + renderComponentsChecks(html); + }); + + it('renders content - with components inside partials', async () => { + const html = await fixture.readFile('/index.html'); + + renderComponentsInsidePartialsChecks(html); + }); + }); +}); + +/** @param {string} html */ +function renderComponentsChecks(html) { + const { document } = parseHTML(html); + const h2 = document.querySelector('h2'); + assert.equal(h2.textContent, 'Post with components'); + + // Renders custom shortcode component + const marquee = document.querySelector('marquee'); + assert.notEqual(marquee, null); + assert.equal(marquee.hasAttribute('data-custom-marquee'), true); + + // Renders Astro Code component + const pre = document.querySelector('pre'); + assert.notEqual(pre, null); + assert.equal(pre.className, 'astro-code github-dark'); +} + +/** @param {string} html */ +function renderComponentsInsidePartialsChecks(html) { + const { document } = parseHTML(html); + // renders Counter.tsx + const button = document.querySelector('#counter'); + assert.equal(button.textContent, '1'); + + // renders DeeplyNested.astro + const deeplyNested = document.querySelector('#deeply-nested'); + assert.equal(deeplyNested.textContent, 'Deeply nested partial'); +} diff --git a/packages/integrations/markdoc/test/render-html.test.js b/packages/integrations/markdoc/test/render-html.test.js index 785599ae57f6..4780444bfd90 100644 --- a/packages/integrations/markdoc/test/render-html.test.js +++ b/packages/integrations/markdoc/test/render-html.test.js @@ -54,6 +54,13 @@ describe('Markdoc - render html', () => { renderRandomlyCasedHTMLAttributesChecks(html); }); + + it('renders content - html within partials', async () => { + const res = await fixture.fetch('/with-partial'); + const html = await res.text(); + + renderHTMLWithinPartialChecks(html); + }); }); describe('build', () => { @@ -84,6 +91,12 @@ describe('Markdoc - render html', () => { renderRandomlyCasedHTMLAttributesChecks(html); }); + + it('renders content - html within partials', async () => { + const html = await fixture.readFile('/with-partial/index.html'); + + renderHTMLWithinPartialChecks(html); + }); }); }); @@ -186,6 +199,16 @@ function renderRandomlyCasedHTMLAttributesChecks(html) { assert.equal(td4.getAttribute('rowspan'), '2'); } +/** + * @param {string} html + */ +function renderHTMLWithinPartialChecks(html) { + const { document } = parseHTML(html); + + const li = document.querySelector('ul > li#partial'); + assert.equal(li.textContent, 'List item'); +} + /** * Asserts that the rendered HTML tags with interleaved Markdoc tags (both block and inline) rendered in the expected nested graph of elemements * diff --git a/packages/integrations/markdoc/test/render-indented-components.test.js b/packages/integrations/markdoc/test/render-indented-components.test.js new file mode 100644 index 000000000000..ac47e72f9116 --- /dev/null +++ b/packages/integrations/markdoc/test/render-indented-components.test.js @@ -0,0 +1,67 @@ +import assert from 'node:assert/strict'; +import { after, before, describe, it } from 'node:test'; +import { parseHTML } from 'linkedom'; +import { loadFixture } from '../../../astro/test/test-utils.js'; + +const root = new URL('./fixtures/render-with-indented-components/', import.meta.url); + +describe('Markdoc - render indented components', () => { + let fixture; + + before(async () => { + fixture = await loadFixture({ + root, + }); + }); + + describe('dev', () => { + let devServer; + + before(async () => { + devServer = await fixture.startDevServer(); + }); + + after(async () => { + await devServer.stop(); + }); + + it('renders content - with indented components', async () => { + const res = await fixture.fetch('/'); + const html = await res.text(); + + renderIndentedComponentsChecks(html); + }); + }); + + describe('build', () => { + before(async () => { + await fixture.build(); + }); + + it('renders content - with indented components', async () => { + const html = await fixture.readFile('/index.html'); + + renderIndentedComponentsChecks(html); + }); + }); +}); + +/** @param {string} html */ +function renderIndentedComponentsChecks(html) { + const { document } = parseHTML(html); + const h2 = document.querySelector('h2'); + assert.equal(h2.textContent, 'Post with indented components'); + + // Renders custom shortcode components + const marquees = document.querySelectorAll('marquee'); + assert.equal(marquees.length, 2); + + // Renders h3 + const h3 = document.querySelector('h3'); + assert.equal(h3.textContent, 'I am an h3!'); + + // Renders Astro Code component + const pre = document.querySelector('pre'); + assert.notEqual(pre, null); + assert.equal(pre.className, 'astro-code github-dark'); +} diff --git a/packages/integrations/markdoc/test/render.test.js b/packages/integrations/markdoc/test/render.test.js index 0960a980ce01..d439adcd2b8e 100644 --- a/packages/integrations/markdoc/test/render.test.js +++ b/packages/integrations/markdoc/test/render.test.js @@ -23,38 +23,26 @@ describe('Markdoc - render', () => { await server.stop(); }); - it('renders content - with config', async () => { - const fixture = await getFixture('render-with-config'); + it('renders content - with partials', async () => { + const fixture = await getFixture('render-partials'); const server = await fixture.startDevServer(); const res = await fixture.fetch('/'); const html = await res.text(); - renderConfigChecks(html); + renderPartialsChecks(html); await server.stop(); }); - it('renders content - with components', async () => { - const fixture = await getFixture('render-with-components'); - const server = await fixture.startDevServer(); - - const res = await fixture.fetch('/'); - const html = await res.text(); - - renderComponentsChecks(html); - - await server.stop(); - }); - - it('renders content - with indented components', async () => { - const fixture = await getFixture('render-with-indented-components'); + it('renders content - with config', async () => { + const fixture = await getFixture('render-with-config'); const server = await fixture.startDevServer(); const res = await fixture.fetch('/'); const html = await res.text(); - renderIndentedComponentsChecks(html); + renderConfigChecks(html); await server.stop(); }); @@ -94,31 +82,22 @@ describe('Markdoc - render', () => { renderSimpleChecks(html); }); - it('renders content - with config', async () => { - const fixture = await getFixture('render-with-config'); - await fixture.build(); - - const html = await fixture.readFile('/index.html'); - - renderConfigChecks(html); - }); - - it('renders content - with components', async () => { - const fixture = await getFixture('render-with-components'); + it('renders content - with partials', async () => { + const fixture = await getFixture('render-partials'); await fixture.build(); const html = await fixture.readFile('/index.html'); - renderComponentsChecks(html); + renderPartialsChecks(html); }); - it('renders content - with indented components', async () => { - const fixture = await getFixture('render-with-indented-components'); + it('renders content - with config', async () => { + const fixture = await getFixture('render-with-config'); await fixture.build(); const html = await fixture.readFile('/index.html'); - renderIndentedComponentsChecks(html); + renderConfigChecks(html); }); it('renders content - with `render: null` in document', async () => { @@ -152,40 +131,14 @@ function renderNullChecks(html) { } /** @param {string} html */ -function renderComponentsChecks(html) { +function renderPartialsChecks(html) { const { document } = parseHTML(html); - const h2 = document.querySelector('h2'); - assert.equal(h2.textContent, 'Post with components'); - - // Renders custom shortcode component - const marquee = document.querySelector('marquee'); - assert.notEqual(marquee, null); - assert.equal(marquee.hasAttribute('data-custom-marquee'), true); - - // Renders Astro Code component - const pre = document.querySelector('pre'); - assert.notEqual(pre, null); - assert.equal(pre.className, 'astro-code github-dark'); -} - -/** @param {string} html */ -function renderIndentedComponentsChecks(html) { - const { document } = parseHTML(html); - const h2 = document.querySelector('h2'); - assert.equal(h2.textContent, 'Post with indented components'); - - // Renders custom shortcode components - const marquees = document.querySelectorAll('marquee'); - assert.equal(marquees.length, 2); - - // Renders h3 - const h3 = document.querySelector('h3'); - assert.equal(h3.textContent, 'I am an h3!'); - - // Renders Astro Code component - const pre = document.querySelector('pre'); - assert.notEqual(pre, null); - assert.equal(pre.className, 'astro-code github-dark'); + const top = document.querySelector('#top'); + assert.ok(top); + const nested = document.querySelector('#nested'); + assert.ok(nested); + const configured = document.querySelector('#configured'); + assert.ok(configured); } /** @param {string} html */ diff --git a/packages/integrations/mdx/CHANGELOG.md b/packages/integrations/mdx/CHANGELOG.md index 8d6c58217655..16d7de5e57f5 100644 --- a/packages/integrations/mdx/CHANGELOG.md +++ b/packages/integrations/mdx/CHANGELOG.md @@ -1,5 +1,12 @@ # @astrojs/mdx +## 2.2.3 + +### Patch Changes + +- Updated dependencies [[`2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de`](https://github.com/withastro/astro/commit/2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de), [`374efcdff9625ca43309d89e3b9cfc9174351512`](https://github.com/withastro/astro/commit/374efcdff9625ca43309d89e3b9cfc9174351512)]: + - @astrojs/markdown-remark@5.0.0 + ## 2.2.2 ### Patch Changes diff --git a/packages/integrations/mdx/package.json b/packages/integrations/mdx/package.json index 32dad5531156..ff77e56ca2f6 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": "2.2.2", + "version": "2.2.3", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/node/test/fixtures/url-protocol/src/pages/index.astro b/packages/integrations/node/test/fixtures/url-protocol/src/pages/index.astro deleted file mode 100644 index 61fb9867b15f..000000000000 --- a/packages/integrations/node/test/fixtures/url-protocol/src/pages/index.astro +++ /dev/null @@ -1,11 +0,0 @@ ---- ---- - - - - url-protocol - - - {Astro.url.protocol} - - diff --git a/packages/integrations/node/test/fixtures/url-protocol/package.json b/packages/integrations/node/test/fixtures/url/package.json similarity index 80% rename from packages/integrations/node/test/fixtures/url-protocol/package.json rename to packages/integrations/node/test/fixtures/url/package.json index 4b0775716a3e..f349011fd36e 100644 --- a/packages/integrations/node/test/fixtures/url-protocol/package.json +++ b/packages/integrations/node/test/fixtures/url/package.json @@ -1,5 +1,5 @@ { - "name": "@test/url-protocol", + "name": "@test/url", "version": "0.0.0", "private": true, "dependencies": { diff --git a/packages/integrations/node/test/fixtures/url/src/pages/index.astro b/packages/integrations/node/test/fixtures/url/src/pages/index.astro new file mode 100644 index 000000000000..003429f5209c --- /dev/null +++ b/packages/integrations/node/test/fixtures/url/src/pages/index.astro @@ -0,0 +1,9 @@ +--- +--- + + + + URL + + {Astro.url.href} + diff --git a/packages/integrations/node/test/url-protocol.test.js b/packages/integrations/node/test/url.test.js similarity index 62% rename from packages/integrations/node/test/url-protocol.test.js rename to packages/integrations/node/test/url.test.js index 94d53104b9de..6fc008236613 100644 --- a/packages/integrations/node/test/url-protocol.test.js +++ b/packages/integrations/node/test/url.test.js @@ -1,16 +1,17 @@ import * as assert from 'node:assert/strict'; import { before, describe, it } from 'node:test'; import { TLSSocket } from 'node:tls'; +import * as cheerio from 'cheerio'; import nodejs from '../dist/index.js'; import { createRequestAndResponse, loadFixture } from './test-utils.js'; -describe('URL protocol', () => { - /** @type {import('./test-utils').Fixture} */ +describe('URL', () => { + /** @type {import('./test-utils.js').Fixture} */ let fixture; before(async () => { fixture = await loadFixture({ - root: './fixtures/url-protocol/', + root: './fixtures/url/', output: 'server', adapter: nodejs({ mode: 'standalone' }), }); @@ -18,7 +19,7 @@ describe('URL protocol', () => { }); it('return http when non-secure', async () => { - const { handler } = await import('./fixtures/url-protocol/dist/server/entry.mjs'); + const { handler } = await import('./fixtures/url/dist/server/entry.mjs'); let { req, res, text } = createRequestAndResponse({ url: '/', }); @@ -31,7 +32,7 @@ describe('URL protocol', () => { }); it('return https when secure', async () => { - const { handler } = await import('./fixtures/url-protocol/dist/server/entry.mjs'); + const { handler } = await import('./fixtures/url/dist/server/entry.mjs'); let { req, res, text } = createRequestAndResponse({ socket: new TLSSocket(), url: '/', @@ -45,7 +46,7 @@ describe('URL protocol', () => { }); it('return http when the X-Forwarded-Proto header is set to http', async () => { - const { handler } = await import('./fixtures/url-protocol/dist/server/entry.mjs'); + const { handler } = await import('./fixtures/url/dist/server/entry.mjs'); let { req, res, text } = createRequestAndResponse({ headers: { 'X-Forwarded-Proto': 'http' }, url: '/', @@ -59,7 +60,7 @@ describe('URL protocol', () => { }); it('return https when the X-Forwarded-Proto header is set to https', async () => { - const { handler } = await import('./fixtures/url-protocol/dist/server/entry.mjs'); + const { handler } = await import('./fixtures/url/dist/server/entry.mjs'); let { req, res, text } = createRequestAndResponse({ headers: { 'X-Forwarded-Proto': 'https' }, url: '/', @@ -71,4 +72,24 @@ describe('URL protocol', () => { const html = await text(); assert.equal(html.includes('https:'), true); }); + + it('includes forwarded host and port in the url', async () => { + const { handler } = await import('./fixtures/url/dist/server/entry.mjs'); + let { req, res, text } = createRequestAndResponse({ + headers: { + 'X-Forwarded-Proto': 'https', + 'X-Forwarded-Host': 'abc.xyz', + 'X-Forwarded-Port': '444', + }, + url: '/', + }); + + handler(req, res); + req.send(); + + const html = await text(); + const $ = cheerio.load(html); + + assert.equal($('body').text(), 'https://abc.xyz:444/'); + }); }); diff --git a/packages/integrations/preact/CHANGELOG.md b/packages/integrations/preact/CHANGELOG.md index 9c2f17ca2f61..0d4f2c20731c 100644 --- a/packages/integrations/preact/CHANGELOG.md +++ b/packages/integrations/preact/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/preact +## 3.1.2 + +### Patch Changes + +- [#10585](https://github.com/withastro/astro/pull/10585) [`ad50784adc6f262fc563999e97df3a5dc9087c88`](https://github.com/withastro/astro/commit/ad50784adc6f262fc563999e97df3a5dc9087c88) Thanks [@rschristian](https://github.com/rschristian)! - Fixes (theoretical) edge case in Preact integration's JSX aliases + ## 3.1.1 ### Patch Changes diff --git a/packages/integrations/preact/package.json b/packages/integrations/preact/package.json index d77ce973eac2..37ac943311d9 100644 --- a/packages/integrations/preact/package.json +++ b/packages/integrations/preact/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/preact", "description": "Use Preact components within Astro", - "version": "3.1.1", + "version": "3.1.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 eb1d9f7235ca..534a314b5669 100644 --- a/packages/integrations/react/CHANGELOG.md +++ b/packages/integrations/react/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/react +## 3.1.1 + +### Patch Changes + +- [#10654](https://github.com/withastro/astro/pull/10654) [`195f51f82a44df32be73865949aabee0d46ffe61`](https://github.com/withastro/astro/commit/195f51f82a44df32be73865949aabee0d46ffe61) Thanks [@matthewp](https://github.com/matthewp)! - Mark @material-tailwind/react as noExternal + ## 3.1.0 ### Minor Changes diff --git a/packages/integrations/react/package.json b/packages/integrations/react/package.json index 6d89ff7f5592..574740d991fe 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": "3.1.0", + "version": "3.1.1", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/packages/integrations/react/src/index.ts b/packages/integrations/react/src/index.ts index d5f6965224e4..30781396f9ae 100644 --- a/packages/integrations/react/src/index.ts +++ b/packages/integrations/react/src/index.ts @@ -80,6 +80,7 @@ function getViteConfiguration({ '@babel/runtime', 'redoc', 'use-immer', + '@material-tailwind/react', ], }, }; diff --git a/packages/integrations/svelte/CHANGELOG.md b/packages/integrations/svelte/CHANGELOG.md index 2a3500ed132e..a532cc744ccd 100644 --- a/packages/integrations/svelte/CHANGELOG.md +++ b/packages/integrations/svelte/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/svelte +## 5.3.0 + +### Minor Changes + +- [#10645](https://github.com/withastro/astro/pull/10645) [`51112ab3f1b134740e8307743bbb15cb0d8bdbb3`](https://github.com/withastro/astro/commit/51112ab3f1b134740e8307743bbb15cb0d8bdbb3) Thanks [@mingjunlu](https://github.com/mingjunlu)! - Bumps Svelte 5 peer dependency to `^5.0.0-next.90` and support its latest breaking changes + ## 5.2.0 ### Minor Changes diff --git a/packages/integrations/svelte/client-v5.js b/packages/integrations/svelte/client-v5.js index 819363d5e0f1..755a6aa5381e 100644 --- a/packages/integrations/svelte/client-v5.js +++ b/packages/integrations/svelte/client-v5.js @@ -1,5 +1,5 @@ import { hydrate, mount, unmount } from 'svelte'; -import { add_snippet_symbol } from 'svelte/internal'; +import { add_snippet_symbol } from 'svelte/internal/client'; // Allow a slot to be rendered as a snippet (dev validation only) const tagSlotAsSnippet = import.meta.env.DEV ? add_snippet_symbol : (s) => s; diff --git a/packages/integrations/svelte/package.json b/packages/integrations/svelte/package.json index eef0b04fffd4..d20d3c5a27eb 100644 --- a/packages/integrations/svelte/package.json +++ b/packages/integrations/svelte/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/svelte", - "version": "5.2.0", + "version": "5.3.0", "description": "Use Svelte components within Astro", "type": "module", "types": "./dist/index.d.ts", @@ -53,7 +53,7 @@ }, "peerDependencies": { "astro": "^4.0.0", - "svelte": "^4.0.0 || ^5.0.0-next.56", + "svelte": "^4.0.0 || ^5.0.0-next.90", "typescript": "^5.3.3" }, "engines": { diff --git a/packages/integrations/svelte/server-v5.js b/packages/integrations/svelte/server-v5.js index b4ef33824d96..04a24eff2474 100644 --- a/packages/integrations/svelte/server-v5.js +++ b/packages/integrations/svelte/server-v5.js @@ -1,4 +1,4 @@ -import { add_snippet_symbol } from 'svelte/internal'; +import { add_snippet_symbol } from 'svelte/internal/server'; import { render } from 'svelte/server'; // Allow a slot to be rendered as a snippet (dev validation only) diff --git a/packages/integrations/vercel/CHANGELOG.md b/packages/integrations/vercel/CHANGELOG.md index 4bec34fa2478..1a1b7e053781 100644 --- a/packages/integrations/vercel/CHANGELOG.md +++ b/packages/integrations/vercel/CHANGELOG.md @@ -1,5 +1,17 @@ # @astrojs/vercel +## 7.5.2 + +### Patch Changes + +- [#10611](https://github.com/withastro/astro/pull/10611) [`a9a3694a98060be9a33045bb0fcf92ccf1acff6f`](https://github.com/withastro/astro/commit/a9a3694a98060be9a33045bb0fcf92ccf1acff6f) Thanks [@jacobdalamb](https://github.com/jacobdalamb)! - Updates the supported version of Node.js + +## 7.5.1 + +### Patch Changes + +- [#10609](https://github.com/withastro/astro/pull/10609) [`31590d44ef8b7c96a757e9b835144d57d767383c`](https://github.com/withastro/astro/commit/31590d44ef8b7c96a757e9b835144d57d767383c) Thanks [@matthewp](https://github.com/matthewp)! - Move nft warnings behind verbose logging + ## 7.5.0 ### Minor Changes diff --git a/packages/integrations/vercel/package.json b/packages/integrations/vercel/package.json index c97852f0d3b3..207668a94c13 100644 --- a/packages/integrations/vercel/package.json +++ b/packages/integrations/vercel/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/vercel", "description": "Deploy your site to Vercel", - "version": "7.5.0", + "version": "7.5.2", "type": "module", "author": "withastro", "license": "MIT", diff --git a/packages/integrations/vercel/src/serverless/adapter.ts b/packages/integrations/vercel/src/serverless/adapter.ts index bb7d9f43738c..185d3df465bb 100644 --- a/packages/integrations/vercel/src/serverless/adapter.ts +++ b/packages/integrations/vercel/src/serverless/adapter.ts @@ -59,11 +59,13 @@ const ISR_PATH = `/_isr?${ASTRO_PATH_PARAM}=$0`; // https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/node-js#node.js-version const SUPPORTED_NODE_VERSIONS: Record< string, - { status: 'current' } | { status: 'beta' } | { status: 'deprecated'; removal: Date } + | { status: 'default' } + | { status: 'beta' } + | { status: 'retiring'; removal: Date | string; warnDate: Date } + | { status: 'deprecated'; removal: Date } > = { - 16: { status: 'deprecated', removal: new Date('February 6 2024') }, - 18: { status: 'current' }, - 20: { status: 'beta' }, + 18: { status: 'retiring', removal: 'Early 2025', warnDate: new Date('October 1 2024') }, + 20: { status: 'default' }, }; function getAdapter({ @@ -522,7 +524,15 @@ function getRuntime(process: NodeJS.Process, logger: AstroIntegrationLogger): Ru ); return 'nodejs18.x'; } - if (support.status === 'current') { + if (support.status === 'default') { + return `nodejs${major}.x`; + } + if (support.status === 'retiring') { + if (support.warnDate && new Date() >= support.warnDate) { + logger.warn( + `Your project is being built for Node.js ${major} as the runtime, which is retiring by ${support.removal}.` + ); + } return `nodejs${major}.x`; } if (support.status === 'beta') { diff --git a/packages/integrations/vercel/test/serverless-prerender.test.js b/packages/integrations/vercel/test/serverless-prerender.test.js index c5b074f80080..537eef77cd79 100644 --- a/packages/integrations/vercel/test/serverless-prerender.test.js +++ b/packages/integrations/vercel/test/serverless-prerender.test.js @@ -23,7 +23,6 @@ describe('Serverless prerender', () => { '../.vercel/output/functions/_render.func/packages/integrations/vercel/test/fixtures/serverless-prerender/.vercel/output/_functions/chunks/pages/generic_*.mjs' ); const contents = await fixture.readFile(file); - console.log(contents); assert.ok(!contents.includes('const outDir ='), "outDir is tree-shaken if it's not imported"); }); diff --git a/packages/integrations/vue/CHANGELOG.md b/packages/integrations/vue/CHANGELOG.md index 28c47742cf7f..63cc8aebea65 100644 --- a/packages/integrations/vue/CHANGELOG.md +++ b/packages/integrations/vue/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/vue +## 4.0.10 + +### Patch Changes + +- [#10601](https://github.com/withastro/astro/pull/10601) [`b3028caecf1a96310e2ee7a65075a81c231d87be`](https://github.com/withastro/astro/commit/b3028caecf1a96310e2ee7a65075a81c231d87be) Thanks [@kalepail](https://github.com/kalepail)! - Remove the unnecessary and deprecated @vue/server-renderer package from the ssr.external vite config + ## 4.0.9 ### Patch Changes diff --git a/packages/integrations/vue/package.json b/packages/integrations/vue/package.json index 3d08651e0cc6..341dd8ef0dc4 100644 --- a/packages/integrations/vue/package.json +++ b/packages/integrations/vue/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/vue", - "version": "4.0.9", + "version": "4.0.10", "description": "Use Vue components within Astro", "type": "module", "types": "./dist/index.d.ts", diff --git a/packages/markdown/remark/CHANGELOG.md b/packages/markdown/remark/CHANGELOG.md index 1320ce6f9060..d90ae3f8de5f 100644 --- a/packages/markdown/remark/CHANGELOG.md +++ b/packages/markdown/remark/CHANGELOG.md @@ -1,5 +1,13 @@ # @astrojs/markdown-remark +## 5.0.0 + +### Major Changes + +- [#10629](https://github.com/withastro/astro/pull/10629) [`2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de`](https://github.com/withastro/astro/commit/2cf116f80cb5e421ab5cc5eb4a654e7b78c1b8de) Thanks [@bluwy](https://github.com/bluwy)! - Removes deprecated APIs including `remarkShiki`, `remarkPrism`, `replaceCssVariables` and several unused types + +- [#10618](https://github.com/withastro/astro/pull/10618) [`374efcdff9625ca43309d89e3b9cfc9174351512`](https://github.com/withastro/astro/commit/374efcdff9625ca43309d89e3b9cfc9174351512) Thanks [@43081j](https://github.com/43081j)! - Updates Shiki syntax highlighting to lazily load shiki languages by default (only preloading `plaintext`). Additionally, the `createShikiHighlighter()` API now returns an asynchronous `highlight()` function due to this. + ## 4.3.2 ### Patch Changes diff --git a/packages/markdown/remark/package.json b/packages/markdown/remark/package.json index a13fdca196e1..19df22236899 100644 --- a/packages/markdown/remark/package.json +++ b/packages/markdown/remark/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/markdown-remark", - "version": "4.3.2", + "version": "5.0.0", "type": "module", "author": "withastro", "license": "MIT", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fda57985374f..99bfc70f5021 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -134,13 +134,13 @@ importers: examples/basics: dependencies: astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/blog: dependencies: '@astrojs/mdx': - specifier: ^2.2.2 + specifier: ^2.2.3 version: link:../../packages/integrations/mdx '@astrojs/rss': specifier: ^4.0.5 @@ -149,13 +149,13 @@ importers: specifier: ^3.1.2 version: link:../../packages/integrations/sitemap astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/framework-alpine: @@ -170,7 +170,7 @@ importers: specifier: ^3.13.3 version: 3.13.7 astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/framework-lit: @@ -182,7 +182,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro lit: specifier: ^3.1.2 @@ -191,19 +191,19 @@ importers: examples/framework-multiple: dependencies: '@astrojs/preact': - specifier: ^3.1.1 + specifier: ^3.1.2 version: link:../../packages/integrations/preact '@astrojs/react': - specifier: ^3.1.0 + specifier: ^3.1.1 version: link:../../packages/integrations/react '@astrojs/solid-js': specifier: ^4.0.1 version: link:../../packages/integrations/solid '@astrojs/svelte': - specifier: ^5.2.0 + specifier: ^5.3.0 version: link:../../packages/integrations/svelte '@astrojs/vue': - specifier: ^4.0.9 + specifier: ^4.0.10 version: link:../../packages/integrations/vue '@types/react': specifier: ^18.2.37 @@ -212,7 +212,7 @@ importers: specifier: ^18.2.15 version: 18.2.23 astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -236,13 +236,13 @@ importers: examples/framework-preact: dependencies: '@astrojs/preact': - specifier: ^3.1.1 + specifier: ^3.1.2 version: link:../../packages/integrations/preact '@preact/signals': specifier: ^1.2.1 version: 1.2.1(preact@10.20.1) astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -251,7 +251,7 @@ importers: examples/framework-react: dependencies: '@astrojs/react': - specifier: ^3.1.0 + specifier: ^3.1.1 version: link:../../packages/integrations/react '@types/react': specifier: ^18.2.37 @@ -260,7 +260,7 @@ importers: specifier: ^18.2.15 version: 18.2.23 astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -275,7 +275,7 @@ importers: specifier: ^4.0.1 version: link:../../packages/integrations/solid astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro solid-js: specifier: ^1.8.5 @@ -284,10 +284,10 @@ importers: examples/framework-svelte: dependencies: '@astrojs/svelte': - specifier: ^5.2.0 + specifier: ^5.3.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -296,10 +296,10 @@ importers: examples/framework-vue: dependencies: '@astrojs/vue': - specifier: ^4.0.9 + specifier: ^4.0.10 version: link:../../packages/integrations/vue astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro vue: specifier: ^3.3.8 @@ -311,13 +311,13 @@ importers: specifier: ^8.2.5 version: link:../../packages/integrations/node astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/middleware: @@ -326,7 +326,7 @@ importers: specifier: ^8.2.5 version: link:../../packages/integrations/node astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -339,19 +339,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/ssr: @@ -360,10 +360,10 @@ importers: specifier: ^8.2.5 version: link:../../packages/integrations/node '@astrojs/svelte': - specifier: ^5.2.0 + specifier: ^5.3.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -372,7 +372,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro sass: specifier: ^1.69.5 @@ -390,25 +390,25 @@ importers: specifier: ^5.1.0 version: link:../../packages/integrations/tailwind astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/with-markdoc: dependencies: '@astrojs/markdoc': - specifier: ^0.9.3 + specifier: ^0.9.5 version: link:../../packages/integrations/markdoc astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/with-markdown-plugins: dependencies: '@astrojs/markdown-remark': - specifier: ^4.3.2 + specifier: ^5.0.0 version: link:../../packages/markdown/remark astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro hast-util-select: specifier: ^6.0.2 @@ -429,19 +429,19 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro examples/with-mdx: dependencies: '@astrojs/mdx': - specifier: ^2.2.2 + specifier: ^2.2.3 version: link:../../packages/integrations/mdx '@astrojs/preact': - specifier: ^3.1.1 + specifier: ^3.1.2 version: link:../../packages/integrations/preact astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -450,13 +450,13 @@ importers: examples/with-nanostores: dependencies: '@astrojs/preact': - specifier: ^3.1.1 + specifier: ^3.1.2 version: link:../../packages/integrations/preact '@nanostores/preact': specifier: ^0.5.0 version: 0.5.1(nanostores@0.9.5)(preact@10.20.1) astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro nanostores: specifier: ^0.9.5 @@ -468,7 +468,7 @@ importers: examples/with-tailwindcss: dependencies: '@astrojs/mdx': - specifier: ^2.2.2 + specifier: ^2.2.3 version: link:../../packages/integrations/mdx '@astrojs/tailwind': specifier: ^5.1.0 @@ -477,7 +477,7 @@ importers: specifier: ^1.6.3 version: 1.6.4 astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro autoprefixer: specifier: ^10.4.15 @@ -495,7 +495,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^4.5.12 + specifier: ^4.5.15 version: link:../../packages/astro vitest: specifier: ^1.3.1 @@ -3996,6 +3996,15 @@ importers: specifier: workspace:* version: link:../../../../astro + packages/db/test/fixtures/static-remote: + dependencies: + '@astrojs/db': + specifier: workspace:* + version: link:../../.. + astro: + specifier: workspace:* + version: link:../../../../astro + packages/db/test/fixtures/ticketing-example: dependencies: '@astrojs/check': @@ -4258,6 +4267,15 @@ importers: specifier: workspace:* version: link:../../../../../astro + packages/integrations/markdoc/test/fixtures/render-partials: + dependencies: + '@astrojs/markdoc': + specifier: workspace:* + version: link:../../.. + astro: + specifier: workspace:* + version: link:../../../../../astro + packages/integrations/markdoc/test/fixtures/render-simple: dependencies: '@astrojs/markdoc': @@ -4272,9 +4290,15 @@ importers: '@astrojs/markdoc': specifier: workspace:* version: link:../../.. + '@astrojs/preact': + specifier: workspace:* + version: link:../../../../preact astro: specifier: workspace:* version: link:../../../../../astro + preact: + specifier: ^10.20.1 + version: 10.20.1 packages/integrations/markdoc/test/fixtures/render-with-config: dependencies: @@ -4694,7 +4718,7 @@ importers: specifier: workspace:* version: link:../../../../../astro - packages/integrations/node/test/fixtures/url-protocol: + packages/integrations/node/test/fixtures/url: dependencies: '@astrojs/node': specifier: workspace:* @@ -9191,6 +9215,7 @@ packages: /b4a@1.6.6: resolution: {integrity: sha512-5Tk1HLk6b6ctmjIkAcU/Ujv/1WqiDl0F0JdRCR80VsOcUlHcu7pWeWRlOqQLHfDEsVx9YH/aif5AG4ehoCtTmg==} + requiresBuild: true dev: false /babel-plugin-jsx-dom-expressions@0.37.19(@babel/core@7.24.3): @@ -9302,6 +9327,7 @@ packages: /bl@4.1.0: resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} + requiresBuild: true dependencies: buffer: 5.7.1 inherits: 2.0.4 @@ -9593,6 +9619,7 @@ packages: /chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} + requiresBuild: true dev: false /chownr@2.0.0: @@ -9717,9 +9744,11 @@ packages: /color-name@1.1.4: resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + requiresBuild: true /color-string@1.9.1: resolution: {integrity: sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==} + requiresBuild: true dependencies: color-name: 1.1.4 simple-swizzle: 0.2.2 @@ -9733,6 +9762,7 @@ packages: /color@4.2.3: resolution: {integrity: sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==} engines: {node: '>=12.5.0'} + requiresBuild: true dependencies: color-convert: 2.0.1 color-string: 1.9.1 @@ -10067,6 +10097,7 @@ packages: /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} + requiresBuild: true dependencies: mimic-response: 3.1.0 dev: false @@ -10088,6 +10119,7 @@ packages: /deep-extend@0.6.0: resolution: {integrity: sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==} engines: {node: '>=4.0.0'} + requiresBuild: true dev: false /deep-is@0.1.4: @@ -10423,6 +10455,7 @@ packages: /end-of-stream@1.4.4: resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + requiresBuild: true dependencies: once: 1.4.0 dev: false @@ -10869,6 +10902,7 @@ packages: /expand-template@2.0.3: resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} engines: {node: '>=6'} + requiresBuild: true dev: false /express@4.19.2: @@ -10943,6 +10977,7 @@ packages: /fast-fifo@1.3.2: resolution: {integrity: sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ==} + requiresBuild: true dev: false /fast-glob@3.3.2: @@ -11105,6 +11140,7 @@ packages: /fs-constants@1.0.0: resolution: {integrity: sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==} + requiresBuild: true dev: false /fs-extra@10.1.0: @@ -11258,6 +11294,7 @@ packages: /github-from-package@0.0.0: resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} + requiresBuild: true dev: false /github-slugger@2.0.0: @@ -11842,6 +11879,7 @@ packages: /ini@1.3.8: resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==} + requiresBuild: true dev: false /inline-style-parser@0.1.1: @@ -11889,6 +11927,7 @@ packages: /is-arrayish@0.3.2: resolution: {integrity: sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==} + requiresBuild: true dev: false /is-bigint@1.0.4: @@ -13249,6 +13288,7 @@ packages: /mimic-response@3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} + requiresBuild: true dev: false /min-indent@1.0.1: @@ -13336,6 +13376,7 @@ packages: /mkdirp-classic@0.5.3: resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} + requiresBuild: true dev: false /mkdirp@1.0.4: @@ -13433,6 +13474,7 @@ packages: /napi-build-utils@1.0.2: resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} + requiresBuild: true dev: false /natural-compare@1.4.0: @@ -13470,12 +13512,14 @@ packages: /node-abi@3.57.0: resolution: {integrity: sha512-Dp+A9JWxRaKuHP35H77I4kCKesDy5HUDEmScia2FyncMTOXASMyg251F5PhFoDA5uqBrDDffiLpbqnrZmNXW+g==} engines: {node: '>=10'} + requiresBuild: true dependencies: semver: 7.6.0 dev: false /node-addon-api@6.1.0: resolution: {integrity: sha512-+eawOlIgy680F0kBzPUNFhMZGtJ1YmqM6l4+Crf4IkImjYrO/mqPwRMh352g23uIaQKFItcQ64I7KMaJxHgAVA==} + requiresBuild: true dev: false /node-domexception@1.0.0: @@ -14450,6 +14494,7 @@ packages: resolution: {integrity: sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==} engines: {node: '>=10'} hasBin: true + requiresBuild: true dependencies: detect-libc: 2.0.3 expand-template: 2.0.3 @@ -14567,6 +14612,7 @@ packages: /pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + requiresBuild: true dependencies: end-of-stream: 1.4.4 once: 1.4.0 @@ -14624,6 +14670,7 @@ packages: /rc@1.2.8: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true + requiresBuild: true dependencies: deep-extend: 0.6.0 ini: 1.3.8 @@ -15367,10 +15414,12 @@ packages: /simple-concat@1.0.1: resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} + requiresBuild: true dev: false /simple-get@4.0.1: resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} + requiresBuild: true dependencies: decompress-response: 6.0.0 once: 1.4.0 @@ -15394,6 +15443,7 @@ packages: /simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} + requiresBuild: true dependencies: is-arrayish: 0.3.2 dev: false @@ -15559,6 +15609,7 @@ packages: /streamx@2.16.1: resolution: {integrity: sha512-m9QYj6WygWyWa3H1YY69amr4nVgy61xfjys7xO7kviL5rfIEc2naf+ewFiOA+aEJD7y0JO3h2GoiUv4TDwEGzQ==} + requiresBuild: true dependencies: fast-fifo: 1.3.2 queue-tick: 1.0.1 @@ -15883,6 +15934,7 @@ packages: /tar-fs@2.1.1: resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} + requiresBuild: true dependencies: chownr: 1.1.4 mkdirp-classic: 0.5.3 @@ -15892,6 +15944,7 @@ packages: /tar-fs@3.0.5: resolution: {integrity: sha512-JOgGAmZyMgbqpLwct7ZV8VzkEB6pxXFBVErLtb+XCOqzc6w1xiWKI9GVd6bwk68EX7eJ4DWmfXVmq8K2ziZTGg==} + requiresBuild: true dependencies: pump: 3.0.0 tar-stream: 3.1.7 @@ -15903,6 +15956,7 @@ packages: /tar-stream@2.2.0: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} + requiresBuild: true dependencies: bl: 4.1.0 end-of-stream: 1.4.4 @@ -15913,6 +15967,7 @@ packages: /tar-stream@3.1.7: resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} + requiresBuild: true dependencies: b4a: 1.6.6 fast-fifo: 1.3.2 @@ -16112,6 +16167,7 @@ packages: /tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} + requiresBuild: true dependencies: safe-buffer: 5.2.1 dev: false