Skip to content

chore(deps): bump graph-selector to 0.15.1 - #847

Merged
rob-gordon merged 2 commits into
devfrom
robgordon/graph-selector-0.15
Oct 12, 2026
Merged

rob-gordon merged 2 commits into
devfrom
robgordon/graph-selector-0.15

Conversation

@rob-gordon

@rob-gordon rob-gordon commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Moves the app (0.14.0) and the api (0.13.0) to graph-selector 0.15.1.

0.15.0 froze the page in production builds and is skipped. CRA's Babel wraps named-group regex literals, and a RegExp copied from one loses match.groups, so getFeatureData looped forever. tone-row/graph-selector#65 fixed it in 0.15.1 and added a lint rule that rejects that pattern.

What 0.15 brings

  • Faster parsing (graph-selector Export-Import JSON Graph #61). Measured on the published npm builds with graph-selector's own realistic-document generator (3 seeds, median of 15 runs):

    Chart size 0.14.0 0.15.0
    500 lines 3.2 ms 1.1 ms
    2000 lines 52.1 ms 3.4 ms
  • Parser state no longer leaks across lines (Switch to monaco code editor #59). After a dedent, a deeper line could attach to a stale ancestor. A later reference could then come from the wrong node too. A featuresRe lastIndex leak could also drop #id/.class/[attr] on a later line.

  • In-repo comment stripping (Update editor style; colors #62) replaces the strip-comments fork, so those packages leave the lockfile.

Behavior change to know about

Charts with uneven indentation after a dedent now render the way they read. On the doc below, 0.14.0 drew b -> d and d -> Start. 0.15.0 draws c -> d and Next -> Start:

a
  b
c
   d
Start #s1
  yes: Next
    (#s1)

This fixes a bug, but an existing chart that depended on the old wiring will look different.

Verification

On 0.15.1:

  • I built the app for production (react-scripts build) and served it statically. The page loaded and stayed responsive on 4 of 4 loads. Published 0.15.0 froze on 4 of 4 under the same probe. The sandbox drive (below) also passes on this production build.
  • pnpm -F api check, pnpm -F api test (22 passed), pnpm -F app check, and pnpm -F app test (715 passed) all pass.
  • The lockfile drops pkgroll's build toolchain, because graph-selector 0.15.1 moved it to devDependencies.

On 0.15.0 (the parser behavior is unchanged in 0.15.1):

  • pnpm -F api check, pnpm -F api test (22 passed), pnpm -F app check, and pnpm -F app test (715 passed) all pass.
  • Visual regression: pnpm -F app visual passed 11/11 (10 templates plus the references fixture).
  • I drove the sandbox editor with the verify skill: comments, .class after trailing text, dedent, (#id) and (Label) references, a container, and syntax highlighting. The run passed with no console errors, and I checked the screenshots.

🤖 Generated with Claude Code

Moves the app from 0.14.0 and the api from 0.13.0 to 0.15.0.

0.15.0 parses large charts much faster: a 2000-line chart drops from
52.1 ms to 3.4 ms median, a 500-line chart from 3.2 ms to 1.1 ms. It
also fixes parser state that leaked across lines. After a dedent, a
deeper line could attach to a stale ancestor, so "a / b / c / d" with
d indented three spaces drew b -> d instead of c -> d. Comment
stripping is now done in-repo, which drops the strip-comments packages.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
flowchart-fun Ready Ready Preview Oct 12, 2026 8:00pm UTC

Request Review

@rob-gordon
rob-gordon marked this pull request as draft October 12, 2026 19:32
@rob-gordon

Copy link
Copy Markdown
Member Author

Blocked: do not merge. graph-selector 0.15.0 freezes the page in production builds.

The E2E page.goto timeouts are real. On this preview the main thread spins forever in getFeatureData, on the first line it parses ("Step 1" in the welcome chart). CRA's production Babel transpiles named capture groups by wrapping featuresRe in _wrapRegExp. 0.15.0 (#59) then builds its global copy with new RegExp(featuresRe, "gs"), which gives back a plain native RegExp, so match.groups is undefined. The loop's if (!match.groups) continue; then re-runs an empty match at lastIndex 0, and that never ends.

I confirmed it in the paused frame on the preview. The wrapped regex returns groups (replace,id,classes,attributes,attributeValue) and the new RegExp copy returns groups: undefined. The dev build and Node (the api, unit tests) use native named groups, which is why local checks and the visual suite passed.

The fix belongs in graph-selector. This PR then moves to the patched release.

@rob-gordon

Copy link
Copy Markdown
Member Author

Fix: tone-row/graph-selector#65. I confirmed the freeze on a local react-scripts build with published 0.15.0 (4/4 loads frozen), and confirmed it clears with the patched dist swapped in (4/4 responsive, sandbox drive passes). Once 0.15.1 is published, this PR moves to ^0.15.1 and leaves draft.

0.15.0 froze the page in production builds. CRA's Babel wraps named-group
regex literals, and a RegExp copied from one loses match.groups, which
left getFeatureData looping forever. 0.15.1 keeps that regex a literal
(tone-row/graph-selector#65). It also moves pkgroll to devDependencies,
which drops its build toolchain from the lockfile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rob-gordon rob-gordon changed the title chore(deps): bump graph-selector to 0.15.0 chore(deps): bump graph-selector to 0.15.1 Oct 12, 2026
@rob-gordon
rob-gordon marked this pull request as ready for review October 12, 2026 20:02
@rob-gordon
rob-gordon added this pull request to the merge queue Oct 12, 2026
Merged via the queue into dev with commit 18d4d69 Oct 12, 2026
5 checks passed
@rob-gordon rob-gordon mentioned this pull request Oct 12, 2026

This branch was successfully deployed

1 active deployment
Preview — d91d35c0 Deployed Oct 12, 2026 by vercel[bot]
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