`BENCHMARKS.md` answered "how does this compare to fastify" and nothing answered "did the last two months cost anything". Those are different questions and the second one is the one a release has to pass, so it needed its own tool rather than a second reading of the first one's table. `npm run bench:compare` runs two worktrees of this repository against each other on one box in one sitting, alternating which side goes first each round so drift lands on both rather than on whichever ran second. It shares one `node_modules` and one byte-identical server file, which holds everything except `src/` constant — and is only sound while `package.json` has not moved between the revisions, which the header says out loud. Three things it refuses to do quietly, each of which it did once before being taught not to: - A run whose connections all errored reports 0 req/s, and a median absorbs that without complaint. Non-2xx, errors and timeouts now fail the case, and so does a zero. Not on the warmup, which exists to absorb exactly the cold-start noise a fresh server produces. - A range-overlap check flags a row as directional, and its own documentation says to treat that as "measure it again", never as a result. Three samples of two overlapping distributions separate by chance often enough to have produced a regression report that five rounds then erased. - `cors.origins` invocations are counted rather than timed. The benchmark's predicate is a `Set` lookup, so calls saved are invisible in req/s — but the option takes a function so it can be a lookup, and there the same saving is a network round trip. **The runtime servers finally run.** `bench/servers/green-tea-deno.ts` and `-bun.ts` were written in July and referenced by nothing — not the runner, not a script, not CI. The runner only knew how to launch Node, so both sat there looking like coverage the table did not have. Launchers are per runtime now and they get their own section, kept out of the cross-framework tables because a green-tea-on-Bun row beside fastify-on-Node reads as a comparison nobody made. `green-tea-node.ts` is new and loads `dist/` like its Deno and Bun counterparts. The runtimes table exists to vary the runtime, and a Node row reading `src/` through tsx would have varied the load form at the same time. A route-table-width dimension, because every matcher cost scales with how many candidates a request walks past and the tables here use six routes. Three separate matcher findings measured as noise before this existed, which said nothing about them and everything about the instrument. Finally, `run.ts` preserves whatever sits below a marker instead of overwriting the file whole. The tables answer what is true today; the notes below them carry which release moved a number and what the move bought, and regenerating used to delete that silently. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
165 lines
4.3 KiB
JSON
165 lines
4.3 KiB
JSON
{
|
|
"name": "@green-tea/core",
|
|
"version": "26.8.0-beta.1",
|
|
"description": "A zen, opinionated, type-safe framework \u2014 your API is a graph, not a middleware chain.",
|
|
"license": "MIT",
|
|
"author": "green-tea contributors <projects@expressive-tea.io>",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/Expressive-Tea/green-tea.git"
|
|
},
|
|
"bugs": {
|
|
"url": "https://github.com/Expressive-Tea/green-tea/issues",
|
|
"email": "projects@expressive-tea.io"
|
|
},
|
|
"homepage": "https://green-tea.expressive-tea.io/docs/",
|
|
"keywords": [
|
|
"http",
|
|
"framework",
|
|
"typescript",
|
|
"dependency-injection",
|
|
"decorators",
|
|
"dependency-graph",
|
|
"sse",
|
|
"websocket",
|
|
"streaming",
|
|
"node"
|
|
],
|
|
"engines": {
|
|
"node": ">=18"
|
|
},
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"type": "commonjs",
|
|
"main": "./dist/index.js",
|
|
"module": "./dist/index.mjs",
|
|
"types": "./dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"import": {
|
|
"types": "./dist/index.d.mts",
|
|
"default": "./dist/index.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/index.d.ts",
|
|
"default": "./dist/index.js"
|
|
}
|
|
},
|
|
"./deno": {
|
|
"import": {
|
|
"types": "./dist/deno.d.mts",
|
|
"default": "./dist/deno.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/deno.d.ts",
|
|
"default": "./dist/deno.js"
|
|
}
|
|
},
|
|
"./bun": {
|
|
"import": {
|
|
"types": "./dist/bun.d.mts",
|
|
"default": "./dist/bun.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/bun.d.ts",
|
|
"default": "./dist/bun.js"
|
|
}
|
|
},
|
|
"./edge": {
|
|
"import": {
|
|
"types": "./dist/edge.d.mts",
|
|
"default": "./dist/edge.mjs"
|
|
},
|
|
"require": {
|
|
"types": "./dist/edge.d.ts",
|
|
"default": "./dist/edge.js"
|
|
}
|
|
}
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"assets",
|
|
"README.md",
|
|
"CHANGELOG.md",
|
|
"LICENSE"
|
|
],
|
|
"scripts": {
|
|
"build": "tsup",
|
|
"test": "vitest run",
|
|
"test:dev": "vitest",
|
|
"test:deno": "deno test --allow-net --allow-read --allow-run --allow-env --no-check test/deno/",
|
|
"test:bun": "bun test test/bun/",
|
|
"test:edge": "tsx test/edge/run.ts",
|
|
"test:all": "npm test && npm run test:deno && npm run test:bun && npm run test:edge && deno publish --dry-run --allow-dirty",
|
|
"typecheck": "tsc --noEmit -p tsconfig.json",
|
|
"typecheck:bench": "tsc --noEmit -p bench/tsconfig.json",
|
|
"lint": "eslint src",
|
|
"lint:fix": "eslint src --fix",
|
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
"format:check": "prettier --check \"src/**/*.ts\"",
|
|
"complexity": "ccts src",
|
|
"complexity:check": "node scripts/check-complexity.mjs",
|
|
"complexity:cyclomatic": "cyclomatic-complexity \"src/**/*.ts\" -tw 15 -te 25",
|
|
"bench": "tsx bench/run.ts",
|
|
"bench:compare": "tsx bench/compare.ts",
|
|
"prepublishOnly": "npm run lint && npm run complexity:check && npm run typecheck && npm test && npm run build",
|
|
"prepare": "git config core.hooksPath .githooks || true"
|
|
},
|
|
"dependencies": {
|
|
"reflect-metadata": "0.2.2"
|
|
},
|
|
"peerDependencies": {
|
|
"busboy": "^1.6.0",
|
|
"ws": "^8.18.0"
|
|
},
|
|
"peerDependenciesMeta": {
|
|
"busboy": {
|
|
"optional": true
|
|
},
|
|
"ws": {
|
|
"optional": true
|
|
}
|
|
},
|
|
"overrides": {
|
|
"find-my-way": "9.7.0",
|
|
"autocannon": {
|
|
"hyperid": {
|
|
"uuid": "11.1.1"
|
|
}
|
|
},
|
|
"undici": "7.29.0"
|
|
},
|
|
"devDependencies": {
|
|
"@eslint/js": "^9.39.5",
|
|
"@nestjs/common": "^11.1.28",
|
|
"@nestjs/core": "^11.1.28",
|
|
"@nestjs/platform-express": "^11.1.28",
|
|
"@nestjs/platform-fastify": "^11.1.28",
|
|
"@stylistic/eslint-plugin": "^5.10.0",
|
|
"@types/autocannon": "^7.12.7",
|
|
"@types/busboy": "^1.5.4",
|
|
"@types/express": "^5.0.6",
|
|
"@types/node": "^18.19.0",
|
|
"@types/ws": "^8.18.1",
|
|
"autocannon": "^8.0.0",
|
|
"busboy": "^1.6.0",
|
|
"cognitive-complexity-ts": "^0.8.2",
|
|
"eslint": "^9.39.5",
|
|
"esbuild": "0.27.2",
|
|
"express": "^5.2.1",
|
|
"fastify": "^5.11.0",
|
|
"graphql": "^16.9.0",
|
|
"miniflare": "^4.20260730.0",
|
|
"prettier": "^3.9.6",
|
|
"rxjs": "^7.8.2",
|
|
"tsup": "^8.5.1",
|
|
"tsx": "^4.23.5",
|
|
"typescript": "^5.5.0",
|
|
"typescript-eslint": "^8.65.0",
|
|
"vite": "^6.4.3",
|
|
"vitest": "^3.2.7",
|
|
"ws": "^8.21.1"
|
|
}
|
|
}
|