Skip to content

Commit

Permalink
Bump deps - more mail headers in message.js (softwerkskammer#1508)
Browse files Browse the repository at this point in the history
* cleanup legacy IE 8 handling and minor improvement for bad git requests (404 not 500)

* bump deps and add more info to message.js
  • Loading branch information
leider authored Nov 4, 2024
1 parent 7bdda48 commit 3b60e3e
Show file tree
Hide file tree
Showing 10 changed files with 416 additions and 355 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ module.exports = function (grunt) {
sass: {
options: {
implementation: sass,
silenceDeprecations: ["color-functions", "mixed-decls"],
silenceDeprecations: ["color-functions", "mixed-decls", "import", "global-builtin"],
},
dist: {
files: {
Expand Down
1 change: 0 additions & 1 deletion config/beans.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@

"accessrights": { "module": "./softwerkskammer/lib/middleware/accessrights" },
"addCsrfTokenToLocals": { "module": "./softwerkskammer/lib/middleware/addCsrfTokenToLocals" },
"detectBrowser": { "module": "./softwerkskammer/lib/middleware/detectBrowser" },
"expressSessionConfigurator": { "module": "./softwerkskammer/lib/middleware/expressSessionConfigurator" },
"expressViewHelper": { "module": "./softwerkskammer/lib/middleware/expressViewHelper" },
"gitExec": { "module": "./softwerkskammer/lib/wiki/gitExec" },
Expand Down
29 changes: 14 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
"@popperjs/core": "2.11.8",
"CoolBeans": "0.0.9",
"adm-zip": "0.5.16",
"better-sqlite3": "11.0.0",
"better-sqlite3": "11.5.0",
"better-sqlite3-session-store": "0.1.0",
"bootstrap": "5.3.3",
"bootstrap-datepicker": "1.10.0",
"bootstrap-markdown": "2.10.0",
"compression": "1.7.4",
"compression": "1.7.5",
"connect-ensure-login": "0.1.1",
"cookie-parser": "1.4.6",
"cookie-parser": "1.4.7",
"csurf": "1.11.0",
"datatables.net": "2.1.8",
"datatables.net-bs5": "2.1.8",
"exifr": "7.1.3",
"express": "5.0.1",
"express-session": "1.18.0",
"express-session": "1.18.1",
"feed": "4.2.2",
"fullcalendar": "6.1.15",
"glob": "10.4.5",
Expand All @@ -44,7 +44,7 @@
"grunt-contrib-uglify": "5.2.2",
"grunt-sass": "3.1.0",
"guillotine": "1.3.1",
"i18next": "23.15.2",
"i18next": "23.16.4",
"i18next-fs-backend": "2.3.2",
"i18next-http-middleware": "3.6.0",
"i18next-intervalplural-postprocessor": "3.0.0",
Expand All @@ -56,12 +56,12 @@
"jsonwebtoken": "9.0.2",
"leaflet": "1.9.4",
"luxon": "3.5.0",
"marked": "14.1.2",
"marked": "14.1.3",
"mime-types": "2.1.35",
"morgan": "1.10.0",
"multiparty": "4.2.3",
"node-syntaxhighlighter": "0.8.1",
"nodemailer": "6.9.15",
"nodemailer": "6.9.16",
"openidconnect-for-passport": "0.0.3",
"passport": "0.7.0",
"passport-github": "1.1.0",
Expand All @@ -71,22 +71,21 @@
"pug": "3.0.3",
"qr-image": "3.2.0",
"ramda": "0.30.1",
"sass": "1.79.4",
"sass": "1.80.6",
"select2": "4.1.0-rc.0",
"select2-bootstrap-5-theme": "1.3.0",
"serve-favicon": "2.5.0",
"sharp": "0.32.6",
"simple-configure": "0.1.6",
"simple-timepicker": "1.1.1",
"superagent": "10.1.0",
"superagent": "10.1.1",
"tinycolor2": "1.6.0",
"tinygradient": "1.1.5",
"useragent": "2.3.0",
"uuid": "10.0.0",
"winston": "3.15.0"
"uuid": "11.0.2",
"winston": "3.16.0"
},
"devDependencies": {
"eslint": "9.13.0",
"eslint": "9.14.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-prettier": "5.2.1",
"grunt-contrib-pug": "3.0.0",
Expand All @@ -102,11 +101,11 @@
"karma-mocha": "2.0.1",
"karma-must": "0.1.1",
"karma-sinon": "1.0.5",
"mocha": "10.7.3",
"mocha": "10.8.2",
"must-dist": "0.12.0",
"prettier": "3.3.3",
"proxyquire": "2.1.3",
"puppeteer": "22.15.0",
"puppeteer": "23.6.1",
"sinon": "19.0.2",
"supertest": "7.0.0"
},
Expand Down
1 change: 0 additions & 1 deletion softwerkskammer/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ module.exports = {
app.use(beans.get("initI18N"));
app.use(beans.get("redirectRuleForNewUser"));
app.use(beans.get("wikiSubdirs"));
app.use(beans.get("detectBrowser"));
app.use(beans.get("secureAgainstClickjacking"));
app.use(csurf());
app.use(beans.get("addCsrfTokenToLocals"));
Expand Down
6 changes: 6 additions & 0 deletions softwerkskammer/lib/mailsender/message.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ class Message {
text: pug.renderFile(filenameTextonly, renderingOptions),
html: pug.renderFile(filename, renderingOptions),
icalEvent: this.icalEvent,
dsn: {
id: `${this.subject}-${Date.now()}`,
return: "headers",
notify: ["failure", "delay", "success"],
recipient: "derleider@web.de",
},
};
}
}
Expand Down
8 changes: 0 additions & 8 deletions softwerkskammer/lib/middleware/detectBrowser.js

This file was deleted.

18 changes: 10 additions & 8 deletions softwerkskammer/lib/wiki/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,23 +51,25 @@ app.get("/versions/:subdir/:page", async (req, res, next) => {
const pageName = req.params.page;
const subdir = req.params.subdir;
const completePageName = `${subdir}/${pageName}`;
const items = await wikiService.pageHistory(completePageName);
if (!items) {
return next();
try {
const items = await wikiService.pageHistory(completePageName);
res.render("history", { pageName, subdir, items });
} catch {
next(); // transform 500 to 404
}
res.render("history", { pageName, subdir, items });
});

app.get("/compare/:subdir/:page/:revisions", async (req, res, next) => {
const pageName = req.params.page;
const subdir = req.params.subdir;
const completePageName = `${subdir}/${pageName}`;
const revisions = req.params.revisions;
const diff = await wikiService.pageCompare(completePageName, revisions);
if (!diff) {
return next();
try {
const diff = await wikiService.pageCompare(completePageName, revisions);
res.render("compare", { pageName, subdir, lines: diff.asLines() });
} catch {
next(); // transform 500 to 404
}
res.render("compare", { pageName, subdir, lines: diff.asLines() });
});

// editing pages
Expand Down
49 changes: 0 additions & 49 deletions softwerkskammer/test/middleware/detectBrowser_test.js

This file was deleted.

47 changes: 15 additions & 32 deletions softwerkskammer/views/commonLayout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,21 @@ html
block opengraph

body
if (browserIsTooOld)
.alert.alert-block.alert-warning
h2 Please note that we no longer support Internet Explorer versions 7 or 8.
p We follow the example of
a(href='https://help.github.com/articles/supported-browsers') github
| .
p We recommend upgrading to the latest
a(href='https://ie.microsoft.com/') Internet Explorer
| ,
a(href='https://chrome.google.com') Google Chrome
| , or
a(href='https://mozilla.org/firefox/') Firefox
| .
p If you are using IE 9 or later, make sure you
a(href='http://windows.microsoft.com/en-US/windows7/webpages-look-incorrect-in-Internet-Explorer') turn off "Compatibility View"
| .
else
include layoutComponents
#login.modal.fade(tabindex='-1')
.modal-dialog.modal-lg
.modal-content
#cheatsheet.modal.fade(tabindex='-1')
.modal-dialog.modal-lg
.modal-content
img.d-none.d-print-block(src='/img/Softwerkskammer_Header.png', alt='Softwerkskammer', width='955')
p.d-none.d-print-float  
nav.navbar.navbar-expand-sm.p-0.navbar-light.bg-light.fixed-top.d-print-none(role='navigation')
+topNavbar
.container-fluid.p-0.p-md-auto
.row.main.pb-4
block specific
+bottomNavbar
include layoutComponents
#login.modal.fade(tabindex='-1')
.modal-dialog.modal-lg
.modal-content
#cheatsheet.modal.fade(tabindex='-1')
.modal-dialog.modal-lg
.modal-content
img.d-none.d-print-block(src='/img/Softwerkskammer_Header.png', alt='Softwerkskammer', width='955')
p.d-none.d-print-float  
nav.navbar.navbar-expand-sm.p-0.navbar-light.bg-light.fixed-top.d-print-none(role='navigation')
+topNavbar
.container-fluid.p-0.p-md-auto
.row.main.pb-4
block specific
+bottomNavbar

if (language === 'de')
script(src='/clientscripts/global_de.js')
Expand Down
Loading

0 comments on commit 3b60e3e

Please sign in to comment.