GitShow/withastro/compiler
withastro

compiler

The Astro compiler. Written in Go. Distributed as WASM.

by withastro
Star on GitHubFork

Go

658 stars94 forks51 contributorsActive · 1mo agoSince 2021@astrojs/compiler@4.0.0

Meet the team

See all 51 on GitHub →
natemoo-re
natemoo-re240 contributions
github-actions[bot]Bot
github-actions[bot]217 contributions
matthewp
matthewp115 contributions
drwpow
drwpow42 contributions
MoustaphaDev
MoustaphaDev33 contributions
Princesseuh
Princesseuh31 contributions
bluwy
bluwy14 contributions
ematipico
ematipico10 contributions

Languages

View on GitHub →
Go84%
TypeScript15.9%
Dockerfile0.1%
Makefile0%

Commit activity

Last 12 weeks · 0 commits

Full graph →

Community health

5 of 6 standards met

Community profile →
87
✓README✓License✓Contributing✓Code of Conduct○Issue Template✓PR Template

Recent PRs & issues

Active · 1 discussion · Last activity 1mo ago
See all on GitHub →
victormelo-del
🐛 BUG: [TSX] Props silently degrade to `Record<string, any>` past a 1-byte threshold in total comment massOpenIssue

What version of are you using? 2.13.1 (via , , ) What package manager are you using? npm What operating system are you using? macOS 15 (Darwin 25.5.0, Apple Silicon) Describe the Bug silently stops typing component props once a file crosses a 1-byte threshold in total comment mass. Past the cliff it emits instead of , and drops the whole block. is in both cases — the compiler reports nothing. Downstream, surfaces this as: which points at the one thing in the file that is provably correct. The obvious "fix" — deleting to silence the diagnostic — removes prop typing from the component for good. That is what makes this worth reporting: the visible symptom is a misleading diagnostic, but the actual damage is prop types silently degrading to in a file that still compiles and still ships. This looks related to #699 (same symptom, different trigger, fixed in 0.31.x). The trigger, bisected Two ingredients, both necessary in our file; neither is sufficient on its own in a synthetic file (see "what I could not reduce" below). 1. A tag name written inside a frontmatter block comment.* With `/ ... */mainxxxxRepro.astroxdeclare const Astro_props: Props---x` of the same length reproduces identically. Why the byte counts matter operationally Before we found this, our layout was sitting 81 bytes from the cliff, with no way to know. Any future comment — one sentence — would have silently dropped prop typing across every page of the site, and the error message would have sent whoever hit it to the wrong file.

victormelo-del · 5d ago

Recent fixes

View closed PRs →
digi-scrypt
escape backslashes in JS string literal outputMergedPR

1. escapeDoubleQuote and escapeSingleQuote escape the closing quote but not the backslash, so a value ending in a backslash (or one before a quote) lands a right against the closing quote the printer adds and breaks out of the JS string literal. 2. these feed the renderComponent props object, slot names and the hoisted script metadata, all built from attribute values in the source. A quoted attribute is the trigger. `{"path":"C:\dir\"}src\n` it inserts isn't doubled. Added a snapshot covering a backslash attribute.

digi-scrypt · 1mo ago
molszanski
Missing <body> tag if astro finds an unrecognized head tagClosedIssue

Astro Info If this issue only occurs in one browser, which browser is a problem? Chrome Describe the Bug Input: Output Notice the missing `` elements. Minimal Repro: https://stackblitz.com/edit/github-zkwgaq-g5un8g?file=src%2Fpages%2Findex.astro&file=src%2Flayouts%2FLayout.astro&on=stackblitz What's the expected result? valid html. Astro should omit tags it doesn't recogdnize / understand Link to Minimal Reproducible Example https://stackblitz.com/edit/github-zkwgaq-g5un8g?file=src%2Fpages%2Findex.astro&file=src%2Flayouts%2FLayout.astro&on=stackblitz Participation [ ] I am willing to submit a pull request for this issue.

molszanski · 1mo ago
sarathfrancis90
Fix crash on Props generic containing a shift or comparison operatorMergedPR

While converting a component to TSX, panics with a slice-bounds error on valid TypeScript like: The scanner walks the generic parameter list tracking angle-bracket depth, but it treated any token containing `>=source[start:end]>>>>>Foo>TestGetPropsTypemain>>go test ./internal/...go vetgofmt` are clean, and the wasm build succeeds. Fixes withastro/compiler-rs#78

sarathfrancis90 · 2mo ago
Structured data for AI agents

Repository: withastro/compiler. Description: The Astro compiler. Written in Go. Distributed as WASM. Stars: 658, Forks: 94. Primary language: Go. Languages: Go (84%), TypeScript (15.9%), Dockerfile (0.1%), Makefile (0%). Latest release: @astrojs/compiler@4.0.0 (4mo ago). Open PRs: 0, open issues: 1. Last activity: 1mo ago. Community health: 87%. Top contributors: natemoo-re, github-actions[bot], matthewp, drwpow, MoustaphaDev, Princesseuh, bluwy, ematipico, jasikpark, delucis and others.

·@ofershap

Replace github.com with gitshow.dev