@darksheep/request-body 1.1.2 โ†’ 1.1.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,42 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.4](https://github.com/DarkSheepSoftware/node-packages/compare/request-body-v1.1.3...request-body-v1.1.4) (2026-10-26)
4
+
5
+
6
+ ### ๐Ÿฉน Fixes
7
+
8
+ * build published types with the repo's typescript ([#1117](https://github.com/DarkSheepSoftware/node-packages/issues/1117)) ([c14d1de](https://github.com/DarkSheepSoftware/node-packages/commit/c14d1dec79596718729149114d2bc716c3f2fe37))
9
+
10
+
11
+ ### ๐Ÿ“ฆ Dependencies
12
+
13
+ * **pkg:** update dependency @fastify/busboy to v3.2.3 ([#1140](https://github.com/DarkSheepSoftware/node-packages/issues/1140)) ([3c725d6](https://github.com/DarkSheepSoftware/node-packages/commit/3c725d67b4950dba5cc1472db6265ece6bf1e12b))
14
+ * **pkg:** update dependency @fastify/busboy to v3.2.4 ([#1161](https://github.com/DarkSheepSoftware/node-packages/issues/1161)) ([ac0f107](https://github.com/DarkSheepSoftware/node-packages/commit/ac0f10759006cdbadce00896e6ac5239b1658d2e))
15
+
16
+
17
+ ### ๐Ÿงช Tests
18
+
19
+ * **request-body:** count form keys without Iterator helpers ([#1132](https://github.com/DarkSheepSoftware/node-packages/issues/1132)) ([1e661c5](https://github.com/DarkSheepSoftware/node-packages/commit/1e661c5ab1b59fd2bc3ebb738ebe89ee0fbc6aa7))
20
+
21
+
22
+ ### Dependencies
23
+
24
+ * The following workspace dependencies were updated
25
+ * dependencies
26
+ * @darksheep/errors bumped from 1.2.1 to 1.2.2
27
+ * @darksheep/json-schema bumped to 0.1.3
28
+ * @darksheep/types bumped to 1.3.2
29
+ * devDependencies
30
+ * @darksheep/fake-fetch bumped to 0.0.4
31
+
32
+ ## [1.1.3](https://github.com/DarkSheepSoftware/node-packages/compare/request-body-v1.1.2...request-body-v1.1.3) (2026-09-20)
33
+
34
+
35
+ ### ๐Ÿ“ฆ Dependencies
36
+
37
+ * **pkg:** update dependency @fastify/busboy to v3.2.1 ([#940](https://github.com/DarkSheepSoftware/node-packages/issues/940)) ([87c873b](https://github.com/DarkSheepSoftware/node-packages/commit/87c873bcad908ce64764788bf76f83ef32d6329d))
38
+ * **pkg:** update dependency @fastify/busboy to v3.2.2 ([#955](https://github.com/DarkSheepSoftware/node-packages/issues/955)) ([5ef0809](https://github.com/DarkSheepSoftware/node-packages/commit/5ef08093a15652913417ac101ed5f98c3fe14d87))
39
+
3
40
  ## [1.1.2](https://github.com/DarkSheepSoftware/node-packages/compare/request-body-v1.1.1...request-body-v1.1.2) (2026-04-17)
4
41
 
5
42
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darksheep/request-body",
3
- "version": "1.1.2",
3
+ "version": "1.1.4",
4
4
  "description": "http.IncomingMessage to something a little more useful",
5
5
  "license": "UNLICENCED",
6
6
  "type": "module",
@@ -37,23 +37,27 @@
37
37
  "files": [
38
38
  "src",
39
39
  "types",
40
- "!*.test.*"
40
+ "!*.test.*",
41
+ "!*.tsbuildinfo"
41
42
  ],
42
43
  "scripts": {
43
- "prepack": "yarn dlx -q -p typescript tsc",
44
+ "prepack": "rm -rf types && yarn run -T tsc -b",
44
45
  "test": "node --test src/**/*.test.js",
45
46
  "test:watch": "node --watch --test src/**/*.test.js"
46
47
  },
47
48
  "dependencies": {
48
- "@darksheep/errors": "1.2.1",
49
+ "@darksheep/errors": "1.2.2",
49
50
  "@darksheep/json-schema": "",
50
51
  "@darksheep/types": "",
51
- "@fastify/busboy": "3.2.0"
52
+ "@fastify/busboy": "3.2.4"
52
53
  },
53
54
  "devDependencies": {
54
55
  "@darksheep/fake-fetch": ""
55
56
  },
56
57
  "engines": {
57
58
  "node": "^20.13.1 || >=22.2.0"
59
+ },
60
+ "publishConfig": {
61
+ "access": "public"
58
62
  }
59
63
  }
@@ -15,15 +15,15 @@ const lengths = new WeakMap();
15
15
  * @returns {Transform}
16
16
  */
17
17
  export function limitMaxLength({ maxBytes = 1_000_000 } = {}) {
18
- return new Transform({
18
+ const stream = new Transform({
19
19
  transform(chunk, _encoding, callback) {
20
20
  if (Buffer.isBuffer(chunk) === false) {
21
21
  callback(new Error('Cannot chunk, not buffer'));
22
22
  return;
23
23
  }
24
- const current = lengths.get(this) ?? 0;
24
+ const current = lengths.get(stream) ?? 0;
25
25
  const next = current + chunk.length;
26
- lengths.set(this, next);
26
+ lengths.set(stream, next);
27
27
 
28
28
  if (next > maxBytes) {
29
29
  callback(new Error('Maximum stream length exceeded'));
@@ -33,4 +33,6 @@ export function limitMaxLength({ maxBytes = 1_000_000 } = {}) {
33
33
  callback(null, chunk);
34
34
  },
35
35
  });
36
+
37
+ return stream;
36
38
  }