New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

egg-boilerplate-framework

Package Overview
Dependencies
Maintainers
5
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-boilerplate-framework - npm Package Compare versions

Comparing version 1.5.2 to 2.0.0

boilerplate/test/framework.test.js

19

boilerplate/_package.json

@@ -6,17 +6,16 @@ {

"dependencies": {
"egg": "^1.4.0"
"egg": "^2.0.0"
},
"devDependencies": {
"autod": "^2.8.0",
"autod": "^3.0.1",
"autod-egg": "^1.0.0",
"egg-bin": "^3.4.0",
"egg-ci": "^1.7.0",
"egg-mock": "^3.7.0",
"eslint": "^4.0.0",
"eslint-config-egg": "^4.2.0",
"supertest": "^3.0.0",
"egg-bin": "^4.3.0",
"egg-ci": "^1.8.0",
"egg-mock": "^3.13.0",
"eslint": "^4.11.0",
"eslint-config-egg": "^5.1.0",
"webstorm-disable-index": "^1.2.0"
},
"engines": {
"node": ">=6.0.0"
"node": ">=8.0.0"
},

@@ -33,3 +32,3 @@ "scripts": {

"ci": {
"version": "6, 8"
"version": "8, 9"
},

@@ -36,0 +35,0 @@ "repository": {

@@ -20,3 +20,2 @@ 'use strict';

'eslint-config-egg',
'supertest',
'webstorm-disable-index',

@@ -23,0 +22,0 @@ ],

'use strict';
module.exports = app => (
/**
* Test Service
*/
class Test extends app.Service {
constructor(ctx) {
super(ctx);
this.config = this.app.config.test;
}
const Service = require('egg').Service;
* get(id) {
return { id, name: this.config.key };
}
class TestService extends Service {
constructor(ctx) {
super(ctx);
this.config = this.app.config.test;
}
);
async get(id) {
return { id, name: this.config.key };
}
}
module.exports = TestService;
'use strict';
module.exports = function* home() {
const data = yield this.service.test.get(123);
this.body = data.name;
};
const Controller = require('egg').Controller;
class HomeController extends Controller {
async index() {
const data = await this.service.test.get(123);
this.ctx.body = data.name;
}
}
module.exports = HomeController;
'use strict';
module.exports = app => {
app.get('/', 'home');
const { router, controller } = app;
router.get('/', controller.home.index);
};
2.0.0 / 2017-11-27
==================
* refactor: drop <8.x, support egg2. [BREAKING CHANGE] (#15)
1.5.2 / 2017-07-24

@@ -3,0 +8,0 @@ ==================

{
"name": "egg-boilerplate-framework",
"version": "1.5.2",
"version": "2.0.0",
"description": "boilerplate for egg framework",

@@ -26,7 +26,7 @@ "scripts": {

"devDependencies": {
"autod": "^2.8.0",
"autod": "^3.0.1",
"egg-ci": "^1.1.0",
"egg-init": "^1.10.0",
"eslint": "^4.0.0",
"eslint-config-egg": "^4.2.1",
"egg-init": "^1.12.0",
"eslint": "^4.11.0",
"eslint-config-egg": "^5.1.1",
"npminstall": "^2.11.2",

@@ -36,4 +36,4 @@ "webstorm-disable-index": "^1.2.0"

"ci": {
"version": "6, 8"
"version": "8, 9"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc