@astrojs/compiler 0.31.4 → 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 +9 -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,14 @@
|
|
|
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
|
+
|
|
3
12
|
## 0.31.4
|
|
4
13
|
|
|
5
14
|
### 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;
|