Skip to content

Commit

Permalink
feat: Dependency update
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Require node.js 16.12.0
  • Loading branch information
coreyfarrell authored and Corey Farrell committed Mar 28, 2024
1 parent 7ea5aa9 commit d2df0a2
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 24 deletions.
29 changes: 14 additions & 15 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/* eslint no-await-in-loop: 0 */
import path from 'path';
import fs from 'fs/promises';
import {createWriteStream} from 'fs';
import {once, EventEmitter} from 'events';
import childProcess from 'child_process';
import stream from 'stream';
import {promisify} from 'util';
import {fileURLToPath} from 'url';
import {createServer} from 'net';
import path from 'node:path';
import fs from 'node:fs/promises';
import {createWriteStream} from 'node:fs';
import {once, EventEmitter} from 'node:events';
import childProcess from 'node:child_process';
import {pipeline} from 'node:stream/promises';
import {promisify} from 'node:util';
import {fileURLToPath} from 'node:url';
import {createServer} from 'node:net';
import {setTimeout} from 'node:timers/promises';

import AMI from 'ami';
import pMap from 'p-map';
Expand All @@ -16,8 +17,6 @@ import vinylFS from 'vinyl-fs';
import {FixtureRunDirectory} from '@cfware/fixture-run-directory';

const execFile = promisify(childProcess.execFile);
const pipeline = promisify(stream.pipeline);
const delay = promisify(setTimeout);

const __dirname = fileURLToPath(path.dirname(import.meta.url));

Expand Down Expand Up @@ -249,7 +248,7 @@ export class AsteriskInstance extends FixtureRunDirectory {
this.asteriskProcess = undefined;

if (await this._refdebugEnabled()) {
await delay(6400);
await setTimeout(6400);
}

await this.cliCommand('core stop gracefully').catch(() => {});
Expand All @@ -265,7 +264,7 @@ export class AsteriskInstance extends FixtureRunDirectory {
}

async checkStopped() {
const python = await which('python2');
const python = await which('python3');
if (await this._refdebugEnabled()) {
await execFile(python, [
path.join(__dirname, 'scripts/refcounter.py'),
Expand Down Expand Up @@ -293,7 +292,7 @@ export class AsteriskInstance extends FixtureRunDirectory {
let attempt = 0;
while (attempt < 100) {
try {
await delay(100);
await setTimeout(100);
await this.cliCommand('core waitfullybooted');
return;
} catch {
Expand Down Expand Up @@ -321,7 +320,7 @@ export function setupIntegrationAMITesting(tap, integrationInstance) {

ami.on('event', listener);
const result = await execute();
await delay(50);
await setTimeout(50);
ami.off('event', listener);

this.equal(events.length, expect.length, 'events.length matches', extra);
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test": "cfware-lint ."
},
"engines": {
"node": ">=14.0.0"
"node": ">=16.12.0"
},
"author": "Corey Farrell",
"license": "MIT",
Expand All @@ -23,12 +23,12 @@
"homepage": "https://github.com/cfware/asterisk16#readme",
"dependencies": {
"@cfware/fixture-run-directory": "^0.2.0",
"ami": "^1.0.0",
"p-map": "^4.0.0",
"vinyl-fs": "^3.0.3",
"which": "^2.0.2"
"ami": "^1",
"p-map": "^5",
"vinyl-fs": "^3",
"which": "^2"
},
"devDependencies": {
"@cfware/lint": "^2.0.2"
"@cfware/lint": "^3"
}
}
2 changes: 1 addition & 1 deletion scripts/refcounter.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python2
#!/usr/bin/env python3
"""Process a ref debug log
This file will process a log file created by enabling
Expand Down
2 changes: 1 addition & 1 deletion scripts/reflocks.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python2
#!/usr/bin/env python3
"""Process a ref debug log for lock usage
This file will process a log file created by Asterisk
Expand Down
2 changes: 1 addition & 1 deletion scripts/refstats.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/python2
#!/usr/bin/env python3
"""Process a ref debug log for memory usage
This will provide information about total and peak
Expand Down

0 comments on commit d2df0a2

Please sign in to comment.