Skip to content

Commit

Permalink
feat: detect-port@2, is-type-of@2, get-ready@3 (#175)
Browse files Browse the repository at this point in the history
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

- **Chores**
- Updated dependencies to newer versions for improved performance and
compatibility.
- Modified import statements for better clarity in the application code.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
fengmk2 authored Dec 9, 2024
1 parent b07a234 commit 0364af8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions lib/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ const path = require('path');
const EventEmitter = require('events');
const co = require('co');
const is = require('is-type-of');
const ready = require('get-ready');
const detectPort = require('detect-port');
const { Ready } = require('get-ready');
const { detectPort } = require('detect-port');
const ConsoleLogger = require('egg-logger').EggConsoleLogger;
const { sleep, rimraf } = require('./utils');
const formatOptions = require('./format_options');
Expand Down Expand Up @@ -41,7 +41,7 @@ class MockApplication extends EventEmitter {
this[APP_INIT] = false;
this[INIT_ON_LISTENER] = new Set();
this[INIT_ONCE_LISTENER] = new Set();
ready.mixin(this);
Ready.mixin(this);
// listen once, otherwise will throw exception when emit error without listenr
this.once('error', () => {});

Expand Down
4 changes: 2 additions & 2 deletions lib/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const path = require('path');
const os = require('os');
const childProcess = require('child_process');
const Coffee = require('coffee').Coffee;
const ready = require('get-ready');
const { Ready } = require('get-ready');
const co = require('co');
const awaitEvent = require('await-event');
const supertestRequest = require('./supertest');
Expand Down Expand Up @@ -71,7 +71,7 @@ class ClusterApplication extends Coffee {
opt,
});

ready.mixin(this);
Ready.mixin(this);

this.port = options.port;
this.baseDir = options.baseDir;
Expand Down
2 changes: 1 addition & 1 deletion lib/parallel/agent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const debug = require('util').debuglog('egg-mock:lib:parallel:agent');
const path = require('path');
const Base = require('sdk-base');
const detectPort = require('detect-port');
const { detectPort } = require('detect-port');
const context = require('../context');
const formatOptions = require('../format_options');
const { sleep, rimraf } = require('../utils');
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
"await-event": "^2.1.0",
"co": "^4.6.0",
"coffee": "^5.2.1",
"detect-port": "^1.3.0",
"detect-port": "^2.0.1",
"egg-logger": "^3.5.0",
"egg-utils": "^2.4.1",
"extend2": "^1.0.0",
"get-ready": "^2.0.1",
"get-ready": "^3.1.0",
"globby": "^11.1.0",
"is-type-of": "^1.4.0",
"is-type-of": "^2.2.0",
"merge-descriptors": "^1.0.1",
"methods": "^1.1.2",
"mm": "^3.0.2",
Expand Down

0 comments on commit 0364af8

Please sign in to comment.