Skip to content

Commit

Permalink
Update @types/node.
Browse files Browse the repository at this point in the history
Move a Buffer-related type to wm package.
  • Loading branch information
wnayes committed May 27, 2024
1 parent b9b478e commit be7144b
Show file tree
Hide file tree
Showing 15 changed files with 112 additions and 112 deletions.
2 changes: 1 addition & 1 deletion apps/wm/ewmh.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { WindowType, XWMWindowType, setWindowFullscreenAction, setWindowUrgentAction } from "@bond-wm/shared";
import { numsToBuffer } from "@bond-wm/shared";
import { numsToBuffer } from "./xutils";
import { Atom, XCB_COPY_FROM_PARENT, XPropMode } from "@bond-wm/shared";
import { log, logError } from "./log";
import { IXWMEventConsumer, XWMContext } from "./wm";
Expand Down
2 changes: 1 addition & 1 deletion apps/wm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"yargs": "^17.7.2"
},
"devDependencies": {
"@types/node": "^20.11.25",
"@types/node": "^20.12.12",
"@types/yargs": "^17.0.32",
"esbuild": "^0.21.4",
"jest": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion apps/wm/systray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
removeTrayWindowAction,
} from "@bond-wm/shared";
import { IGeometry } from "@bond-wm/shared";
import { numsToBuffer } from "@bond-wm/shared";
import { numsToBuffer } from "./xutils";
import { IX11Mod, X11_EVENT_TYPE, XCB_COPY_FROM_PARENT, XPropMode } from "@bond-wm/shared";
import { log, logError } from "./log";
import { IXWMEventConsumer, XWMContext } from "./wm";
Expand Down
13 changes: 13 additions & 0 deletions apps/wm/xutils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,16 @@ export function changeWindowEventMask(X: IXClient, wid: number, eventMask: XEven
});
return !failed;
}

/**
* Converts an array of numbers into a Buffer holding those numbers.
* @param nums Numbers to put in the buffer (as 32 bit ints)
* @returns Buffer filled with nums.
*/
export function numsToBuffer(nums: number[]): Buffer {
const buffer = Buffer.alloc(nums.length * 4);
for (let i = 0; i < nums.length; i++) {
buffer.writeInt32LE(nums[i], i * 4);
}
return buffer;
}
2 changes: 1 addition & 1 deletion packages/layout-floating/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"devDependencies": {
"@bond-wm/tsconfig": "workspace:^",
"@types/node": "^20.11.25",
"@types/node": "^20.12.12",
"typescript": "~5.4.5",
"vite": "^5.2.11"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/layout-tiling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"devDependencies": {
"@bond-wm/tsconfig": "workspace:^",
"@types/node": "^20.11.25",
"@types/node": "^20.12.12",
"typescript": "~5.4.5",
"vite": "^5.2.11"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-desktop-entries/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"devDependencies": {
"@bond-wm/tsconfig": "workspace:^",
"@types/node": "^20.11.25",
"@types/node": "^20.12.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"typescript": "~5.4.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-taskbar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"@bond-wm/tsconfig": "workspace:^",
"@types/node": "^20.11.25",
"@types/node": "^20.12.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"typescript": "~5.4.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/react-titlebar/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"devDependencies": {
"@bond-wm/tsconfig": "workspace:^",
"@types/node": "^20.11.25",
"@types/node": "^20.12.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"esbuild": "^0.21.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-wallpaper/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"@bond-wm/tsconfig": "workspace:^",
"@types/node": "^20.11.25",
"@types/node": "^20.12.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"typescript": "~5.4.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
"devDependencies": {
"@bond-wm/tsconfig": "workspace:^",
"@types/node": "^20.11.25",
"@types/node": "^20.12.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"typescript": "~5.4.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/shared-renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"@bond-wm/tsconfig": "workspace:^",
"@types/node": "^20.11.25",
"@types/node": "^20.12.12",
"jest": "^29.7.0",
"ts-jest": "^29.1.2",
"typescript": "~5.4.5"
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"devDependencies": {
"@bond-wm/tsconfig": "workspace:^",
"@jest/globals": "^29.7.0",
"@types/node": "^20.11.25",
"@types/node": "^20.12.12",
"@types/yargs": "^17.0.32",
"esbuild": "^0.21.4",
"jest": "^29.7.0",
Expand Down
13 changes: 0 additions & 13 deletions packages/shared/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,3 @@ export function fitGeometryWithinAnother(

return geoResult;
}

/**
* Converts an array of numbers into a Buffer holding those numbers.
* @param nums Numbers to put in the buffer (as 32 bit ints)
* @returns Buffer filled with nums.
*/
export function numsToBuffer(nums: number[]): Buffer {
const buffer = Buffer.alloc(nums.length * 4);
for (let i = 0; i < nums.length; i++) {
buffer.writeInt32LE(nums[i], i * 4);
}
return buffer;
}
Loading

0 comments on commit be7144b

Please sign in to comment.