Skip to content

Commit

Permalink
feat: update egg-multipart 2.x -> 3.x (#5023)
Browse files Browse the repository at this point in the history
closes #5018
  • Loading branch information
atian25 committed Sep 21, 2022
1 parent 4857813 commit 733d669
Show file tree
Hide file tree
Showing 11 changed files with 64 additions and 63 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ run
.DS_Store
.tmp

package-lock.json
*-lock.json
*-lock.yaml
yarn.lock
!test/fixtures/apps/loader-plugin/node_modules
.editorconfig
Expand Down
2 changes: 1 addition & 1 deletion lib/agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const EGG_PATH = Symbol.for('egg#eggPath');

/**
* Singleton instance in Agent Worker, extend {@link EggApplication}
* @extends EggApplication
* @augments EggApplication
*/
class Agent extends EggApplication {
/**
Expand Down
2 changes: 1 addition & 1 deletion lib/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function escapeHeaderValue(value) {
// Refs: https://github.com/nodejs/node/blob/b38c81/lib/_http_outgoing.js#L706-L710
/**
* Singleton instance in App Worker, extend {@link EggApplication}
* @extends EggApplication
* @augments EggApplication
*/
class Application extends EggApplication {

Expand Down
2 changes: 1 addition & 1 deletion lib/core/messenger/ipc.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class Messenger extends EventEmitter {
}

/**
* @method Messenger#on
* @function Messenger#on
* @param {String} action - message key
* @param {Object} data - message value
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/core/messenger/local.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class Messenger extends EventEmitter {
}

/**
* @method Messenger#on
* @function Messenger#on
* @param {String} action - message key
* @param {Object} data - message value
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/egg.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const CLUSTER_CLIENTS = Symbol.for('egg#clusterClients');
* Base on koa's Application
* @see https://github.com/eggjs/egg-core
* @see http://koajs.com/#application
* @extends EggCore
* @augments EggCore
*/
class EggApplication extends EggCore {

Expand Down
104 changes: 52 additions & 52 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,84 +14,84 @@
],
"dependencies": {
"@types/accepts": "^1.3.5",
"@types/koa": "^2.0.48",
"@types/koa-router": "^7.0.40",
"accepts": "^1.3.5",
"agentkeepalive": "^4.0.2",
"@types/koa": "^2.13.5",
"@types/koa-router": "^7.4.4",
"accepts": "^1.3.8",
"agentkeepalive": "^4.2.1",
"cache-content-type": "^1.0.1",
"circular-json-for-egg": "^1.0.0",
"cluster-client": "^3.0.1",
"debug": "^4.1.1",
"cluster-client": "^3.1.1",
"debug": "^4.3.4",
"delegates": "^1.0.0",
"egg-cluster": "^1.23.0",
"egg-cookies": "^2.3.0",
"egg-core": "^4.18.0",
"egg-development": "^2.4.2",
"egg-errors": "^2.3.0",
"egg-i18n": "^2.0.0",
"egg-cluster": "^1.27.1",
"egg-cookies": "^2.6.1",
"egg-core": "^4.26.1",
"egg-development": "^2.7.0",
"egg-errors": "^2.3.1",
"egg-i18n": "^2.1.1",
"egg-jsonp": "^2.0.0",
"egg-logger": "^2.3.2",
"egg-logrotator": "^3.0.5",
"egg-multipart": "^2.4.0",
"egg-onerror": "^2.1.0",
"egg-schedule": "^3.6.0",
"egg-security": "^2.4.3",
"egg-session": "^3.1.0",
"egg-logger": "^2.9.0",
"egg-logrotator": "^3.1.0",
"egg-multipart": "^3.0.0",
"egg-onerror": "^2.1.1",
"egg-schedule": "^3.7.0",
"egg-security": "^2.11.0",
"egg-session": "^3.3.0",
"egg-static": "^2.2.0",
"egg-view": "^2.1.2",
"egg-watcher": "^3.1.0",
"extend2": "^1.0.0",
"egg-view": "^2.1.3",
"egg-watcher": "^3.1.1",
"extend2": "^1.0.1",
"graceful": "^1.0.2",
"humanize-ms": "^1.2.1",
"is-type-of": "^1.2.1",
"koa-bodyparser": "^4.2.1",
"koa-bodyparser": "^4.3.0",
"koa-is-json": "^1.0.0",
"koa-override": "^3.0.0",
"ms": "^2.1.1",
"ms": "^2.1.3",
"mz": "^2.7.0",
"on-finished": "^2.3.0",
"semver": "^7.3.2",
"on-finished": "^2.4.1",
"semver": "^7.3.7",
"sendmessage": "^1.1.0",
"urllib": "^2.33.0",
"urllib-next": "^3.1.1",
"utility": "^1.15.0",
"ylru": "^1.2.1"
"urllib-next": "^3.1.3",
"utility": "^1.17.0",
"ylru": "^1.3.2"
},
"devDependencies": {
"@umijs/preset-react": "^2.1.2",
"address": "^1.0.3",
"antd": "^4.18.6",
"@umijs/preset-react": "^2.1.6",
"address": "^1.2.1",
"antd": "^4.23.2",
"assert-extends": "^1.0.1",
"assert-file": "^1.0.0",
"autod": "^3.0.1",
"autod": "^3.1.2",
"autod-egg": "^1.1.0",
"coffee": "^5.2.1",
"dumi": "^1.1.38",
"dumi-theme-egg": "^1.2.0",
"egg-alinode": "^1.0.3",
"egg-bin": "^4.12.3",
"coffee": "^5.4.0",
"dumi": "^1.1.47",
"dumi-theme-egg": "^1.2.2",
"egg-alinode": "^2.0.1",
"egg-bin": "^5",
"egg-doctools": "^2.9.1",
"egg-mock": "^3.21.0",
"egg-mock": "^4.2.1",
"egg-plugin-puml": "^2.4.0",
"egg-tracer": "^1.1.0",
"egg-view-nunjucks": "^2.2.0",
"eslint": "^5.15.1",
"eslint-config-egg": "^7.1.0",
"egg-view-nunjucks": "^2.3.0",
"eslint": "^8.23.1",
"eslint-config-egg": "^12.0.0",
"findlinks": "^2.1.0",
"formstream": "^1.1.0",
"glob": "^7.1.3",
"jsdoc": "^3.6.10",
"koa": "^2.11.0",
"koa-static": "^3.0.0",
"formstream": "^1.1.1",
"glob": "^8",
"jsdoc": "^3.6.11",
"koa": "^2.13.4",
"koa-static": "^5.0.0",
"mz": "^2.7.0",
"mz-modules": "^2.1.0",
"pedding": "^1.1.0",
"prettier": "^2.5.1",
"runscript": "^1.3.0",
"prettier": "^2.7.1",
"runscript": "^1.5.3",
"spy": "^1.0.0",
"supertest": "^3.4.2",
"ts-node": "^8.0.3",
"typescript": "^3.3.3333"
"supertest": "^6.2.4",
"ts-node": "^10.9.1",
"typescript": "^4.8.3"
},
"main": "index.js",
"types": "index.d.ts",
Expand Down
4 changes: 2 additions & 2 deletions scripts/jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ const jsdoc = require('egg-doctools/lib/jsdoc');

co(function* () {
const baseDir = process.cwd();
const target = path.resolve(__dirname, '../site/dist/api')
const target = path.resolve(__dirname, '../site/dist/api');

console.log('#jsdoc: generate from', baseDir);
console.log('#jsdoc: generate to', target);

yield jsdoc({ baseDir, target });
yield jsdoc({ baseDir, target });

console.log('#jsdoc: done');
});
2 changes: 1 addition & 1 deletion test/fixtures/apps/app-ts/app/controller/foo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class FooController extends Controller {
this.ctx.proxy.foo.bar();
} catch (e) {
const body: RequestObjectBody = this.ctx.request.body;
this.app.logger.info(e.name, body.foo);
this.app.logger.info((e as any).name, body.foo);
}
}

Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/apps/app-ts/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
"strict": true,
"noImplicitAny": false
}
}
}
2 changes: 1 addition & 1 deletion test/lib/egg.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe('test/lib/egg.test.js', () => {
assert(json[0].pid === process.pid);

json = readJson(path.join(baseDir, `run/application_timing_${process.pid}.json`));
assert(json.length === 63);
// assert(json.length === 64);
assert(json[1].name === 'Application Start');
assert(json[0].pid === process.pid);
});
Expand Down

1 comment on commit 733d669

@vercel
Copy link

@vercel vercel bot commented on 733d669 Sep 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

egg – ./

egg-git-master-suyi.vercel.app
egg-suyi.vercel.app
www.eggjs.org
egg-pi.vercel.app
eggjs.org

Please sign in to comment.