Merge tag '4.15.5'
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Douglas Christopher Wilson · committed by Douglas Christopher Wilson · parents 71395f5, ea3d605 · Browse files · 6 files·+44 added−21 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+44 added−21 removed
- tests:+11 added−10 removed
- other:+33 added−11 removed
Provenance
- Commit
19c8d64- Tree
fa7efa9- Author
Douglas Christopher Wilson <doug@somethingdoug.com>- Committer
Douglas Christopher Wilson <doug@somethingdoug.com>- Parent 1
71395f5- Parent 2
ea3d605
6 files changed+44 added−21 removed
modified:test/support/tmpl.js+1 added
11 unmodified lines12131415161718192016 unmodified lines11 unmodified lines try { str = str.replace(variableRegExp, generateVariableLookup(options)); } catch (e) { err = e; err.name = 'RenderError' }
callback(err, str); }16 unmodified linesmodified:test/app.render.js+4 added-6 removed
95 unmodified lines96 var app = createApp();97 98 app.set('views', path.join(__dirname, 'fixtures'))99 100- app.render('user.tmpl', function (err, str) {101- // nextTick to prevent cyclic102- process.nextTick(function(){103- err.message.should.match(/Cannot read property '[^']+' of undefined/);104- done();105- });100+ app.render('user.tmpl', function (err) {101+ assert.ok(err)102+ assert.equal(err.name, 'RenderError')103+ done()104 })105 })106 })107 266 unmodified linesmodified:test/res.render.js+6 added-4 removed
103 unmodified lines104 res.render('user.tmpl');105 });106 107 app.use(function(err, req, res, next){108- res.end(err.message);108+ res.status(500).send('got error: ' + err.name)109 });110 111 request(app)112 .get('/')113- .expect(/Cannot read property '[^']+' of undefined/, done);113+ .expect(500, 'got error: RenderError', done)114 })115 })116 117 describe('when "view engine" is given', function(){210 unmodified lines328 app.set('views', path.join(__dirname, 'fixtures'))329 330 app.use(function(req, res){331 res.render('user.tmpl', function (err) {332- res.end(err.message);332+ if (err) {333+ res.status(500).send('got error: ' + err.name)334+ }335 });336 });337 338 request(app)339 .get('/')338- .expect(/Cannot read property '[^']+' of undefined/, done);340+ .expect(500, 'got error: RenderError', done)341 })342 })343 })344 })8 unmodified linesmodified:.travis.yml+1 added-1 removed
9 unmodified lines1011121314141516171815 unmodified lines9 unmodified lines - "6.11" - "7.10"matrix: include: - node_js: "8.0" - node_js: "8" env: "NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly" allow_failures: # Allow the nightly installs to fail - env: "NVM_NODEJS_ORG_MIRROR=https://nodejs.org/download/nightly"15 unmodified linesmodified:History.md+23 added-1 removed
1 5.x2 ===3 4-This incorporates all changes after 4.15.2 up to 4.15.4.4+This incorporates all changes after 4.15.2 up to 4.15.5.5 6 * remove:7 - `res.redirect(url, status)` signature - use `res.redirect(status, url)`8 - `res.send(status, body)` signature - use `res.status(status).send(body)`77 unmodified lines86 - `req.query` is now a getter instead of a plain property87 * add:88 - `app.router` is a reference to the base router89 90+4.15.5 / 2017-09-2491+===================92+93+ * deps: debug@2.6.994+ * deps: finalhandler@~1.0.695+ - deps: debug@2.6.996+ - deps: parseurl@~1.3.297+ * deps: fresh@0.5.298+ - Fix handling of modified headers with invalid dates99+ - perf: improve ETag match loop100+ - perf: improve `If-None-Match` token parsing101+ * deps: send@0.15.6102+ - Fix handling of modified headers with invalid dates103+ - deps: debug@2.6.9104+ - deps: etag@~1.8.1105+ - deps: fresh@0.5.2106+ - perf: improve `If-Match` token parsing107+ * deps: serve-static@1.12.6108+ - deps: parseurl@~1.3.2109+ - deps: send@0.15.6110+ - perf: improve slash collapsing111+112 4.15.4 / 2017-08-06113 ===================114 115 * deps: debug@2.6.83285 unmodified linesmodified:package.json+9 added-9 removed
31 unmodified lines3233343536363738394041424142434445462 unmodified lines49505152535453545556575859606162636364656566676869707172737374757677777879808118 unmodified lines31 unmodified lines "content-disposition": "0.5.2", "content-type": "~1.0.2", "cookie": "0.3.1", "cookie-signature": "1.0.6", "debug": "2.6.8", "debug": "2.6.9", "depd": "~1.1.1", "encodeurl": "~1.0.1", "escape-html": "~1.0.3", "etag": "~1.8.0", "finalhandler": "~1.0.4", "fresh": "0.5.0", "finalhandler": "~1.0.6", "fresh": "0.5.2", "merge-descriptors": "1.0.1", "methods": "~1.1.2", "on-finished": "~2.3.0", "parseurl": "~1.3.1",2 unmodified lines "proxy-addr": "~1.1.5", "qs": "6.5.0", "range-parser": "~1.2.0", "router": "~1.3.1", "send": "0.15.4", "serve-static": "1.12.4", "send": "0.15.6", "serve-static": "1.12.6", "setprototypeof": "1.0.3", "statuses": "~1.3.1", "type-is": "~1.6.15", "utils-merge": "1.0.0", "vary": "~1.1.1" }, "devDependencies": { "after": "0.8.2", "body-parser": "1.17.2", "body-parser": "1.18.1", "cookie-parser": "~1.4.3", "cookie-session": "1.3.0", "cookie-session": "1.3.1", "ejs": "2.5.7", "eslint": "2.13.1", "express-session": "1.15.5", "hbs": "4.0.1", "istanbul": "0.4.5", "marked": "0.3.6", "method-override": "2.3.9", "mocha": "3.5.0", "mocha": "3.5.3", "morgan": "1.8.2", "multiparty": "4.1.3", "pbkdf2-password": "1.2.1", "should": "11.2.1", "should": "13.1.0", "supertest": "1.2.0", "connect-redis": "~2.4.1", "vhost": "~3.0.2" },18 unmodified lines