Skip to content

Commit 9708a7f

Browse files
authored
Merge pull request #4 from Totto16/update_upstream
Update upstream
2 parents 01b3759 + 30dc5a6 commit 9708a7f

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "oopetris",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Node js wrapper for oopetris",
55
"gypfile": true,
66
"main": "./dist/index.js",
@@ -17,8 +17,8 @@
1717
"scripts": {
1818
"install": "node-gyp-build",
1919
"build": "npm run build:gyp && npm run compile",
20-
"build:gyp": "prebuildify -t 18.20.4 -t 20.18.0 -t 21.7.3 -t 22.9.0 --strip",
21-
"build:debug": "prebuildify -t 18.20.4 -t 20.18.0 -t 21.7.3 -t 22.9.0 --debug",
20+
"build:gyp": "prebuildify -t 18.20.4 -t 20.18.0 -t 21.7.3 -t 22.11.0 -t 23.1.0 --strip",
21+
"build:debug": "prebuildify -t 18.20.4 -t 20.18.0 -t 21.7.3 -t 22.11.0 -t 23.1.0 --debug",
2222
"compile": "npm run build:tsc",
2323
"build:tsc": "tsc",
2424
"test": "npx jest",
@@ -36,7 +36,7 @@
3636
},
3737
"license": "MIT",
3838
"engines": {
39-
"node": "^18.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0"
39+
"node": "^18.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0 || ^23.0.0"
4040
},
4141
"os": [
4242
"darwin",
@@ -51,7 +51,7 @@
5151
"node-gyp-build": "^4.8.2"
5252
},
5353
"devDependencies": {
54-
"@types/jest": "^29.5.13",
54+
"@types/jest": "^29.5.14",
5555
"jest": "^29.7.0",
5656
"nan": "^2.22.0",
5757
"prebuildify": "^6.0.2",

src/cpp/convert.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ static v8::Local<v8::Value>
1818
information_value_to_js(v8::Isolate* isolate, const recorder::InformationValue& information_value) {
1919

2020
return std::visit(
21-
helper::overloaded{
21+
helper::Overloaded{
2222
[](const std::string& value) -> v8::Local<v8::Value> {
2323
return Nan::New<v8::String>(value).ToLocalChecked();
2424
},
@@ -190,9 +190,11 @@ static v8::Local<v8::Value> mino_position_to_js(v8::Isolate* isolate, const grid
190190

191191
v8::Local<v8::Object> result = Nan::New<v8::Object>();
192192

193-
auto js_x = Nan::New<v8::Uint32>(mino_position.x);
193+
auto mino_pos = mino_position.cast<uint8_t>();
194194

195-
auto js_y = Nan::New<v8::Uint32>(mino_position.y);
195+
auto js_x = Nan::New<v8::Uint32>(mino_pos.x);
196+
197+
auto js_y = Nan::New<v8::Uint32>(mino_pos.y);
196198

197199
std::vector<std::pair<std::string, v8::Local<v8::Value>>> properties_vector{
198200
{ "x", js_x },

0 commit comments

Comments
 (0)