TradJS 4.7.0 in testing: 1,902 tests and 118 browser steps on the development branch
Contents
Repository: https://github.com/7flash/TradJS · On npm today: tradjs 4.6.5 · Tested here: the 4.7.0 development branch, 19 November 2026, Bun 1.4.3 on Windows 11.

A page script throws while starting. The overlay names the source file and line (app/page.client.tsx:5:9), and the same line is printed in the terminal.
What 4.7.0 adds#
| Feature | How it was checked | Result |
|---|---|---|
Starter app (tradjs init --template app): accounts, notes, live updates over websockets |
headless Chrome drives a freshly scaffolded app | 43 of 43 steps |
| Development mode: edits to pages, layouts, CSS, browser scripts, the database module and middleware show up without a restart | Chrome reloads after each edit on disk | 75 of 75 steps |
| The same, 50 edits in a row | server memory sampled after every edit | 197 MiB at the start, 189 MiB at the end |
| Security review of everything new | 46 attack tests | 46 pass; 12 fail with the fixes removed |
Trusted proxies (trustProxy) |
1,120 combinations of real and forged forwarding headers | all match addresses computed independently |
| File serving that verifies the file after opening it | 62 tests that swap the file or folder mid-request | 54 pass, 8 symlink cases skipped on Windows |
| Websocket limits: frame size, message rate, sockets per user, idle and slow clients, upgrade rate | a matrix at, under and over every limit; 10,000 open/close cycles | all pass; every counter ends at zero |
| Starter under load with the limits on | 200 signed-in sockets on two server processes, 2,000 writes | every user received exactly their own 10 updates; server memory 204 MiB to 220 MiB |
tradjs upgrade-check: scans an existing app and lists what behaves differently on 4.7.0 (39 rules) |
run on 73 real apps | all 73 finish; peak memory 280 MiB on the largest |
| Whole suite | bun test |
1,902 pass, 14 skipped, 0 fail |
Bugs found by running it#
Each was found by a check, fixed, and is now covered by a test.
- New apps answered 500. A test had left a live database inside the starter template, and
tradjs initcopied it into every new project.initnow leaves out data folders,node_modulesand stray database files. - Server-only code could reach the browser through a symlink. The build checked the written import path, and now checks where it really points.
- A form post from another site was accepted when it carried a foreign
Refererand noOrigin. It now gets 403. - A compressed file could be answered with "not modified" for a browser that only had the uncompressed one: both shared one ETag. Each encoding has its own.
- Logging in left the old session valid, and a login for an unknown email returned faster than a wrong password, which told an attacker which emails exist.
- In development,
<Head>tags from a page were dropped and a syntax error showed no file or line. - The first visitors after a start got uncached pages: requests that arrived while static pages were still being generated bypassed the cache. They now wait for it.
- Static pages behind a login could be generated once and served to everyone. A static page under middleware is now refused at start unless it declares
ssg = { public: true }.
What 73 real apps did to the upgrade checker#
The checker passed its 39 pairs of test apps and then met real code.
- It crashed on 21 of the 73 apps. An attribute written without a value (
<div data-open>) had no value node to inspect. - It reached 15 GB of memory, three times, on one app. That folder holds 1 GB of bundled JavaScript from browser profiles; the checker parsed every file and kept every syntax tree. Files over 512 KiB are now skipped and counted, 8 syntax trees are kept, and the same folder scans at a peak of 280 MiB. A test with 60 MiB of source measured 3,265 MiB before the fix and stays under 600 MiB.
- It printed 2,296 lines for one rule. Items to review are now one block per rule with the first five places and a count.
- It reported old files in dot-folders and stylesheets the framework never touches. Both removed.
Across the apps the most common findings are loose dependency ranges (latest or *, 41 apps), the old melina package name (13 apps) and a tsconfig without jsxImportSource (16 apps); --fix corrects the last two.
New in the starter#
deploy/ holds a Dockerfile, a Compose file with Caddy in front, an nginx config and a systemd unit. A checker compares them with the app (ports, paths, user, data volume, forwarded headers) and passes. The server drains open requests on SIGTERM, and /__tradjs/health answers 503 while it shuts down.
Limits of this run#
- One machine, Windows 11. Symlink cases that need administrator rights were skipped.
- The Docker image was checked by the config checker and has not been built.
- Shutdown was tested with injected signals inside the test process.
- The 10-minute production build check passed its first 5 steps (build, hashed file names, no secrets or source maps in the output, byte-identical repeat builds, start from another folder) and was not completed.
Try it#
4.6.5 is the current release:
bun add tradjs
bunx tradjs init my-app
The book on the three libraries: https://diadem.fun/coin/berlian/plain-web-stack
One person, many companies, one coin. Every project I build sends a share of its revenue back to buy $BERLIAN on the open market, and every buy is published with its transaction.
More from Gor Berlian
CNC foam-panel router: assembly in 42 pictures
42 steps, each with a picture of the whole machine and a close-up of the parts added. English and Indonesian.
1,008,000 gravity
The Plain Web Stack
TradJS, sqlite-zod-orm and measure-fn: what they are, how they are tested, and when to use them. A short book, November 2026.

measure-fn: see where the time goes
Repository: https://github.com/7flash/measure-fn · Package: bun add measure-fn or npm install measure-fn (version 6.0.0) · License: MIT · Dependencies: none