diff --git a/package-lock.json b/package-lock.json index 05a029b..f09d254 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "oopetris", - "version": "1.0.1", + "version": "1.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "oopetris", - "version": "1.0.1", + "version": "1.0.3", "hasInstallScript": true, "license": "MIT", "os": [ @@ -18,7 +18,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", @@ -27,7 +27,7 @@ "typescript": "^5.6.3" }, "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" } }, "node_modules/@ampproject/remapping": { @@ -1090,9 +1090,9 @@ } }, "node_modules/@types/jest": { - "version": "29.5.13", - "resolved": "https://verdaccio.totto.lt/@types/jest/-/jest-29.5.13.tgz", - "integrity": "sha512-wd+MVEZCHt23V0/L642O5APvspWply/rGY5BcW4SUETo2UzPU3Z26qr8jC2qxpimI2jjx9h7+2cj2FwIr01bXg==", + "version": "29.5.14", + "resolved": "https://verdaccio.totto.lt/@types/jest/-/jest-29.5.14.tgz", + "integrity": "sha512-ZN+4sdnLUbo8EVvVc2ao0GFW6oVrQRPn4K2lglySj7APvSrgzxHiNNK99us4WDMi57xxA2yggblIAMNhXOotLQ==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 52c968c..8da4df0 100644 --- a/package.json +++ b/package.json @@ -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", @@ -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", @@ -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", @@ -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", diff --git a/src/cpp/convert.cpp b/src/cpp/convert.cpp index db7a47f..9281599 100644 --- a/src/cpp/convert.cpp +++ b/src/cpp/convert.cpp @@ -18,7 +18,7 @@ static v8::Local 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 { return Nan::New(value).ToLocalChecked(); }, @@ -190,9 +190,11 @@ static v8::Local mino_position_to_js(v8::Isolate* isolate, const grid v8::Local result = Nan::New(); - auto js_x = Nan::New(mino_position.x); + auto mino_pos = mino_position.cast(); - auto js_y = Nan::New(mino_position.y); + auto js_x = Nan::New(mino_pos.x); + + auto js_y = Nan::New(mino_pos.y); std::vector>> properties_vector{ { "x", js_x },