Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update hexoid to v2 #982

Merged
merged 3 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -66,7 +66,7 @@
},
"dependencies": {
"dezalgo": "^1.0.4",
"hexoid": "^1.0.0",
"hexoid": "^2.0.0",
"once": "^1.4.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/Formidable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
});
Expand Down Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading