From f198530f8f8a78cc2820019d0ba44a4ebb88eb15 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 18 Apr 2024 15:24:26 +0000 Subject: [PATCH] [ci] release --- .changeset/few-pets-relax.md | 5 -- .changeset/itchy-donuts-destroy.md | 5 -- .changeset/late-bags-marry.md | 5 -- .changeset/lazy-rats-beam.md | 5 -- .changeset/metal-terms-push.md | 5 -- .changeset/yellow-fishes-occur.md | 5 -- examples/basics/package.json | 2 +- examples/blog/package.json | 4 +- examples/component/package.json | 2 +- examples/framework-alpine/package.json | 2 +- examples/framework-lit/package.json | 2 +- examples/framework-multiple/package.json | 2 +- examples/framework-preact/package.json | 2 +- examples/framework-react/package.json | 2 +- examples/framework-solid/package.json | 2 +- examples/framework-svelte/package.json | 2 +- examples/framework-vue/package.json | 2 +- examples/hackernews/package.json | 2 +- examples/integration/package.json | 2 +- examples/middleware/package.json | 2 +- examples/minimal/package.json | 2 +- examples/non-html-pages/package.json | 2 +- examples/portfolio/package.json | 2 +- examples/ssr/package.json | 2 +- examples/starlog/package.json | 2 +- examples/view-transitions/package.json | 2 +- examples/with-markdoc/package.json | 2 +- examples/with-markdown-plugins/package.json | 2 +- examples/with-markdown-shiki/package.json | 2 +- examples/with-mdx/package.json | 2 +- examples/with-nanostores/package.json | 2 +- examples/with-tailwindcss/package.json | 2 +- examples/with-vitest/package.json | 2 +- packages/astro/CHANGELOG.md | 12 ++++ packages/astro/package.json | 2 +- .../src/core/build/plugins/plugin-content.ts | 62 ++++++++++++------- packages/astro/src/core/build/static-build.ts | 2 +- packages/astro/src/core/config/index.ts | 8 ++- packages/astro/src/integrations/index.ts | 8 ++- packages/astro/src/vite-plugin-astro/index.ts | 4 +- ...ent-collections-cache-invalidation.test.js | 42 +++++++------ packages/db/CHANGELOG.md | 6 ++ packages/db/package.json | 2 +- packages/integrations/sitemap/CHANGELOG.md | 6 ++ packages/integrations/sitemap/package.json | 2 +- pnpm-lock.yaml | 56 ++++++++--------- 46 files changed, 163 insertions(+), 135 deletions(-) delete mode 100644 .changeset/few-pets-relax.md delete mode 100644 .changeset/itchy-donuts-destroy.md delete mode 100644 .changeset/late-bags-marry.md delete mode 100644 .changeset/lazy-rats-beam.md delete mode 100644 .changeset/metal-terms-push.md delete mode 100644 .changeset/yellow-fishes-occur.md diff --git a/.changeset/few-pets-relax.md b/.changeset/few-pets-relax.md deleted file mode 100644 index 7e2682c27470b..0000000000000 --- a/.changeset/few-pets-relax.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/db": patch ---- - -Expose the Drizzle `alias` utility from `astro:db` to enable self-joins on a table. diff --git a/.changeset/itchy-donuts-destroy.md b/.changeset/itchy-donuts-destroy.md deleted file mode 100644 index 655b27a265654..0000000000000 --- a/.changeset/itchy-donuts-destroy.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Fixes an issue with persisted non-text input fields that have the focus during view transition navigation. diff --git a/.changeset/late-bags-marry.md b/.changeset/late-bags-marry.md deleted file mode 100644 index af6b4ba3ef5b5..0000000000000 --- a/.changeset/late-bags-marry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@astrojs/sitemap": patch ---- - -Fixes an issue where the root url does not follow the `trailingSlash` config option diff --git a/.changeset/lazy-rats-beam.md b/.changeset/lazy-rats-beam.md deleted file mode 100644 index 66acfe33f2657..0000000000000 --- a/.changeset/lazy-rats-beam.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Improves performance for frequent use of small components. diff --git a/.changeset/metal-terms-push.md b/.changeset/metal-terms-push.md deleted file mode 100644 index d9cbf378b38ab..0000000000000 --- a/.changeset/metal-terms-push.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Invalidate CC cache manifest when lockfile or config changes diff --git a/.changeset/yellow-fishes-occur.md b/.changeset/yellow-fishes-occur.md deleted file mode 100644 index 028412e5fc647..0000000000000 --- a/.changeset/yellow-fishes-occur.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"astro": patch ---- - -Update list of available integrations in the `astro add` CLI help. diff --git a/examples/basics/package.json b/examples/basics/package.json index 5c22341e65779..02522acb7a689 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.6.2" + "astro": "^4.6.3" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index afadb4360f967..072a6a3317796 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/mdx": "^2.3.1", "@astrojs/rss": "^4.0.5", - "@astrojs/sitemap": "^3.1.3", - "astro": "^4.6.2" + "@astrojs/sitemap": "^3.1.4", + "astro": "^4.6.3" } } diff --git a/examples/component/package.json b/examples/component/package.json index 352bccdfbfbfa..bcfcb66ac8d84 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.6.2" + "astro": "^4.6.3" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index 00708fe30465d..f6639d87d714e 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.6.2" + "astro": "^4.6.3" } } diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 6243b58fa89d1..3c70813b7588d 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.6.2", + "astro": "^4.6.3", "lit": "^3.1.2" } } diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index dabc84475a35e..b0fd48b55ba51 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -18,7 +18,7 @@ "@astrojs/vue": "^4.1.0", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "astro": "^4.6.2", + "astro": "^4.6.3", "preact": "^10.19.2", "react": "^18.2.0", "react-dom": "^18.2.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 993a445a2b8be..657eaf8bb5aac 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.2.0", "@preact/signals": "^1.2.1", - "astro": "^4.6.2", + "astro": "^4.6.3", "preact": "^10.19.2" } } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index b0eb38cb6b310..b96a70e073f03 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -14,7 +14,7 @@ "@astrojs/react": "^3.3.0", "@types/react": "^18.2.37", "@types/react-dom": "^18.2.15", - "astro": "^4.6.2", + "astro": "^4.6.3", "react": "^18.2.0", "react-dom": "^18.2.0" } diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index e9709aec35307..410555d9f6bcc 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/solid-js": "^4.1.0", - "astro": "^4.6.2", + "astro": "^4.6.3", "solid-js": "^1.8.5" } } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index a3aef84631fba..9a37664b2ecb9 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/svelte": "^5.4.0", - "astro": "^4.6.2", + "astro": "^4.6.3", "svelte": "^4.2.5" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index c4877b256e22a..b7a1e49e99594 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/vue": "^4.1.0", - "astro": "^4.6.2", + "astro": "^4.6.3", "vue": "^3.3.8" } } diff --git a/examples/hackernews/package.json b/examples/hackernews/package.json index 5314b60259ccd..a7ea4297ae75c 100644 --- a/examples/hackernews/package.json +++ b/examples/hackernews/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/node": "^8.2.5", - "astro": "^4.6.2" + "astro": "^4.6.3" } } diff --git a/examples/integration/package.json b/examples/integration/package.json index db06164601313..7121e8c347b50 100644 --- a/examples/integration/package.json +++ b/examples/integration/package.json @@ -15,7 +15,7 @@ ], "scripts": {}, "devDependencies": { - "astro": "^4.6.2" + "astro": "^4.6.3" }, "peerDependencies": { "astro": "^4.0.0" diff --git a/examples/middleware/package.json b/examples/middleware/package.json index 6c43007318d8e..1d84d858045d1 100644 --- a/examples/middleware/package.json +++ b/examples/middleware/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@astrojs/node": "^8.2.5", - "astro": "^4.6.2", + "astro": "^4.6.3", "html-minifier": "^4.0.0" }, "devDependencies": { diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 031742f2c721d..8b3a8dfedbc4d 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.6.2" + "astro": "^4.6.3" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index 777c3a6da4221..884f8d7591af8 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.6.2" + "astro": "^4.6.3" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index 3f03d77df483f..3af8adde6a830 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.6.2" + "astro": "^4.6.3" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index ba0c478bc0a0a..8ebd90fd163b2 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -14,7 +14,7 @@ "dependencies": { "@astrojs/node": "^8.2.5", "@astrojs/svelte": "^5.4.0", - "astro": "^4.6.2", + "astro": "^4.6.3", "svelte": "^4.2.5" } } diff --git a/examples/starlog/package.json b/examples/starlog/package.json index d6500f40680b0..0778ec8f8820c 100644 --- a/examples/starlog/package.json +++ b/examples/starlog/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.6.2", + "astro": "^4.6.3", "sass": "^1.69.5", "sharp": "^0.32.6" } diff --git a/examples/view-transitions/package.json b/examples/view-transitions/package.json index 2ef6379f89f22..61865cdee016b 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.6.2" + "astro": "^4.6.3" } } diff --git a/examples/with-markdoc/package.json b/examples/with-markdoc/package.json index b398a7ce4a643..085a5b1b93058 100644 --- a/examples/with-markdoc/package.json +++ b/examples/with-markdoc/package.json @@ -12,6 +12,6 @@ }, "dependencies": { "@astrojs/markdoc": "^0.10.0", - "astro": "^4.6.2" + "astro": "^4.6.3" } } diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 4c70d2970e140..095b2e5d69c28 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@astrojs/markdown-remark": "^5.1.0", - "astro": "^4.6.2", + "astro": "^4.6.3", "hast-util-select": "^6.0.2", "rehype-autolink-headings": "^7.1.0", "rehype-slug": "^6.0.0", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index 5e099595859c9..e06edaee9fe84 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^4.6.2" + "astro": "^4.6.3" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 68d15e5ff4a71..056c1ad1aa7fe 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/mdx": "^2.3.1", "@astrojs/preact": "^3.2.0", - "astro": "^4.6.2", + "astro": "^4.6.3", "preact": "^10.19.2" } } diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index c7194eef7a6d4..4c3093f01df08 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -13,7 +13,7 @@ "dependencies": { "@astrojs/preact": "^3.2.0", "@nanostores/preact": "^0.5.0", - "astro": "^4.6.2", + "astro": "^4.6.3", "nanostores": "^0.9.5", "preact": "^10.19.2" } diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index e4bf87d3126c8..b0322860f62f4 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -14,7 +14,7 @@ "@astrojs/mdx": "^2.3.1", "@astrojs/tailwind": "^5.1.0", "@types/canvas-confetti": "^1.6.3", - "astro": "^4.6.2", + "astro": "^4.6.3", "autoprefixer": "^10.4.15", "canvas-confetti": "^1.9.1", "postcss": "^8.4.28", diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 75bc03d3be534..34b915f6ae70d 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^4.6.2", + "astro": "^4.6.3", "vitest": "^1.3.1" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index 3156fd3b9dcce..2cf022a658246 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,17 @@ # astro +## 4.6.3 + +### Patch Changes + +- [#10799](https://github.com/withastro/astro/pull/10799) [`dc74afca9f5eebc2d61331298d6ef187d92051e0`](https://github.com/withastro/astro/commit/dc74afca9f5eebc2d61331298d6ef187d92051e0) Thanks [@martrapp](https://github.com/martrapp)! - Fixes an issue with persisted non-text input fields that have the focus during view transition navigation. + +- [#10773](https://github.com/withastro/astro/pull/10773) [`35e43ecdaae7adc4b9a0b974192a033568cfb3f0`](https://github.com/withastro/astro/commit/35e43ecdaae7adc4b9a0b974192a033568cfb3f0) Thanks [@lilnasy](https://github.com/lilnasy)! - Improves performance for frequent use of small components. + +- [#10763](https://github.com/withastro/astro/pull/10763) [`63132771373ce1510be3e8814897accc0bf62ef8`](https://github.com/withastro/astro/commit/63132771373ce1510be3e8814897accc0bf62ef8) Thanks [@matthewp](https://github.com/matthewp)! - Invalidate CC cache manifest when lockfile or config changes + +- [#10811](https://github.com/withastro/astro/pull/10811) [`77822a822b04b5113726f713df104e8667333c59`](https://github.com/withastro/astro/commit/77822a822b04b5113726f713df104e8667333c59) Thanks [@AvinashReddy3108](https://github.com/AvinashReddy3108)! - Update list of available integrations in the `astro add` CLI help. + ## 4.6.2 ### Patch Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index f0532b1df2e9b..154886d4d14f6 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "4.6.2", + "version": "4.6.3", "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/core/build/plugins/plugin-content.ts b/packages/astro/src/core/build/plugins/plugin-content.ts index ce11359d83253..24512f8ebc8e0 100644 --- a/packages/astro/src/core/build/plugins/plugin-content.ts +++ b/packages/astro/src/core/build/plugins/plugin-content.ts @@ -3,7 +3,6 @@ import fsMod from 'node:fs'; import { fileURLToPath } from 'node:url'; import pLimit from 'p-limit'; import { type Plugin as VitePlugin, normalizePath } from 'vite'; -import { configPaths } from '../../config/index.js'; import { CONTENT_RENDER_FLAG, PROPAGATED_ASSET_FLAG } from '../../../content/consts.js'; import { type ContentLookupMap, hasContentFlag } from '../../../content/utils.js'; import { @@ -11,16 +10,22 @@ import { generateLookupMap, } from '../../../content/vite-plugin-content-virtual-mod.js'; import { isServerLikeOutput } from '../../../prerender/utils.js'; -import { joinPaths, removeFileExtension, removeLeadingForwardSlash, appendForwardSlash } from '../../path.js'; +import { configPaths } from '../../config/index.js'; +import { emptyDir } from '../../fs/index.js'; +import { + appendForwardSlash, + joinPaths, + removeFileExtension, + removeLeadingForwardSlash, +} from '../../path.js'; import { addRollupInput } from '../add-rollup-input.js'; +import { CHUNKS_PATH } from '../consts.js'; import { type BuildInternals } from '../internal.js'; import type { AstroBuildPlugin } from '../plugin.js'; import { copyFiles } from '../static-build.js'; import type { StaticBuildOptions } from '../types.js'; import { encodeName } from '../util.js'; import { extendManualChunks } from './util.js'; -import { emptyDir } from '../../fs/index.js'; -import { CHUNKS_PATH } from '../consts.js'; const CONTENT_CACHE_DIR = './content/'; const CONTENT_MANIFEST_FILE = './manifest.json'; @@ -54,14 +59,21 @@ const resolvedVirtualEmptyModuleId = `\0${virtualEmptyModuleId}`; const NO_MANIFEST_VERSION = -1 as const; function createContentManifest(): ContentManifest { - return { version: NO_MANIFEST_VERSION, entries: [], serverEntries: [], clientEntries: [], lockfiles: "", configs: "" }; + return { + version: NO_MANIFEST_VERSION, + entries: [], + serverEntries: [], + clientEntries: [], + lockfiles: '', + configs: '', + }; } function vitePluginContent( opts: StaticBuildOptions, lookupMap: ContentLookupMap, internals: BuildInternals, - cachedBuildOutput: Array<{ cached: URL; dist: URL; }> + cachedBuildOutput: Array<{ cached: URL; dist: URL }> ): VitePlugin { const { config } = opts.settings; const { cacheDir } = config; @@ -93,11 +105,11 @@ function vitePluginContent( // If the manifest is valid, use the cached client entries as nothing has changed currentManifestState = manifestState(oldManifest, newManifest); - if(currentManifestState === 'valid') { + if (currentManifestState === 'valid') { internals.cachedClientEntries = oldManifest.clientEntries; } else { let logReason = ''; - switch(currentManifestState) { + switch (currentManifestState) { case 'config-mismatch': logReason = 'Astro config has changed'; break; @@ -133,8 +145,8 @@ function vitePluginContent( // Restores cached chunks and assets from the previous build // If the manifest state is not valid then it needs to rebuild everything // so don't do that in this case. - if(currentManifestState === 'valid') { - for(const { cached, dist } of cachedBuildOutput) { + if (currentManifestState === 'valid') { + for (const { cached, dist } of cachedBuildOutput) { if (fsMod.existsSync(cached)) { await copyFiles(cached, dist, true); } @@ -243,7 +255,7 @@ function vitePluginContent( const cacheExists = fsMod.existsSync(contentCacheDir); // If the manifest is invalid, empty the cache so that we can create a new one. - if(cacheExists && currentManifestState !== 'valid') { + if (cacheExists && currentManifestState !== 'valid') { emptyDir(contentCacheDir); } @@ -310,26 +322,32 @@ function getEntriesFromManifests( return entries; } -type ManifestState = 'valid' | 'no-manifest' | 'version-mismatch' | 'no-entries' | 'lockfile-mismatch' | 'config-mismatch'; +type ManifestState = + | 'valid' + | 'no-manifest' + | 'version-mismatch' + | 'no-entries' + | 'lockfile-mismatch' + | 'config-mismatch'; function manifestState(oldManifest: ContentManifest, newManifest: ContentManifest): ManifestState { // There isn't an existing manifest. - if(oldManifest.version === NO_MANIFEST_VERSION) { + if (oldManifest.version === NO_MANIFEST_VERSION) { return 'no-manifest'; } // Version mismatch, always invalid if (oldManifest.version !== newManifest.version) { return 'version-mismatch'; } - if(oldManifest.entries.length === 0) { + if (oldManifest.entries.length === 0) { return 'no-entries'; } // Lockfiles have changed or there is no lockfile at all. - if((oldManifest.lockfiles !== newManifest.lockfiles) || newManifest.lockfiles === '') { + if (oldManifest.lockfiles !== newManifest.lockfiles || newManifest.lockfiles === '') { return 'lockfile-mismatch'; } // Config has changed. - if(oldManifest.configs !== newManifest.configs) { + if (oldManifest.configs !== newManifest.configs) { return 'config-mismatch'; } return 'valid'; @@ -356,10 +374,10 @@ async function generateContentManifest( ); } } - + const [lockfiles, configs] = await Promise.all([ lockfilesHash(opts.settings.config.root), - configHash(opts.settings.config.root) + configHash(opts.settings.config.root), ]); manifest.lockfiles = lockfiles; @@ -385,7 +403,7 @@ async function lockfilesHash(root: URL) { const lockfiles = ['package-lock.json', 'pnpm-lock.yaml', 'yarn.lock', 'bun.lockb']; const datas: Uint8Array[] = []; const promises: Promise[] = []; - for(const lockfileName of lockfiles) { + for (const lockfileName of lockfiles) { const fileURL = new URL(`./${lockfileName}`, root); promises.push(pushBufferInto(fileURL, datas)); } @@ -395,7 +413,7 @@ async function lockfilesHash(root: URL) { async function configHash(root: URL) { const configFileNames = configPaths; - for(const configPath of configFileNames) { + for (const configPath of configFileNames) { try { const fileURL = new URL(`./${configPath}`, root); const data = await fsMod.promises.readFile(fileURL); @@ -411,7 +429,7 @@ async function configHash(root: URL) { function checksum(...datas: string[] | Uint8Array[]): string { const hash = createHash('sha1'); - datas.forEach(data => hash.update(data)); + datas.forEach((data) => hash.update(data)); return hash.digest('base64'); } @@ -458,7 +476,7 @@ export function pluginContent( return; } // Cache build output of chunks and assets - for(const { cached, dist } of cachedBuildOutput) { + for (const { cached, dist } of cachedBuildOutput) { if (fsMod.existsSync(dist)) { await copyFiles(dist, cached, true); } diff --git a/packages/astro/src/core/build/static-build.ts b/packages/astro/src/core/build/static-build.ts index ede0e36e35a41..cdd24e1c00536 100644 --- a/packages/astro/src/core/build/static-build.ts +++ b/packages/astro/src/core/build/static-build.ts @@ -23,6 +23,7 @@ import { PAGE_SCRIPT_ID } from '../../vite-plugin-scripts/index.js'; import { AstroError, AstroErrorData } from '../errors/index.js'; import { routeIsRedirect } from '../redirects/index.js'; import { getOutDirWithinCwd } from './common.js'; +import { CHUNKS_PATH } from './consts.js'; import { generatePages } from './generate.js'; import { trackPageData } from './internal.js'; import { type AstroBuildPluginContainer, createPluginContainer } from './plugin.js'; @@ -34,7 +35,6 @@ import { RESOLVED_SPLIT_MODULE_ID, RESOLVED_SSR_VIRTUAL_MODULE_ID } from './plug import { ASTRO_PAGE_EXTENSION_POST_PATTERN } from './plugins/util.js'; import type { StaticBuildOptions } from './types.js'; import { encodeName, getTimeStat, viteBuildReturnToRollupOutputs } from './util.js'; -import { CHUNKS_PATH } from './consts.js'; export async function viteBuild(opts: StaticBuildOptions) { const { allPages, settings } = opts; diff --git a/packages/astro/src/core/config/index.ts b/packages/astro/src/core/config/index.ts index 0f697ddd608d2..3beaa56635236 100644 --- a/packages/astro/src/core/config/index.ts +++ b/packages/astro/src/core/config/index.ts @@ -1,4 +1,10 @@ -export { configPaths, resolveConfig, resolveConfigPath, resolveFlags, resolveRoot } from './config.js'; +export { + configPaths, + resolveConfig, + resolveConfigPath, + resolveFlags, + resolveRoot, +} from './config.js'; export { createNodeLogger } from './logging.js'; export { mergeConfig } from './merge.js'; export type { AstroConfigType } from './schema.js'; diff --git a/packages/astro/src/integrations/index.ts b/packages/astro/src/integrations/index.ts index 7603f24a6065e..81901737e931c 100644 --- a/packages/astro/src/integrations/index.ts +++ b/packages/astro/src/integrations/index.ts @@ -480,7 +480,13 @@ type RunHookBuildDone = { cacheManifest: boolean; }; -export async function runHookBuildDone({ config, pages, routes, logging, cacheManifest }: RunHookBuildDone) { +export async function runHookBuildDone({ + config, + pages, + routes, + logging, + cacheManifest, +}: RunHookBuildDone) { const dir = isServerLikeOutput(config) ? config.build.client : config.outDir; await fs.promises.mkdir(dir, { recursive: true }); diff --git a/packages/astro/src/vite-plugin-astro/index.ts b/packages/astro/src/vite-plugin-astro/index.ts index c33f5dd0c768e..9d6367b99d0fe 100644 --- a/packages/astro/src/vite-plugin-astro/index.ts +++ b/packages/astro/src/vite-plugin-astro/index.ts @@ -92,13 +92,13 @@ export default function astro({ settings, logger }: AstroPluginOptions): vite.Pl if (!compileMetadata) { // If `compileMetadata` doesn't exist in dev, that means the virtual module may have been invalidated. // We try to re-compile the main Astro module (`filename`) first before retrieving the metadata again. - if(server) { + if (server) { const code = await loadId(server.pluginContainer, filename); // `compile` should re-set `filename` in `astroFileToCompileMetadata` if (code != null) await compile(code, filename); } // When cached we might load client-side scripts during the build - else if(config.experimental.contentCollectionCache) { + else if (config.experimental.contentCollectionCache) { await this.load({ id: filename, resolveDependencies: false, diff --git a/packages/astro/test/experimental-content-collections-cache-invalidation.test.js b/packages/astro/test/experimental-content-collections-cache-invalidation.test.js index 5ec688a91ba1a..abc8ea8393703 100644 --- a/packages/astro/test/experimental-content-collections-cache-invalidation.test.js +++ b/packages/astro/test/experimental-content-collections-cache-invalidation.test.js @@ -1,8 +1,8 @@ import assert from 'node:assert/strict'; -import { after, before, describe, it } from 'node:test'; -import { loadFixture } from './test-utils.js'; import fs from 'node:fs'; +import { after, before, describe, it } from 'node:test'; import { copyFiles } from '../dist/core/build/static-build.js'; +import { loadFixture } from './test-utils.js'; describe('Experimental Content Collections cache - invalidation', () => { class CacheBackup { @@ -32,27 +32,29 @@ describe('Experimental Content Collections cache - invalidation', () => { hooks: { 'astro:build:done': ({ cacheManifest }) => { this.used = cacheManifest; - } - } - } + }, + }, + }; } } describe('manifest version', () => { - let fixture, backup, - /** @type {ManifestTestPlugin} */ - testPlugin; + let fixture, + backup, + /** @type {ManifestTestPlugin} */ + testPlugin; before(async () => { testPlugin = new ManifestTestPlugin(); fixture = await loadFixture({ root: './fixtures/content-collections-cache-invalidation/', cacheDir: './cache/version-mismatch/', experimental: { contentCollectionCache: true }, - integrations: [ - testPlugin.plugin() - ] + integrations: [testPlugin.plugin()], }); - backup = new CacheBackup('./fixtures/content-collections-cache-invalidation/', './cache/version-mismatch/'); + backup = new CacheBackup( + './fixtures/content-collections-cache-invalidation/', + './cache/version-mismatch/' + ); backup.backup(); await fixture.build(); }); @@ -68,20 +70,22 @@ describe('Experimental Content Collections cache - invalidation', () => { }); describe('lockfiles', () => { - let fixture, backup, - /** @type {ManifestTestPlugin} */ - testPlugin; + let fixture, + backup, + /** @type {ManifestTestPlugin} */ + testPlugin; before(async () => { testPlugin = new ManifestTestPlugin(); fixture = await loadFixture({ root: './fixtures/content-collections-cache-invalidation/', cacheDir: './cache/lockfile-mismatch/', experimental: { contentCollectionCache: true }, - integrations: [ - testPlugin.plugin() - ] + integrations: [testPlugin.plugin()], }); - backup = new CacheBackup('./fixtures/content-collections-cache-invalidation/', './cache/lockfile-mismatch/'); + backup = new CacheBackup( + './fixtures/content-collections-cache-invalidation/', + './cache/lockfile-mismatch/' + ); backup.backup(); await fixture.build(); }); diff --git a/packages/db/CHANGELOG.md b/packages/db/CHANGELOG.md index e7087ef74c5bf..b909fffe0aac1 100644 --- a/packages/db/CHANGELOG.md +++ b/packages/db/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/db +## 0.10.5 + +### Patch Changes + +- [#10789](https://github.com/withastro/astro/pull/10789) [`d4c91cb10924a0627a9e9a80bc549b3c82d043e6`](https://github.com/withastro/astro/commit/d4c91cb10924a0627a9e9a80bc549b3c82d043e6) Thanks [@NickDubelman](https://github.com/NickDubelman)! - Expose the Drizzle `alias` utility from `astro:db` to enable self-joins on a table. + ## 0.10.4 ### Patch Changes diff --git a/packages/db/package.json b/packages/db/package.json index d4e56e19bf959..074fdcb81dd36 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/db", - "version": "0.10.4", + "version": "0.10.5", "description": "Add libSQL and Astro Studio support to your Astro site", "license": "MIT", "repository": { diff --git a/packages/integrations/sitemap/CHANGELOG.md b/packages/integrations/sitemap/CHANGELOG.md index 9df35d31f53f1..3ed7fa219bd79 100644 --- a/packages/integrations/sitemap/CHANGELOG.md +++ b/packages/integrations/sitemap/CHANGELOG.md @@ -1,5 +1,11 @@ # @astrojs/sitemap +## 3.1.4 + +### Patch Changes + +- [#10772](https://github.com/withastro/astro/pull/10772) [`0e22462d1534afc8f7bb6782f86db680c7a5f245`](https://github.com/withastro/astro/commit/0e22462d1534afc8f7bb6782f86db680c7a5f245) Thanks [@gislerro](https://github.com/gislerro)! - Fixes an issue where the root url does not follow the `trailingSlash` config option + ## 3.1.3 ### Patch Changes diff --git a/packages/integrations/sitemap/package.json b/packages/integrations/sitemap/package.json index cdff0a8aab999..b9b6ed24fcea4 100644 --- a/packages/integrations/sitemap/package.json +++ b/packages/integrations/sitemap/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/sitemap", "description": "Generate a sitemap for your Astro site", - "version": "3.1.3", + "version": "3.1.4", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 95d3b4649a382..6b6cc11abef61 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -134,7 +134,7 @@ importers: examples/basics: dependencies: astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/blog: @@ -146,16 +146,16 @@ importers: specifier: ^4.0.5 version: link:../../packages/astro-rss '@astrojs/sitemap': - specifier: ^3.1.3 + specifier: ^3.1.4 version: link:../../packages/integrations/sitemap astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/component: devDependencies: astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/framework-alpine: @@ -170,7 +170,7 @@ importers: specifier: ^3.13.3 version: 3.13.8 astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/framework-lit: @@ -182,7 +182,7 @@ importers: specifier: ^0.2.1 version: 0.2.1 astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro lit: specifier: ^3.1.2 @@ -212,7 +212,7 @@ importers: specifier: ^18.2.15 version: 18.2.25 astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -242,7 +242,7 @@ importers: specifier: ^1.2.1 version: 1.2.1(preact@10.20.2) astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -260,7 +260,7 @@ importers: specifier: ^18.2.15 version: 18.2.25 astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro react: specifier: ^18.2.0 @@ -275,7 +275,7 @@ importers: specifier: ^4.1.0 version: link:../../packages/integrations/solid astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro solid-js: specifier: ^1.8.5 @@ -287,7 +287,7 @@ importers: specifier: ^5.4.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -299,7 +299,7 @@ importers: specifier: ^4.1.0 version: link:../../packages/integrations/vue astro: - specifier: ^4.6.2 + specifier: ^4.6.3 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.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/integration: devDependencies: astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/middleware: @@ -326,7 +326,7 @@ importers: specifier: ^8.2.5 version: link:../../packages/integrations/node astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro html-minifier: specifier: ^4.0.0 @@ -339,19 +339,19 @@ importers: examples/minimal: dependencies: astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/non-html-pages: dependencies: astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/portfolio: dependencies: astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/ssr: @@ -363,7 +363,7 @@ importers: specifier: ^5.4.0 version: link:../../packages/integrations/svelte astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro svelte: specifier: ^4.2.5 @@ -372,7 +372,7 @@ importers: examples/starlog: dependencies: astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro sass: specifier: ^1.69.5 @@ -390,7 +390,7 @@ importers: specifier: ^5.1.0 version: link:../../packages/integrations/tailwind astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/with-markdoc: @@ -399,7 +399,7 @@ importers: specifier: ^0.10.0 version: link:../../packages/integrations/markdoc astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/with-markdown-plugins: @@ -408,7 +408,7 @@ importers: specifier: ^5.1.0 version: link:../../packages/markdown/remark astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro hast-util-select: specifier: ^6.0.2 @@ -429,7 +429,7 @@ importers: examples/with-markdown-shiki: dependencies: astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro examples/with-mdx: @@ -441,7 +441,7 @@ importers: specifier: ^3.2.0 version: link:../../packages/integrations/preact astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro preact: specifier: ^10.19.2 @@ -456,7 +456,7 @@ importers: specifier: ^0.5.0 version: 0.5.1(nanostores@0.9.5)(preact@10.20.2) astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro nanostores: specifier: ^0.9.5 @@ -477,7 +477,7 @@ importers: specifier: ^1.6.3 version: 1.6.4 astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro autoprefixer: specifier: ^10.4.15 @@ -495,7 +495,7 @@ importers: examples/with-vitest: dependencies: astro: - specifier: ^4.6.2 + specifier: ^4.6.3 version: link:../../packages/astro vitest: specifier: ^1.3.1