@astrojs/compiler 0.0.0-head-bubbling-20230214204529

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 ADDED
@@ -0,0 +1,1218 @@
1
+ # @astrojs/compiler
2
+
3
+ ## 0.0.0-head-bubbling-20230214204529
4
+
5
+ ### Minor Changes
6
+
7
+ - 6b0757c: Implements opt-in head bubbling
8
+
9
+ ### Patch Changes
10
+
11
+ - 6765f01: Fix attributes starting with : not being properly transformed in the TSX output
12
+
13
+ ## 1.1.0
14
+
15
+ ### Minor Changes
16
+
17
+ - a75824d: Allow passing through result to slot call
18
+
19
+ ## 1.0.2
20
+
21
+ ### Patch Changes
22
+
23
+ - 0c27f3f: Collapse multiple trailing text nodes if present
24
+
25
+ ## 1.0.1
26
+
27
+ ### Patch Changes
28
+
29
+ - 94b2c02: Prevent insertion of maybeRenderHead on hoisted scripts
30
+
31
+ ## 1.0.0
32
+
33
+ ### Major Changes
34
+
35
+ - 8e86bc6: The Astro compiler is officially stable! This release is entirely ceremonial, the code is the same as [`@astrojs/compiler@0.33.0`](https://github.com/withastro/compiler/releases/tag/%40astrojs%2Fcompiler%400.33.0)
36
+
37
+ ## 0.33.0
38
+
39
+ ### Minor Changes
40
+
41
+ - 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.
42
+
43
+ ### Patch Changes
44
+
45
+ - 68d3c0c: Fix edge case where `export type` could hang the compiler
46
+ - ec1ddf0: Handle edge case with TypeScript generics handling and our TSX output
47
+ - 23d1fc0: Ignore trailing whitespace in components
48
+
49
+ ## 0.32.0
50
+
51
+ ### Minor Changes
52
+
53
+ - 2404848: Remove `pathname` option in favour of `sourcefile` option
54
+ - 2ca86f6: Remove `site` and `projectRoot` options in favour of the `astroGlobalArgs` option
55
+ - edd3e0e: Merge `sourcefile` and `moduleId` options as a single `filename` option. Add a new `normalizedFilename` option to generate stable hashes instead.
56
+ - 08843bd: Remove `experimentalStaticExtraction` option. It is now the default.
57
+
58
+ ## 0.31.4
59
+
60
+ ### Patch Changes
61
+
62
+ - 960b853: Rename `SerializeOtions` interface to `SerializeOptions`
63
+ - fcab891: Fixes export hoisting edge case
64
+ - 47de01a: Handle module IDs containing quotes
65
+
66
+ ## 0.31.3
67
+
68
+ ### Patch Changes
69
+
70
+ - fd5cb57: Rollback https://github.com/withastro/compiler/pull/674
71
+
72
+ ## 0.31.2
73
+
74
+ ### Patch Changes
75
+
76
+ - 89c0cee: fix: corner case that component in head expression will case body tag missing
77
+ - 20497f4: Improve fidelity of sourcemaps for frontmatter
78
+
79
+ ## 0.31.1
80
+
81
+ ### Patch Changes
82
+
83
+ - 24dcf7e: Allow `script` and `style` before HTML
84
+ - ef391fa: fix: corner case with slot expression in head will cause body tag missing
85
+
86
+ ## 0.31.0
87
+
88
+ ### Minor Changes
89
+
90
+ - abdddeb: Update Go to 1.19
91
+
92
+ ## 0.30.1
93
+
94
+ ### Patch Changes
95
+
96
+ - ff9e7ba: Fix edge case where `<` was not handled properly inside of expressions
97
+ - f31d535: Fix edge case with Prop detection for TSX output
98
+
99
+ ## 0.30.0
100
+
101
+ ### Minor Changes
102
+
103
+ - 963aaab: Provide the moduleId of the astro component
104
+
105
+ ## 0.29.19
106
+
107
+ ### Patch Changes
108
+
109
+ - 3365233: Replace internal tokenizer state logs with proper warnings
110
+
111
+ ## 0.29.18
112
+
113
+ ### Patch Changes
114
+
115
+ - 80de395: fix: avoid nil pointer dereference in table parsing
116
+ - aa3ad9d: Fix `parse` output to properly account for the location of self-closing tags
117
+ - b89dec4: Internally, replace `astro.ParseFragment` in favor of `astro.ParseFragmentWithOptions`. We now check whether an error handler is passed when calling `astro.ParseFragmentWithOptions`
118
+
119
+ ## 0.29.17
120
+
121
+ ### Patch Changes
122
+
123
+ - 1e7e098: Add warning for invalid spread attributes
124
+ - 3cc6f55: Fix handling of unterminated template literal attributes
125
+ - 48c5677: Update default `internalURL` to `astro/runtime/server/index.js`
126
+ - 2893f33: Fix a number of `table` and `expression` related bugs
127
+
128
+ ## 0.29.16
129
+
130
+ ### Patch Changes
131
+
132
+ - ec745f4: Self-closing tags will now retrieve "end" positional data
133
+ - a6c2822: Fix a few TSX output errors
134
+
135
+ ## 0.29.15
136
+
137
+ ### Patch Changes
138
+
139
+ - 5f6e69b: Fix expression literal handling
140
+
141
+ ## 0.29.14
142
+
143
+ ### Patch Changes
144
+
145
+ - 6ff1d80: Fix regression introduced by https://github.com/withastro/compiler/pull/617
146
+
147
+ ## 0.29.13
148
+
149
+ ### Patch Changes
150
+
151
+ - 8f3e488: Fix regression introduced to `parse` handling in the last patch
152
+
153
+ ## 0.29.12
154
+
155
+ ### Patch Changes
156
+
157
+ - a41982a: Fix expression edge cases, improve literal parsing
158
+
159
+ ## 0.29.11
160
+
161
+ ### Patch Changes
162
+
163
+ - ee907f1: Fix #5308, duplicate style bug when using `define:vars`
164
+
165
+ ## 0.29.10
166
+
167
+ ### Patch Changes
168
+
169
+ - 07a65df: Print `\r` when printing TSX output
170
+ - 1250d0b: Add warning when `define:vars` won't work because of compilation limitations
171
+
172
+ ## 0.29.9
173
+
174
+ ### Patch Changes
175
+
176
+ - 1fe92c0: Fix TSX sourcemaps on Windows (take 4)
177
+
178
+ ## 0.29.8
179
+
180
+ ### Patch Changes
181
+
182
+ - 01b62ea: Fix sourcemap bug on Windows (again x2)
183
+
184
+ ## 0.29.7
185
+
186
+ ### Patch Changes
187
+
188
+ - 108c6c9: Fix TSX sourcemap bug on Windows (again)
189
+
190
+ ## 0.29.6
191
+
192
+ ### Patch Changes
193
+
194
+ - 4b3fafa: Fix TSX sourcemaps on Windows
195
+
196
+ ## 0.29.5
197
+
198
+ ### Patch Changes
199
+
200
+ - 73a2b69: Use an IIFE for define:vars scripts
201
+
202
+ ## 0.29.4
203
+
204
+ ### Patch Changes
205
+
206
+ - 4381efa: Return proper diagnostic code for warnings
207
+
208
+ ## 0.29.3
209
+
210
+ ### Patch Changes
211
+
212
+ - 85e1d31: AST: move `start` position of elements to the first index of their opening tag
213
+
214
+ ## 0.29.2
215
+
216
+ ### Patch Changes
217
+
218
+ - 035829b: AST: move end position of elements to the last index of their end tag
219
+
220
+ ## 0.29.1
221
+
222
+ ### Patch Changes
223
+
224
+ - a99c014: Ensure comment and text nodes have end positions when generating an AST from `parse`
225
+
226
+ ## 0.29.0
227
+
228
+ ### Minor Changes
229
+
230
+ - fd2fc28: Fix some utf8 compatibility issues
231
+
232
+ ### Patch Changes
233
+
234
+ - 4b68670: TSX: fix edge case with spread attribute printing
235
+ - 6b204bd: Fix bug with trailing `style` tags being moved into the `html` element
236
+ - 66fe230: Fix: include element end location in `parse` AST
237
+
238
+ ## 0.28.1
239
+
240
+ ### Patch Changes
241
+
242
+ - aac8c89: Fix end tag sourcemappings for TSX mode
243
+ - d7f3288: TSX: Improve self-closing tag behavior and mappings
244
+ - 75dd7cc: Fix spread attribute mappings
245
+
246
+ ## 0.28.0
247
+
248
+ ### Minor Changes
249
+
250
+ - 5da0dc2: Add `resolvePath` option to control hydration path resolution
251
+ - e816a61: Remove metadata export if `resolvePath` option provided
252
+
253
+ ## 0.27.2
254
+
255
+ ### Patch Changes
256
+
257
+ - 959f96b: Fix "missing sourcemap" issue
258
+ - 94f6f3e: Fix edge case with multi-line comment usage
259
+ - 85a654a: Fix `parse` causing a compiler panic when a component with a client directive was imported but didn't have a matching import
260
+ - 5e32cbe: Improvements to TSX output
261
+
262
+ ## 0.27.1
263
+
264
+ ### Patch Changes
265
+
266
+ - cc9f174: fixed regression caused by #546
267
+
268
+ ## 0.27.0
269
+
270
+ ### Minor Changes
271
+
272
+ - c770e7b: The compiler will now return `diagnostics` and unique error codes to be handled by the consumer. For example:
273
+
274
+ ```js
275
+ import type { DiagnosticSeverity, DiagnosticCode } from '@astrojs/compiler/types';
276
+ import { transform } from '@astrojs/compiler';
277
+
278
+ async function run() {
279
+ const { diagnostics } = await transform(file, opts);
280
+
281
+ function log(severity: DiagnosticSeverity, message: string) {
282
+ switch (severity) {
283
+ case DiagnosticSeverity.Error:
284
+ return console.error(message);
285
+ case DiagnosticSeverity.Warning:
286
+ return console.warn(message);
287
+ case DiagnosticSeverity.Information:
288
+ return console.info(message);
289
+ case DiagnosticSeverity.Hint:
290
+ return console.info(message);
291
+ }
292
+ }
293
+
294
+ for (const diagnostic of diagnostics) {
295
+ let message = diagnostic.text;
296
+ if (diagnostic.hint) {
297
+ message += `\n\n[hint] ${diagnostic.hint}`;
298
+ }
299
+
300
+ // Or customize messages for a known DiagnosticCode
301
+ if (diagnostic.code === DiagnosticCode.ERROR_UNMATCHED_IMPORT) {
302
+ message = `My custom message about an unmatched import!`;
303
+ }
304
+ log(diagnostic.severity, message);
305
+ }
306
+ }
307
+ ```
308
+
309
+ ### Patch Changes
310
+
311
+ - 0b24c24: Implement automatic typing for Astro.props in the TSX output
312
+
313
+ ## 0.26.1
314
+
315
+ ### Patch Changes
316
+
317
+ - 920898c: Handle edge case with `noscript` tags
318
+ - 8ee78a6: handle slots that contains the head element
319
+ - 244e43e: Do not hoist import inside object
320
+ - b8cd954: Fix edge case with line comments and export hoisting
321
+ - 52ebfb7: Fix parse/tsx output to gracefully handle invalid HTML (style outside of body, etc)
322
+ - 884efc6: Fix edge case with multi-line export hoisting
323
+
324
+ ## 0.26.0
325
+
326
+ ### Minor Changes
327
+
328
+ - 0be58ab: Improve sourcemap support for TSX output
329
+
330
+ ### Patch Changes
331
+
332
+ - e065e29: Prevent head injection from removing script siblings
333
+
334
+ ## 0.25.2
335
+
336
+ ### Patch Changes
337
+
338
+ - 3a51b8e: Ensure that head injection occurs if there is only a hoisted script
339
+
340
+ ## 0.25.1
341
+
342
+ ### Patch Changes
343
+
344
+ - 41fae67: Do not scope empty style blocks
345
+ - 1ab8280: fix(#517): fix edge case with TypeScript transform
346
+ - a3678f9: Fix import.meta.env usage above normal imports
347
+
348
+ ## 0.25.0
349
+
350
+ ### Minor Changes
351
+
352
+ - 6446ea3: Make Astro styles being printed after user imports
353
+
354
+ ### Patch Changes
355
+
356
+ - 51bc60f: Fix edge cases with `getStaticPaths` where valid JS syntax was improperly handled
357
+
358
+ ## 0.24.0
359
+
360
+ ### Minor Changes
361
+
362
+ - 6ebcb4f: Allow preprocessStyle to return an error
363
+
364
+ ### Patch Changes
365
+
366
+ - abda605: Include filename when calculating scope
367
+
368
+ ## 0.23.5
369
+
370
+ ### Patch Changes
371
+
372
+ - 6bc8e0b: Prevent import assertion from being scanned too soon
373
+
374
+ ## 0.23.4
375
+
376
+ ### Patch Changes
377
+
378
+ - 3b9f0d2: Remove css print escape for experimentalStaticExtraction
379
+
380
+ ## 0.23.3
381
+
382
+ ### Patch Changes
383
+
384
+ - 7693d76: Fix resolution of .jsx modules
385
+
386
+ ## 0.23.2
387
+
388
+ ### Patch Changes
389
+
390
+ - 167ad21: Improve handling of namespaced components when they are multiple levels deep
391
+ - 9283258: Fix quotations in pre-quoted attributes
392
+ - 76fcef3: Better handling for imports which use special characters
393
+
394
+ ## 0.23.1
395
+
396
+ ### Patch Changes
397
+
398
+ - 79376f3: Fix regression with expression rendering
399
+
400
+ ## 0.23.0
401
+
402
+ ### Minor Changes
403
+
404
+ - d8448e2: Prevent printing the doctype in the JS output
405
+
406
+ ### Patch Changes
407
+
408
+ - a28c3d8: Fix handling of unbalanced quotes in expression attributes
409
+ - 28d1d4d: Fix handling of TS generics inside of expressions
410
+ - 356d3b6: Prevent wrapping module scripts with scope
411
+
412
+ ## 0.22.1
413
+
414
+ ### Patch Changes
415
+
416
+ - 973103c: Prevents unescaping attribute expressions
417
+
418
+ ## 0.22.0
419
+
420
+ ### Minor Changes
421
+
422
+ - 558c9dd: Generate a stable scoped class that does _NOT_ factor in local styles. This will allow us to safely do style HMR without needing to update the DOM as well.
423
+ - c19cd8c: Update Astro's CSS scoping algorithm to implement zero-specificity scoping, according to [RFC0012](https://github.com/withastro/rfcs/blob/main/proposals/0012-scoped-css-with-preserved-specificity.md).
424
+
425
+ ## 0.21.0
426
+
427
+ ### Minor Changes
428
+
429
+ - 8960d82: New handling for `define:vars` scripts and styles
430
+
431
+ ### Patch Changes
432
+
433
+ - 4b318d5: Do not attempt to hoist styles or scripts inside of `<noscript>`
434
+ - d6ebab6: Fixing missing semicolon on TSX Frontmatter last-entries
435
+
436
+ ## 0.20.0
437
+
438
+ ### Minor Changes
439
+
440
+ - 48d33ff: Removes compiler special casing for the Markdown component
441
+ - 4a5352e: Removes limitation where imports/exports must be at the top of an `.astro` file. Fixes various edge cases around `getStaticPaths` hoisting.
442
+
443
+ ### Patch Changes
444
+
445
+ - 245d73e: Add support for HTML minification by passing `compact: true` to `transform`.
446
+ - 3ecdd24: Update TSX output to also generate TSX-compatible code for attributes containing dots
447
+
448
+ ## 0.19.0
449
+
450
+ ### Minor Changes
451
+
452
+ - fcb4834: Removes fallback for the site configuration
453
+
454
+ ### Patch Changes
455
+
456
+ - 02add77: Fixes many edge cases around tables when used with components, slots, or expressions
457
+ - b23dd4d: Fix handling of unmatched close brace in template literals
458
+ - 9457a91: Fix issue with `{` in template literal attributes
459
+ - c792161: Fix nested expression handling with a proper expression tokenizer stack
460
+
461
+ ## 0.18.2
462
+
463
+ ### Patch Changes
464
+
465
+ - f8547a7: Revert [#448](https://github.com/withastro/compiler/pull/448) for now
466
+
467
+ ## 0.18.1
468
+
469
+ ### Patch Changes
470
+
471
+ - aff2f23: Warning on client: usage on scripts
472
+
473
+ ## 0.18.0
474
+
475
+ ### Minor Changes
476
+
477
+ - 4b02776: Fix handling of `slot` attribute used inside of expressions
478
+
479
+ ### Patch Changes
480
+
481
+ - 62d2a8e: Properly handle nested expressions that return multiple elements
482
+ - 571d6b9: Ensure `html` and `body` elements are scoped
483
+
484
+ ## 0.17.1
485
+
486
+ ### Patch Changes
487
+
488
+ - 3885217: Support `<slot is:inline />` and preserve slot attribute when not inside component
489
+ - ea94a26: Fix issue with fallback content inside of slots
490
+
491
+ ## 0.17.0
492
+
493
+ ### Minor Changes
494
+
495
+ - 3a9d166: Add renderHead injection points
496
+
497
+ ## 0.16.1
498
+
499
+ ### Patch Changes
500
+
501
+ - 9fcc43b: Build JS during the release
502
+
503
+ ## 0.16.0
504
+
505
+ ### Minor Changes
506
+
507
+ - 470efc0: Adds component metadata to the TransformResult
508
+
509
+ ### Patch Changes
510
+
511
+ - c104d4f: Fix #418: duplicate text when only text
512
+
513
+ ## 0.15.2
514
+
515
+ ### Patch Changes
516
+
517
+ - f951822: Fix wasm `parse` to save attribute namespace
518
+ - 5221e09: Fix serialize spread attribute
519
+
520
+ ## 0.15.1
521
+
522
+ ### Patch Changes
523
+
524
+ - 26cbcdb: Prevent side-effectual CSS imports from becoming module metadata
525
+
526
+ ## 0.15.0
527
+
528
+ ### Minor Changes
529
+
530
+ - 702e848: Trailing space at the end of Astro files is now stripped from Component output.
531
+
532
+ ### Patch Changes
533
+
534
+ - 3a1a24b: Fix long-standing bug where a `class` attribute inside of a spread prop will cause duplicate `class` attributes
535
+ - 62faceb: Fixes an issue where curly braces in `<math>` elements would get parsed as expressions instead of raw text.
536
+
537
+ ## 0.14.3
538
+
539
+ ### Patch Changes
540
+
541
+ - 6177620: Fix edge case with expressions inside of tables
542
+ - 79b1ed6: Provides a better error message when we can't match client:only usage to an import statement
543
+ - a4e1957: Fix Astro scoping when `class:list` is used
544
+ - fda859a: Fix json escape
545
+
546
+ ## 0.14.2
547
+
548
+ ### Patch Changes
549
+
550
+ - 6f30e2e: Fix edge case with nested expression inside `<>`
551
+ - 15e3ff8: Fix panic when using a `<slot />` in `head`
552
+ - c048567: Fix edge case with `select` elements and expression children
553
+ - 13d2fc2: Fix #340, fixing behavior of content after an expression inside of `<select>`
554
+ - 9e37a72: Fix issue when multiple client-only components are used
555
+ - 67993d5: Add support for block comment only expressions, block comment only shorthand attributes and block comments in shorthand attributes
556
+ - 59fbea2: Fix #343, edge case with `<tr>` inside component
557
+ - 049dadf: Fix usage of expressions inside `caption` and `colgroup` elements
558
+
559
+ ## 0.14.1
560
+
561
+ ### Patch Changes
562
+
563
+ - 1a82892: Fix bug with `<script src>` not being hoisted
564
+
565
+ ## 0.14.0
566
+
567
+ ### Minor Changes
568
+
569
+ - c0da4fe: Implements [RFC0016](https://github.com/withastro/rfcs/blob/main/proposals/0016-style-script-defaults.md), the new `script` and `style` behavior.
570
+
571
+ ## 0.13.2
572
+
573
+ ### Patch Changes
574
+
575
+ - 014370d: Fix issue with named slots in <head> element
576
+ - da831c1: Fix handling of RegExp literals in frontmatter
577
+
578
+ ## 0.13.1
579
+
580
+ ### Patch Changes
581
+
582
+ - 2f8334c: Update `parse` and `serialize` functions to combine `attributes` and `directives`, fix issue with `serialize` not respecting `attributes`.
583
+ - b308955: Add self-close option to serialize util
584
+
585
+ ## 0.13.0
586
+
587
+ ### Minor Changes
588
+
589
+ - ce3f1a5: Update CSS parser to use `esbuild`, adding support for CSS nesting, `@container`, `@layer`, and other modern syntax features
590
+
591
+ ### Patch Changes
592
+
593
+ - 24a1185: Parser: Always output the `children` property in an element node, even if it has no children
594
+
595
+ ## 0.12.1
596
+
597
+ ### Patch Changes
598
+
599
+ - 097ac47: Parser: Always output the `attribute` property in an element node, even if empty
600
+ - ad62437: Add `serialize` util
601
+ - eb7eb95: Parse: fix escaping of `&` characters in AST output
602
+
603
+ ## 0.12.0
604
+
605
+ ### Minor Changes
606
+
607
+ - c6dd41d: Do not render implicit tags created during the parsing process
608
+ - c6dd41d: Remove "as" option, treats all documents as fragments that generate no implicit tags
609
+ - c6dd41d: Add `parse` function which generates an AST
610
+ - c6dd41d: 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)).
611
+
612
+ ### Patch Changes
613
+
614
+ - c6dd41d: Add `fragment` node types to AST definitions, expose Fragment helper to utils
615
+ - c6dd41d: Adds metadata on client:only components
616
+ - c6dd41d: Expose AST types via `@astrojs/compiler/types`
617
+ - c6dd41d: Export `./types` rather than `./types.d.ts`
618
+ - c6dd41d: Fix edge case with Fragment parsing in head, add `fragment` node to AST output
619
+ - c6dd41d: Fix <slot> behavior inside of head
620
+ - c6dd41d: Improve head injection behavior
621
+ - ef0b4b3: Move `typescript` dependency to development dependencies, as it is not needed in the package runtime.
622
+ - c6dd41d: Update exposed types
623
+ - c6dd41d: Remove usage of `escapeHTML` util
624
+ - c6dd41d: Export all types from shared types
625
+ - c6dd41d: Fix `head` behavior and a bug related to ParseFragment
626
+ - c6dd41d: Adds a warning when using an expression with a hoisted script
627
+
628
+ ## 0.12.0-next.9
629
+
630
+ ### Patch Changes
631
+
632
+ - 95ec808: Fix <slot> behavior inside of head
633
+ - 95ec808: Remove usage of `escapeHTML` util
634
+
635
+ ## 0.12.0-next.8
636
+
637
+ ### Patch Changes
638
+
639
+ - 4497628: Improve head injection behavior
640
+
641
+ ## 0.12.0-next.7
642
+
643
+ ### Patch Changes
644
+
645
+ - e26b9d6: Fix edge case with Fragment parsing in head, add `fragment` node to AST output
646
+
647
+ ## 0.12.0-next.6
648
+
649
+ ### Patch Changes
650
+
651
+ - 37ef1c1: Fix `head` behavior and a bug related to ParseFragment
652
+
653
+ ## 0.12.0-next.5
654
+
655
+ ### Patch Changes
656
+
657
+ - 97cf66b: Adds metadata on client:only components
658
+
659
+ ## 0.12.0-next.4
660
+
661
+ ### Patch Changes
662
+
663
+ - e2061dd: Export all types from shared types
664
+
665
+ ## 0.12.0-next.3
666
+
667
+ ### Patch Changes
668
+
669
+ - ef69b74: Export `./types` rather than `./types.d.ts`
670
+
671
+ ## 0.12.0-next.2
672
+
673
+ ### Patch Changes
674
+
675
+ - 073b0f1: Adds a warning when using an expression with a hoisted script
676
+
677
+ ## 0.12.0-next.1
678
+
679
+ ### Patch Changes
680
+
681
+ - a539d53: Update exposed types
682
+
683
+ ## 0.12.0-next.0
684
+
685
+ ### Minor Changes
686
+
687
+ - 8ce39c7: Do not render implicit tags created during the parsing process
688
+ - 41b825a: Remove "as" option, treats all documents as fragments that generate no implicit tags
689
+ - 483b34b: Add `parse` function which generates an AST
690
+ - 9e5e2f8: 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)).
691
+
692
+ ### Patch Changes
693
+
694
+ - 16b167c: Expose AST types via `@astrojs/compiler/types`
695
+
696
+ ## 0.11.4
697
+
698
+ ### Patch Changes
699
+
700
+ - 99b5de2: Reset tokenizer state when a raw element that is self-closing is encountered.
701
+
702
+ This fixes the handling of self-closing elements like `<title />` and `<script />` when used with `set:html`.
703
+
704
+ ## 0.11.3
705
+
706
+ ### Patch Changes
707
+
708
+ - dcf15bf: Fixes bug causing a crash when using Astro.resolve on a hoisted script
709
+
710
+ ## 0.11.2
711
+
712
+ ### Patch Changes
713
+
714
+ - 41cc6ef: Fix memory issue caused by duplicate WASM instantiations
715
+
716
+ ## 0.11.1
717
+
718
+ ### Patch Changes
719
+
720
+ - 4039682: Fixes hoist script tracking when passed a variable
721
+
722
+ ## 0.11.0
723
+
724
+ ### Minor Changes
725
+
726
+ - 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.
727
+
728
+ Please see https://github.com/withastro/compiler/pull/291 for more details.
729
+
730
+ ## 0.11.0-next--wasm.0
731
+
732
+ ### Minor Changes
733
+
734
+ - 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.
735
+
736
+ Please see https://github.com/withastro/compiler/pull/291 for more details.
737
+
738
+ ## 0.10.2
739
+
740
+ ### Patch Changes
741
+
742
+ - 7f7c65c: Fix conditional rendering for special elements like `iframe` and `noscript`
743
+ - 9d789c9: Fix handling of nested template literals inside of expressions
744
+ - 5fa9e53: Fix handling of special characters inside of expressions
745
+ - 8aaa956: Formalize support for magic `data-astro-raw` attribute with new, official `is:raw` directive
746
+ - c698350: Improve MathML support. `{}` inside of `<math>` is now treated as raw text rather than an expression construct.
747
+
748
+ ## 0.10.1
749
+
750
+ ### Patch Changes
751
+
752
+ - 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).
753
+
754
+ ## 0.10.0
755
+
756
+ ### Minor Changes
757
+
758
+ - 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)).
759
+
760
+ ### Patch Changes
761
+
762
+ - 4fe522b: Fixes inclusion of define:vars scripts/styles using the StaticExtraction flag
763
+
764
+ ## 0.9.2
765
+
766
+ ### Patch Changes
767
+
768
+ - 92cc76b: Fix wasm build for use in Astro
769
+
770
+ ## 0.9.1
771
+
772
+ ### Patch Changes
773
+
774
+ - 85d35a5: Revert previous change that broke Windows
775
+
776
+ ## 0.9.0
777
+
778
+ ### Minor Changes
779
+
780
+ - c1a0172: changing raw_with_expression_loop in tokenizer to only handle string that has '`' differently otherwise it should treat it as normal string
781
+
782
+ ### Patch Changes
783
+
784
+ - 1fa2162: Improved types for TransformResult with hoisted scripts
785
+
786
+ ## 0.8.2
787
+
788
+ ### Patch Changes
789
+
790
+ - 502f8b8: Adds a new property, `scripts`, to `TransformResult`
791
+
792
+ ## 0.8.1
793
+
794
+ ### Patch Changes
795
+
796
+ - cd277e2: Fix bug with data-astro-raw detection
797
+
798
+ ## 0.8.0
799
+
800
+ ### Minor Changes
801
+
802
+ - 3690968: Passes the Pathname to createAstro instead of import.meta.url
803
+
804
+ ## 0.7.4
805
+
806
+ ### Patch Changes
807
+
808
+ - afc1e82: Remove console log (sorry!)
809
+
810
+ ## 0.7.3
811
+
812
+ ### Patch Changes
813
+
814
+ - cc24069: Fix some edge cases with expressions inside of `<table>` elements
815
+ - 086275c: Fix edge case with textarea inside expression
816
+
817
+ ## 0.7.2
818
+
819
+ ### Patch Changes
820
+
821
+ - 899e48d: Fix issue with active formatting elements by marking expressions as unique scopes
822
+
823
+ ## 0.7.1
824
+
825
+ ### Patch Changes
826
+
827
+ - fa039dd: Fix tokenization of attribute expression containing the solidus (`/`) character
828
+ - e365c3c: Fix bug with expressions inside of <table> elements (without reverting a previous fix to expressions inside of <a> elements)
829
+ - 7c5889f: Fix bug with `@keyframes` scoping
830
+ - df74ab3: Fix bug where named grid columns (like `[content-start]`) would be scoped, producing invalid CSS
831
+ - abe37ca: Fix handling of components and expressions inside of `<noscript>`
832
+ - 8961cf4: Fix a logical error with expression tokenization when using nested functions. Previously, only the first brace pair would be respected and following pairs would be treated as expression boundaries.
833
+
834
+ ## 0.7.0
835
+
836
+ ### Minor Changes
837
+
838
+ - 43cbac3: Adds metadata on hydration directives used by the component
839
+
840
+ ## 0.6.2
841
+
842
+ ### Patch Changes
843
+
844
+ - e785310: Fix issue with import assertions creating additional imports
845
+
846
+ ## 0.6.1
847
+
848
+ ### Patch Changes
849
+
850
+ - e40ea9c: Include LICENSE information
851
+
852
+ ## 0.6.0
853
+
854
+ ### Minor Changes
855
+
856
+ - b9e2b4b: Adds option to make CSS be extracted statically
857
+
858
+ ## 0.5.7
859
+
860
+ ### Patch Changes
861
+
862
+ - 75bd730: Fix regression with Components mixed with active formatting elements
863
+
864
+ ## 0.5.6
865
+
866
+ ### Patch Changes
867
+
868
+ - 7ca419e: Improve behavior of empty expressions in body and attributes, where `{}` is equivalent to `{(void 0)}`
869
+
870
+ ## 0.5.5
871
+
872
+ ### Patch Changes
873
+
874
+ - 7a41d7b: Fix `<>` syntax edge case inside of expressions
875
+ - b0d35b9: Fix edge case with conditional scripts
876
+
877
+ ## 0.5.4
878
+
879
+ ### Patch Changes
880
+
881
+ - f2e0322: Do not reconstruct active formatting elements on expression start
882
+ - 0103285: Bugfix: expressions in table context
883
+
884
+ ## 0.5.3
885
+
886
+ ### Patch Changes
887
+
888
+ - 50cbc57: Fix fragment expression behavior edge case
889
+
890
+ ## 0.5.2
891
+
892
+ ### Patch Changes
893
+
894
+ - 8f0e3d7: Fix fragment parsing bugs when frontmatter is missing or top-level expressions are present
895
+
896
+ ## 0.5.1
897
+
898
+ ### Patch Changes
899
+
900
+ - 1f0ba41: Fix bug when fragment parsing frontmatter is missing
901
+
902
+ ## 0.5.0
903
+
904
+ ### Minor Changes
905
+
906
+ - 901faef: Passes projectRoot to createAstro
907
+
908
+ ## 0.4.0
909
+
910
+ ### Minor Changes
911
+
912
+ - 7e1aded: Change behavior of `as: "fragment"` option to support arbitrary `head` and `body` tags
913
+
914
+ ## 0.3.9
915
+
916
+ ### Patch Changes
917
+
918
+ - 2884a82: Bugfix: CSS comments insert semicolon
919
+
920
+ ## 0.3.8
921
+
922
+ ### Patch Changes
923
+
924
+ - 2c8f5d8: Fix another component-only edge case
925
+
926
+ ## 0.3.7
927
+
928
+ ### Patch Changes
929
+
930
+ - eb0d17f: Fix edge case with files that contain a single component
931
+
932
+ ## 0.3.6
933
+
934
+ ### Patch Changes
935
+
936
+ - af003e9: Fix syntax error in transformed output
937
+
938
+ ## 0.3.5
939
+
940
+ ### Patch Changes
941
+
942
+ - bca7e00: Fixed issue where an Astro Components could only add one style or script
943
+ - 2a2f951: Fix regression where leading `<style>` elements could break generated tags
944
+ - db162f8: Fix case-sensitivity of void elements
945
+ - 44ee189: Fixed issue where expressions did not work within SVG elements
946
+ - 9557113: Fix panic when preprocessed style is empty
947
+
948
+ ## 0.3.4
949
+
950
+ ### Patch Changes
951
+
952
+ - 351f298: Fix edge case with with `textarea` inside of a Component when the document generated an implicit `head` tag
953
+ - 0bcfd4b: Fix CSS scoping of \* character inside of calc() expressions
954
+ - 4be512f: Encode double quotes inside of quoted attributes
955
+ - ad865e5: Fix behavior of expressions inside of <table> elements
956
+
957
+ ## 0.3.3
958
+
959
+ ### Patch Changes
960
+
961
+ - 6d2a3c2: Fix handling of top-level component nodes with leading styles
962
+ - 2ce10c6: Fix "call to released function" issue
963
+
964
+ ## 0.3.2
965
+
966
+ ### Patch Changes
967
+
968
+ - 8800f80: Fix comments and strings inside of attribute expressions
969
+
970
+ ## 0.3.1
971
+
972
+ ### Patch Changes
973
+
974
+ - 432eaaf: Fix for compiler regression causing nil pointer
975
+
976
+ ## 0.3.0
977
+
978
+ ### Minor Changes
979
+
980
+ - 1255477: Drop support for elements inside of Frontmatter, which was undefined behavior that caused lots of TypeScript interop problems
981
+
982
+ ### Patch Changes
983
+
984
+ - 44dc0c6: Fixes issue with \x00 character on OSX
985
+ - d74acfa: Fix regression with expressions inside of <select> elements
986
+ - f50ae69: Bugfix: don’t treat import.meta as import statement
987
+
988
+ ## 0.2.27
989
+
990
+ ### Patch Changes
991
+
992
+ - 460c1e2: Use `$metadata.resolvePath` utility to support the `client:only` directive
993
+
994
+ ## 0.2.26
995
+
996
+ ### Patch Changes
997
+
998
+ - 3e5ef91: Implement getStaticPaths hoisting
999
+ - 8a434f9: Fix namespace handling to support attributes like `xmlns:xlink`
1000
+
1001
+ ## 0.2.25
1002
+
1003
+ ### Patch Changes
1004
+
1005
+ - 59f36cb: Fix custom-element slot behavior to remain spec compliant
1006
+ - 79b2e6f: Fix style/script ordering
1007
+ - 6041ee5: Add support for `client:only` directive
1008
+ - 2cd35f6: Fix apostrophe handling inside of elements which are inside of expressions ([#1478](https://github.com/snowpackjs/astro/issues/1478))
1009
+
1010
+ ## 0.2.24
1011
+
1012
+ ### Patch Changes
1013
+
1014
+ - bfd1b94: Fix issue with `style` and `script` processing where siblings would be skipped
1015
+ - 726d272: Fix <Fragment> and <> handling
1016
+ - f052465: Fix CSS variable parsing in the scoped CSS transform
1017
+
1018
+ ## 0.2.23
1019
+
1020
+ ### Patch Changes
1021
+
1022
+ - 632c29b: Fix nil pointer dereference when every element on page is a component
1023
+ - 105a159: Fix bug where text inside of elements inside of an expression was not read properly (https://github.com/snowpackjs/astro/issues/1617)
1024
+
1025
+ ## 0.2.22
1026
+
1027
+ ### Patch Changes
1028
+
1029
+ - 04c1b63: Fix bug with dynamic classes
1030
+
1031
+ ## 0.2.21
1032
+
1033
+ ### Patch Changes
1034
+
1035
+ - 7b46e9f: Revert automatic DOCTYPE injection to fix package
1036
+
1037
+ ## 0.2.20
1038
+
1039
+ ### Patch Changes
1040
+
1041
+ - 39298e4: Fix small bugs with script/style hoisting behavior
1042
+ - bd1014a: Bugfix: style tags in SVG
1043
+
1044
+ ## 0.2.19
1045
+
1046
+ ### Patch Changes
1047
+
1048
+ - 318dd69: Fix handling of self-closing "raw" tags like <script /> and <style />
1049
+ - 9372c10: Support `define:vars` with root `html` element on pages
1050
+ - c4491cd: Fix bug with <script define:vars> when not using the `hoist` attribute
1051
+
1052
+ ## 0.2.18
1053
+
1054
+ ### Patch Changes
1055
+
1056
+ - 2f4b772: Prevents overrunning an array when checking for raw attribute
1057
+
1058
+ ## 0.2.17
1059
+
1060
+ ### Patch Changes
1061
+
1062
+ - 4f9155a: Bugfix: fix character limit of 4096 characters
1063
+ - 83df04c: Upgrade to Go 1.17
1064
+
1065
+ ## 0.2.16
1066
+
1067
+ ### Patch Changes
1068
+
1069
+ - 9ad8da7: Allows a data-astro-raw attr to parse children as raw text
1070
+ - 61b77de: Bugfix: CSS and selector scoping
1071
+
1072
+ ## 0.2.15
1073
+
1074
+ ### Patch Changes
1075
+
1076
+ - 8fbae5e: Bugfix: fix component detection bug in parser
1077
+ - 37b5b6e: Bugfix: wait to release processStyle() until after fn call
1078
+
1079
+ ## 0.2.14
1080
+
1081
+ ### Patch Changes
1082
+
1083
+ - f59c886: Bugfix: allow for detection of void tags (e.g. <img>)
1084
+ - 4c8d14a: Fixes textContent containing a forward slash
1085
+
1086
+ ## 0.2.13
1087
+
1088
+ ### Patch Changes
1089
+
1090
+ - f262b61: Fix for string template usage within expressions
1091
+
1092
+ ## 0.2.12
1093
+
1094
+ ### Patch Changes
1095
+
1096
+ - c9fa9eb: Fix for apostrophe within elements
1097
+
1098
+ ## 0.2.11
1099
+
1100
+ ### Patch Changes
1101
+
1102
+ - 27629b2: Reverts the apostrophe change that broke markdown parsing
1103
+
1104
+ ## 0.2.10
1105
+
1106
+ ### Patch Changes
1107
+
1108
+ - 57eb728: Fixes hydrated scripts not recognized when using fragment transformation
1109
+
1110
+ ## 0.2.9
1111
+
1112
+ ### Patch Changes
1113
+
1114
+ - 3ea8d8c: Fix for string interpolation within titles
1115
+ - ef7cb1e: Fixes bug with textContent containing apostrophe character
1116
+
1117
+ ## 0.2.8
1118
+
1119
+ ### Patch Changes
1120
+
1121
+ - b2d5564: Fixes wasm build
1122
+
1123
+ ## 0.2.6
1124
+
1125
+ ### Patch Changes
1126
+
1127
+ - fix small issue with `preprocessStyle` handling of `null` or `undefined`
1128
+
1129
+ ## 0.2.5
1130
+
1131
+ ### Patch Changes
1132
+
1133
+ - Fix issue with CI deployment
1134
+
1135
+ ## 0.2.4
1136
+
1137
+ ### Patch Changes
1138
+
1139
+ - 4410c5a: Add support for a `preprocessStyle` function
1140
+ - 934e6a6: Chore: add linting, format code
1141
+
1142
+ ## 0.1.15
1143
+
1144
+ ### Patch Changes
1145
+
1146
+ - 5c02abf: Fix split so it always splits on first non-import/export
1147
+ - 93c1cd9: Bugfix: handle RegExp in Astro files
1148
+ - 94c59fa: Bugfix: tokenizer tries to parse JS comments
1149
+ - 46a5c75: Adds the top-level Astro object
1150
+ - 7ab9148: Improve JS scanning algorithm to be more fault tolerant, less error prone
1151
+
1152
+ ## 0.1.12
1153
+
1154
+ ### Patch Changes
1155
+
1156
+ - 96dc356: Adds hydrationMap support for custom elements
1157
+
1158
+ ## 0.1.11
1159
+
1160
+ ### Patch Changes
1161
+
1162
+ - 939283d: Adds the component export for use in hydration
1163
+
1164
+ ## 0.1.10
1165
+
1166
+ ### Patch Changes
1167
+
1168
+ - 3a336ef: Adds a hydration map to enable hydration within Astro components
1169
+
1170
+ ## 0.1.9
1171
+
1172
+ ### Patch Changes
1173
+
1174
+ - 7d887de: Allows the Astro runtime to create the Astro.slots object
1175
+
1176
+ ## 0.1.8
1177
+
1178
+ ### Patch Changes
1179
+
1180
+ - d159658: Publish via PR
1181
+
1182
+ ## 0.1.7
1183
+
1184
+ ### Patch Changes
1185
+
1186
+ - c52e69b: Include astro.wasm in the package
1187
+
1188
+ ## 0.1.6
1189
+
1190
+ ### Patch Changes
1191
+
1192
+ - bd05f7c: Actually include _any_ files?
1193
+
1194
+ ## 0.1.5
1195
+
1196
+ ### Patch Changes
1197
+
1198
+ - c4ed69e: Includes the wasm binary in the npm package
1199
+
1200
+ ## 0.1.4
1201
+
1202
+ ### Patch Changes
1203
+
1204
+ - 2f1f1b8: Pass custom element tag names to renderComponent as strings
1205
+
1206
+ ## 0.1.3
1207
+
1208
+ ### Patch Changes
1209
+
1210
+ - e4e2de5: Update to [`tinygo@0.20.0`](https://github.com/tinygo-org/tinygo/releases/tag/v0.20.0) and remove `go@1.16.x` restriction.
1211
+ - ae71546: Add support for `fragment` compilation, to be used with components rather than pages
1212
+ - 8c2aaf9: Allow multiple top-level conditional expressions
1213
+
1214
+ ## 0.1.0
1215
+
1216
+ ### Patch Changes
1217
+
1218
+ - c9407cd: Fix for using conditionals at the top-level