Skip to content

Commit

Permalink
Merge pull request #89 from eric2788/develop
Browse files Browse the repository at this point in the history
v2.0.3 updates
  • Loading branch information
eric2788 authored Oct 26, 2024
2 parents 1750e3b + 5f9dce3 commit 61da1e4
Show file tree
Hide file tree
Showing 93 changed files with 7,710 additions and 4,534 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: Build And Test Extensions

on:
schedule:
- cron: '0 0 1 * *'
push:
branches: [develop]
paths:
Expand Down Expand Up @@ -30,7 +32,6 @@ on:
jobs:
build:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'push' && contains(github.event.head_commit.message, '[run ci]')) }}
strategy:
fail-fast: false
matrix:
Expand All @@ -39,7 +40,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- name: Setup Node.js
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -69,7 +70,7 @@ jobs:
run: grep -r --include "*.spec.ts" "@scoped" && echo "please remove @scoped from tests" && exit 1 || echo "No @scoped tests found"
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- name: Setup Node.js
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -105,6 +106,7 @@ jobs:
if-no-files-found: ignore
e2e-test:
runs-on: ubuntu-latest
if: ${{ contains(fromJSON('["schedule", "pull_request", "workflow_dispatch"]'), github.event_name) || (github.event_name == 'push' && contains(github.event.head_commit.message, '[run ci]')) }}
needs: [build, test]
strategy:
fail-fast: false
Expand All @@ -125,7 +127,7 @@ jobs:
run: unzip build/${{ matrix.browser }}-mv3-prod.zip -d build/extension
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- name: Setup Node.js
uses: actions/[email protected]
with:
Expand Down
43 changes: 37 additions & 6 deletions .github/workflows/partial-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ name: Test Only @scoped
on:
push:
branches:
- 'hotfix/**'
- 'feature/**'
- '*/*'
- '!master'
- '!develop'
paths:
- 'src/**'
- 'tests/**'
Expand All @@ -18,6 +19,34 @@ on:
default: 'false'

jobs:
fast-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
browser: [chrome, edge, chromium]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build And Package Extensions
run: pnpm build --zip --target=${{ matrix.browser }}-mv3
env:
DEBUG: true
# upload to github artifacts for each browser with matrix
- name: Upload to GitHub Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.browser }}-mv3
path: build/
fast-test:
runs-on: ubuntu-latest
strategy:
Expand All @@ -28,7 +57,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- name: Setup Node.js
uses: actions/[email protected]
with:
Expand All @@ -51,7 +80,8 @@ jobs:
--grep=@scoped \
--pass-with-no-tests \
--global-timeout=3600000 \
--max-failures=2
--max-failures=1 \
--retries=3
env:
DEBUG: true
fast-e2e-test:
Expand All @@ -65,7 +95,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- name: Setup Node.js
uses: actions/[email protected]
with:
Expand Down Expand Up @@ -93,7 +123,8 @@ jobs:
--pass-with-no-tests \
--global-timeout=3600000 \
--timeout=60000 \
--max-failures=5
--max-failures=1 \
--retries=3
env:
DEBUG: true
- name: Upload Test Results
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
version: 9
- name: Setup Node.js
uses: actions/[email protected]
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ npm-debug.log*
# local env files
.env*
.vscode/
.hintrc

out/
build/
Expand Down
11 changes: 6 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,12 @@ tests/
5. 有关如何编写贡献代码,请参阅 [入门指南](#入门指南)


#### 如要在本地运行测试:
- 请先运行 `pnpm dlx playwright install` 安装 PlayWright 的浏览器引擎
- 完成后,运行 `pnpm build && pnpm test:prepare` 编译并部署测试环境
- 最后,运行 `pnpm test` 运行测试 (或者用 playwright vscode 插件运行测试)
- 每次更新后可以运行 `pnpm test:rebuild` 重新编译并部署测试环境
> [!TIP]
> #### 如要在本地运行测试:
> - 请先运行 `pnpm dlx playwright install` 安装 PlayWright 的浏览器引擎
> - 完成后,运行 `pnpm build && pnpm test:prepare` 编译并部署测试环境
> - 最后,运行 `pnpm test` 运行测试 (或者用 playwright vscode 插件运行测试)
> - 每次更新后可以运行 `pnpm test:rebuild` 重新编译并部署测试环境
### 关于自动测试

Expand Down
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@

[Chrome](https://chrome.google.com/webstore/detail/nhomlepkjglilcahfcfnggebkaabeiog)

### 我们暂不支援 FireFox 进入 v2.0 版本。

此乃基于以下原因:

- FireFox 不需要在 2024 年 6 月前强制进入 mv3 阶段。
- FireFox 目前对于 mv3 支援依然尚未完善,包括众多的BUG和未知问题。
> [!IMPORTANT]
> ### 我们暂不支援 FireFox 进入 v2.0 版本。
>
> 此乃基于以下原因:
>
> - FireFox 不需要在 2024 年 6 月前强制进入 mv3 阶段。
> - FireFox 目前对于 mv3 支援依然尚未完善,包括众多的BUG和未知问题。
## 先行版本

Expand All @@ -36,7 +37,8 @@

### 功能

**所有主要功能已全部改为可选**,例如: 你可以启用醒目留言记录而不启用同传字幕过滤, 且每个主要功能都有各自的房间黑/白名单
> [!NOTE]
> **所有主要功能已全部改为可选**,例如: 你可以启用醒目留言记录而不启用同传字幕过滤, 且每个主要功能都有各自的房间黑/白名单
目前实装功能有:
- 同传字幕
Expand All @@ -59,7 +61,6 @@

请参阅 [贡献指南](CONTRIBUTING.md)


## ➵ 其他连结

[NGA帖文](https://ngabbs.com/read.php?tid=24434809)
Expand Down
15 changes: 10 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "bilibili-vup-stream-enhancer",
"displayName": "Bilibili Vup Stream Enhancer",
"version": "2.0.2",
"version": "2.0.3",
"description": "管人观众专用直播增强扩展",
"author": "Eric Lam <[email protected]>",
"license": "MIT",
Expand All @@ -27,6 +27,7 @@
"@ffmpeg/ffmpeg": "^0.12.10",
"@ffmpeg/util": "^0.12.1",
"@material-tailwind/react": "^2.1.9",
"@mlc-ai/web-llm": "^0.2.73",
"@plasmohq/messaging": "^0.6.2",
"@plasmohq/storage": "^1.9.3",
"@react-hooks-library/core": "^0.5.2",
Expand All @@ -36,10 +37,11 @@
"dexie-react-hooks": "^1.1.7",
"hash-wasm": "^4.11.0",
"hls.js": "^1.5.8",
"markdown-to-jsx": "^7.5.0",
"media-chrome": "^2.2.5",
"mpegts.js": "^1.7.3",
"n-danmaku": "^2.2.1",
"plasmo": "^0.85.2",
"plasmo": "^0.89.3",
"react": "18.2.0",
"react-contexify": "^6.0.0",
"react-dom": "18.2.0",
Expand All @@ -55,14 +57,16 @@
"devDependencies": {
"@ffmpeg/types": "^0.12.2",
"@ianvs/prettier-plugin-sort-imports": "^4.2.1",
"@playwright/test": "^1.42.1",
"@playwright/test": "^1.48.0",
"@types/brotli": "^1.3.4",
"@types/chrome": "^0.0.254",
"@types/glob": "^8.1.0",
"@types/node": "20.9.0",
"@types/react": "18.2.37",
"@types/react-dom": "18.2.15",
"@types/semver": "^7.5.8",
"@webgpu/types": "^0.1.49",
"async-mutex": "^0.5.0",
"dotenv": "^16.4.5",
"esbuild": "^0.20.2",
"gify-parse": "^1.0.7",
Expand All @@ -72,7 +76,7 @@
"postcss": "^8.4.38",
"prettier": "^3.2.5",
"run-script-os": "^1.1.6",
"typescript": "^5.4.3",
"typescript": "^5.6.3",
"ws": "^8.16.0"
},
"manifest": {
Expand All @@ -82,7 +86,8 @@
"*://api.live.bilibili.com/*",
"*://live.bilibili.com/*",
"*://*.bilivideo.com/*",
"*://*.ericlamm.xyz/*"
"*://*.ericlamm.xyz/*",
"*://*.cloudflare.com/*"
],
"permissions": [
"notifications",
Expand Down
2 changes: 1 addition & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default defineConfig<GlobalOptions>({
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
maxFailures: process.env.CI ? 15 : undefined,
maxFailures: process.env.CI ? 8 : undefined,
/* Retry on CI only */
retries: process.env.CI ? 5 : 0,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
Expand Down
Loading

0 comments on commit 61da1e4

Please sign in to comment.