GitShow/sveltejs/esrap
sveltejs

esrap

Parse in reverse

by sveltejs
Star on GitHubForkWebsitenpm

JavaScript

137 stars16 forks16 contributorsActive · 11h agoSince 2023v2.3.4MIT

Meet the team

See all 16 on GitHub →
Rich-Harris
Rich-Harris318 contributions
manuel3108
manuel310852 contributions
github-actions[bot]Bot
github-actions[bot]38 contributions
MathiasWP
MathiasWP13 contributions
jycouet
jycouet13 contributions
andylovescode
andylovescode9 contributions
dummdidumm
dummdidumm7 contributions
paoloricciuti
paoloricciuti4 contributions

Languages

View on GitHub →
JavaScript93.7%
TypeScript6.3%

Commit activity

Last 12 weeks · 32 commits

Full graph →

Community health

2 of 6 standards met

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

Recent PRs & issues

Active · 3 in progress · Last activity 11h ago
See all on GitHub →
elliott-with-the-longest-name-on-github
fix: re-introduce JSDoc type casts without wrapping binding identifiersOpenPR

Fixes #164. This un-reverts #165 (re-introducing the JSDoc type cast support from #162) and fixes the regression that prompted the revert. Problem #162 detected JSDoc type casts with the guard , but (and patterns) are in that table even when they appear in binding positions. A comment attached to the of a — as emitted by the svelte compiler for hoisted declarations in server output — was wrapped in parens, producing invalid output like: Fix Track nodes in binding positions (variable declarator ids, function/method/arrow/TS-signature params, catch clause params) in a and exclude them from type cast detection. Genuine casts () still keep their parentheses. Tests New sample covering declarator ids, multiple declarators, function/arrow params, catch params, alongside a genuine cast.

elliott-with-the-longest-name-on-github · 11h ago
MathiasWP
fix: disambiguate arrow function type parameters in JSXOpenPR

In a JSX file, an arrow function's `esrap/languages/tsxconstinoutts()tsxesrap.test.jstsx().tsjsxModets-arrow-function-types`.

MathiasWP · 3d ago

Recent fixes

View closed PRs →
dummdidumm
fix: revert jsdoc type cast support (for now)MergedPR

Fixes #164; we'll follow up with a better solution

dummdidumm · 13h ago
Yamashou
2.3.3 regression: JSDoc @type comments on hoisted let declarations produce invalid output like `let (foo);`ClosedIssue

Description esrap 2.3.3 (via #162, "preserve parentheses of jsdoc type casts") emits invalid JavaScript when a comment is attached to a binding identifier of a variable declaration rather than to an expression. The identifier gets wrapped in parentheses as if it were a JSDoc type cast, producing output like: which is a (rollup: `letThe keyword 'let' is reservedis_jsdoc_type_castsrc/languages/ts/index.jsconst foo = /* @type {number} / (1);IdentifierVariableDeclaratorletsvelteesrap: ^2.1.0let /* ... / ( /* ... / (computed));carbon-components-svelteletThe keyword 'let' is reservedesrap` to 2.3.2 via package manager overrides restores correct output.

Yamashou · 13h ago
dummdidumm
fix: preserve parantheses of jsdoc type castsMergedPR

Without this jsdoc type casts are lost in the output.

dummdidumm · 2d ago
Structured data for AI agents

Repository: sveltejs/esrap. Description: Parse in reverse Stars: 137, Forks: 16. Primary language: JavaScript. Languages: JavaScript (93.7%), TypeScript (6.3%). License: MIT. Homepage: https://svelte.dev/playground/1bfe207e15c841d49ceff859b342260d Latest release: v2.3.4 (13h ago). Open PRs: 3, open issues: 1. Last activity: 11h ago. Community health: 50%. Top contributors: Rich-Harris, manuel3108, github-actions[bot], MathiasWP, jycouet, andylovescode, dummdidumm, paoloricciuti, elliott-with-the-longest-name-on-github, Ocean-OS and others.

·@ofershap

Replace github.com with gitshow.dev