Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ci

on:
push:
pull_request:

permissions:
contents: read

concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
runs-on: macos-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
- run: npm run check
1 change: 0 additions & 1 deletion src/bluebubbles.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ export class BlueBubblesClient {
const timeout = controller
? setTimeout(() => controller.abort(), Math.max(1, Number(timeoutMs)))
: null;
timeout?.unref?.();
let response;
try {
response = await fetch(this.authUrl(this.sendTextPath), {
Expand Down
1 change: 0 additions & 1 deletion src/context-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ function runCommandHelper(helper, input, {
child.kill("SIGKILL");
finish(reject, new Error(`helper_timeout:${helper.id}`));
}, timeoutMs);
timer.unref?.();
child.stdout.on("data", (chunk) => {
stdout = Buffer.concat([stdout, chunk]);
if (stdout.length > maxBytes) {
Expand Down
3 changes: 0 additions & 3 deletions src/server-runtime.js
Original file line number Diff line number Diff line change
Expand Up @@ -2776,7 +2776,6 @@ async function buildPreflightRichLinkDecisionWithTimeout(text) {
timer = setTimeout(() => {
resolve(null);
}, nativeLinkPreviewPreflightTimeoutMs);
timer.unref?.();
}),
]);
if (decision?.route === "native") return decision;
Expand Down Expand Up @@ -3103,7 +3102,6 @@ function withTimeout(promise, timeoutMs, message) {
let timer;
const timeout = new Promise((_, reject) => {
timer = setTimeout(() => reject(new Error(message)), timeoutMs);
timer.unref?.();
});
return Promise.race([promise, timeout]).finally(() => clearTimeout(timer));
}
Expand Down Expand Up @@ -3205,7 +3203,6 @@ async function getFaceTimeLinkPageState(debugUrl) {
async function fetchJsonWithTimeout(url, timeoutMs) {
const controller = new AbortController();
const timer = setTimeout(() => controller.abort(), timeoutMs);
timer.unref?.();
try {
const response = await fetch(url, { signal: controller.signal });
return await response.json();
Expand Down
1 change: 0 additions & 1 deletion src/transports/slack.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@ export class SlackTransport {
let data;
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), this.requestTimeoutMs);
timeout.unref?.();
try {
response = await this.fetchImpl(SLACK_POST_MESSAGE_URL, {
method: "POST",
Expand Down
1 change: 0 additions & 1 deletion src/transports/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ export class TelegramTransport {
let data;
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), this.requestTimeoutMs);
timeout.unref?.();
try {
response = await this.fetchImpl(endpoint, {
method: "POST",
Expand Down
1 change: 0 additions & 1 deletion src/transports/whatsapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,6 @@ export class WhatsAppCloudApiClient {
timedOut = true;
controller.abort();
}, this.#requestTimeoutMs);
timer.unref?.();

let response;
let responseBody;
Expand Down
Loading