astro 1.4.0 → 1.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/client-base.d.ts CHANGED
@@ -1,5 +1,39 @@
1
1
  /// <reference path="./import-meta.d.ts" />
2
2
 
3
+ declare module '*.md' {
4
+ type MD = import('./dist/@types/astro').MarkdownInstance<Record<string, any>>;
5
+
6
+ export const frontmatter: MD['frontmatter'];
7
+ export const file: MD['file'];
8
+ export const url: MD['url'];
9
+ export const getHeadings: MD['getHeadings'];
10
+ /** @deprecated Renamed to `getHeadings()` */
11
+ export const getHeaders: () => void;
12
+ export const Content: MD['Content'];
13
+ export const rawContent: MD['rawContent'];
14
+ export const compiledContent: MD['compiledContent'];
15
+
16
+ const load: MD['default'];
17
+ export default load;
18
+ }
19
+
20
+ declare module '*.mdx' {
21
+ type MDX = import('./dist/@types/astro').MDXInstance<Record<string, any>>;
22
+
23
+ export const frontmatter: MDX['frontmatter'];
24
+ export const file: MDX['file'];
25
+ export const url: MDX['url'];
26
+ export const getHeadings: MDX['getHeadings'];
27
+ export const Content: MDX['Content'];
28
+ export const rawContent: MDX['rawContent'];
29
+ export const compiledContent: MDX['compiledContent'];
30
+
31
+ const load: MDX['default'];
32
+ export default load;
33
+ }
34
+
35
+ // Everything below are Vite's types (apart from image types, which are in `client.d.ts`)
36
+
3
37
  // CSS modules
4
38
  type CSSModuleClasses = { readonly [key: string]: string };
5
39
 
@@ -46,7 +46,7 @@ async function dev(settings, options) {
46
46
  isRestart
47
47
  })
48
48
  );
49
- const currentVersion = "1.4.0";
49
+ const currentVersion = "1.4.1";
50
50
  if (currentVersion.includes("-")) {
51
51
  warn(options.logging, null, msg.prerelease({ currentVersion }));
52
52
  }
@@ -47,7 +47,7 @@ function serverStart({
47
47
  site,
48
48
  isRestart = false
49
49
  }) {
50
- const version = "1.4.0";
50
+ const version = "1.4.1";
51
51
  const rootPath = site ? site.pathname : "/";
52
52
  const localPrefix = `${dim("\u2503")} Local `;
53
53
  const networkPrefix = `${dim("\u2503")} Network `;
@@ -250,7 +250,7 @@ function printHelp({
250
250
  message.push(
251
251
  linebreak(),
252
252
  ` ${bgGreen(black(` ${commandName} `))} ${green(
253
- `v${"1.4.0"}`
253
+ `v${"1.4.1"}`
254
254
  )} ${headline}`
255
255
  );
256
256
  }
package/dist/core/util.js CHANGED
@@ -5,7 +5,7 @@ import resolve from "resolve";
5
5
  import slash from "slash";
6
6
  import { fileURLToPath, pathToFileURL } from "url";
7
7
  import { prependForwardSlash, removeTrailingForwardSlash } from "./path.js";
8
- const ASTRO_VERSION = "1.4.0";
8
+ const ASTRO_VERSION = "1.4.1";
9
9
  function isObject(value) {
10
10
  return typeof value === "object" && value != null;
11
11
  }
@@ -1,4 +1,4 @@
1
- const ASTRO_VERSION = "1.4.0";
1
+ const ASTRO_VERSION = "1.4.1";
2
2
  function createDeprecatedFetchContentFn() {
3
3
  return () => {
4
4
  throw new Error("Deprecated: Astro.fetchContent() has been replaced with Astro.glob().");
package/env.d.ts CHANGED
@@ -1,8 +1,13 @@
1
1
  /// <reference path="./client.d.ts" />
2
2
 
3
+ // Caution! The types here are only available inside Astro files (injected automatically by our language server)
4
+ // As such, if the typings you're trying to add should be available inside ex: React components, they should instead
5
+ // be inside `client-base.d.ts`
6
+
3
7
  type Astro = import('./dist/@types/astro').AstroGlobal;
4
8
 
5
- // We duplicate the description here because editors won't show the JSDoc comment from the imported type (but will for its properties, ex: Astro.request will show the AstroGlobal.request description)
9
+ // We have to duplicate the description here because editors won't show the JSDoc comment from the imported type
10
+ // However, they will for its properties, ex: Astro.request will show the AstroGlobal.request description
6
11
  /**
7
12
  * Astro global available in all contexts in .astro files
8
13
  *
@@ -12,38 +17,6 @@ declare const Astro: Readonly<Astro>;
12
17
 
13
18
  declare const Fragment: any;
14
19
 
15
- declare module '*.md' {
16
- type MD = import('./dist/@types/astro').MarkdownInstance<Record<string, any>>;
17
-
18
- export const frontmatter: MD['frontmatter'];
19
- export const file: MD['file'];
20
- export const url: MD['url'];
21
- export const getHeadings: MD['getHeadings'];
22
- /** @deprecated Renamed to `getHeadings()` */
23
- export const getHeaders: () => void;
24
- export const Content: MD['Content'];
25
- export const rawContent: MD['rawContent'];
26
- export const compiledContent: MD['compiledContent'];
27
-
28
- const load: MD['default'];
29
- export default load;
30
- }
31
-
32
- declare module '*.mdx' {
33
- type MDX = import('./dist/@types/astro').MDXInstance<Record<string, any>>;
34
-
35
- export const frontmatter: MDX['frontmatter'];
36
- export const file: MDX['file'];
37
- export const url: MDX['url'];
38
- export const getHeadings: MDX['getHeadings'];
39
- export const Content: MDX['Content'];
40
- export const rawContent: MDX['rawContent'];
41
- export const compiledContent: MDX['compiledContent'];
42
-
43
- const load: MDX['default'];
44
- export default load;
45
- }
46
-
47
20
  declare module '*.html' {
48
21
  const Component: { render(opts: { slots: Record<string, string> }): string };
49
22
  export default Component;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro",
3
- "version": "1.4.0",
3
+ "version": "1.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",