Skip to content

Commit 87c90e7

Browse files
authored
chore(release): bump version to v2.0.0-rc.0 (#428)
1 parent 137be69 commit 87c90e7

File tree

6 files changed

+47
-23
lines changed

6 files changed

+47
-23
lines changed

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ JavaScript SDK for [LeanCloud](http://leancloud.cn/).
1313
```
1414
// npm 安装
1515
npm install leancloud-storage --save
16-
// npm 安装 pre-release 版本
17-
npm install leancloud-storage@next --save
16+
// npm 安装 1.x 版本
17+
npm install leancloud-storage@1 --save
1818
1919
// bower 安装
2020
bower install leancloud-storage --save
@@ -48,14 +48,15 @@ bower install leancloud-storage --save
4848

4949
```
5050
├── dist // 编译之后生成的文件将会在此目录下
51-
│ ├── av-es6.js // 合并后的完整源码(ES6 版本)
52-
│ ├── av.js // 合并并编译后的完整源码(ES5 版本)
53-
│ ├── av-min.js // 合并、压缩并编译后的源码(ES5 版本)
51+
│ ├── av.js // 浏览器版本
52+
│ ├── av-min.js
53+
│ ├── av-rn.js // React Native 版本
54+
│ ├── av-weapp.js // 小程序版本
55+
│ ├── av-weapp-min.js
5456
│ ├── node // 目录中为生成的 nodejs 版本代码
5557
│ └── ...
5658
├── src
5759
│ ├── index.js // node.js 环境入口文件
58-
│ ├── browserify-wrapper // 目录中为针对 node.js 与浏览器环境之间差异的不同实现
5960
│ └── ...
6061
└── test // 单元测试
6162
```

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "leancloud-storage",
3-
"version": "2.0.0-beta.6",
3+
"version": "2.0.0-rc.0",
44
"homepage": "https://github.com/leancloud/javascript-sdk",
55
"authors": [
66
"LeanCloud <[email protected]>"

changelog.md

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
# 2.0.0-rc.0 (2016-12-30)
2+
### Breaking Changes
3+
* 移除了 Node.js 0.12 的支持,请考虑 [升级 Node.js 版本](https://www.joyent.com/blog/upgrading-nodejs)
4+
* 上传文件时不再额外地向文件的 metaData 中写入 mime_type,之前通过 metaData 获取 mime_type 的用法需要更新:
5+
<details>
6+
7+
```javascript
8+
// 之前的用法
9+
file.metaData('mime_type');
10+
11+
// 现在的用法
12+
file.get('mime_type');
13+
```
14+
* (internal) `AV._decode(key, value)` 现在变更为 `AV._decode(value[, key])`
15+
16+
### Features
17+
* 上传文件的 mime_type 现在由服务端进行判断从而支持更多的文件类型
18+
* 去掉了 `Object.destroyAll` 方法要求所有删除的对象属于同一个 Class 的限制
19+
* `Object.register()` 方法增加了第二个参数允许指定所注册的 Class 的名字,详情参见 [Object.register - API 文档](https://leancloud.github.io/javascript-sdk/docs/AV.Object.html#.register)
20+
21+
### Bug Fixes
22+
* 修复了在进行以下操作时可能出现 `URI too long` 异常的问题
23+
* 使用 `Query#containsAll``Qeruy#containedIn``Query#notContainedIn` 方法时传入了一个大数组
24+
* 使用 `Object.destroyAll` 方法批量删除大量对象
25+
* 修复了在 React Native 及小程序中使用 `AV.setProduction` 方法会导致后续操作引起 crash 的问题
26+
* 修复了 `Object.set(key, value)` 方法可能会改变(mutate)`value` 的问题
27+
* 修复了查询结果中 File 没有被正确解析的问题
28+
* 修复了 `AV.Insight.startJob` 方法中 saveAs 参数未生效的问题
29+
* 修复了抛出 code == -1 的异常时 error.message 可能缺失的问题
30+
131
## 2.0.0-beta.6 (2016-11-30)
232
### Bug Fixes
333
* 修复了 Android 微信小程序上初始化失败的问题
@@ -35,7 +65,8 @@
3565
# 2.0.0-beta.0 (2016-9-29)
3666
### Breaking Changes
3767
* 移除了所有 Backbone callbacks 回调风格的参数,请使用 Promise 处理异步操作的结果:
38-
68+
<details>
69+
3970
```javascript
4071
// Backbone callback 回调风格的参数的用法
4172
object.save(null, {
@@ -53,6 +84,7 @@
5384
* `AV.Promise` 现在是一个满足 Promises/A+ 标准的实现,所有非标准的方法已被移除,所有非标准的行为已被修正。关于标准 Promise 的更多信息推荐阅读 [《JavaScript Promise 迷你书》](http://liubin.org/promises-book/)
5485

5586
* 如果你 extend 的 `AV.Object` 子类重写了 `validate` 方法,当属性无效时现在需要 throw 一个 Error(之前是 return 一个 Error)。相应的,`AV.Object#set` 方法如果 set 的值无效,需要通过 try catch 捕获异常(之前通过检查返回值是 false)
87+
<details>
5688

5789
```javascript
5890
// 之前的用法
@@ -92,7 +124,8 @@
92124

93125
* `AV.Query#get` 方法现在尊重 Class 的 get 权限设置(之前检查的是 find 权限)
94126

95-
* `AV.User#_linkWith` 的第二个参数中的 `options.authData` 字段提升为第二个参数
127+
* (intarnal) `AV.User#_linkWith` 的第二个参数中的 `options.authData` 字段提升为第二个参数
128+
<details>
96129

97130
```javascript
98131
// 之前的用法

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "leancloud-storage",
3-
"version": "2.0.0-beta.6",
3+
"version": "2.0.0-rc.0",
44
"main": "./dist/node/index.js",
55
"description": "LeanCloud JavaScript SDK.",
66
"repository": {
@@ -69,6 +69,7 @@
6969
"./dist/node/index.js": "./dist/av-rn.js"
7070
},
7171
"typings": "./storage.d.ts",
72+
"types": "./storage.d.ts",
7273
"nyc": {
7374
"require": [
7475
"babel-register"

src/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = '2.0.0-beta.6';
1+
module.exports = '2.0.0-rc.0';

storage.d.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ declare namespace AV {
5252
*/
5353
export class ACL extends BaseObject {
5454

55-
permissionsById: any;
56-
5755
constructor(arg1?: any);
5856

5957
setPublicReadAccess(allowed: boolean): void;
@@ -226,23 +224,17 @@ declare namespace AV {
226224
createdAt: any;
227225
updatedAt: any;
228226
attributes: any;
229-
cid: string;
230227
changed: boolean;
231228
className: string;
232229

233230
constructor(className?: string, options?: any);
234231
constructor(attributes?: string[], options?: any);
235-
/**
236-
Create a local AV.Object by class name and objectId.
237-
@param {string} className class name.
238-
@param {string} objectId of the target AV.Object.
239-
@static*/
240232
static createWithoutData(className: string, objectId: string): Object;
241233
static extend(className: string, protoProps?: any, classProps?: any): any;
242234
static fetchAll<T>(list: Object[], options?: AuthOptions): Promise<T>;
243-
static fetchAllIfNeeded<T>(list: Object[], options: AuthOptions): Promise<T>;
244235
static destroyAll<T>(list: Object[], options?: Object.DestroyAllOptions): Promise<T>;
245236
static saveAll<T>(list: Object[], options?: Object.SaveAllOptions): Promise<T>;
237+
static register(klass: Function, name?: string): void;
246238

247239
initialize(): void;
248240
add(attributeName: string, item: any): Object;
@@ -253,7 +245,6 @@ declare namespace AV {
253245
clone(): Object;
254246
destroy<T>(options?: Object.DestroyOptions): Promise<T>;
255247
dirty(attr: String): boolean;
256-
dirtyKeys(): string[];
257248
escape(attr: string): string;
258249
fetch<T>(fetchOptions?: any, options?: Object.FetchOptions): Promise<T>;
259250
fetchWhenSave(enable: boolean): any;
@@ -407,7 +398,6 @@ declare namespace AV {
407398
*/
408399
export class Query extends BaseObject {
409400

410-
objectClass: any;
411401
className: string;
412402

413403
constructor(objectClass: any);
@@ -505,7 +495,6 @@ declare namespace AV {
505495
static signUp<T>(username: string, password: string, attrs: any, options?: AuthOptions): Promise<T>;
506496
static logIn<T>(username: string, password: string, options?: AuthOptions): Promise<T>;
507497
static logOut<T>(): Promise<T>;
508-
static allowCustomUserClass(isAllowed: boolean): void;
509498
static become<T>(sessionToken: string, options?: AuthOptions): Promise<T>;
510499

511500
static loginWithWeapp<T>(): Promise<T>;

0 commit comments

Comments
 (0)