@darksheep/request-body 1.1.3 → 1.1.6-alpha.2bd5629

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,48 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.5](https://github.com/DarkSheepSoftware/node-packages/compare/request-body-v1.1.4...request-body-v1.1.5) (2026-10-31)
4
+
5
+
6
+ ### 🩹 Fixes
7
+
8
+ * give published packages real ranges on their sibling packages ([#1216](https://github.com/DarkSheepSoftware/node-packages/issues/1216)) ([5c6df37](https://github.com/DarkSheepSoftware/node-packages/commit/5c6df37d03f94aae39e90e712693f697d7bb2dc1)), closes [#1215](https://github.com/DarkSheepSoftware/node-packages/issues/1215)
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @darksheep/json-schema bumped to 0.1.4
16
+
17
+ ## [1.1.4](https://github.com/DarkSheepSoftware/node-packages/compare/request-body-v1.1.3...request-body-v1.1.4) (2026-10-26)
18
+
19
+
20
+ ### 🩹 Fixes
21
+
22
+ * 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))
23
+
24
+
25
+ ### 📦 Dependencies
26
+
27
+ * **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))
28
+ * **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))
29
+
30
+
31
+ ### 🧪 Tests
32
+
33
+ * **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))
34
+
35
+
36
+ ### Dependencies
37
+
38
+ * The following workspace dependencies were updated
39
+ * dependencies
40
+ * @darksheep/errors bumped from 1.2.1 to 1.2.2
41
+ * @darksheep/json-schema bumped to 0.1.3
42
+ * @darksheep/types bumped to 1.3.2
43
+ * devDependencies
44
+ * @darksheep/fake-fetch bumped to 0.0.4
45
+
3
46
  ## [1.1.3](https://github.com/DarkSheepSoftware/node-packages/compare/request-body-v1.1.2...request-body-v1.1.3) (2026-09-20)
4
47
 
5
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@darksheep/request-body",
3
- "version": "1.1.3",
3
+ "version": "1.1.6-alpha.2bd5629",
4
4
  "description": "http.IncomingMessage to something a little more useful",
5
5
  "license": "UNLICENCED",
6
6
  "type": "module",
@@ -37,21 +37,22 @@
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/json-schema": "",
50
- "@darksheep/types": "",
51
- "@fastify/busboy": "3.2.2"
49
+ "@darksheep/errors": "1.2.2",
50
+ "@darksheep/json-schema": "0.1.5-alpha.2bd5629",
51
+ "@darksheep/types": "^1.3.2",
52
+ "@fastify/busboy": "3.2.4"
52
53
  },
53
54
  "devDependencies": {
54
- "@darksheep/fake-fetch": ""
55
+ "@darksheep/fake-fetch": "^0.0.4"
55
56
  },
56
57
  "engines": {
57
58
  "node": "^20.13.1 || >=22.2.0"
package/types/buffer.d.ts CHANGED
@@ -1,14 +1,9 @@
1
- /**
2
- * @import { Duplex, Readable } from 'node:stream'
3
- * @import { IncomingMessage } from 'node:http'
4
- * @import { MaxLengthOptions } from './utilities/max-length.js'
5
- */
6
- import type { IncomingMessage } from 'node:http';
7
- import type { MaxLengthOptions } from './utilities/max-length.js';
8
- export type ToBufferOptions = (MaxLengthOptions);
9
1
  /**
10
2
  * @param {IncomingMessage} request - The http request object.
11
3
  * @param {MaxLengthOptions} [options] - The request to buffer options.
12
4
  * @returns {Promise<Buffer>}
13
5
  */
14
- export declare function toBuffer(request: IncomingMessage, options?: MaxLengthOptions): Promise<Buffer>;
6
+ export function toBuffer(request: IncomingMessage, options?: MaxLengthOptions): Promise<Buffer>;
7
+ export type ToBufferOptions = (MaxLengthOptions);
8
+ import type { IncomingMessage } from 'node:http';
9
+ import type { MaxLengthOptions } from './utilities/max-length.js';
package/types/form.d.ts CHANGED
@@ -1,13 +1,9 @@
1
- /**
2
- * @import { IncomingMessage } from 'node:http'
3
- * @import { ToBufferOptions } from './buffer.js'
4
- */
5
- import type { IncomingMessage } from 'node:http';
6
- import type { ToBufferOptions } from './buffer.js';
7
- export type ToFormOptions = (ToBufferOptions);
8
1
  /**
9
2
  * @param {IncomingMessage} request - The http request object.
10
3
  * @param {ToFormOptions} [options] - The request to FormData options.
11
4
  * @returns {Promise<FormData>}
12
5
  */
13
- export declare function toForm(request: IncomingMessage, options?: ToFormOptions): Promise<FormData>;
6
+ export function toForm(request: IncomingMessage, options?: ToFormOptions): Promise<FormData>;
7
+ export type ToFormOptions = (ToBufferOptions);
8
+ import type { IncomingMessage } from 'node:http';
9
+ import type { ToBufferOptions } from './buffer.js';
package/types/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { toBuffer } from './buffer.js';
2
- export { toJson } from './json.js';
3
- export { toStream } from './stream.js';
4
- export { toText } from './text.js';
5
- export { toForm, toForm as toFormData, } from './form.js';
6
- export { toQuerystring, toQuerystring as toUrlEncoded, } from './querystring.js';
1
+ export { toBuffer } from "./buffer.js";
2
+ export { toJson } from "./json.js";
3
+ export { toStream } from "./stream.js";
4
+ export { toText } from "./text.js";
5
+ export { toForm, toForm as toFormData } from "./form.js";
6
+ export { toQuerystring, toQuerystring as toUrlEncoded } from "./querystring.js";
package/types/json.d.ts CHANGED
@@ -1,14 +1,3 @@
1
- /**
2
- * @import { IncomingMessage } from 'node:http';
3
- * @import { FromSchema, JSONSchema } from '@darksheep/json-schema';
4
- * @import { ToTextOptions } from './text.js';
5
- */
6
- import type { IncomingMessage } from 'node:http';
7
- import type { FromSchema, JSONSchema } from '@darksheep/json-schema';
8
- import type { ToTextOptions } from './text.js';
9
- export type ToJsonOptions = (ToTextOptions & {
10
- schema: JSONSchema;
11
- });
12
1
  /**
13
2
  * @template {JSONSchema} const Schema - The raw JSON schema.
14
3
  * @template [Data=FromSchema<Schema>] - The typescript type that matches the JSON Schema.
@@ -16,6 +5,13 @@ export type ToJsonOptions = (ToTextOptions & {
16
5
  * @param {ToJsonOptions & { schema: Schema }} [options] - The json options to match.
17
6
  * @returns {Promise<Data>}
18
7
  */
19
- export declare function toJson<const Schema extends JSONSchema, Data = FromSchema<Schema>>(request: IncomingMessage, options?: ToJsonOptions & {
8
+ export function toJson<const Schema extends JSONSchema, Data = FromSchema<Schema>>(request: IncomingMessage, options?: ToJsonOptions & {
20
9
  schema: Schema;
21
10
  }): Promise<Data>;
11
+ export type ToJsonOptions = (ToTextOptions & {
12
+ schema: JSONSchema;
13
+ });
14
+ import type { JSONSchema } from '@darksheep/json-schema';
15
+ import type { FromSchema } from '@darksheep/json-schema';
16
+ import type { IncomingMessage } from 'node:http';
17
+ import type { ToTextOptions } from './text.js';
@@ -1,11 +1,3 @@
1
- /**
2
- * @import { IncomingMessage } from 'node:http'
3
- * @import { ToTextOptions } from './text.js'
4
- */
5
- import type { IncomingMessage } from 'node:http';
6
- import type { ToTextOptions } from './text.js';
7
- import { URLSearchParams } from 'node:url';
8
- export type ToQueryStringOptions = (ToTextOptions);
9
1
  /**
10
2
  * @typedef {(
11
3
  * & ToTextOptions
@@ -16,4 +8,8 @@ export type ToQueryStringOptions = (ToTextOptions);
16
8
  * @param {ToQueryStringOptions} [options] - The request to QueryString options.
17
9
  * @returns {Promise<URLSearchParams>}
18
10
  */
19
- export declare function toQuerystring(request: IncomingMessage, options?: ToQueryStringOptions): Promise<URLSearchParams>;
11
+ export function toQuerystring(request: IncomingMessage, options?: ToQueryStringOptions): Promise<URLSearchParams>;
12
+ export type ToQueryStringOptions = (ToTextOptions);
13
+ import type { IncomingMessage } from 'node:http';
14
+ import { URLSearchParams } from 'node:url';
15
+ import type { ToTextOptions } from './text.js';
package/types/stream.d.ts CHANGED
@@ -1,13 +1,3 @@
1
- /**
2
- * @import { IncomingMessage } from 'node:http'
3
- * @import { ReadableOptions } from 'node:stream'
4
- * @import { ToBufferOptions } from './buffer.js'
5
- */
6
- import type { IncomingMessage } from 'node:http';
7
- import type { ReadableOptions } from 'node:stream';
8
- import type { ToBufferOptions } from './buffer.js';
9
- import { Readable } from 'node:stream';
10
- export type ToStreamOptions = (ToBufferOptions & ReadableOptions);
11
1
  /**
12
2
  * @typedef {(
13
3
  * & ToBufferOptions
@@ -19,4 +9,9 @@ export type ToStreamOptions = (ToBufferOptions & ReadableOptions);
19
9
  * @param {ToStreamOptions} [options] - The options for the readable stream.
20
10
  * @returns {Promise<Readable>}
21
11
  */
22
- export declare function toStream(request: IncomingMessage, options?: ToStreamOptions): Promise<Readable>;
12
+ export function toStream(request: IncomingMessage, options?: ToStreamOptions): Promise<Readable>;
13
+ export type ToStreamOptions = (ToBufferOptions & ReadableOptions);
14
+ import type { IncomingMessage } from 'node:http';
15
+ import { Readable } from 'node:stream';
16
+ import type { ToBufferOptions } from './buffer.js';
17
+ import type { ReadableOptions } from 'node:stream';
package/types/text.d.ts CHANGED
@@ -1,12 +1,3 @@
1
- /**
2
- * @import { IncomingMessage } from 'node:http'
3
- * @import { ToBufferOptions } from './buffer.js'
4
- */
5
- import type { IncomingMessage } from 'node:http';
6
- import type { ToBufferOptions } from './buffer.js';
7
- export type ToTextOptions = (ToBufferOptions & {
8
- encoding?: BufferEncoding;
9
- });
10
1
  /**
11
2
  * @typedef {(
12
3
  * & ToBufferOptions
@@ -18,4 +9,9 @@ export type ToTextOptions = (ToBufferOptions & {
18
9
  * @param {ToTextOptions} [options] - The options for converting to text.
19
10
  * @returns {Promise<string>}
20
11
  */
21
- export declare function toText(request: IncomingMessage, options?: ToTextOptions): Promise<string>;
12
+ export function toText(request: IncomingMessage, options?: ToTextOptions): Promise<string>;
13
+ export type ToTextOptions = (ToBufferOptions & {
14
+ encoding?: BufferEncoding;
15
+ });
16
+ import type { IncomingMessage } from 'node:http';
17
+ import type { ToBufferOptions } from './buffer.js';
@@ -1,10 +1,3 @@
1
- import { Transform } from 'node:stream';
2
- export type MaxLengthOptions = {
3
- /**
4
- * - The maximum number of bytes.
5
- */
6
- maxBytes?: number;
7
- };
8
1
  /**
9
2
  * @typedef MaxLengthOptions
10
3
  * @property {number} [maxBytes] - The maximum number of bytes.
@@ -13,4 +6,11 @@ export type MaxLengthOptions = {
13
6
  * @param {MaxLengthOptions} [options] - The maximum length of the stream allowed.
14
7
  * @returns {Transform}
15
8
  */
16
- export declare function limitMaxLength({ maxBytes }?: MaxLengthOptions): Transform;
9
+ export function limitMaxLength({ maxBytes }?: MaxLengthOptions): Transform;
10
+ export type MaxLengthOptions = {
11
+ /**
12
+ * - The maximum number of bytes.
13
+ */
14
+ maxBytes?: number;
15
+ };
16
+ import { Transform } from 'node:stream';