Skip to content

Commit

Permalink
Merge pull request #4 from Totto16/update_upstream
Browse files Browse the repository at this point in the history
Update upstream
  • Loading branch information
Totto16 authored Nov 6, 2024
2 parents 01b3759 + 30dc5a6 commit 9708a7f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 15 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "oopetris",
"version": "1.0.2",
"version": "1.0.3",
"description": "Node js wrapper for oopetris",
"gypfile": true,
"main": "./dist/index.js",
Expand All @@ -17,8 +17,8 @@
"scripts": {
"install": "node-gyp-build",
"build": "npm run build:gyp && npm run compile",
"build:gyp": "prebuildify -t 18.20.4 -t 20.18.0 -t 21.7.3 -t 22.9.0 --strip",
"build:debug": "prebuildify -t 18.20.4 -t 20.18.0 -t 21.7.3 -t 22.9.0 --debug",
"build:gyp": "prebuildify -t 18.20.4 -t 20.18.0 -t 21.7.3 -t 22.11.0 -t 23.1.0 --strip",
"build:debug": "prebuildify -t 18.20.4 -t 20.18.0 -t 21.7.3 -t 22.11.0 -t 23.1.0 --debug",
"compile": "npm run build:tsc",
"build:tsc": "tsc",
"test": "npx jest",
Expand All @@ -36,7 +36,7 @@
},
"license": "MIT",
"engines": {
"node": "^18.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0"
"node": "^18.0.0 || ^20.0.0 || ^21.0.0 || ^22.0.0 || ^23.0.0"
},
"os": [
"darwin",
Expand All @@ -51,7 +51,7 @@
"node-gyp-build": "^4.8.2"
},
"devDependencies": {
"@types/jest": "^29.5.13",
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
"nan": "^2.22.0",
"prebuildify": "^6.0.2",
Expand Down
8 changes: 5 additions & 3 deletions src/cpp/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ static v8::Local<v8::Value>
information_value_to_js(v8::Isolate* isolate, const recorder::InformationValue& information_value) {

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

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

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

auto js_y = Nan::New<v8::Uint32>(mino_position.y);
auto js_x = Nan::New<v8::Uint32>(mino_pos.x);

auto js_y = Nan::New<v8::Uint32>(mino_pos.y);

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

0 comments on commit 9708a7f

Please sign in to comment.