Skip to content

Commit 26a128d

Browse files
MaizifyManiaciaChaoMaizzhangxujunzimv
authored
v3.9.2 (#463)
* feat: emit type declarations * refactor(Storage): remove `globalThis`. * fix: fix setAttribute error * fix: fetch response text bug * fix: [ios<11 bug] fetch.finally undefined & fetch multiple clones not working & fetchIOSLowBug test * chore: Use as declarations' folder. (RP #433 by @ManiaciaChao) * chore: Remove from Git tracking. * chore: fix typing error * docs: update changelog Co-authored-by: maniacata <[email protected]> Co-authored-by: Maiz <[email protected]> Co-authored-by: zhangxujun <[email protected]> Co-authored-by: zimv <[email protected]>
1 parent 954c9df commit 26a128d

16 files changed

+220
-934
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
dist
2+
typings
3+
14
# Logs
25
logs
36
*.log

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
English | [简体中文](./CHANGELOG_CN.md)
22

3+
#### 3.9.2 (2021-10-22)
4+
5+
- `Fix(Network)` Fix `Cannot read property 'setAttribute' of null` error when call `setOption()` before init. (PR #453 by @Zhangstring)
6+
- `Fix(Network)` Fix `Fetch` error when iOS < 11. (PR #457 by @zimv)
7+
- `Chore` Use `./typings` as declarations' folder. (RP #433 by @ManiaciaChao)
8+
- `Chore` Remove `./dist` from Git tracking.
9+
10+
311
#### 3.9.1 (2021-07-27)
412

513
- `Fix(Log)` Fix command input style. (PR #437 by @FredZeng)

CHANGELOG_CN.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
[English](./CHANGELOG.md) | 简体中文
22

3+
#### 3.9.2 (2021-10-22)
4+
5+
- `Fix(Network)` 修复未完成初始化时调用 `setOption()` 导致的 `Cannot read property 'setAttribute' of null`错误。 (PR #453 by @Zhangstring)
6+
- `Fix(Network)` 修复 iOS < 11 时产生的 `Fetch` 错误. (PR #457 by @zimv)
7+
- `Chore` 使用 `./typings` 作为 ts 声明目录。 (RP #433 by @ManiaciaChao)
8+
- `Chore` 从 Git 版本控制中移除 `./dist` 目录。
9+
10+
311
#### 3.9.1 (2021-07-27)
412

513
- `Fix(Log)` 修正命令行输入框样式。 (PR #437 by @FredZeng)

dev/log.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<link href="../example/lib/weui.min.css" rel="stylesheet"/>
99
<link href="../example/lib/demo.css" rel="stylesheet"/>
1010

11-
<!-- <script type="module" src="../dist/vconsole.min.js"></script> -->
12-
<script src="https://unpkg.com/vconsole/dist/vconsole.min.js"></script>
11+
<!-- <script src="../dist/vconsole.min.js"></script> -->
12+
<!-- <script src="https://unpkg.com/vconsole/dist/vconsole.min.js"></script> -->
1313
</head>
1414
<body ontouchstart>
1515
<div id="page" class="page">

dev/network.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<a onclick="getAjax()" href="javascript:;" class="weui_btn weui_btn_default">getAjax</a>
1616
<a onclick="postAjax()" href="javascript:;" class="weui_btn weui_btn_default">postAjax</a>
1717
<a onclick="getFetch()" href="javascript:;" class="weui_btn weui_btn_default">getFetch</a>
18+
<a onclick="fetchIOSLowBug()" href="javascript:;" class="weui_btn weui_btn_default">fetchIOSLowBug</a>
1819
<a onclick="getFetchSimple()" href="javascript:;" class="weui_btn weui_btn_default">getFetch(simple)</a>
1920
<a onclick="postFetch()" href="javascript:;" class="weui_btn weui_btn_default">postFetch</a>
2021
<a onclick="postFetchByRequest()" href="javascript:;" class="weui_btn weui_btn_default">postFetchByRequest</a>
@@ -101,6 +102,26 @@
101102
console.info('getFetch() End');
102103
}
103104

105+
function fetchIOSLowBug() {
106+
// need ios<11 to test
107+
console.info('fetchIOSLowBug() Start, response should be logged after End');
108+
window.fetch('./data/success.json?method=fetchGet&id=' + Math.random(), {
109+
method: 'GET',
110+
headers: {
111+
'custom-header': 'foobar',
112+
'content-type': 'application/json'
113+
},
114+
}).then((data) => {
115+
return data.clone().json();
116+
}).then((data) => {
117+
console.log('fetchIOSLowBug Response:', data);
118+
}).catch((err) => {
119+
console.error('fetchIOSLowBug bug!!!:', err);
120+
});
121+
console.info('fetchIOSLowBug() End');
122+
}
123+
124+
104125
function getFetchSimple() {
105126
console.info('getFetchSimple() Start, response should be logged after End');
106127
window.fetch('./data/success.json?type=fetchGet&id=' + Math.random()).then((data) => {

dist/vconsole.min.d.ts

Lines changed: 0 additions & 116 deletions
This file was deleted.

dist/vconsole.min.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)