Uh oh!
There was an error while loading. Please reload this page.
make node-addon-api examples context-sensistive - #139
Conversation
This removes global static references from the examples, so that they might work with worker threads.
gabrielschulhof
commented
Jun 2, 2020
Looks like Travis doesn't yet have a version of Node.js 12.x that ships with N-API 6. |
gengjiawen
commented
Jun 3, 2020
Maybe limit version like this node-addon-examples/thread_safe_function_round_trip/napi/package.json Lines 10 to 13 in b024ee9 Also github action looks like not using latest Node.js 12 yet |
I give it more test, should constsemver=require('semver')constassert=require('assert').strictconstrule='~10 >=10.20 || >=12.17 'assert.equal(false,semver.satisfies('10.19.0',rule))assert.ok(semver.satisfies('10.20.0',rule))assert.equal(false,semver.satisfies('12.16.0',rule))assert.ok(semver.satisfies('12.19.0',rule)) |
c3cbab0 to
74158c7Compare74158c7 to
f0d91a0Comparegabrielschulhof
commented
Jun 8, 2020
@nodejs/n-api it looks like it's not Travis that has old versions of Node.js but GitHub actions. Thus, with the "engines" change proposed by @gengjiawen the examples are actually only run on Travis so we have some testing there. |
gabrielschulhof
commented
Jun 8, 2020
It looks like github by default doesn't grab the latest available version of Node.js if one specifies "10.x" or "12.x", but will grab the latest version if one specifies it exactly (I used "10.21.0" and "12.18.0"). |
gabrielschulhof
commented
Jun 9, 2020
So, now the examples are run on both Travis and GitHub actions. |
This removes global static references from the examples, so that they
might work with worker threads.