-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Using bun, with bun update to update all and then on benchmark.mjs importing package.json to get the versions:
something like this:
import pkg from "./package.json" with { type: "json" };
// ...
const farmVersion = pkg.devDependencies["@farmfe/core"].replace("^", "");
const rsbuildVersion = pkg.devDependencies["@rsbuild/core"].replace("^", "");
const viteVersion = pkg.devDependencies.vite.replace("^", "");
const webpackVersion = pkg.devDependencies.webpack.replace("^", "");
// modified bits
const brandColor = new Map([
[`Farm ${farmVersion}`, purple],
[`Farm ${farmVersion} (Hot)`, purple],
[`RsBuild ${rsbuildVersion}`, green],
[`RsBuild ${rsbuildVersion} (Hot)`, green],
[`Vite ${viteVersion}`, magenta],
[`Vite ${viteVersion} (Hot)`, magenta],
[`Webpack ${webpackVersion}`, cyan],
[`Webpack ${webpackVersion} (Hot)`, cyan],
]);
// modified bits
const buildTools = [
new BuildTool(
`Farm ${farmVersion}`,
9000,
"start:farm",
/Ready\s*in\s*(.+?)(m?s)/,
"build:farm",
/completed\s*in\s*(.+?)(m?s)/,
"@farmfe/cli/bin/farm.mjs",
),
// etc...Example: https://github.com/chneau/farm-performance-compare
It makes it easier to have a up to date picture compared to other tools:
as of now 2025-03-17:
Metadata
Metadata
Assignees
Labels
No labels
