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

grunt-cacheinfo

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-cacheinfo - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

2

package.json
{
"name": "grunt-cacheinfo",
"description": "cacheinfo.",
"version": "0.4.1",
"version": "0.4.2",
"author": {

@@ -6,0 +6,0 @@ "name": "bachi",

@@ -23,2 +23,4 @@ # grunt-cacheinfo

- 0.4.2
- `getPkgConfig` 优先从 `abc.json` 中拼。
- 0.4.1

@@ -25,0 +27,0 @@ - bugfix for `pathPrefix` missing `/`.

@@ -144,31 +144,30 @@ /*

}
// 校验 abc.json 是否缺少必须字段
var errorTpl = 'abc.json 中缺少 "%s" 字段或为空,请补全后重试!',
requiredKeys = ['version', 'basePath', 'baseUrl'],
errorParam = '';
if (isPkgFound) {
grunt.log.writeln('从 ' + config_url + ' 中读取到 ' + abc.name + ' 的配置信息');
return pkg;
} else {
// 校验 abc.json 是否缺少必须字段
var errorTpl = 'abc.json 中缺少 "%s" 字段或为空,请补全后重试!',
requiredKeys = ['version', 'basePath', 'baseUrl'],
errorParam = '';
requiredKeys.forEach(function (key) {
if (!abc[key]) {
errorParam = key;
return;
}
});
requiredKeys.forEach(function (key) {
if (!abc[key]) {
errorParam = key;
return;
}
});
if (errorParam) {
grunt.fail.warn(util.format(errorTpl, errorParam));
return null;
} else {
return {
name: abc.name,
version: abc.version,
type: 'h5',
main: abc.basePath,
wapUrl: 'http://h5.m.taobao.com/' + abc.baseUrl.replace(/^\//, '')
};
if (errorParam) {
grunt.fail.warn(util.format(errorTpl, errorParam));
if (isPkgFound) {
// 降级到总控去找
grunt.log.writeln('从 ' + config_url + ' 中读取到 ' + abc.name + ' 的配置信息');
return pkg;
}
} else {
// 优先取 abc.json 中配置
return {
name: abc.name,
version: abc.version,
type: 'h5',
main: abc.basePath,
wapUrl: 'http://h5.m.taobao.com/' + abc.baseUrl.replace(/^\//, '')
};
}

@@ -175,0 +174,0 @@ }

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