GitShow/sveltejs/zimmerframe
sveltejs

zimmerframe

A tool for walking

by sveltejs
Star on GitHubForknpm

JavaScript

122 stars11 forks6 contributorsActive · 2w agoSince 2023v1.1.5MIT

Meet the team

See all 6 on GitHub →
Rich-Harris
Rich-Harris81 contributions
dummdidumm
dummdidumm10 contributions
github-actions[bot]Bot
github-actions[bot]3 contributions
Nic-Polumeyv
Nic-Polumeyv2 contributions
Ocean-OS
Ocean-OS1 contribution
baseballyama
baseballyama1 contribution

Languages

View on GitHub →
JavaScript100%

Commit activity

Last 12 weeks · 9 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 2w ago
See all on GitHub →
Nic-Polumeyv
perf: clone nodes with a spreadOpenPR

#19/#20 swapped the spread here for a property-descriptor copy so Svelte's hidden / pointers survived clones. Svelte removed those pointers after sveltejs/svelte#14204 (a clone's back-reference is stale by construction) and now keeps that data in , and s. No other dependent puts non-enumerable properties on nodes. A parent is now spread once, on its first transformed child, the same way arrays are already sliced; clones carry own enumerable properties only. Closes #32 (fixed by #37, regression test added).

Nic-Polumeyv · 2w ago
teodragovic
chore: add default entry to exports fieldOpenPR

This increases compatibility. For additional context: I have a ESM project which imports CJS lib that imports this package and I'm getting error. Workaround is, instead of using normal import to use function but adding to this package makes everything just work.

teodragovic · 4mo ago
eight04
Make the package require-ableOpenIssue

https://github.com/sveltejs/zimmerframe/blob/d3862bd581912104bdd2ad4ffe98dd8f555ce83c/package.json#L11-L14 The current package.json prevents the package from being required: If the user still uses cjs, it has to it: By adding , the user can require it normally (Node 20+)

eight04 · 6mo ago

Recent fixes

View closed PRs →
MathiasWP
feat: add walk_readonly for read-only AST traversalMergedPR

Summary Adds an optimized export for analysis passes that only inspect the tree without transforming it. What's different from No mutation tracking — no object, no checks, no calls No return values — visitors return , context.visit/next return No object spreads in the universal visitor path — when both and a specialized visitor exist, the context object is mutated in-place instead of creating spread copies Shared path array — single array across the entire walk instead of passing through every recursive call Types New exports: , , These mirror the existing // types but with return types, making it a type error to accidentally return replacement nodes from a read-only walk. Benchmark (in Svelte compiler) Switching 7 analysis-phase files from to in the Svelte compiler gives ~20% faster compilation: Tests 6 new tests covering: Basic traversal Universal + specialized visitor interaction State passing through universal visitor Path correctness with Path correctness with halting traversal All 17 tests pass (11 existing + 6 new). 🤖 Generated with Claude Code

MathiasWP · 4w ago
dummdidumm
perf: reduce traversal allocations and mutation bookkeepingMergedPR

Some tweaks to make traversal faster in case there's no mutations, and prevent allocations in various other places or make them slightly faster. Added a benchmark which I used to implement this. On my machine it's ~50% faster, e.g. "default read-only" goes from 11400 ops/s to 16900 ops/s

dummdidumm · 4w ago
Nic-Polumeyv
perf: avoid per-node closure allocationsMergedPR

A bit more on top of #36: skip creating the per-node closures entirely when no visitor matches, hoist to walk scope, and clone mutated arrays lazily instead of the index record + . "default read-only" goes from ~13700 to ~19800 ops/s, "manual visit" from ~13800 to ~23500.

Nic-Polumeyv · 4w ago
Structured data for AI agents

Repository: sveltejs/zimmerframe. Description: A tool for walking Stars: 122, Forks: 11. Primary language: JavaScript. Languages: JavaScript (100%). License: MIT. Latest release: v1.1.5 (4w ago). Open PRs: 3, open issues: 3. Last activity: 2w ago. Community health: 50%. Top contributors: Rich-Harris, dummdidumm, github-actions[bot], Nic-Polumeyv, Ocean-OS, baseballyama.

·@ofershap

Replace github.com with gitshow.dev