Skip to content

Commit

Permalink
chore(release): bump version to v1.0.0-rc9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
leeyeh committed May 17, 2016
1 parent 5fc96fb commit e4fd0c6
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 25 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ tools
bower.json
gulpfile.babel.js
readme.txt
.idea
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "avoscloud-sdk",
"version": "1.0.0-rc9",
"version": "1.0.0-rc9.1",
"homepage": "https://github.com/leancloud/javascript-sdk",
"authors": [
"killme2008 <[email protected]>"
Expand Down
5 changes: 4 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# 1.0.0-rc9 日期:2016 年 5 月 16 日
# 1.0.0-rc9.1 日期:2016 年 5 月 17 日
* 修复了上传文件到 COS 时报错的问题。

# 1.0.0-rc9 日期:2016 年 5 月 16 日
* 修复了错误的 `package.browser` 字段引起的部分打包工具异常。
* 修复浏览器中 ajax 方法中错误的转码方式。
* 修复 `AV.Object#get` 方法返回部分字段类型异常。
Expand Down
17 changes: 10 additions & 7 deletions dist/av-es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -5621,15 +5621,14 @@ module.exports = function(AV) {
data.blob.type = guessedType;
}
this._source = AV.Promise.as(data.blob, guessedType);
} else if (typeof(File) !== "undefined" && data instanceof global.File) {
} else if (typeof File !== "undefined" && data instanceof global.File) {
this._source = AV.Promise.as(data, guessedType);
} else if (avConfig.isNode && global.Buffer.isBuffer(data)) {
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(data)) {
// use global.Buffer to prevent browserify pack Buffer module
this.attributes.base64 = data.toString('base64');
this._source = AV.Promise.as(this.attributes.base64, guessedType);
this.attributes.metaData.size = data.length;
this._source = AV.Promise.as(data, guessedType);
} else if (_.isString(data)) {
throw "Creating a AV.File from a String is not yet supported.";
throw new Error("Creating a AV.File from a String is not yet supported.");
}
};

Expand Down Expand Up @@ -5956,6 +5955,9 @@ module.exports = function(AV) {
if (this.attributes.base64) {
data.base64 = this.attributes.base64;
return AV._request('files', this.attributes.name, null, 'POST', data);
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(file)) {
data.base64 = file.toString('base64');
return AV._request('files', this.attributes.name, null, 'POST', data);
} else {
return readAsync(file).then(function(base64) {
data.base64 = base64;
Expand Down Expand Up @@ -11053,6 +11055,7 @@ module.exports = function(AV) {
'use strict';

const request = require('superagent');
const debug = require('debug')('cos');
const Promise = require('../promise');

module.exports = function upload(uploadInfo, data, file, saveOptions = {}) {
Expand Down Expand Up @@ -11086,7 +11089,7 @@ module.exports = function upload(uploadInfo, data, file, saveOptions = {}) {
return promise;
};

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

'use strict';

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

},{}]},{},[20])(20)
});
6 changes: 3 additions & 3 deletions dist/av-min.js

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions dist/av.js
Original file line number Diff line number Diff line change
Expand Up @@ -5578,13 +5578,12 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
this._source = AV.Promise.as(data.blob, guessedType);
} else if (typeof File !== "undefined" && data instanceof global.File) {
this._source = AV.Promise.as(data, guessedType);
} else if (avConfig.isNode && global.Buffer.isBuffer(data)) {
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(data)) {
// use global.Buffer to prevent browserify pack Buffer module
this.attributes.base64 = data.toString('base64');
this._source = AV.Promise.as(this.attributes.base64, guessedType);
this.attributes.metaData.size = data.length;
this._source = AV.Promise.as(data, guessedType);
} else if (_.isString(data)) {
throw "Creating a AV.File from a String is not yet supported.";
throw new Error("Creating a AV.File from a String is not yet supported.");
}
};

Expand Down Expand Up @@ -5917,6 +5916,9 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
if (_this2.attributes.base64) {
data.base64 = _this2.attributes.base64;
return AV._request('files', _this2.attributes.name, null, 'POST', data);
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(file)) {
data.base64 = file.toString('base64');
return AV._request('files', _this2.attributes.name, null, 'POST', data);
} else {
return readAsync(file).then(function (base64) {
data.base64 = base64;
Expand Down Expand Up @@ -10934,6 +10936,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
'use strict';

var request = require('superagent');
var debug = require('debug')('cos');
var Promise = require('../promise');

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

'use strict';

module.exports = 'js1.0.0-rc9';
module.exports = 'js1.0.0-rc9.1';
}, {}] }, {}, [20])(20);
});
10 changes: 6 additions & 4 deletions dist/node/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,13 +374,12 @@ module.exports = function (AV) {
this._source = AV.Promise.as(data.blob, guessedType);
} else if (typeof File !== "undefined" && data instanceof global.File) {
this._source = AV.Promise.as(data, guessedType);
} else if (avConfig.isNode && global.Buffer.isBuffer(data)) {
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(data)) {
// use global.Buffer to prevent browserify pack Buffer module
this.attributes.base64 = data.toString('base64');
this._source = AV.Promise.as(this.attributes.base64, guessedType);
this.attributes.metaData.size = data.length;
this._source = AV.Promise.as(data, guessedType);
} else if (_.isString(data)) {
throw "Creating a AV.File from a String is not yet supported.";
throw new Error("Creating a AV.File from a String is not yet supported.");
}
};

Expand Down Expand Up @@ -713,6 +712,9 @@ module.exports = function (AV) {
if (_this2.attributes.base64) {
data.base64 = _this2.attributes.base64;
return AV._request('files', _this2.attributes.name, null, 'POST', data);
} else if (typeof global.Buffer !== "undefined" && global.Buffer.isBuffer(file)) {
data.base64 = file.toString('base64');
return AV._request('files', _this2.attributes.name, null, 'POST', data);
} else {
return readAsync(file).then(function (base64) {
data.base64 = base64;
Expand Down
1 change: 1 addition & 0 deletions dist/node/uploader/cos.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
'use strict';

var request = require('superagent');
var debug = require('debug')('cos');
var Promise = require('../promise');

module.exports = function upload(uploadInfo, data, file) {
Expand Down
2 changes: 1 addition & 1 deletion dist/node/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

'use strict';

module.exports = 'js1.0.0-rc9';
module.exports = 'js1.0.0-rc9.1';
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "avoscloud-sdk",
"version": "1.0.0-rc9",
"version": "1.0.0-rc9.1",
"main": "./dist/node/av.js",
"description": "LeanCloud JavaScript SDK.",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/version.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

'use strict';

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

0 comments on commit e4fd0c6

Please sign in to comment.