diff --git a/.changeset/khaki-ghosts-fry.md b/.changeset/khaki-ghosts-fry.md deleted file mode 100644 index d2c7f64701..0000000000 --- a/.changeset/khaki-ghosts-fry.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@astrojs/image': patch ---- - -Fixes a bug in dev when `` is used for a local image with no transformations diff --git a/.changeset/seven-shrimps-hope.md b/.changeset/seven-shrimps-hope.md deleted file mode 100644 index 6b154e42f2..0000000000 --- a/.changeset/seven-shrimps-hope.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -'@astrojs/image': minor ---- - -Adds caching support for transformed images :tada: - -Local images will be cached for 1 year and invalidated when the original image file is changed. - -Remote images will be cached based on the `fetch()` response's cache headers, similar to how a CDN would manage the cache. - -**cacheDir** - -By default, transformed images will be cached to `./node_modules/.astro/image`. This can be configured in the integration's config options. - -``` -export default defineConfig({ - integrations: [image({ - // may be useful if your hosting provider allows caching between CI builds - cacheDir: "./.cache/image" - })] -}); -``` - -Caching can also be disabled by using `cacheDir: false`. diff --git a/.changeset/thirty-crabs-shout.md b/.changeset/thirty-crabs-shout.md deleted file mode 100644 index 4c44ed672e..0000000000 --- a/.changeset/thirty-crabs-shout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'astro': patch ---- - -Fix module definition of Markdown and MDX files not being available outside Astro files diff --git a/examples/basics/package.json b/examples/basics/package.json index 0082bedcd2..90e20654c4 100644 --- a/examples/basics/package.json +++ b/examples/basics/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0" + "astro": "^1.4.1" } } diff --git a/examples/blog/package.json b/examples/blog/package.json index bfbe56214f..3126c0e41f 100644 --- a/examples/blog/package.json +++ b/examples/blog/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "@astrojs/mdx": "^0.11.3", "@astrojs/rss": "^1.0.2", "@astrojs/sitemap": "^1.0.0" diff --git a/examples/component/package.json b/examples/component/package.json index 6a28473470..74f7d2288f 100644 --- a/examples/component/package.json +++ b/examples/component/package.json @@ -15,9 +15,9 @@ ], "scripts": {}, "devDependencies": { - "astro": "^1.4.0" + "astro": "^1.4.1" }, "peerDependencies": { - "astro": "^1.4.0" + "astro": "^1.4.1" } } diff --git a/examples/deno/package.json b/examples/deno/package.json index 41a055731d..d8b09f797c 100644 --- a/examples/deno/package.json +++ b/examples/deno/package.json @@ -10,7 +10,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0" + "astro": "^1.4.1" }, "devDependencies": { "@astrojs/deno": "^1.1.0" diff --git a/examples/docs/package.json b/examples/docs/package.json index d7d9af6a6b..e183986500 100644 --- a/examples/docs/package.json +++ b/examples/docs/package.json @@ -12,7 +12,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "preact": "^10.7.3", "react": "^18.1.0", "react-dom": "^18.1.0", diff --git a/examples/framework-alpine/package.json b/examples/framework-alpine/package.json index cd5e04cf20..74a9093e88 100644 --- a/examples/framework-alpine/package.json +++ b/examples/framework-alpine/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "alpinejs": "^3.10.2", "@astrojs/alpinejs": "^0.1.2", "@types/alpinejs": "^3.7.0" diff --git a/examples/framework-lit/package.json b/examples/framework-lit/package.json index 0e49c033e9..8850454fe3 100644 --- a/examples/framework-lit/package.json +++ b/examples/framework-lit/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "lit": "^2.2.5", "@astrojs/lit": "^1.0.0", "@webcomponents/template-shadowroot": "^0.1.0" diff --git a/examples/framework-multiple/package.json b/examples/framework-multiple/package.json index 45610e43eb..b50741a43b 100644 --- a/examples/framework-multiple/package.json +++ b/examples/framework-multiple/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "preact": "^10.7.3", "react": "^18.1.0", "react-dom": "^18.1.0", diff --git a/examples/framework-preact/package.json b/examples/framework-preact/package.json index 5b5c9a7706..9bd41e6007 100644 --- a/examples/framework-preact/package.json +++ b/examples/framework-preact/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "preact": "^10.7.3", "@astrojs/preact": "^1.1.1" } diff --git a/examples/framework-react/package.json b/examples/framework-react/package.json index 5afe78aae7..5a4d1a80fb 100644 --- a/examples/framework-react/package.json +++ b/examples/framework-react/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "react": "^18.1.0", "react-dom": "^18.1.0", "@astrojs/react": "^1.1.4", diff --git a/examples/framework-solid/package.json b/examples/framework-solid/package.json index b57e02652b..1d384fa9b2 100644 --- a/examples/framework-solid/package.json +++ b/examples/framework-solid/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "solid-js": "^1.4.3", "@astrojs/solid-js": "^1.1.0" } diff --git a/examples/framework-svelte/package.json b/examples/framework-svelte/package.json index 8559b478ca..de469e9978 100644 --- a/examples/framework-svelte/package.json +++ b/examples/framework-svelte/package.json @@ -13,6 +13,6 @@ "dependencies": { "svelte": "^3.48.0", "@astrojs/svelte": "^1.0.1", - "astro": "^1.4.0" + "astro": "^1.4.1" } } diff --git a/examples/framework-vue/package.json b/examples/framework-vue/package.json index d118ef6b72..685467c6bc 100644 --- a/examples/framework-vue/package.json +++ b/examples/framework-vue/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "vue": "^3.2.37", "@astrojs/vue": "^1.1.0" } diff --git a/examples/minimal/package.json b/examples/minimal/package.json index 5f33ea1bfd..61b69725cc 100644 --- a/examples/minimal/package.json +++ b/examples/minimal/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0" + "astro": "^1.4.1" } } diff --git a/examples/non-html-pages/package.json b/examples/non-html-pages/package.json index d6fd174940..ec83505658 100644 --- a/examples/non-html-pages/package.json +++ b/examples/non-html-pages/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0" + "astro": "^1.4.1" } } diff --git a/examples/portfolio/package.json b/examples/portfolio/package.json index befa4ea914..3b25c52786 100644 --- a/examples/portfolio/package.json +++ b/examples/portfolio/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0" + "astro": "^1.4.1" } } diff --git a/examples/ssr/package.json b/examples/ssr/package.json index c76e0a298f..4e6f09818d 100644 --- a/examples/ssr/package.json +++ b/examples/ssr/package.json @@ -13,7 +13,7 @@ }, "devDependencies": {}, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "svelte": "^3.48.0", "@astrojs/svelte": "^1.0.1", "@astrojs/node": "^1.1.0", diff --git a/examples/with-markdown-plugins/package.json b/examples/with-markdown-plugins/package.json index 0ceb18116e..4fd67914d2 100644 --- a/examples/with-markdown-plugins/package.json +++ b/examples/with-markdown-plugins/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "@astrojs/markdown-remark": "^1.1.3", "hast-util-select": "5.0.1", "rehype-autolink-headings": "^6.1.1", diff --git a/examples/with-markdown-shiki/package.json b/examples/with-markdown-shiki/package.json index b77a0952ac..f8f2d184cc 100644 --- a/examples/with-markdown-shiki/package.json +++ b/examples/with-markdown-shiki/package.json @@ -11,6 +11,6 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0" + "astro": "^1.4.1" } } diff --git a/examples/with-mdx/package.json b/examples/with-mdx/package.json index 007ac78751..921a8b08ee 100644 --- a/examples/with-mdx/package.json +++ b/examples/with-mdx/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "preact": "^10.6.5", "@astrojs/preact": "^1.1.1", "@astrojs/mdx": "^0.11.3" diff --git a/examples/with-nanostores/package.json b/examples/with-nanostores/package.json index 9f26095c38..fc784a00c2 100644 --- a/examples/with-nanostores/package.json +++ b/examples/with-nanostores/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "preact": "^10.7.3", "@astrojs/preact": "^1.1.1", "nanostores": "^0.5.12", diff --git a/examples/with-tailwindcss/package.json b/examples/with-tailwindcss/package.json index 726ef6f51c..82361b2561 100644 --- a/examples/with-tailwindcss/package.json +++ b/examples/with-tailwindcss/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "@astrojs/tailwind": "^2.0.2", "autoprefixer": "^10.4.7", "canvas-confetti": "^1.5.1", diff --git a/examples/with-vite-plugin-pwa/package.json b/examples/with-vite-plugin-pwa/package.json index b70cd2f2f1..1dec2cef95 100644 --- a/examples/with-vite-plugin-pwa/package.json +++ b/examples/with-vite-plugin-pwa/package.json @@ -11,7 +11,7 @@ "astro": "astro" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "vite-plugin-pwa": "0.11.11", "workbox-window": "^6.5.3" } diff --git a/examples/with-vitest/package.json b/examples/with-vitest/package.json index 0e67ff0cad..78739c00f8 100644 --- a/examples/with-vitest/package.json +++ b/examples/with-vitest/package.json @@ -12,7 +12,7 @@ "test": "vitest" }, "dependencies": { - "astro": "^1.4.0", + "astro": "^1.4.1", "vitest": "^0.20.3" } } diff --git a/packages/astro/CHANGELOG.md b/packages/astro/CHANGELOG.md index ee6ba106c4..924a5209e5 100644 --- a/packages/astro/CHANGELOG.md +++ b/packages/astro/CHANGELOG.md @@ -1,5 +1,11 @@ # astro +## 1.4.1 + +### Patch Changes + +- [#4928](https://github.com/withastro/astro/pull/4928) [`7690849a8`](https://github.com/withastro/astro/commit/7690849a87a7e192e28119211b75446ddbbc2ae3) Thanks [@Princesseuh](https://github.com/Princesseuh)! - Fix module definition of Markdown and MDX files not being available outside Astro files + ## 1.4.0 ### Minor Changes diff --git a/packages/astro/package.json b/packages/astro/package.json index 31e9473d94..f0744685d2 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -1,6 +1,6 @@ { "name": "astro", - "version": "1.4.0", + "version": "1.4.1", "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/integrations/image/CHANGELOG.md b/packages/integrations/image/CHANGELOG.md index 7a8bcc07b4..d6608e42c8 100644 --- a/packages/integrations/image/CHANGELOG.md +++ b/packages/integrations/image/CHANGELOG.md @@ -1,5 +1,34 @@ # @astrojs/image +## 0.9.0 + +### Minor Changes + +- [#4909](https://github.com/withastro/astro/pull/4909) [`989298961`](https://github.com/withastro/astro/commit/9892989619770f310eed3398dd2cbc98be469afd) Thanks [@tony-sull](https://github.com/tony-sull)! - Adds caching support for transformed images :tada: + + Local images will be cached for 1 year and invalidated when the original image file is changed. + + Remote images will be cached based on the `fetch()` response's cache headers, similar to how a CDN would manage the cache. + + **cacheDir** + + By default, transformed images will be cached to `./node_modules/.astro/image`. This can be configured in the integration's config options. + + ``` + export default defineConfig({ + integrations: [image({ + // may be useful if your hosting provider allows caching between CI builds + cacheDir: "./.cache/image" + })] + }); + ``` + + Caching can also be disabled by using `cacheDir: false`. + +### Patch Changes + +- [#4933](https://github.com/withastro/astro/pull/4933) [`64a1d712e`](https://github.com/withastro/astro/commit/64a1d712efd3cc80c0b9aed9f2ead1487f8db07b) Thanks [@tony-sull](https://github.com/tony-sull)! - Fixes a bug in dev when `` is used for a local image with no transformations + ## 0.8.1 ### Patch Changes diff --git a/packages/integrations/image/package.json b/packages/integrations/image/package.json index dd6ce68a30..be28b6baaf 100644 --- a/packages/integrations/image/package.json +++ b/packages/integrations/image/package.json @@ -1,7 +1,7 @@ { "name": "@astrojs/image", "description": "Load and transform images in your Astro site.", - "version": "0.8.1", + "version": "0.9.0", "type": "module", "types": "./dist/index.d.ts", "author": "withastro", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bd98feb0f6..a25d9fea17 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -58,7 +58,7 @@ importers: examples/basics: specifiers: - astro: ^1.4.0 + astro: ^1.4.1 dependencies: astro: link:../../packages/astro @@ -67,7 +67,7 @@ importers: '@astrojs/mdx': ^0.11.3 '@astrojs/rss': ^1.0.2 '@astrojs/sitemap': ^1.0.0 - astro: ^1.4.0 + astro: ^1.4.1 dependencies: '@astrojs/mdx': link:../../packages/integrations/mdx '@astrojs/rss': link:../../packages/astro-rss @@ -76,14 +76,14 @@ importers: examples/component: specifiers: - astro: ^1.4.0 + astro: ^1.4.1 devDependencies: astro: link:../../packages/astro examples/deno: specifiers: '@astrojs/deno': ^1.1.0 - astro: ^1.4.0 + astro: ^1.4.1 dependencies: astro: link:../../packages/astro devDependencies: @@ -99,7 +99,7 @@ importers: '@types/node': ^18.0.0 '@types/react': ^17.0.45 '@types/react-dom': ^18.0.0 - astro: ^1.4.0 + astro: ^1.4.1 preact: ^10.7.3 react: ^18.1.0 react-dom: ^18.1.0 @@ -122,7 +122,7 @@ importers: '@astrojs/alpinejs': ^0.1.2 '@types/alpinejs': ^3.7.0 alpinejs: ^3.10.2 - astro: ^1.4.0 + astro: ^1.4.1 dependencies: '@astrojs/alpinejs': link:../../packages/integrations/alpinejs '@types/alpinejs': 3.7.0 @@ -133,7 +133,7 @@ importers: specifiers: '@astrojs/lit': ^1.0.0 '@webcomponents/template-shadowroot': ^0.1.0 - astro: ^1.4.0 + astro: ^1.4.1 lit: ^2.2.5 dependencies: '@astrojs/lit': link:../../packages/integrations/lit @@ -148,7 +148,7 @@ importers: '@astrojs/solid-js': ^1.1.0 '@astrojs/svelte': ^1.0.1 '@astrojs/vue': ^1.1.0 - astro: ^1.4.0 + astro: ^1.4.1 preact: ^10.7.3 react: ^18.1.0 react-dom: ^18.1.0 @@ -172,7 +172,7 @@ importers: examples/framework-preact: specifiers: '@astrojs/preact': ^1.1.1 - astro: ^1.4.0 + astro: ^1.4.1 preact: ^10.7.3 dependencies: '@astrojs/preact': link:../../packages/integrations/preact @@ -184,7 +184,7 @@ importers: '@astrojs/react': ^1.1.4 '@types/react': ^18.0.10 '@types/react-dom': ^18.0.5 - astro: ^1.4.0 + astro: ^1.4.1 react: ^18.1.0 react-dom: ^18.1.0 dependencies: @@ -198,7 +198,7 @@ importers: examples/framework-solid: specifiers: '@astrojs/solid-js': ^1.1.0 - astro: ^1.4.0 + astro: ^1.4.1 solid-js: ^1.4.3 dependencies: '@astrojs/solid-js': link:../../packages/integrations/solid @@ -208,7 +208,7 @@ importers: examples/framework-svelte: specifiers: '@astrojs/svelte': ^1.0.1 - astro: ^1.4.0 + astro: ^1.4.1 svelte: ^3.48.0 dependencies: '@astrojs/svelte': link:../../packages/integrations/svelte @@ -218,7 +218,7 @@ importers: examples/framework-vue: specifiers: '@astrojs/vue': ^1.1.0 - astro: ^1.4.0 + astro: ^1.4.1 vue: ^3.2.37 dependencies: '@astrojs/vue': link:../../packages/integrations/vue @@ -227,19 +227,19 @@ importers: examples/minimal: specifiers: - astro: ^1.4.0 + astro: ^1.4.1 dependencies: astro: link:../../packages/astro examples/non-html-pages: specifiers: - astro: ^1.4.0 + astro: ^1.4.1 dependencies: astro: link:../../packages/astro examples/portfolio: specifiers: - astro: ^1.4.0 + astro: ^1.4.1 dependencies: astro: link:../../packages/astro @@ -247,7 +247,7 @@ importers: specifiers: '@astrojs/node': ^1.1.0 '@astrojs/svelte': ^1.0.1 - astro: ^1.4.0 + astro: ^1.4.1 concurrently: ^7.2.1 lightcookie: ^1.0.25 svelte: ^3.48.0 @@ -266,7 +266,7 @@ importers: examples/with-markdown-plugins: specifiers: '@astrojs/markdown-remark': ^1.1.3 - astro: ^1.4.0 + astro: ^1.4.1 hast-util-select: 5.0.1 rehype-autolink-headings: ^6.1.1 rehype-slug: ^5.0.1 @@ -283,7 +283,7 @@ importers: examples/with-markdown-shiki: specifiers: - astro: ^1.4.0 + astro: ^1.4.1 dependencies: astro: link:../../packages/astro @@ -291,7 +291,7 @@ importers: specifiers: '@astrojs/mdx': ^0.11.3 '@astrojs/preact': ^1.1.1 - astro: ^1.4.0 + astro: ^1.4.1 preact: ^10.6.5 dependencies: '@astrojs/mdx': link:../../packages/integrations/mdx @@ -303,7 +303,7 @@ importers: specifiers: '@astrojs/preact': ^1.1.1 '@nanostores/preact': ^0.1.3 - astro: ^1.4.0 + astro: ^1.4.1 nanostores: ^0.5.12 preact: ^10.7.3 dependencies: @@ -316,7 +316,7 @@ importers: examples/with-tailwindcss: specifiers: '@astrojs/tailwind': ^2.0.2 - astro: ^1.4.0 + astro: ^1.4.1 autoprefixer: ^10.4.7 canvas-confetti: ^1.5.1 postcss: ^8.4.14 @@ -331,7 +331,7 @@ importers: examples/with-vite-plugin-pwa: specifiers: - astro: ^1.4.0 + astro: ^1.4.1 vite-plugin-pwa: 0.11.11 workbox-window: ^6.5.3 dependencies: @@ -341,7 +341,7 @@ importers: examples/with-vitest: specifiers: - astro: ^1.4.0 + astro: ^1.4.1 vitest: ^0.20.3 dependencies: astro: link:../../packages/astro