Skip to content

Commit

Permalink
chore: upgrade deps to latest (#62)
Browse files Browse the repository at this point in the history
* chore: upgrade deps to latest

BREAKING CHNAGE: drop node14.x support
  • Loading branch information
killagu authored Dec 12, 2024
1 parent 0e873ec commit c723147
Show file tree
Hide file tree
Showing 35 changed files with 115 additions and 115 deletions.
2 changes: 1 addition & 1 deletion bin/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const path = require('path');
const path = require('node:path');
const nounou = require('nounou');
const clientPath = path.join(__dirname, './client.js');
const argv = process.argv.slice(2);
Expand Down
8 changes: 4 additions & 4 deletions bin/xtransit.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env node
'use strict';

const fs = require('fs');
const path = require('path');
const fs = require('node:fs');
const path = require('node:path');
const moment = require('moment');
const cp = require('child_process');
const cp = require('node:child_process');
// promisify
const { promisify } = require('util');
const { promisify } = require('node:util');
const exists = promisify(fs.exists);
const open = promisify(fs.open);
const close = promisify(fs.close);
Expand Down
4 changes: 2 additions & 2 deletions commands/check_file_status.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const fs = require('fs');
const { promisify } = require('util');
const fs = require('node:fs');
const { promisify } = require('node:util');
const exists = promisify(fs.exists);

const filePath = process.argv[2];
Expand Down
10 changes: 5 additions & 5 deletions commands/check_process_status.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

const os = require('os');
const fs = require('fs');
const path = require('path');
const { promisify } = require('util');
const cp = require('child_process');
const os = require('node:os');
const fs = require('node:fs');
const path = require('node:path');
const { promisify } = require('node:util');
const cp = require('node:child_process');
const exec = promisify(cp.exec);
const exists = promisify(fs.exists);
const readFile = promisify(fs.readFile);
Expand Down
6 changes: 3 additions & 3 deletions commands/get_node_processes.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const os = require('os');
const cp = require('child_process');
const { promisify } = require('util');
const os = require('node:os');
const cp = require('node:child_process');
const { promisify } = require('node:util');
const exec = promisify(cp.exec);
const { getNodeProcessInfo, isNumber, checkAlive } = require('../common/utils');

Expand Down
6 changes: 3 additions & 3 deletions commands/get_os_info.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

const results = {};
const cp = require('child_process');
const { promisify } = require('util');
const cp = require('node:child_process');
const { promisify } = require('node:util');
const exec = promisify(cp.exec);
const os = require('os');
const os = require('node:os');

async function getOsInfo() {
// node version
Expand Down
12 changes: 6 additions & 6 deletions commands/upload_file.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
'use strict';

const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const qs = require('querystring');
const fs = require('node:fs');
const path = require('node:path');
const zlib = require('node:zlib');
const qs = require('node:querystring');
const FormData = require('form-data');
const urllib = require('urllib');
const { promisify } = require('util');
const crypto = require('crypto');
const { promisify } = require('node:util');
const crypto = require('node:crypto');
const exists = promisify(fs.exists);
const stat = promisify(fs.stat);
const unlink = promisify(fs.unlink);
Expand Down
6 changes: 3 additions & 3 deletions commands/xprofctl.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const fs = require('fs');
const path = require('path');
const { promisify } = require('util');
const fs = require('node:fs');
const path = require('node:path');
const { promisify } = require('node:util');
const exists = promisify(fs.exists);
const readFile = promisify(fs.readFile);
const realpath = promisify(fs.realpath);
Expand Down
10 changes: 5 additions & 5 deletions common/cwd.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

const fs = require('fs');
const { promisify } = require('util');
const os = require('os');
const cp = require('child_process');
const path = require('path');
const fs = require('node:fs');
const { promisify } = require('node:util');
const os = require('node:os');
const cp = require('node:child_process');
const path = require('node:path');
const exec = promisify(cp.exec);
const exists = promisify(fs.exists);
const stat = promisify(fs.stat);
Expand Down
10 changes: 5 additions & 5 deletions common/exe.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

const fs = require('fs');
const { promisify } = require('util');
const os = require('os');
const cp = require('child_process');
const path = require('path');
const fs = require('node:fs');
const { promisify } = require('node:util');
const os = require('node:os');
const cp = require('node:child_process');
const path = require('node:path');
const exec = promisify(cp.exec);
const exists = promisify(fs.exists);
const utils = require('../common/utils');
Expand Down
8 changes: 4 additions & 4 deletions common/utils.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

const os = require('os');
const os = require('node:os');
const address = require('address');
const crypto = require('crypto');
const { promisify } = require('util');
const path = require('path');
const crypto = require('node:crypto');
const { promisify } = require('node:util');
const path = require('node:path');

exports.regularWsServer = function(server) {
return server.startsWith('ws://') || server.startsWith('wss://');
Expand Down
6 changes: 3 additions & 3 deletions lib/agent.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

const os = require('os');
const path = require('path');
const os = require('node:os');
const path = require('node:path');
const WebSocket = require('ws');
const { v4: uuidv4 } = require('uuid');
const EventEmitter = require('events').EventEmitter;
const EventEmitter = require('node:events').EventEmitter;
const utils = require('../common/utils');
const Logger = require('../common/logger');
const startHeartbeat = require('./heartbeat');
Expand Down
8 changes: 4 additions & 4 deletions lib/handler.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
'use strict';

const fs = require('fs');
const cp = require('child_process');
const { promisify } = require('util');
const fs = require('node:fs');
const cp = require('node:child_process');
const { promisify } = require('node:util');
const exists = promisify(fs.exists);
const execFile = promisify(cp.execFile);
const path = require('path');
const path = require('node:path');
const utils = require('../common/utils');
const getNodeExe = require('../common/exe');

Expand Down
6 changes: 3 additions & 3 deletions lib/monitor.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const fs = require('fs');
const path = require('path');
const { promisify } = require('util');
const fs = require('node:fs');
const path = require('node:path');
const { promisify } = require('node:util');
const readdir = promisify(fs.readdir);
const { isFunction } = require('../common/utils');

Expand Down
6 changes: 3 additions & 3 deletions orders/clean_log.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const fs = require('fs');
const path = require('path');
const { promisify } = require('util');
const fs = require('node:fs');
const path = require('node:path');
const { promisify } = require('node:util');
const pMap = require('p-map');
const moment = require('moment');
const exists = promisify(fs.exists);
Expand Down
4 changes: 2 additions & 2 deletions orders/error_log.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const fs = require('fs');
const { promisify } = require('util');
const fs = require('node:fs');
const { promisify } = require('node:util');
const stat = promisify(fs.stat);
const exists = promisify(fs.exists);
const Parser = require('../common/error');
Expand Down
6 changes: 3 additions & 3 deletions orders/package.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const fs = require('fs');
const path = require('path');
const { promisify } = require('util');
const fs = require('node:fs');
const path = require('node:path');
const { promisify } = require('node:util');
const { yarnToNpm } = require('synp');
const exists = promisify(fs.exists);
const readFile = promisify(fs.readFile);
Expand Down
10 changes: 5 additions & 5 deletions orders/report_core.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* istanbul ignore file */
'use strict';

const os = require('os');
const fs = require('fs');
const cp = require('child_process');
const path = require('path');
const { promisify } = require('util');
const os = require('node:os');
const fs = require('node:fs');
const cp = require('node:child_process');
const path = require('node:path');
const { promisify } = require('node:util');
const getNodeExe = require('../common/exe');
const exec = promisify(cp.exec);
const exists = promisify(fs.exists);
Expand Down
10 changes: 5 additions & 5 deletions orders/system_log.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
/* istanbul ignore file */
'use strict';

const os = require('os');
const fs = require('fs');
const path = require('path');
const cp = require('child_process');
const os = require('node:os');
const fs = require('node:fs');
const path = require('node:path');
const cp = require('node:child_process');
const moment = require('moment');
const { isNumber } = require('../common/utils');
const getNodeExe = require('../common/exe');
const pkg = require('../package.json');
const { promisify } = require('util');
const { promisify } = require('node:util');
const exec = promisify(cp.exec);
const exists = promisify(fs.exists);
const readFile = promisify(fs.readFile);
Expand Down
6 changes: 3 additions & 3 deletions orders/xprofiler_log.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
'use strict';

const fs = require('fs');
const path = require('path');
const fs = require('node:fs');
const path = require('node:path');
const through = require('through2');
const split = require('split2');
const { promisify } = require('util');
const { promisify } = require('node:util');
const exists = promisify(fs.exists);
const stat = promisify(fs.stat);
const moment = require('moment');
Expand Down
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,26 +41,26 @@
},
"homepage": "https://github.com/X-Profiler/xtransit#readme",
"dependencies": {
"address": "^1.1.2",
"form-data": "^4.0.0",
"address": "^2.0.3",
"form-data": "^4.0.1",
"moment": "^2.28.0",
"nounou": "^1.2.1",
"p-map": "^4.0.0",
"split2": "^3.2.2",
"split2": "^4.0.2",
"synp": "^1.9.9",
"through2": "^4.0.2",
"urllib": "^4.6.3",
"uuid": "^9.0.1",
"ws": "^7.3.1"
"ws": "^8.18.0"
},
"devDependencies": {
"autod": "^3.1.0",
"eslint": "^6.8.0",
"eslint-config-egg": "^8.1.2",
"eslint": "^8.57.1",
"eslint-config-egg": "^14.0.0",
"expect.js": "^0.3.1",
"mocha": "^7.2.0",
"nodemon": "^2.0.4",
"nyc": "^15.1.0",
"mocha": "^11.0.2",
"nodemon": "^3.1.7",
"nyc": "^17.1.0",
"mm": "^3.4.0"
},
"nodemonConfig": {
Expand Down
4 changes: 2 additions & 2 deletions scripts/release.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const cp = require('child_process');
const path = require('path');
const cp = require('node:child_process');
const path = require('node:path');
const pack = require('../package.json');

const releaseVersion = pack.version;
Expand Down
6 changes: 3 additions & 3 deletions test/cleanlog.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const fs = require('fs');
const path = require('path');
const { promisify } = require('util');
const fs = require('node:fs');
const path = require('node:path');
const { promisify } = require('node:util');
const exists = promisify(fs.exists);
const mkdir = promisify(fs.mkdir);
const writeFile = promisify(fs.writeFile);
Expand Down
8 changes: 4 additions & 4 deletions test/config.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
'use strict';

const cp = require('child_process');
const os = require('os');
const path = require('path');
const { promisify } = require('util');
const cp = require('node:child_process');
const os = require('node:os');
const path = require('node:path');
const { promisify } = require('node:util');
const mm = require('mm');
const expect = require('expect.js');
const Agent = require('../lib/agent');
Expand Down
4 changes: 2 additions & 2 deletions test/error.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const fs = require('fs');
const path = require('path');
const fs = require('node:fs');
const path = require('node:path');
const expect = require('expect.js');
const ErrorParser = require('../common/error');
const errorFilePath = path.join(__dirname, './fixtures/files/error');
Expand Down
6 changes: 3 additions & 3 deletions test/errorlog.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const fs = require('fs');
const path = require('path');
const { promisify } = require('util');
const fs = require('node:fs');
const path = require('node:path');
const { promisify } = require('node:util');
const exists = promisify(fs.exists);
const mkdir = promisify(fs.mkdir);
const writeFile = promisify(fs.writeFile);
Expand Down
6 changes: 3 additions & 3 deletions test/filternode.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use strict';

const path = require('path');
const cp = require('child_process');
const { promisify } = require('util');
const path = require('node:path');
const cp = require('node:child_process');
const { promisify } = require('node:util');
const exec = promisify(cp.exec);
const expect = require('expect.js');
const { sleep } = require('../common/utils');
Expand Down
4 changes: 2 additions & 2 deletions test/fixtures/transit-client.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

const fs = require('fs');
const path = require('path');
const fs = require('node:fs');
const path = require('node:path');
const moment = require('moment');
const xtransit = require('../../xtransit');

Expand Down
Loading

0 comments on commit c723147

Please sign in to comment.