Skip to content

Commit 14fb806

Browse files
committed
Merge branch '2.x' into feature/iso-8859-1/take2
* 2.x: (98 commits) fix(deps): raw-body@^3.0.0 (expressjs#529) Also use the qs module for the simple parser (expressjs#387) feat!: remove node less than 18 from ci 2.0.0-beta.2 docs: add missing history entry tests: enable strict mode Remove deprecated bodyParser() combination middleware build: remove conditional code coverage deps: [email protected] deps: [email protected] deps: [email protected] 1.20.2 Fix strict json error message on Node.js 19+ deps: [email protected] build: [email protected] build: [email protected] build: [email protected] deps: content-type@~1.0.5 build: [email protected] build: [email protected] ...
2 parents f4a3bca + 35b50b5 commit 14fb806

File tree

16 files changed

+864
-523
lines changed

16 files changed

+864
-523
lines changed

.github/workflows/ci.yml

Lines changed: 56 additions & 131 deletions
Original file line numberDiff line numberDiff line change
@@ -1,145 +1,51 @@
11
name: ci
22

33
on:
4-
- pull_request
5-
- push
4+
push:
5+
branches:
6+
- master
7+
- '2.x'
8+
paths-ignore:
9+
- '*.md'
10+
pull_request:
11+
paths-ignore:
12+
- '*.md'
613

714
jobs:
815
test:
916
runs-on: ubuntu-latest
1017
strategy:
1118
matrix:
1219
name:
13-
- Node.js 0.8
14-
- Node.js 0.10
15-
- Node.js 0.12
16-
- io.js 1.x
17-
- io.js 2.x
18-
- io.js 3.x
19-
- Node.js 4.x
20-
- Node.js 5.x
21-
- Node.js 6.x
22-
- Node.js 7.x
23-
- Node.js 8.x
24-
- Node.js 9.x
25-
- Node.js 10.x
26-
- Node.js 11.x
27-
- Node.js 12.x
28-
- Node.js 13.x
29-
- Node.js 14.x
20+
- Node.js 18.x
21+
- Node.js 20.x
22+
- Node.js 22.x
3023

3124
include:
32-
- name: Node.js 0.8
33-
node-version: "0.8"
34-
35-
npm-rm: nyc
25+
- name: Node.js 18.x
26+
node-version: "18"
3627

37-
- name: Node.js 0.10
38-
node-version: "0.10"
39-
28+
- name: Node.js 20.x
29+
node-version: "20"
4030

41-
- name: Node.js 0.12
42-
node-version: "0.12"
43-
44-
45-
- name: io.js 1.x
46-
node-version: "1.8"
47-
48-
49-
- name: io.js 2.x
50-
node-version: "2.5"
51-
52-
53-
- name: io.js 3.x
54-
node-version: "3.3"
55-
56-
57-
- name: Node.js 4.x
58-
node-version: "4.9"
59-
60-
61-
- name: Node.js 5.x
62-
node-version: "5.12"
63-
64-
65-
- name: Node.js 6.x
66-
node-version: "6.17"
67-
68-
69-
- name: Node.js 7.x
70-
node-version: "7.10"
71-
72-
73-
- name: Node.js 8.x
74-
node-version: "8.17"
75-
76-
77-
- name: Node.js 9.x
78-
node-version: "9.11"
79-
80-
81-
- name: Node.js 10.x
82-
node-version: "10.24"
83-
84-
85-
- name: Node.js 11.x
86-
node-version: "11.15"
87-
88-
89-
- name: Node.js 12.x
90-
node-version: "12.22"
91-
92-
- name: Node.js 13.x
93-
node-version: "13.14"
94-
95-
- name: Node.js 14.x
96-
node-version: "14.18"
97-
98-
- name: Node.js 15.x
99-
node-version: "15.14"
100-
101-
- name: Node.js 16.x
102-
node-version: "16.13"
103-
104-
- name: Node.js 17.x
105-
node-version: "17.1"
31+
- name: Node.js 22.x
32+
node-version: "22"
10633

10734
steps:
108-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v4
10936

11037
- name: Install Node.js ${{ matrix.node-version }}
11138
shell: bash -eo pipefail -l {0}
11239
run: |
11340
nvm install --default ${{ matrix.node-version }}
114-
if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
115-
nvm install --alias=npm 0.10
116-
nvm use ${{ matrix.node-version }}
117-
sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")"
118-
npm config set strict-ssl false
119-
fi
12041
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"
12142
12243
- name: Configure npm
123-
run: npm config set shrinkwrap false
124-
125-
- name: Remove npm module(s) ${{ matrix.npm-rm }}
126-
run: npm rm --silent --save-dev ${{ matrix.npm-rm }}
127-
if: matrix.npm-rm != ''
128-
129-
- name: Install npm module(s) ${{ matrix.npm-i }}
130-
run: npm install --save-dev ${{ matrix.npm-i }}
131-
if: matrix.npm-i != ''
132-
133-
- name: Setup Node.js version-specific dependencies
134-
shell: bash
13544
run: |
136-
# eslint for linting
137-
# - remove on Node.js < 10
138-
if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
139-
node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \
140-
grep -E '^eslint(-|$)' | \
141-
sort -r | \
142-
xargs -n1 npm rm --silent --save-dev
45+
if [[ "$(npm config get package-lock)" == "true" ]]; then
46+
npm config set package-lock false
47+
else
48+
npm config set shrinkwrap false
14349
fi
14450
14551
- name: Install Node.js dependencies
@@ -152,35 +58,54 @@ jobs:
15258
echo "node@$(node -v)"
15359
echo "npm@$(npm -v)"
15460
npm -s ls ||:
155-
(npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print "::set-output name=" $2 "::" $3 }'
61+
(npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT"
15662
15763
- name: Run tests
15864
shell: bash
15965
run: |
160-
if npm -ps ls nyc | grep -q nyc; then
161-
npm run test-ci
162-
else
163-
npm test
164-
fi
66+
npm run test-ci
67+
cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"
16568
16669
- name: Lint code
16770
if: steps.list_env.outputs.eslint != ''
16871
run: npm run lint
16972

17073
- name: Collect code coverage
171-
uses: coverallsapp/github-action@master
172-
if: steps.list_env.outputs.nyc != ''
74+
run: |
75+
if [[ -d ./coverage ]]; then
76+
mv ./coverage "./${{ matrix.name }}"
77+
mkdir ./coverage
78+
mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"
79+
fi
80+
81+
- name: Upload code coverage
82+
uses: actions/upload-artifact@v3
17383
with:
174-
github-token: ${{ secrets.GITHUB_TOKEN }}
175-
flag-name: run-${{ matrix.test_number }}
176-
parallel: true
84+
name: coverage
85+
path: ./coverage
86+
retention-days: 1
17787

17888
coverage:
17989
needs: test
18090
runs-on: ubuntu-latest
18191
steps:
182-
- name: Uploade code coverage
92+
- uses: actions/checkout@v4
93+
94+
- name: Install lcov
95+
shell: bash
96+
run: sudo apt-get -y install lcov
97+
98+
- name: Collect coverage reports
99+
uses: actions/download-artifact@v3
100+
with:
101+
name: coverage
102+
path: ./coverage
103+
104+
- name: Merge coverage reports
105+
shell: bash
106+
run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info
107+
108+
- name: Upload coverage report
183109
uses: coverallsapp/github-action@master
184110
with:
185-
github-token: ${{ secrets.github_token }}
186-
parallel-finished: true
111+
github-token: ${{ secrets.GITHUB_TOKEN }}

HISTORY.md

Lines changed: 76 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,82 @@
1-
unreleased
2-
==========
1+
2.0.0-beta.2 / 2023-02-23
2+
=========================
3+
4+
This incorporates all changes after 1.19.1 up to 1.20.2.
5+
6+
* Remove deprecated `bodyParser()` combination middleware
7+
8+
- Add `DEBUG_HIDE_DATE` environment variable
9+
- Change timer to per-namespace instead of global
10+
- Change non-TTY date format
11+
- Remove `DEBUG_FD` environment variable support
12+
- Support 256 namespace colors
13+
14+
- Add encoding cp720
15+
- Add encoding UTF-32
16+
17+
18+
2.0.0-beta.1 / 2021-12-17
19+
=========================
20+
21+
* Drop support for Node.js 0.8
22+
* `req.body` is no longer always initialized to `{}`
23+
- it is left `undefined` unless a body is parsed
24+
* `urlencoded` parser now defaults `extended` to `false`
25+
* Use `on-finished` to determine when body read
26+
27+
1.20.2 / 2023-02-21
28+
===================
29+
30+
* Fix strict json error message on Node.js 19+
31+
* deps: content-type@~1.0.5
32+
- perf: skip value escaping when unnecessary
33+
34+
35+
1.20.1 / 2022-10-06
36+
===================
37+
38+
39+
* perf: remove unnecessary object clone
40+
41+
1.20.0 / 2022-04-02
42+
===================
43+
44+
* Fix error message for json parse whitespace in `strict`
45+
* Fix internal error when inflated body exceeds limit
46+
* Prevent loss of async hooks context
47+
* Prevent hanging when request already read
48+
49+
- Replace internal `eval` usage with `Function` constructor
50+
- Use instance methods on `process` to check for listeners
51+
52+
53+
54+
55+
56+
57+
58+
59+
1.19.2 / 2022-02-15
60+
===================
61+
62+
63+
64+
* Fix handling of `__proto__` keys
65+
66+
67+
68+
1.19.1 / 2021-12-10
69+
===================
370

4-
71+
72+
573
74+
75+
676
7-
8-
77+
78+
79+
980
1081
* deps: type-is@~1.6.18
1182

0 commit comments

Comments
 (0)