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: 79d0972bd18247071326105bfb36539830b61b76
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: 424dadd312f519bdb320c6ee9463d6672782420c
Choose a head ref

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
  2. deps: qs@5.1.0

    dougwilson committed Sep 14, 2015
    Copy the full SHA
    95f5f17 View commit details
  3. build: istanbul@0.3.20

    dougwilson committed Sep 14, 2015
    Copy the full SHA
    824a115 View commit details

Commits on Sep 15, 2015

  1. deps: depd@~1.1.0

    dougwilson committed Sep 15, 2015
    Copy the full SHA
    8e2e407 View commit details

Commits on Sep 16, 2015

  1. 1.14.0

    dougwilson committed Sep 16, 2015
    Copy the full SHA
    a438bed View commit details

Commits on Sep 28, 2015

  1. docs: fix typo

    closes #125
    djchie authored and dougwilson committed Sep 28, 2015
    Copy the full SHA
    a3e6694 View commit details
  2. build: istanbul@0.3.21

    dougwilson committed Sep 28, 2015
    Copy the full SHA
    bcbab38 View commit details
  3. deps: raw-body@~2.1.4

    dougwilson committed Sep 28, 2015
    Copy the full SHA
    0dba9b7 View commit details
  4. deps: iconv-lite@0.4.12

    dougwilson committed Sep 28, 2015
    Copy the full SHA
    c00c5b0 View commit details
  5. build: support Node.js 4.x

    dougwilson committed Sep 28, 2015
    Copy the full SHA
    0903f61 View commit details
  6. deps: type-is@~1.6.9

    dougwilson committed Sep 28, 2015
    Copy the full SHA
    96767f4 View commit details
  7. Copy the full SHA
    ccc0f82 View commit details
  8. 1.14.1

    dougwilson committed Sep 28, 2015
    Copy the full SHA
    7847af6 View commit details

Commits on Nov 24, 2015

  1. Copy the full SHA
    7d56fe2 View commit details
  2. build: Node.js@4.2

    dougwilson committed Nov 24, 2015
    Copy the full SHA
    23b68e9 View commit details
  3. build: istanbul@0.4.0

    dougwilson committed Nov 24, 2015
    Copy the full SHA
    8a1b43a View commit details
  4. build: mocha@2.3.4

    dougwilson committed Nov 24, 2015
    Copy the full SHA
    f636f3a View commit details
  5. deps: bytes@2.2.0

    dougwilson committed Nov 24, 2015
    Copy the full SHA
    5b89c5b View commit details
  6. deps: qs@5.2.0

    dougwilson committed Nov 24, 2015
    Copy the full SHA
    97ba1be View commit details
  7. deps: iconv-lite@0.4.13

    dougwilson committed Nov 24, 2015
    Copy the full SHA
    a0a5cdf View commit details
  8. deps: raw-body@~2.1.5

    dougwilson committed Nov 24, 2015
    Copy the full SHA
    7fdb557 View commit details

Commits on Dec 3, 2015

  1. deps: type-is@~1.6.10

    dougwilson committed Dec 3, 2015
    Copy the full SHA
    af8cd47 View commit details
  2. build: istanbul@0.4.1

    dougwilson committed Dec 3, 2015
    Copy the full SHA
    a7ffb1a View commit details

Commits on Dec 16, 2015

  1. Copy the full SHA
    ecb572d View commit details
  2. build: support Node.js 5.x

    dougwilson committed Dec 16, 2015
    Copy the full SHA
    a4da516 View commit details
  3. 1.14.2

    dougwilson committed Dec 16, 2015
    Copy the full SHA
    ef5d85d View commit details

Commits on Jan 30, 2016

  1. build: istanbul@0.4.2

    dougwilson committed Jan 30, 2016
    Copy the full SHA
    5215b1a View commit details
  2. build: methods@1.1.2

    dougwilson committed Jan 30, 2016
    Copy the full SHA
    b2d1b0e View commit details
  3. build: mocha@2.4.5

    dougwilson committed Jan 30, 2016
    Copy the full SHA
    8003200 View commit details
  4. deps: type-is@~1.6.11

    dougwilson committed Jan 30, 2016
    Copy the full SHA
    ed25264 View commit details

Commits on Feb 11, 2016

  1. Copy the full SHA
    d4a7bcc View commit details
  2. Copy the full SHA
    1ef9c7f View commit details
  3. deps: http-errors@~1.4.0

    dougwilson committed Feb 11, 2016
    Copy the full SHA
    8ff2c24 View commit details
  4. build: Node.js@4.3

    dougwilson committed Feb 11, 2016
    Copy the full SHA
    18b1a04 View commit details
  5. build: Node.js@5.6

    dougwilson committed Feb 11, 2016
    Copy the full SHA
    cad00f6 View commit details
  6. deps: qs@6.1.0

    dougwilson committed Feb 11, 2016
    Copy the full SHA
    414f38f View commit details
  7. 1.15.0

    dougwilson committed Feb 11, 2016
    Copy the full SHA
    5b4fabe View commit details

Commits on Mar 11, 2016

  1. build: Node.js@4.4

    dougwilson committed Mar 11, 2016
    Copy the full SHA
    31ee72b View commit details
  2. build: Node.js@5.8

    dougwilson committed Mar 11, 2016
    Copy the full SHA
    6cc7f23 View commit details

Commits on Mar 21, 2016

  1. deps: raw-body@~2.1.6

    dougwilson committed Mar 21, 2016
    Copy the full SHA
    1a727d9 View commit details
  2. deps: type-is@~1.6.12

    dougwilson committed Mar 21, 2016
    Copy the full SHA
    21b1164 View commit details
  3. build: Node.js@5.9

    dougwilson committed Mar 21, 2016
    Copy the full SHA
    1d2622d View commit details
  4. Copy the full SHA
    b8a4fa2 View commit details

Commits on May 6, 2016

  1. build: Node.js@5.11

    dougwilson committed May 6, 2016
    Copy the full SHA
    808a5d1 View commit details
Showing with 2,220 additions and 1,291 deletions.
  1. +2 −0 .eslintignore
  2. +11 −0 .eslintrc.yml
  3. +214 −0 .github/workflows/ci.yml
  4. +2 −0 .gitignore
  5. +0 −19 .travis.yml
  6. +246 −0 HISTORY.md
  7. +118 −63 README.md
  8. +11 −11 index.js
  9. +49 −48 lib/read.js
  10. +80 −20 lib/types/json.js
  11. +15 −9 lib/types/raw.js
  12. +16 −10 lib/types/text.js
  13. +44 −24 lib/types/urlencoded.js
  14. +25 −16 package.json
  15. +2 −0 test/.eslintrc.yml
  16. +87 −84 test/body-parser.js
  17. +452 −284 test/json.js
  18. +172 −151 test/raw.js
  19. +236 −207 test/text.js
  20. +438 −345 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
11 changes: 11 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root: true
extends:
- standard
- plugin:markdown/recommended
plugins:
- markdown
overrides:
- files: '**/*.md'
processor: 'markdown/markdown'
rules:
no-param-reassign: error
214 changes: 214 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
name: ci

on:
- pull_request
- push

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
name:
- Node.js 0.8
- Node.js 0.10
- Node.js 0.12
- io.js 1.x
- io.js 2.x
- io.js 3.x
- Node.js 4.x
- Node.js 5.x
- Node.js 6.x
- Node.js 7.x
- Node.js 8.x
- Node.js 9.x
- Node.js 10.x
- Node.js 11.x
- Node.js 12.x
- Node.js 13.x
- Node.js 14.x
- Node.js 15.x
- Node.js 16.x
- Node.js 17.x

include:
- name: Node.js 0.8
node-version: "0.8"
npm-i: mocha@2.5.3 supertest@1.1.0
npm-rm: nyc

- name: Node.js 0.10
node-version: "0.10"
npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0

- name: Node.js 0.12
node-version: "0.12"
npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0

- name: io.js 1.x
node-version: "1.8"
npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0

- name: io.js 2.x
node-version: "2.5"
npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0

- name: io.js 3.x
node-version: "3.3"
npm-i: mocha@3.5.3 nyc@10.3.2 supertest@2.0.0

- name: Node.js 4.x
node-version: "4.9"
npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2

- name: Node.js 5.x
node-version: "5.12"
npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2

- name: Node.js 6.x
node-version: "6.17"
npm-i: mocha@6.2.2 nyc@14.1.1 supertest@6.1.6

- name: Node.js 7.x
node-version: "7.10"
npm-i: mocha@6.2.2 nyc@14.1.1 supertest@6.1.6

- name: Node.js 8.x
node-version: "8.17"
npm-i: mocha@7.2.0

- name: Node.js 9.x
node-version: "9.11"
npm-i: mocha@7.2.0

- name: Node.js 10.x
node-version: "10.24"
npm-i: mocha@8.4.0

- name: Node.js 11.x
node-version: "11.15"
npm-i: mocha@8.4.0

- name: Node.js 12.x
node-version: "12.22"

- name: Node.js 13.x
node-version: "13.14"

- name: Node.js 14.x
node-version: "14.19"

- name: Node.js 15.x
node-version: "15.14"

- name: Node.js 16.x
node-version: "16.14"

- name: Node.js 17.x
node-version: "17.5"

steps:
- uses: actions/checkout@v2

- name: Install Node.js ${{ matrix.node-version }}
shell: bash -eo pipefail -l {0}
run: |
nvm install --default ${{ matrix.node-version }}
if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
nvm install --alias=npm 0.10
nvm use ${{ matrix.node-version }}
sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")"
npm config set strict-ssl false
fi
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"
- name: Configure npm
run: npm config set shrinkwrap false

- name: Remove npm module(s) ${{ matrix.npm-rm }}
run: npm rm --silent --save-dev ${{ matrix.npm-rm }}
if: matrix.npm-rm != ''

- name: Install npm module(s) ${{ matrix.npm-i }}
run: npm install --save-dev ${{ matrix.npm-i }}
if: matrix.npm-i != ''

- name: Setup Node.js version-specific dependencies
shell: bash
run: |
# eslint for linting
# - remove on Node.js < 10
if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \
grep -E '^eslint(-|$)' | \
sort -r | \
xargs -n1 npm rm --silent --save-dev
fi
- name: Install Node.js dependencies
run: npm install

- name: List environment
id: list_env
shell: bash
run: |
echo "node@$(node -v)"
echo "npm@$(npm -v)"
npm -s ls ||:
(npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print "::set-output name=" $2 "::" $3 }'
- name: Run tests
shell: bash
run: |
if npm -ps ls nyc | grep -q nyc; then
npm run test-ci
cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"
else
npm test
fi
- name: Lint code
if: steps.list_env.outputs.eslint != ''
run: npm run lint

- name: Collect code coverage
if: steps.list_env.outputs.nyc != ''
run: |
if [[ -d ./coverage ]]; then
mv ./coverage "./${{ matrix.name }}"
mkdir ./coverage
mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"
fi
- name: Upload code coverage
uses: actions/upload-artifact@v2
if: steps.list_env.outputs.nyc != ''
with:
name: coverage
path: ./coverage
retention-days: 1

coverage:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Install lcov
shell: bash
run: sudo apt-get -y install lcov

- name: Collect coverage reports
uses: actions/download-artifact@v2
with:
name: coverage
path: ./coverage

- name: Merge coverage reports
shell: bash
run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info

- name: Upload coverage report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.nyc_output/
coverage/
node_modules/
npm-debug.log
package-lock.json
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

Loading