@basemaps/lambda-tiler 6.38.0 → 6.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/build/routes/__tests__/tile.style.json.test.js +91 -43
  3. package/build/routes/__tests__/tile.style.json.test.js.map +1 -1
  4. package/build/routes/tile.style.json.d.ts +2 -2
  5. package/build/routes/tile.style.json.d.ts.map +1 -1
  6. package/build/routes/tile.style.json.js +5 -3
  7. package/build/routes/tile.style.json.js.map +1 -1
  8. package/build/routes/tile.xyz.raster.js +4 -5
  9. package/build/routes/tile.xyz.raster.js.map +1 -1
  10. package/dist/index.js +35 -35
  11. package/dist/node_modules/.package-lock.json +7 -7
  12. package/dist/node_modules/node-abi/.circleci/config.yml +5 -23
  13. package/dist/node_modules/node-abi/CONTRIBUTING.md +1 -1
  14. package/dist/node_modules/node-abi/abi_registry.json +7 -0
  15. package/dist/node_modules/node-abi/package.json +2 -3
  16. package/dist/node_modules/node-addon-api/README.md +36 -12
  17. package/dist/node_modules/node-addon-api/index.js +3 -3
  18. package/dist/node_modules/node-addon-api/napi-inl.deprecated.h +121 -127
  19. package/dist/node_modules/node-addon-api/napi-inl.h +1166 -1122
  20. package/dist/node_modules/node-addon-api/napi.h +2786 -2675
  21. package/dist/node_modules/node-addon-api/package.json +42 -1
  22. package/dist/node_modules/node-addon-api/tools/check-napi.js +13 -14
  23. package/dist/node_modules/node-addon-api/tools/conversion.js +161 -169
  24. package/dist/node_modules/node-addon-api/tools/eslint-format.js +9 -1
  25. package/dist/package-lock.json +14 -14
  26. package/dist/package.json +1 -1
  27. package/package.json +4 -4
  28. package/src/routes/__tests__/tile.style.json.test.ts +100 -44
  29. package/src/routes/tile.style.json.ts +11 -4
  30. package/src/routes/tile.xyz.raster.ts +6 -6
  31. package/tsconfig.tsbuildinfo +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@basemaps/lambda-tiler",
3
- "version": "6.38.0",
3
+ "version": "6.39.0",
4
4
  "lockfileVersion": 2,
5
5
  "requires": true,
6
6
  "packages": {
@@ -229,9 +229,9 @@
229
229
  "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg=="
230
230
  },
231
231
  "node_modules/node-abi": {
232
- "version": "3.30.0",
233
- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.30.0.tgz",
234
- "integrity": "sha512-qWO5l3SCqbwQavymOmtTVuCWZE23++S+rxyoHjXqUmPyzRcaoI4lA2gO55/drddGnedAyjA7sk76SfQ5lfUMnw==",
232
+ "version": "3.31.0",
233
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.31.0.tgz",
234
+ "integrity": "sha512-eSKV6s+APenqVh8ubJyiu/YhZgxQpGP66ntzUb3lY1xB9ukSRaGnx0AIxI+IM+1+IVYC1oWobgG5L3Lt9ARykQ==",
235
235
  "dependencies": {
236
236
  "semver": "^7.3.5"
237
237
  },
@@ -240,9 +240,9 @@
240
240
  }
241
241
  },
242
242
  "node_modules/node-addon-api": {
243
- "version": "5.0.0",
244
- "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.0.0.tgz",
245
- "integrity": "sha512-CvkDw2OEnme7ybCykJpVcKH+uAOLV2qLqiyla128dN9TkEWfrYmxG6C2boDe5KcNQqZF3orkqzGgOMvZ/JNekA=="
243
+ "version": "5.1.0",
244
+ "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz",
245
+ "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA=="
246
246
  },
247
247
  "node_modules/once": {
248
248
  "version": "1.4.0",
@@ -16,15 +16,9 @@ steps-test: &steps-test
16
16
  - run: yarn test
17
17
 
18
18
  version: 2.1
19
+ orbs:
20
+ cfa: continuousauth/npm@1.0.2
19
21
  jobs:
20
- test-linux-10:
21
- docker:
22
- - image: circleci/node:10
23
- <<: *steps-test
24
- test-linux-12:
25
- docker:
26
- - image: circleci/node:12
27
- <<: *steps-test
28
22
  test-linux-14:
29
23
  docker:
30
24
  - image: circleci/node:14
@@ -34,30 +28,18 @@ jobs:
34
28
  - image: circleci/node:16
35
29
  <<: *steps-test
36
30
 
37
- release:
38
- docker:
39
- - image: circleci/node:14.15
40
- steps:
41
- - checkout
42
- - *step-restore-cache
43
- - run: yarn --frozen-lockfile
44
- - run: npx semantic-release@17.4.5
45
31
  workflows:
46
- version: 2
47
32
  test_and_release:
48
33
  # Run test jobs first, release only when all the test jobs are successful
49
34
  jobs:
50
- - test-linux-10
51
- - test-linux-12
52
35
  - test-linux-14
53
36
  - test-linux-16
54
- - release:
37
+ - cfa/release:
55
38
  requires:
56
- - test-linux-10
57
- - test-linux-12
58
39
  - test-linux-14
59
40
  - test-linux-16
60
41
  filters:
61
42
  branches:
62
43
  only:
63
- - main
44
+ - main
45
+ context: cfa-release
@@ -4,7 +4,7 @@
4
4
 
5
5
  ## Commit Message Guidelines
6
6
 
7
- This module uses [`semantic-release`](https://github.com/semantic-release/semantic-release) to automatically release new versions via Travis.
7
+ This module uses [`semantic-release`](https://github.com/semantic-release/semantic-release) to automatically release new versions via [Continuous Auth](https://continuousauth.dev/).
8
8
  Therefor we have very precise rules over how our git commit messages can be formatted.
9
9
 
10
10
  Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
@@ -227,5 +227,12 @@
227
227
  "lts": false,
228
228
  "runtime": "electron",
229
229
  "target": "22.0.0-alpha.1"
230
+ },
231
+ {
232
+ "abi": "113",
233
+ "future": true,
234
+ "lts": false,
235
+ "runtime": "electron",
236
+ "target": "23.0.0-alpha.1"
230
237
  }
231
238
  ]
@@ -1,10 +1,9 @@
1
1
  {
2
2
  "name": "node-abi",
3
- "version": "3.30.0",
3
+ "version": "3.31.0",
4
4
  "description": "Get the Node ABI for a given target and runtime, and vice versa.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "semantic-release": "semantic-release",
8
7
  "test": "tape test/index.js",
9
8
  "update-abi-registry": "node --unhandled-rejections=strict scripts/update-abi-registry.js"
10
9
  },
@@ -26,7 +25,7 @@
26
25
  },
27
26
  "homepage": "https://github.com/lgeiger/node-abi#readme",
28
27
  "devDependencies": {
29
- "@continuous-auth/semantic-release-npm": "^2.0.0",
28
+ "@continuous-auth/semantic-release-npm": "^3.0.0",
30
29
  "got": "^11.8.2",
31
30
  "tape": "^5.3.1"
32
31
  },
@@ -16,15 +16,15 @@ provided by Node.js when using C++. It provides a C++ object model
16
16
  and exception handling semantics with low overhead.
17
17
 
18
18
  There are three options for implementing addons: Node-API, nan, or direct
19
- use of internal V8, libuv and Node.js libraries. Unless there is a need for
20
- direct access to functionality which is not exposed by Node-API as outlined
19
+ use of internal V8, libuv, and Node.js libraries. Unless there is a need for
20
+ direct access to functionality that is not exposed by Node-API as outlined
21
21
  in [C/C++ addons](https://nodejs.org/dist/latest/docs/api/addons.html)
22
22
  in Node.js core, use Node-API. Refer to
23
23
  [C/C++ addons with Node-API](https://nodejs.org/dist/latest/docs/api/n-api.html)
24
24
  for more information on Node-API.
25
25
 
26
26
  Node-API is an ABI stable C interface provided by Node.js for building native
27
- addons. It is independent from the underlying JavaScript runtime (e.g. V8 or ChakraCore)
27
+ addons. It is independent of the underlying JavaScript runtime (e.g. V8 or ChakraCore)
28
28
  and is maintained as part of Node.js itself. It is intended to insulate
29
29
  native addons from changes in the underlying JavaScript engine and allow
30
30
  modules compiled for one version to run on later versions of Node.js without
@@ -46,7 +46,7 @@ provides an [ABI stability guide][] containing a detailed explanation of ABI
46
46
  stability in general, and the Node-API ABI stability guarantee in particular.
47
47
 
48
48
  As new APIs are added to Node-API, node-addon-api must be updated to provide
49
- wrappers for those new APIs. For this reason node-addon-api provides
49
+ wrappers for those new APIs. For this reason, node-addon-api provides
50
50
  methods that allow callers to obtain the underlying Node-API handles so
51
51
  direct calls to Node-API and the use of the objects/methods provided by
52
52
  node-addon-api can be used together. For example, in order to be able
@@ -56,7 +56,7 @@ APIs exposed by node-addon-api are generally used to create and
56
56
  manipulate JavaScript values. Concepts and operations generally map
57
57
  to ideas specified in the **ECMA262 Language Specification**.
58
58
 
59
- The [Node-API Resource](https://nodejs.github.io/node-addon-examples/) offers an
59
+ The [Node-API Resource](https://nodejs.github.io/node-addon-examples/) offers an
60
60
  excellent orientation and tips for developers just getting started with Node-API
61
61
  and node-addon-api.
62
62
 
@@ -70,7 +70,7 @@ and node-addon-api.
70
70
  - **[Contributors](#contributors)**
71
71
  - **[License](#license)**
72
72
 
73
- ## **Current version: 5.0.0**
73
+ ## **Current version: 5.1.0**
74
74
 
75
75
  (See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)
76
76
 
@@ -187,6 +187,28 @@ npm test --NAPI_VERSION=X
187
187
 
188
188
  where X is the version of Node-API you want to target.
189
189
 
190
+ To run a specific unit test, filter conditions are available
191
+
192
+ **Example:**
193
+ compile and run only tests on objectwrap.cc and objectwrap.js
194
+ ```
195
+ npm run unit --filter=objectwrap
196
+ ```
197
+
198
+ Multiple unit tests cane be selected with wildcards
199
+
200
+ **Example:**
201
+ compile and run all test files ending with "reference" -> function_reference.cc, object_reference.cc, reference.cc
202
+ ```
203
+ npm run unit --filter=*reference
204
+ ```
205
+
206
+ Multiple filter conditions can be joined to broaden the test selection
207
+
208
+ **Example:**
209
+ compile and run all tests under folders threadsafe_function and typed_threadsafe_function and also the objectwrap.cc file
210
+ npm run unit --filter='*function objectwrap'
211
+
190
212
  ### **Debug**
191
213
 
192
214
  To run the **node-addon-api** tests with `--debug` option:
@@ -195,7 +217,7 @@ To run the **node-addon-api** tests with `--debug` option:
195
217
  npm run-script dev
196
218
  ```
197
219
 
198
- If you want faster build, you might use the following option:
220
+ If you want a faster build, you might use the following option:
199
221
 
200
222
  ```
201
223
  npm run-script dev:incremental
@@ -223,7 +245,7 @@ See [benchmark/README.md](benchmark/README.md) for more details about running an
223
245
 
224
246
  As node-addon-api's core mission is to expose the plain C Node-API as C++
225
247
  wrappers, tools that facilitate n-api/node-addon-api providing more
226
- convenient patterns on developing a Node.js add-ons with n-api/node-addon-api
248
+ convenient patterns for developing a Node.js add-on with n-api/node-addon-api
227
249
  can be published to NPM as standalone packages. It is also recommended to tag
228
250
  such packages with `node-addon-api` to provide more visibility to the community.
229
251
 
@@ -269,19 +291,21 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for more details on our philosophy around
269
291
  | ------------------- | ----------------------------------------------------- |
270
292
  | Anna Henningsen | [addaleax](https://github.com/addaleax) |
271
293
  | Chengzhong Wu | [legendecas](https://github.com/legendecas) |
272
- | Gabriel Schulhof | [gabrielschulhof](https://github.com/gabrielschulhof) |
273
- | Jim Schlight | [jschlight](https://github.com/jschlight) |
294
+ | Jack Xia | [JckXia](https://github.com/JckXia) |
295
+ | Kevin Eady | [KevinEady](https://github.com/KevinEady) |
274
296
  | Michael Dawson | [mhdawson](https://github.com/mhdawson) |
275
- | Kevin Eady | [KevinEady](https://github.com/KevinEady)
276
297
  | Nicola Del Gobbo | [NickNaso](https://github.com/NickNaso) |
298
+ | Vladimir Morozov | [vmoroz](https://github.com/vmoroz) |
277
299
 
278
300
  ### Emeritus
279
301
  | Name | GitHub Link |
280
302
  | ------------------- | ----------------------------------------------------- |
281
303
  | Arunesh Chandra | [aruneshchandra](https://github.com/aruneshchandra) |
282
304
  | Benjamin Byholm | [kkoopa](https://github.com/kkoopa) |
283
- | Jason Ginchereau | [jasongin](https://github.com/jasongin) |
305
+ | Gabriel Schulhof | [gabrielschulhof](https://github.com/gabrielschulhof) |
284
306
  | Hitesh Kanwathirtha | [digitalinfinity](https://github.com/digitalinfinity) |
307
+ | Jason Ginchereau | [jasongin](https://github.com/jasongin) |
308
+ | Jim Schlight | [jschlight](https://github.com/jschlight) |
285
309
  | Sampson Gao | [sampsongao](https://github.com/sampsongao) |
286
310
  | Taylor Woll | [boingoing](https://github.com/boingoing) |
287
311
 
@@ -1,11 +1,11 @@
1
1
  const path = require('path');
2
2
 
3
- const include_dir = path.relative('.', __dirname);
3
+ const includeDir = path.relative('.', __dirname);
4
4
 
5
5
  module.exports = {
6
6
  include: `"${__dirname}"`, // deprecated, can be removed as part of 4.0.0
7
- include_dir,
8
- gyp: path.join(include_dir, 'node_api.gyp:nothing'),
7
+ include_dir: includeDir,
8
+ gyp: path.join(includeDir, 'node_api.gyp:nothing'),
9
9
  isNodeApiBuiltin: true,
10
10
  needsFlag: false
11
11
  };
@@ -6,187 +6,181 @@
6
6
  ////////////////////////////////////////////////////////////////////////////////
7
7
 
8
8
  template <typename Getter>
9
- inline PropertyDescriptor
10
- PropertyDescriptor::Accessor(const char* utf8name,
11
- Getter getter,
12
- napi_property_attributes attributes,
13
- void* /*data*/) {
9
+ inline PropertyDescriptor PropertyDescriptor::Accessor(
10
+ const char* utf8name,
11
+ Getter getter,
12
+ napi_property_attributes attributes,
13
+ void* /*data*/) {
14
14
  using CbData = details::CallbackData<Getter, Napi::Value>;
15
15
  // TODO: Delete when the function is destroyed
16
- auto callbackData = new CbData({ getter, nullptr });
17
-
18
- return PropertyDescriptor({
19
- utf8name,
20
- nullptr,
21
- nullptr,
22
- CbData::Wrapper,
23
- nullptr,
24
- nullptr,
25
- attributes,
26
- callbackData
27
- });
16
+ auto callbackData = new CbData({getter, nullptr});
17
+
18
+ return PropertyDescriptor({utf8name,
19
+ nullptr,
20
+ nullptr,
21
+ CbData::Wrapper,
22
+ nullptr,
23
+ nullptr,
24
+ attributes,
25
+ callbackData});
28
26
  }
29
27
 
30
28
  template <typename Getter>
31
- inline PropertyDescriptor PropertyDescriptor::Accessor(const std::string& utf8name,
32
- Getter getter,
33
- napi_property_attributes attributes,
34
- void* data) {
29
+ inline PropertyDescriptor PropertyDescriptor::Accessor(
30
+ const std::string& utf8name,
31
+ Getter getter,
32
+ napi_property_attributes attributes,
33
+ void* data) {
35
34
  return Accessor(utf8name.c_str(), getter, attributes, data);
36
35
  }
37
36
 
38
37
  template <typename Getter>
39
- inline PropertyDescriptor PropertyDescriptor::Accessor(napi_value name,
40
- Getter getter,
41
- napi_property_attributes attributes,
42
- void* /*data*/) {
38
+ inline PropertyDescriptor PropertyDescriptor::Accessor(
39
+ napi_value name,
40
+ Getter getter,
41
+ napi_property_attributes attributes,
42
+ void* /*data*/) {
43
43
  using CbData = details::CallbackData<Getter, Napi::Value>;
44
44
  // TODO: Delete when the function is destroyed
45
- auto callbackData = new CbData({ getter, nullptr });
46
-
47
- return PropertyDescriptor({
48
- nullptr,
49
- name,
50
- nullptr,
51
- CbData::Wrapper,
52
- nullptr,
53
- nullptr,
54
- attributes,
55
- callbackData
56
- });
45
+ auto callbackData = new CbData({getter, nullptr});
46
+
47
+ return PropertyDescriptor({nullptr,
48
+ name,
49
+ nullptr,
50
+ CbData::Wrapper,
51
+ nullptr,
52
+ nullptr,
53
+ attributes,
54
+ callbackData});
57
55
  }
58
56
 
59
57
  template <typename Getter>
60
- inline PropertyDescriptor PropertyDescriptor::Accessor(Name name,
61
- Getter getter,
62
- napi_property_attributes attributes,
63
- void* data) {
58
+ inline PropertyDescriptor PropertyDescriptor::Accessor(
59
+ Name name, Getter getter, napi_property_attributes attributes, void* data) {
64
60
  napi_value nameValue = name;
65
61
  return PropertyDescriptor::Accessor(nameValue, getter, attributes, data);
66
62
  }
67
63
 
68
64
  template <typename Getter, typename Setter>
69
- inline PropertyDescriptor PropertyDescriptor::Accessor(const char* utf8name,
70
- Getter getter,
71
- Setter setter,
72
- napi_property_attributes attributes,
73
- void* /*data*/) {
65
+ inline PropertyDescriptor PropertyDescriptor::Accessor(
66
+ const char* utf8name,
67
+ Getter getter,
68
+ Setter setter,
69
+ napi_property_attributes attributes,
70
+ void* /*data*/) {
74
71
  using CbData = details::AccessorCallbackData<Getter, Setter>;
75
72
  // TODO: Delete when the function is destroyed
76
- auto callbackData = new CbData({ getter, setter, nullptr });
77
-
78
- return PropertyDescriptor({
79
- utf8name,
80
- nullptr,
81
- nullptr,
82
- CbData::GetterWrapper,
83
- CbData::SetterWrapper,
84
- nullptr,
85
- attributes,
86
- callbackData
87
- });
73
+ auto callbackData = new CbData({getter, setter, nullptr});
74
+
75
+ return PropertyDescriptor({utf8name,
76
+ nullptr,
77
+ nullptr,
78
+ CbData::GetterWrapper,
79
+ CbData::SetterWrapper,
80
+ nullptr,
81
+ attributes,
82
+ callbackData});
88
83
  }
89
84
 
90
85
  template <typename Getter, typename Setter>
91
- inline PropertyDescriptor PropertyDescriptor::Accessor(const std::string& utf8name,
92
- Getter getter,
93
- Setter setter,
94
- napi_property_attributes attributes,
95
- void* data) {
86
+ inline PropertyDescriptor PropertyDescriptor::Accessor(
87
+ const std::string& utf8name,
88
+ Getter getter,
89
+ Setter setter,
90
+ napi_property_attributes attributes,
91
+ void* data) {
96
92
  return Accessor(utf8name.c_str(), getter, setter, attributes, data);
97
93
  }
98
94
 
99
95
  template <typename Getter, typename Setter>
100
- inline PropertyDescriptor PropertyDescriptor::Accessor(napi_value name,
101
- Getter getter,
102
- Setter setter,
103
- napi_property_attributes attributes,
104
- void* /*data*/) {
96
+ inline PropertyDescriptor PropertyDescriptor::Accessor(
97
+ napi_value name,
98
+ Getter getter,
99
+ Setter setter,
100
+ napi_property_attributes attributes,
101
+ void* /*data*/) {
105
102
  using CbData = details::AccessorCallbackData<Getter, Setter>;
106
103
  // TODO: Delete when the function is destroyed
107
- auto callbackData = new CbData({ getter, setter, nullptr });
108
-
109
- return PropertyDescriptor({
110
- nullptr,
111
- name,
112
- nullptr,
113
- CbData::GetterWrapper,
114
- CbData::SetterWrapper,
115
- nullptr,
116
- attributes,
117
- callbackData
118
- });
104
+ auto callbackData = new CbData({getter, setter, nullptr});
105
+
106
+ return PropertyDescriptor({nullptr,
107
+ name,
108
+ nullptr,
109
+ CbData::GetterWrapper,
110
+ CbData::SetterWrapper,
111
+ nullptr,
112
+ attributes,
113
+ callbackData});
119
114
  }
120
115
 
121
116
  template <typename Getter, typename Setter>
122
- inline PropertyDescriptor PropertyDescriptor::Accessor(Name name,
123
- Getter getter,
124
- Setter setter,
125
- napi_property_attributes attributes,
126
- void* data) {
117
+ inline PropertyDescriptor PropertyDescriptor::Accessor(
118
+ Name name,
119
+ Getter getter,
120
+ Setter setter,
121
+ napi_property_attributes attributes,
122
+ void* data) {
127
123
  napi_value nameValue = name;
128
- return PropertyDescriptor::Accessor(nameValue, getter, setter, attributes, data);
124
+ return PropertyDescriptor::Accessor(
125
+ nameValue, getter, setter, attributes, data);
129
126
  }
130
127
 
131
128
  template <typename Callable>
132
- inline PropertyDescriptor PropertyDescriptor::Function(const char* utf8name,
133
- Callable cb,
134
- napi_property_attributes attributes,
135
- void* /*data*/) {
129
+ inline PropertyDescriptor PropertyDescriptor::Function(
130
+ const char* utf8name,
131
+ Callable cb,
132
+ napi_property_attributes attributes,
133
+ void* /*data*/) {
136
134
  using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr)));
137
135
  using CbData = details::CallbackData<Callable, ReturnType>;
138
136
  // TODO: Delete when the function is destroyed
139
- auto callbackData = new CbData({ cb, nullptr });
140
-
141
- return PropertyDescriptor({
142
- utf8name,
143
- nullptr,
144
- CbData::Wrapper,
145
- nullptr,
146
- nullptr,
147
- nullptr,
148
- attributes,
149
- callbackData
150
- });
137
+ auto callbackData = new CbData({cb, nullptr});
138
+
139
+ return PropertyDescriptor({utf8name,
140
+ nullptr,
141
+ CbData::Wrapper,
142
+ nullptr,
143
+ nullptr,
144
+ nullptr,
145
+ attributes,
146
+ callbackData});
151
147
  }
152
148
 
153
149
  template <typename Callable>
154
- inline PropertyDescriptor PropertyDescriptor::Function(const std::string& utf8name,
155
- Callable cb,
156
- napi_property_attributes attributes,
157
- void* data) {
150
+ inline PropertyDescriptor PropertyDescriptor::Function(
151
+ const std::string& utf8name,
152
+ Callable cb,
153
+ napi_property_attributes attributes,
154
+ void* data) {
158
155
  return Function(utf8name.c_str(), cb, attributes, data);
159
156
  }
160
157
 
161
158
  template <typename Callable>
162
- inline PropertyDescriptor PropertyDescriptor::Function(napi_value name,
163
- Callable cb,
164
- napi_property_attributes attributes,
165
- void* /*data*/) {
159
+ inline PropertyDescriptor PropertyDescriptor::Function(
160
+ napi_value name,
161
+ Callable cb,
162
+ napi_property_attributes attributes,
163
+ void* /*data*/) {
166
164
  using ReturnType = decltype(cb(CallbackInfo(nullptr, nullptr)));
167
165
  using CbData = details::CallbackData<Callable, ReturnType>;
168
166
  // TODO: Delete when the function is destroyed
169
- auto callbackData = new CbData({ cb, nullptr });
170
-
171
- return PropertyDescriptor({
172
- nullptr,
173
- name,
174
- CbData::Wrapper,
175
- nullptr,
176
- nullptr,
177
- nullptr,
178
- attributes,
179
- callbackData
180
- });
167
+ auto callbackData = new CbData({cb, nullptr});
168
+
169
+ return PropertyDescriptor({nullptr,
170
+ name,
171
+ CbData::Wrapper,
172
+ nullptr,
173
+ nullptr,
174
+ nullptr,
175
+ attributes,
176
+ callbackData});
181
177
  }
182
178
 
183
179
  template <typename Callable>
184
- inline PropertyDescriptor PropertyDescriptor::Function(Name name,
185
- Callable cb,
186
- napi_property_attributes attributes,
187
- void* data) {
180
+ inline PropertyDescriptor PropertyDescriptor::Function(
181
+ Name name, Callable cb, napi_property_attributes attributes, void* data) {
188
182
  napi_value nameValue = name;
189
183
  return PropertyDescriptor::Function(nameValue, cb, attributes, data);
190
184
  }
191
185
 
192
- #endif // !SRC_NAPI_INL_DEPRECATED_H_
186
+ #endif // !SRC_NAPI_INL_DEPRECATED_H_