Uh oh!
There was an error while loading. Please reload this page.
n-api: implement date object - #25917
Conversation
jarrodconnolly
commented
Feb 4, 2019
I am working on adding |
4507aa5 to
cb37fcbCompareUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
I’m not sure if we follow a convention for these names in the N-API tests, but elsewhere in the code this would be either create_date or CreateDate :)
There was a problem hiding this comment.
I was torn on this one as I saw a mix of case usage for the function names in the tests.
static napi_value createError(napi_env env, napi_callback_info info) {
static napi_value createPromise(napi_env env, napi_callback_info info) {
static napi_value CreateTypedArray(napi_env env, napi_callback_info info) {
static napi_value CreateDataView(napi_env env, napi_callback_info info) {
There was a problem hiding this comment.
I don't think we have any different convention for N-API.
There was a problem hiding this comment.
Yeah, it’s not like it matters much – the latter style would be more consistent with the rest of core, that’s all.
addaleax
commented
Feb 6, 2019
Uh oh!
There was an error while loading. Please reload this page.
mhdawson
left a comment
There was a problem hiding this comment.
@jarrodconnolly thanks for the PR. Left a couple of small comments.
Uh oh!
There was an error while loading. Please reload this page.
addaleax
commented
Feb 9, 2019
cjihrig
left a comment
There was a problem hiding this comment.
LGTM with a few tiny nits.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Implements `napi_create_date()` as well as `napi_is_date()` to allow working with JavaScript Date objects.
Add the `napi_get_date_value` method to get the original time value from the Date object.
76d14ff to
c21826fComparejarrodconnolly
commented
Feb 14, 2019
All changes are complete for this PR including requested changes from the reviews. I may try a PR at a later date to address the function naming convention across the n-api tests to see if there is interest in standardizing those with the rest of the coding standards. |
jarrodconnolly
commented
Feb 17, 2019
@addaleax Can I get a CI run on this now that the changes are all complete and maybe an |
vsemozhetbyt
commented
Feb 17, 2019
jarrodconnolly
commented
Feb 18, 2019
Thanks for the CI run @vsemozhetbyt looks like it might be an unrelated failure. The smartos17-64 tests timed out after an exception. |
addaleax
commented
Feb 18, 2019
danbev
commented
Feb 20, 2019
Should this be land in a single commit or in two? |
jarrodconnolly
commented
Feb 20, 2019
I believe it should be a single commit. I am guessing you are referring to the second commit which adds the Those are just my thoughts, others may have opinions on the regular procedure though. |
Just pinging to see if it would be possible to land this PR. My first and I am looking to complete the cycle once before moving on to future PRs. |
mhdawson
commented
Feb 26, 2019
@jarrodconnolly at this point the CI is locked down due to the security release. If we don't land in the next few days after that release goes out please remind us and I'll try to get it landed. |
cjihrig
commented
Feb 26, 2019
FWIW, the last CI run was green, so this should be able to land anytime. |
mhdawson
commented
Feb 28, 2019
Lite CI since its low overhead just to double check nothing changed since the last CI https://ci.nodejs.org/job/node-test-pull-request-lite-pipeline/2720/ |
mhdawson
commented
Feb 28, 2019
Lite CI good |
Implements `napi_create_date()` as well as `napi_is_date()` to allow working with JavaScript Date objects. PR-URL: #25917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Implements `napi_create_date()` as well as `napi_is_date()` to allow working with JavaScript Date objects. PR-URL: #25917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Notable Changes * n-api: * Implement date object (Jarrod Connolly) #25917 * util: * Add compact depth mode for `util.inspect()` (Ruben Bridgewater) #26269 * worker: * Improve integration with native addons (Anna Henningsen) #26175 * MessagePort.prototype.onmessage takes arguments closer to the Web specification now (Anna Henningsen) #26082
Notable Changes * n-api: * Implement date object (Jarrod Connolly) nodejs#25917 * util: * Add compact depth mode for `util.inspect()` (Ruben Bridgewater) nodejs#26269 * worker: * Improve integration with native addons (Anna Henningsen) nodejs#26175 * MessagePort.prototype.onmessage takes arguments closer to the Web specification now (Anna Henningsen) nodejs#26082
Implements `napi_create_date()` as well as `napi_is_date()` to allow working with JavaScript Date objects. PR-URL: nodejs#25917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Implements `napi_create_date()` as well as `napi_is_date()` to allow working with JavaScript Date objects. PR-URL: nodejs#25917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Implements `napi_create_date()` as well as `napi_is_date()` to allow working with JavaScript Date objects. Backport-PR-URL: #28298 PR-URL: #25917 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Notable changes: * crypto: * add support for chacha20-poly1305 for AEAD (chux0519) #24081 * increase maxmem range from 32 to 53 bits (Tobias Nießen) #28799 * deps: * update npm to 6.11.3 (claudiahdz) #29430 * upgrade openssl sources to 1.1.1d (Sam Roberts) #29921 * dns: * remove dns.promises experimental warning (cjihrig) #26592 * fs: * remove experimental warning for fs.promises (Anna Henningsen) #26581 * http: * makes response.writeHead return the response (Mark S. Everitt) #25974 * http2: * makes response.writeHead return the response (Mark S. Everitt) #25974 * n-api: * make func argument of napi\_create\_threadsafe\_function optional (legendecas) #27791 * mark version 5 N-APIs as stable (Gabriel Schulhof) #29401 * implement date object (Jarrod Connolly) #25917 * process: * add --unhandled-rejections flag (Ruben Bridgewater) #26599 * stream: * implement Readable.from async iterator utility (Guy Bedford) #27660 * make Symbol.asyncIterator support stable (Matteo Collina) #26989 PR-URL: #29875
Notable changes: * crypto: * add support for chacha20-poly1305 for AEAD (chux0519) #24081 * increase maxmem range from 32 to 53 bits (Tobias Nießen) #28799 * deps: * update npm to 6.11.3 (claudiahdz) #29430 * upgrade openssl sources to 1.1.1d (Sam Roberts) #29921 * dns: * remove dns.promises experimental warning (cjihrig) #26592 * fs: * remove experimental warning for fs.promises (Anna Henningsen) #26581 * http: * makes response.writeHead return the response (Mark S. Everitt) #25974 * http2: * makes response.writeHead return the response (Mark S. Everitt) #25974 * n-api: * make func argument of napi\_create\_threadsafe\_function optional (legendecas) #27791 * mark version 5 N-APIs as stable (Gabriel Schulhof) #29401 * implement date object (Jarrod Connolly) #25917 * process: * add --unhandled-rejections flag (Ruben Bridgewater) #26599 * stream: * implement Readable.from async iterator utility (Guy Bedford) #27660 * make Symbol.asyncIterator support stable (Matteo Collina) #26989 PR-URL: #29875
Implements
napi_create_date()as well asnapi_is_date()toallow working with JavaScript Date objects.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes