Skip to content

Add Node and Bun labels to bars in chart #1547

Open
@vbudovski

Description

@vbudovski

It's very difficult to tell which bar belongs to which runtime in the chart. It would be good add a label so it's clear. Ideally, it would be formatted as <Node version> <V8 version> e.g. Node v22.12.0 V8 12.4.254.21-node.21. For Bun, it would be very similar <Bun version> <WebKit version> e.g. Bun 1.1.43 WebKit 2.47.2.

Getting the Node versions is very easy:

node --version
// v22.12.0
node -p process.versions.v8
// 12.4.254.21-node.21

For Bun it's a little bit less easy:

bun --version
// 1.1.43
bun bun-version.js
// 2.47.2

bun-version.js

// `process.versions.webkit` gives the commit hash of the forked WebKit.
const releases = await fetch(
  `https://raw.githubusercontent.com/oven-sh/WebKit/${process.versions.webkit}/Source/WebKit/wpe/NEWS`,
).then(response => response.text());
const release = releases
  .matchAll(/^WPE WebKit (?<release>\d+\.\d+\.\d)+$/gm)
  .map(m => m.groups.release)
  .next().value;
console.log(release);
Screenshot 2025-01-13 at 8 10 02 pm

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions