forked from expressjs/body-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
20 changed files
with
1,521 additions
and
624 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,11 @@ | ||
root: true | ||
extends: standard | ||
extends: | ||
- standard | ||
- plugin:markdown/recommended | ||
plugins: | ||
- markdown | ||
overrides: | ||
- files: '**/*.md' | ||
processor: 'markdown/markdown' | ||
rules: | ||
no-param-reassign: error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: ci | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- '2.x' | ||
paths-ignore: | ||
- '*.md' | ||
pull_request: | ||
paths-ignore: | ||
- '*.md' | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
name: | ||
- Node.js 18.x | ||
- Node.js 20.x | ||
- Node.js 22.x | ||
|
||
include: | ||
- name: Node.js 18.x | ||
node-version: "18" | ||
|
||
- name: Node.js 20.x | ||
node-version: "20" | ||
|
||
- name: Node.js 22.x | ||
node-version: "22" | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install Node.js ${{ matrix.node-version }} | ||
shell: bash -eo pipefail -l {0} | ||
run: | | ||
nvm install --default ${{ matrix.node-version }} | ||
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH" | ||
- name: Configure npm | ||
run: | | ||
if [[ "$(npm config get package-lock)" == "true" ]]; then | ||
npm config set package-lock false | ||
else | ||
npm config set shrinkwrap false | ||
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 $2 "=" $3 }' >> "$GITHUB_OUTPUT" | ||
- name: Run tests | ||
shell: bash | ||
run: | | ||
npm run test-ci | ||
cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov" | ||
- name: Lint code | ||
if: steps.list_env.outputs.eslint != '' | ||
run: npm run lint | ||
|
||
- name: Collect code coverage | ||
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@v3 | ||
with: | ||
name: coverage | ||
path: ./coverage | ||
retention-days: 1 | ||
|
||
coverage: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install lcov | ||
shell: bash | ||
run: sudo apt-get -y install lcov | ||
|
||
- name: Collect coverage reports | ||
uses: actions/download-artifact@v3 | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
# This workflow uses actions that are not certified by GitHub. They are provided | ||
# by a third-party and are governed by separate terms of service, privacy | ||
# policy, and support documentation. | ||
|
||
name: Scorecard supply-chain security | ||
on: | ||
# For Branch-Protection check. Only the default branch is supported. See | ||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection | ||
branch_protection_rule: | ||
# To guarantee Maintained check is occasionally updated. See | ||
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained | ||
schedule: | ||
- cron: '16 21 * * 1' | ||
push: | ||
branches: [ "master" ] | ||
|
||
# Declare default permissions as read only. | ||
permissions: read-all | ||
|
||
jobs: | ||
analysis: | ||
name: Scorecard analysis | ||
runs-on: ubuntu-latest | ||
permissions: | ||
# Needed to upload the results to code-scanning dashboard. | ||
security-events: write | ||
# Needed to publish results and get a badge (see publish_results below). | ||
id-token: write | ||
|
||
steps: | ||
- name: "Checkout code" | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: "Run analysis" | ||
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 | ||
with: | ||
results_file: results.sarif | ||
results_format: sarif | ||
# (Optional) "write" PAT token. Uncomment the `repo_token` line below if: | ||
# - you want to enable the Branch-Protection check on a *public* repository, or | ||
# - you are installing Scorecard on a *private* repository | ||
# To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat. | ||
# repo_token: ${{ secrets.SCORECARD_TOKEN }} | ||
|
||
# Public repositories: | ||
# - Publish results to OpenSSF REST API for easy access by consumers | ||
# - Allows the repository to include the Scorecard badge. | ||
# - See https://github.com/ossf/scorecard-action#publishing-results. | ||
# For private repositories: | ||
# - `publish_results` will always be set to `false`, regardless | ||
# of the value entered here. | ||
publish_results: true | ||
|
||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF | ||
# format to the repository Actions tab. | ||
- name: "Upload artifact" | ||
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | ||
with: | ||
name: SARIF file | ||
path: results.sarif | ||
retention-days: 5 | ||
|
||
# Upload the results to GitHub's code scanning dashboard. | ||
- name: "Upload to code-scanning" | ||
uses: github/codeql-action/upload-sarif@2f93e4319b2f04a2efc38fa7f78bd681bc3f7b2f # v2.23.2 | ||
with: | ||
sarif_file: results.sarif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
.nyc_output/ | ||
coverage/ | ||
node_modules/ | ||
npm-debug.log | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,124 @@ | ||
2.0.1 / 2024-09-10 | ||
========================= | ||
|
||
* Restore expected behavior `extended` to `false` | ||
|
||
2.0.0 / 2024-09-10 | ||
========================= | ||
* Propagate changes from 1.20.3 | ||
* add brotli support #406 | ||
* Breaking Change: Node.js 18 is the minimum supported version | ||
|
||
2.0.0-beta.2 / 2023-02-23 | ||
========================= | ||
|
||
This incorporates all changes after 1.19.1 up to 1.20.2. | ||
|
||
* Remove deprecated `bodyParser()` combination middleware | ||
* deps: [email protected] | ||
- Add `DEBUG_HIDE_DATE` environment variable | ||
- Change timer to per-namespace instead of global | ||
- Change non-TTY date format | ||
- Remove `DEBUG_FD` environment variable support | ||
- Support 256 namespace colors | ||
* deps: [email protected] | ||
- Add encoding cp720 | ||
- Add encoding UTF-32 | ||
* deps: [email protected] | ||
|
||
2.0.0-beta.1 / 2021-12-17 | ||
========================= | ||
|
||
* Drop support for Node.js 0.8 | ||
* `req.body` is no longer always initialized to `{}` | ||
- it is left `undefined` unless a body is parsed | ||
* `urlencoded` parser now defaults `extended` to `false` | ||
* Use `on-finished` to determine when body read | ||
|
||
1.20.3 / 2024-09-10 | ||
=================== | ||
|
||
* deps: [email protected] | ||
* add `depth` option to customize the depth level in the parser | ||
* IMPORTANT: The default `depth` level for parsing URL-encoded data is now `32` (previously was `Infinity`) | ||
|
||
1.20.2 / 2023-02-21 | ||
=================== | ||
|
||
* Fix strict json error message on Node.js 19+ | ||
* deps: content-type@~1.0.5 | ||
- perf: skip value escaping when unnecessary | ||
* deps: [email protected] | ||
|
||
1.20.1 / 2022-10-06 | ||
=================== | ||
|
||
* deps: [email protected] | ||
* perf: remove unnecessary object clone | ||
|
||
1.20.0 / 2022-04-02 | ||
=================== | ||
|
||
* Fix error message for json parse whitespace in `strict` | ||
* Fix internal error when inflated body exceeds limit | ||
* Prevent loss of async hooks context | ||
* Prevent hanging when request already read | ||
* deps: [email protected] | ||
- Replace internal `eval` usage with `Function` constructor | ||
- Use instance methods on `process` to check for listeners | ||
* deps: [email protected] | ||
- deps: [email protected] | ||
- deps: [email protected] | ||
* deps: [email protected] | ||
* deps: [email protected] | ||
* deps: [email protected] | ||
- deps: [email protected] | ||
|
||
1.19.2 / 2022-02-15 | ||
=================== | ||
|
||
* deps: [email protected] | ||
* deps: [email protected] | ||
* Fix handling of `__proto__` keys | ||
* deps: [email protected] | ||
- deps: [email protected] | ||
|
||
1.19.1 / 2021-12-10 | ||
=================== | ||
|
||
* deps: [email protected] | ||
* deps: [email protected] | ||
- deps: [email protected] | ||
- deps: [email protected] | ||
- deps: [email protected] | ||
* deps: [email protected] | ||
* deps: [email protected] | ||
- deps: [email protected] | ||
- deps: [email protected] | ||
* deps: [email protected] | ||
* deps: type-is@~1.6.18 | ||
|
||
1.19.0 / 2019-04-25 | ||
=================== | ||
|
||
* deps: [email protected] | ||
- Add petabyte (`pb`) support | ||
* deps: [email protected] | ||
- Set constructor name when possible | ||
- deps: [email protected] | ||
- deps: statuses@'>= 1.5.0 < 2' | ||
* deps: [email protected] | ||
- Added encoding MIK | ||
* deps: [email protected] | ||
- Fix parsing array brackets after index | ||
* deps: [email protected] | ||
- deps: [email protected] | ||
- deps: [email protected] | ||
- deps: [email protected] | ||
* deps: type-is@~1.6.17 | ||
- deps: mime-types@~2.1.24 | ||
- perf: prevent internal `throw` on invalid type | ||
|
||
1.18.3 / 2018-05-14 | ||
=================== | ||
|
||
|
Oops, something went wrong.