Skip to content

Commit bf4a359

Browse files
p0pstaspopstas
authored andcommitted
chore: update node-gyp, node-gyp-build, fix rebuild error
Related to #68 --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/sentialx/node-window-manager/issues/68?shareId=XXXX-XXXX-XXXX-XXXX).
1 parent 2c0329c commit bf4a359

File tree

4 files changed

+668
-763
lines changed

4 files changed

+668
-763
lines changed

binding.gyp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
"<!@(node -p \"require('node-addon-api').include\")"
1818
],
1919
'defines': [ 'NAPI_DISABLE_CPP_EXCEPTIONS' ],
20+
"variables": {
21+
"node_version": ">=13.11.0"
22+
}
2023
}
2124
]
22-
}
25+
}

example.js

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
1-
const { windowManager } = require("./dist/index");
2-
3-
console.log(windowManager.requestAccessibility()); // required on macOS
4-
5-
const window = windowManager.getActiveWindow();
6-
console.log(window.getTitle());
7-
8-
const bounds = window.getBounds();
9-
console.log(bounds);
10-
11-
window.setBounds({ x: 0, y: 0 });
12-
window.maximize();
13-
14-
setTimeout(() => {
15-
window.setBounds(bounds);
16-
}, 1000);
17-
18-
console.log("Windows list");
19-
windowManager.getWindows().forEach((window) => {
20-
if (window.isVisible()) {
21-
console.log(window.getTitle(), window.path);
22-
}
23-
});
24-
25-
windowManager.on("window-activated", (window) => {
26-
console.log(window.path);
27-
});
28-
29-
console.log("Monitors list");
30-
windowManager.getMonitors().forEach((monitor) => {
31-
console.log(monitor.getWorkArea());
32-
});
1+
const { windowManager } = require("./dist/index");
2+
3+
console.log(windowManager.requestAccessibility()); // required on macOS
4+
5+
const window = windowManager.getActiveWindow();
6+
console.log(window.getTitle());
7+
8+
const bounds = window.getBounds();
9+
console.log(bounds);
10+
11+
window.setBounds({ x: 0, y: 0 });
12+
window.maximize();
13+
14+
setTimeout(() => {
15+
window.setBounds(bounds);
16+
}, 1000);
17+
18+
console.log("Windows list");
19+
windowManager.getWindows().forEach((window) => {
20+
if (window.isVisible()) {
21+
console.log(window.getTitle(), window.path);
22+
}
23+
});
24+
25+
windowManager.on("window-activated", (window) => {
26+
console.log(window.path);
27+
});
28+
29+
console.log("Monitors list");
30+
windowManager.getMonitors().forEach((monitor) => {
31+
console.log(monitor.getWorkArea());
32+
});

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
"homepage": "https://github.com/sentialx/node-window-manager#readme",
3333
"devDependencies": {
3434
"@types/node": "13.11.1",
35-
"node-gyp": "^6.1.0",
35+
"node-gyp": "^10.2.0",
3636
"tslint": "6.1.1",
3737
"typescript": "3.8.3"
3838
},
3939
"dependencies": {
4040
"extract-file-icon": "^0.3.2",
4141
"node-addon-api": "2.0.0",
42-
"node-gyp-build": "^4.2.1"
42+
"node-gyp-build": "^4.8.3"
4343
}
4444
}

0 commit comments

Comments
 (0)