Skip to content

Commit c62cdd7

Browse files
committed
Bump the miniumum Node.js version required to 8.16
1 parent d75d5e5 commit c62cdd7

File tree

5 files changed

+30
-18
lines changed

5 files changed

+30
-18
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
- Refactored the node-oracledb implementation to use
88
[N-API](https://nodejs.org/api/n-api.html) in place of
99
[NAN](https://github.com/nodejs/nan).
10-
- Node.js 8.12, or higher, is required by this version of node-oracledb. Note Node.js 8.16, 11.12 and 12 contain an important performance fix.
10+
- Node.js 8.16 or Node.js 10.16, or higher, is required by this version of node-oracledb. Node.js 8.16, 10.16, 11.12 and 12 contain an important N-API performance fix.
1111
- N-API allows node-oracledb binaries to be portable between Node.js versions on a given operating system, subject to N-API compatibility.
1212
- Oracle Client libraries are still required at runtime.
1313
- The string representation of classes has changed to `[Object Object]` as a consequence of using N-API.

INSTALL.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ The [*node-oracledb*][1] add-on for Node.js powers high performance Oracle Datab
5454
The steps below create a Node.js installation for testing. Adjust the
5555
steps for your environment.
5656

57-
This node-oracledb release has been tested with Node.js 8, 10 and 11
58-
on 64-bit Oracle Linux, Windows and macOS. Note Node.js 8.12 or later
59-
is required. The add-on can also build on some 32-bit Linux, 32-bit
60-
Windows, Solaris and AIX environments, but these architectures have
61-
not been fully tested. Older versions of node-oracledb may work with
62-
older versions of Node.js.
57+
This node-oracledb release has been tested with Node.js 8, 10 and 12
58+
on 64-bit Oracle Linux, Windows and macOS. Note Node.js 8.16, Node.js
59+
10.16, or later is required. The add-on can also build on some 32-bit
60+
Linux, 32-bit Windows, Solaris and AIX environments, but these
61+
architectures have not been fully tested. Older versions of
62+
node-oracledb may work with older versions of Node.js.
6363

6464
Node-oracledb is an [add-on](https://nodejs.org/api/addons.html)
6565
available as C source code. Pre-built binaries are available
@@ -72,8 +72,8 @@ guaranteed to be available or usable in your environment.
7272

7373
Node-oracledn 4.0 was refactored to use [N-API][53] version 2. On
7474
each operating system, a node-oracledb binary will work with a number
75-
of Node.js versions from Node.js 8.12 onwards, dependent on N-API
76-
compatibility.
75+
of Node.js versions from Node.js 8.16 and Node.js 10.16 onwards,
76+
dependent on N-API compatibility.
7777

7878
#### <a name="mig31"></a> 1.1 Changes in node-oracledb version 3.1
7979

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
The node-oracledb add-on for Node.js powers high performance Oracle
44
Database applications.
55

6-
Use node-oracledb 4.0 to connect Node.js 8.12, 10 and 11 to Oracle Database.
6+
Use node-oracledb 4.0 to connect Node.js 8.16, 10.16, 12, or later, to Oracle Database.
77
Older version of node-oracledb may work with older versions of Node.js
88

99
Node-oracledb supports basic and advanced features of Oracle Database

lib/oracledb.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@
2121

2222
const nodbUtil = require('./util.js');
2323

24-
// This version of node-oracledb works with Node.js 8.12 or later.
25-
// The test stops hard-to-interpret runtime errors and crashes with
26-
// older Node.js versions.
24+
// This version of node-oracledb works with Node.js 8.16, 10.16 or
25+
// later. The test stops hard-to-interpret runtime errors and crashes
26+
// with older Node.js versions. Also Node.js 8.16 and 10.16 (and
27+
// 12.0) contain an important N-API performance regression fix. If
28+
// you're using the obsolete Node.js 9 or 11 versions, you're on your
29+
// own regarding performance and functionality
2730
let vs = process.version.substring(1).split(".").map(Number);
28-
if (vs[0] < 8 || (vs[0] === 8 && vs[1] < 12)) {
29-
throw new Error(nodbUtil.getErrorMessage('NJS-069', nodbUtil.PACKAGE_JSON_VERSION, "8.12"));
31+
if (vs[0] < 8 || (vs[0] === 8 && vs[1] < 16)) {
32+
throw new Error(nodbUtil.getErrorMessage('NJS-069', nodbUtil.PACKAGE_JSON_VERSION, "8.16"));
33+
} else if ((vs[0] === 10 && vs[1] < 16)) {
34+
throw new Error(nodbUtil.getErrorMessage('NJS-069', nodbUtil.PACKAGE_JSON_VERSION, "10.16"));
3035
}
3136

3237
const AqDeqOptions = require('./aqDeqOptions.js');

package/install.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,18 @@ function done(err) {
120120
}
121121
}
122122

123-
// Check there is a usable binary file for the node-oracledb module
123+
// Check for a usable binary file for the node-oracledb module.
124+
// Node.js 8.16 and 10.16 (and 12.0) contain an important N-API
125+
// performance regression fix. If you're using the obsolete Node.js 9
126+
// or 11 versions, install will work but you're on your own regarding
127+
// performance and functionality.
128+
124129
function checkAvailable(cb) {
125130
let vs = process.version.substring(1).split(".").map(Number);
126-
if (vs[0] < 8 || (vs[0] === 8 && vs[1] < 12)) {
127-
cb(new Error(nodbUtil.getErrorMessage('NJS-069', nodbUtil.PACKAGE_JSON_VERSION, "8.12")));
131+
if (vs[0] < 8 || (vs[0] === 8 && vs[1] < 16)) {
132+
cb(new Error(nodbUtil.getErrorMessage('NJS-069', nodbUtil.PACKAGE_JSON_VERSION, "8.16")));
133+
} else if (vs[0] === 10 && vs[1] < 16) {
134+
cb(new Error(nodbUtil.getErrorMessage('NJS-069', nodbUtil.PACKAGE_JSON_VERSION, "10.16")));
128135
} else {
129136
try {
130137
fs.statSync(nodbUtil.RELEASE_DIR + '/' + nodbUtil.BINARY_FILE);

0 commit comments

Comments
 (0)