Skip to content

Commit 93c4dfe

Browse files
authored
Merge pull request #295 from redotvideo/main-new
refactor: big refactor PR
2 parents da4fc4f + 06200b9 commit 93c4dfe

File tree

589 files changed

+13382
-96842
lines changed

Some content is hidden

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

589 files changed

+13382
-96842
lines changed

.github/workflows/docs.yml

-32
This file was deleted.

.github/workflows/publish.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,18 @@ jobs:
2727
NPM_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
2828
GH_TOKEN: ${{secrets.PUBLISH_TOKEN}}
2929
steps:
30-
- uses: actions/checkout@v3
30+
- uses: actions/checkout@v4
3131
with:
3232
fetch-depth: 0
3333
token: ${{secrets.PUBLISH_TOKEN}}
3434
submodules: true
35-
- uses: actions/setup-node@v3
35+
- name: Initialize and update submodules
36+
run: |
37+
git submodule init
38+
git submodule update --recursive
39+
- uses: actions/setup-node@v4
3640
with:
37-
node-version: 18
41+
node-version: 20
3842
registry-url: 'https://registry.npmjs.org'
3943
cache: npm
4044
- run: git config --global user.email "[email protected]"

.github/workflows/verify.yml

+39-177
Original file line numberDiff line numberDiff line change
@@ -8,227 +8,89 @@ env:
88
HUSKY: 0
99

1010
jobs:
11-
prepare:
12-
name: Prepare
13-
runs-on: ubuntu-latest
14-
steps:
15-
- uses: actions/checkout@v3
16-
with:
17-
fetch-depth: 0
18-
- uses: actions/setup-node@v3
19-
with:
20-
node-version: 18
21-
cache: npm
22-
- run: PUPPETEER_PRODUCT=chrome npm ci
23-
- uses: actions/cache/save@v3
24-
with:
25-
key: ${{ github.run_id }}-node-modules
26-
path: |
27-
**/node_modules
28-
~/.cache/puppeteer
2911
commit:
3012
name: Commit name
31-
needs: prepare
3213
runs-on: ubuntu-latest
3314
steps:
34-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
3516
with:
3617
fetch-depth: 0
37-
- uses: actions/setup-node@v3
18+
- uses: actions/setup-node@v4
3819
with:
39-
node-version: 18
20+
node-version: 20
4021
cache: npm
41-
- uses: actions/cache/restore@v3
42-
with:
43-
key: ${{ github.run_id }}-node-modules
44-
path: |
45-
**/node_modules
46-
~/.cache/puppeteer
22+
- run: npm ci
4723
- run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --verbose
4824
lint:
4925
name: Lint
50-
needs: prepare
5126
runs-on: ubuntu-latest
5227
steps:
53-
- uses: actions/checkout@v3
54-
- uses: actions/setup-node@v3
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-node@v4
5530
with:
56-
node-version: 18
31+
node-version: 20
5732
cache: npm
58-
- uses: actions/cache/restore@v3
59-
with:
60-
key: ${{ github.run_id }}-node-modules
61-
path: |
62-
**/node_modules
63-
~/.cache/puppeteer
64-
- run: npm run eslint
33+
- run: npm ci
34+
- run: npx eslint "**/*.ts?(x)"
6535
prettier:
6636
name: Code style
67-
needs: prepare
6837
runs-on: ubuntu-latest
6938
steps:
70-
- uses: actions/checkout@v3
71-
- uses: actions/setup-node@v3
39+
- uses: actions/checkout@v4
40+
- uses: actions/setup-node@v4
7241
with:
73-
node-version: 18
42+
node-version: 20
7443
cache: npm
75-
- uses: actions/cache/restore@v3
76-
with:
77-
key: ${{ github.run_id }}-node-modules
78-
path: |
79-
**/node_modules
80-
~/.cache/puppeteer
44+
- run: npm ci
8145
- run: npm run prettier
8246
build:
8347
name: Build
84-
needs: prepare
8548
runs-on: ubuntu-latest
8649
steps:
87-
- uses: actions/checkout@v3
88-
- uses: actions/setup-node@v3
50+
- uses: actions/checkout@v4
51+
- uses: actions/setup-node@v4
8952
with:
90-
node-version: 18
53+
node-version: 20
9154
cache: npm
92-
- uses: actions/cache/restore@v3
93-
with:
94-
key: ${{ github.run_id }}-node-modules
95-
path: |
96-
**/node_modules
97-
~/.cache/puppeteer
55+
- run: node --version
56+
- run: npm --version
57+
- run: npm ci
58+
# TODO: FFmpeg and ffprobe installer don't automatically install the binaries
59+
- run: npm install @ffmpeg-installer/ffmpeg
60+
- run: npm install @ffprobe-installer/ffprobe
61+
- run: npm list
9862
- run: npx lerna run build
99-
- uses: actions/cache/save@v3
100-
with:
101-
key: ${{ github.run_id }}-build
102-
path: |
103-
packages/2d/lib
104-
packages/2d/editor
105-
packages/core/lib
106-
packages/ui/dist
107-
packages/player/dist
108-
packages/vite-plugin/lib
109-
packages/telemetry/dist
110-
packages/ffmpeg/dist
63+
- run: npm run examples:build
11164
tests:
11265
name: Unit tests
113-
needs: build
11466
runs-on: ubuntu-latest
11567
steps:
116-
- uses: actions/checkout@v3
117-
- uses: actions/setup-node@v3
68+
- uses: actions/checkout@v4
69+
- uses: actions/setup-node@v4
11870
with:
119-
node-version: 18
71+
node-version: 20
12072
cache: npm
121-
- uses: actions/cache/restore@v3
122-
with:
123-
key: ${{ github.run_id }}-node-modules
124-
path: |
125-
**/node_modules
126-
~/.cache/puppeteer
127-
- uses: actions/cache/restore@v3
128-
with:
129-
key: ${{ github.run_id }}-build
130-
path: |
131-
packages/2d/lib
132-
packages/2d/editor
133-
packages/core/lib
134-
packages/ui/dist
135-
packages/player/dist
136-
packages/vite-plugin/lib
137-
packages/telemetry/dist
138-
packages/ffmpeg/dist
73+
- run: npm ci
74+
- run: npx lerna run build
13975
- run: npx lerna run test
140-
examples:
141-
name: Examples
142-
needs: build
143-
runs-on: ubuntu-latest
144-
steps:
145-
- uses: actions/checkout@v3
146-
- uses: actions/setup-node@v3
147-
with:
148-
node-version: 18
149-
cache: npm
150-
- uses: actions/cache/restore@v3
151-
with:
152-
key: ${{ github.run_id }}-node-modules
153-
path: |
154-
**/node_modules
155-
~/.cache/puppeteer
156-
- uses: actions/cache/restore@v3
157-
with:
158-
key: ${{ github.run_id }}-build
159-
path: |
160-
packages/2d/lib
161-
packages/2d/editor
162-
packages/core/lib
163-
packages/ui/dist
164-
packages/player/dist
165-
packages/vite-plugin/lib
166-
packages/telemetry/dist
167-
packages/ffmpeg/dist
168-
- run: npm run examples:build
16976
e2e:
17077
name: E2E
171-
needs: build
17278
runs-on: ubuntu-latest
17379
steps:
174-
- uses: actions/checkout@v3
175-
- uses: actions/setup-node@v3
80+
- uses: actions/checkout@v4
81+
- uses: actions/setup-node@v4
17682
with:
177-
node-version: 18
83+
node-version: 20
17884
cache: npm
179-
- uses: actions/cache/restore@v3
180-
with:
181-
key: ${{ github.run_id }}-node-modules
182-
path: |
183-
**/node_modules
184-
~/.cache/puppeteer
185-
- uses: actions/cache/restore@v3
186-
with:
187-
key: ${{ github.run_id }}-build
188-
path: |
189-
packages/2d/lib
190-
packages/2d/editor
191-
packages/core/lib
192-
packages/ui/dist
193-
packages/player/dist
194-
packages/vite-plugin/lib
195-
packages/telemetry/dist
196-
packages/ffmpeg/dist
85+
- run: npm ci
86+
- run: npx puppeteer browsers install chrome
87+
# TODO: FFmpeg and ffprobe installer don't automatically install the binaries
88+
- run: npm install @ffmpeg-installer/ffmpeg
89+
- run: npm install @ffprobe-installer/ffprobe
90+
- run: npx lerna run build
19791
- run: npm run e2e:test
19892
- uses: actions/upload-artifact@v3
19993
if: failure()
20094
with:
20195
name: image-diffs
202-
path: packages/e2e/src/__image_snapshots__/__diff_output__
203-
docs:
204-
name: Documentation
205-
needs: build
206-
runs-on: ubuntu-latest
207-
steps:
208-
- uses: actions/checkout@v3
209-
- uses: actions/setup-node@v3
210-
with:
211-
node-version: 18
212-
cache: npm
213-
- uses: actions/cache/restore@v3
214-
with:
215-
key: ${{ github.run_id }}-node-modules
216-
path: |
217-
**/node_modules
218-
~/.cache/puppeteer
219-
- uses: actions/cache/restore@v3
220-
with:
221-
key: ${{ github.run_id }}-build
222-
path: |
223-
packages/2d/lib
224-
packages/2d/editor
225-
packages/core/lib
226-
packages/ui/dist
227-
packages/player/dist
228-
packages/vite-plugin/lib
229-
packages/telemetry/dist
230-
packages/ffmpeg/dist
231-
- run: npx lerna run bundle
232-
- run: npm run docs:build
233-
env:
234-
NODE_OPTIONS: "--max-old-space-size=8192"
96+
path: packages/e2e/src/__image_snapshots__/__diff_output__

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ tsconfig.tsbuildinfo
1414

1515
.idea
1616
id.txt
17+
18+
.nx

.husky/commit-msg

-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
npx --no -- commitlint --edit $1

.husky/pre-commit

-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
#!/usr/bin/env sh
2-
. "$(dirname -- "$0")/_/husky.sh"
3-
41
npx lint-staged
52
npx --no -- vitest --changed --run -r packages/core/

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

.prettierignore

-2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ CHANGELOG.md
1010
/packages/*/lib
1111
/packages/*/static
1212
/packages/*/build
13-
14-
/packages/docs/src/generated

0 commit comments

Comments
 (0)