Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: expressjs/body-parser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5addd8e18e0a72795f9ab93e867d3e50f3429910
Choose a base ref
...
head repository: expressjs/body-parser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b2659a7af3b413a2d1df274bef409fe6cdcf6b8f
Choose a head ref

Commits on May 11, 2015

  1. deps: raw-body@~2.0.1

    dougwilson committed May 11, 2015
    Copy the full SHA
    6b6c52c View commit details
  2. deps: on-finished@~2.2.1

    dougwilson committed May 11, 2015
    Copy the full SHA
    34ea517 View commit details
  3. build: io.js@1.8

    dougwilson committed May 11, 2015
    Copy the full SHA
    b6cb158 View commit details
  4. build: support io.js 2.x

    dougwilson committed May 11, 2015
    Copy the full SHA
    e4ac6a9 View commit details
  5. deps: qs@2.4.2

    dougwilson committed May 11, 2015
    Copy the full SHA
    46497a3 View commit details
  6. deps: type-is@~1.6.2

    dougwilson committed May 11, 2015
    Copy the full SHA
    3c6119b View commit details
  7. deps: debug@~2.2.0

    dougwilson committed May 11, 2015
    Copy the full SHA
    b12c770 View commit details
  8. 1.12.4

    dougwilson committed May 11, 2015
    Copy the full SHA
    faba6ae View commit details

Commits on May 18, 2015

  1. docs: fix readme typos

    closes #102
    yanxyz authored and dougwilson committed May 18, 2015
    Copy the full SHA
    2a2ebb8 View commit details
  2. deps: mocha@2.2.5

    dougwilson committed May 18, 2015
    Copy the full SHA
    2ef8a7d View commit details
  3. deps: supertest@1.0.1

    dougwilson committed May 18, 2015
    Copy the full SHA
    c810ace View commit details

Commits on Jun 2, 2015

  1. build: io.js@2.2

    dougwilson committed Jun 2, 2015
    Copy the full SHA
    daa6ee7 View commit details

Commits on Jun 6, 2015

  1. docs: fix typo in readme

    closes #105
    TomK32 authored and dougwilson committed Jun 6, 2015
    Copy the full SHA
    f86596c View commit details
  2. deps: on-finished@~2.3.0

    dougwilson committed Jun 6, 2015
    Copy the full SHA
    5bb55e4 View commit details

Commits on Jun 14, 2015

  1. deps: raw-body@~2.1.1

    dougwilson committed Jun 14, 2015
    Copy the full SHA
    a8b6a57 View commit details
  2. deps: type-is@~1.6.3

    dougwilson committed Jun 14, 2015
    Copy the full SHA
    089a62e View commit details
  3. deps: bytes@2.1.0

    dougwilson committed Jun 14, 2015
    Copy the full SHA
    f44d179 View commit details
  4. deps: iconv-lite@0.4.10

    dougwilson committed Jun 14, 2015
    Copy the full SHA
    9dbb53e View commit details
  5. deps: qs@3.1.0

    dougwilson committed Jun 14, 2015
    Copy the full SHA
    7146120 View commit details
  6. Copy the full SHA
    7093e2f View commit details
  7. Copy the full SHA
    54086b4 View commit details
  8. Copy the full SHA
    f0e3bf7 View commit details
  9. perf: enable strict mode

    dougwilson committed Jun 14, 2015
    Copy the full SHA
    59c3615 View commit details
  10. build: io.js@2.3

    dougwilson committed Jun 14, 2015
    Copy the full SHA
    9abcbac View commit details
  11. Copy the full SHA
    d6da231 View commit details
  12. Copy the full SHA
    4ef6746 View commit details

Commits on Jun 15, 2015

  1. perf: remove delete call

    dougwilson committed Jun 15, 2015
    Copy the full SHA
    9437651 View commit details
  2. Copy the full SHA
    dcd1c75 View commit details
  3. 1.13.0

    dougwilson committed Jun 15, 2015
    Copy the full SHA
    aa8617b View commit details

Commits on Jun 16, 2015

  1. deps: qs@2.4.2

    fixes #109
    dougwilson committed Jun 16, 2015
    Copy the full SHA
    ecc3ee7 View commit details
  2. 1.13.1

    dougwilson committed Jun 16, 2015
    Copy the full SHA
    bf6c146 View commit details

Commits on Jul 6, 2015

  1. Copy the full SHA
    e41dfd2 View commit details
  2. build: istanbul@0.3.17

    dougwilson committed Jul 6, 2015
    Copy the full SHA
    dceab3a View commit details
  3. deps: iconv-lite@0.4.11

    dougwilson committed Jul 6, 2015
    Copy the full SHA
    f7af283 View commit details
  4. deps: raw-body@~2.1.2

    dougwilson committed Jul 6, 2015
    Copy the full SHA
    9106450 View commit details
  5. deps: type-is@~1.6.4

    dougwilson committed Jul 6, 2015
    Copy the full SHA
    1eb4c9d View commit details
  6. deps: qs@4.0.0

    dougwilson committed Jul 6, 2015
    Copy the full SHA
    6f30fcb View commit details
  7. 1.13.2

    dougwilson committed Jul 6, 2015
    Copy the full SHA
    b31df3e View commit details

Commits on Jul 17, 2015

  1. Copy the full SHA
    964e87d View commit details
  2. deps: type-is@~1.6.5

    dougwilson committed Jul 17, 2015
    Copy the full SHA
    8dec04f View commit details

Commits on Jul 31, 2015

  1. build: io.js@2.5

    dougwilson committed Jul 31, 2015
    Copy the full SHA
    5fc06ca View commit details
  2. deps: type-is@~1.6.6

    dougwilson committed Jul 31, 2015
    Copy the full SHA
    4fb69fb View commit details
  3. 1.13.3

    dougwilson committed Jul 31, 2015
    Copy the full SHA
    79d0972 View commit details

Commits on Sep 4, 2015

  1. Copy the full SHA
    9d8c719 View commit details
  2. build: istanbul@0.3.19

    dougwilson committed Sep 4, 2015
    Copy the full SHA
    fe794cf View commit details
  3. build: support io.js 3.x

    dougwilson committed Sep 4, 2015
    Copy the full SHA
    08bc38d View commit details
  4. deps: qs@5.0.0

    dougwilson committed Sep 4, 2015
    Copy the full SHA
    7cb318d View commit details
  5. deps: type-is@~1.6.8

    dougwilson committed Sep 4, 2015
    Copy the full SHA
    393fe31 View commit details

Commits on Sep 7, 2015

  1. Copy the full SHA
    06a5182 View commit details

Commits on Sep 14, 2015

  1. deps: raw-body@~2.1.3

    dougwilson committed Sep 14, 2015
    Copy the full SHA
    f079626 View commit details
Showing with 1,554 additions and 933 deletions.
  1. +2 −0 .eslintignore
  2. +6 −0 .eslintrc
  3. +1 −0 .gitignore
  4. +27 −4 .travis.yml
  5. +254 −0 HISTORY.md
  6. +78 −41 README.md
  7. +97 −34 index.js
  8. +61 −42 lib/read.js
  9. +100 −33 lib/types/json.js
  10. +23 −15 lib/types/raw.js
  11. +26 −18 lib/types/text.js
  12. +64 −41 lib/types/urlencoded.js
  13. +24 −14 package.json
  14. +5 −0 test/.eslintrc
  15. +39 −44 test/body-parser.js
  16. +301 −208 test/json.js
  17. +100 −123 test/raw.js
  18. +125 −143 test/text.js
  19. +221 −173 test/urlencoded.js
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage
node_modules
6 changes: 6 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "standard",
"rules": {
"no-param-reassign": "error"
}
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
coverage/
node_modules/
npm-debug.log
package-lock.json
31 changes: 27 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -3,8 +3,31 @@ node_js:
- "0.8"
- "0.10"
- "0.12"
- "1.0"
- "1.7"
- "1.8"
- "2.5"
- "3.3"
- "4.8"
- "5.12"
- "6.11"
- "7.10"
- "8.4"
sudo: false
script: "npm run-script test-travis"
after_script: "npm install coveralls@2.10.0 && cat ./coverage/lcov.info | coveralls"
cache:
directories:
- node_modules
before_install:
# Skip updating shrinkwrap / lock
- "npm config set shrinkwrap false"
# Setup Node.js version-specific dependencies
- "test $TRAVIS_NODE_VERSION != '0.8' || npm rm --save-dev istanbul"
- "test $(echo $TRAVIS_NODE_VERSION | cut -d. -f1) -ge 4 || npm rm --save-dev $(grep -E '\"eslint\\S*\"' package.json | cut -d'\"' -f2)"
# Update Node.js modules
- "test ! -d node_modules || npm prune"
- "test ! -d node_modules || npm rebuild"
script:
# Run test script, depending on istanbul install
- "test ! -z $(npm -ps ls istanbul) || npm test"
- "test -z $(npm -ps ls istanbul) || npm run-script test-travis"
- "test -z $(npm -ps ls eslint ) || npm run-script lint"
after_script:
- "test -e ./coverage/lcov.info && npm install coveralls@2 && cat ./coverage/lcov.info | coveralls"
254 changes: 254 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,257 @@
1.18.2 / 2017-09-22
===================

* deps: debug@2.6.9
* perf: remove argument reassignment

1.18.1 / 2017-09-12
===================

* deps: content-type@~1.0.4
- perf: remove argument reassignment
- perf: skip parameter parsing when no parameters
* deps: iconv-lite@0.4.19
- Fix ISO-8859-1 regression
- Update Windows-1255
* deps: qs@6.5.1
- Fix parsing & compacting very deep objects
* deps: raw-body@2.3.2
- deps: iconv-lite@0.4.19

1.18.0 / 2017-09-08
===================

* Fix JSON strict violation error to match native parse error
* Include the `body` property on verify errors
* Include the `type` property on all generated errors
* Use `http-errors` to set status code on errors
* deps: bytes@3.0.0
* deps: debug@2.6.8
* deps: depd@~1.1.1
- Remove unnecessary `Buffer` loading
* deps: http-errors@~1.6.2
- deps: depd@1.1.1
* deps: iconv-lite@0.4.18
- Add support for React Native
- Add a warning if not loaded as utf-8
- Fix CESU-8 decoding in Node.js 8
- Improve speed of ISO-8859-1 encoding
* deps: qs@6.5.0
* deps: raw-body@2.3.1
- Use `http-errors` for standard emitted errors
- deps: bytes@3.0.0
- deps: iconv-lite@0.4.18
- perf: skip buffer decoding on overage chunk
* perf: prevent internal `throw` when missing charset

1.17.2 / 2017-05-17
===================

* deps: debug@2.6.7
- Fix `DEBUG_MAX_ARRAY_LENGTH`
- deps: ms@2.0.0
* deps: type-is@~1.6.15
- deps: mime-types@~2.1.15

1.17.1 / 2017-03-06
===================

* deps: qs@6.4.0
- Fix regression parsing keys starting with `[`

1.17.0 / 2017-03-01
===================

* deps: http-errors@~1.6.1
- Make `message` property enumerable for `HttpError`s
- deps: setprototypeof@1.0.3
* deps: qs@6.3.1
- Fix compacting nested arrays

1.16.1 / 2017-02-10
===================

* deps: debug@2.6.1
- Fix deprecation messages in WebStorm and other editors
- Undeprecate `DEBUG_FD` set to `1` or `2`

1.16.0 / 2017-01-17
===================

* deps: debug@2.6.0
- Allow colors in workers
- Deprecated `DEBUG_FD` environment variable
- Fix error when running under React Native
- Use same color for same namespace
- deps: ms@0.7.2
* deps: http-errors@~1.5.1
- deps: inherits@2.0.3
- deps: setprototypeof@1.0.2
- deps: statuses@'>= 1.3.1 < 2'
* deps: iconv-lite@0.4.15
- Added encoding MS-31J
- Added encoding MS-932
- Added encoding MS-936
- Added encoding MS-949
- Added encoding MS-950
- Fix GBK/GB18030 handling of Euro character
* deps: qs@6.2.1
- Fix array parsing from skipping empty values
* deps: raw-body@~2.2.0
- deps: iconv-lite@0.4.15
* deps: type-is@~1.6.14
- deps: mime-types@~2.1.13

1.15.2 / 2016-06-19
===================

* deps: bytes@2.4.0
* deps: content-type@~1.0.2
- perf: enable strict mode
* deps: http-errors@~1.5.0
- Use `setprototypeof` module to replace `__proto__` setting
- deps: statuses@'>= 1.3.0 < 2'
- perf: enable strict mode
* deps: qs@6.2.0
* deps: raw-body@~2.1.7
- deps: bytes@2.4.0
- perf: remove double-cleanup on happy path
* deps: type-is@~1.6.13
- deps: mime-types@~2.1.11

1.15.1 / 2016-05-05
===================

* deps: bytes@2.3.0
- Drop partial bytes on all parsed units
- Fix parsing byte string that looks like hex
* deps: raw-body@~2.1.6
- deps: bytes@2.3.0
* deps: type-is@~1.6.12
- deps: mime-types@~2.1.10

1.15.0 / 2016-02-10
===================

* deps: http-errors@~1.4.0
- Add `HttpError` export, for `err instanceof createError.HttpError`
- deps: inherits@2.0.1
- deps: statuses@'>= 1.2.1 < 2'
* deps: qs@6.1.0
* deps: type-is@~1.6.11
- deps: mime-types@~2.1.9

1.14.2 / 2015-12-16
===================

* deps: bytes@2.2.0
* deps: iconv-lite@0.4.13
* deps: qs@5.2.0
* deps: raw-body@~2.1.5
- deps: bytes@2.2.0
- deps: iconv-lite@0.4.13
* deps: type-is@~1.6.10
- deps: mime-types@~2.1.8

1.14.1 / 2015-09-27
===================

* Fix issue where invalid charset results in 400 when `verify` used
* deps: iconv-lite@0.4.12
- Fix CESU-8 decoding in Node.js 4.x
* deps: raw-body@~2.1.4
- Fix masking critical errors from `iconv-lite`
- deps: iconv-lite@0.4.12
* deps: type-is@~1.6.9
- deps: mime-types@~2.1.7

1.14.0 / 2015-09-16
===================

* Fix JSON strict parse error to match syntax errors
* Provide static `require` analysis in `urlencoded` parser
* deps: depd@~1.1.0
- Support web browser loading
* deps: qs@5.1.0
* deps: raw-body@~2.1.3
- Fix sync callback when attaching data listener causes sync read
* deps: type-is@~1.6.8
- Fix type error when given invalid type to match against
- deps: mime-types@~2.1.6

1.13.3 / 2015-07-31
===================

* deps: type-is@~1.6.6
- deps: mime-types@~2.1.4

1.13.2 / 2015-07-05
===================

* deps: iconv-lite@0.4.11
* deps: qs@4.0.0
- Fix dropping parameters like `hasOwnProperty`
- Fix user-visible incompatibilities from 3.1.0
- Fix various parsing edge cases
* deps: raw-body@~2.1.2
- Fix error stack traces to skip `makeError`
- deps: iconv-lite@0.4.11
* deps: type-is@~1.6.4
- deps: mime-types@~2.1.2
- perf: enable strict mode
- perf: remove argument reassignment

1.13.1 / 2015-06-16
===================

* deps: qs@2.4.2
- Downgraded from 3.1.0 because of user-visible incompatibilities

1.13.0 / 2015-06-14
===================

* Add `statusCode` property on `Error`s, in addition to `status`
* Change `type` default to `application/json` for JSON parser
* Change `type` default to `application/x-www-form-urlencoded` for urlencoded parser
* Provide static `require` analysis
* Use the `http-errors` module to generate errors
* deps: bytes@2.1.0
- Slight optimizations
* deps: iconv-lite@0.4.10
- The encoding UTF-16 without BOM now defaults to UTF-16LE when detection fails
- Leading BOM is now removed when decoding
* deps: on-finished@~2.3.0
- Add defined behavior for HTTP `CONNECT` requests
- Add defined behavior for HTTP `Upgrade` requests
- deps: ee-first@1.1.1
* deps: qs@3.1.0
- Fix dropping parameters like `hasOwnProperty`
- Fix various parsing edge cases
- Parsed object now has `null` prototype
* deps: raw-body@~2.1.1
- Use `unpipe` module for unpiping requests
- deps: iconv-lite@0.4.10
* deps: type-is@~1.6.3
- deps: mime-types@~2.1.1
- perf: reduce try block size
- perf: remove bitwise operations
* perf: enable strict mode
* perf: remove argument reassignment
* perf: remove delete call

1.12.4 / 2015-05-10
===================

* deps: debug@~2.2.0
* deps: qs@2.4.2
- Fix allowing parameters like `constructor`
* deps: on-finished@~2.2.1
* deps: raw-body@~2.0.1
- Fix a false-positive when unpiping in Node.js 0.8
- deps: bytes@2.0.1
* deps: type-is@~1.6.2
- deps: mime-types@~2.0.11

1.12.3 / 2015-04-15
===================

Loading