Skip to content

Commit

Permalink
Merge pull request #1 from carboneio/update_package_express
Browse files Browse the repository at this point in the history
Update npm packages
  • Loading branch information
steevepay authored Oct 26, 2022
2 parents 8d23a16 + 1efb6a0 commit 0a59cb4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# HearthJS

### v3.1.0
- Update packages `express`, `cookie-parser` and `socket.io`

### v3.0.0
- Can start a socket server to send event to client
### v2.9.1
Expand Down
4 changes: 2 additions & 2 deletions lib/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const server = {
this._app = express()
this._httpServer = createServer(this._app)

const startSocketServer = this._projectServerFile['startSocketServer']
const startSocketServer = this._projectServerFile?.['startSocketServer']

if (startSocketServer !== undefined && startSocketServer === true) {
const cors = (this._projectServerFile['socketCorsOptions'] !== undefined) ? this._projectServerFile['socketCorsOptions'] : null
Expand Down Expand Up @@ -580,7 +580,7 @@ const server = {
return callback(null)
}

if (this._projectServerFile[functionName] !== undefined) {
if (this._projectServerFile?.[functionName] !== undefined) {
return this._projectServerFile[functionName].apply(null, args.concat([callback]))
}

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hearthjs",
"version": "3.0.0",
"version": "3.1.0",
"description": "A NodeJS server framework to build fast Rest API",
"main": "lib/index.js",
"bin": "bin/hearthjs",
Expand All @@ -17,17 +17,17 @@
"license": "ISC",
"dependencies": {
"commander": "=6.2.0",
"cookie-parser": "=1.4.4",
"cookie-parser": "=1.4.6",
"debug": "=4.1.1",
"diff": "=4.0.1",
"express": "=4.16.4",
"express": "=4.18.1",
"mocha": "=6.0.2",
"moment": "=2.24.0",
"nanoid": "=2.1.1",
"node-cron": "=2.0.3",
"pg": "=8.4.2",
"request": "=2.88.2",
"socket.io": "=4.4.1"
"socket.io": "=4.5.3"
},
"devDependencies": {
"assert": "=1.4.1",
Expand All @@ -39,7 +39,7 @@
"eslint-plugin-standard": "=4.0.0",
"file-mock": "=1.0.0",
"mockdate": "=2.0.5",
"multer": "=1.4.1",
"multer": "=1.4.4",
"nyc": "=14.0.0",
"sinon": "=7.5.0",
"suppose": "=0.6.2"
Expand Down
3 changes: 2 additions & 1 deletion test/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const user = 'postgres'
const database = 'hearth_test'
const port = 5432

describe('Database', () => {
describe('Database', function () {
this.timeout(100000)
before(() => {
process.env.HEARTH_SERVER_PATH = path.join(__dirname, 'datasets', 'myApp', 'server')
})
Expand Down

0 comments on commit 0a59cb4

Please sign in to comment.