profile
viewpoint
Kevin Eady KevinEady Hive Streaming Berlin, DE

KevinEady/abi-stable-node 0

NAPI — Node with PoC ABI stable API for native modules.

KevinEady/ClassicUO 0

ClassicUO - an open source implementation of the Ultima Online Classic Client.

KevinEady/electron-quick-start 0

Clone to try a simple Electron app

KevinEady/nan 0

Native Abstractions for Node.js

KevinEady/node 0

Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:

KevinEady/node-addon-api 0

Module for using N-API from C++

KevinEady/node-addon-examples 0

Node.js C++ addon examples from http://nodejs.org/docs/latest/api/addons.html

KevinEady/node-util 0

node.js util module as a module

KevinEady/Razor 0

Razor is a free tool designed to help with simple tasks while playing Ultima Online.

KevinEady/ServUO 0

An Ultima Online server emulator written in c#

push eventKevinEady/node-addon-api

Daniel Bevenius

commit sha 31504c862b2b77e73ab805df68098d3af5a7403a

doc: fix minor typo in object_wrap.md (#741) PR-URL: https://github.com/nodejs/node-addon-api/pull/741 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>

view details

David Halls

commit sha ba7ad37d4462c5f3b61a8a7750df2906b7914609

src: fix ObjectWrap inheritance - fix wrap/unwrap of objects inheriting from non-ObjectWrap PR-URL: https://github.com/nodejs/node-addon-api/pull/732 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>

view details

Ferdinand Holzer

commit sha d463f02bc78bd90d4149a1888e19e9a8159b44d7

src: fix testEnumerables on ObjectWrap PR-URL: https://github.com/nodejs/node-addon-api/pull/736 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Michael Dawson

commit sha 36e1af96d52d9fd934ec1d569a7860172ffcaae1

src: fix use of Reference with typed arrays Fixes: https://github.com/nodejs/node-addon-api/issues/702 Previously calling Value() on a Reference for a TypedArray that the enderlying object had been collected would result in an error due to a failure in creating the return value. Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com> PR-URL: https://github.com/nodejs/node-addon-api/pull/726 Fixes: https://github.com/nodejs/node-addon-api/issues/702 Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

view details

Kasumi Hanazuki

commit sha 4c01af2d8722c4bc36c2c051c2b2621f47553431

Fix typo in CHANGELOG (#715)

view details

Nicola Del Gobbo

commit sha bd2c5ec502edecab89c7ecf47fa8dc47a617a8f2

Fixes issue 745. (#748)

view details

Gus Caplan

commit sha 48f6762bf634a424ec681371927d7e4626824500

src: add __wasm32__ guards

view details

Gabriel Schulhof

commit sha ef16dfb4a2f7efbb2bd5704a517b383c98c5a3c7

doc: update ObjectWrap example * Remove the global static reference to the constructor * Use `Napi::Env::SetInstanceData` to store the constructor, and * Add a static method that uses `Napi::FunctionReference::New` to create a new instance of the class by retrieving the constructor using `Napi::Env::GetInstanceData` and using `Napi::FunctionReference::New` to create the new instance. Fixes: https://github.com/nodejs/node-addon-api/issues/711 PR-URL: https://github.com/nodejs/node-addon-api/pull/754 Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Lovell Fuller

commit sha 40c79263421d21d92199cbbef0533f42a434d4f4

build: ensure paths with spaces can be used Ensure include path is relative to process working directory (PWD) This allows the use of parent paths that contain whitespace, plus keeps the approach consistent with that used by nan. (The previous approach of adding double quotes did not work as intended due to node-gyp removing these on the way through.) PR-URL: https://github.com/nodejs/node-addon-api/pull/757 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>

view details

NickNaso

commit sha 61c98463939630bb52438bb8ea1fb1fdf651af1c

Prepare release 3.0.1.

view details

Kevin Eady

commit sha 717b6026740bb23fbc91fdff784dff93e3f61f87

Merge remote-tracking branch 'upstream/master' into contexted-tsfn-api-gcc-4

view details

push time in 21 hours

push eventKevinEady/node-addon-api

Kevin Eady

commit sha 75dd4221240bbca2a9bce01498db93d1050cffec

doc,test: finish TSFNEx

view details

push time in 21 hours

delete branch KevinEady/snapcast

delete branch : patch-1

delete time in 3 days

PR opened badaix/snapcast

Update JSON-RPC documentation with HTTP APIs

Add details regarding HTTP APIs (POST and WebSocket).

+81 -4

0 comment

1 changed file

pr created time in 12 days

push eventKevinEady/snapcast

Kevin Eady

commit sha 3e7a85c979ac87598dc2f1e2ae8ef001fa3547f6

Update v2_0_0.md Add details regarding HTTP APIs (POST and WebSocket)

view details

push time in 12 days

fork KevinEady/snapcast

Synchronous multiroom audio player

fork in 12 days

issue commentnodejs/node-addon-api

ObjectWrap Factory?

Hi @bsrdjan ,

When using SetInstanceData, any subsequent call will overwrite any previous calls' SetInstanceData. It looks like you want to call SetInstanceData multiple times, and that order of which-gets-called-first is what's causing the erratic behavior.

If you want to use SetInstanceData multiple times, perhaps use a struct that has members for every "piece of data" you want to store...? Then, every time you want to "update instance data", you'd need to GetInstanceData() and modify the member? Just a thought.

Thanks, Kevin

bsrdjan

comment created time in 15 days

issue commentnodejs/node-addon-api

BrowserWindow.getNativeWindowHandle from parameter

What about using an Napi::External<NSView>?

deshan

comment created time in 15 days

issue openedpolserver/polserver

Add `struct enum` construct to Escript

Currently, enums are really just "grouped constants". We propose a new type, struct enum, which behaves as a read-only struct:

enum struct Days
    Sunday := 1,
    Monday,
    Tuesday,
    Wednesday,
    Thursday,
    Friday,
    Saturday,
endenum
var x = Days; // okay
var y = x.Monday; // okay
y = 0; // okay, you are changing the reference of `y`
x.Monday = 0; // no-op, `x` is a `struct enum`
Days.Monday = 0; // no-op, `Days` is a `struct enum`

Days is a struct and you can Print(Days), and normal member accessors work (with . and [])

Days[3] == Days.Tuesday

created time in 19 days

issue commentnodejs/node-addon-api

What's the lifetime of a deferred?

Hi @0815fox ,

Take a look at this WIP example:

  1. The Call() method is exposed to JavaScript and creates a new deferred, returning its promise back to Node.
  2. It receives this deferred's pointer in another function.
  3. The function resolves and deletes the deferred.

Does this example help? Let us know if you have additional questions.

Thanks, Kevin

0815fox

comment created time in 21 days

issue commentnodejs/node-addon-api

ObjectWrap Factory?

After looking myobject example, this does exemplify the "factory of wrapped objects" paradigm:

The alternative would be, for example, replacing line 8 with:

var obj2 = new createObject.MyObject(20);

[NB: MyObject is exposed through the exports by the "child" initialization call of MyObject::Init]

Does this help / answer your question?

Let us know if you have any additional questions!

Thanks, Kevin

bsrdjan

comment created time in 22 days

issue commentnodejs/node-addon-api

ObjectWrap Factory?

Hi @bsrdjan ,

Thank you for your patience. I must have overlooked your first question.

Firstly, I'm not sure why you are having problems with the myobject.cc example. Napi::Env::SetInstanceData and GetInstanceData were added in N-API 5 and introduced in node-addon-api https://github.com/nodejs/node-addon-api/pull/663 and is included in the currently-released node-addon-api@3.0.0. The example's package.json also requires an N-API 5 compatible node engine, so you shouldn't be able to install on any system where node does not ship with N-API 5+ support.

I just did this on node-addon-examples master branch:

$ cd 7_factory_wrap/node-addon-api

$ node -v
v12.18.0

$ npm i

> factory_wrap@0.0.0 install /Users/kevineady/Documents/Projects/node-addon-examples/7_factory_wrap/node-addon-api
> node-gyp rebuild

  CXX(target) Release/obj.target/addon/addon.o
  CXX(target) Release/obj.target/addon/myobject.o
  SOLINK_MODULE(target) Release/addon.node
npm notice created a lockfile as package-lock.json. You should commit this file.
added 2 packages from 58 contributors and audited 2 packages in 9.273s
found 0 vulnerabilities

$ node . 
11
12
13
21
22
23

Regarding a node-addon-api example of factory of wrapped objects... Let me get back to you on that 😄

bsrdjan

comment created time in 22 days

issue commentnodejs/node-addon-api

How to serialize or deserialize the napi_value?

Hi @samsha1971 ,

The v8 serialization API is provided by Node's built-in v8 module: Serialization API.

If you want to use serialization within your native addon, you would have to either:

  1. Pass in the v8 module object as an argument to some method in your addon. Then, call the serialize and deserialize on it, or..
  2. Pass in the individual serialize and deserialize functions and call them (make sure to bind the to the v8 object, ie v8.serialize.bind(v8) -- I'm not 100% sure the internal methods require the receiver to be the v8 module)

[NB: Regardless of which method you choose, be sure to take care of the lifecycle of v8 object and/or [de]serialize functions passed to your addon. If you do not plan on using them immediately within the scope of the function it is passed in to, you will need to store an ObjectReference / FunctionReference to properly persist the value across calls to your addon.]

Let us know if you have any additional questions.

Hope this helps,

Kevin

samsha1971

comment created time in 24 days

pull request commentnodejs/node-addon-api

tsfn: implement ThreadSafeFunctionEx

Hi @mhdawson / @gabrielschulhof / @legendecas ,

I have started working on the documentation. The plan is to have a "general" page, and two "specific" pages for each API. Please take a look at the WIP.

KevinEady

comment created time in a month

push eventKevinEady/node-addon-api

Kevin Eady

commit sha d092a324ce65ab7308cd53c91c7aa614b95ad934

doc: wip with tsfn documentation

view details

push time in a month

push eventKevinEady/node-addon-api

Kevin Eady

commit sha a7a535284e4d2f067faa2d50ce99cc5924fb3323

test: v4,v5+ tests pass

view details

push time in a month

push eventKevinEady/node-addon-api

Kevin Eady

commit sha 5062dfbc71e1cdc88500cfd1988d3733b63d77e8

test: v4,v5+ tests pass

view details

push time in a month

push eventKevinEady/node-addon-api

Kevin Eady

commit sha d370783369748dc7a570e727bac73e094b5cee98

test: v4,v5+ tests pass

view details

push time in a month

push eventKevinEady/node-addon-api

Kevin Eady

commit sha 2cf9a216b894dcbf3066701f6314a123c25fd98b

test: v4,v5+ tests pass

view details

push time in a month

push eventKevinEady/node-addon-api

Kevin Eady

commit sha 714f4b4224e03af5d5843b584707ba4c0fbd04f3

test: v4,v5+ tests pass

view details

push time in a month

push eventKevinEady/node-addon-api

Kevin Eady

commit sha d0ce5583d609a3a6730e56c7636eadcdf24ffc54

test: v4,v5+ tests pass

view details

push time in a month

push eventKevinEady/node-addon-api

Kevin Eady

commit sha ebb8573ab3efbe7bc854f1598a905b97e579e275

test: v4,v5+ tests pass

view details

push time in a month

push eventKevinEady/node-addon-api

Kevin Eady

commit sha 379d362287ff337cdf50f1ab714530713396606f

test: v4,v5+ tests pass

view details

push time in a month

push eventKevinEady/node-addon-api

Kevin Eady

commit sha 19931ea00e67ce111c1bed6bc354116bc0f30dbe

src: remove unused parameters

view details

push time in a month

push eventKevinEady/node-addon-api

Kevin Eady

commit sha 89181da235299b39f9c22d5d8894f9b05de5db63

test: fix TSFNEx tests

view details

Kevin Eady

commit sha 8fcdb4d72c44d0a3aba4990b1e46fc7abbec8e8d

test: add barebones new tsfn test for use in docs

view details

Kevin Eady

commit sha cc8de121c0abb3994855352398c9a4647a5b1efa

implement optional function callback

view details

Kevin Eady

commit sha 6706f969023660c0e790bcf063be7385b3065bd3

clean up optional callback implementation

view details

Kevin Eady

commit sha 89d2dea08eae53e8d130028fc7863d22f4d06148

test: wip with tsfnex tests

view details

Kevin Eady

commit sha d2bcc03d67fc6587b2547d95018f10e1e61b54a2

test: napi v4,v5 all tests pass

view details

Kevin Eady

commit sha 6b7a7d05f2a70d3f168eee5313292b1b31984acb

test: consolidate duplicated code

view details

Kevin Eady

commit sha 7467a3f26f3ef2100af81cac28e58b1c3d9b2e3a

test: basic example, standardize identifier names

view details

Kevin Eady

commit sha a01c3c865276b2bee298141892a1f16d5c0bad19

test: refactor the the 'empty' tsfnex test It should actually check for empty jsCallback

view details

Kevin Eady

commit sha b0e7817f28bec975ea435937ba50d79a16037f5a

basic multi-threading

view details

Kevin Eady

commit sha 44adeea1bd66ce4ea8876506d34d3602b4eed7e3

test: wip with example

view details

Kevin Eady

commit sha c20685be7a7678d9092f82bb7a058f3b5fb398b7

test: wip with example test

view details

Kevin Eady

commit sha 3b24e7431a53b8091c9b597f24a222392f2a8728

src: consolidate duplicated tsfnex code

view details

Kevin Eady

commit sha 27760d1453891407810be48a05278555346fa478

test: v4,v5+ tests pass

view details

push time in a month

delete branch polserver/escript-antlr4

delete branch : syzygy-statement-labels-enum-trailing-comma

delete time in a month

push eventpolserver/escript-antlr4

Eric Swanson

commit sha 88e5a705324e1e8e43a92c5e2f0eec7905b6560b

Move statement labels to the statements that can have them Allow trailing commas in enum lists

view details

Kevin Eady

commit sha ef133e3a3a3184936e93493c863b7b995cdf4737

Merge pull request #2 from polserver/syzygy-statement-labels-enum-trailing-comma Move optional statement label into statements that can have them; allow trailing commas in enum lists

view details

push time in a month

PR merged polserver/escript-antlr4

Move optional statement label into statements that can have them; allow trailing commas in enum lists

Move statement labels to the statements that can have them Allow trailing commas in enum lists

+11 -8

0 comment

1 changed file

eric-swanson

pr closed time in a month

create barnchKevinEady/node-addon-api

branch : broken-promise

created branch time in a month

fork KevinEady/node

Node.js JavaScript runtime :sparkles::turtle::rocket::sparkles:

https://nodejs.org/

fork in a month

pull request commentnodejs/node-addon-api

tsfn: implement ThreadSafeFunctionEx

Hi @gabrielschulhof ,

I took into a look into what you suggested, that maybe all threads have called Release() prior to queue being completed.

I pinpointed the failure to this specific portion:


  // Start the thread in blocking mode, and assert that it could not finish.
  // Quit early by aborting.
  .then(() => testWithJSMarshaller({
    threadStarter: 'startThread',
    quitAfter: 1,
    maxQueueSize: binding.threadsafe_function_ex_threadsafe.MAX_QUEUE_SIZE,
    abort: true
  }))
  .then((result) => assert.strictEqual(result.indexOf(0), -1))

... and when my CallJS is triggered, the environment and callback are null, but my context and data are still valid:

image

So I think you are completely right: this test has the TSFN abort, so I suppose there are still items on the queue when an abort happens.

So, am I correct that:

  • Inside your CallJS, checking that env == nullptr signifies that the thread count on the TSFN is 0, ie. all have called Release / Abort / Call (and received napi_closing)
  • However, if you want to handle the case that 'tsfn is aborted' differently inside your CallJS, this must be managed by user, as napi does not provide a threadsafe way to get the tsfn state.
    • ... but I suppose it wouldn't make sense to handle the logic that "thread is aborted" in the CallJS callback, as you would probably handle it on the caller side, when receiving napi_closing fromtsfn.Call
KevinEady

comment created time in a month

issue closedmicrosoft/ClearScript

Question regarding V8ScriptEngine and multi-threads

In https://github.com/microsoft/ClearScript/issues/12#issuecomment-328289190, it is mentioned:

If you're using a single instance of V8ScriptEngine, you can execute JavaScript code on any thread, but not on multiple threads simultaneously.

Your example launches a JavaScript task on a worker thread, but waits for it on the current thread. This is a deadlock because the worker thread can't start running JavaScript code until the current thread stops doing so.

I'm having trouble identifying what is incorrect behavior, because I see two different situations here that can be wrong:

  1. Executing code from multiple threads simultaneously, or
  2. Having secondary thread await on code execution, while primary thread is executing code that never completes (a deadlock, obviously wrong)

For example, say I have engine.Script.foo that exposes some function. What will happen in the scenario where primary thread calls engine.Script.foo(), and before this call completes, a secondary thread also executes into the script? Will the secondary thread's call ...

  1. ... throw an Exception saying "engine is busy"
  2. ... wait for the primary thread's call to finish, then execute the secondary thread's call?

I suppose the difference between the two being: do I have to build my own "execute script code" dispatcher (in case of point #<span/>1) or does ClearScript have this support built-in (in case of point #<span/>2) and it is up to the developer to ensure deadlocks don't happen?

Thanks, Kevin

closed time in a month

KevinEady

issue commentmicrosoft/ClearScript

Question regarding V8ScriptEngine and multi-threads

Perfect! Thanks!

KevinEady

comment created time in a month

issue openedmicrosoft/ClearScript

Question regarding V8ScriptEngine and multi-threads

In https://github.com/microsoft/ClearScript/issues/12#issuecomment-328289190, it is mentioned:

If you're using a single instance of V8ScriptEngine, you can execute JavaScript code on any thread, but not on multiple threads simultaneously.

Your example launches a JavaScript task on a worker thread, but waits for it on the current thread. This is a deadlock because the worker thread can't start running JavaScript code until the current thread stops doing so.

I'm having trouble identifying what is incorrect behavior, because I see two different situations here that can be wrong:

  1. Executing code from multiple threads simultaneously, or
  2. Having secondary thread await on code execution, while primary thread is executing code that never completes (a deadlock, obviously wrong)

For example, say I have engine.Script.foo that exposes some function. What will happen in the scenario where primary thread calls engine.Script.foo(), and before this call completes, a secondary thread also executes into the script? Will the secondary thread's call ...

  1. ... throw an Exception saying "engine is busy"
  2. ... wait for the primary thread's call to finish, then execute the secondary thread's call?

I suppose the difference between the two being: do I have to build my own "execute script code" dispatcher (in case of point #<span/>1) or does ClearScript have this support built-in (in case of point #<span/>2) and it is up to the developer to ensure deadlocks don't happen?

Thanks, Kevin

created time in a month

pull request commentnodejs/node-addon-api

Contexted tsfn api gcc 4

Hey @gabrielschulhof , @mhdawson ... Soooo I am a little stuck now. I have no idea why this is happening, but it seems that the TSFNEx::CallJs wrapper (which, in turn, calls the user-defined static CallJs function) is getting called by Node with an empty napi_env.

I did as you suggested, and migrated the old "multi-threaded" TSFN test to this new TSFNEx methodology. The changes to do so seem minimal, so I'm not sure why this is erroring.

I've added this signal(SIGTRAP) call, and you can see it is indeed erroring there the CI build.

This is what I've got in my debugger:

image

and here's the stack...

__pthread_kill (@__pthread_kill:6)
pthread_kill (@pthread_kill:109)
raise (@raise:12)
Napi::ThreadSafeFunctionEx<ThreadSafeFunctionInfo, int, &(TSFNCallJS(Napi::Env, Napi::Function, ThreadSafeFunctionInfo*, int*))>::CallJsInternal(napi_env__*, napi_value__*, void*, void*) (/Users/kevineady/Documents/Projects/node-addon-api/napi-inl.h:4477)
void node::Environment::CloseHandle<uv_handle_s, v8impl::(anonymous namespace)::ThreadSafeFunction::CloseHandlesAndMaybeDelete(bool)::'lambda'(uv_handle_s*)::operator()(uv_handle_s*) const::'lambda'(uv_handle_s*)>(uv_handle_s*, v8impl::(anonymous namespace)::ThreadSafeFunction::CloseHandlesAndMaybeDelete(bool)::'lambda'(uv_handle_s*)::operator()(uv_handle_s*) const::'lambda'(uv_handle_s*))::'lambda'(uv_handle_s*)::__invoke(uv_handle_s*) (@void node::Environment::CloseHandle<uv_handle_s, v8impl::(anonymous namespace)::ThreadSafeFunction::CloseHandlesAndMaybeDelete(bool)::'lambda'(uv_handle_s*)::operator()(uv_handle_s*) const::'lambda'(uv_handle_s*)>(uv_handle_s*, v8impl::(anonymous namespace)::ThreadSafeFunction::CloseHandlesAndMaybeDelete(bool)::'lambda'(uv_handle_s*)::operator()(uv_handle_s*) const::'lambda'(uv_handle_s*))::'lambda'(uv_handle_s*)::__invoke(uv_handle_s*):71)
uv_run (@uv_run:142)
node::NodeMainInstance::Run() (@node::NodeMainInstance::Run():100)
node::Start(int, char**) (@node::Start(int, char**):61)
start (@start:4)

Hopefully we can discuss in today's call.

KevinEady

comment created time in a month

PR opened nodejs/node-addon-api

Reviewers
Contexted tsfn api gcc 4

Implements a templated ThreadSafeFunctionEx<ContextType> class.

+932 -0

0 comment

13 changed files

pr created time in a month

push eventKevinEady/node-addon-api

Yulong Wang

commit sha 4de23c9d6b66681390ba7d09e395390d159d308a

doc: fix support bigint64/biguint64 guards PR-URL: https://github.com/nodejs/node-addon-api/pull/705 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>

view details

Gabriel Schulhof

commit sha a64e8a56417d3f9c073ec2db19ccd31af453ebe0

ci: move travis from 13 to 14 (#707) Co-authored-by: Gabriel Schulhof <gabriel.schulhof@intel.com>

view details

Gabriel Schulhof

commit sha 82a96502a4637e581607b41ab777f88a73f4f683

src: change guards to NAPI_VERSION > 5 Since we have made the decision that we shall include `BigInt` into N-API 6, we can change the guards for the `BigInt` and `BigInt`-based typed array wrappers accordingly, and end our reliance on guarding by `NODE_MAJOR_VERSION`. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: https://github.com/nodejs/node-addon-api/pull/697 Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Gabriel Schulhof

commit sha 9c9accfbbe8c27f969d569f78758a8c47837321b

src: add support for addon instance data Support `napi_get_instance_data()` and `napi_set_instance_data()`. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Fixes: https://github.com/nodejs/node-addon-api/issues/654 PR-URL: https://github.com/nodejs/node-addon-api/pull/663 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Nicola Del Gobbo

commit sha 187318e37f4a81f1b0f9f414e86f16dd0dc75748

doc: Removed references to Node.js lower than 10.x. (#709) * Removed references to Node.js lower than 10.x.

view details

NickNaso

commit sha 081cdc2f732ce759df777ffd69e0b4c2bd318b0d

Prepare release 3.0.0.

view details

Gabriel Schulhof

commit sha 381c0da60c99b3bc845767142629a036145eff32

doc: add instance data APIs Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Re: https://github.com/nodejs/node-addon-api/issues/567#issuecomment-619478767 PR-URL: https://github.com/nodejs/node-addon-api/pull/708 Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>

view details

Jeroen Janssen

commit sha 45cb1d9748d6305598bb2ad27188135e8bbddad3

Correct AsyncProgressWorker link in README (#716) * Correct AsyncProgressWorker link in README

view details

Michael Dawson

commit sha beccf2145dbff6c7febb16844e95a268f7930bdb

test: fix up delays for array buffer test Signed-off-by: Michael Dawson <michael_dawson@ca.ibm.com> PR-URL: https://github.com/nodejs/node-addon-api/pull/737 Refs: https://github.com/nodejs/node-addon-api/issues/735 Reviewed-By: Anna Henningsen <anna@addaleax.net>

view details

Kevin Eady

commit sha 0d267032e092d050b0b7e9b20b69be09676a9ca8

Merge remote-tracking branch 'upstream/master' into contexted-tsfn-api-gcc-4

view details

push time in a month

create barnchKevinEady/node-addon-api

branch : contexted-tsfn-api-gcc-4

created branch time in a month

create barnchKevinEady/Razor

branch : script-v2

created branch time in a month

delete branch KevinEady/ClassicUO

delete branch : revert-1-add-cuoapi-project

delete time in a month

push eventKevinEady/ClassicUO

Kevin Eady

commit sha 7fe9be2cfcfe0581fdbd1cdaa86af393b1040ba8

Revert "first go-round with cuoapi project"

view details

Kevin Eady

commit sha 9e38facde2171c34e4abe4a6021a3798567de1ae

Merge pull request #2 from KevinEady/revert-1-add-cuoapi-project Revert "first go-round with cuoapi project"

view details

push time in a month

PR merged KevinEady/ClassicUO

Revert "first go-round with cuoapi project"

Reverts KevinEady/ClassicUO#1

+39 -169

0 comment

8 changed files

KevinEady

pr closed time in a month

PR opened KevinEady/ClassicUO

Revert "first go-round with cuoapi project"

Reverts KevinEady/ClassicUO#1

+39 -169

0 comment

8 changed files

pr created time in a month

create barnchKevinEady/ClassicUO

branch : revert-1-add-cuoapi-project

created branch time in a month

create barnchKevinEady/Razor

branch : script-v2-cuoapi

created branch time in a month

push eventKevinEady/Razor

Kevin Eady

commit sha f74e4f53da1a6a6bf463e7b2a2cef440f5424d30

Add ClassicUO submodule

view details

Kevin Eady

commit sha 33c2361632ea1127fb1eab528b4623a45d4f5b6b

Merge pull request #1 from KevinEady/add-cuoapi-project Add ClassicUO submodule

view details

push time in a month

PR merged KevinEady/Razor

Add ClassicUO submodule
+22 -7

0 comment

5 changed files

KevinEady

pr closed time in a month

PR opened KevinEady/Razor

Add ClassicUO submodule
+22 -7

0 comment

5 changed files

pr created time in a month

create barnchKevinEady/Razor

branch : add-cuoapi-project

created branch time in a month

push eventKevinEady/Razor

Quick

commit sha 8fa9955da962da07c82b1695a8bc7b5318940e8a

Added While loops

view details

Quick

commit sha 371becfd08769e55f1c0814f7c3e892596fb7b60

Added DoWhile loop

view details

Quick

commit sha 5909388d24c34f67a4992cb90e7e1784b5f0e85e

Invalid character check on auto-screenshot capture of last killed mobile names

view details

Quick

commit sha 4b0fde6a1a2bd9e911b2a7761eb357a634f19415

Added null check on UpdateTitleBar Added a little info to the Target Filter tab

view details

Quick

commit sha 7710925f6148878e61effed468f122fb337b7e77

Extract specific words out of a SysMessage to display overhead using {1}. {2}, etc for the first, second word

view details

Quick

commit sha 60057bb487d0add23a928c22d851f85073873972

Fixed While SysMessage ToString()

view details

Quick

commit sha 29207099d59c4d026479275f44c41c5e201eeab9

Fixed Do While SysMessage ToString

view details

Quick

commit sha 9a8014fced6f5ed08d740bb3630a3d48c94c912e

Added SetMacroVariableTargetAction that will pause until you set the variable (same behavior as Set Last Target)

view details

Kevin Eady

commit sha 03186f84af5ced5c4f08acbe9ffd786caf1f3008

Add Loader.def to project module definition in Debug configuration

view details

Kevin Eady

commit sha 00e39e2b0d2f7fd9090b73a4acc7d25d9ebee540

Add packets 0xFA (length 1) and 0xFB (length 2)

view details

Quick

commit sha 3fe021ca912b66a49126563c0f91731374a89a18

New Sound & Music tab -- filter specific sounds in game, trigger music and see sound/music info

view details

Quick

commit sha a88f34b2406b40ba23f3917f468900e8170763e3

Moved Razor UI auto-gen code to partial class

view details

Quick

commit sha 1237513bfd472d44701586f8549e421cfc1748aa

Add skeleton files for script engine

view details

Quick

commit sha 71bf76170ffce7e5cd52d8482e590e740eb9a22b

Commit all changes related to the engine import

view details

Quick

commit sha 9b9ee6a48d15a5a013cebd10212d0ce7475a824a

Incorporated commits from other Razor repo

view details

Quick

commit sha b8ba75878746b0770a107cd20f880c530de2801e

Implemention of script engine

view details

Quick

commit sha 8a392128d4c6884bf5a2ed8610f48f9f7bc2d070

Added script engine to main solution

view details

Quick

commit sha f372313360614fbcb50ccbba6b49b2296a6a1788

Initial setup of commands based on Razor Actions

view details

Quick

commit sha 56c713f0d365ea725932dfd25ae90b6ae64ea080

Added script recording, syntax highlighting on editor (still needs adjustments)

view details

Quick

commit sha f95ea47e4ab4738311841ac0a05a5fede7ae65df

Imported DressList.cs refactor by SaschaKP Added Dress/Undress commands (SaschaKP's fork)

view details

push time in a month

push eventKevinEady/ClassicUO

Kevin Eady

commit sha 4a372560aad0bb05324d1a8a42b7d91694345303

first go-round with cuoapi project

view details

Kevin Eady

commit sha 7aa0e5ba8e63bba8be688d052e1e87b80f90240a

Merge pull request #1 from KevinEady/add-cuoapi-project first go-round with cuoapi project

view details

push time in a month

PR opened KevinEady/ClassicUO

first go-round with cuoapi project
+169 -39

0 comment

8 changed files

pr created time in a month

push eventKevinEady/ClassicUO

Andrea Angelini

commit sha a288bf88637af544214296b0c818b1316db959aa

winexe

view details

Andrea Angelini

commit sha 211d4b0b812671fc571d1bc2eeb1d6d772a0bcc6

Merge branch 'dev'

view details

Kevin Eady

commit sha 4a372560aad0bb05324d1a8a42b7d91694345303

first go-round with cuoapi project

view details

push time in a month

push eventKevinEady/ClassicUO

Andrea Angelini

commit sha 9908792f54540c559844941c10fe41d5a850ab34

minor

view details

Andrea Angelini

commit sha e7a8f6023650bbf18525642a77633ce57a28ef5d

+ fix critical issue with house placements

view details

dissident76

commit sha 28ba63b25565400882aa655c9ffaf580adee0fe1

WorldMap zoom saved (not throwing exception when parsing old gumps.xml)

view details

brndd

commit sha 70eed70bb8b71247aa0b7db9e20c259f448b4427

Bandaid fix for Limit3Spell MessageTypes.

view details

Andrea Angelini

commit sha 8c93839616a1c961292e895a15c97967dc2c4f09

+ evaluate expression with minor cost before

view details

Andrea Angelini

commit sha 4a96e9543de6906a6fea9e07fd212579b1ae695c

Merge branch 'dev' of https://github.com/andreakarasho/ClassicUO into dev

view details

brndd

commit sha 41e0dce29c86fa954b9ac33f92d393a25f696aac

Fixes vendor gump uint to ushort truncation

view details

brndd

commit sha 24218d183da2234e404272a041c2befc0bcd4e19

Fix emote messages

view details

brndd

commit sha b9e0bc5a31d69d08df4384bbbe0708d5f3ff3902

Fixes vendor buy/sell gumps having blank names and being reversed under certain conditions.

view details

brndd

commit sha f4c1b41f548ae767652fa2215efae8c2d78b8ac1

This shouldn't be an else if

view details

brndd

commit sha 7080f10c215fd5c8e40e5dcdd11b78f1822edab7

Implement UpdateName packet

view details

brndd

commit sha 48c4cf657bd093d4309e38b2c885800e46ba875e

Fix all names display

view details

Andrea Angelini

commit sha bf90a2dd081d45f116fe8fe44ac63807caeeaeac

fix crash while parsing verdata

view details

Andrea Angelini

commit sha f14a7d0fc9b99fc40b4b09fa551fbe67553d9307

minor on target

view details

Andrea Angelini

commit sha 213de52803fa434591a8c09732e17b3702072625

+ truncate string when reading '\0' char

view details

Andrea Angelini

commit sha fc8b92abd816a6ae20215331acbbf4775df291aa

+ check for party leader

view details

Andrea Angelini

commit sha ffa6c39c3cff8230564d743e5fd11af5cf3678aa

don't send invalid target data when using TargetClientSide

view details

brndd

commit sha 82e32db21530487bb516bc290654ac04f771d42f

Fix journal emotes having double asterisks

view details

Andrea Angelini

commit sha d7148d971dbdaaa4cd685cc61bf138a4ca5b1f4c

wmap - semi fixed

view details

Andrea Angelini

commit sha 1a4dd89bce8ca1d81e7639fd2992f3ad9b03a425

fix reading

view details

push time in a month

create barnchKevinEady/ClassicUO

branch : add-cuoapi-project

created branch time in a month

push eventpolserver/escript-antlr4

Kevin Eady

commit sha 4d9cbf96cf19216e84c2250d8b0aff051cbb2559

Introduce EscriptLooseParser

view details

Kevin Eady

commit sha 050ca92049f71aaf5d637bb88445d0ecdf3b14cf

Update to version 0.1.7

view details

push time in 2 months

push eventpolserver/escript-antlr4

Kevin Eady

commit sha aa01b203e45323a823504785985b6d1afc8522c8

Fix member operation expressions

view details

push time in 2 months

delete branch polserver/escript-antlr4

delete branch : syz-ecompile-tokens

delete time in 2 months

push eventpolserver/escript-antlr4

Eric Swanson

commit sha c72523003facc87f0e60578d11bb4a816ab3dbc2

Prefix some keywords with TOK_ because otherwise they clash with 20-year-old windows header definitions

view details

Kevin Eady

commit sha 5d7f92d13175133557146a9c3974f20b6239fe61

Merge pull request #1 from polserver/syz-ecompile-tokens Prefix some keywords with TOK_

view details

push time in 2 months

PR merged polserver/escript-antlr4

Prefix some keywords with TOK_

because otherwise they clash with 20-year-old windows header definitions.

+9 -9

0 comment

2 changed files

eric-swanson

pr closed time in 2 months

push eventpolserver/escript-antlr4

Kevin Eady

commit sha 6d50bca7c02c748dc8d287bb5c09fe09067d7775

Separate member calls from method calls

view details

Kevin Eady

commit sha 32b8a89a6670c988bc1d444c87a8f970dff47841

Update to version 0.1.6

view details

push time in 2 months

push eventpolserver/escript-antlr4

Kevin Eady

commit sha 9ffe8ba5cf850c380b1769843f5b8eb47877f23e

Proper enum expression handling

view details

Kevin Eady

commit sha 2a84d8d9aad6ad7dcdad945900ba14f9e4faef04

Update to version 0.1.5

view details

push time in 2 months

push eventpolserver/escript-antlr4

Kevin Eady

commit sha 463c2fb6cca5354389c15b830bcb15a7412db38e

Break module functs better; no list-of-lists

view details

Kevin Eady

commit sha 22cd13054ce652bc633a0aa522b92956ea73ef8c

Update to version 0.1.4

view details

push time in 2 months

push eventpolserver/escript-antlr4

Kevin Eady

commit sha 21b92adf771250b0ac64ef055ef126df126e17f2

Push comments to COMMENTS channel

view details

Kevin Eady

commit sha 271f08ec1c44f9e97df16e8a81f0c037d8785ca6

Update to version 0.1.3

view details

push time in 2 months

MemberEvent

push eventpolserver/escript-antlr4

Kevin Eady

commit sha 46544274b550f2dc78c86e92a226b34abd8fea56

Args are required for method calls

view details

Kevin Eady

commit sha a27bd7fdd03f553373021c80060f7fb4052b0d5e

Update to version 0.1.2

view details

push time in 2 months

push eventpolserver/escript-antlr4

Kevin Eady

commit sha 9e7d999f9228ca830b3d614f7fedd4649f03bd60

fix moduleFunctionDeclaration; break statements up

view details

Kevin Eady

commit sha 1b570edc6a82cca95868e09c1cb8bd0ca4e7cdb7

Update to version 0.1.1

view details

push time in 3 months

pull request commentnodejs/node-addon-api

tsfn: implement ThreadSafeFunctionEx

Hi team,

Going through the errors seen here https://travis-ci.com/github/nodejs/node-addon-api/jobs/323508516#L743 ...

I noticed the node-addon-api CI uses gcc 4.8.4 but the minimum supported gcc version for building node is gcc 6. Aaaand of course, when I test this PR on a gcc 6.1 docker image, it runs fine.

Do we need to support gcc 4? Let's discuss in the next call.

KevinEady

comment created time in 3 months

pull request commentnodejs/node-addon-api

tsfn: implement ThreadSafeFunctionEx

The implementation looks good, though AFAICT none of the tests are actually multithreaded. It would be good to have the Napi::ThreadSafeFunctions tests reproduced here to ensure that the class deals correctly with threads.

Hi @gabrielschulhof / @mhdawson / @legendecas

Since the ThreadSafeFunctionEx class can be considered the "base feature" class, I was able to make the existing ThreadSafeFunction class inherit from Ex, thus the existing tests inherently go through Ex. Does this satisfy? Please take a look... None of the public members were changed so I do not think this would affect any backwards compatibility

Well... Going through the different CI errors, messing with templates is not as easy as I imagined.

KevinEady

comment created time in 3 months

push eventKevinEady/node-addon-api

Yulong Wang

commit sha 4de23c9d6b66681390ba7d09e395390d159d308a

doc: fix support bigint64/biguint64 guards PR-URL: https://github.com/nodejs/node-addon-api/pull/705 Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com>

view details

Gabriel Schulhof

commit sha a64e8a56417d3f9c073ec2db19ccd31af453ebe0

ci: move travis from 13 to 14 (#707) Co-authored-by: Gabriel Schulhof <gabriel.schulhof@intel.com>

view details

Gabriel Schulhof

commit sha 82a96502a4637e581607b41ab777f88a73f4f683

src: change guards to NAPI_VERSION > 5 Since we have made the decision that we shall include `BigInt` into N-API 6, we can change the guards for the `BigInt` and `BigInt`-based typed array wrappers accordingly, and end our reliance on guarding by `NODE_MAJOR_VERSION`. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> PR-URL: https://github.com/nodejs/node-addon-api/pull/697 Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Gabriel Schulhof

commit sha 9c9accfbbe8c27f969d569f78758a8c47837321b

src: add support for addon instance data Support `napi_get_instance_data()` and `napi_set_instance_data()`. Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com> Fixes: https://github.com/nodejs/node-addon-api/issues/654 PR-URL: https://github.com/nodejs/node-addon-api/pull/663 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Kevin Eady

commit sha c21c2303ef92726f4019edbc16256d54873bad97

Move existing TSFN to be supported by TSFNEx

view details

Kevin Eady

commit sha 6a7b764f8af74e232ae3e30fdd1622fab6d67bc3

Merge remote-tracking branch 'upstream/master' into contexted-tsfn-api

view details

push time in 3 months

Pull request review commentnodejs/node-addon-api

tsfn: implement ThreadSafeFunctionEx

 struct ThreadSafeFinalize {   FinalizerDataType* data;   Finalizer callback; };++template <typename ContextType, typename DataType, typename CallJs, CallJs call>+typename std::enable_if<call != nullptr>::type+static inline CallJsWrapper(napi_env env, napi_value jsCallback, void *context, void *data) {+  call(env, Function(env, jsCallback), static_cast<ContextType *>(context),

Hi @mhdawson ,

Your comment might have got cut off / incomplete but I think I got you...

I do not think we need the jsCallback != nullptr check like below. The call will go into the user-defined CallJs call with an empty function, which I believe is the normal behavior of using the underlying napi tsfn calls with no callback Function but with a CallJs.

KevinEady

comment created time in 3 months

created tagpolserver/escript-antlr4

tagv0.1.0

An ANTLR4 grammar describing the Escript language used by PenUltima Online's (POLs) game server.

created time in 3 months

create barnchpolserver/escript-antlr4

branch : master

created branch time in 3 months

created repositorypolserver/escript-antlr4

An ANTLR4 grammar describing the Escript language used by PenUltima Online's (POLs) game server.

created time in 3 months

create barnchpolserver/escript-antlr4

branch : master

created branch time in 3 months

created repositorypolserver/escript-antlr4

An ANTLR4 grammar describing the Escript language used by PenUltima Online's (POLs) game server.

created time in 3 months

create barnchpolserver/escript-antlr4

branch : master

created branch time in 3 months

created repositorypolserver/escript-antlr4

An ANTLR4 grammar describing the Escript language

created time in 3 months

issue commentnodejs/node-addon-api

Call Javascript Class Instance Sub-Methods

Note that if your specific example is to "get the unix timestamp", you can use the static method Date.now:

Date.Get("now").As<Napi::Function>().Call({});
rsispal

comment created time in 3 months

issue commentnodejs/node-addon-api

Call Javascript Class Instance Sub-Methods

Hi @rsispal ,

Since Date#getTime is an instance member, you need to call it on an instance of a Date object:

1. Create instance:

Napi::Object dateInstance = Date.New({});

2. Get reference to Date#getTime

// Goes through dateInstance's property chain, eg if 
// `getTime` was "overriden" elsewhere
Napi::Function getTime = dateInstance.Get("getTime").As<Napi::Function>();

or

// Get directly from `Date.prototype`
Napi::Function getTime = Date.Get("prototype").As<Object>().Get("getTime").As<Napi::Function>();

3. Call getTime with the dateInstance as the receiver (ie, the this object):

getTime.Call(dateInstance, {}).As<Napi::Number>();

All together:

Napi::Value DateTimeNow(const CallbackInfo &info) {
  Napi::Env env = info.Env();
  Napi::Function Date = env.Global().Get("Date").As<Napi::Function>();
  Napi::Object dateInstance = Date.New({});
  Napi::Function getTime = dateInstance.Get("getTime").As<Napi::Function>();

  return getTime.Call(dateInstance, {}).As<Napi::Number>();
}

Does this help?

rsispal

comment created time in 3 months

pull request commentnodejs/node-addon-api

tsfn: implement ThreadSafeFunctionEx

Hi @gabrielschulhof , I've updated with master.

Also, I've added another test to showcase intended api some more -- threadsafe_function_ex/call.cc with no context nor finalizer. /cc @mhdawson @legendecas .

KevinEady

comment created time in 3 months

push eventKevinEady/node-addon-api

NickNaso

commit sha 6b8dd47c551d2ecc1e923cba6fbce8f3d66eea3a

Added badge section to documentation.

view details

Kelvin

commit sha 6c97913d1f44ffa334c9f3d4f36a56d7cc0e9096

Fix minor typo in object_lifetime_management.md

view details

Nicola Del Gobbo

commit sha 623e8769498f740f192e08b740a8ab3c5fa26b0c

Merge pull request #688 from NickNaso/badges Added badge section to documentation.

view details

Nicola Del Gobbo

commit sha 2c3d5df4634dec4e8c41cf251e15cd87d3aabaf8

Merge pull request #692 from kelvinhammond/patch-1 Fix minor typo in object_lifetime_management.md

view details

Gabriel Schulhof

commit sha e1a827ae295d4e426ab6c77272c3f3e87e31817c

src: fix AsyncProgressQueueWorker compilation (#696) We need to cast the `nullptr` to the templated type of the `AsyncProgressQueueWorker`. Fixes: https://github.com/nodejs/node-addon-api/issues/695 PR-URL: https://github.com/nodejs/node-addon-api/pull/696 Signed-off-by: Gabriel Schulhof <gabriel.schulhof@intel.com>

view details

Kelvin

commit sha cdb662506c001feed535d9d577f6c535826b8cf7

doc: fix typo in bigint.md (#700)

view details

Azlan Mukhtar

commit sha fedc8195e3a33e32a8a6b4f8b8285cdc6a104a44

doc: fix semicolon missing in async_worker.md PR-URL: https://github.com/nodejs/node-addon-api/pull/701 Reviewed-By: Nicola Del Gobbo <nicoladelgobbo@gmail.com> Reviewed-By: Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>

view details

Kevin Eady

commit sha 9ff352c3f3ede093ec52f527ed05495271d8ff79

add tsfn test with tsfn cb function call

view details

Kevin Eady

commit sha 6aeecd46318d65755ce1203e39bfc7e3cc639e13

Merge remote-tracking branch 'upstream/master' into contexted-tsfn-api

view details

push time in 3 months

push eventpolserver/polserver

Kevin Eady

commit sha be1e045df524021a425df7b6a079a5d8eaf52e8f

house.cpp compiles

view details

push time in 3 months

issue commentnodejs/node-addon-api

The Napi::Object class returns unstable results

Weeeird @younesZdDz , do you have some replicable test case we can see? Or something that describes the data you are passing to .Get and .Set?

younesZdDz

comment created time in 3 months

issue commentnodejs/node-addon-api

The Napi::Object class returns unstable results

Hi @younesZdDz ,

Not really sure... Are you using multiple threads? If so, parseToJsInput should only run on the main thread.

younesZdDz

comment created time in 3 months

more