@astrojs/compiler 0.31.4 → 0.33.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 +21 -0
- package/README.md +1 -2
- package/astro.wasm +0 -0
- package/browser/utils.d.ts +2 -0
- package/node/utils.d.ts +2 -0
- package/package.json +1 -1
- package/shared/types.d.ts +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @astrojs/compiler
|
|
2
2
|
|
|
3
|
+
## 0.33.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1adac72: Improve error recovery when using the `transform` function. The compiler will now properly reject the promise with a useful message and stacktrace rather than print internal errors to stdout.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 68d3c0c: Fix edge case where `export type` could hang the compiler
|
|
12
|
+
- ec1ddf0: Handle edge case with TypeScript generics handling and our TSX output
|
|
13
|
+
- 23d1fc0: Ignore trailing whitespace in components
|
|
14
|
+
|
|
15
|
+
## 0.32.0
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- 2404848: Remove `pathname` option in favour of `sourcefile` option
|
|
20
|
+
- 2ca86f6: Remove `site` and `projectRoot` options in favour of the `astroGlobalArgs` option
|
|
21
|
+
- edd3e0e: Merge `sourcefile` and `moduleId` options as a single `filename` option. Add a new `normalizedFilename` option to generate stable hashes instead.
|
|
22
|
+
- 08843bd: Remove `experimentalStaticExtraction` option. It is now the default.
|
|
23
|
+
|
|
3
24
|
## 0.31.4
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
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
|
-
|
|
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
|
package/browser/utils.d.ts
CHANGED
|
@@ -22,4 +22,6 @@ export declare function walk(node: ParentNode, callback: Visitor): void;
|
|
|
22
22
|
export interface SerializeOptions {
|
|
23
23
|
selfClose: boolean;
|
|
24
24
|
}
|
|
25
|
+
/** @deprecated Please use `SerializeOptions` */
|
|
26
|
+
export declare type SerializeOtions = SerializeOptions;
|
|
25
27
|
export declare function serialize(root: Node, opts?: SerializeOptions): string;
|
package/node/utils.d.ts
CHANGED
|
@@ -22,4 +22,6 @@ export declare function walk(node: ParentNode, callback: Visitor): void;
|
|
|
22
22
|
export interface SerializeOptions {
|
|
23
23
|
selfClose: boolean;
|
|
24
24
|
}
|
|
25
|
+
/** @deprecated Please use `SerializeOptions` */
|
|
26
|
+
export declare type SerializeOtions = SerializeOptions;
|
|
25
27
|
export declare function serialize(root: Node, opts?: SerializeOptions): string;
|
package/package.json
CHANGED
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
|
-
|
|
37
|
-
|
|
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;
|