@astrojs/compiler 0.2.9 → 0.2.13
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 +24 -0
- package/astro.wasm +0 -0
- package/package.json +1 -1
- package/test/visible.test.mjs +41 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @astrojs/compiler
|
|
2
2
|
|
|
3
|
+
## 0.2.13
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- f262b61: Fix for string template usage within expressions
|
|
8
|
+
|
|
9
|
+
## 0.2.12
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- c9fa9eb: Fix for apostrophe within elements
|
|
14
|
+
|
|
15
|
+
## 0.2.11
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- 27629b2: Reverts the apostrophe change that broke markdown parsing
|
|
20
|
+
|
|
21
|
+
## 0.2.10
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- 57eb728: Fixes hydrated scripts not recognized when using fragment transformation
|
|
26
|
+
|
|
3
27
|
## 0.2.9
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/astro.wasm
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* eslint-disable no-console */
|
|
2
|
+
|
|
3
|
+
import { transform } from '@astrojs/compiler';
|
|
4
|
+
|
|
5
|
+
const sleep = (ms) => new Promise((res) => setTimeout(res, ms));
|
|
6
|
+
|
|
7
|
+
async function run() {
|
|
8
|
+
|
|
9
|
+
let i = 0;
|
|
10
|
+
const result = await transform(
|
|
11
|
+
`---
|
|
12
|
+
import ThemeToggleButton from './ThemeToggleButton.tsx';
|
|
13
|
+
---
|
|
14
|
+
<style>
|
|
15
|
+
body {
|
|
16
|
+
background: blue;
|
|
17
|
+
}
|
|
18
|
+
</style>
|
|
19
|
+
<div>
|
|
20
|
+
<ThemeToggleButton client:visible />
|
|
21
|
+
</div>`,
|
|
22
|
+
{
|
|
23
|
+
sourcemap: true,
|
|
24
|
+
as: 'fragment',
|
|
25
|
+
site: undefined,
|
|
26
|
+
sourcefile: 'MoreMenu.astro',
|
|
27
|
+
sourcemap: 'both',
|
|
28
|
+
internalURL: 'astro/internal',
|
|
29
|
+
preprocessStyle: async (value, attrs) => {
|
|
30
|
+
return null;
|
|
31
|
+
},
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
// test
|
|
36
|
+
if(!result.code.includes(`{ modules: [{ module: $$module1, specifier: './ThemeToggleButton.tsx' }], hydratedComponents: [ThemeToggleButton], hoisted: [] }`)) {
|
|
37
|
+
throw new Error('Hydrated components not included');
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
await run();
|