@node-projects/speedscope 0.0.0-stage → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,142 @@
1
+ # Hosting and publishing
2
+
3
+ Repository: [node-projects/speedscope](https://github.com/node-projects/speedscope).
4
+ Package: [`@node-projects/speedscope`](https://www.npmjs.com/package/@node-projects/speedscope).
5
+ Hosted application: [node-projects.github.io/speedscope](https://node-projects.github.io/speedscope/).
6
+ The npm command remains `speedscope`; Node.js 22+ is required for the CLI.
7
+
8
+ ## GitHub Actions
9
+
10
+ | Workflow | Trigger | Result |
11
+ | --- | --- | --- |
12
+ | [ci.yml](../.github/workflows/ci.yml) | PR, push to `main`, manual | Tests Node.js 22/24 on Linux/Windows, checks npm contents and uploads offline ZIPs. |
13
+ | [pages.yml](../.github/workflows/pages.yml) | Push to `main`, manual | Tests, builds `dist/pages` and deploys GitHub Pages. |
14
+ | [release.yml](../.github/workflows/release.yml) | Published GitHub release, manual retry | Uses the release tag as the npm version, tests, packs, attaches archives and publishes to npm. |
15
+
16
+ ## Pages setup
17
+
18
+ In repository **Settings → Pages → Build and deployment**, select **GitHub Actions**
19
+ as the source. This repository is configured for workflow deployment. The deploy
20
+ job uses the `github-pages` environment with `pages: write` and `id-token: write`.
21
+ No custom domain or upstream `speedscope.app` CNAME is installed.
22
+
23
+ The site uses relative asset URLs and works at the `/speedscope/` project path.
24
+ `npm run build:pages` creates the HTTP site, schema and release metadata in
25
+ `dist/pages`. It does not overwrite the offline npm build in `dist/release`.
26
+ Local profile imports stay in the browser; profileURL requests fetch from the
27
+ explicitly requested host and require that host's CORS permission.
28
+
29
+ To redeploy the current `main`, use the Actions page or:
30
+
31
+ ```sh
32
+ gh workflow run pages.yml --repo node-projects/speedscope --ref main
33
+ ```
34
+
35
+ ## First publication: 2.0.0
36
+
37
+ The first fork version, **2.0.0**, was published manually by the maintainer on
38
+ 2026-11-18. The bootstrap process was:
39
+
40
+ ```sh
41
+ npm ci
42
+ npm test
43
+ npm publish --access public
44
+ ```
45
+
46
+ `prepack` builds the offline app automatically. This first publication did not
47
+ require GitHub OIDC. The trusted publisher below is now configured.
48
+ Creating a `v2.0.0` GitHub release afterward is safe: the workflow detects the
49
+ existing npm version, attaches its standalone ZIP and skips re-publishing npm.
50
+ For a new version, it attaches the newly built npm tarball as well.
51
+
52
+ ## npm trusted publishing after the first publication
53
+
54
+ The npm trusted publisher was created successfully on 2026-11-18 for
55
+ `@node-projects/speedscope`. It authorizes the following GitHub Actions identity:
56
+
57
+ - Organization/user: `node-projects`
58
+ - Repository: `speedscope`
59
+ - Workflow filename: `release.yml`
60
+ - Environment: leave empty (the npm job does not use an environment)
61
+ - Allow the `npm publish` action.
62
+
63
+ The workflow already uses Node.js 24 and `id-token: write`, so future published
64
+ GitHub releases can authenticate through OIDC without an npm token secret.
65
+ The saved publisher also includes npm's default staging permission; the workflow
66
+ uses direct publication. No GitHub environment restriction is configured because
67
+ the publish job does not declare an environment.
68
+
69
+ To inspect the configuration, an authorized npm maintainer can run:
70
+
71
+ ```sh
72
+ npm trust list @node-projects/speedscope --json
73
+ ```
74
+
75
+ For recovery/recreation, npm 11.15+ supports the equivalent CLI setup:
76
+
77
+ ```sh
78
+ npm trust github @node-projects/speedscope --repository node-projects/speedscope --file release.yml --allow-publish
79
+ ```
80
+
81
+ npm requires fresh two-factor authentication for these account operations. The
82
+ setup was completed through the CLI's browser authentication flow; no credentials
83
+ were added to the repository. Recreating an existing publisher is not a routine
84
+ release step.
85
+
86
+ New publisher configurations must complete their first successful automated
87
+ publish within **two days**, otherwise npm expires them. Creating a GitHub release
88
+ for an already-published version does not validate OIDC because this workflow
89
+ skips the npm publish step for that version. Use the next new version (for example
90
+ `v2.0.1`) when ready. Until that first workflow publish, setup is verified but an
91
+ end-to-end OIDC publication has not been exercised.
92
+
93
+ See [npm's trusted publisher setup](https://docs.npmjs.com/trusted-publishers/).
94
+ The repository URL in package.json points to this fork, as required for provenance.
95
+
96
+ The workflow uses OIDC and needs no npm token secret. The npm account setup can
97
+ only be completed after the package exists and by an authorized npm maintainer.
98
+ Keep the workflow filename and repository settings exact. Allow direct `npm publish`
99
+ for this publisher. There is no npm credential included in this repository.
100
+
101
+ Version 2.0.0 is available from npm, and the README's npm badge and installation
102
+ command now refer to the published scoped package.
103
+
104
+ ## Publish a release
105
+
106
+ 1. Merge the desired code, including these workflows, to `main` and wait for CI.
107
+ 2. Create a GitHub release pointing to that commit with a new tag such as `v2.0.1`
108
+ (or `2.0.1`). Release titles are descriptive; the **tag** determines the version.
109
+ 3. Publish the release. The workflow checks out the tag, sets package.json and
110
+ package-lock.json to `2.0.1` in the runner, tests and packs the application.
111
+ 4. The workflow attaches `speedscope-2.0.1.zip` and the scoped npm `.tgz` to the
112
+ GitHub release, then publishes the same tarball to npm with provenance.
113
+
114
+ Use a canonical SemVer tag, optionally prefixed by lowercase `v`. Versions with
115
+ prerelease identifiers (for example `v2.1.0-rc.1`) use npm's `next` dist-tag.
116
+ Marking a GitHub release as a prerelease also selects `next`. Stable releases use
117
+ `latest`. Build metadata (`+...`), abbreviated versions and leading-zero numeric
118
+ identifiers are rejected. Draft releases do not publish.
119
+
120
+ The checked-in package version is a development baseline. Release version changes
121
+ are confined to the runner; the workflow does not create another commit or tag.
122
+ npm versions are immutable: choose a new version for changed release contents.
123
+ Pages follows `main` independently, so publishing an older release cannot roll
124
+ the hosted site back.
125
+
126
+ If publishing fails after archives were attached (for example before npm auth was
127
+ configured), fix authorization and manually run **Publish npm release**, supplying
128
+ the existing release tag. The release must already exist and be non-draft. Retry
129
+ with the existing tag. If that npm version already exists, the workflow skips npm
130
+ publishing and leaves its immutable contents and distribution tags unchanged.
131
+
132
+ For local packaging checks without publishing:
133
+
134
+ ```sh
135
+ npm test
136
+ npm run prepack
137
+ npm pack --dry-run --ignore-scripts
138
+ ```
139
+
140
+ The offline archive includes local fonts and embedded JFR WASM. Extract the ZIP
141
+ and open `index.html`. The published npm package includes the CLI, offline app and
142
+ `FileFormat` types, with the upstream MIT license retained.
@@ -0,0 +1,260 @@
1
+ # Search across profiles and arrange Sandwich panes
2
+
3
+ ## Search all profiles
4
+
5
+ Choose **Profile actions → Search all profiles…**, enter a function name or source
6
+ path, and press Search or Enter. Contains, Whole word and Exact modes use the same
7
+ case-insensitive literal matching as the single-profile search. File paths are
8
+ searched too. There are no arbitrary regular expressions.
9
+
10
+ Each result represents one frame in one profile, with its source location and
11
+ that profile's total/self weights. Different threads and same-named functions in
12
+ different files remain separate. Weights are not added together, and results may
13
+ have different units. Derived profiles are excluded by default; select **Include
14
+ derived profiles** when you want to search filtered/combined views as well.
15
+
16
+ Open a result to switch to its original profile and select that frame in Sandwich.
17
+ Its callers, callees and ordinary search highlights are available there. This also
18
+ works when recursion flattening is enabled. No combined profile or transformed
19
+ recording is created. Replacing the source profiles invalidates pending searches
20
+ and prevents stale results navigating into a different recording.
21
+
22
+ The dialog shows at most 200 results and stops scanning when it finds a further
23
+ match. A truncation message asks you to refine the query; the number shown is not
24
+ claimed to be the complete number of matches. Queries are limited to 4,096
25
+ characters. Editing search options clears the previous results; submit again to
26
+ search with the new settings. Cancel search stops unfinished work, while Close or
27
+ Escape closes the dialog. Clipboard input stays inside the dialog.
28
+
29
+ The search iterates frames lazily and yields based on both frame count and symbol
30
+ text size. It does not enumerate every call occurrence or allocate an unbounded
31
+ result table. Navigation and the existing viewer still have normal profile,
32
+ recursion-flattening, sorting, highlight and rendering costs; the result limit is
33
+ not a hard cap on total browser memory or the cost of opening a large profile.
34
+ A local PLC smoke check searched 17,510 frames across four profiles, found 40
35
+ matches without truncation, and left all profile totals unchanged. It took about
36
+ 148 ms with ten yields in that Node run; this is not a browser latency guarantee.
37
+
38
+ ## Keep a function selected across views
39
+
40
+ Selecting a function in Time Order, Left Heavy or Sandwich now carries that
41
+ function into the other two views of the same profile. Selection uses the frame
42
+ key, so same-named functions from different files remain distinct. Each view
43
+ keeps its own valid call-tree instance and zoom. If it has no instance for the
44
+ newly selected function, it chooses the first matching node in that view's
45
+ depth-first tree order. The view does not automatically change its time range;
46
+ an instance can therefore be outside the current zoom. Search navigation remains
47
+ available to select and zoom into a particular occurrence.
48
+
49
+ Clearing selection carries across views too. Different profiles/threads retain
50
+ their own selection; a newly imported group or newly created derived profile
51
+ starts fresh. Call Tree retains its independent expansion controls.
52
+
53
+ Toggling recursion flattening keeps the function key but discards node/hover and
54
+ caller/callee references from the old tree. Selection is resolved against the
55
+ new visible model. Its aggregate/derived flags are now retained as well, so
56
+ flattening does not accidentally enable Time Order for aggregate data or make a
57
+ derived view count as an original recording.
58
+
59
+ Only one resolved node per graph view and primitive selection keys are stored.
60
+ Model identities use weak keys; there is no per-function occurrence index or
61
+ additional profile copy. A first lookup can scan an entire target tree with
62
+ O(depth) traversal storage. Resolved matches and absent occurrences are reused
63
+ until the model/function changes, so hover and pan updates do not rescan the
64
+ tree. Clearing hovers now emits at most one state update rather than four.
65
+ Cross-profile search resolves directly into Sandwich instead of scanning the
66
+ outgoing graph for an unused occurrence. UI selection is not exported.
67
+
68
+ This implements [#107](https://github.com/jlfwong/speedscope/issues/107).
69
+ Targeted tests cover distinct source files, exact per-view instances, profile
70
+ isolation, empty groups, transformed models, unchanged hover updates and a
71
+ 30,000-level tree. In a PLC Node smoke check, first-occurrence lookup for the
72
+ last source frame took about 7.6 ms in Time Order and 5.5 ms in the grouped tree;
73
+ the full export hash remained unchanged. These are individual measurements,
74
+ not browser responsiveness guarantees.
75
+
76
+ ## Navigate the overview
77
+
78
+ The overview above Time Order and Left Heavy shows an outlined **Visible range**
79
+ for the main graph. The outline uses the theme's foreground and background
80
+ colors together, so it stays distinct from colored frames. Very narrow ranges
81
+ get a minimum visible outline width, without changing the actual viewport or
82
+ profile weights. The outline is clipped below the overview's time axis.
83
+
84
+ Hover inside the visible range for a grab cursor; drag to pan. Outside it, a
85
+ crosshair indicates that dragging selects a new horizontal range. Only the
86
+ primary mouse button starts a drag. Releasing outside the overview, the window
87
+ losing focus, pressing Escape, switching profiles/views or replacing the canvas ends
88
+ the gesture and removes its window listeners. Escape keeps the last viewport.
89
+ Hover cursor changes stay local to the overview, and an active drag restores
90
+ the prior page cursor when it ends.
91
+
92
+ Tab to **Profile overview** to use the keyboard. Left/Right pan by 10% of the
93
+ current width; Up/Down pan by 10% of the viewport height, with a minimum of one
94
+ row. Shift increases these steps to 50%. Plus/Equals halves the width around
95
+ the current center; Minus doubles it. Shift uses quarter/fourfold zoom steps.
96
+ Home restores the full horizontal range and returns to the top. Existing zoom
97
+ and viewport bounds still apply. Modified browser shortcuts such as Ctrl+F
98
+ are left available. A focus outline and accessible description expose the
99
+ current range and controls. This improves overview access without claiming
100
+ that all canvas charts are screen-reader accessible.
101
+
102
+ All overlay and keyboard calculations use only current viewport dimensions;
103
+ they do not scan call occurrences, retain another profile or build an index.
104
+ This implements [#240](https://github.com/jlfwong/speedscope/issues/240) and
105
+ [#241](https://github.com/jlfwong/speedscope/issues/241), and advances
106
+ [#376](https://github.com/jlfwong/speedscope/issues/376).
107
+
108
+ Validation on 2026-11-21 passed 362 Jest tests across 64 suites (307 snapshots),
109
+ five Node tests, type checking, linting, schema/backlog checks and both builds.
110
+ Browser checks verified keyboard zoom/pan/reset, Ctrl+F, pointer pan/range
111
+ selection, restored page cursors and the outline in light/dark themes without
112
+ console errors. A context-replacement regression ensures redraws use the new
113
+ canvas rather than scheduling a stale frame on the old one. PLC streaming
114
+ retained four profiles, 17,510 frames and 1,039,656 call events with its baseline
115
+ export hash; the Node import smoke took about 2.5 seconds. This does not measure
116
+ browser frame rate or establish a total heap cap.
117
+
118
+ ## Bounded graph search
119
+
120
+ Time Order and Left Heavy search navigate at most the first 10,000 matching call
121
+ occurrences in depth-first order. If there are more, the count shows `10000+`
122
+ and a visible status asks you to refine your search. This is a lower bound,
123
+ not the full count. Previous/Next and Enter/Shift+Enter wrap within the retained
124
+ window. A selected frame outside that window shows `?` for its navigation index.
125
+ Use a more specific name/path or Whole word/Exact mode to narrow the query.
126
+
127
+ Matching and graph highlights still inspect full names and source paths, even
128
+ outside the navigation window. Sparse queries can find late occurrences: the
129
+ limit applies to retained matches, not the number of frames searched. Showing
130
+ the limit requires finding one further match, so exactly 10,000 results are
131
+ reported as complete. No widths, weights or exported symbols are changed.
132
+ Search zoom also keeps root-level result labels below the time axis, including
133
+ short charts whose general viewport clamp would otherwise cover the first row.
134
+
135
+ Symbol matching is lazy. Each query caches at most 4,096 boolean frame results
136
+ and 512 highlight lists, evicting old entries and recomputing them when needed.
137
+ Only labels/rows being drawn request name-highlight ranges, capped at the first
138
+ 64 ranges per name. A long, repetitive name can therefore match beyond its
139
+ drawn underlines. File-only matches have no name underlines. Search input is
140
+ limited to 4,096 characters. These are literal modes, not arbitrary regexes.
141
+
142
+ Search no longer builds a full per-symbol highlight map or a rectangle for
143
+ every matching call. Traversal uses O(depth) auxiliary storage and creates a
144
+ navigation rectangle only when a result is opened. Rare/no-match queries can
145
+ still scan an entire graph synchronously; bounded caches can require repeated
146
+ text matching. Existing profile models, graph geometry and Sandwich row lists
147
+ still scale with recording size. Cross-profile search retains its separate
148
+ 200-result limit and cancellation behavior.
149
+
150
+ ## Resize Sandwich panes
151
+
152
+ Select a function in Sandwich to show the table, callers and callees. Drag the
153
+ vertical divider to resize the table against the graphs. Drag the horizontal
154
+ divider to change the callers/callees split. Graph viewports update as you resize.
155
+
156
+ Both dividers are keyboard-focusable separators. Use Left/Right on the table
157
+ divider and Up/Down on the callers/callees divider. Each press moves 2 percentage
158
+ points; hold Shift for 10. Home and End move to the permitted limits. Enter or a
159
+ double-click restores the equal split. Other application shortcuts still work.
160
+
161
+ Pane sizes are clamped to avoid hiding either side, including on small windows.
162
+ Preferences are saved in this browser's local storage on completed drags and
163
+ keyboard actions. They survive reloads and profile changes, but are not part of
164
+ the exported profile. Invalid or unavailable browser storage falls back safely.
165
+
166
+ ## Navigate selected-stack ancestors
167
+
168
+ In Time Order or Left Heavy, select a graph frame to show its stack details.
169
+ Each scope name is now a keyboard-focusable button. Click it or press Enter/Space
170
+ to select that exact ancestor call instance and update its statistics/highlight.
171
+ If the ancestor is above the graph viewport, the graph scrolls up to include it;
172
+ the horizontal range stays unchanged. Source-location links remain separate.
173
+
174
+ Details show at most 100 scopes at a time, starting with the selected frame.
175
+ **Show older ancestors** advances toward the root. **Back to selected frame**
176
+ returns to the start. Selecting a scope starts a fresh page at that scope. This
177
+ keeps the number of DOM rows and source links bounded even for very deep stacks.
178
+ Paging follows only the next 100 parent pointers and retains no complete
179
+ ancestor list or page history. Selecting an ancestor walks its parent chain to
180
+ determine its graph depth, using constant auxiliary space.
181
+
182
+ The helper regression covers a 100,000-level chain and fails if a page walks
183
+ beyond its boundary. UI tests cover paging, exact-instance selection and focus
184
+ restoration. The PLC trace's deepest stack has seven scopes, so it fits on one
185
+ page without changing the imported profile.
186
+
187
+ This implements [ancestor navigation (#350)](https://github.com/jlfwong/speedscope/issues/350).
188
+
189
+ ## Identify recordings and selected functions
190
+
191
+ The browser/window title shows the current file's leaf name, followed by the
192
+ internal recording name when it differs. Thread names remain unchanged in the
193
+ toolbar. A `title` hash parameter still overrides the window title. File names
194
+ are kept as runtime context through worker loading, derived profiles and symbol
195
+ remapping. They are not added to exports: opening an exported recording shows
196
+ the name of that newly opened file. Absolute local directories are discarded
197
+ from this metadata and displayed leaf names are limited to 1,024 characters.
198
+
199
+ Sandwich now shows a **Selected function details** panel above its graphs.
200
+ It displays the full symbol name and source file/line/column, so same-named
201
+ functions from different modules can be distinguished without a hover tooltip.
202
+ Configured source-code links work there too. Missing source metadata is stated
203
+ explicitly. Long names wrap inside a scrollable panel capped at 120 pixels;
204
+ only the selected function gets this panel, without adding a column or index
205
+ across the entire recording.
206
+
207
+ ## Understand the statistics
208
+
209
+ Open **About these statistics** in selected-stack details for contextual help.
210
+ **This Instance** measures the selected call-tree node. In Time Order that node
211
+ represents its call context; in Left Heavy, a node can group multiple calls in
212
+ the same stack context. **All Instances** measures that function across the
213
+ current profile. **Total** includes work in callees; **Self** excludes it.
214
+ Values use the profile's units, including time, bytes or samples.
215
+
216
+ The detail-panel percentages use the entire current profile's weight, including
217
+ idle weight. Sandwich table percentages use its non-idle weight, as explained
218
+ in the column headers. Filtered profiles use their retained weight. For example,
219
+ six units of total work with four self units in a ten-unit recording display
220
+ 60% total and 40% self in details, even when the other four units are idle.
221
+ Zero-weight denominators display 0% with finite bars. Percentage calculations
222
+ also avoid overflow from multiplying very large finite weights by 100 first.
223
+
224
+ These changes implement [#363](https://github.com/jlfwong/speedscope/issues/363),
225
+ [#242](https://github.com/jlfwong/speedscope/issues/242) and
226
+ [#219](https://github.com/jlfwong/speedscope/issues/219).
227
+
228
+ Validation on 2026-11-21 passed all 346 Jest tests across 60 suites (307
229
+ snapshots), five Node tests, type checking, linting, schema/backlog checks and
230
+ both builds. Browser smoke checks covered same-named functions from different
231
+ files, recording/custom titles and expanded statistics help without console
232
+ errors. A PLC streaming smoke retained four profiles, 17,510 frames and
233
+ 1,039,656 call events with the baseline export hash; its import took about
234
+ 2.4 seconds in that Node run. These UI changes add no per-frame context index or
235
+ profile copy. Source-name metadata is one bounded string per group.
236
+
237
+ ## Upstream review
238
+
239
+ The 2026-11-21 shared-selection, Java text-dump, hosted-offline and numerical
240
+ test follow-up passed all 393 Jest tests across 68 suites (307 snapshots), five
241
+ Node tests, type checking, lint, schema/backlog checks, both release builds and
242
+ npm package-content checks. Binary JFR signatures take precedence over embedded
243
+ thread-dump text; the existing unnamed-recording regression covers this case.
244
+ Browser checks covered per-view occurrence retention, same-named source frames,
245
+ recursion/derived profiles, and importing a local Java dump after stopping the
246
+ preview server. An uncached remote recording correctly failed offline.
247
+
248
+ The private PLC streaming check retained four profiles, 17,510 exported frames
249
+ and 1,039,656 call events with SHA-256
250
+ `522de77afbfc4dd94f1f30c3a9551979d12db506305ffef999db9c910ae8eddb`
251
+ (shared data followed by each exported profile, hashed separately). Its final
252
+ Node run took about four seconds to import, with first-occurrence lookup for
253
+ the last source frame taking 5.4 ms in Time Order and 4.2 ms in Left Heavy.
254
+ These are local smoke measurements, not browser performance guarantees.
255
+
256
+ On 2026-11-20, the 30 most recently created open upstream issues were checked.
257
+ Their IDs were already present in the existing 134-issue inventory. This is a
258
+ targeted feature check, not a fresh audit of every issue's open/closed state.
259
+ This follow-up implements [cross-process search (#396)](https://github.com/jlfwong/speedscope/issues/396)
260
+ and [resizable Sandwich panes (#209)](https://github.com/jlfwong/speedscope/issues/209).
@@ -0,0 +1,69 @@
1
+ # Source-code links and compact graph labels
2
+
3
+ ## Open a source location
4
+
5
+ Choose **Profile actions → Source-code links…** after loading a recording.
6
+ Select Visual Studio Code, Visual Studio Code Insiders, or a custom HTTP(S) URL.
7
+ Saving turns source locations in Call Tree and the selected stack's details into
8
+ links. A link opens only when clicked. Disable links in the same dialog.
9
+ Frames without a source file keep their ordinary display.
10
+
11
+ For local editors, the mapped path must be absolute. For example, replace recorded
12
+ prefix `/build/project` with `C:/work/project` to open `/build/project/src/app.ts`
13
+ in your local checkout. Windows separators and file URLs are accepted; Windows
14
+ prefix comparisons ignore case. Prefixes match whole leading path segments,
15
+ so `/build/app` does not match `/build/application`. Locations outside a configured
16
+ prefix stay plain text. Leave both prefixes empty to use the recorded path.
17
+
18
+ The editor presets use the official [VS Code file URI format](https://code.visualstudio.com/docs/configure/command-line#_opening-vs-code-with-urls),
19
+ with the recorded line and column, or 1 when unavailable. Your browser may ask to
20
+ open the editor. The viewer does not check that a local file exists.
21
+
22
+ Custom web templates require a fixed HTTP(S) host and a `{file}` placeholder.
23
+ Optional `{line}` and `{column}` placeholders insert source coordinates.
24
+ For example:
25
+
26
+ ```text
27
+ https://github.com/owner/repository/blob/main/{file}#L{line}
28
+ ```
29
+
30
+ Map a build prefix to an empty replacement to produce repository-relative paths.
31
+ File path segments are URL-encoded, preserving their separators. Embedded
32
+ credentials, other protocols, unknown placeholders and variable hosts are rejected.
33
+ The dialog previews the generated URL without opening it. Choose the repository
34
+ and revision matching the recording; links do not fetch or discover source maps.
35
+
36
+ Settings persist in this browser's local storage. They are not included in an
37
+ exported profile. If storage is unavailable, settings work for the current session.
38
+
39
+ ## Shorten graph path labels
40
+
41
+ Choose **Profile actions → Compact graph path labels** to draw only the final
42
+ component of path-like frame names. Choose **Show full graph labels** to restore
43
+ the original labels. This preference also persists in this browser.
44
+
45
+ Full frame names remain available in hover details, Call Tree, Sandwich's table,
46
+ search and exports. Function signatures containing path-like punctuation are
47
+ preserved. Search still matches the full name: a match entirely inside a hidden
48
+ prefix can highlight a frame without underlining text in its displayed suffix.
49
+
50
+ ## Large traces
51
+
52
+ Neither setting reimports or transforms a recording. Labels are shortened only
53
+ when drawn; source URLs are generated for mounted source locations. Settings
54
+ preview inspects at most 200 frames for a source example and otherwise uses an
55
+ editable example path. No per-frame URL table or second profile is retained.
56
+ Existing graph, call-tree and selected-stack rendering costs still apply.
57
+
58
+ Validation on 2026-11-20 passed all 334 Jest tests (307 snapshots), five Node tests,
59
+ type checking, linting, schema/backlog checks and both application builds.
60
+ Browser checks covered editor and web mappings, persistence, disabling links,
61
+ compact labels and unchanged full names in hover/stack details, with no console
62
+ errors. The private PLC trace streamed in approximately 2.6 seconds; running the
63
+ display helpers across its 17,510 frames took about 3.7 ms in that Node smoke
64
+ check. Its four profiles and 1,039,656 exported call events retained the baseline
65
+ export hash. These measurements do not include browser rendering or hydration,
66
+ and the capture and benchmark artifacts are not committed.
67
+
68
+ These features implement upstream requests [#410](https://github.com/jlfwong/speedscope/issues/410)
69
+ and [#373](https://github.com/jlfwong/speedscope/issues/373).
package/package.json CHANGED
@@ -1,6 +1,125 @@
1
1
  {
2
2
  "name": "@node-projects/speedscope",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.1.0",
4
+ "description": "A fast, interactive performance profile viewer with large-trace improvements, an accessible call tree and offline CLI.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/node-projects/speedscope.git"
8
+ },
9
+ "homepage": "https://node-projects.github.io/speedscope/",
10
+ "bugs": {
11
+ "url": "https://github.com/node-projects/speedscope/issues"
12
+ },
13
+ "engines": {
14
+ "node": ">=22"
15
+ },
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "registry": "https://registry.npmjs.org/"
19
+ },
20
+ "types": "src/lib/file-format-spec.ts",
21
+ "bin": {
22
+ "speedscope": "./bin/cli.mjs"
23
+ },
24
+ "scripts": {
25
+ "backlog:generate": "node scripts/generate-issue-backlog.mjs",
26
+ "backlog:check": "node scripts/generate-issue-backlog.mjs --check",
27
+ "build:pages": "node scripts/prepare-release.mjs --protocol http",
28
+ "deploy": "gh workflow run pages.yml --ref main",
29
+ "release:version": "node scripts/set-release-version.mjs",
30
+ "prepack": "node scripts/prepare-release.mjs",
31
+ "prettier": "prettier --write \"src/**/*.ts\" \"src/**/*.tsx\"",
32
+ "lint": "eslint \"src/**/*.ts\" \"src/**/*.tsx\"",
33
+ "jest": "node scripts/test-setup.mjs && jest --runInBand",
34
+ "coverage": "npm run jest -- --coverage",
35
+ "typecheck": "tsc --noEmit",
36
+ "test:node": "node --test bin/server.test.mjs scripts/set-release-version.test.mjs",
37
+ "schema:check": "node scripts/generate-file-format-schema-json.js --check",
38
+ "test": "npm run typecheck && npm run lint && npm run jest && npm run test:node && npm run schema:check && npm run backlog:check",
39
+ "serve": "tsx scripts/dev-server.ts"
40
+ },
41
+ "files": [
42
+ "src/lib/file-format-spec.ts",
43
+ "docs/RELEASING.md",
44
+ "docs/LARGE_TRACE_PERFORMANCE.md",
45
+ "docs/PROFILE_FILTERS.md",
46
+ "docs/SEARCH_AND_LAYOUT.md",
47
+ "docs/SOURCE_AND_LABELS.md",
48
+ "docs/JAVA_THREAD_DUMPS.md",
49
+ "docs/OFFLINE.md",
50
+ "bin/cli.mjs",
51
+ "bin/server.mjs",
52
+ "dist/release/**",
53
+ "!*.map"
54
+ ],
55
+ "browserslist": [
56
+ "last 2 Chrome versions",
57
+ "last 2 Firefox versions"
58
+ ],
59
+ "author": {
60
+ "name": "node-projects",
61
+ "url": "https://github.com/node-projects"
62
+ },
63
+ "license": "MIT",
64
+ "devDependencies": {
65
+ "@streamparser/json": "0.0.26",
66
+ "@types/jest": "22.2.3",
67
+ "@types/jszip": "3.1.4",
68
+ "@types/node": "14.0.1",
69
+ "@types/pako": "1.0.0",
70
+ "@typescript-eslint/eslint-plugin": "6.16.0",
71
+ "@typescript-eslint/parser": "6.16.0",
72
+ "acorn": "7.2.0",
73
+ "aphrodite": "2.1.0",
74
+ "esbuild": "0.27.0",
75
+ "esbuild-jest": "0.5.0",
76
+ "eslint": "8.0.0",
77
+ "eslint-plugin-prettier": "5.1.2",
78
+ "eslint-plugin-react-hooks": "4.6.0",
79
+ "jest": "30.2.0",
80
+ "jest-environment-jsdom": "29.7.0",
81
+ "jfrview": "0.2.0",
82
+ "jsverify": "0.8.3",
83
+ "jszip": "3.1.5",
84
+ "pako": "1.0.6",
85
+ "preact": "10.4.1",
86
+ "prettier": "3.1.1",
87
+ "protobufjs": "6.8.8",
88
+ "source-map": "0.6.1",
89
+ "ts-jest": "29.4.6",
90
+ "tsx": "4.19.2",
91
+ "typescript": "5.9.3",
92
+ "typescript-json-schema": "0.67.0",
93
+ "uglify-es": "3.2.2",
94
+ "uint8array-json-parser": "0.0.2"
95
+ },
96
+ "jest": {
97
+ "testEnvironment": "jsdom",
98
+ "transform": {
99
+ "^.+\\.tsx?$": "ts-jest",
100
+ "^.+\\.js$": "esbuild-jest"
101
+ },
102
+ "transformIgnorePatterns": [],
103
+ "setupFilesAfterEnv": [
104
+ "./src/jest-setup.js"
105
+ ],
106
+ "moduleNameMapper": {
107
+ "\\jfrview_bg.wasm$": "<rootDir>/src/import/java-flight-record.mock.ts"
108
+ },
109
+ "testRegex": "\\.test\\.tsx?$",
110
+ "collectCoverageFrom": [
111
+ "**/*.{ts,tsx}",
112
+ "!**/*.d.{ts,tsx}"
113
+ ],
114
+ "moduleFileExtensions": [
115
+ "ts",
116
+ "tsx",
117
+ "js",
118
+ "jsx",
119
+ "json"
120
+ ]
121
+ },
122
+ "dependencies": {
123
+ "open": "10.1.0"
124
+ }
125
+ }