Comparing version
| 2.0.0 / 2017-03-01 | ||
| ================== | ||
| * feat: move getFrameworkPath from egg-cluster (#2) | ||
| * deps: only support node >= 6.0.0 | ||
| 1.1.0 / 2017-01-13 | ||
@@ -3,0 +9,0 @@ ================== |
13
index.js
@@ -6,2 +6,8 @@ 'use strict'; | ||
| [ | ||
| require('./lib/framework'), | ||
| { getFrameworkOrEggPath }, | ||
| ] | ||
| .forEach(obj => Object.assign(exports, obj)); | ||
| /** | ||
@@ -14,5 +20,6 @@ * Try to get framework dir path | ||
| * @return {String} framework or egg dir path | ||
| * @deprecated | ||
| */ | ||
| exports.getFrameworkOrEggPath = (cwd, eggNames) => { | ||
| eggNames = eggNames || ['egg']; | ||
| function getFrameworkOrEggPath(cwd, eggNames) { | ||
| eggNames = eggNames || [ 'egg' ]; | ||
| const moduleDir = path.join(cwd, 'node_modules'); | ||
@@ -60,2 +67,2 @@ if (!fs.existsSync(moduleDir)) { | ||
| return ''; | ||
| }; | ||
| } |
| { | ||
| "name": "egg-utils", | ||
| "version": "1.1.0", | ||
| "version": "2.0.0", | ||
| "description": "Utils for all egg projects", | ||
| "main": "index.js", | ||
| "files": [ | ||
| "index.js" | ||
| "index.js", | ||
| "lib" | ||
| ], | ||
| "scripts": { | ||
| "test": "NODE_ENV=test ava", | ||
| "cov": "NODE_ENV=test nyc ava && nyc report --reporter=json --reporter=lcov", | ||
| "lint": "eslint *.js test --fix", | ||
| "lint": "eslint .", | ||
| "test": "npm run lint && ypkgfiles && egg-bin test", | ||
| "cov": "egg-bin cov", | ||
| "ci": "npm run lint && npm run cov", | ||
| "autod": "autod -w --prefix='^'" | ||
| "autod": "autod" | ||
| }, | ||
@@ -28,8 +29,8 @@ "keywords": [ | ||
| "devDependencies": { | ||
| "autod": "^2.6.1", | ||
| "ava": "^0.15.2", | ||
| "egg-ci": "^1.0.2", | ||
| "eslint": "^2.13.0", | ||
| "eslint-config-egg": "^2.0.0", | ||
| "nyc": "^6.6.1" | ||
| "autod": "^2.7.1", | ||
| "egg-bin": "^2.2.3", | ||
| "egg-ci": "^1.3.0", | ||
| "eslint": "^3.16.1", | ||
| "eslint-config-egg": "^3.2.0", | ||
| "ypkgfiles": "^1.2.0" | ||
| }, | ||
@@ -39,10 +40,6 @@ "engine": { | ||
| }, | ||
| "ava": { | ||
| "files": [ | ||
| "test/**/*.test.js" | ||
| ] | ||
| }, | ||
| "ci": { | ||
| "version": "6, 7" | ||
| "version": "6, 7", | ||
| "license": true | ||
| } | ||
| } |
Sorry, the diff of this file is not supported yet
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
6577
36.14%6
20%98
92.16%5
66.67%