Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9e3dbb4
chore(test): remove promise support check from tests (#6148)
Phillip9587 Nov 12, 2024
805ef52
Use loop for acceptParams (#6066)
blakeembrey Nov 14, 2024
cc751cf
improve step update documentation
bjohansebas Nov 6, 2024
9f8589e
cleanup: remove unnecessary require for global Buffer
Phillip9587 Nov 15, 2024
4e92ac9
cleanup: remove AsyncLocalStorage check from tests (#6147)
Phillip9587 Nov 15, 2024
52ed646
update history.md for acceptParams change (#6177)
jonchurch Nov 20, 2024
39f5d63
docs: add @rxmarbles to the triage team (#6151)
UlisesGascon Nov 27, 2024
e4a61bd
refactor: improve readability (#6173)
sazk07 Nov 27, 2024
43020ff
docs: clarify the security process in the triage role (#6217)
bjohansebas Dec 20, 2024
b11122b
chore: replace `methods` dependency with standard library (#6196)
jonkoops Jan 2, 2025
246f6f5
fix: Remove `utils-merge` dependency - use spread syntax instead (#6091)
Phillip9587 Jan 8, 2025
6a40af8
fix(devdeps): update dev deps (#6211)
Abdel-Monaam-Aouini Jan 8, 2025
4111359
fix(refactor): prefix built-in node module imports
slagiewka Dec 21, 2024
4f952a9
fix: remove download size badges
wesleytodd Jan 8, 2025
256a3d1
Remove unused `depd` dependency
jonkoops Dec 2, 2024
1c5cf0f
refactor: remove `Invalid action input`
hamirmahal Jan 8, 2025
ff86319
ci: add support for OSSF scorecard reporting (#5431)
UlisesGascon Jan 15, 2025
3bbffdc
docs: add @Phillip9587 to the triage team
bjohansebas Jan 13, 2025
6233671
fix: added a missing semicolon in css styles in examples/auth (#6297)
pr4j3sh Jan 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
persist-credentials: false

- name: Install dependencies
run: npm install --ignore-scripts --only=dev
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/scorecard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# 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
# Uncomment the permissions below if installing in a private repository.
# contents: read
# actions: read

steps:
- name: "Checkout code"
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false

- name: "Run analysis"
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6
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@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
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
7 changes: 7 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
unreleased
========================

* Remove `utils-merge` dependency - use spread syntax instead
* Remove `Object.setPrototypeOf` polyfill
* cleanup: remove AsyncLocalStorage check from tests
* cleanup: remove unnecessary require for global Buffer
* perf: use loop for acceptParams
* Replace `methods` dependency with standard library
* refactor: prefix built-in node module imports
* Remove unused `depd` dependency

5.0.1 / 2024-10-08
==========
Expand Down
5 changes: 2 additions & 3 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@


[![NPM Version][npm-version-image]][npm-url]
[![NPM Install Size][npm-install-size-image]][npm-install-size-url]
[![NPM Downloads][npm-downloads-image]][npm-downloads-url]
[![OpenSSF Scorecard Badge][ossf-scorecard-badge]][ossf-scorecard-visualizer]

Expand Down Expand Up @@ -210,7 +209,9 @@ The original author of Express is [TJ Holowaychuk](https://github.com/tj)
* [dakshkhetan](https://github.com/dakshkhetan) - **Daksh Khetan** (he/him)
* [lucasraziel](https://github.com/lucasraziel) - **Lucas Soares Do Rego**
* [IamLizu](https://github.com/IamLizu) - **S M Mahmudul Hasan** (he/him)
* [Phillip9587](https://github.com/Phillip9587) - **Phillip Barta**
* [Sushmeet](https://github.com/Sushmeet) - **Sushmeet Sunger**
* [rxmarbles](https://github.com/rxmarbles) **Rick Markins** (He/him)

<details>
<summary>Triagers emeriti members</summary>
Expand Down Expand Up @@ -256,8 +257,6 @@ The original author of Express is [TJ Holowaychuk](https://github.com/tj)
[github-actions-ci-url]: https://github.com/expressjs/express/actions/workflows/ci.yml
[npm-downloads-image]: https://badgen.net/npm/dm/express
[npm-downloads-url]: https://npmcharts.com/compare/express?minimal=true
[npm-install-size-image]: https://badgen.net/packagephobia/install/express
[npm-install-size-url]: https://packagephobia.com/result?p=express
[npm-url]: https://npmjs.org/package/express
[npm-version-image]: https://badgen.net/npm/v/express
[ossf-scorecard-badge]: https://api.scorecard.dev/projects/github.com/expressjs/express/badge
Expand Down
19 changes: 11 additions & 8 deletions Release-Process.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ $ git merge --ff-only <proposal-branch>
<release-branch> - see "Release branch" of "Branches" above.
<proposal-branch> - see "Proposal branch" of "Non-patch flow" above.

**NOTE:** You may need to rebase the proposal branch to allow a fast-forward
merge. Using a fast-forward merge keeps the history clean as it does
not introduce merge commits.
> [!NOTE]
> You may need to rebase the proposal branch to allow a fast-forward
> merge. Using a fast-forward merge keeps the history clean as it does
> not introduce merge commits.

### Step 3. Update the History.md and package.json to the new version number

Expand Down Expand Up @@ -189,11 +190,13 @@ $ npm login <npm-username>
$ npm publish
```

**NOTE:** The version number to publish will be picked up automatically from
package.json.
> [!NOTE]
> The version number to publish will be picked up automatically from
> package.json.

### Step 7. Update documentation website

The documentation website https://expressjs.com/ documents the current release version in various places. For a new release:
1. Change the value of `current_version` in https://github.com/expressjs/expressjs.com/blob/gh-pages/_data/express.yml to match the latest version number.
2. Add a new section to the change log. For example, for a 4.x release, https://github.com/expressjs/expressjs.com/blob/gh-pages/en/changelog/4x.md,
The documentation website https://expressjs.com/ documents the current release version in various places. To update these, follow these steps:

1. Manually run the [`Update External Docs` workflow](https://github.com/expressjs/expressjs.com/actions/workflows/update-external-docs.yml) in expressjs.com repository.
2. Add a new section to the [changelog](https://github.com/expressjs/expressjs.com/blob/gh-pages/en/changelog/index.md) in the expressjs.com website.
2 changes: 2 additions & 0 deletions Triager-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,5 @@ If you have questions feel free to reach out to any of the TC members.
- For recurring issues, it is helpful to create functional examples to demonstrate (publish as gists or a repo)
- Review and identify the maintainers. If necessary, at-mention one or more of them if you are unsure what to do
- Make sure all your interactions are professional, welcoming, and respectful to the parties involved.
- When an issue refers to security concerns, responsibility is delegated to the repository captain or the security group in any public communication.
- If an issue has been open for a long time, the person in charge should be contacted internally through the private Slack chat.
2 changes: 1 addition & 1 deletion examples/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

var express = require('../..');
var hash = require('pbkdf2-password')()
var path = require('path');
var path = require('node:path');
var session = require('express-session');

var app = module.exports = express();
Expand Down
2 changes: 1 addition & 1 deletion examples/auth/views/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
font: 13px Helvetica, Arial, sans-serif;
}
.error {
color: red
color: red;
}
.success {
color: green;
Expand Down
2 changes: 1 addition & 1 deletion examples/downloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

var express = require('../../');
var path = require('path');
var path = require('node:path');

var app = module.exports = express();

Expand Down
2 changes: 1 addition & 1 deletion examples/ejs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

var express = require('../../');
var path = require('path');
var path = require('node:path');

var app = module.exports = express();

Expand Down
2 changes: 1 addition & 1 deletion examples/error-pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

var express = require('../../');
var path = require('path');
var path = require('node:path');
var app = module.exports = express();
var logger = require('morgan');
var silent = process.env.NODE_ENV === 'test'
Expand Down
4 changes: 2 additions & 2 deletions examples/markdown/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

var escapeHtml = require('escape-html');
var express = require('../..');
var fs = require('fs');
var fs = require('node:fs');
var marked = require('marked');
var path = require('path');
var path = require('node:path');

var app = module.exports = express();

Expand Down
2 changes: 1 addition & 1 deletion examples/mvc/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

var express = require('../..');
var logger = require('morgan');
var path = require('path');
var path = require('node:path');
var session = require('express-session');
var methodOverride = require('method-override');

Expand Down
4 changes: 2 additions & 2 deletions examples/mvc/lib/boot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
*/

var express = require('../../..');
var fs = require('fs');
var path = require('path');
var fs = require('node:fs');
var path = require('node:path');

module.exports = function(parent, options){
var dir = path.join(__dirname, '..', 'controllers');
Expand Down
3 changes: 2 additions & 1 deletion examples/params/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ app.param(['to', 'from'], function(req, res, next, num, name){
// Load user by id

app.param('user', function(req, res, next, id){
if (req.user = users[id]) {
req.user = users[id]
if (req.user) {
next();
} else {
next(createError(404, 'failed to find user'));
Expand Down
2 changes: 1 addition & 1 deletion examples/route-separation/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

var express = require('../..');
var path = require('path');
var path = require('node:path');
var app = express();
var logger = require('morgan');
var cookieParser = require('cookie-parser');
Expand Down
2 changes: 1 addition & 1 deletion examples/search/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/

var express = require('../..');
var path = require('path');
var path = require('node:path');
var redis = require('redis');

var db = redis.createClient();
Expand Down
2 changes: 1 addition & 1 deletion examples/static-files/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

var express = require('../..');
var logger = require('morgan');
var path = require('path');
var path = require('node:path');
var app = express();

// log requests
Expand Down
4 changes: 2 additions & 2 deletions examples/view-constructor/github-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
* Module dependencies.
*/

var https = require('https');
var path = require('path');
var https = require('node:https');
var path = require('node:path');
var extname = path.extname;

/**
Expand Down
2 changes: 1 addition & 1 deletion examples/view-locals/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

var express = require('../..');
var path = require('path');
var path = require('node:path');
var User = require('./user');
var app = express();

Expand Down
28 changes: 9 additions & 19 deletions lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,14 @@
*/

var finalhandler = require('finalhandler');
var methods = require('methods');
var debug = require('debug')('express:application');
var View = require('./view');
var http = require('http');
var http = require('node:http');
var methods = require('./utils').methods;
var compileETag = require('./utils').compileETag;
var compileQueryParser = require('./utils').compileQueryParser;
var compileTrust = require('./utils').compileTrust;
var merge = require('utils-merge');
var resolve = require('path').resolve;
var resolve = require('node:path').resolve;
var once = require('once')
var Router = require('router');

Expand Down Expand Up @@ -469,8 +468,8 @@ app.disable = function disable(setting) {
* Delegate `.VERB(...)` calls to `router.VERB(...)`.
*/

methods.forEach(function(method){
app[method] = function(path){
methods.forEach(function (method) {
app[method] = function (path) {
if (method === 'get' && arguments.length === 1) {
// app.get(setting)
return this.set(path);
Expand Down Expand Up @@ -525,7 +524,6 @@ app.render = function render(name, options, callback) {
var done = callback;
var engines = this.engines;
var opts = options;
var renderOptions = {};
var view;

// support callback function as second arg
Expand All @@ -534,16 +532,8 @@ app.render = function render(name, options, callback) {
opts = {};
}

// merge app.locals
merge(renderOptions, this.locals);

// merge options._locals
if (opts._locals) {
merge(renderOptions, opts._locals);
}

// merge options
merge(renderOptions, opts);
var renderOptions = { ...this.locals, ...opts._locals, ...opts };

// set .cache unless explicitly provided
if (renderOptions.cache == null) {
Expand Down Expand Up @@ -593,8 +583,8 @@ app.render = function render(name, options, callback) {
* and HTTPS server you may do so with the "http"
* and "https" modules as shown here:
*
* var http = require('http')
* , https = require('https')
* var http = require('node:http')
* , https = require('node:https')
* , express = require('express')
* , app = express();
*
Expand All @@ -605,7 +595,7 @@ app.render = function render(name, options, callback) {
* @public
*/

app.listen = function listen () {
app.listen = function listen() {
var server = http.createServer(this)
var args = Array.prototype.slice.call(arguments)
if (typeof args[args.length - 1] === 'function') {
Expand Down
2 changes: 1 addition & 1 deletion lib/express.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*/

var bodyParser = require('body-parser')
var EventEmitter = require('events').EventEmitter;
var EventEmitter = require('node:events').EventEmitter;
var mixin = require('merge-descriptors');
var proto = require('./application');
var Router = require('router');
Expand Down
4 changes: 2 additions & 2 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
*/

var accepts = require('accepts');
var isIP = require('net').isIP;
var isIP = require('node:net').isIP;
var typeis = require('type-is');
var http = require('http');
var http = require('node:http');
var fresh = require('fresh');
var parseRange = require('range-parser');
var parse = require('parseurl');
Expand Down
Loading
Loading