Skip to content

Commit 57d86c8

Browse files
committed
chore: 修复ts类型错误、上传覆盖率报告
1 parent b4faab1 commit 57d86c8

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,12 @@ jobs:
4646
- name: Run Test with Coverage
4747
run: bun run test:coverage
4848

49+
# 6. 上传覆盖率报告到 Codecov
50+
- name: Upload coverage reports to Codecov
51+
uses: codecov/codecov-action@v5
52+
with:
53+
token: ${{ secrets.CODECOV_TOKEN }}
54+
4955
# 7. (可选) 上传覆盖率报告
5056
# 可以在 GitHub Actions 的 "Artifacts" 区域下载网页版报告
5157
- name: Upload Coverage Report
@@ -54,4 +60,4 @@ jobs:
5460
with:
5561
name: coverage-report
5662
path: coverage/
57-
retention-days: 7
63+
retention-days: 7

src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ export function getLines(
128128
fieldLength = position - lineStart
129129
}
130130
break
131-
// @ts-expect-error \r case below should fallthrough to \n:
132131
case ControlChars.CarriageReturn:
133132
discardTrailingNewline = true
134133
// eslint-disable-next-line no-fallthrough

src/stream.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type { IterableReadableStreamInterface }
1212
export class IterableReadableStream<T>
1313
extends ReadableStream<T>
1414
implements IterableReadableStreamInterface<T> {
15-
public reader: ReadableStreamDefaultReader<T>
15+
public reader!: ReadableStreamDefaultReader<T>
1616

1717
ensureReader() {
1818
if (!this.reader) {

0 commit comments

Comments
 (0)