Skip to content

Commit e9f9aae

Browse files
committed
Merge tag '4.19.0' into 5.x
4.19.0
2 parents 318fd4b + 084e365 commit e9f9aae

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2818
-769
lines changed

.github/workflows/ci.yml

+74-17
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ jobs:
2323
- Node.js 12.x
2424
- Node.js 13.x
2525
- Node.js 14.x
26+
- Node.js 15.x
27+
- Node.js 16.x
28+
- Node.js 17.x
29+
- Node.js 18.x
30+
- Node.js 19.x
31+
- Node.js 20.x
32+
- Node.js 21.x
2633

2734
include:
2835
- name: Node.js 4.0
@@ -39,19 +46,19 @@ jobs:
3946

4047
- name: Node.js 6.x
4148
node-version: "6.17"
42-
npm-i: [email protected] [email protected] supertest@6.1.6
49+
npm-i: [email protected] [email protected] supertest@3.4.2
4350

4451
- name: Node.js 7.x
4552
node-version: "7.10"
4653
4754

4855
- name: Node.js 8.x
4956
node-version: "8.17"
50-
57+
5158

5259
- name: Node.js 9.x
5360
node-version: "9.11"
54-
61+
5562

5663
- name: Node.js 10.x
5764
node-version: "10.24"
@@ -63,15 +70,38 @@ jobs:
6370

6471
- name: Node.js 12.x
6572
node-version: "12.22"
73+
6674

6775
- name: Node.js 13.x
6876
node-version: "13.14"
77+
6978

7079
- name: Node.js 14.x
71-
node-version: "14.19"
80+
node-version: "14.20"
81+
82+
- name: Node.js 15.x
83+
node-version: "15.14"
84+
85+
- name: Node.js 16.x
86+
node-version: "16.20"
87+
88+
- name: Node.js 17.x
89+
node-version: "17.9"
90+
91+
- name: Node.js 18.x
92+
node-version: "18.19"
93+
94+
- name: Node.js 19.x
95+
node-version: "19.9"
96+
97+
- name: Node.js 20.x
98+
node-version: "20.11"
99+
100+
- name: Node.js 21.x
101+
node-version: "21.6"
72102

73103
steps:
74-
- uses: actions/checkout@v2
104+
- uses: actions/checkout@v4
75105

76106
- name: Install Node.js ${{ matrix.node-version }}
77107
shell: bash -eo pipefail -l {0}
@@ -82,7 +112,11 @@ jobs:
82112
- name: Configure npm
83113
run: |
84114
npm config set loglevel error
85-
npm config set shrinkwrap false
115+
if [[ "$(npm config get package-lock)" == "true" ]]; then
116+
npm config set package-lock false
117+
else
118+
npm config set shrinkwrap false
119+
fi
86120
87121
- name: Install npm module(s) ${{ matrix.npm-i }}
88122
run: npm install --save-dev ${{ matrix.npm-i }}
@@ -95,8 +129,8 @@ jobs:
95129
shell: bash
96130
run: |
97131
# eslint for linting
98-
# - remove on Node.js < 10
99-
if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
132+
# - remove on Node.js < 12
133+
if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 12 ]]; then
100134
node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \
101135
grep -E '^eslint(-|$)' | \
102136
sort -r | \
@@ -113,29 +147,52 @@ jobs:
113147
echo "node@$(node -v)"
114148
echo "npm@$(npm -v)"
115149
npm -s ls ||:
116-
(npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print "::set-output name=" $2 "::" $3 }'
150+
(npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT"
117151
118152
- name: Run tests
119153
shell: bash
120-
run: npm run test-ci
154+
run: |
155+
npm run test-ci
156+
cp coverage/lcov.info "coverage/${{ matrix.name }}.lcov"
121157
122158
- name: Lint code
123159
if: steps.list_env.outputs.eslint != ''
124160
run: npm run lint
125161

126162
- name: Collect code coverage
127-
uses: coverallsapp/github-action@master
163+
run: |
164+
mv ./coverage "./${{ matrix.name }}"
165+
mkdir ./coverage
166+
mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"
167+
168+
- name: Upload code coverage
169+
uses: actions/upload-artifact@v3
128170
with:
129-
github-token: ${{ secrets.GITHUB_TOKEN }}
130-
flag-name: run-${{ matrix.test_number }}
131-
parallel: true
171+
name: coverage
172+
path: ./coverage
173+
retention-days: 1
132174

133175
coverage:
134176
needs: test
135177
runs-on: ubuntu-latest
136178
steps:
137-
- name: Upload code coverage
179+
- uses: actions/checkout@v4
180+
181+
- name: Install lcov
182+
shell: bash
183+
run: sudo apt-get -y install lcov
184+
185+
- name: Collect coverage reports
186+
uses: actions/download-artifact@v3
187+
with:
188+
name: coverage
189+
path: ./coverage
190+
191+
- name: Merge coverage reports
192+
shell: bash
193+
run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info
194+
195+
- name: Upload coverage report
138196
uses: coverallsapp/github-action@master
139197
with:
140-
github-token: ${{ secrets.github_token }}
141-
parallel-finished: true
198+
github-token: ${{ secrets.GITHUB_TOKEN }}

Charter.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ also easily visible to outsiders.
99

1010
## Section 1: Scope
1111

12-
Express is a http web server framework with a simple and expressive API
12+
Express is a HTTP web server framework with a simple and expressive API
1313
which is highly aligned with Node.js core. We aim to be the best in
1414
class for writing performant, spec compliant, and powerful web servers
1515
in Node.js. As one of the oldest and most popular web frameworks in
@@ -24,7 +24,7 @@ Express is made of many modules spread between three GitHub Orgs:
2424
libraries
2525
- [pillarjs](http://github.com/pillarjs/): Components which make up
2626
Express but can also be used for other web frameworks
27-
- [jshttp](http://github.com/jshttp/): Low level http libraries
27+
- [jshttp](http://github.com/jshttp/): Low level HTTP libraries
2828

2929
### 1.2: Out-of-Scope
3030

Contributing.md

+69-6
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ contributors can be involved in decision making.
1212

1313
* A **Contributor** is any individual creating or commenting on an issue or pull request.
1414
* A **Committer** is a subset of contributors who have been given write access to the repository.
15+
* A **Project Captain** is the lead maintainer of a repository.
1516
* A **TC (Technical Committee)** is a group of committers representing the required technical
1617
expertise to resolve rare disputes.
1718
* A **Triager** is a subset of contributors who have been given triage access to the repository.
@@ -102,12 +103,74 @@ If a consensus cannot be reached that has no objections then a majority wins vot
102103
is called. It is also expected that the majority of decisions made by the TC are via
103104
a consensus seeking process and that voting is only used as a last-resort.
104105

105-
Resolution may involve returning the issue to committers with suggestions on how to
106-
move forward towards a consensus. It is not expected that a meeting of the TC
106+
Resolution may involve returning the issue to project captains with suggestions on
107+
how to move forward towards a consensus. It is not expected that a meeting of the TC
107108
will resolve all issues on its agenda during that meeting and may prefer to continue
108-
the discussion happening among the committers.
109+
the discussion happening among the project captains.
109110

110-
Members can be added to the TC at any time. Any committer can nominate another committer
111+
Members can be added to the TC at any time. Any TC member can nominate another committer
111112
to the TC and the TC uses its standard consensus seeking process to evaluate whether or
112-
not to add this new member. Members who do not participate consistently at the level of
113-
a majority of the other members are expected to resign.
113+
not to add this new member. The TC will consist of a minimum of 3 active members and a
114+
maximum of 10. If the TC should drop below 5 members the active TC members should nominate
115+
someone new. If a TC member is stepping down, they are encouraged (but not required) to
116+
nominate someone to take their place.
117+
118+
TC members will be added as admin's on the Github orgs, npm orgs, and other resources as
119+
necessary to be effective in the role.
120+
121+
To remain "active" a TC member should have participation within the last 12 months and miss
122+
no more than six consecutive TC meetings. Our goal is to increase participation, not punish
123+
people for any lack of participation, this guideline should be only be used as such
124+
(replace an inactive member with a new active one, for example). Members who do not meet this
125+
are expected to step down. If A TC member does not step down, an issue can be opened in the
126+
discussions repo to move them to inactive status. TC members who step down or are removed due
127+
to inactivity will be moved into inactive status.
128+
129+
Inactive status members can become active members by self nomination if the TC is not already
130+
larger than the maximum of 10. They will also be given preference if, while at max size, an
131+
active member steps down.
132+
133+
## Project Captains
134+
135+
The Express TC can designate captains for individual projects/repos in the
136+
organizations. These captains are responsible for being the primary
137+
day-to-day maintainers of the repo on a technical and community front.
138+
Repo captains are empowered with repo ownership and package publication rights.
139+
When there are conflicts, especially on topics that effect the Express project
140+
at large, captains are responsible to raise it up to the TC and drive
141+
those conflicts to resolution. Captains are also responsible for making sure
142+
community members follow the community guidelines, maintaining the repo
143+
and the published package, as well as in providing user support.
144+
145+
Like TC members, Repo captains are a subset of committers.
146+
147+
To become a captain for a project the candidate is expected to participate in that
148+
project for at least 6 months as a committer prior to the request. They should have
149+
helped with code contributions as well as triaging issues. They are also required to
150+
have 2FA enabled on both their GitHub and npm accounts. Any TC member or existing
151+
captain on the repo can nominate another committer to the captain role, submit a PR to
152+
this doc, under `Current Project Captains` section (maintaining the sort order) with
153+
the project, their GitHub handle and npm username (if different). The PR will require
154+
at least 2 approvals from TC members and 2 weeks hold time to allow for comment and/or
155+
dissent. When the PR is merged, a TC member will add them to the proper GitHub/npm groups.
156+
157+
### Current Project Captains
158+
159+
- `expressjs/express`: @wesleytodd
160+
- `expressjs/discussions`: @wesleytodd
161+
- `expressjs/expressjs.com`: @crandmck
162+
- `expressjs/body-parser`: @wesleytodd
163+
- `expressjs/multer`: @LinusU
164+
- `expressjs/cookie-parser`: @wesleytodd
165+
- `expressjs/generator`: @wesleytodd
166+
- `expressjs/statusboard`: @wesleytodd
167+
- `pillarjs/path-to-regexp`: @blakeembrey
168+
- `pillarjs/router`: @dougwilson, @wesleytodd
169+
- `pillarjs/finalhandler`: @wesleytodd
170+
- `pillarjs/request`: @wesleytodd
171+
- `jshttp/http-errors`: @wesleytodd
172+
- `jshttp/cookie`: @wesleytodd
173+
- `jshttp/on-finished`: @wesleytodd
174+
- `jshttp/forwarded`: @wesleytodd
175+
- `jshttp/proxy-addr`: @wesleytodd
176+

History.md

+85-5
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,86 @@ This is the first Express 5.0 alpha release, based off 4.10.1.
162162
* add:
163163
- `app.router` is a reference to the base router
164164

165+
4.18.3 / 2024-03-20
166+
==========
167+
168+
* Prevent open redirect allow list bypass due to encodeurl
169+
170+
171+
4.18.3 / 2024-02-29
172+
==========
173+
174+
* Fix routing requests without method
175+
176+
- Fix strict json error message on Node.js 19+
177+
- deps: content-type@~1.0.5
178+
179+
180+
- Add `partitioned` option
181+
182+
4.18.2 / 2022-10-08
183+
===================
184+
185+
* Fix regression routing a large stack in a single route
186+
187+
188+
- perf: remove unnecessary object clone
189+
190+
191+
4.18.1 / 2022-04-29
192+
===================
193+
194+
* Fix hanging on large stack of sync routes
195+
196+
4.18.0 / 2022-04-25
197+
===================
198+
199+
* Add "root" option to `res.download`
200+
* Allow `options` without `filename` in `res.download`
201+
* Deprecate string and non-integer arguments to `res.status`
202+
* Fix behavior of `null`/`undefined` as `maxAge` in `res.cookie`
203+
* Fix handling very large stacks of sync middleware
204+
* Ignore `Object.prototype` values in settings through `app.set`/`app.get`
205+
* Invoke `default` with same arguments as types in `res.format`
206+
* Support proper 205 responses using `res.send`
207+
* Use `http-errors` for `res.format` error
208+
209+
- Fix error message for json parse whitespace in `strict`
210+
- Fix internal error when inflated body exceeds limit
211+
- Prevent loss of async hooks context
212+
- Prevent hanging when request already read
213+
214+
215+
216+
217+
218+
219+
- Add `priority` option
220+
- Fix `expires` option to reject invalid dates
221+
222+
- Replace internal `eval` usage with `Function` constructor
223+
- Use instance methods on `process` to check for listeners
224+
225+
- Remove set content headers that break response
226+
227+
228+
229+
- Prevent loss of async hooks context
230+
231+
232+
- Fix emitted 416 error missing headers property
233+
- Limit the headers removed for 304 response
234+
235+
236+
237+
238+
239+
240+
241+
242+
- Remove code 306
243+
- Rename `425 Unordered Collection` to standard `425 Too Early`
244+
165245
4.17.3 / 2022-02-16
166246
===================
167247

@@ -2212,7 +2292,7 @@ This is the first Express 5.0 alpha release, based off 4.10.1.
22122292
22132293
- deprecate `connect(middleware)` -- use `app.use(middleware)` instead
22142294
- deprecate `connect.createServer()` -- use `connect()` instead
2215-
- fix `res.setHeader()` patch to work with with get -> append -> set pattern
2295+
- fix `res.setHeader()` patch to work with get -> append -> set pattern
22162296
- deps: compression@~1.0.8
22172297
- deps: errorhandler@~1.1.1
22182298
- deps: express-session@~1.5.0
@@ -3423,8 +3503,8 @@ Shaw]
34233503
* Added node v0.1.97 compatibility
34243504
* Added support for deleting cookies via Request#cookie('key', null)
34253505
* Updated haml submodule
3426-
* Fixed not-found page, now using using charset utf-8
3427-
* Fixed show-exceptions page, now using using charset utf-8
3506+
* Fixed not-found page, now using charset utf-8
3507+
* Fixed show-exceptions page, now using charset utf-8
34283508
* Fixed view support due to fs.readFile Buffers
34293509
* Changed; mime.type() no longer accepts ".type" due to node extname() changes
34303510

@@ -3459,7 +3539,7 @@ Shaw]
34593539
==================
34603540

34613541
* Added charset support via Request#charset (automatically assigned to 'UTF-8' when respond()'s
3462-
encoding is set to 'utf8' or 'utf-8'.
3542+
encoding is set to 'utf8' or 'utf-8').
34633543
* Added "encoding" option to Request#render(). Closes #299
34643544
* Added "dump exceptions" setting, which is enabled by default.
34653545
* Added simple ejs template engine support
@@ -3498,7 +3578,7 @@ Shaw]
34983578
* Added [haml.js](http://github.com/visionmedia/haml.js) submodule; removed haml-js
34993579
* Added callback function support to Request#halt() as 3rd/4th arg
35003580
* Added preprocessing of route param wildcards using param(). Closes #251
3501-
* Added view partial support (with collections etc)
3581+
* Added view partial support (with collections etc.)
35023582
* Fixed bug preventing falsey params (such as ?page=0). Closes #286
35033583
* Fixed setting of multiple cookies. Closes #199
35043584
* Changed; view naming convention is now NAME.TYPE.ENGINE (for example page.html.haml)

0 commit comments

Comments
 (0)