Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: remove dep on later C++ feature #267

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,23 @@
# Node.js API (N-API) Package Changelog
# node-addon-api Changelog

## 2018-05-08 Version 1.3.0 (Current), @mhdawson

* [10697734da] - Use built-in N-API on Node.js >= 6.14.2 (Gabriel Schulhof)
* [75086da273] - test: add basic tests and doc for scopes (Michael Dawson) https://github.com/nodejs/node-addon-api/pull/250
* [341dbd25d5] - doc: update blurb explaining NODE_ADDON_API (Gabriel Schulhof) https://github.com/nodejs/node-addon-api/pull/251
* [cf6c93e4ee] - don't try to escape null (Michael Dawson) https://github.com/nodejs/node-addon-api/pull/245
* [15e4b35fc2] - test: fix MSVC warning C4244 in tests (Kyle Farnung) https://github.com/nodejs/node-addon-api/pull/236
* [7f3ca03b8e] - Create a doc for migration (Sampson Gao) https://github.com/nodejs/node-addon-api/pull/118
* [0a2177debe] - Fix test failures on linuxOne and AIX (Jinho Bang) https://github.com/nodejs/node-addon-api/pull/232
* [d567f4b6b5] - Added Napi::Value::IsExternal() (Eric Bickle) https://github.com/nodejs/node-addon-api/pull/227
* [1b0f0e004a] - Update node-gyp.md (Michele Campus) https://github.com/nodejs/node-addon-api/pull/226
* [faf19c4f7a] - Fixed initialization of std::string to nullptr (Eric Bickle) https://github.com/nodejs/node-addon-api/pull/228
* [9c4d321b57] - Implement data manipulation methods for dataview (Jinho Bang) https://github.com/nodejs/node-addon-api/pull/218
* [5a39fdca6f] - n-api: throw RangeError napi_create_typedarray() (Jinho Bang) https://github.com/nodejs/node-addon-api/pull/216
* [1376377202] - Make IsObject() allow functions (Jinho Bang) https://github.com/nodejs/node-addon-api/pull/217
* [673b59d319] - src: Initial implementation of DataView class (Jinho Bang) https://github.com/nodejs/node-addon-api/pull/205
* [0a899bf1c5] - doc: update indication of latest version (Michael Dawson) https://github.com/nodejs/node-addon-api/pull/211
* [17c74e5a5e] - n-api: RangeError in napi_create_dataview() (Jinho Bang) https://github.com/nodejs/node-addon-api/pull/214
* [4058a29989] - n-api: fix memory leak in napi_async_destroy() (Jinho Bang) https://github.com/nodejs/node-addon-api/pull/213


3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ values. Concepts and operations generally map to ideas specified in the
- **[Contributors](#contributors)**
- **[License](#license)**

## **Current version: 1.2.0**
## **Current version: 1.3**

(See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)

Expand Down Expand Up @@ -127,6 +127,7 @@ Take a look and get inspired by our **[test suite](https://github.com/nodejs/nod
| Hitesh Kanwathirtha | [digitalinfinity](https://github.com/digitalinfinity) |
| Jason Ginchereau | [jasongin](https://github.com/jasongin) |
| Michael Dawson | [mhdawson](https://github.com/mhdawson) |
| Nicola Del Gobbo | [NickNaso](https://github.com/NickNaso) |
| Sampson Gao | [sampsongao](https://github.com/sampsongao) |
| Taylor Woll | [boingoing](https://github.com/boingoing) |

Expand Down
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@
"Anna Henningsen (https://github.com/addaleax)",
"Arunesh Chandra (https://github.com/aruneshchandra)",
"Benjamin Byholm (https://github.com/kkoopa)",
"Cory Mickelson (https://github.com/corymickelson)",
"David Halls (https://github.com/davedoesdev)",
"Eric Bickle (https://github.com/ebickle)",
"Gabriel Schulhof (https://github.com/gabrielschulhof)",
"Hitesh Kanwathirtha (https://github.com/digitalinfinity)",
"Jason Ginchereau (https://github.com/jasongin)",
"Jim Schlight (https://github.com/jschlight)",
"Jinho Bang (https://github.com/romandev)",
"Konstantin Tarkus (https://github.com/koistya)",
"Kyle Farnung (https://github.com/kfarnung)",
"Matteo Collina (https://github.com/mcollina)",
"Michael Dawson (https://github.com/mhdawson)",
"Michele Campus (https://github.com/kYroL01)",
"Nicola Del Gobbo (https://github.com/NickNaso)",
"Rolf Timmermans (https://github.com/rolftimmermans)",
"Sampson Gao (https://github.com/sampsongao)",
Expand All @@ -43,5 +47,5 @@
"test": "node test",
"doc": "doxygen doc/Doxyfile"
},
"version": "1.2.0"
"version": "1.3.0"
}
6 changes: 5 additions & 1 deletion test/handlescope.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#include "napi.h"
#include "string.h"
#include <stdio.h>
#include <stdlib.h>

using namespace Napi;

Expand All @@ -25,7 +27,9 @@ Value stressEscapeFromScope(const CallbackInfo& info) {
Value result;
for (int i = 0; i < LOOP_MAX; i++) {
EscapableHandleScope scope(info.Env());
std::string name = std::string("inner-scope") + std::to_string(i);
char buffer[128];
snprintf(buffer, 128, "%d", i);
std::string name = std::string("inner-scope") + std::string(buffer);
Value newValue = String::New(info.Env(), name.c_str());
if (i == (LOOP_MAX -1)) {
result = scope.Escape(newValue);
Expand Down