astro 2.4.0 → 2.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/config.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  type ViteUserConfig = import('vite').UserConfig;
2
2
  type ViteUserConfigFn = import('vite').UserConfigFn;
3
3
  type AstroUserConfig = import('./dist/@types/astro.js').AstroUserConfig;
4
+ type ImageServiceConfig = import('./dist/@types/astro.js').ImageServiceConfig;
4
5
 
5
6
  /**
6
7
  * See the full Astro Configuration API Documentation
@@ -12,3 +13,14 @@ export function defineConfig(config: AstroUserConfig): AstroUserConfig;
12
13
  * Use Astro to generate a fully resolved Vite config
13
14
  */
14
15
  export function getViteConfig(config: ViteUserConfig): ViteUserConfigFn;
16
+
17
+ /**
18
+ * Return the configuration needed to use the Sharp-based image service
19
+ * See: https://docs.astro.build/en/guides/assets/#using-sharp
20
+ */
21
+ export function sharpImageService(): ImageServiceConfig;
22
+
23
+ /**
24
+ * Return the configuration needed to use the Squoosh-based image service
25
+ */
26
+ export function squooshImageService(): ImageServiceConfig;
package/config.mjs CHANGED
@@ -1 +1,15 @@
1
1
  export { defineConfig, getViteConfig } from './dist/config/index.js';
2
+
3
+ export function sharpImageService() {
4
+ return {
5
+ entrypoint: 'astro/assets/services/sharp',
6
+ config: {},
7
+ };
8
+ }
9
+
10
+ export function squooshImageService() {
11
+ return {
12
+ entrypoint: 'astro/assets/services/squoosh',
13
+ config: {},
14
+ };
15
+ }
@@ -460,8 +460,8 @@ export interface AstroUserConfig {
460
460
  * @name scopedStyleStrategy
461
461
  * @type {('where' | 'class')}
462
462
  * @default `'where'`
463
- * @description
464
463
  * @version 2.4
464
+ * @description
465
465
  *
466
466
  * Specify the strategy used for scoping styles within Astro components. Choose from:
467
467
  * - `'where'` - Use `:where` selectors, causing no specifity increase.
@@ -1,8 +1,5 @@
1
- import type { ImageServiceConfig } from '../@types/astro.js';
2
1
  export { getConfiguredImageService, getImage } from './internal.js';
3
2
  export { baseService, isLocalService } from './services/service.js';
4
3
  export { type LocalImageProps, type RemoteImageProps } from './types.js';
5
4
  export { emitESMImage } from './utils/emitAsset.js';
6
5
  export { imageMetadata } from './utils/metadata.js';
7
- export declare function sharpImageService(): ImageServiceConfig;
8
- export declare function squooshImageService(): ImageServiceConfig;
@@ -3,25 +3,11 @@ import { baseService, isLocalService } from "./services/service.js";
3
3
  import {} from "./types.js";
4
4
  import { emitESMImage } from "./utils/emitAsset.js";
5
5
  import { imageMetadata } from "./utils/metadata.js";
6
- function sharpImageService() {
7
- return {
8
- entrypoint: "astro/assets/services/sharp",
9
- config: {}
10
- };
11
- }
12
- function squooshImageService() {
13
- return {
14
- entrypoint: "astro/assets/services/squoosh",
15
- config: {}
16
- };
17
- }
18
6
  export {
19
7
  baseService,
20
8
  emitESMImage,
21
9
  getConfiguredImageService,
22
10
  getImage,
23
11
  imageMetadata,
24
- isLocalService,
25
- sharpImageService,
26
- squooshImageService
12
+ isLocalService
27
13
  };
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "2.4.0";
1
+ const ASTRO_VERSION = "2.4.1";
2
2
  const SUPPORTED_MARKDOWN_FILE_EXTENSIONS = [
3
3
  ".markdown",
4
4
  ".mdown",
@@ -53,7 +53,7 @@ async function dev(settings, options) {
53
53
  isRestart: options.isRestart
54
54
  })
55
55
  );
56
- const currentVersion = "2.4.0";
56
+ const currentVersion = "2.4.1";
57
57
  if (currentVersion.includes("-")) {
58
58
  warn(options.logging, null, msg.prerelease({ currentVersion }));
59
59
  }
@@ -47,7 +47,7 @@ function serverStart({
47
47
  base,
48
48
  isRestart = false
49
49
  }) {
50
- const version = "2.4.0";
50
+ const version = "2.4.1";
51
51
  const localPrefix = `${dim("\u2503")} Local `;
52
52
  const networkPrefix = `${dim("\u2503")} Network `;
53
53
  const emptyPrefix = " ".repeat(11);
@@ -233,7 +233,7 @@ function printHelp({
233
233
  message.push(
234
234
  linebreak(),
235
235
  ` ${bgGreen(black(` ${commandName} `))} ${green(
236
- `v${"2.4.0"}`
236
+ `v${"2.4.1"}`
237
237
  )} ${headline}`
238
238
  );
239
239
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "Astro is a modern site builder with web best practices, performance, and DX front-of-mind.",
5
5
  "type": "module",
6
6
  "author": "withastro",