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

kmc

Package Overview
Dependencies
Maintainers
2
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kmc - npm Package Compare versions

Comparing version 1.0.33 to 1.0.34

test/src/package1/kissy-sub-module.js

6

HISTORY.md

@@ -0,1 +1,7 @@

## 2014.02.20, Version 1.0.34(Stable)
### bugfix
- 如果模块没有找到,仍然加到依赖关系中,模块的包默认为unknown
## 2014.01.18, Version 1.0.33(Stable)

@@ -2,0 +8,0 @@

6

lib/compiler.js

@@ -99,3 +99,3 @@ /**

var lastPath = path.resolve(path.dirname(parentModule.path), utils.addPathSuffix(requiredModule));
return fs.existsSync(lastPath) ? lastPath : false;
return fs.existsSync(lastPath) ? lastPath : requiredModule;
};

@@ -272,6 +272,6 @@ Compiler.prototype._getModuleRealPathByPkg = function(filePath, pkg){

case null:
!self.config.silent && console.log('cannot get package for %s, use the first path in require path instead.', inputFilePath);
!self.config.silent && console.log('cannot get package for %s, guess it is kissy module.', inputFilePath);
mod = {
name: inputFilePath,
pkg: self._getModuleNameFromRequire(inputFilePath),
pkg: 'unknown' || self._getModuleNameFromRequire(inputFilePath),
status: 'missing'

@@ -278,0 +278,0 @@ };

{
"name": "kmc",
"version": "1.0.33",
"version": "1.0.34",
"description": "KISSY Module Compiler",

@@ -5,0 +5,0 @@ "author": {

@@ -1206,2 +1206,36 @@ /**

});
});
describe('When use kissy sub modules', function(){
var result;
var inputFile = path.resolve(srcPath, 'package1/kissy-sub-module.js'),
outputFile = path.resolve(distPath, 'package1/kissy-sub-module.js');
before(function(){
ModuleCompiler.config({
packages: {
package1: {
base: srcPath,
charset: 'gbk'
}
},
silent: true,
charset: 'gbk'
});
result = ModuleCompiler.build({
src: inputFile,
dest: outputFile,
depPath: path.resolve(distPath, 'package1/kissy-sub-module.map.js'),
});
});
after(function(){
ModuleCompiler.clean();
});
it('should have proper modules', function(){
var file = result.files[0];
console.log(file);
file.autoCombo['package1/kissy-sub-module'].length.should.equal(4);
});
});

Sorry, the diff of this file is not supported yet

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