Skip to content

Commit 31068d1

Browse files
committed
fix: latest
2 parents 3e8c58a + a44ad1c commit 31068d1

465 files changed

Lines changed: 33282 additions & 22578 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.

.github/ISSUE_TEMPLATE/issue-template.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,46 @@ about: Custom Template
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
98

109
## Type
10+
1111
- [ ] Bug
1212
- [ ] Feature
1313
- [ ] Other
1414

1515
## Description
16+
1617
<!-- Describe the issue or feature request -->
1718

1819
## Current Behavior
20+
1921
<!-- For bugs: What happens? For features: Current limitations? -->
2022

2123
## Expected Behavior
24+
2225
<!-- What should happen? -->
2326

2427
## Steps to Reproduce
28+
2529
<!-- For bugs only -->
26-
1.
27-
2.
30+
31+
1.
32+
2.
2833
3.
2934

3035
## Environment
36+
3137
- SuperDoc Version:
3238
- Browser & Version:
3339
- OS:
3440

3541
## Additional Context
42+
3643
<!-- Error messages, screenshots, code examples -->
3744

3845
## Checklist
46+
3947
- [ ] Tested with latest version
4048
- [ ] Checked for duplicates
4149
- [ ] Added relevant labels

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "npm"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
ignore:
8+
- dependency-name: "pdfjs-dist"
9+
- dependency-name: "@hocuspocus/provider"

.github/workflows/ci.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: [main, develop]
6+
push:
7+
branches: [main, develop]
8+
workflow_dispatch: # Allow manual triggers
9+
10+
jobs:
11+
lint-and-format:
12+
name: Lint & Format Check
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0 # Full history for commitlint
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: 22
23+
cache: npm
24+
25+
- name: Install dependencies
26+
run: npm ci
27+
28+
- name: Check formatting
29+
run: npm run format:check
30+
31+
- name: Run ESLint
32+
run: npm run lint
33+
34+
- name: Check commit messages
35+
if: github.event_name == 'pull_request'
36+
run: |
37+
npx commitlint \
38+
--from ${{ github.event.pull_request.base.sha }} \
39+
--to ${{ github.event.pull_request.head.sha }} \
40+
--verbose
41+
42+
unit-tests:
43+
name: Unit Tests
44+
uses: ./.github/workflows/run-unit-tests.yml

.github/workflows/npm-publish-next.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ on:
1717
- 'examples/**'
1818
- '.github/**'
1919
- 'packages/collaboration-yjs/**'
20+
- '**/package.json'
21+
- '**/package-lock.json'
2022

2123
workflow_dispatch:
2224

.github/workflows/pre-commit.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Pre-commit
22

33
on:
4-
workflow_call: # No inputs needed, but this needs to be here to be called by other workflows
4+
workflow_call:
55

66
jobs:
77
pre-commit:
@@ -10,24 +10,23 @@ jobs:
1010
- uses: actions/checkout@v4
1111
with:
1212
fetch-depth: 0
13-
14-
- name: Set up Python
15-
uses: actions/setup-python@v5
16-
with:
17-
python-version: '3.x'
18-
19-
- name: Install pre-commit
20-
run: |
21-
python -m pip install --upgrade pip
22-
pip install pre-commit
23-
24-
- name: Run pre-commit
25-
run: |
26-
pre-commit run --all-files
2713

28-
# Upload pre-commit cache to speed up future runs
29-
- name: Upload pre-commit cache
30-
uses: actions/cache@v4
14+
- name: Setup Node.js
15+
uses: actions/setup-node@v4
3116
with:
32-
path: ~/.cache/pre-commit
33-
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
17+
node-version: 22
18+
cache: npm
19+
20+
- name: Install dependencies
21+
run: npm ci
22+
23+
- name: Check formatting with Prettier
24+
run: npm run format:check
25+
26+
- name: Check commit messages
27+
if: github.event_name == 'pull_request'
28+
run: |
29+
npx commitlint \
30+
--from ${{ github.event.pull_request.base.sha }} \
31+
--to ${{ github.event.pull_request.head.sha }} \
32+
--verbose

.github/workflows/pull-request.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,23 @@ name: Pull-request to main
22

33
on:
44
pull_request:
5-
branches: ["main"]
5+
branches: ["develop", "main"]
66

77
jobs:
88
pre-commit:
99
uses: ./.github/workflows/pre-commit.yml
1010

11-
run-unit-tests:
12-
uses: ./.github/workflows/run-unit-tests.yml
11+
trigger-superdoc-tests:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Trigger workflow dispatch
15+
run: |
16+
curl -L \
17+
-X POST \
18+
-H "Accept: application/vnd.github+json" \
19+
-H "Authorization: Bearer ${{ secrets.SUPERDOC_PAT }}" \
20+
-H "X-GitHub-Api-Version: 2022-11-28" \
21+
-d '{"ref": "main", "inputs": {"superdoc-branch": "${{ github.head_ref }}", "pull-request-url": "${{ github.event.pull_request.html_url }}"}}' \
22+
${{ secrets.SD_TESTS_URL }}
23+
1324
14-
run-e2e-tests:
15-
uses: ./.github/workflows/run-e2e-tests.yml

.github/workflows/run-e2e-tests.yml

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

.github/workflows/run-unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Run unit tests
22

33
on:
4-
workflow_call: # No inputs needed, but this needs to be here to be called by other workflows
4+
workflow_call:
55

66
jobs:
77
run-unit-tests:
@@ -23,4 +23,4 @@ jobs:
2323
run: npm run build
2424

2525
- name: Run tests
26-
run: npm test
26+
run: npm test

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ dist
88
dist-ssr
99
*.local
1010
.env
11-
.env.*
1211
.npmrc
1312
.eslintcache
1413

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit $1

0 commit comments

Comments
 (0)