@astrojs/compiler 0.9.2 → 0.11.0-next--wasm.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,39 @@
1
1
  # @astrojs/compiler
2
2
 
3
+ ## 0.11.0-next--wasm.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 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.
8
+
9
+ Please see https://github.com/withastro/compiler/pull/291 for more details.
10
+
11
+ ## 0.10.2
12
+
13
+ ### Patch Changes
14
+
15
+ - 7f7c65c: Fix conditional rendering for special elements like `iframe` and `noscript`
16
+ - 9d789c9: Fix handling of nested template literals inside of expressions
17
+ - 5fa9e53: Fix handling of special characters inside of expressions
18
+ - 8aaa956: Formalize support for magic `data-astro-raw` attribute with new, official `is:raw` directive
19
+ - c698350: Improve MathML support. `{}` inside of `<math>` is now treated as raw text rather than an expression construct.
20
+
21
+ ## 0.10.1
22
+
23
+ ### Patch Changes
24
+
25
+ - 38ae39a: Add support for `set:html` and `set:text` directives, as designed in the [`set:html` RFC](https://github.com/withastro/rfcs/blob/main/active-rfcs/0000-set-html.md).
26
+
27
+ ## 0.10.0
28
+
29
+ ### Minor Changes
30
+
31
+ - 02d41a8: Adds support for `Astro.self` (as accepted in the [Recursive Components RFC](https://github.com/withastro/rfcs/blob/main/active-rfcs/0000-recursive-components.md)).
32
+
33
+ ### Patch Changes
34
+
35
+ - 4fe522b: Fixes inclusion of define:vars scripts/styles using the StaticExtraction flag
36
+
3
37
  ## 0.9.2
4
38
 
5
39
  ### 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 apiKeys = new Set(['transform']);
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
  };
@@ -1,5 +1,33 @@
1
1
  export default class Go {
2
- importObject: Record<string, any>;
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;