From edb555a811f6f7e4668db4831551cf41c1de1cac Mon Sep 17 00:00:00 2001 From: marco-ippolito Date: Tue, 30 Apr 2024 09:08:39 +0200 Subject: [PATCH 1/5] fix: move util.isArray to Array.isArray (#564) --- lib/form_data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/form_data.js b/lib/form_data.js index cf836b0b..93164426 100644 --- a/lib/form_data.js +++ b/lib/form_data.js @@ -60,7 +60,7 @@ FormData.prototype.append = function(field, value, options) { } // https://github.com/felixge/node-form-data/issues/38 - if (util.isArray(value)) { + if (Array.isArray(value)) { // Please convert your array into string // the way web server expects it this._error(new Error('Arrays are not supported.')); From fed02210dbb2b44cbb8a798a508b3e79d0b9a511 Mon Sep 17 00:00:00 2001 From: Jaikanth J <31009437+jaikanthjay46@users.noreply.github.com> Date: Tue, 19 Apr 2022 00:39:40 +0530 Subject: [PATCH 2/5] fix (npmignore): ignore temporary build files (#532) They increase the size of the package and don't add any value --- .npmignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.npmignore b/.npmignore index 31fcb79e..f6eab27b 100644 --- a/.npmignore +++ b/.npmignore @@ -7,3 +7,6 @@ sftp-config.json coverage/ node_modules/ test/ + +yarn.lock +README.md.bak From 3217b3ded8e382e51171d5c74c6038a21cc54440 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 19 Sep 2024 17:38:37 -0700 Subject: [PATCH 3/5] [eslint] clean up ignores --- .eslintignore | 2 -- .eslintrc | 7 ++++++- package.json | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) delete mode 100644 .eslintignore diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 510731c1..00000000 --- a/.eslintignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/* -index.d.ts diff --git a/.eslintrc b/.eslintrc index 63de4775..111719d6 100644 --- a/.eslintrc +++ b/.eslintrc @@ -39,5 +39,10 @@ }, "env": { "node": true - } + }, + "ignorePatterns": [ + "node_modules/*", + "index.d.ts", + "coverage", + ] } diff --git a/package.json b/package.json index a2fcb88d..45939b5e 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "pretest": "rimraf coverage test/tmp", "test": "istanbul cover test/run.js", "posttest": "istanbul report lcov text", - "lint": "eslint lib/*.js test/*.js test/integration/*.js", + "lint": "eslint --ext=js,mjs .", "report": "istanbul report lcov text", "ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8", "ci-test": "npm run test && npm run browser && npm run report", From 8fdb3bc6b5d001f8909a9fca391d1d1d97ef1d79 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 20 Sep 2024 22:01:47 -0700 Subject: [PATCH 4/5] [Tests] migrate from travis to GHA --- .github/workflows/node-aught.yml | 14 +++++++++ .github/workflows/node-pretest.yml | 10 +++++++ .github/workflows/node-tens.yml | 14 +++++++++ .github/workflows/rebase.yml | 22 ++++++++++++++ .github/workflows/require-allow-edits.yml | 18 ++++++++++++ .travis.yml | 35 ----------------------- package.json | 11 ++++--- 7 files changed, 85 insertions(+), 39 deletions(-) create mode 100644 .github/workflows/node-aught.yml create mode 100644 .github/workflows/node-pretest.yml create mode 100644 .github/workflows/node-tens.yml create mode 100644 .github/workflows/rebase.yml create mode 100644 .github/workflows/require-allow-edits.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/node-aught.yml b/.github/workflows/node-aught.yml new file mode 100644 index 00000000..d0f17ab9 --- /dev/null +++ b/.github/workflows/node-aught.yml @@ -0,0 +1,14 @@ +name: 'Tests: node.js < 10' + +on: [pull_request, push] + +permissions: + contents: read + +jobs: + tests: + uses: ljharb/actions/.github/workflows/node.yml@main + with: + range: '>= 6 < 10' + type: minors + command: npm run ci-test diff --git a/.github/workflows/node-pretest.yml b/.github/workflows/node-pretest.yml new file mode 100644 index 00000000..88d49f9b --- /dev/null +++ b/.github/workflows/node-pretest.yml @@ -0,0 +1,10 @@ +name: 'Tests: pretest/posttest' + +on: [pull_request, push] + +permissions: + contents: read + +jobs: + tests: + uses: ljharb/actions/.github/workflows/pretest.yml@main diff --git a/.github/workflows/node-tens.yml b/.github/workflows/node-tens.yml new file mode 100644 index 00000000..f39714e0 --- /dev/null +++ b/.github/workflows/node-tens.yml @@ -0,0 +1,14 @@ +name: 'Tests: node.js >= 10' + +on: [pull_request, push] + +permissions: + contents: read + +jobs: + tests: + uses: ljharb/actions/.github/workflows/node.yml@main + with: + range: '>= 10' + type: minors + command: npm run ci-test diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml new file mode 100644 index 00000000..18181913 --- /dev/null +++ b/.github/workflows/rebase.yml @@ -0,0 +1,22 @@ +name: Automatic Rebase + +on: [pull_request_target] + +permissions: + contents: read + +jobs: + _: + permissions: + contents: write # for ljharb/rebase to push code to rebase + pull-requests: read # for ljharb/rebase to get info about PR + + name: "Automatic Rebase" + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - uses: ljharb/rebase@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/require-allow-edits.yml b/.github/workflows/require-allow-edits.yml new file mode 100644 index 00000000..a685b8ac --- /dev/null +++ b/.github/workflows/require-allow-edits.yml @@ -0,0 +1,18 @@ +name: Require “Allow Edits” + +on: [pull_request_target] + +permissions: + contents: read + +jobs: + _: + permissions: + pull-requests: read # for ljharb/require-allow-edits to check 'allow edits' on PR + + name: "Require “Allow Edits”" + + runs-on: ubuntu-latest + + steps: + - uses: ljharb/require-allow-edits@main diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f22a5d90..00000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -sudo: false - -language: node_js -node_js: - - "6" - - "8" - - "10" - - "12" - -os: -- osx -- linux -- windows - -install: - - travis_retry npm install - -script: - - uname -a - - node --version - - npm --version - - if [ "$TRAVIS_OS_NAME" != "windows" ]; then npm run ci-lint; fi - - if [ "$TRAVIS_OS_NAME" = "windows" ]; then npm run test; else npm run ci-test; fi - - npm run check - -after_success: - - "cat coverage/lcov.info | ./node_modules/.bin/coveralls" - -notifications: - webhooks: - urls: - - "https://webhooks.gitter.im/e/3569d7edff0d38f93cd7" - on_success: always - on_failure: always - on_start: false diff --git a/package.json b/package.json index 45939b5e..218a4246 100644 --- a/package.json +++ b/package.json @@ -11,13 +11,16 @@ "browser": "./lib/browser", "typings": "./index.d.ts", "scripts": { - "pretest": "rimraf coverage test/tmp", - "test": "istanbul cover test/run.js", - "posttest": "istanbul report lcov text", + "pretest": "npm run lint", + "pretests-only": "rimraf coverage test/tmp", + "tests-only": "istanbul cover test/run.js", + "posttests-only": "istanbul report lcov text", + "test": "npm run tests-only", + "posttest": "npx npm@'>=10.2' audit --production", "lint": "eslint --ext=js,mjs .", "report": "istanbul report lcov text", "ci-lint": "is-node-modern 8 && npm run lint || is-node-not-modern 8", - "ci-test": "npm run test && npm run browser && npm run report", + "ci-test": "npm run tests-only && npm run browser && npm run report", "predebug": "rimraf coverage test/tmp", "debug": "verbose=1 ./test/run.js", "browser": "browserify -t browserify-istanbul test/run-browser.js | obake --coverage", From f06b0d85d10bc942b3bf586b01ace6e874ac61b3 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 10 Oct 2024 12:48:34 +0900 Subject: [PATCH 5/5] v3.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 218a4246..9ced4589 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "author": "Felix Geisendörfer (http://debuggable.com/)", "name": "form-data", "description": "A library to create readable \"multipart/form-data\" streams. Can be used to submit forms and file uploads to other web applications.", - "version": "3.0.1", + "version": "3.0.2", "repository": { "type": "git", "url": "git://github.com/form-data/form-data.git"