Skip to content

Commit

Permalink
Merge branch 'preview-features' into preview
Browse files Browse the repository at this point in the history
  • Loading branch information
the1812 committed Jun 28, 2022
2 parents 8640887 + c584112 commit bf000cd
Show file tree
Hide file tree
Showing 249 changed files with 2,101 additions and 1,542 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
webpack/
packages/
typings/
dist/
dev/
node_modules/
*.config.*
.eslintrc.*
43 changes: 21 additions & 22 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@ module.exports = {
parser: '@typescript-eslint/parser',
sourceType: 'module',
},
plugins: [
'vue',
'@typescript-eslint',
],
plugins: ['vue', '@typescript-eslint'],
rules: {
'import/no-unresolved': 'off',
'import/extensions': 'off',
Expand All @@ -38,7 +35,8 @@ module.exports = {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/no-redeclare': 'error',
'@typescript-eslint/naming-convention': ['error',
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'enumMember',
format: ['PascalCase'],
Expand All @@ -65,7 +63,7 @@ module.exports = {
'no-await-in-loop': 'off',
'no-restricted-syntax': 'off',
'no-useless-escape': 'off',
'no-empty-function': ['error', { 'allow': ['constructors'] }],
'no-empty-function': ['error', { allow: ['constructors'] }],
'no-return-assign': ['error', 'except-parens'],
'no-redeclare': 'off',
'no-script-url': 'off',
Expand All @@ -76,33 +74,34 @@ module.exports = {

'arrow-parens': ['error', 'as-needed'],
'object-curly-newline': 'off',
'semi': ['error', 'never'],
semi: ['error', 'never'],
'linebreak-style': 'off',
'camelcase': 'off',
camelcase: 'off',
'lines-between-class-members': 'off',
'radix': ['error', 'as-needed'],
radix: ['error', 'as-needed'],
'max-len': 'error',
'max-classes-per-file': 'off',
'prefer-destructuring': ['error',
'prefer-destructuring': [
'error',
{
'VariableDeclarator': {
'array': false,
'object': true
VariableDeclarator: {
array: false,
object: true,
},
AssignmentExpression: {
array: false,
object: false,
},
'AssignmentExpression': {
'array': false,
'object': false
}
},
],
'curly': ['error', 'all'],
curly: ['error', 'all'],
},
overrides: [
{
files: ['*.vue', 'shims.d.ts'],
files: ['*.vue', 'shims.d.ts', 'webpack/**/*.ts', 'registry/webpack/**/*.ts'],
rules: {
'import/no-default-export': 'off',
}
}
]
},
},
],
}
12 changes: 0 additions & 12 deletions .github/scripts/package.json

This file was deleted.

16 changes: 0 additions & 16 deletions .github/scripts/purge-cache.js

This file was deleted.

36 changes: 0 additions & 36 deletions .github/scripts/yarn.lock

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/pull-request-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: yarn type

- name: ESLint check
run: yarn lint
run: yarn lint-check

- name: Build core
run: yarn build-core
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/purge_cache.yml

This file was deleted.

11 changes: 10 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,14 @@
"**/yarn.lock": true
},
"eslint.format.enable": true,
"editor.defaultFormatter": "dbaeumer.vscode-eslint"
"editor.defaultFormatter": "dbaeumer.vscode-eslint",
"explorer.fileNesting.patterns": {
"*.ts": "${capture}.js",
"*.js": "${capture}.js.map, ${capture}.min.js, ${capture}.d.ts",
"*.jsx": "${capture}.js",
"*.tsx": "${capture}.ts",
"tsconfig.json": "tsconfig.*.json",
"package.json": "package-lock.json, yarn.lock, pnpm-lock.yaml, .*",
"index.ts": "index.*.ts, index.md, index.*.md",
}
}
24 changes: 12 additions & 12 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
},
{
"type": "shell",
"command": "yarn webpack --config ./webpack/webpack.dev.js --progress",
"command": "yarn webpack --config ./webpack/webpack.dev.ts --progress",
"group": "build",
"problemMatcher": [],
"label": "本体:编译开发版本 dev:build-core"
},
{
"type": "shell",
"command": "yarn webpack --watch --config ./webpack/webpack.dev.js --progress",
"command": "yarn webpack --watch --config ./webpack/webpack.dev.ts --progress",
"group": "build",
"problemMatcher": [],
"label": "本体:监视开发版本 dev:watch-core"
Expand All @@ -40,14 +40,14 @@
},
{
"type": "shell",
"command": "yarn webpack --watch --config ./registry/webpack/components.js --progress --mode=development",
"command": "yarn webpack --watch --config ./registry/webpack/components.ts --progress --mode=development",
"group": "build",
"problemMatcher": [],
"label": "功能:监视组件 dev:watch-components"
},
{
"type": "shell",
"command": "yarn webpack --watch --config ./registry/webpack/plugins.js --progress --mode=development",
"command": "yarn webpack --watch --config ./registry/webpack/plugins.ts --progress --mode=development",
"group": "build",
"problemMatcher": [],
"label": "功能:监视插件 dev:watch-plugins"
Expand All @@ -61,56 +61,56 @@
},
{
"type": "shell",
"command": "yarn --silent webpack --config ./webpack/webpack.prod.js --profile --json > dist/profile.json && yarn webpack-bundle-analyzer dist/profile.json",
"command": "yarn --silent webpack --config ./webpack/webpack.prod.ts --profile --json > dist/profile.json && yarn webpack-bundle-analyzer dist/profile.json",
"group": "build",
"problemMatcher": [],
"label": "本体:打包分析 prod:analyze"
},
{
"type": "shell",
"command": "yarn eslint --cache --cache-location node_modules/.cache/eslint/ 'src/**/*.@(js|ts|vue)' 'registry/lib/**/*.@(js|ts|vue)'",
"command": "yarn eslint --cache --cache-location node_modules/.cache/eslint/ './**/*.@(js|ts|vue)'",
"group": "build",
"problemMatcher": [],
"label": "生产:代码检查 prod:lint"
},
{
"type": "shell",
"command": "yarn eslint --cache --cache-location node_modules/.cache/eslint/ --fix 'src/**/*.@(js|ts|vue)' 'registry/lib/**/*.@(js|ts|vue)'",
"command": "yarn eslint --cache --cache-location node_modules/.cache/eslint/ --fix './**/*.@(js|ts|vue)'",
"group": "build",
"problemMatcher": [],
"label": "生产:代码修复 prod:lint-fix"
},
{
"type": "shell",
"command": "yarn webpack --config ./webpack/webpack.prod.js --progress",
"command": "yarn webpack --config ./webpack/webpack.prod.ts --progress",
"group": "build",
"problemMatcher": [],
"label": "本体:编译生产版本 prod:build-core"
},
{
"type": "shell",
"command": "yarn webpack --config ./registry/webpack/components.js --progress",
"command": "yarn webpack --config ./registry/webpack/components.ts --progress",
"group": "build",
"problemMatcher": [],
"label": "功能:编译组件 prod:build-components"
},
{
"type": "shell",
"command": "yarn webpack --config ./registry/webpack/plugins.js --progress",
"command": "yarn webpack --config ./registry/webpack/plugins.ts --progress",
"group": "build",
"problemMatcher": [],
"label": "功能:编译插件 prod:build-plugins"
},
{
"type": "shell",
"command": "yarn webpack --config ./registry/webpack/all.js",
"command": "yarn webpack --config ./registry/webpack/all.ts",
"group": "build",
"problemMatcher": [],
"label": "功能:编译所有 prod:build-features"
},
{
"type": "shell",
"command": "yarn webpack --config ./registry/webpack/docs.js --progress",
"command": "yarn webpack --config ./registry/webpack/docs.ts --progress",
"group": "build",
"problemMatcher": [],
"label": "功能:编译功能文档 prod:build-docs"
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,53 @@
# 更新日志

## v2.3.0-preview
`2022-06-28`

包含 v2.2.2 的所有更新内容.

✨新增
- `清爽首页` 的热门视频支持显示弹幕数量.
- `极简首页` 初版已完成.
- 脚本的更新源配置默认值更换为 `GitHub`, 并添加了 `AltCdn`, 表示开发者自定义的其他 CDN 源. `jsDelivr` 之后将会删除.
-`GitHub` 更新源下, MDI 图标库更换使用 GitHub Pages.

☕开发者相关
- 重新整理了所有 CDN 调用, 并支持自定义 CDN 配置, 文档见 [doc/cdn.md](https://github.com/the1812/Bilibili-Evolved/blob/preview-features/doc/cdn.md).
- 拆分并整理了 `/src/core/settings` 的代码结构.
- 所有 webpack 配置更换为 TypeScript, 并启用 ESLint 检查.
- 重构了元数据注入功能, 新增了 i18n 和 description 注入, 详细用法可见 `webpack/inject-metadata/i18n.ts``webpack/inject-metadata/description.ts` 中的注释说明.
- 删除了用不到的包 `html-webpack-plugin`.
- 适配了 VSCode File Nesting 功能.

## v2.2.2
`2022-06-28`

⚠ 此版本起, 对 Chromium 内核浏览器的版本要求提升至 88

✨新增
- `网址参数清理` 支持清理 `vd_source`, 之前装了临时插件的用户可以在更新后卸载相应的插件. (#3424)

🐛修复
- 修复 `bwp-video` (HEVC 编码) 下 PlayerAgent 的异常行为:
- 修复倍速扩展的问题. (#3398, PR #3400 by [JLoeve](https://github.com/LonelySteve), PR #3401 by [imshixin](https://github.com/imshixin))
- 修复开关灯的问题. (#3403, PR #3413 by [FoundTheWOUT](https://github.com/FoundTheWOUT))
- 修复 `简化评论区` 的样式失效, 以及评论区的操作菜单失效. (#3425, #3453)
- 修复动态详情页的动态相关功能失效.
- 修复 `videoChange` 部分情况下无法触发.
- 修复 `简化直播间` 的直播间皮肤部分情况下无法屏蔽.
- 修复搜索栏的建议在话题页面布局错乱. (#3383)
- 修复 `图片批量导出` 中的命名格式未能正确赋值. (#3326)
- 修复 `快速收起评论` 收起后再打开评论区失效的问题.

☕开发者相关
- 修复 Pull Request 中 ESLint 未报告部分代码问题.
- `loadFeatureCode` 支持从代码的返回值中得到结果.
- 删除 jsDelivr 相关的 GitHub Action.

## v2.2.1
`2022-06-03`
- 修复部分浏览器 / 脚本管理器中脚本无法运行. (对应报错 `Error: Couldn't find a style target`)
- 移除代码中的零宽空格. (#3391)

## v2.2.0
`2022-06-02`
Expand Down
9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ yarn

**如果使用的是基于 Chromium 的浏览器**
1. Chrome 插件管理 `chrome://extensions/` > Tampermonkey > 详细信息
2. 打开`允许访问文件网址`
2. 打开 `允许访问文件网址`
3. 新建脚本
4. 粘贴内容:
```js
Expand Down Expand Up @@ -56,16 +56,15 @@ yarn
// @grant GM_info
// @grant GM_xmlhttpRequest
// @connect raw.githubusercontent.com
// @connect cdn.jsdelivr.net
// @connect cn.bing.com
// @connect www.bing.com
// @connect translate.google.cn
// @connect translate.google.com
// @connect localhost
// @connect *
// @require https://cdn.jsdelivr.net/npm/lodash@4.17.15/lodash.min.js
// @icon https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/images/logo-small.png
// @icon64 https://cdn.jsdelivr.net/gh/the1812/Bilibili-Evolved@preview/images/logo.png
// @require https://raw.githubusercontent.com/lodash/lodash/4.17.15/dist/lodash.min.js
// @icon https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/images/logo-small.png
// @icon64 https://raw.githubusercontent.com/the1812/Bilibili-Evolved/preview/images/logo.png
// ==/UserScript==
```
6. 在那些 `@require` 下面再添加一行 `@require file://{{ bilibili-evolved.dev.user.js的绝对路径 }}`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
# 推荐配置
- 操作系统: 64-bit Windows 10+ / macOS 10.15+
- 分辨率: 2K+ / 192ppi
- 浏览器: Chrome 84+ / Firefox 80+ / Edge 84+ / Safari 14.1+
- 处理器: 8代 Intel Core i7+ / Zen 3 架构 AMD Ryzen 5+
- 浏览器: Chrome 88+ / Firefox 80+ / Edge 88+ / Safari 14.1+
- 处理器: 8代 Intel Core i7+ / AMD Ryzen 5000+
- 内存: 8GB
- 脚本管理器: Tampermonkey 4.14 / Violentmonkey 2.13
- 显卡: GeForce GTX 660 / Radeon HD 7870
Expand Down
Loading

0 comments on commit bf000cd

Please sign in to comment.