fulmine.js 5.21.0 → 5.21.2

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.
package/README.md CHANGED
@@ -25,11 +25,11 @@ const express = require("fulmine.js"); // instead of require("express")
25
25
  ## Why Fulmine
26
26
 
27
27
  - **Faster than Express, measured.** 1.3x to 4.9x on plain routing, 2x to 5x on a request with a body,
28
- 7x to 20x on a large route table, on every CI run. Routes are matched in C++ by µWS's own router,
28
+ 7x to 20x on a large route table. Routes are matched in C++ by µWS's own router,
29
29
  and a simple enough handler is answered without running any JavaScript at all.
30
30
  - **Zero rewrite.** `helmet`, `cors`, `passport`, `morgan`, `multer`, `express-session` and the rest of
31
31
  the Express ecosystem keep working. Not "mostly": every test runs against real Express first and the
32
- output must match byte for byte, and Express 5's own test suite passes whole, 1130 of 1130.
32
+ output must match byte for byte, and Express 5's own test suite passes whole.
33
33
  - **Your framework works too.** NestJS, Next.js, Astro, SvelteKit, React Router, Angular SSR, Apollo
34
34
  Server, tRPC, tsoa, MCP servers: each one is served twice in CI, on Express and on Fulmine, and compared.
35
35
  - **Ranked in public.** See [HttpArena](https://www.http-arena.com/#sort=rps:-1&q=Js) and
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fulmine.js",
3
- "version": "5.21.0",
3
+ "version": "5.21.2",
4
4
  "description": "Drop-in Express 5 replacement on uWebSockets.js, up to 20x faster. Same API, your middleware and framework keep working.",
5
5
  "main": "src/index.js",
6
6
  "exports": {
@@ -116,7 +116,7 @@
116
116
  "statuses": "^2.0.2",
117
117
  "tseep": "^1.3.1",
118
118
  "type-is": "^2.1.0",
119
- "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.69.0",
119
+ "uWebSockets.js": "github:uNetworking/uWebSockets.js#v20.71.0",
120
120
  "vary": "^1.1.2"
121
121
  },
122
122
  "peerDependencies": {
@@ -164,7 +164,6 @@
164
164
  "eslint-plugin-sonarjs": "^4.2.0",
165
165
  "etag": "^1.8.1",
166
166
  "eventsource": "^5.0.0",
167
- "exit-hook": "^5.1.0",
168
167
  "express": "^5",
169
168
  "express-art-template": "^1.0.1",
170
169
  "express-basic-auth": "^1.2.1",
package/src/adopt.js CHANGED
@@ -14,20 +14,10 @@ See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */
16
16
 
17
- // The commands that edit a config file rather than source: `npx fulmine.js override`,
18
- // `npx fulmine.js angular` and `npx fulmine.js pnpm`.
19
- //
20
- // `migrate` rewrites `require("express")` in your own files. The cases it cannot reach are each
21
- // a line in a config file:
22
- //
23
- // override A framework built on Express requires it in its own code, so there is no specifier
24
- // to rewrite. Every package manager can answer `express` with this package instead,
25
- // and each one spells it differently.
26
- // angular An Angular server bundle is built with esbuild, which inlines every dependency and
27
- // cannot load uWS's native binary. Two names in `externalDependencies` fix it.
28
- // pnpm pnpm 10.26 and later refuse a git dependency of a dependency, and µWebSockets.js
29
- // is one. A direct dependency is allowed, so the project takes it on itself and an
30
- // override drops the copy this package asks for.
17
+ // The commands that edit a config file, the cases `migrate` cannot reach by rewriting a specifier:
18
+ // override a framework requires express in its own code, so the package manager answers it
19
+ // angular the esbuild server bundle cannot inline uWS's binary, two externalDependencies
20
+ // pnpm pnpm >= 10.26 refuses a git dependency of a dependency, the project takes it on itself
31
21
 
32
22
  "use strict";
33
23
 
@@ -78,11 +68,8 @@ function indentOf(source) {
78
68
  }
79
69
 
80
70
  /**
81
- * Reads a JSON file, or explains why it could not be read rather than throwing a parser error.
82
- *
83
- * The read is attempted rather than guarded by an existence check: both commands write the file
84
- * they read, and a check followed by a write to the same path is a race. `code` is what a caller
85
- * names the missing file by.
71
+ * Reads a JSON file, or explains why it could not be read. No existence check first, a check
72
+ * then a write is a race.
86
73
  *
87
74
  * @param {string} file
88
75
  * @returns {{data: any, source: string}|{error: string, code: string|undefined}}
@@ -353,10 +340,9 @@ function withPnpmOverride(source) {
353
340
  /**
354
341
  * npx fulmine.js pnpm [dir] [--dry-run]
355
342
  *
356
- * Makes a pnpm project install this package, which pnpm 10.26 and later otherwise refuse: the
357
- * project takes µWebSockets.js as a direct dependency, at the spec this package pins, and an
358
- * override in pnpm-workspace.yaml drops the copy this package asks for. pnpm 11 reads its
359
- * settings from that file only, so package.json's `pnpm` field is not where this goes.
343
+ * Makes a pnpm project install this package: µWebSockets.js as a direct dependency at the pinned
344
+ * spec, and an override in pnpm-workspace.yaml (the only file pnpm 11 reads) dropping the copy
345
+ * this package asks for.
360
346
  *
361
347
  * @param {string[]} argv everything after the command name
362
348
  * @returns {number} exit code