fis3-hook-lego
Advanced tools
Comparing version 0.2.2 to 0.2.3
20
index.js
@@ -10,8 +10,8 @@ /** | ||
fis.on('lookup:file', function(info, file) { | ||
if (file.isJsLike && info.rest) { | ||
// 不处理相对路径的文件和已经处理了的文件 | ||
if (file.isJsLike && info.rest && info.rest[0] !== '.' && !info.id) { | ||
var ret = lookup(info.rest, opts); | ||
if (ret) { | ||
info.id = ret; | ||
info.moduleId = | ||
ret.replace(/^[^\/]*\/?/, '').replace(/\.js$/,''); | ||
if (ret && ret.file) { | ||
info.id = ret.file.getId(); | ||
info.file = ret.file; | ||
} | ||
@@ -25,7 +25,2 @@ } | ||
{ | ||
location: 'lego_modules', | ||
// lego_modules/pkgName/version/subFile | ||
type: 'lego' | ||
}, | ||
{ | ||
location: 'modules', | ||
@@ -35,2 +30,7 @@ // modules/mod.js | ||
type: 'mod' | ||
}, | ||
{ | ||
location: 'lego_modules', | ||
// lego_modules/pkgName/version/subFile | ||
type: 'lego' | ||
} | ||
@@ -37,0 +37,0 @@ ] |
@@ -60,6 +60,6 @@ /** | ||
fis.log.debug('lego: get %s from <modules>', id); | ||
return _(root, id + '.js'); | ||
return fis.uri(_(root, id + '.js')); | ||
} else if (_.isFile(_(mod, id, id + '.js'))) { | ||
fis.log.debug('lego: get %s from <modules>', id + '/' + id); | ||
return _(root, id, id + '.js'); | ||
return fis.uri(_(root, id, id + '.js')); | ||
} | ||
@@ -122,3 +122,3 @@ | ||
// zepto/x.x.x/index.js index 文件 | ||
[subFile, root, 'index'].every(function(item) { | ||
[subFile, pkgName, 'index'].every(function(item) { | ||
subFile = item; | ||
@@ -133,3 +133,3 @@ return !item || !_.isFile(_(lego, pkgName, ver, item + '.js')); | ||
return _(root, pkgName, ver, subFile + '.js'); | ||
return fis.uri(_(root, pkgName, ver, subFile + '.js')); | ||
} | ||
@@ -136,0 +136,0 @@ |
{ | ||
"name": "fis3-hook-lego", | ||
"version": "0.2.2", | ||
"version": "0.2.3", | ||
"description": "lego 包管理模块查找", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
8433
0