Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: expressjs/express
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.16.4
Choose a base ref
...
head repository: expressjs/express
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4.21.0
Choose a head ref

Commits on Oct 27, 2018

  1. Copy the full SHA
    d0421ac View commit details
  2. build: coveralls@2.12.0

    dougwilson committed Oct 27, 2018
    Copy the full SHA
    a6b119d View commit details
  3. Copy the full SHA
    6295b45 View commit details
  4. build: support Node.js 9.x

    closes #3617
    Nacim Goura authored and dougwilson committed Oct 27, 2018
    Copy the full SHA
    003459b View commit details
  5. build: support Node.js 10.x

    closes #3617
    felixbuenemann authored and dougwilson committed Oct 27, 2018
    Copy the full SHA
    44e539e View commit details
  6. Copy the full SHA
    6bcdfef View commit details
  7. Improve error message for null/undefined to res.status

    closes #2795
    closes #2797
    closes #3111
    joshuacaron authored and dougwilson committed Oct 27, 2018
    Copy the full SHA
    8da5110 View commit details

Commits on Oct 28, 2018

  1. Support multiple hosts in X-Forwarded-Host

    fixes #3494
    closes #3495
    iconoeugen authored and dougwilson committed Oct 28, 2018
    Copy the full SHA
    b93ffd4 View commit details

Commits on Dec 18, 2018

  1. docs: fix typo in contributing

    closes #3827
    taemin-fp authored and dougwilson committed Dec 18, 2018
    Copy the full SHA
    95c31f7 View commit details
  2. docs: fix typos in history

    closes #3810
    AScriver authored and dougwilson committed Dec 18, 2018
    Copy the full SHA
    0ae10bb View commit details
  3. examples: minor fixes to some examples

    closes #3812
    Alvin Smith authored and dougwilson committed Dec 18, 2018
    Copy the full SHA
    02f3933 View commit details

Commits on Apr 16, 2019

  1. docs: add listening address to example

    closes #3873
    cirosantilli authored and dougwilson committed Apr 16, 2019
    Copy the full SHA
    186a206 View commit details
  2. docs: fix typo in jsdoc comment

    closes #3859
    Louis authored and dougwilson committed Apr 16, 2019
    Copy the full SHA
    6f12eee View commit details
  3. tests: fix typos in descriptions

    closes #3875
    jhkimwoowa authored and dougwilson committed Apr 16, 2019
    Copy the full SHA
    b9b1b19 View commit details
  4. docs: use const in readme example

    fixes #3867
    closes #3868
    mwanago authored and dougwilson committed Apr 16, 2019
    Copy the full SHA
    6eda52a View commit details

Commits on Apr 17, 2019

  1. tests: assert calls order in middleware basic tests

    closes #3878
    김정환 authored and dougwilson committed Apr 17, 2019
    Copy the full SHA
    8a97346 View commit details
  2. Copy the full SHA
    9e5d1a3 View commit details
  3. build: hbs@4.0.4

    dougwilson committed Apr 17, 2019
    Copy the full SHA
    cf5c813 View commit details
  4. build: marked@0.6.2

    dougwilson committed Apr 17, 2019
    Copy the full SHA
    4218d04 View commit details
  5. Copy the full SHA
    952484f View commit details
  6. deps: proxy-addr@~2.0.5

    dougwilson committed Apr 17, 2019
    Copy the full SHA
    50eb5e4 View commit details
  7. deps: parseurl@~1.3.3

    dougwilson committed Apr 17, 2019
    Copy the full SHA
    0334120 View commit details
  8. docs: add link to contributing guide

    closes #3846
    jamesgeorge007 authored and dougwilson committed Apr 17, 2019
    Copy the full SHA
    b02d3a1 View commit details

Commits on Apr 22, 2019

  1. deps: setprototypeof@1.1.1

    dougwilson committed Apr 22, 2019
    Copy the full SHA
    7eacdce View commit details

Commits on May 1, 2019

  1. deps: statuses@~1.5.0

    dougwilson committed May 1, 2019
    Copy the full SHA
    9afa1cf View commit details
  2. deps: accepts@~1.3.7

    dougwilson committed May 1, 2019
    Copy the full SHA
    40dbfa2 View commit details
  3. deps: type-is@~1.6.18

    dougwilson committed May 1, 2019
    Copy the full SHA
    6d9dd2d View commit details
  4. deps: qs@6.7.0

    dougwilson committed May 1, 2019
    Copy the full SHA
    32f5293 View commit details
  5. deps: body-parser@1.19.0

    dougwilson committed May 1, 2019
    Copy the full SHA
    2f782d8 View commit details

Commits on May 2, 2019

  1. Copy the full SHA
    955f2a5 View commit details
  2. Copy the full SHA
    8b71f39 View commit details
  3. Copy the full SHA
    6f7a830 View commit details

Commits on May 8, 2019

  1. deps: send@0.17.0

    dougwilson committed May 8, 2019
    Copy the full SHA
    70a1947 View commit details
  2. deps: serve-static@1.14.0

    closes #3486
    dougwilson committed May 8, 2019
    Copy the full SHA
    60aacac View commit details
  3. Add express.raw to parse bodies into Buffer

    closes #3708
    amitzur authored and dougwilson committed May 8, 2019
    Copy the full SHA
    0bcdd88 View commit details
  4. Copy the full SHA
    11192bd View commit details

Commits on May 9, 2019

  1. Add express.text to parse bodies into string

    closes #3455
    amfern authored and dougwilson committed May 9, 2019
    Copy the full SHA
    7f4e37f View commit details
  2. Copy the full SHA
    bb5211f View commit details
  3. build: Node.js@6.17

    dougwilson committed May 9, 2019
    Copy the full SHA
    7b076bd View commit details
  4. build: Node.js@8.16

    dougwilson committed May 9, 2019
    Copy the full SHA
    e917028 View commit details
  5. Copy the full SHA
    c754c8a View commit details

Commits on May 10, 2019

  1. deps: finalhandler@~1.1.2

    dougwilson committed May 10, 2019
    Copy the full SHA
    bc07a41 View commit details

Commits on May 11, 2019

  1. deps: send@0.17.1

    dougwilson committed May 11, 2019
    Copy the full SHA
    8267c4b View commit details
  2. deps: serve-static@1.14.1

    dougwilson committed May 11, 2019
    Copy the full SHA
    88f9733 View commit details

Commits on May 13, 2019

  1. deps: range-parser@~1.2.1

    dougwilson committed May 13, 2019
    Copy the full SHA
    da6f701 View commit details
  2. build: Node.js@10.15

    dougwilson committed May 13, 2019
    Copy the full SHA
    e502dde View commit details
  3. Copy the full SHA
    5266f3a View commit details

Commits on May 16, 2019

  1. build: support Node.js 12.x

    closes #3946
    zuohuadong authored and dougwilson committed May 16, 2019
    Copy the full SHA
    b9ecb9a View commit details
  2. deps: cookie@0.4.0

    closes #3958
    dougwilson committed May 16, 2019
    Copy the full SHA
    efcb17d View commit details
  3. Copy the full SHA
    94e48a1 View commit details
Showing with 8,404 additions and 1,209 deletions.
  1. +1 −1 .eslintrc.yml
  2. +190 −0 .github/workflows/ci.yml
  3. +66 −0 .github/workflows/codeql.yml
  4. +69 −0 .github/workflows/iojs.yml
  5. +5 −16 .gitignore
  6. +1 −0 .npmrc
  7. +0 −64 .travis.yml
  8. +92 −0 Charter.md
  9. +139 −0 Code-Of-Conduct.md
  10. +2 −1 Collaborator-Guide.md
  11. +138 −14 Contributing.md
  12. +235 −14 History.md
  13. +146 −39 Readme.md
  14. +13 −0 Release-Process.md
  15. +15 −2 Security.md
  16. +70 −0 Triager-Guide.md
  17. +63 −10 appveyor.yml
  18. +12 −8 benchmarks/Makefile
  19. +34 −0 benchmarks/README.md
  20. +1 −1 benchmarks/middleware.js
  21. +5 −3 benchmarks/run
  22. +29 −0 examples/README.md
  23. +6 −3 examples/auth/index.js
  24. +2 −0 examples/auth/views/head.ejs
  25. +6 −7 examples/auth/views/login.ejs
  26. +2 −0 examples/content-negotiation/db.js
  27. +2 −0 examples/content-negotiation/index.js
  28. +1 −0 examples/content-negotiation/users.js
  29. +4 −5 examples/cookie-sessions/index.js
  30. +2 −0 examples/cookies/index.js
  31. +3 −0 examples/downloads/files/notes/groceries.txt
  32. +14 −9 examples/downloads/index.js
  33. +2 −0 examples/ejs/index.js
  34. +1 −1 examples/ejs/public/stylesheets/style.css
  35. +1 −0 examples/ejs/views/header.html
  36. +2 −2 examples/ejs/views/users.html
  37. +2 −0 examples/error-pages/index.js
  38. +2 −2 examples/error-pages/views/404.ejs
  39. +2 −2 examples/error-pages/views/500.ejs
  40. +2 −0 examples/error-pages/views/error_header.ejs
  41. +2 −0 examples/error-pages/views/index.ejs
  42. +3 −1 examples/error/index.js
  43. +3 −1 examples/hello-world/index.js
  44. +3 −1 examples/markdown/index.js
  45. +2 −0 examples/multi-router/controllers/api_v1.js
  46. +2 −0 examples/multi-router/controllers/api_v2.js
  47. +2 −0 examples/multi-router/index.js
  48. +0 −60 examples/multipart/index.js
  49. +2 −0 examples/mvc/controllers/main/index.js
  50. +2 −0 examples/mvc/controllers/pet/index.js
  51. +2 −0 examples/mvc/controllers/pet/views/edit.ejs
  52. +2 −0 examples/mvc/controllers/pet/views/show.ejs
  53. +2 −0 examples/mvc/controllers/user-pet/index.js
  54. +2 −0 examples/mvc/controllers/user/index.js
  55. +2 −0 examples/mvc/controllers/user/views/edit.hbs
  56. +2 −0 examples/mvc/controllers/user/views/list.hbs
  57. +2 −0 examples/mvc/controllers/user/views/show.hbs
  58. +2 −0 examples/mvc/db.js
  59. +2 −0 examples/mvc/index.js
  60. +2 −0 examples/mvc/lib/boot.js
  61. +1 −1 examples/mvc/public/style.css
  62. +1 −0 examples/mvc/views/404.ejs
  63. +1 −0 examples/mvc/views/5xx.ejs
  64. +1 −0 examples/online/index.js
  65. +6 −11 examples/params/index.js
  66. +3 −1 examples/resource/index.js
  67. +6 −3 examples/route-map/index.js
  68. +3 −1 examples/route-middleware/index.js
  69. +2 −0 examples/route-separation/index.js
  70. +2 −0 examples/route-separation/post.js
  71. +2 −0 examples/route-separation/site.js
  72. +2 −0 examples/route-separation/user.js
  73. +1 −0 examples/route-separation/views/header.ejs
  74. +2 −2 examples/route-separation/views/index.ejs
  75. +2 −2 examples/route-separation/views/posts/index.ejs
  76. +3 −3 examples/route-separation/views/users/edit.ejs
  77. +2 −2 examples/route-separation/views/users/index.ejs
  78. +2 −2 examples/route-separation/views/users/view.ejs
  79. +1 −0 examples/search/index.js
  80. +2 −0 examples/search/public/client.js
  81. +3 −2 examples/search/public/index.html
  82. +1 −0 examples/session/index.js
  83. +2 −0 examples/session/redis.js
  84. +2 −0 examples/static-files/index.js
  85. +1 −1 examples/static-files/public/js/app.js
  86. +2 −0 examples/vhost/index.js
  87. +2 −0 examples/view-constructor/github-view.js
  88. +2 −0 examples/view-constructor/index.js
  89. +4 −2 examples/view-locals/index.js
  90. +2 −0 examples/view-locals/user.js
  91. +1 −0 examples/view-locals/views/index.ejs
  92. +8 −6 examples/web-service/index.js
  93. +19 −2 lib/application.js
  94. +2 −0 lib/express.js
  95. +5 −1 lib/request.js
  96. +75 −33 lib/response.js
  97. +26 −15 lib/router/index.js
  98. +22 −8 lib/router/route.js
  99. +7 −10 lib/utils.js
  100. +1 −1 lib/view.js
  101. +37 −37 package.json
  102. +52 −20 test/Route.js
  103. +87 −7 test/Router.js
  104. +16 −1 test/acceptance/auth.js
  105. +1 −1 test/acceptance/cookie-sessions.js
  106. +17 −0 test/acceptance/downloads.js
  107. +21 −0 test/acceptance/hello-world.js
  108. +3 −3 test/acceptance/web-service.js
  109. +8 −5 test/app.all.js
  110. +1 −0 test/app.del.js
  111. +8 −6 test/app.engine.js
  112. +8 −10 test/app.head.js
  113. +40 −18 test/app.js
  114. +3 −7 test/app.listen.js
  115. +16 −17 test/app.locals.js
  116. +1 −0 test/app.options.js
  117. +19 −20 test/app.param.js
  118. +28 −27 test/app.render.js
  119. +120 −0 test/app.request.js
  120. +114 −15 test/app.response.js
  121. +2 −0 test/app.route.js
  122. +102 −44 test/app.router.js
  123. +9 −6 test/app.routes.error.js
  124. +11 −9 test/app.use.js
  125. +45 −0 test/config.js
  126. +37 −11 test/exports.js
  127. +790 −0 test/express.json.js
  128. +555 −0 test/express.raw.js
  129. +814 −0 test/express.static.js
  130. +605 −0 test/express.text.js
  131. +866 −0 test/express.urlencoded.js
  132. 0 test/fixtures/empty.txt
  133. +1 −0 test/fixtures/nums.txt
  134. +1 −0 test/fixtures/pets/names.txt
  135. 0 test/fixtures/snow ☃/.gitkeep
  136. +1 −0 test/fixtures/todo.html
  137. +1 −0 test/fixtures/todo.txt
  138. +1 −0 test/fixtures/users/index.html
  139. +1 −0 test/fixtures/users/tobi.txt
  140. +3 −0 test/middleware.basic.js
  141. +0 −2 test/mocha.opts
  142. +1 −0 test/regression.js
  143. +1 −0 test/req.accepts.js
  144. +3 −2 test/req.acceptsCharset.js
  145. +3 −2 test/req.acceptsCharsets.js
  146. +19 −16 test/req.acceptsEncoding.js
  147. +20 −17 test/req.acceptsEncodings.js
  148. +29 −25 test/req.acceptsLanguage.js
  149. +29 −25 test/req.acceptsLanguages.js
  150. +1 −0 test/req.baseUrl.js
  151. +1 −0 test/req.fresh.js
  152. +1 −0 test/req.get.js
  153. +1 −0 test/req.host.js
  154. +51 −0 test/req.hostname.js
  155. +17 −1 test/req.ip.js
  156. +1 −0 test/req.ips.js
  157. +1 −0 test/req.is.js
  158. +1 −0 test/req.param.js
  159. +1 −0 test/req.path.js
  160. +1 −0 test/req.protocol.js
  161. +7 −4 test/req.query.js
  162. +1 −0 test/req.range.js
  163. +7 −4 test/req.route.js
  164. +1 −0 test/req.secure.js
  165. +1 −0 test/req.signedCookies.js
  166. +1 −0 test/req.stale.js
  167. +1 −0 test/req.subdomains.js
  168. +23 −43 test/req.xhr.js
  169. +42 −30 test/res.append.js
  170. +1 −0 test/res.attachment.js
  171. +33 −0 test/res.clearCookie.js
  172. +142 −23 test/res.cookie.js
  173. +322 −27 test/res.download.js
  174. +31 −3 test/res.format.js
  175. +1 −0 test/res.get.js
  176. +16 −0 test/res.json.js
  177. +72 −52 test/res.jsonp.js
  178. +1 −0 test/res.links.js
  179. +5 −6 test/res.locals.js
  180. +270 −12 test/res.location.js
  181. +35 −23 test/res.redirect.js
  182. +1 −0 test/res.render.js
  183. +32 −26 test/res.send.js
  184. +789 −195 test/res.sendFile.js
  185. +1 −0 test/res.sendStatus.js
  186. +1 −0 test/res.set.js
  187. +194 −12 test/res.status.js
  188. +1 −0 test/res.type.js
  189. +1 −0 test/res.vary.js
  190. +1 −1 test/support/env.js
  191. +62 −0 test/support/utils.js
  192. +26 −18 test/utils.js
2 changes: 1 addition & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -3,6 +3,6 @@ root: true
rules:
eol-last: error
eqeqeq: [error, allow-null]
indent: [error, 2, { SwitchCase: 1 }]
indent: [error, 2, { MemberExpression: "off", SwitchCase: 1 }]
no-trailing-spaces: error
no-unused-vars: [error, { vars: all, args: none, ignoreRestSiblings: true }]
190 changes: 190 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@
name: ci

on:
push:
branches:
- master
- develop
- '4.x'
- '5.x'
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:
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:
name: Run tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
node-version:
- "0.10"
- "0.12"
- "4"
- "5"
- "6"
- "7"
- "8"
- "9"
- "10"
- "11"
- "12"
- "13"
- "14"
- "15"
- "16"
- "17"
- "18"
- "19"
- "20"
- "21"
- "22"
# Use supported versions of our testing tools under older versions of Node
# Install npm in some specific cases where we need to
include:
- node-version: "0.10"
npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0"
# Npm isn't being installed on windows w/ setup-node for
# 0.10 and 0.12, which will end up choking when npm uses es6
npm-version: "npm@2.15.1"

- node-version: "0.12"
npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0"
npm-version: "npm@2.15.11"

- node-version: "4"
npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2"

- node-version: "5"
npm-i: "mocha@5.2.0 nyc@11.9.0 supertest@3.4.2"
# fixes https://github.com/npm/cli/issues/681
npm-version: "npm@3.10.10"

- node-version: "6"
npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@3.4.2"

- node-version: "7"
npm-i: "mocha@6.2.2 nyc@14.1.1 supertest@6.1.6"

- node-version: "8"
npm-i: "mocha@7.2.0 nyc@14.1.1"

- node-version: "9"
npm-i: "mocha@7.2.0 nyc@14.1.1"

- node-version: "10"
npm-i: "mocha@8.4.0"

- node-version: "11"
npm-i: "mocha@8.4.0"

- node-version: "12"
npm-i: "mocha@9.2.2"

- node-version: "13"
npm-i: "mocha@9.2.2"

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: Install Node version specific dev deps
if: ${{ matrix.npm-i != '' }}
run: npm install --save-dev ${{ matrix.npm-i }}

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

- 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
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install lcov
shell: bash
run: sudo apt-get -y install lcov

- name: Collect coverage reports
uses: actions/download-artifact@v3
with:
name: coverage
path: ./coverage

- name: Merge coverage reports
shell: bash
run: find ./coverage -name lcov.info -exec printf '-a %q\n' {} \; | xargs lcov -o ./coverage/lcov.info

- name: Upload coverage report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
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"
69 changes: 69 additions & 0 deletions .github/workflows/iojs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: iojs-ci

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

concurrency:
group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
cancel-in-progress: true

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: ["1.8", "2.5", "3.3"]
include:
- node-version: "1.8"
npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0"
- node-version: "2.5"
npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0"
- node-version: "3.3"
npm-i: "mocha@3.5.3 nyc@10.3.2 supertest@2.0.0"

steps:
- uses: actions/checkout@v4

- name: Install iojs ${{ 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
npm config set shrinkwrap false
- 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: 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: Run tests
shell: bash
run: npm run test

21 changes: 5 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,27 +1,16 @@
# OS X
.DS_Store*
Icon?
._*

# Windows
Thumbs.db
ehthumbs.db
Desktop.ini

# Linux
.directory
*~


# npm
node_modules
package-lock.json
npm-shrinkwrap.json
*.log
*.gz


# Coveralls
.nyc_output
coverage

# Benchmarking
benchmarks/graphs

# ignore additional files using core.excludesFile
# https://git-scm.com/docs/gitignore
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
Loading