Skip to content

Commit 551782c

Browse files
committed
Merge branch 'master' into chore/upgrade-pulldown-cmark
# Conflicts: # Cargo.toml
2 parents 2b69693 + 564c80b commit 551782c

File tree

303 files changed

+7408
-11771
lines changed

Some content is hidden

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

303 files changed

+7408
-11771
lines changed

.eslintrc.json

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"node": true,
5+
"es6": true
6+
},
7+
"extends": "eslint:recommended",
8+
"globals": {
9+
"module": "readonly",
10+
"require": "readonly"
11+
},
12+
"parserOptions": {
13+
"ecmaVersion": 2021,
14+
"requireConfigFile": false,
15+
"sourceType": "module"
16+
},
17+
"ignorePatterns": ["**min.js", "**/highlight.js", "**/playground_editor/*"],
18+
"rules": {
19+
"indent": [
20+
"error",
21+
4
22+
],
23+
"linebreak-style": [
24+
"error",
25+
"unix"
26+
],
27+
"quotes": [
28+
"error",
29+
"single"
30+
],
31+
"semi": [
32+
"error",
33+
"always"
34+
],
35+
"brace-style": [
36+
"error",
37+
"1tbs",
38+
{ "allowSingleLine": false }
39+
],
40+
"curly": "error",
41+
"no-trailing-spaces": "error",
42+
"no-multi-spaces": "error",
43+
"keyword-spacing": [
44+
"error",
45+
{ "before": true, "after": true }
46+
],
47+
"comma-spacing": [
48+
"error",
49+
{ "before": false, "after": true }
50+
],
51+
"arrow-spacing": [
52+
"error",
53+
{ "before": true, "after": true }
54+
],
55+
"key-spacing": [
56+
"error",
57+
{ "beforeColon": false, "afterColon": true, "mode": "strict" }
58+
],
59+
"func-call-spacing": ["error", "never"],
60+
"space-infix-ops": "error",
61+
"space-before-function-paren": ["error", "never"],
62+
"space-before-blocks": "error",
63+
"no-console": [
64+
"error",
65+
{ "allow": ["warn", "error"] }
66+
],
67+
"comma-dangle": ["error", "always-multiline"],
68+
"comma-style": ["error", "last"],
69+
"max-len": ["error", { "code": 100, "tabWidth": 2 }],
70+
"eol-last": ["error", "always"],
71+
"no-extra-parens": "error",
72+
"arrow-parens": ["error", "as-needed"],
73+
"no-unused-vars": [
74+
"error",
75+
{
76+
"argsIgnorePattern": "^_",
77+
"varsIgnorePattern": "^_"
78+
}
79+
],
80+
"prefer-const": ["error"],
81+
"no-var": "error",
82+
"eqeqeq": "error"
83+
},
84+
"overrides": [
85+
{
86+
"files": [
87+
"tests/**/*.js"
88+
],
89+
"env": {
90+
"jest": true,
91+
"node": true
92+
}
93+
}
94+
]
95+
}

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@
66
*.ttf binary
77
*.otf binary
88
*.png binary
9+
*.eot binary
10+
*.woff2 binary

.github/workflows/deploy.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ jobs:
1717
matrix:
1818
include:
1919
- target: aarch64-unknown-linux-musl
20-
os: ubuntu-20.04
20+
os: ubuntu-22.04
2121
- target: x86_64-unknown-linux-gnu
22-
os: ubuntu-20.04
22+
os: ubuntu-22.04
2323
- target: x86_64-unknown-linux-musl
24-
os: ubuntu-20.04
24+
os: ubuntu-22.04
2525
- target: x86_64-apple-darwin
2626
os: macos-latest
27+
- target: aarch64-apple-darwin
28+
os: macos-latest
2729
- target: x86_64-pc-windows-msvc
2830
os: windows-latest
2931
name: Deploy ${{ matrix.target }}
@@ -46,7 +48,7 @@ jobs:
4648
run: rustup update stable --no-self-update && rustup default stable
4749
- name: Build book
4850
run: cargo run -- build guide
49-
- name: Deploy to GitHub
51+
- name: Deploy the User Guide to GitHub Pages using the gh-pages branch
5052
env:
5153
GITHUB_DEPLOY_KEY: ${{ secrets.GITHUB_DEPLOY_KEY }}
5254
run: |

.github/workflows/main.yml

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
rust: nightly
2323
target: x86_64-unknown-linux-gnu
2424
- name: stable x86_64-unknown-linux-musl
25-
os: ubuntu-20.04
25+
os: ubuntu-22.04
2626
rust: stable
2727
target: x86_64-unknown-linux-musl
2828
- name: stable x86_64 macos
@@ -38,9 +38,9 @@ jobs:
3838
rust: stable
3939
target: x86_64-pc-windows-msvc
4040
- name: msrv
41-
os: ubuntu-20.04
41+
os: ubuntu-22.04
4242
# sync MSRV with docs: guide/src/guide/installation.md and Cargo.toml
43-
rust: 1.74.0
43+
rust: 1.81.0
4444
target: x86_64-unknown-linux-gnu
4545
name: ${{ matrix.name }}
4646
steps:
@@ -53,7 +53,7 @@ jobs:
5353
run: cargo test --no-default-features --target ${{ matrix.target }}
5454

5555
aarch64-cross-builds:
56-
runs-on: ubuntu-20.04
56+
runs-on: ubuntu-22.04
5757
steps:
5858
- uses: actions/checkout@v4
5959
- name: Install Rust
@@ -70,6 +70,46 @@ jobs:
7070
run: rustup update stable && rustup default stable && rustup component add rustfmt
7171
- run: cargo fmt --check
7272

73+
gui:
74+
name: GUI tests
75+
runs-on: ubuntu-latest
76+
steps:
77+
- uses: actions/checkout@v4
78+
- name: Install Rust
79+
run: bash ci/install-rust.sh stable x86_64-unknown-linux-gnu
80+
- name: Install npm
81+
uses: actions/setup-node@v3
82+
with:
83+
node-version: 20
84+
- name: Install browser-ui-test
85+
run: npm install
86+
- name: Run eslint
87+
run: npm run lint
88+
- name: Build and run tests (+ GUI)
89+
run: cargo test --locked --target x86_64-unknown-linux-gnu --test gui
90+
91+
# Ensure there are no clippy warnings
92+
clippy:
93+
runs-on: ubuntu-latest
94+
steps:
95+
- uses: actions/checkout@v4
96+
- name: Install Rust
97+
run: bash ci/install-rust.sh stable x86_64-unknown-linux-gnu
98+
- run: rustup component add clippy
99+
- run: cargo clippy --workspace --all-targets --no-deps -- -D warnings
100+
101+
docs:
102+
name: Check API docs
103+
runs-on: ubuntu-latest
104+
steps:
105+
- uses: actions/checkout@v4
106+
- name: Install Rust
107+
run: bash ci/install-rust.sh stable x86_64-unknown-linux-gnu
108+
- name: Ensure intradoc links are valid
109+
run: cargo doc --workspace --document-private-items --no-deps
110+
env:
111+
RUSTDOCFLAGS: -D warnings
112+
73113
# The success job is here to consolidate the total success/failure state of
74114
# all other jobs. This job is then included in the GitHub branch protection
75115
# rule which prevents merges unless all other jobs are passing. This makes
@@ -81,6 +121,10 @@ jobs:
81121
needs:
82122
- test
83123
- rustfmt
124+
- aarch64-cross-builds
125+
- gui
126+
- clippy
127+
- docs
84128
runs-on: ubuntu-latest
85129
steps:
86130
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ guide/book
99
.vscode
1010
tests/dummy_book/book/
1111
test_book/book/
12+
tests/testsuite/*/*/book/
1213

1314
# Ignore Jetbrains specific files.
1415
.idea/
1516

1617
# Ignore Vim temporary and swap files.
1718
*.sw?
1819
*~
20+
21+
# GUI tests
22+
node_modules
23+
package-lock.json
24+
package.json

0 commit comments

Comments
 (0)