Skip to content

Commit 22d9509

Browse files
committed
Merge remote-tracking branch 'upstream/master' into feature/opt-keyed-diff-fix
2 parents 8d9c818 + e0508cf commit 22d9509

396 files changed

Lines changed: 10191 additions & 8227 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.firebaserc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
{
22
"projects": {
33
"default": "yew-rs"
4+
},
5+
"targets": {
6+
"yew-rs": {
7+
"hosting": {
8+
"website": [
9+
"yew-rs"
10+
],
11+
"examples": [
12+
"yew-rs-examples"
13+
]
14+
}
15+
}
416
}
517
}

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,15 @@
11
#### Description
22

3-
<!-- Please include a summary of the change and which issue is fixed. -->
3+
<!-- Please include a summary of the change. -->
44

5-
Fixes # (issue)
5+
Fixes #0000 <!-- replace with issue number or remove if not applicable -->
66

7-
#### Checklist:
7+
#### Checklist
88

9-
- [ ] I have run `./ci/run_stable_checks.sh`
9+
<!-- For further details, please read CONTRIBUTING.md -->
10+
11+
- [ ] I have run `cargo make pr-flow`
1012
- [ ] I have reviewed my own code
1113
- [ ] I have added tests
12-
<!-- If this is a bug fix, these tests will fail if the bug is present (to stop it from cropping up again) -->
13-
<!-- If this is a feature, my tests prove that the feature works -->
14-
15-
<!-- Testing instructions -->
16-
<!-- Check out the link below on how to setup and run tests -->
17-
<!-- https://github.com/yewstack/yew/blob/master/CONTRIBUTING.md#test -->
18-
<!-- If you're not sure how to test, let us know and we can provide guidance :) -->
19-
20-
<!-- Benchmark instructions -->
21-
<!-- 1. Fork and clone https://github.com/yewstack/js-framework-benchmark -->
22-
<!-- 2. Update `frameworks/yew/Cargo.toml` with your fork of Yew and the branch for this PR -->
23-
<!-- 3. Open a new PR with your `Cargo.toml` changes -->
24-
<!-- 4. Paste a link to the benchmark results: -->
25-
<!-- - [ ] I have opened a PR against https://github.com/yewstack/js-framework-benchmark -->
14+
<!-- If this is a bug fix, these tests will fail if the bug is present (to stop it from cropping up again) -->
15+
<!-- If this is a feature, my tests prove that the feature works -->

.github/workflows/autopublish.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build website
2+
on:
3+
pull_request:
4+
branches: [master]
5+
paths:
6+
- "docs/**"
7+
- "website/**"
8+
# firebase.json has no effect here
9+
push:
10+
branches: [master]
11+
paths:
12+
- "docs/**"
13+
- "website/**"
14+
- "firebase.json"
15+
16+
jobs:
17+
build:
18+
runs-on: ubuntu-latest
19+
env:
20+
PR_INFO_FILE: ".PR_INFO"
21+
steps:
22+
- uses: actions/checkout@v2
23+
- name: Setup node
24+
uses: actions/setup-node@v1
25+
with:
26+
node-version: "12.x"
27+
28+
- name: Build
29+
run: |
30+
cd website
31+
npm install
32+
npm run build
33+
34+
- name: Upload build artifact
35+
uses: actions/upload-artifact@v2
36+
with:
37+
name: website
38+
path: website/build/yew
39+
retention-days: 1
40+
41+
- if: github.event_name == 'pull_request'
42+
name: Build pr info
43+
run: |
44+
echo "${{ github.event.number }}" > $PR_INFO_FILE
45+
46+
- if: github.event_name == 'pull_request'
47+
name: Upload pr info
48+
uses: actions/upload-artifact@v2
49+
with:
50+
name: pr-info
51+
path: "${{ env.PR_INFO_FILE }}"
52+
retention-days: 1

.github/workflows/doctests.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Publish Examples
2+
on:
3+
push:
4+
branches: [master]
5+
6+
jobs:
7+
publish:
8+
runs-on: ubuntu-latest
9+
env:
10+
# leave empty for /
11+
PUBLIC_URL_PREFIX: ""
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions-rs/toolchain@v1
16+
with:
17+
toolchain: stable
18+
target: wasm32-unknown-unknown
19+
override: true
20+
profile: minimal
21+
22+
- uses: actions/cache@v2
23+
with:
24+
path: |
25+
~/.cargo/registry
26+
~/.cargo/git
27+
target
28+
key: cargo-${{ runner.os }}-${{ hashFiles('**/Cargo.toml') }}
29+
restore-keys: |
30+
cargo-${{ runner.os }}-
31+
32+
- name: Install trunk
33+
run: |
34+
brew install trunk
35+
cargo install wasm-bindgen-cli
36+
37+
- name: Build examples
38+
run: |
39+
output="$(pwd)/dist"
40+
41+
for path in examples/*; do
42+
if [[ ! -d $path ]]; then
43+
continue
44+
fi
45+
46+
example=$(basename "$path")
47+
48+
# multi_thread doesn't work yet. See <https://github.com/thedodd/trunk/issues/40>.
49+
if [[ "$example" == "multi_thread" ]]; then
50+
continue
51+
fi
52+
53+
echo "building: $example"
54+
(
55+
cd "$path"
56+
dist_dir="$output/$example"
57+
58+
trunk build --release --dist "$dist_dir" --public-url "$PUBLIC_URL_PREFIX/$example"
59+
)
60+
done
61+
62+
- name: Deploy to Firebase
63+
uses: siku2/action-hosting-deploy@v0
64+
with:
65+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
66+
firebaseToken: "${{ secrets.FIREBASE_TOKEN }}"
67+
channelId: live
68+
targets: examples
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Publish website
2+
on:
3+
workflow_run:
4+
workflows: ["Build website"]
5+
types:
6+
- completed
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
env:
12+
PR_INFO_FILE: ".PR_INFO"
13+
steps:
14+
- if: github.event.workflow_run.conclusion != 'success'
15+
name: Abort if build failed
16+
run: |
17+
echo "build failed"
18+
exit 1
19+
20+
# need to checkout to get "firebase.json", ".firebaserc"
21+
- uses: actions/checkout@v2
22+
23+
- name: Download build artifact
24+
uses: dawidd6/action-download-artifact@v2
25+
with:
26+
github_token: "${{ secrets.GITHUB_TOKEN }}"
27+
workflow: build-website.yml
28+
run_id: ${{ github.event.workflow_run.id }}
29+
name: website
30+
path: website/build/yew
31+
32+
- if: github.event.workflow_run.event == 'pull_request'
33+
name: Download pr info
34+
uses: dawidd6/action-download-artifact@v2
35+
with:
36+
github_token: "${{ secrets.GITHUB_TOKEN }}"
37+
workflow: build-website.yml
38+
run_id: ${{ github.event.workflow_run.id }}
39+
name: pr-info
40+
41+
- if: github.event.workflow_run.event == 'pull_request'
42+
name: Apply pull request environment
43+
run: |
44+
pr_number=$(cat "$PR_INFO_FILE")
45+
if ! [[ "$pr_number" =~ ^[0-9]+$ ]]; then
46+
echo "pr number invalid"
47+
exit 1
48+
fi
49+
echo "PR_NUMBER=$pr_number" >> $GITHUB_ENV
50+
echo "PR_BRANCH=${{ github.event.workflow_run.head_branch }}" >> $GITHUB_ENV
51+
echo "COMMIT_SHA=${{ github.event.workflow_run.head_sha }}" >> $GITHUB_ENV
52+
53+
- if: github.event.workflow_run.event == 'push'
54+
name: Apply push environment
55+
run: |
56+
echo "CHANNEL_ID=live" >> $GITHUB_ENV
57+
58+
- name: Deploy to Firebase
59+
uses: siku2/action-hosting-deploy@v1
60+
with:
61+
repoToken: "${{ secrets.GITHUB_TOKEN }}"
62+
firebaseToken: "${{ secrets.FIREBASE_TOKEN }}"
63+
targets: website
64+
channelId: "${{ env.CHANNEL_ID }}"
65+
# link to the next version because that's what we care about
66+
commentURLPath: "/docs/next/"
67+
# PR information
68+
prNumber: "${{ env.PR_NUMBER }}"
69+
prBranchName: "${{ env.PR_BRANCH }}"
70+
commitSHA: "${{ env.COMMIT_SHA }}"

.github/workflows/pull-request.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ jobs:
8282
8383
doc_tests:
8484
name: Documentation Tests
85-
runs-on: ubuntu-latest
85+
# Using 20.04 because 18.04 (latest) only has aspell 0.60.7 and we need 0.60.8
86+
runs-on: ubuntu-20.04
8687
steps:
8788
- uses: actions/checkout@v2
8889
- uses: actions-rs/toolchain@v1
@@ -102,6 +103,11 @@ jobs:
102103
restore-keys: |
103104
cargo-${{ runner.os }}-
104105
106+
- name: Check spelling
107+
run: |
108+
sudo apt-get install aspell
109+
ci/spellcheck.sh list
110+
105111
- name: Run doctest
106112
uses: actions-rs/cargo@v1
107113
with:
@@ -160,15 +166,6 @@ jobs:
160166
restore-keys: |
161167
cargo-${{ runner.os }}-
162168
163-
# FIXME: Only needed because of <https://github.com/rustwasm/wasm-bindgen/issues/2261>
164-
- name: Install geckodriver
165-
run: |
166-
cd ~
167-
mkdir geckodriver
168-
curl --retry 5 -LO https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-linux64.tar.gz
169-
tar -xzf geckodriver-*-linux64.tar.gz -C geckodriver
170-
echo "::add-path::$HOME/geckodriver"
171-
172169
- name: Run tests - yew
173170
env:
174171
HTTPBIN_URL: "http://localhost:8080"

.gitignore

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
target
2-
**/*.rs.bk
1+
target/
32
Cargo.lock
4-
orig.*
5-
/.idea
6-
/.vscode
7-
/cmake-build-debug
8-
/website/yarn.lock
9-
/website/node_modules
10-
/website/package-lock.json
3+
4+
# backup files generated by rustfmt
5+
**/*.rs.bk
6+
7+
# editor config directories
8+
/.idea/
9+
/.vscode/

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## **0.17.4** *(2020-10-18)*
4+
5+
#### Changelog
6+
7+
- #### 🛠 Fixes
8+
9+
- Fixed a "call stack exceeded" panic that occurred if a `Component` was updated many times [[@jstarry], [#1624](https://github.com/yewstack/yew/pull/1624)]
10+
311
## **0.17.3** *(2020-08-16)*
412

513
#### Changelog

0 commit comments

Comments
 (0)