Skip to content

Commit 07ce254

Browse files
committed
feat(baselib): update to 2.10.2
1 parent 8dfd396 commit 07ce254

17 files changed

+16791
-7269
lines changed

.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# npm
2+
node_modules
3+
4+
# OS X
5+
.DS_Store*
6+
Icon?
7+
._*

.travis.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
language: node_js
2+
node_js:
3+
- "lts/*"
4+
script: npm run test

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
## 2020-02-26 v2.10.2
2+
- 同步 API 定义到基础库 2.10.2
3+
- 将命名空间从 `wx` 更改为更正式的 `WechatMinigame`,这是一个 **破坏性改动**,原本字面上引用了 `wx` 命名空间的代码可能失效
4+
- 添加自动化测试

README-en.md

+18-6
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
> [中文版本](./README.md)
44
5-
[![](https://img.shields.io/npm/v/minigame-api-typings.svg?style=flat)](https://www.npmjs.com/package/minigame-api-typings)
6-
[![](https://img.shields.io/github/license/wechat-miniprogram/minigame-api-typings.svg)](https://github.com/wechat-miniprogram/minigame-api-typings)
5+
[![Published on NPM](https://img.shields.io/npm/v/minigame-api-typings.svg?style=flat)](https://www.npmjs.com/package/minigame-api-typings)
6+
[![MIT License](https://img.shields.io/github/license/wechat-miniprogram/minigame-api-typings.svg)](https://github.com/wechat-miniprogram/minigame-api-typings)
7+
[![Travis CI Test Status](https://travis-ci.org/wechat-miniprogram/minigame-api-typings.svg?branch=master)](https://travis-ci.org/wechat-miniprogram/minigame-api-typings)
78

89
Type definitions for APIs of Wechat Mini Game in TypeScript
910

@@ -24,11 +25,22 @@ npm install [email protected]
2425

2526
## Versions
2627

27-
Base Library version|npm version|command
28-
-|-|-
29-
[v2.6.5](https://developers.weixin.qq.com/miniprogram/dev/framework/release.html#v265-20190402) | [2.6.5](https://www.npmjs.com/package/minigame-api-typings/v/2.6.5) | `npm install [email protected]`
28+
Check out all available versions corresponding to base library version in [VERSIONS.md](https://github.com/wechat-miniprogram/minigame-api-typings/blob/master/VERSIONS.md)
29+
30+
## Changelog
31+
32+
See [CHANGELOG.md](https://github.com/wechat-miniprogram/minigame-api-typings/blob/master/CHANGELOG.md) (Chinese only)
3033

3134

3235
## Contribution
3336

34-
Since definitions are auto-generated together with [documentations](https://developers.weixin.qq.com/miniprogram/dev/index.html), all PRs will __not__ be merged. If you have any bug reports or suggestions, create an issue instead. Thanks for contributing!
37+
Definitions of Wechat APIs (`lib.wx.api.d.ts`) are auto-generated together with our [documentations](https://developers.weixin.qq.com/minigame/en/dev/api/), therefore PRs including that file will __not__ be merged. If you found some APIs defined wrongly, create an issue instead.
38+
39+
40+
### Automated tests
41+
42+
We use [`tsd`](https://github.com/SamVerschueren/tsd) to check if this definition is working properly. All test cases are under folder `test`.
43+
44+
To perform an automated test, clone this repo, `npm install --save-dev` and `npm test`.
45+
46+
If you have test case that fails the test, an issue or PR will be great. Strong test case that passes are also welcomed.

README.md

+16-6
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
> [English version](./README-en.md)
44
5-
[![](https://img.shields.io/npm/v/minigame-api-typings.svg?style=flat)](https://www.npmjs.com/package/minigame-api-typings)
6-
[![](https://img.shields.io/github/license/wechat-miniprogram/minigame-api-typings.svg)](https://github.com/wechat-miniprogram/minigame-api-typings)
5+
[![已在 NPM 发布](https://img.shields.io/npm/v/minigame-api-typings.svg?style=flat)](https://www.npmjs.com/package/minigame-api-typings)
6+
[![MIT 协议](https://img.shields.io/github/license/wechat-miniprogram/minigame-api-typings.svg)](https://github.com/wechat-miniprogram/minigame-api-typings)
7+
[![Travis CI 测试状况](https://travis-ci.org/wechat-miniprogram/minigame-api-typings.svg?branch=master)](https://travis-ci.org/wechat-miniprogram/minigame-api-typings)
78

89
微信小游戏 API 的 TypeScript 类型定义文件
910

@@ -23,11 +24,20 @@ npm install [email protected]
2324

2425
## 版本
2526

26-
基础库版本|npm 版本|命令
27-
-|-|-
28-
[v2.6.5](https://developers.weixin.qq.com/miniprogram/dev/framework/release.html#v265-20190402) | [2.6.5](https://www.npmjs.com/package/minigame-api-typings/v/2.6.5) | `npm install [email protected]`
27+
所有可用的版本和对应的基础库版本,参考 [VERSIONS.md](https://github.com/wechat-miniprogram/minigame-api-typings/blob/master/VERSIONS.md)
2928

29+
## 更新日志
30+
31+
参考 [CHANGELOG.md](https://github.com/wechat-miniprogram/mingame-api-typings/blob/master/CHANGELOG.md)
3032

3133
## 贡献
3234

33-
定义文件是随 [文档](https://developers.weixin.qq.com/miniprogram/dev/index.html) 一起自动生成的,所以所有的 PR 都将 __不会__ 被接受。如果您有 bug 反馈或建议,请提一个 issue 给我们。非常感谢!
35+
API 的定义文件(`lib.wx.api.d.ts`)是随 [文档](https://developers.weixin.qq.com/minigame/dev/api/) 一起自动生成的,如果发现了 API 接口的定义错误,请提一个 issue 给我们,关于 API 的 PR 将 __不会__ 被接受。
36+
37+
### 测试
38+
39+
本定义文件使用 [`tsd`](https://github.com/SamVerschueren/tsd) 进行测试,所有的测试样例放在 `test` 目录下。
40+
41+
想执行测试的话,克隆本项目并完成 `npm install --save-dev` 后执行 `npm test` 即可。
42+
43+
如果您发现了不能通过自动化测试的测试样例,可以提交 PR 或者提一个 issue。当然,能通过自动化测试的强有力的测试样例也是欢迎的。

VERSIONS.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
## 所有可用版本
2+
3+
基础库版本|npm 版本|命令
4+
-|-|-
5+
[v2.10.2](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-10-2-2020-02-20) | [2.10.2](https://www.npmjs.com/package/miniprogram-api-typings/v/2.10.2) | `npm install [email protected]`
6+
[v2.6.5](https://developers.weixin.qq.com/miniprogram/dev/framework/release/#v2-6-5-2019-04-02) | [2.6.5](https://www.npmjs.com/package/minigame-api-typings/v/2.6.5) | `npm install [email protected]`

0 commit comments

Comments
 (0)