Skip to content

Commit 8a0ce50

Browse files
committed
chore(release): v3.0.0-beta.2
1 parent 101efd0 commit 8a0ce50

File tree

9 files changed

+68
-6
lines changed

9 files changed

+68
-6
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ after_success:
2626
./script/release.sh;
2727
./script/deploy.sh;
2828
fi
29+
- if [[ "$TRAVIS_BRANCH" == "next" ]] && [[ "${TRAVIS_PULL_REQUEST}" = "false" ]]; then
30+
./script/release.sh next-dist;
31+
fi

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": "3.0.0-beta.1",
3+
"version": "3.0.0-beta.2",
44
"homepage": "https://github.com/leancloud/javascript-sdk",
55
"authors": [
66
"LeanCloud <[email protected]>"

changelog.md

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,34 @@
1-
# 3.0.0-beta.1 (2017-02-28)
1+
# 3.0.0-beta.2 (2017-04-27)
2+
### Breaking Changes
3+
- 为了更好的隔离服务,我们为每个应用提供了独立的域名。对于小程序用户,请前往 [《小程序域名白名单配置》](https://leancloud.cn/docs/weapp-domains.html) 更新域名白名单。
4+
- 创建 `Role``acl` 参数不再是可选的。在 v2 中,如果不指定,SDK 会自动为其设置一个 public read-only 的默认 acl,在新版中必须显式的指定。
5+
<details>
6+
7+
```javascript
8+
// 之前的用法
9+
new AV.Role('admin');
10+
11+
// 新版中等价于
12+
var acl = new AV.ACL();
13+
acl.setPublicReadAccess(true);
14+
new AC.Role('admin', acl);
15+
```
16+
17+
### Features
18+
- 开放了低抽象级别的 `AV.request` 方法
19+
- 增加了 `AV.setServerURLs` 方法,允许单独配置云函数的域名
20+
<details>
21+
22+
```javascript
23+
AV.setServerURLs({
24+
engine: 'http://localhost:3000',
25+
});
26+
```
27+
28+
### Miscellanies
29+
- 包含了 v2.1.3-v2.2.1 的新特性与修复。
30+
31+
## 3.0.0-beta.1 (2017-02-28)
232
### Bug Fixes
333
- 修复了 Query 时使用 Date 类型的条件会导致查询结果异常的问题
434

@@ -46,6 +76,32 @@
4676
4777
更多背景与技术细节请参考 [#453](https://github.com/leancloud/javascript-sdk/pull/453#issue-208346693).
4878
79+
## 2.2.1 (2017-04-26)
80+
### Bug Fixes
81+
* 修复了 `User.requestLoginSmsCode`,`User.requestMobilePhoneVerify` 与 `User.requestPasswordResetBySmsCode` 方法 `authOptions.validateToken` 参数的拼写错误。
82+
83+
# 2.2.0 (2017-04-25)
84+
### Bug Fixes
85+
* 修复了 Safari 隐身模式下用户无法登录的问题
86+
87+
### Features
88+
* 短信支持图形验证码(需要在控制台应用选项「启用短信图形验证码」)
89+
* 新增 `Cloud.requestCaptcha` 与 `Cloud.verifyCaptcha` 方法请求、校验图形验证码。
90+
* `Cloud.requestSmsCode`,`User.requestLoginSmsCode`,`User.requestMobilePhoneVerify` 与 `User.requestPasswordResetBySmsCode` 方法增加了 `authOptions.validateToken` 参数。没有提供有效的 validateToken 的请求会被拒绝。
91+
* 支持客户端查询 ACL(需要在控制台应用选项启用「查询时返回值包括 ACL」)
92+
* 增加 `Query#includeACL` 方法。
93+
* `Object#fetch` 与 `File#fetch` 方法增加了 `fetchOptions.includeACL` 参数。
94+
95+
## 2.1.4 (2017-03-27)
96+
### Bug Fixes
97+
* 如果在创建 `Role` 时不指定 `acl` 参数,SDK 会自动为其设置一个「默认 acl」,这导致了通过 Query 得到或使用 `Object.createWithoutData` 方法得到 `Role` 也会被意外的设置 acl。这个版本修复了这个问题。
98+
* 修复了在 React Native for Android 中使用 blob 方式上传文件失败的问题
99+
100+
## 2.1.3 (2017-03-13)
101+
### Bug Fixes
102+
* 修复了调用 `User#refreshSessionToken` 刷新用户的 sessionToken 后本地存储中的用户没有更新的问题
103+
* 修复了初始化可能会造成 disableCurrentUser 配置失效的问题
104+
* 修复了 `Query#destroyAll` 方法 `options` 参数无效的问题
49105
50106
## 2.1.2 (2017-02-17)
51107
### Bug Fixes

package.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": "3.0.0-beta.1",
3+
"version": "3.0.0-beta.2",
44
"main": "./dist/node/index.js",
55
"description": "LeanCloud JavaScript SDK.",
66
"repository": {

script/release.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
echo "Deploy dist to dist branch.";
33
REV=`git rev-parse HEAD`;
44
BRANCH=`git rev-parse --abbrev-ref HEAD`;
5+
DIST_BRANCH=${1:-dist};
56
test "$(git config user.name)" = '' && (
67
git config user.name "leancloud-bot";
78
git config user.email "[email protected]";
89
)
910
git add dist -f;
1011
git commit -m "chore(build): build ${REV} [skip ci]";
11-
git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git ${BRANCH}:dist > /dev/null 2>&1;
12+
git push -qf https://${TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git ${BRANCH}:${DIST_BRANCH} > /dev/null 2>&1;
1213
git reset HEAD~1;
1314
echo "done.";

src/init.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ AV._setServerURLs = (urls, disableAppRouter = true) => {
144144
/**
145145
* set server URLs for services.
146146
* @function AV.setServerURLs
147+
* @since 3.0.0
147148
* @param {String|ServerURLs} urls URLs for services. if a string was given, it will be applied for all services.
148149
* You can also set them when initializing SDK with `options.serverURLs`
149150
*/

src/request.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ const handleError = (error) =>
126126
/**
127127
* Low level REST API client. Call REST endpoints with authorization headers.
128128
* @function AV.request
129+
* @since 3.0.0
129130
* @param {Object} options
130131
* @param {String} options.method HTTP method
131132
* @param {String} options.path endpoint path, e.g. `/classes/Test/55759577e4b029ae6015ac20`

src/version.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
module.exports = '3.0.0-beta.1';
1+
module.exports = '3.0.0-beta.2';

test/query.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ describe('Queries', function () {
384384
describe('All User', function () {
385385
it('should return AV.User Object list', function () {
386386
query = new AV.Query(AV.User);
387-
return query.find().then(function(results) {
387+
return query.find({ useMasterKey: true }).then(function(results) {
388388
expect(results.length > 0).to.be.ok();
389389
expect(results[0].get('username')).to.be.ok();
390390
});

0 commit comments

Comments
 (0)