@astrojs/compiler 0.10.1 → 0.11.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 +26 -0
- package/astro.wasm +0 -0
- package/browser/index.js +1 -7
- package/browser/wasm_exec.d.ts +29 -1
- package/browser/wasm_exec.js +249 -192
- package/node/index.js +1 -7
- package/node/wasm_exec.d.ts +29 -1
- package/node/wasm_exec.js +270 -207
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,31 @@
|
|
|
1
1
|
# @astrojs/compiler
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- f5d4006: Switch from TinyGo to Go's built-in WASM output. While this is an unfortunate size increase for our `.wasm` file, it should also be significantly more stable and cut down on hard-to-reproduce bugs.
|
|
8
|
+
|
|
9
|
+
Please see https://github.com/withastro/compiler/pull/291 for more details.
|
|
10
|
+
|
|
11
|
+
## 0.11.0-next--wasm.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 9212ccc: Switch from TinyGo to Go's built-in WASM output. While this is an unfortunate size increase for our `WASM` file, it should also be significantly more stable and cut down on hard-to-reproduce bugs.
|
|
16
|
+
|
|
17
|
+
Please see https://github.com/withastro/compiler/pull/291 for more details.
|
|
18
|
+
|
|
19
|
+
## 0.10.2
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- 7f7c65c: Fix conditional rendering for special elements like `iframe` and `noscript`
|
|
24
|
+
- 9d789c9: Fix handling of nested template literals inside of expressions
|
|
25
|
+
- 5fa9e53: Fix handling of special characters inside of expressions
|
|
26
|
+
- 8aaa956: Formalize support for magic `data-astro-raw` attribute with new, official `is:raw` directive
|
|
27
|
+
- c698350: Improve MathML support. `{}` inside of `<math>` is now treated as raw text rather than an expression construct.
|
|
28
|
+
|
|
3
29
|
## 0.10.1
|
|
4
30
|
|
|
5
31
|
### Patch Changes
|
package/astro.wasm
CHANGED
|
Binary file
|
package/browser/index.js
CHANGED
|
@@ -43,13 +43,7 @@ const startRunningService = async (wasmURL) => {
|
|
|
43
43
|
const go = new Go();
|
|
44
44
|
const wasm = await instantiateWASM(wasmURL, go.importObject);
|
|
45
45
|
go.run(wasm.instance);
|
|
46
|
-
const
|
|
47
|
-
const service = Object.create(null);
|
|
48
|
-
for (const key of apiKeys.values()) {
|
|
49
|
-
const globalKey = `__astro_${key}`;
|
|
50
|
-
service[key] = globalThis[globalKey];
|
|
51
|
-
delete globalThis[globalKey];
|
|
52
|
-
}
|
|
46
|
+
const service = globalThis['@astrojs/compiler'];
|
|
53
47
|
longLivedService = {
|
|
54
48
|
transform: (input, options) => new Promise((resolve) => resolve(service.transform(input, options || {}))),
|
|
55
49
|
};
|
package/browser/wasm_exec.d.ts
CHANGED
|
@@ -1,5 +1,33 @@
|
|
|
1
1
|
export default class Go {
|
|
2
|
-
importObject:
|
|
2
|
+
importObject: {
|
|
3
|
+
go: {
|
|
4
|
+
'runtime.wasmExit': (sp: any) => void;
|
|
5
|
+
'runtime.wasmWrite': (sp: any) => void;
|
|
6
|
+
'runtime.resetMemoryDataView': (sp: any) => void;
|
|
7
|
+
'runtime.nanotime1': (sp: any) => void;
|
|
8
|
+
'runtime.walltime': (sp: any) => void;
|
|
9
|
+
'runtime.scheduleTimeoutEvent': (sp: any) => void;
|
|
10
|
+
'runtime.clearTimeoutEvent': (sp: any) => void;
|
|
11
|
+
'runtime.getRandomData': (sp: any) => void;
|
|
12
|
+
'syscall/js.finalizeRef': (sp: any) => void;
|
|
13
|
+
'syscall/js.stringVal': (sp: any) => void;
|
|
14
|
+
'syscall/js.valueGet': (sp: any) => void;
|
|
15
|
+
'syscall/js.valueSet': (sp: any) => void;
|
|
16
|
+
'syscall/js.valueDelete': (sp: any) => void;
|
|
17
|
+
'syscall/js.valueIndex': (sp: any) => void;
|
|
18
|
+
'syscall/js.valueSetIndex': (sp: any) => void;
|
|
19
|
+
'syscall/js.valueCall': (sp: any) => void;
|
|
20
|
+
'syscall/js.valueInvoke': (sp: any) => void;
|
|
21
|
+
'syscall/js.valueNew': (sp: any) => void;
|
|
22
|
+
'syscall/js.valueLength': (sp: any) => void;
|
|
23
|
+
'syscall/js.valuePrepareString': (sp: any) => void;
|
|
24
|
+
'syscall/js.valueLoadString': (sp: any) => void;
|
|
25
|
+
'syscall/js.valueInstanceOf': (sp: any) => void;
|
|
26
|
+
'syscall/js.copyBytesToGo': (sp: any) => void;
|
|
27
|
+
'syscall/js.copyBytesToJS': (sp: any) => void;
|
|
28
|
+
debug: (value: any) => void;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
3
31
|
constructor();
|
|
4
32
|
run(instance: any): Promise<void>;
|
|
5
33
|
private _resume;
|