Skip to content

Commit 45ca705

Browse files
authored
Merge pull request #17 from rsscloud/stabilize-2.2.x
Stabilize 2.2.x branch with dependency updates and code quality fixes
2 parents 3cbab23 + 12540c5 commit 45ca705

File tree

7 files changed

+32
-29
lines changed

7 files changed

+32
-29
lines changed

CLAUDE.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@ This is an rssCloud Server v2 implementation in Node.js - a notification protoco
1717

1818
- `npm test` - Run Mocha test suite (called by test-api)
1919
- `npm run test-api` - Run full API tests using Docker containers (MacOS tested)
20-
- `npm run jshint` - Run JSHint linter
21-
- `npm run eslint` - Run ESLint with auto-fix on controllers/, services/, test/
20+
- `npm run lint` - Run ESLint with auto-fix on controllers/, services/, test/
2221

2322
### Data Management
2423

app.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ console.log(`${config.appName} ${config.appVersion}`);
1818
// TODO: Every 24 hours run removeExpiredSubscriptions(data);
1919

2020
morgan.format('mydate', () => {
21-
const df = require('dateformat');
22-
return df(new Date(), 'HH:MM:ss.l');
21+
return new Date().toLocaleTimeString('en-US', { hour12: false, fractionalSecondDigits: 3 }).replace(/:/g, ':');
2322
});
2423

2524
// Initialize dayjs at startup

client.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ nconf
3131
console.log(`${nconf.get('APP_NAME')} ${nconf.get('APP_VERSION')}`);
3232

3333
morgan.format('mydate', () => {
34-
const df = require('dateformat');
35-
return df(new Date(), 'HH:MM:ss.l');
34+
return new Date().toLocaleTimeString('en-US', { hour12: false, fractionalSecondDigits: 3 }).replace(/:/g, ':');
3635
});
3736

3837
app = express();

eslint.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ module.exports = [
1616
module: 'readonly',
1717
require: 'readonly',
1818
exports: 'readonly',
19+
// Node.js built-in globals
20+
fetch: 'readonly',
21+
AbortController: 'readonly',
22+
setTimeout: 'readonly',
23+
clearTimeout: 'readonly',
24+
URLSearchParams: 'readonly',
1925
// Mocha globals
2026
describe: 'readonly',
2127
it: 'readonly',

package-lock.json

Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rsscloud-server",
3-
"version": "2.0.0",
3+
"version": "2.2.0",
44
"description": "An rssCloud Server",
55
"main": "app.js",
66
"scripts": {
@@ -23,7 +23,7 @@
2323
"cors": "^2.8.5",
2424
"davexmlrpc": "^0.4.26",
2525
"dotenv": "^16.5.0",
26-
"express": "^4.17.1",
26+
"express": "^4.21.2",
2727
"express-handlebars": "^5.3.3",
2828
"express-ws": "^5.0.2",
2929
"markdown-it": "^14.1.0",
@@ -47,10 +47,10 @@
4747
"eslint": "^9.29.0",
4848
"eslint-config-crockford": "^2.0.0",
4949
"https": "^1.0.0",
50-
"mocha": "^11.7.0",
50+
"mocha": "^11.7.1",
5151
"mocha-multi": "^1.1.7",
5252
"nodemon": "3.1.10",
53-
"prettier": "^3.4.2",
53+
"prettier": "^3.6.1",
5454
"supertest": "^7.1.1"
5555
}
5656
}

services/dayjs-wrapper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ async function getDayjs() {
77
const advancedFormat = await import('dayjs/plugin/advancedFormat.js');
88
const duration = await import('dayjs/plugin/duration.js');
99
const customParseFormat = await import('dayjs/plugin/customParseFormat.js');
10-
10+
1111
dayjs = dayjsModule.default;
1212
dayjs.extend(utc.default);
1313
dayjs.extend(advancedFormat.default);
@@ -17,4 +17,4 @@ async function getDayjs() {
1717
return dayjs;
1818
}
1919

20-
module.exports = getDayjs;
20+
module.exports = getDayjs;

0 commit comments

Comments
 (0)