Skip to content

Commit e4fd0c6

Browse files
committed
chore(release): bump version to v1.0.0-rc9.1
1 parent 5fc96fb commit e4fd0c6

File tree

11 files changed

+38
-25
lines changed

11 files changed

+38
-25
lines changed

.npmignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ tools
1010
bower.json
1111
gulpfile.babel.js
1212
readme.txt
13+
.idea

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "avoscloud-sdk",
3-
"version": "1.0.0-rc9",
3+
"version": "1.0.0-rc9.1",
44
"homepage": "https://github.com/leancloud/javascript-sdk",
55
"authors": [
66
"killme2008 <xzhuang@leancloud.rocks>"

changelog.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
# 1.0.0-rc9 日期:2016 年 5 月 16 日
1+
# 1.0.0-rc9.1 日期:2016 年 5 月 17 日
2+
* 修复了上传文件到 COS 时报错的问题。
3+
4+
# 1.0.0-rc9 日期:2016 年 5 月 16 日
25
* 修复了错误的 `package.browser` 字段引起的部分打包工具异常。
36
* 修复浏览器中 ajax 方法中错误的转码方式。
47
* 修复 `AV.Object#get` 方法返回部分字段类型异常。

dist/av-es6.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5621,15 +5621,14 @@ module.exports = function(AV) {
56215621
data.blob.type = guessedType;
56225622
}
56235623
this._source = AV.Promise.as(data.blob, guessedType);
5624-
} else if (typeof(File) !== "undefined" && data instanceof global.File) {
5624+
} else if (typeof File !== "undefined" && data instanceof global.File) {
56255625
this._source = AV.Promise.as(data, guessedType);
5626-
} else if (avConfig.isNode && global.Buffer.isBuffer(data)) {
5626+
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(data)) {
56275627
// use global.Buffer to prevent browserify pack Buffer module
5628-
this.attributes.base64 = data.toString('base64');
5629-
this._source = AV.Promise.as(this.attributes.base64, guessedType);
56305628
this.attributes.metaData.size = data.length;
5629+
this._source = AV.Promise.as(data, guessedType);
56315630
} else if (_.isString(data)) {
5632-
throw "Creating a AV.File from a String is not yet supported.";
5631+
throw new Error("Creating a AV.File from a String is not yet supported.");
56335632
}
56345633
};
56355634

@@ -5956,6 +5955,9 @@ module.exports = function(AV) {
59565955
if (this.attributes.base64) {
59575956
data.base64 = this.attributes.base64;
59585957
return AV._request('files', this.attributes.name, null, 'POST', data);
5958+
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(file)) {
5959+
data.base64 = file.toString('base64');
5960+
return AV._request('files', this.attributes.name, null, 'POST', data);
59595961
} else {
59605962
return readAsync(file).then(function(base64) {
59615963
data.base64 = base64;
@@ -11053,6 +11055,7 @@ module.exports = function(AV) {
1105311055
'use strict';
1105411056

1105511057
const request = require('superagent');
11058+
const debug = require('debug')('cos');
1105611059
const Promise = require('../promise');
1105711060

1105811061
module.exports = function upload(uploadInfo, data, file, saveOptions = {}) {
@@ -11086,7 +11089,7 @@ module.exports = function upload(uploadInfo, data, file, saveOptions = {}) {
1108611089
return promise;
1108711090
};
1108811091

11089-
},{"../promise":33,"superagent":12}],41:[function(require,module,exports){
11092+
},{"../promise":33,"debug":4,"superagent":12}],41:[function(require,module,exports){
1109011093
/**
1109111094
* 每位工程师都有保持代码优雅的义务
1109211095
* Each engineer has a duty to keep the code elegant
@@ -13011,7 +13014,7 @@ module.exports = {
1301113014

1301213015
'use strict';
1301313016

13014-
module.exports = 'js1.0.0-rc9';
13017+
module.exports = 'js1.0.0-rc9.1';
1301513018

1301613019
},{}]},{},[20])(20)
1301713020
});

dist/av-min.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/av.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5578,13 +5578,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
55785578
this._source = AV.Promise.as(data.blob, guessedType);
55795579
} else if (typeof File !== "undefined" && data instanceof global.File) {
55805580
this._source = AV.Promise.as(data, guessedType);
5581-
} else if (avConfig.isNode && global.Buffer.isBuffer(data)) {
5581+
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(data)) {
55825582
// use global.Buffer to prevent browserify pack Buffer module
5583-
this.attributes.base64 = data.toString('base64');
5584-
this._source = AV.Promise.as(this.attributes.base64, guessedType);
55855583
this.attributes.metaData.size = data.length;
5584+
this._source = AV.Promise.as(data, guessedType);
55865585
} else if (_.isString(data)) {
5587-
throw "Creating a AV.File from a String is not yet supported.";
5586+
throw new Error("Creating a AV.File from a String is not yet supported.");
55885587
}
55895588
};
55905589

@@ -5917,6 +5916,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
59175916
if (_this2.attributes.base64) {
59185917
data.base64 = _this2.attributes.base64;
59195918
return AV._request('files', _this2.attributes.name, null, 'POST', data);
5919+
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(file)) {
5920+
data.base64 = file.toString('base64');
5921+
return AV._request('files', _this2.attributes.name, null, 'POST', data);
59205922
} else {
59215923
return readAsync(file).then(function (base64) {
59225924
data.base64 = base64;
@@ -10934,6 +10936,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1093410936
'use strict';
1093510937

1093610938
var request = require('superagent');
10939+
var debug = require('debug')('cos');
1093710940
var Promise = require('../promise');
1093810941

1093910942
module.exports = function upload(uploadInfo, data, file) {
@@ -10965,7 +10968,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1096510968
}
1096610969
return promise;
1096710970
};
10968-
}, { "../promise": 33, "superagent": 12 }], 41: [function (require, module, exports) {
10971+
}, { "../promise": 33, "debug": 4, "superagent": 12 }], 41: [function (require, module, exports) {
1096910972
/**
1097010973
* 每位工程师都有保持代码优雅的义务
1097110974
* Each engineer has a duty to keep the code elegant
@@ -12795,6 +12798,6 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
1279512798

1279612799
'use strict';
1279712800

12798-
module.exports = 'js1.0.0-rc9';
12801+
module.exports = 'js1.0.0-rc9.1';
1279912802
}, {}] }, {}, [20])(20);
1280012803
});

dist/node/file.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -374,13 +374,12 @@ module.exports = function (AV) {
374374
this._source = AV.Promise.as(data.blob, guessedType);
375375
} else if (typeof File !== "undefined" && data instanceof global.File) {
376376
this._source = AV.Promise.as(data, guessedType);
377-
} else if (avConfig.isNode && global.Buffer.isBuffer(data)) {
377+
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(data)) {
378378
// use global.Buffer to prevent browserify pack Buffer module
379-
this.attributes.base64 = data.toString('base64');
380-
this._source = AV.Promise.as(this.attributes.base64, guessedType);
381379
this.attributes.metaData.size = data.length;
380+
this._source = AV.Promise.as(data, guessedType);
382381
} else if (_.isString(data)) {
383-
throw "Creating a AV.File from a String is not yet supported.";
382+
throw new Error("Creating a AV.File from a String is not yet supported.");
384383
}
385384
};
386385

@@ -713,6 +712,9 @@ module.exports = function (AV) {
713712
if (_this2.attributes.base64) {
714713
data.base64 = _this2.attributes.base64;
715714
return AV._request('files', _this2.attributes.name, null, 'POST', data);
715+
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(file)) {
716+
data.base64 = file.toString('base64');
717+
return AV._request('files', _this2.attributes.name, null, 'POST', data);
716718
} else {
717719
return readAsync(file).then(function (base64) {
718720
data.base64 = base64;

dist/node/uploader/cos.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
'use strict';
77

88
var request = require('superagent');
9+
var debug = require('debug')('cos');
910
var Promise = require('../promise');
1011

1112
module.exports = function upload(uploadInfo, data, file) {

dist/node/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55

66
'use strict';
77

8-
module.exports = 'js1.0.0-rc9';
8+
module.exports = 'js1.0.0-rc9.1';

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "avoscloud-sdk",
3-
"version": "1.0.0-rc9",
3+
"version": "1.0.0-rc9.1",
44
"main": "./dist/node/av.js",
55
"description": "LeanCloud JavaScript SDK.",
66
"repository": {

0 commit comments

Comments
 (0)