Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master -> 5.0 #5785

Merged
merged 58 commits into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
0b74695
Improved fix for open redirect allow list bypass
wesleytodd Mar 21, 2024
b28db2c
4.19.2
wesleytodd Mar 25, 2024
94669f9
remove duplicate location test for data uri
wesleytodd Mar 25, 2024
51595d4
feat: document beta releases expectations
marco-ippolito Mar 26, 2024
88bd6d8
Update Release-Process.md
marco-ippolito Mar 26, 2024
4e3f95c
Update Security.md
marco-ippolito Mar 26, 2024
51a7636
refactor: reword to pre-releases
marco-ippolito Mar 26, 2024
6d98d2e
Update Release-Process.md
marco-ippolito Mar 26, 2024
36b8148
Update Security.md
marco-ippolito Mar 26, 2024
8b6d349
Update Security.md
marco-ippolito Mar 26, 2024
3ae704f
update ci push trigger only to some branches, ignore examples, .md
jonchurch Mar 26, 2024
4771ba2
crib fastify's ci concurrency logic
jonchurch Mar 26, 2024
d546f93
add develop to branches
jonchurch Mar 26, 2024
6da57c7
remove examples from the ignore
jonchurch Mar 26, 2024
2676a1f
docs: add reference to the Threat Model
UlisesGascon Apr 4, 2024
93cf646
docs: add blakeembrey as captain for encodeurl (#5579)
blakeembrey Apr 7, 2024
7f9e584
add jonchurch as repo captain on several packages
jonchurch Apr 8, 2024
815f799
docs: update reference to the threat model (#5590)
inigomarquinez Apr 10, 2024
e9bcdd3
ci: adopt Node@18 as the minimum supported version
UlisesGascon Apr 11, 2024
4b3b8cc
feat: adopt Node@18 as the minimum supported version
UlisesGascon Apr 11, 2024
6abec20
docs: update triage nomination policy (#5600)
UlisesGascon Apr 17, 2024
26e53f0
ci: add CodeQL (SAST) (#5433)
UlisesGascon Apr 17, 2024
d97d79e
docs: add UlisesGascon as triage initiative captain
UlisesGascon Apr 17, 2024
bf91946
deps: encodeurl@~2.0.0 (#5569)
blakeembrey May 4, 2024
8417c60
skip QUERY method test (#5628)
jonchurch May 4, 2024
b44191e
ignore ETAG query test as well, reuse skip util (#5639)
jonchurch May 4, 2024
4b9cd2f
add support Node.js@22 in the CI (#5627)
mertcanaltin May 4, 2024
700349f
doc: add table of contents, tc/triager lists to readme (#5619)
mertcanaltin May 8, 2024
897290b
List and sort all projects, add captains
blakeembrey May 10, 2024
a7d6d29
Add @UlisesGascon to mime repos
blakeembrey May 13, 2024
2803a2b
docs: add @UlisesGascon as captain for cookie-parser (#5666)
UlisesGascon May 22, 2024
689073d
✨ bring back query tests for node 21 (#5690)
ctcpip Jun 5, 2024
f42b160
[v4] Deprecate `res.clearCookie` accepting `options.maxAge` and `opti…
jonchurch Jun 7, 2024
61421a8
skip QUERY tests for Node 21 only, still not supported (#5695)
jonchurch Jun 9, 2024
6d08471
📝 update people, add ctcpip to TC (#5683)
ctcpip Jun 10, 2024
4cf7eed
remove minor version pinning from ci (#5722)
jonchurch Jun 26, 2024
2ec589c
Fix Contributor Covenant link definition reference in attribution sec…
IamLizu Jul 17, 2024
088856c
💚 add legacy CI, clean up
ctcpip Jul 25, 2024
c96c690
Merge branch 'master' into 5.0
ctcpip Jul 25, 2024
f4bd86e
Replace Appveyor windows testing with GHA (#5599)
jonchurch Jul 27, 2024
2177f67
docs: add OSSF Scorecard badge (#5436)
UlisesGascon Jul 28, 2024
9c756b0
💚 remove node <11, all failing permanently now
ctcpip Aug 2, 2024
dde1f7d
Merge branch '5.0' into 5-merge
ctcpip Aug 2, 2024
ea49706
Merge branch 'master' into 5-merge
ctcpip Aug 2, 2024
63992bb
Merge branch 'ci/v5-node-lts' into 5-merge
ctcpip Aug 2, 2024
f5b6e67
docs: update scorecard link (#5814)
bjohansebas Aug 18, 2024
e35380a
docs: add @IamLizu to the triage team (#5836)
UlisesGascon Aug 19, 2024
c5addb9
deps: path-to-regexp@0.1.8 (#5603)
blakeembrey Aug 22, 2024
a3e7e05
docs: specify new instructions for `question` and `discuss`
IamLizu Aug 22, 2024
2a980ad
merge-descriptors@1.0.3 (#5781)
RobinTail Aug 23, 2024
125bb74
path-to-regexp@0.1.10 (#5902)
blakeembrey Sep 9, 2024
54271f6
fix: don't render redirect values in anchor href
ctcpip Sep 9, 2024
ec4a01b
feat: upgrade to body-parser@1.20.3 (#5926)
UlisesGascon Sep 9, 2024
9ebe5d5
feat: upgrade to send@0.19.0 (#5928)
UlisesGascon Sep 10, 2024
4c9ddc1
feat: upgrade to serve-static@0.16.0
UlisesGascon Sep 10, 2024
21df421
4.20.0
UlisesGascon Sep 10, 2024
e5feb9f
Merge tag '4.20.0' into 5.0
wesleytodd Sep 10, 2024
f9256ef
Merge branch '5.0' into 5-merge
wesleytodd Sep 10, 2024
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
247 changes: 85 additions & 162 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,176 +1,99 @@
name: ci

on:
- pull_request
- push
push:
branches:
- master
- develop
- '4.x'
- '5.x'
- '5.0'
paths-ignore:
- '*.md'
pull_request:
paths-ignore:
- '*.md'

# Cancel in progress workflows
# in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run
concurrency:
group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
test:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js {{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
persist-credentials: false

- name: Install dependencies
run: npm install --ignore-scripts --only=dev

- name: Run lint
run: npm run lint

test:
strategy:
fail-fast: false
matrix:
name:
- Node.js 4.0
- Node.js 4.x
- Node.js 5.x
- Node.js 6.x
- Node.js 7.x
- Node.js 8.x
- Node.js 9.x
- Node.js 10.x
- Node.js 11.x
- Node.js 12.x
- Node.js 13.x
- Node.js 14.x
- Node.js 15.x
- Node.js 16.x
- Node.js 17.x
- Node.js 18.x
- Node.js 19.x
- Node.js 20.x
- Node.js 21.x

include:
- name: Node.js 4.0
node-version: "4.0"
npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2

- name: Node.js 4.x
node-version: "4.9"
npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2

- name: Node.js 5.x
node-version: "5.12"
npm-i: mocha@5.2.0 nyc@11.9.0 supertest@3.4.2

- name: Node.js 6.x
node-version: "6.17"
npm-i: mocha@6.2.2 nyc@14.1.1 supertest@3.4.2

- name: Node.js 7.x
node-version: "7.10"
npm-i: mocha@6.2.2 nyc@14.1.1 supertest@6.1.6

- name: Node.js 8.x
node-version: "8.17"
npm-i: mocha@7.2.0 nyc@14.1.1

- name: Node.js 9.x
node-version: "9.11"
npm-i: mocha@7.2.0 nyc@14.1.1

- name: Node.js 10.x
node-version: "10.24"
npm-i: mocha@8.4.0

- name: Node.js 11.x
node-version: "11.15"
npm-i: mocha@8.4.0

- name: Node.js 12.x
node-version: "12.22"
npm-i: mocha@9.2.2

- name: Node.js 13.x
node-version: "13.14"
npm-i: mocha@9.2.2

- name: Node.js 14.x
node-version: "14.20"

- name: Node.js 15.x
node-version: "15.14"

- name: Node.js 16.x
node-version: "16.20"

- name: Node.js 17.x
node-version: "17.9"

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

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

- name: Node.js 20.x
node-version: "20.11"

- name: Node.js 21.x
node-version: "21.6"

steps:
- uses: actions/checkout@v4
os: [ubuntu-latest, windows-latest]
node-version: [18, 19, 20, 21, 22]
# Node.js release schedule: https://nodejs.org/en/about/releases/

- 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: |
npm config set loglevel error
if [[ "$(npm config get package-lock)" == "true" ]]; then
npm config set package-lock false
else
npm config set shrinkwrap false
fi

- name: Install npm module(s) ${{ matrix.npm-i }}
run: npm install --save-dev ${{ matrix.npm-i }}
if: matrix.npm-i != ''

- name: Remove non-test dependencies
run: npm rm --silent --save-dev connect-redis

- name: Setup Node.js version-specific dependencies
shell: bash
run: |
# eslint for linting
# - remove on Node.js < 12
if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 12 ]]; then
node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \
grep -E '^eslint(-|$)' | \
sort -r | \
xargs -n1 npm rm --silent --save-dev
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: Node.js ${{ matrix.node-version }}

- 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: |
mv ./coverage "./${{ matrix.name }}"
mkdir ./coverage
mv "./${{ matrix.name }}" "./coverage/${{ matrix.name }}"

- name: Upload code coverage
uses: actions/upload-artifact@v3
with:
name: coverage
path: ./coverage
retention-days: 1
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Npm version fixes
if: ${{matrix.npm-version != ''}}
run: npm install -g ${{ matrix.npm-version }}

- name: Configure npm loglevel
run: |
npm config set loglevel error
shell: bash

- name: Install dependencies
run: npm install

- name: Output Node and NPM versions
run: |
echo "Node.js version: $(node -v)"
echo "NPM version: $(npm -v)"

- name: Run tests
shell: bash
run: |
npm run test-ci
cp coverage/lcov.info "coverage/${{ matrix.node-version }}.lcov"

- name: Collect code coverage
run: |
mv ./coverage "./${{ matrix.node-version }}"
mkdir ./coverage
mv "./${{ matrix.node-version }}" "./coverage/${{ matrix.node-version }}"

- name: Upload code coverage
uses: actions/upload-artifact@v3
with:
name: coverage
path: ./coverage
retention-days: 1

coverage:
needs: test
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: ["master"]
pull_request:
# The branches below must be a subset of the branches above
branches: ["master"]
schedule:
- cron: "0 0 * * 1"

permissions:
contents: read

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7
with:
languages: javascript
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@3ab4101902695724f9365a384f86c1074d94e18c # v3.24.7
with:
category: "/language:javascript"
Loading
Loading