Skip to content

Commit 5cd351e

Browse files
committed
Merge branch 'master' of https://github.com/shtaif/react-async-iterators into async-iter-memo
2 parents 93d372e + e5e94dd commit 5cd351e

File tree

9 files changed

+364
-274
lines changed

9 files changed

+364
-274
lines changed

.github/workflows/ci-lint-check.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI - lint check
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
lint_check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
ref: ${{ github.head_ref }}
14+
15+
- uses: ./.github/actions/ci-common-setup
16+
17+
- name: Lint check
18+
run: pnpm exec eslint --cache
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI - prettier check
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
prettier_check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
ref: ${{ github.head_ref }}
14+
15+
- uses: ./.github/actions/ci-common-setup
16+
17+
- name: Prettier check
18+
run: pnpm exec prettier --check "./{src,spec}/**/*.{ts,tsx,js,mjs,jsx}"
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI - run tests type check
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
run_tests_type_check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
ref: ${{ github.head_ref }}
14+
15+
- uses: ./.github/actions/ci-common-setup-locally-packaged
16+
17+
- name: Type-check tests code against packaged build
18+
run: pnpm run test-typings-check

.github/workflows/ci-run-tests.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI - run tests
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
run_tests:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
ref: ${{ github.head_ref }}
14+
15+
- uses: ./.github/actions/ci-common-setup-locally-packaged
16+
17+
- name: Run tests against packaged build
18+
run: pnpm test
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: CI - ts build check
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
ts_build_check:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
with:
13+
ref: ${{ github.head_ref }}
14+
15+
- uses: ./.github/actions/ci-common-setup
16+
17+
- name: TypeScript test build
18+
run: pnpm run build-check

.github/workflows/ci.yaml

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

README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,21 @@
55
<br />
66

77
<p>
8-
<a href="https://www.npmjs.com/package/react-async-iterators">
8+
<a href="https://www.npmjs.com/package/react-async-iterators" style="text-decoration: unset;">
99
<img alt="npm published version" src="https://img.shields.io/npm/v/react-async-iterators.svg?logo=npm" />
1010
</a>
11-
<a href="https://github.com/shtaif/react-async-iterators/actions/workflows/ci-tests.yaml">
12-
<img alt="" src="https://github.com/shtaif/react-async-iterators/actions/workflows/ci-tests.yaml/badge.svg" />
11+
<a href="https://github.com/shtaif/react-async-iterators/actions/workflows/ci-tests.yaml" style="text-decoration: unset;">
12+
<img alt="Tests status" src="https://github.com/shtaif/react-async-iterators/actions/workflows/ci-run-tests.yaml/badge.svg" />
1313
</a>
14-
<a href="https://github.com/shtaif/react-async-iterators/actions/workflows/ci-build-check.yaml">
15-
<img alt="" src="https://github.com/shtaif/react-async-iterators/actions/workflows/ci-build-check.yaml/badge.svg" />
14+
<a href="https://github.com/shtaif/react-async-iterators/actions/workflows/ci-build-check.yaml" style="text-decoration: unset;">
15+
<img alt="Build status" src="https://github.com/shtaif/react-async-iterators/actions/workflows/ci-ts-build-check.yaml/badge.svg" />
1616
</a>
17-
<a href="https://semver.org">
17+
<a href="https://semver.org" style="text-decoration: unset;">
1818
<img alt="semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg" />
1919
</a>
20+
<a href="https://github.com/shtaif/react-async-iterators/blob/master/LICENSE.txt" style="text-decoration: unset;">
21+
<img alt="MIT License" src="https://img.shields.io/npm/l/better-sse?color=3178c6&style=flat-square" />
22+
</a>
2023
<p>
2124

2225
Async iterables/iterators are a native language construct in JS that can be viewed as a counterpart to [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise), in the sense that while a promise asynchronously resolves one value - an async iterable is a stream that asynchronously yields any number of values.
@@ -554,7 +557,7 @@ function MyForm() {
554557
}
555558
```
556559

557-
_Play with [`useAsyncIterState`](#useasynciterstate) an interactive example:_
560+
_Play with [`useAsyncIterState`](#useasynciterstate) inside a StackBlitz playground:_
558561

559562
[![Open in StackBlitz](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://stackblitz.com/edit/react-async-iterators-example-4?file=src%2FApp.tsx)
560563

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,6 @@
7272
"prettier": "^3.4.2",
7373
"typescript": "^5.7.2",
7474
"typescript-eslint": "^8.18.0",
75-
"vitest": "~2.1.8"
75+
"vitest": "~3.0.5"
7676
}
7777
}

0 commit comments

Comments
 (0)