Skip to content

Commit 2888fe3

Browse files
authored
Merge pull request #15 from blueconic/node14
Add Node14 support
2 parents f870651 + 7a6fe79 commit 2888fe3

File tree

6 files changed

+32
-41
lines changed

6 files changed

+32
-41
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ node_js:
66
- "10"
77
- "11"
88
- "12"
9+
- "13"
10+
- "14"
911
script: npm run dummy

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
12-10-2020 Paul Rütter
1+
12-10-2020 Paul Rütter
2+
- 2.1.0
3+
- Added Node 14 support
4+
5+
12-10-2020 Paul Rütter
26
- 2.0.2
37
- Fix latest published version, was replaced with beta.
48

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Node module which will create a V8 heap snapshot right before an "Out of Memory"
55

66
It can also create heapdumps and CPU profiles on request like 'v8-profiler', but does this off-process so it doesn't interfere with execution of the main process.
77

8-
Tested on Node.js 7.x, 8.x, 9.x, 10.x, 11.x and 12.x.
8+
Tested on Node.js 7.x, 8.x, 9.x, 10.x, 11.x, 12.x, 13.x and 14.x.
99
No support for Node.js < 7.0 at the moment (although this can be fixed if needed).
1010

1111
Also comes with prebuilt binaries (hosted on Github releases), thanks to Stuart Miller (https://github.com/spmiller).

lib/node_oom_heapdump_native.cc

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ void ParseArgumentsAndSetErrorHandler(const FunctionCallbackInfo<Value>& args) {
7373
// parse JS arguments
7474
// 1: filename
7575
// 2: addTimestamp boolean
76-
#if NODE_VERSION_AT_LEAST(12, 0, 0)
76+
#if NODE_VERSION_AT_LEAST(13, 0, 0)
77+
Local<Context> context = isolate->GetCurrentContext();
78+
String::Utf8Value fArg(isolate, args[0]->ToString(context).ToLocalChecked());
79+
#elif NODE_VERSION_AT_LEAST(12, 0, 0)
7780
String::Utf8Value fArg(isolate, args[0]->ToString(isolate));
7881
#elif NODE_VERSION_AT_LEAST(9, 0, 0)
7982
String::Utf8Value fArg(isolate, args[0]->ToString());
@@ -93,4 +96,4 @@ void init(Local<Object> exports) {
9396
NODE_SET_METHOD(exports, "call", ParseArgumentsAndSetErrorHandler);
9497
}
9598

96-
NODE_MODULE(NODE_OOM_HEAPDUMP_NATIVE, init)
99+
NODE_MODULE(NODE_OOM_HEAPDUMP_NATIVE, init)

package-lock.json

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

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-oom-heapdump",
3-
"version": "2.0.2",
3+
"version": "2.1.0",
44
"description": "Create a V8 heap snapshot when an \"Out of Memory\" error occurs, or create a heap snapshot or CPU profile on request.",
55
"main": "index.js",
66
"scripts": {
@@ -37,15 +37,15 @@
3737
},
3838
"homepage": "https://github.com/blueconic/node-oom-heapdump#readme",
3939
"devDependencies": {
40-
"eslint-config-google": "^0.13.0"
40+
"eslint-config-google": "^0.14.0"
4141
},
4242
"dependencies": {
4343
"bindings": "^1.5.0",
44-
"chrome-remote-interface": "^0.28.0",
44+
"chrome-remote-interface": "^0.28.2",
4545
"gc-stats": "^1.4.0",
46-
"nan": "^2.14.0",
46+
"nan": "^2.14.1",
4747
"node-pre-gyp": "^0.15.0",
4848
"require-main-filename": "^2.0.0",
49-
"ws": "^7.1.2"
49+
"ws": "^7.3.1"
5050
}
5151
}

0 commit comments

Comments
 (0)