Skip to content

Feature/update compilers#7

Merged
Andersseen merged 7 commits into
mainfrom
feature/update-compilers
Jul 3, 2026
Merged

Feature/update compilers#7
Andersseen merged 7 commits into
mainfrom
feature/update-compilers

Conversation

@Andersseen

Copy link
Copy Markdown
Owner

Summary

Testing

  • pnpm run test
  • pnpm run build
  • Astro demo updated for language/integration changes
  • pnpm run test:e2e:demo for language/integration changes

Notes

Adds FLOW_BOUND_ATTR marker and bindFlowEventsIn scope helper.
Prevents duplicate listener registration when bindFlowEvents is
called multiple times on the same DOM.

Also introduces consolidated compiler improvement plan docs.
A2: translate FlowmarkDomDiagnostic locations to original Astro file
    coordinates in @flowmark/astro-events.
A3: reject trailing content after event handler calls in parser.ts.
A4: replace regex-based event discovery with HTML-aware scanner that
    skips comments, script/style tags, and respects quoted values.

Updates improvement plan and session context to mark Phase A done.
B1: support export/async function declarations in frontmatter.
B2: detect arrow functions and function expressions and emit a
    helpful diagnostic telling users to convert to function declarations.
B3: replace heuristic capture analyzer with TypeScript type checker.
    Identifiers are captures when their symbol declarations are outside
    the handler source file and they are not known globals.

Adds typescript as a runtime dependency of @flowmark/dom.

Updates improvement plan and session context.
C1: add warning diagnostics for  in @for (FM0015). Add
     to , surface them in CLI and Vite.
C2: always emit  after @switch cases to prevent accidental
    fallthrough.
C3: improve error message for partial interpolations in quoted
    attributes.
C4: point unclosed-tag diagnostics to the opening tag span.
C5: rename generated temporaries to  and
    .

Updates improvement plan and session context.
D1: add magic-string dependency and generate source maps for
    @flowmark/astro-events transformed Astro files.
D2: return an unbind function from bindFlowEvents and bindFlowEventsIn
    so callers can remove attached listeners and rebind later.
D3: add regression test verifying </script> sequences inside injected
    client modules are escaped to avoid breaking the script tag.

Updates improvement plan, session context and lockfile.
Development phases A-D are complete; these files are no longer needed.
@Andersseen Andersseen merged commit a57a259 into main Jul 3, 2026
2 of 3 checks passed
@Andersseen Andersseen deleted the feature/update-compilers branch July 3, 2026 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant