Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

co-busboy

Package Overview
Dependencies
Maintainers
6
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-busboy - npm Package Compare versions

Comparing version 1.5.0 to 2.0.0

6

History.md
2.0.0 / 2022-09-16
==================
**others**
* [[`d33789a`](http://github.com/cojs/busboy/commit/d33789a2af0b04fb9a68b1016a70857fc5f3c584)] - BREAKING CHANGE: update busboy to 1.x and node 14.x (#48) (TZ | 天猪 <<atian25@qq.com>>)
1.5.0 / 2021-04-12

@@ -3,0 +9,0 @@ ==================

35

index.js

@@ -32,3 +32,3 @@ var Busboy = require('busboy')

var busboy = new Busboy(options)
var busboy = Busboy(options)

@@ -39,9 +39,9 @@ request = inflate(request)

busboy
.on('field', onField)
.on('file', onFile)
.on('close', cleanup)
.on('error', onEnd)
.on('finish', onEnd)
.on('field', onField)
.on('file', onFile)
.on('close', cleanup)
.on('error', onEnd)
.on('finish', onEnd)
busboy.on('partsLimit', function(){
busboy.on('partsLimit', function () {
var err = new Error('Reach parts limit')

@@ -53,3 +53,3 @@ err.code = 'Request_parts_limit'

busboy.on('filesLimit', function(){
busboy.on('filesLimit', function () {
var err = new Error('Reach files limit')

@@ -61,3 +61,3 @@ err.code = 'Request_files_limit'

busboy.on('fieldsLimit', function(){
busboy.on('fieldsLimit', function () {
var err = new Error('Reach fields limit')

@@ -80,3 +80,5 @@ err.code = 'Request_fields_limit'

function onField(name, val, fieldnameTruncated, valTruncated) {
function onField(name, val, info) {
var fieldnameTruncated = info.nameTruncated
var valTruncated = info.valueTruncated
if (checkField) {

@@ -89,3 +91,3 @@ var err = checkField(name, val, fieldnameTruncated, valTruncated)

var args = [name, val, fieldnameTruncated, valTruncated]
var args = [ name, val, fieldnameTruncated, valTruncated ]

@@ -98,6 +100,6 @@ if (options.autoFields) {

var prev = field[name]
if (prev == null) return field[name] = val
var prev = field[ name ]
if (prev == null) return field[ name ] = val
if (isArray(prev)) return prev.push(val)
field[name] = [prev, val]
field[ name ] = [ prev, val ]
} else {

@@ -108,3 +110,6 @@ ch(args)

function onFile(fieldname, file, filename, encoding, mimetype) {
function onFile(fieldname, file, info) {
var filename = info.filename
var encoding = info.encoding
var mimetype = info.mimeType
if (checkFile) {

@@ -111,0 +116,0 @@ var err = checkFile(fieldname, file, filename, encoding, mimetype)

{
"name": "co-busboy",
"description": "Busboy multipart parser as a yieldable",
"version": "1.5.0",
"version": "2.0.0",
"author": {

@@ -20,5 +20,8 @@ "name": "Jonathan Ong",

},
"engines": {
"node": ">= 14.0.0"
},
"dependencies": {
"black-hole-stream": "~0.0.1",
"busboy": "^0.2.8",
"busboy": "^1.6.0",
"chan": "^0.6.1",

@@ -28,10 +31,10 @@ "inflation": "^2.0.0"

"devDependencies": {
"c8": "^7.12.0",
"co": "^4.6.0",
"formstream": "~1.0.0",
"istanbul": "^0.4.5",
"mocha": "^4.0.1"
"formstream": "^1.0.0",
"mocha": "^10.0.0"
},
"scripts": {
"test": "NODE_ENV=test mocha --harmony --reporter spec --bail",
"test-cov": "NODE_ENV=test istanbul cover -x test.js _mocha -- --reporter spec --bail"
"test": "mocha **/*.test.js",
"ci": "c8 npm test"
},

@@ -38,0 +41,0 @@ "files": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc