@astrojs/compiler 0.31.3 → 0.32.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @astrojs/compiler
2
2
 
3
+ ## 0.32.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 2404848: Remove `pathname` option in favour of `sourcefile` option
8
+ - 2ca86f6: Remove `site` and `projectRoot` options in favour of the `astroGlobalArgs` option
9
+ - edd3e0e: Merge `sourcefile` and `moduleId` options as a single `filename` option. Add a new `normalizedFilename` option to generate stable hashes instead.
10
+ - 08843bd: Remove `experimentalStaticExtraction` option. It is now the default.
11
+
12
+ ## 0.31.4
13
+
14
+ ### Patch Changes
15
+
16
+ - 960b853: Rename `SerializeOtions` interface to `SerializeOptions`
17
+ - fcab891: Fixes export hoisting edge case
18
+ - 47de01a: Handle module IDs containing quotes
19
+
3
20
  ## 0.31.3
4
21
 
5
22
  ### Patch Changes
@@ -66,7 +83,7 @@
66
83
 
67
84
  ### Patch Changes
68
85
 
69
- - ec745f4: Self-closing tags will now retreive "end" positional data
86
+ - ec745f4: Self-closing tags will now retrieve "end" positional data
70
87
  - a6c2822: Fix a few TSX output errors
71
88
 
72
89
  ## 0.29.15
@@ -164,7 +181,7 @@
164
181
 
165
182
  ### Minor Changes
166
183
 
167
- - fd2fc28: Fix some utf8 compatability issues
184
+ - fd2fc28: Fix some utf8 compatibility issues
168
185
 
169
186
  ### Patch Changes
170
187
 
@@ -344,7 +361,7 @@
344
361
 
345
362
  - a28c3d8: Fix handling of unbalanced quotes in expression attributes
346
363
  - 28d1d4d: Fix handling of TS generics inside of expressions
347
- - 356d3b6: Prevent wraping module scripts with scope
364
+ - 356d3b6: Prevent wrapping module scripts with scope
348
365
 
349
366
  ## 0.22.1
350
367
 
package/README.md CHANGED
@@ -23,8 +23,7 @@ The Astro compiler can convert `.astro` syntax to a TypeScript Module whose defa
23
23
  import { transform } from '@astrojs/compiler';
24
24
 
25
25
  const result = await transform(source, {
26
- site: 'https://mysite.dev',
27
- sourcefile: '/Users/astro/Code/project/src/pages/index.astro',
26
+ filename: '/Users/astro/Code/project/src/pages/index.astro',
28
27
  sourcemap: 'both',
29
28
  internalURL: 'astro/runtime/server/index.js',
30
29
  });
package/astro.wasm CHANGED
Binary file
@@ -19,7 +19,9 @@ export declare const is: {
19
19
  frontmatter: (node: Node) => node is FrontmatterNode;
20
20
  };
21
21
  export declare function walk(node: ParentNode, callback: Visitor): void;
22
- export interface SerializeOtions {
22
+ export interface SerializeOptions {
23
23
  selfClose: boolean;
24
24
  }
25
- export declare function serialize(root: Node, opts?: SerializeOtions): string;
25
+ /** @deprecated Please use `SerializeOptions` */
26
+ export declare type SerializeOtions = SerializeOptions;
27
+ export declare function serialize(root: Node, opts?: SerializeOptions): string;
package/node/utils.d.ts CHANGED
@@ -19,7 +19,9 @@ export declare const is: {
19
19
  frontmatter: (node: Node) => node is FrontmatterNode;
20
20
  };
21
21
  export declare function walk(node: ParentNode, callback: Visitor): void;
22
- export interface SerializeOtions {
22
+ export interface SerializeOptions {
23
23
  selfClose: boolean;
24
24
  }
25
- export declare function serialize(root: Node, opts?: SerializeOtions): string;
25
+ /** @deprecated Please use `SerializeOptions` */
26
+ export declare type SerializeOtions = SerializeOptions;
27
+ export declare function serialize(root: Node, opts?: SerializeOptions): string;
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "bugs": "https://github.com/withastro/compiler/issues",
7
7
  "homepage": "https://astro.build",
8
- "version": "0.31.3",
8
+ "version": "0.32.0",
9
9
  "main": "./node/index.js",
10
10
  "types": "./node",
11
11
  "repository": {
package/shared/types.d.ts CHANGED
@@ -33,20 +33,17 @@ export interface DiagnosticLocation {
33
33
  }
34
34
  export interface TransformOptions {
35
35
  internalURL?: string;
36
- site?: string;
37
- sourcefile?: string;
38
- pathname?: string;
39
- moduleId?: string;
36
+ filename?: string;
37
+ normalizedFilename?: string;
40
38
  sourcemap?: boolean | 'inline' | 'external' | 'both';
39
+ astroGlobalArgs?: string;
41
40
  compact?: boolean;
42
41
  /**
43
42
  * @deprecated "as" has been removed and no longer has any effect!
44
43
  */
45
44
  as?: 'document' | 'fragment';
46
- projectRoot?: string;
47
45
  resolvePath?: (specifier: string) => Promise<string>;
48
46
  preprocessStyle?: (content: string, attrs: Record<string, string>) => null | Promise<PreprocessorResult | PreprocessorError>;
49
- experimentalStaticExtraction?: boolean;
50
47
  }
51
48
  export declare type HoistedScript = {
52
49
  type: string;
@@ -1,6 +0,0 @@
1
- <Fragment>
2
- {/** prettier-ignore */}<li />
3
-
4
- </Fragment>
5
- export default function Index__AstroComponent_(_props: Record<string, any>): any {}
6
- //# sourceMappingURL=data:application/json;charset=utf-8;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiaW5kZXguYXN0cm8iXSwKICAic291cmNlc0NvbnRlbnQiOiBbIlxuXHUwMDNjIS0tIHByZXR0aWVyLWlnbm9yZSAtLVx1MDAzZVxuXHUwMDNjbGkgL1x1MDAzZVxuIl0sCiAgIm1hcHBpbmdzIjogIkFBQUEsQUFBQTtBQUFBLElBQ0ksQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxBQURwQixJQUVBLENBQUMsRUFBRSxDQUFDLEVBQUU7QUFDTixBQUhBO0FBQUE7IiwKICAibmFtZXMiOiBbXQp9