Socket
Socket
Sign inDemoInstall

egg-core

Package Overview
Dependencies
Maintainers
4
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-core - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

test/fixtures/realpath/a/package.json

5

History.md
0.2.1 / 2016-08-18
==================
* fix: resolve the realpath of plugin path (#11)
0.2.0 / 2016-08-17

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

2

lib/loader/mixin/plugin.js

@@ -311,3 +311,3 @@ 'use strict';

if (fs.existsSync(dir)) {
return dir;
return fs.realpathSync(dir);
}

@@ -314,0 +314,0 @@ }

{
"name": "egg-core",
"version": "0.2.0",
"version": "0.2.1",
"description": "A core Plugable framework based on koa",

@@ -43,2 +43,3 @@ "main": "index.js",

"pedding": "^1.0.0",
"rimraf": "^2.5.4",
"should": "^11.1.0",

@@ -45,0 +46,0 @@ "supertest": "^2.0.0"

@@ -5,3 +5,5 @@ 'use strict';

const path = require('path');
const fs = require('fs');
const mm = require('mm');
const rimraf = require('rimraf');
const utils = require('../../utils');

@@ -374,2 +376,13 @@

});
it('should resolve the realpath of plugin path', () => {
rimraf.sync(utils.getFilepath('realpath/node_modules/a'));
fs.symlinkSync('../a', utils.getFilepath('realpath/node_modules/a'), 'dir');
app = utils.createApp('realpath');
const loader = app.loader;
loader.loadPlugin();
const plugin = loader.plugins.a;
plugin.name.should.equal('a');
plugin.path.should.equal(utils.getFilepath('realpath/a'));
});
});
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