Compare commits

..

11 Commits
2.9.2 ... 2.9.4

Author SHA1 Message Date
fengmk2
afa5639752 Release 2.9.4 2016-04-09 12:34:39 +08:00
fengmk2
e0213e18a0 fix: don't sync constructor package on exists mode (#883)
closes #857
2016-04-09 12:33:52 +08:00
Greenkeeper
a74d60c7eb Update utility to version 1.7.0 🚀
http://greenkeeper.io/
2016-04-07 09:22:29 +08:00
fengmk2
fcabc49d39 chore: update sponsor link 2016-04-05 23:06:48 +08:00
fengmk2
ad0722b57b Release 2.9.3 2016-04-05 22:39:37 +08:00
fengmk2
6e11a2c8a7 fix: use better diff time to check sync status
closes #858
2016-04-05 15:43:29 +08:00
Greenkeeper
0329cfad61 Update sequelize to version 3.21.0 🚀
http://greenkeeper.io/
2016-04-04 17:19:45 +08:00
Yiyu He
ede8a3ce5f Merge pull request #876 from cnpm/greenkeeper-agentkeepalive-2.1.0
Update agentkeepalive to version 2.1.0 🚀
2016-04-02 17:49:39 +08:00
greenkeeperio-bot
cde4f2179e chore(package): update agentkeepalive to version 2.1.0
http://greenkeeper.io/
2016-04-02 11:04:29 +08:00
Yiyu He
374dc17a6b Merge pull request #875 from cnpm/greenkeeper-pg-4.5.2
Update pg to version 4.5.2 🚀
2016-03-31 01:41:35 +08:00
greenkeeperio-bot
626259c379 chore(package): update pg to version 4.5.2
http://greenkeeper.io/
2016-03-31 01:33:38 +08:00
7 changed files with 31 additions and 14 deletions

View File

@@ -7,4 +7,4 @@ addons:
- postgresql: '9.3'
script: 'make test-travis-all'
after_script:
- "npm i codecov && codecov"
- 'npm i codecov && codecov'

View File

@@ -1,4 +1,19 @@
2.9.4 / 2016-04-09
==================
* fix: don't sync constructor package on exists mode (#883)
* Update utility to version 1.7.0 🚀
* chore: update sponsor link
2.9.3 / 2016-04-05
==================
* fix: use better diff time to check sync status
* Update sequelize to version 3.21.0 🚀
* chore(package): update agentkeepalive to version 2.1.0
* chore(package): update pg to version 4.5.2
2.9.2 / 2016-03-29
==================

View File

@@ -111,7 +111,7 @@ Tips: make sure your code is following the [node-style-guide](https://github.com
## Sponsors
- [![阿里云](https://static.aliyun.com/images/www-summerwind/logo.gif)](https://www.aliyun.com?from=cnpmjs.org) (2016.2 - now)
- [![阿里云](https://static.aliyun.com/images/www-summerwind/logo.gif)](http://click.aliyun.com/m/4288/) (2016.2 - now)
- [![UCloud云计算](https://www.ucloud.cn/static/style/images/about/logo.png)](http://www.ucloud.cn?sem=sdk-CNPMJS) (2015.3 - 2016.3)
## License

View File

@@ -151,5 +151,5 @@ Release [History](/history).
## Sponsors
- [![阿里云](https://static.aliyun.com/images/www-summerwind/logo.gif)](https://www.aliyun.com?from=cnpmjs.org) (2016.2 - now)
- [![阿里云](https://static.aliyun.com/images/www-summerwind/logo.gif)](http://click.aliyun.com/m/4288/) (2016.2 - now)
- [![UCloud云计算](https://www.ucloud.cn/static/style/images/about/logo.png)](http://www.ucloud.cn?sem=sdk-CNPMJS) (2015.3 - 2016.3)

View File

@@ -1,6 +1,6 @@
{
"name": "cnpmjs.org",
"version": "2.9.2",
"version": "2.9.4",
"description": "Private npm registry and web for Enterprise, base on MySQL and Simple Store Service",
"main": "index.js",
"scripts": {
@@ -13,7 +13,7 @@
"cnpmjs.org": "bin/cli.js"
},
"dependencies": {
"agentkeepalive": "~2.0.3",
"agentkeepalive": "~2.1.0",
"bytes": "~2.3.0",
"cfork": "~1.4.0",
"co": "~4.6.0",
@@ -46,12 +46,12 @@
"mysql": "~2.10.2",
"nodemailer": "~1.3.0",
"semver": "~5.1.0",
"sequelize": "~3.20.0",
"sequelize": "~3.21.0",
"thunkify-wrap": "~1.0.4",
"treekill": "~1.0.0",
"tunnel-agent": "^0.4.0",
"urllib": "~2.8.0",
"utility": "~1.6.0",
"utility": "~1.7.0",
"xss": "~0.2.10"
},
"devDependencies": {
@@ -64,7 +64,7 @@
"mocha": "*",
"node-dev": "*",
"pedding": "*",
"pg": "~4.4.2",
"pg": "~4.5.2",
"pg-hstore": "~2.3.2",
"should": "~7.1.0",
"should-http": "*",

View File

@@ -195,9 +195,11 @@ function* checkSyncStatus() {
}
var diff = Date.now() - lastSyncTime;
var oneDay = 3600000 * 24;
if (diff > oneDay) {
var err = new Error('Last sync time is expired in ' + diff + ' ms, lastSyncTime: ' + new Date(lastSyncTime));
err.name = 'SyncExpriedError';
var maxTime = Math.max(oneDay, syncInterval * 2);
if (diff > maxTime) {
var err = new Error('Last sync time is expired in ' + diff + ' ms, lastSyncTime: ' +
new Date(lastSyncTime) + ', maxTime: ' + maxTime + ' ms');
err.name = 'SyncExpiredError';
sendMailToAdmin(err, null, new Date());
}
}

View File

@@ -31,7 +31,7 @@ function intersection(arrOne, arrTwo) {
map[name] = true;
});
arrTwo.forEach(function (name) {
map[name] && results.push(name);
map[name] === true && results.push(name);
});
return results;
}
@@ -48,7 +48,7 @@ module.exports = function* sync() {
var allPackages;
if (!info.last_exist_sync_time) {
var pkgs = yield* npmService.getShort();
var pkgs = yield npmService.getShort();
debug('First time sync all packages from official registry, got %d packages', pkgs.length);
if (info.last_sync_module) {
// start from last success
@@ -74,7 +74,7 @@ module.exports = function* sync() {
fails: []
};
}
debug('Total %d packages to sync', packages.length);
debug('Total %d packages to sync, top 10: %j', packages.length, packages.slice(0, 10));
var worker = new SyncModuleWorker({
username: 'admin',