Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
node-version: ['lts/*']
node-version: [18, 20, 22, 'lts/*']

steps:
- name: Checkout
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Changelog

### 3.5.4

- fix the `os.machine` breaking some dependents, fix [#994](https://github.com/node-formidable/formidable/issues/994)
- add Node 16, 18, 20, 22 to CI/CD

### 3.5.3

- security report by ZAST.AI help for some vulnerabilities addressing (primarily the random names generation)
- update failing tests
- update CI/CD workflows and actions;
- update CodeQL github action for security analysis
Expand Down
20 changes: 14 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,25 @@
"lint": "pnpm run lint:prepare .",
"lint:prepare": "eslint --cache --fix --quiet --format codeframe",
"fresh": "rm -rf ./node_modules",
"pretest": "rm -rf ./test/tmp && mkdir ./test/tmp",

"test-specific": "node --disable-warning=ExperimentalWarning --experimental-vm-modules ./node_modules/jest/bin/jest.js --testPathPattern=test/standalone/keep-alive-error.test.js",
"test": "pnpm audit --prod && pnpm run test-jest && pnpm run test-node",
"test-jest": "node --disable-warning=ExperimentalWarning --experimental-vm-modules ./node_modules/jest/bin/jest.js --testPathPattern=test/ --coverage",
"test-node": "node --disable-warning=ExperimentalWarning --test test-node/**/*.test.js",
"pretest:ci": "pnpm run pretest",
"test:ci": "node --disable-warning=ExperimentalWarning --experimental-vm-modules node_modules/.bin/nyc jest --testPathPattern=test/ --coverage && node --disable-warning=ExperimentalWarning --experimental-vm-modules node_modules/.bin/nyc node --test test-node/"
"test-node": "node --disable-warning=ExperimentalWarning --test ./test-node/**/*.test.js",

"test-jest:ci": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js --testPathPattern=test/ --coverage",

"test:local": "pnpm run test-node && pnpm run test-jest",

"audit": "pnpm audit --prod --fix",
"pretest": "rm -rf ./test/tmp && mkdir ./test/tmp",
"test": "pnpm run audit && node --test ./test-node/**/*.test.js && pnpm run test-jest:ci"
},
"dependencies": {
"@paralleldrive/cuid2": "^2.2.2",
"dezalgo": "^1.0.4",
"once": "^1.4.0"
},
"packageManager": "pnpm@10.8.1",
"devDependencies": {
"@rollup/plugin-commonjs": "^25.0.2",
"@rollup/plugin-node-resolve": "^15.1.0",
Expand All @@ -90,10 +96,12 @@
"rollup": "^3.25.3",
"supertest": "6.1.6"
},
"engines": {
"node": ">=14.0.0"
},
"jest": {
"verbose": true
},
"packageManager": "pnpm@10.8.1",
"keywords": [
"multipart",
"form",
Expand Down
25 changes: 13 additions & 12 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/Formidable.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import DummyParser from './parsers/Dummy.js';
import MultipartParser from './parsers/Multipart.js';
import { json, multipart, octetstream, querystring } from './plugins/index.js';

const CUID2_FINGERPRINT = `${process.env.NODE_ENV}-${os.platform()}-${os.hostname()}-${os.machine()}`
const CUID2_FINGERPRINT = `${process.env.NODE_ENV}-${os.platform()}-${os.hostname()}`
const createId = cuid2init({ length: 25, fingerprint: CUID2_FINGERPRINT.toLowerCase() });

const DEFAULT_OPTIONS = {
Expand Down