Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fis3-hook-lego

Package Overview
Dependencies
Maintainers
4
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fis3-hook-lego - npm Package Compare versions

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": [

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