From bf0f27e3560f544fe8453440a80651a0085209e8 Mon Sep 17 00:00:00 2001 From: Ilia Choly Date: Sat, 12 Oct 2024 12:56:53 -0400 Subject: [PATCH 1/3] fix: update hexoid to v2 --- package.json | 2 +- src/Formidable.js | 6 +++--- yarn.lock | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 0561e069..a06d303b 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ }, "dependencies": { "dezalgo": "^1.0.4", - "hexoid": "^1.0.0", + "hexoid": "^2.0.0", "once": "^1.4.0" }, "devDependencies": { diff --git a/src/Formidable.js b/src/Formidable.js index 0e9a1536..7cc722bf 100644 --- a/src/Formidable.js +++ b/src/Formidable.js @@ -6,7 +6,7 @@ import path from 'node:path'; import fsPromises from 'node:fs/promises'; import { EventEmitter } from 'node:events'; import { StringDecoder } from 'node:string_decoder'; -import hexoid from 'hexoid'; +import { hexoid } from 'hexoid'; import once from 'once'; import dezalgo from 'dezalgo'; import { octetstream, querystring, multipart, json } from './plugins/index.js'; @@ -187,7 +187,7 @@ class IncomingForm extends EventEmitter { if (!cb) { let resolveRef; let rejectRef; - promise = new Promise((resolve, reject) => { + promise = new Promise((resolve, reject) => { resolveRef = resolve; rejectRef = reject; }); @@ -380,7 +380,7 @@ class IncomingForm extends EventEmitter { part.on('data', (buffer) => { this._totalFileSize += buffer.length; fileSize += buffer.length; - + if (this._totalFileSize > this.options.maxTotalFileSize) { this._error( new FormidableError( diff --git a/yarn.lock b/yarn.lock index 3ecef30f..9434db9e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2638,10 +2638,10 @@ hasha@^5.0.0: is-stream "^2.0.0" type-fest "^0.8.0" -hexoid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-1.0.0.tgz#ad10c6573fb907de23d9ec63a711267d9dc9bc18" - integrity sha512-QFLV0taWQOZtvIRIAdBChesmogZrtuXvVWsFHZTk2SU+anspqZ2vMnoLg7IE1+Uk16N19APic1BuF8bC8c2m5g== +hexoid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/hexoid/-/hexoid-2.0.0.tgz#fb36c740ebbf364403fa1ec0c7efd268460ec5b9" + integrity sha512-qlspKUK7IlSQv2o+5I7yhUd7TxlOG2Vr5LTa3ve2XSNVKAL/n/u/7KLvKmFNimomDIKvZFXWHv0T12mv7rT8Aw== hosted-git-info@^2.1.4: version "2.8.9" From 82f2d1f3c10dcc56700ae23b1d2126b5094b6cc9 Mon Sep 17 00:00:00 2001 From: GrosSacASacs Date: Fri, 18 Oct 2024 16:29:05 +0200 Subject: [PATCH 2/3] doc: version notes --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b231847c..a8b552ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +### 3.5.2 + + * fix: ([#982](https://github.com/node-formidable/formidable/pull/982)) make it easier to import hexoid with webpack + ### 3.5.1 * fix: ([#945](https://github.com/node-formidable/formidable/pull/945)) multipart parser fix: flush or fail always (don't hang) From 132c03fc61e7f948c754ad6219942bb61fdef554 Mon Sep 17 00:00:00 2001 From: GrosSacASacs Date: Fri, 18 Oct 2024 16:35:22 +0200 Subject: [PATCH 3/3] doc: version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a06d303b..4daa709b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "formidable", - "version": "3.5.1", + "version": "3.5.2", "license": "MIT", "description": "A node.js module for parsing form data, especially file uploads.", "homepage": "https://github.com/node-formidable/formidable",