Skip to content

Commit

Permalink
Merge branch 'master' into tools/improve-pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
UlisesGascon committed Feb 22, 2024
2 parents ea604fb + 0e3ab6e commit c8d7c7b
Show file tree
Hide file tree
Showing 11 changed files with 102 additions and 88 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Expand Up @@ -110,13 +110,13 @@ jobs:
node-version: "17.9"

- name: Node.js 18.x
node-version: "18.15"
node-version: "18.19"

- name: Node.js 19.x
node-version: "19.7"
node-version: "19.9"

steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Install Node.js ${{ matrix.node-version }}
shell: bash -eo pipefail -l {0}
Expand Down Expand Up @@ -194,8 +194,8 @@ jobs:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0

- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install lcov
shell: bash
run: sudo apt-get -y install lcov
Expand Down
59 changes: 53 additions & 6 deletions Contributing.md
Expand Up @@ -12,6 +12,7 @@ contributors can be involved in decision making.

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

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

Members can be added to the TC at any time. Any committer can nominate another committer
Members can be added to the TC at any time. Any TC member can nominate another committer
to the TC and the TC uses its standard consensus seeking process to evaluate whether or
not to add this new member. Members who do not participate consistently at the level of
a majority of the other members are expected to resign.
not to add this new member. The TC will consist of a minimum of 3 active members and a
maximum of 10. If the TC should drop below 5 members the active TC members should nominate
someone new. If a TC member is stepping down, they are encouraged (but not required) to
nominate someone to take their place.

TC members will be added as admin's on the Github orgs, npm orgs, and other resources as
necessary to be effective in the role.

To remain "active" a TC member should have participation within the last 6 months and miss
no more than three consecutive TC meetings. Members who do not meet this are expected to step down.
If A TC member does not step down, an issue can be opened in the discussions repo to move them
to inactive status. TC members who step down or are removed due to inactivity will be moved
into inactive status.

Inactive status members can become active members by self nomination if the TC is not already
larger than the maximum of 10. They will also be given preference if, while at max size, an
active member steps down.

## Project Captains

The Express TC can designate captains for individual projects/repos in the
organizations. These captains are responsible for being the primary
day-to-day maintainers of the repo on a technical and community front.
Repo captains are empowered with repo ownership and package publication rights.
When there are conflicts, especially on topics that effect the Express project
at large, captains are responsible to raise it up to the TC and drive
those conflicts to resolution. Captains are also responsible for making sure
community members follow the community guidelines, maintaining the repo
and the published package, as well as in providing user support.

Like TC members, Repo captains are a subset of committers.

To become a captain for a project the candidate is expected to participate in that
project for at least 6 months as a committer prior to the request. They should have
helped with code contributions as well as triaging issues. They are also required to
have 2FA enabled on both their GitHub and npm accounts. Any TC member or existing
captain on the repo can nominate another committer to the captain role, submit a PR to
this doc, under `Current Project Captains` section (maintaining the sort order) with
the project, their GitHub handle and npm username (if different). The PR will require
at least 2 approvals from TC members and 2 weeks hold time to allow for comment and/or
dissent. When the PR is merged, a TC member will add them to the proper GitHub/npm groups.

### Current Project Captains

- `expressjs.com`: @crandmck
- `multer`: @LinusU
- `path-to-regexp`: @blakeembrey
- `router`: @dougwilson
4 changes: 2 additions & 2 deletions appveyor.yml
Expand Up @@ -19,8 +19,8 @@ environment:
- nodejs_version: "15.14"
- nodejs_version: "16.20"
- nodejs_version: "17.9"
- nodejs_version: "18.15"
- nodejs_version: "19.7"
- nodejs_version: "18.19"
- nodejs_version: "19.9"
cache:
- node_modules
install:
Expand Down
34 changes: 34 additions & 0 deletions benchmarks/README.md
@@ -0,0 +1,34 @@
# Express Benchmarks

## Installation

You will need to install [wrk](https://github.com/wg/wrk/blob/master/INSTALL) in order to run the benchmarks.

## Running

To run the benchmarks, first install the dependencies `npm i`, then run `make`

The output will look something like this:

```
50 connections
1 middleware
7.15ms
6784.01
[...redacted...]
1000 connections
10 middleware
139.21ms
6155.19
```

### Tip: Include Node.js version in output

You can use `make && node -v` to include the node.js version in the output.

### Tip: Save the results to a file

You can use `make > results.log` to save the results to a file `results.log`.
1 change: 0 additions & 1 deletion examples/README.md
Expand Up @@ -13,7 +13,6 @@ This page contains list of examples using Express.
- [hello-world](./hello-world) - Simple request handler
- [markdown](./markdown) - Markdown as template engine
- [multi-router](./multi-router) - Working with multiple Express routers
- [multipart](./multipart) - Accepting multipart-encoded forms
- [mvc](./mvc) - MVC-style controllers
- [online](./online) - Tracking online user activity with `online` and `redis` packages
- [params](./params) - Working with route parameters
Expand Down
7 changes: 2 additions & 5 deletions examples/cookie-sessions/index.js
Expand Up @@ -13,13 +13,10 @@ var app = module.exports = express();
app.use(cookieSession({ secret: 'manny is cool' }));

// do something with the session
app.use(count);

// custom middleware
function count(req, res) {
app.get('/', function (req, res) {
req.session.count = (req.session.count || 0) + 1
res.send('viewed ' + req.session.count + ' times\n')
}
})

/* istanbul ignore next */
if (!module.parent) {
Expand Down
62 changes: 0 additions & 62 deletions examples/multipart/index.js

This file was deleted.

3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -66,14 +66,13 @@
"cookie-parser": "1.4.6",
"cookie-session": "2.0.0",
"ejs": "3.1.9",
"eslint": "8.36.0",
"eslint": "8.47.0",
"express-session": "1.17.2",
"hbs": "4.2.0",
"marked": "0.7.0",
"method-override": "3.0.0",
"mocha": "10.2.0",
"morgan": "1.10.0",
"multiparty": "4.2.3",
"nyc": "15.1.0",
"pbkdf2-password": "1.2.1",
"supertest": "6.3.0",
Expand Down
6 changes: 3 additions & 3 deletions test/Router.js
Expand Up @@ -606,8 +606,8 @@ describe('Router', function(){
var req2 = { url: '/foo/10/bar', method: 'get' };
var router = new Router();
var sub = new Router();
var cb = after(2, done)

done = after(2, done);

sub.get('/bar', function(req, res, next) {
next();
Expand All @@ -626,14 +626,14 @@ describe('Router', function(){
assert.ifError(err);
assert.equal(req1.ms, 50);
assert.equal(req1.originalUrl, '/foo/50/bar');
done();
cb()
});

router.handle(req2, {}, function(err) {
assert.ifError(err);
assert.equal(req2.ms, 10);
assert.equal(req2.originalUrl, '/foo/10/bar');
done();
cb()
});
});
});
Expand Down
2 changes: 1 addition & 1 deletion test/app.router.js
Expand Up @@ -896,7 +896,7 @@ describe('app.router', function(){

request(app)
.get('/foo.json')
.expect(200, 'foo as json', done)
.expect(200, 'foo as json', cb)
})
})

Expand Down
2 changes: 1 addition & 1 deletion test/app.use.js
Expand Up @@ -57,7 +57,7 @@ describe('app', function(){

request(app)
.get('/forum')
.expect(200, 'forum', done)
.expect(200, 'forum', cb)
})

it('should set the child\'s .parent', function(){
Expand Down

0 comments on commit c8d7c7b

Please sign in to comment.