const logger = createLogger({ // change level if in dev environment versus production level: env === 'production' ? 'info' : 'debug', format: format.combine( format.label({ label: path.basename(process.mainModule.filename) }), format.timestamp({ format: 'YYYY-MM-DD HH:mm:ss' }) ...
Added Napi::TypedThreadSafeFunction class that is a new implementation for thread-safe functions. Fixed leak on Napi::AsyncProgressWorkerBase. Fixed empty data on Napi::AsyncProgressWorker::OnProgress caused by race conditions of Napi::AsyncProgressWorker. Added Napi::ArrayBuffer::Detach() and ...
Hello! I am trying to migrate native module for electron application from nan to napi using addon-node-api wrapper. I am facing a problem with AsyncWorker. Overridden Execute works fine and gets results, but OnOK is never called. Under d...
The Buffer class is a subclass of JavaScript's Uint8Array class and extends it with methods that cover additional use cases. Node.js APIs accept plain Uint8Arrays wherever Buffers are supported as well.While the Buffer class is available within the global scope, it is still recommended to ...
Node.js itself exports a number of C/C++ APIs that Addons can use — the most important of which is the node::ObjectWrap class. Node.js includes a number of other statically linked libraries including OpenSSL. These other libraries are located in the deps/ directory in the Node.js source...
[b39db95737] - tools: remove @bable/plugin-syntax-class-properties (Rich Trott) #40394 [a6fd39f44f] - tools: remove @babel/plugin-syntax-top-level-await (Rich Trott) #40394 [8ca76eba73] - tools: update ESLint to 8.0.0 (Rich Trott) #40394 [dd8e219d71] - tools: prepare ESLin...
When using non-type template parameters in templated class member function a syntax error is emmited https://godbolt.org/z/xsz5oM87T The error can be fixed when using brackets like this: Foo<F1{}, S1{}> foo(){} or when function foo() is a free function Go to details and discussio...
Class Method: Buffer.from(buffer) Class Method: Buffer.from(string[, encoding]) Class Method: Buffer.isBuffer(obj) Class Method: Buffer.isEncoding(encoding) Class Property: Buffer.poolSize buf[index] buf.compare(target[, targetStart[, targetEnd[, sourceStart[, sourceEnd]]]) buf.copy(target...
Now that we have support for private class fields... we need to figure out how (and if) we want to support them with regards to util.inspect()... Right now, those properties are hidden from the output even when showHidden is true... clas...
Maybe it's a bug, maybe it's by design. Documentation doesn't mention anything about whether or not the "exit" event should fire, but it's a bit silly I have to write: process.on('SIGINT', function () { process.exit(somecode); // now the...