diff --git a/.changeset/sweet-zoos-serve.md b/.changeset/sweet-zoos-serve.md new file mode 100644 index 0000000000000..72fb9d6a6c890 --- /dev/null +++ b/.changeset/sweet-zoos-serve.md @@ -0,0 +1,6 @@ +--- +"@astrojs/tailwind": patch +"@astrojs/turbolinks": patch +--- + +Make Tailwind & Turbolinks integration descriptions more consistent diff --git a/packages/astro/package.json b/packages/astro/package.json index 07c621d7b3814..23410941c7d27 100644 --- a/packages/astro/package.json +++ b/packages/astro/package.json @@ -93,7 +93,7 @@ "scripts": { "prebuild": "astro-scripts prebuild --to-string \"src/runtime/server/astro-island.ts\" \"src/runtime/client/{idle,load,media,only,visible}.ts\"", "build": "pnpm run prebuild && astro-scripts build \"src/**/*.ts\" && tsc && pnpm run postbuild", - "build:ci": "pnpm run prebuild && astro-scripts build \"src/**/*.ts\"", + "build:ci": "pnpm run prebuild && astro-scripts build \"src/**/*.ts\" && pnpm run postbuild", "dev": "astro-scripts dev --copy-wasm --prebuild \"src/runtime/server/astro-island.ts\" --prebuild \"src/runtime/client/{idle,load,media,only,visible}.ts\" \"src/**/*.ts\"", "postbuild": "astro-scripts copy \"src/**/*.astro\" && astro-scripts copy \"src/**/*.wasm\"", "test:unit": "mocha --exit --timeout 30000 ./test/units/**/*.test.js", diff --git a/packages/astro/src/assets/utils/metadata.ts b/packages/astro/src/assets/utils/metadata.ts index 8cf0cc4708920..fa6bb9e10f945 100644 --- a/packages/astro/src/assets/utils/metadata.ts +++ b/packages/astro/src/assets/utils/metadata.ts @@ -1,4 +1,3 @@ -import sizeOf from 'image-size'; import fs from 'node:fs/promises'; import { fileURLToPath } from 'node:url'; import { ImageMetadata, InputFormat } from '../types.js'; @@ -7,10 +6,14 @@ export interface Metadata extends ImageMetadata { orientation?: number; } +let sizeOf: typeof import('image-size').default | undefined; export async function imageMetadata( src: URL | string, data?: Buffer ): Promise { + if (!sizeOf) { + sizeOf = await import('image-size').then((mod) => mod.default); + } let file = data; if (!file) { try { @@ -20,7 +23,7 @@ export async function imageMetadata( } } - const { width, height, type, orientation } = await sizeOf(file); + const { width, height, type, orientation } = await sizeOf!(file); const isPortrait = (orientation || 0) >= 5; if (!width || !height || !type) { diff --git a/packages/integrations/tailwind/package.json b/packages/integrations/tailwind/package.json index 8801c41093cd1..497d0864087fc 100644 --- a/packages/integrations/tailwind/package.json +++ b/packages/integrations/tailwind/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/tailwind", - "description": "Tailwind + Astro Integrations", + "description": "Use Tailwind CSS to style your Astro site", "version": "3.1.0", "type": "module", "types": "./dist/index.d.ts", diff --git a/packages/integrations/turbolinks/package.json b/packages/integrations/turbolinks/package.json index 3d48348b2e428..5ed79680d2ce8 100644 --- a/packages/integrations/turbolinks/package.json +++ b/packages/integrations/turbolinks/package.json @@ -1,6 +1,6 @@ { "name": "@astrojs/turbolinks", - "description": "Turbolinks + Astro Integrations", + "description": "Deprecated — Use Turbolinks to speed up page navigation in your Astro site", "version": "0.2.0", "type": "module", "types": "./dist/index.d.ts",