Skip to content

Commit 6aeecd4

Browse files
committed
Merge remote-tracking branch 'upstream/master' into contexted-tsfn-api
2 parents 9ff352c + fedc819 commit 6aeecd4

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ to ideas specified in the **ECMA262 Language Specification**.
4242
- **[Examples](#examples)**
4343
- **[Tests](#tests)**
4444
- **[More resource and info about native Addons](#resources)**
45+
- **[Badges](#badges)**
4546
- **[Code of Conduct](CODE_OF_CONDUCT.md)**
4647
- **[Contributors](#contributors)**
4748
- **[License](#license)**
@@ -185,6 +186,24 @@ such packages with `node-addon-api` to provide more visibility to the community.
185186

186187
Quick links to NPM searches: [keywords:node-addon-api](https://www.npmjs.com/search?q=keywords%3Anode-addon-api).
187188

189+
<a name="badges"></a>
190+
191+
### **Badges**
192+
193+
The use of badges is recommended to indicate the minimum version of N-API
194+
required for the module. This helps to determine which Node.js major versions are
195+
supported. Addon maintainers can consult the [N-API support matrix][] to determine
196+
which Node.js versions provide a given N-API version. The following badges are
197+
available:
198+
199+
![N-API v1 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/N-API%20v1%20Badge.svg)
200+
![N-API v2 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/N-API%20v2%20Badge.svg)
201+
![N-API v3 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/N-API%20v3%20Badge.svg)
202+
![N-API v4 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/N-API%20v4%20Badge.svg)
203+
![N-API v5 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/N-API%20v5%20Badge.svg)
204+
![N-API v6 Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/N-API%20v6%20Badge.svg)
205+
![N-API Experimental Version Badge](https://github.com/nodejs/abi-stable-node/blob/doc/assets/N-API%20Experimental%20Version%20Badge.svg)
206+
188207
## **Contributing**
189208

190209
We love contributions from the community to **node-addon-api**!
@@ -220,3 +239,4 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on our philosophy around
220239
Licensed under [MIT](./LICENSE.md)
221240

222241
[ABI stability guide]: https://nodejs.org/en/docs/guides/abi-stability/
242+
[N-API support matrix]: https://nodejs.org/dist/latest/docs/api/n-api.html#n_api_n_api_version_matrix

doc/async_worker_variants.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ class EchoWorker : public AsyncProgressQueueWorker<uint32_t> {
399399
void Execute(const ExecutionProgress& progress) {
400400
// Need to simulate cpu heavy task
401401
for (uint32_t i = 0; i < 100; ++i) {
402-
progress.Send(&i, 1)
402+
progress.Send(&i, 1);
403403
std::this_thread::sleep_for(std::chrono::seconds(1));
404404
}
405405
}

doc/bigint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Returns a new empty JavaScript `Napi::BigInt`.
4848
### Int64Value
4949

5050
```cpp
51-
int64_t Napi::BitInt::Int64Value(bool* lossless) const;
51+
int64_t Napi::BigInt::Int64Value(bool* lossless) const;
5252
```
5353
5454
- `[out] lossless`: Indicates whether the `BigInt` value was converted losslessly.

doc/object_lifetime_management.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ for (int i = 0; i < LOOP_MAX; i++) {
6969
Napi::HandleScope scope(info.Env());
7070
std::string name = std::string("inner-scope") + std::to_string(i);
7171
Napi::Value newValue = Napi::String::New(info.Env(), name.c_str());
72-
// do something with neValue
72+
// do something with newValue
7373
};
7474
```
7575

napi-inl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4972,7 +4972,7 @@ inline void AsyncProgressWorker<T>::SendProgress_(const T* data, size_t count) {
49724972

49734973
template<class T>
49744974
inline void AsyncProgressWorker<T>::Signal() const {
4975-
this->NonBlockingCall(nullptr);
4975+
this->NonBlockingCall(static_cast<T*>(nullptr));
49764976
}
49774977

49784978
template<class T>

0 commit comments

Comments
 (0)