Comparing version 0.2.0 to 0.2.1
0.2.1 / 2016-08-18 | ||
================== | ||
* fix: resolve the realpath of plugin path (#11) | ||
0.2.0 / 2016-08-17 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -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')); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
142105
297
4491
12
36