Skip to content

Commit db8f0e2

Browse files
committed
fix: Coerce pool properties to numbers to prevent startup crash (#90)
1 parent b79ca05 commit db8f0e2

File tree

5 files changed

+46
-33
lines changed

5 files changed

+46
-33
lines changed

lib/oracledb.js

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

package-lock.json

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

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-red-contrib-oracledb-mod",
3-
"version": "0.7.4",
3+
"version": "0.7.5",
44
"description": "Node-RED oracle database nodes",
55
"author": "Original Author: Ab Reitsma, Mod-version Maintainer: Vinay Tulluru",
66
"license": "MIT",
@@ -37,7 +37,7 @@
3737
"homepage": "https://github.com/vtulluru/node-red-contrib-oracledb-mod#readme",
3838
"dependencies": {
3939
"object-resolve-path": "^1.1.1",
40-
"oracledb": "^6.8.0"
40+
"oracledb": "^6.9.0"
4141
},
4242
"devDependencies": {
4343
"@types/jquery": "^3.5.32",
@@ -46,18 +46,18 @@
4646
"@typescript-eslint/parser": "^7.13.0",
4747
"chai": "^4.3.10",
4848
"del": "^8.0.0",
49+
"dotenv": "^17.2.1",
4950
"eslint": "^8.57.0",
5051
"gulp": "^5.0.1",
5152
"gulp-add-src": "^1.0.0",
53+
"gulp-cli": "^3.1.0",
5254
"gulp-concat": "^2.6.1",
5355
"gulp-eslint-new": "^2.1.0",
54-
"gulp-rename": "^2.0.0",
56+
"gulp-rename": "^2.1.0",
5557
"gulp-sourcemaps": "^3.0.0",
5658
"gulp-spawn-mocha": "^6.0.0",
5759
"gulp-typescript": "^5.0.1",
58-
"gulp-cli": "^3.0.0",
5960
"merge2": "^1.4.1",
60-
"source-map-support": "^0.5.21",
61-
"dotenv": "^16.4.5"
61+
"source-map-support": "^0.5.21"
6262
}
63-
}
63+
}

readme.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,17 @@ If you need to run multiple independent queries, especially `SELECT` statements,
212212

213213

214214

215-
## What's New in Version 0.7.3
215+
## What's New
216+
### Version 0.7.5
217+
- **Fixed:** Corrected a critical startup crash (`NJS-007` error) that occurred when importing flows with a configured connection pool. Flows are now fully portable. (Fixes [#90](https://github.com/vtulluru/node-red-contrib-oracledb-mod/issues/90)).
216218

219+
### Version 0.7.4
220+
- **Feature:** Added Smart Named Binding to automatically handle `msg.payload` objects and prevent `ORA-01036` errors.
221+
- **Feature:** Implemented more intelligent and persistent node status feedback for running queries and errors.
222+
- **Fixed:** Resolved an upgrade issue where existing `oracle-server` nodes would be marked as invalid.
223+
- **Fixed:** Corrected a `type_already_registered` startup error by overhauling the build process.
217224

218-
225+
### Version 0.7.3
219226
This is a major stability and modernization release.
220227

221228

@@ -232,6 +239,12 @@ This is a major stability and modernization release.
232239

233240
- **Added Examples:** A built-in example flow for stored procedures is now included.
234241

235-
236242

237-
[View more commits and changelog](https://github.com/vtulluru/node-red-contrib-oracledb-mod/commits)
243+
[View more commits and changelog](https://github.com/vtulluru/node-red-contrib-oracledb-mod/commits)
244+
245+
246+
### Summary of Changes
247+
248+
1. **New `v0.7.5` Section:** A concise entry is added at the top, clearly stating the critical bug that was fixed and linking to the GitHub issue. This is exactly what users look for in a patch release.
249+
2. **Updated `v0.7.4` Section:** The previous release notes are simplified to be a historical record, focusing on the features and fixes delivered in that version.
250+
3. **Updated Features List:** I've added "Smart Named Binding" and "Intelligent Node Status" to the main features list, as these are now core, stable features of your node.

src/nodejs/oracledb.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,9 @@ module.exports = function (RED) {
147147
node.db = n.db || "orcl";
148148
node.user = node.credentials.user;
149149
node.password = node.credentials.password;
150-
node.poolmin = n.poolmin || 0;
151-
node.poolmax = n.poolmax || 4;
152-
node.pooltimeout = n.pooltimeout || 60;
150+
node.poolmin = parseInt(n.poolmin, 10) || 0;
151+
node.poolmax = parseInt(n.poolmax, 10) || 4;
152+
node.pooltimeout = parseInt(n.pooltimeout, 10) || 60;
153153

154154
node.pool = null;
155155
node.status = new events.EventEmitter();

0 commit comments

Comments
 (0)