chore: 整理 third-party Dark Reader 目录并移除本地说明文件跟踪
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
open_collective: darkreader
|
||||
@@ -0,0 +1,76 @@
|
||||
name: Broken Website Report
|
||||
description: Create a report about a website issue you experienced while using Dark Reader.
|
||||
title: "[Broken Website] Replace with title"
|
||||
labels: ["Broken Website"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Place a brief description in the title of this report.
|
||||
|
||||
Thank you for taking the time to report this website issue.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Prerequisites
|
||||
options:
|
||||
- label: I [searched for any existing report](https://github.com/darkreader/darkreader/issues?q=is%3Aissue) about this website issue to avoid opening a duplicate.
|
||||
required: true
|
||||
- label: I can reproduce this website issue in a new, unmodified web browser profile with Dark Reader installed as the only extension.
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Website Issue Description
|
||||
description: Provide a clear and concise description of this website issue.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Website Address
|
||||
description: Provide the website address.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: Provide steps to reproduce this website issue.
|
||||
placeholder: |
|
||||
1. [First Step]
|
||||
2. [Second Step]
|
||||
3. [and so on...]
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Screenshots
|
||||
description: Add screenshots to help explain this website issue, if applicable.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Operating System
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Web Browser name and version
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Dark Reader version
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Provide any additional information about this website issue.
|
||||
validations:
|
||||
required: false
|
||||
@@ -0,0 +1,92 @@
|
||||
name: Bug Report
|
||||
description: Create a report about a bug you experienced while using Dark Reader.
|
||||
title: "[Bug] Replace with title"
|
||||
labels: ["bug"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Place a brief description in the title of this report.
|
||||
|
||||
Thank you for taking the time to report this bug.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Prerequisites
|
||||
options:
|
||||
- label: I [searched for any existing report](https://github.com/darkreader/darkreader/issues?q=is%3Aissue) about this bug to avoid opening a duplicate.
|
||||
required: true
|
||||
- label: I can reproduce this bug in a new, unmodified web browser profile with Dark Reader installed as the only extension.
|
||||
required: true
|
||||
- label: I understand I need to use the [Broken Website Report template](https://github.com/darkreader/darkreader/issues/new?assignees=&labels=Broken+Website&template=broken-website-report.yml&title=%5BBroken+Website%5D+Replace+with+title) if this bug I am reporting occurs on a single website.
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Bug Description
|
||||
description: Provide a clear and concise description of this bug.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Website Address
|
||||
description: Provide the website address.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: Provide steps to reproduce this bug.
|
||||
placeholder: |
|
||||
1. [First Step]
|
||||
2. [Second Step]
|
||||
3. [and so on...]
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
description: Provide a clear and concise description of what you expected to happen.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Actual Behavior
|
||||
description: Provide a clear and concise description of what happened.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Screenshots
|
||||
description: Add screenshots to help explain this bug, if applicable.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Operating System
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Web Browser name and version
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Dark Reader version
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Provide any additional information about this bug.
|
||||
validations:
|
||||
required: false
|
||||
@@ -0,0 +1,5 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Questions
|
||||
url: https://github.com/darkreader/darkreader/discussions
|
||||
about: Ask a question about Dark Reader.
|
||||
@@ -0,0 +1,47 @@
|
||||
name: Feature Request
|
||||
description: Create a feature request to enhance the experience using Dark Reader.
|
||||
title: "[Feature Request] Replace with title"
|
||||
labels: ["enhancement"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Place a brief description in the title of this feature request.
|
||||
|
||||
Thank you for taking the time to create this feature request.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Prerequisites
|
||||
options:
|
||||
- label: I [searched for any existing report](https://github.com/darkreader/darkreader/issues?q=is%3Aissue) about this feature request to avoid opening a duplicate.
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Is this feature request related to a problem?
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Feature Request Description
|
||||
description: Provide a clear and concise description of this feature request with any problems and solutions.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Screenshots
|
||||
description: Add screenshots to help explain this feature request, if applicable.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Provide any additional information about this feature request.
|
||||
validations:
|
||||
required: false
|
||||
@@ -0,0 +1,103 @@
|
||||
name: Performance Issue Report
|
||||
description: Create a report about a performance issue you experienced while using Dark Reader.
|
||||
title: "[Performance Issue] Replace with title"
|
||||
labels: ["Performance Issue"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Place a brief description in the title of this report.
|
||||
|
||||
Thank you for taking the time to report this performance issue.
|
||||
- type: checkboxes
|
||||
attributes:
|
||||
label: Prerequisites
|
||||
options:
|
||||
- label: I [searched for any existing report](https://github.com/darkreader/darkreader/issues?q=is%3Aissue) about this performance issue to avoid opening a duplicate.
|
||||
required: true
|
||||
- label: I have restarted the web browser to check if that resolved this performance issue.
|
||||
required: true
|
||||
- label: I can reproduce this performance issue in a new, unmodified web browser profile with Dark Reader installed as the only extension.
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Performance Issue Description
|
||||
description: Provide a clear and concise description of this performance issue.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Website Address
|
||||
description: Provide the website address.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Steps To Reproduce
|
||||
description: Provide steps to reproduce this performance issue.
|
||||
placeholder: |
|
||||
1. [First Step]
|
||||
2. [Second Step]
|
||||
3. [and so on...]
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Performance Profile
|
||||
description: Provide a link to a [Chromium](https://developer.chrome.com/docs/devtools/evaluate-performance/reference/) or [Firefox](https://profiler.firefox.com/) profile.
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Screenshots
|
||||
description: Add screenshots to help explain this performance issue, if applicable.
|
||||
validations:
|
||||
required: false
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Operating System
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Web Browser name and version
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
attributes:
|
||||
label: Dark Reader version
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Does this happen when Dark Reader is disabled?
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: Does this happen in other web browsers?
|
||||
options:
|
||||
- "Yes"
|
||||
- "No"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional Context
|
||||
description: Provide any additional information about this performance issue.
|
||||
validations:
|
||||
required: false
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "monthly"
|
||||
groups:
|
||||
github-actions:
|
||||
patterns:
|
||||
- "*"
|
||||
@@ -0,0 +1,48 @@
|
||||
name: Create binary for release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
retention_days:
|
||||
description: 'Retention duration (in days)'
|
||||
required: true
|
||||
default: '1'
|
||||
node_version:
|
||||
description: 'NodeJS version'
|
||||
required: true
|
||||
default: '22.x'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node_version || '22.x' }}
|
||||
cache: npm
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build the extension
|
||||
run: npm run release
|
||||
|
||||
- name: Release
|
||||
uses: softprops/action-gh-release@v2
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
with:
|
||||
files: |
|
||||
build/release/darkreader-*
|
||||
|
||||
- name: Upload built artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: build/release/darkreader-*
|
||||
retention-days: ${{ inputs.retention_days }}
|
||||
@@ -0,0 +1,123 @@
|
||||
name: Run browser tests
|
||||
|
||||
on:
|
||||
# Runs for pushes, pull requests, and manual triggers.
|
||||
# (Dooes not run when only some config is changed.)
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- 'src/config/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
paths-ignore:
|
||||
- 'src/config/**'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
test_results_retention_days:
|
||||
description: 'Test results retention (in days)'
|
||||
required: true
|
||||
default: '7'
|
||||
node_version:
|
||||
description: 'NodeJS version'
|
||||
required: true
|
||||
default: '22.x'
|
||||
|
||||
jobs:
|
||||
test-browser:
|
||||
name: Run browser tests
|
||||
timeout-minutes: 10
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
|
||||
# Extended support releases
|
||||
- channel: esr
|
||||
firefox: latest-esr
|
||||
|
||||
# Stable releases
|
||||
- channel: stable
|
||||
chrome: stable
|
||||
firefox: latest
|
||||
coverage: true
|
||||
|
||||
# Beta releases
|
||||
- channel: beta
|
||||
chrome: beta
|
||||
firefox: latest-beta
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Chrome
|
||||
if: ${{ matrix.chrome }}
|
||||
uses: browser-actions/setup-chrome@latest
|
||||
with:
|
||||
chrome-version: ${{ matrix.chrome }}
|
||||
|
||||
- name: Configure Karma with path to Chrome executable
|
||||
if: ${{ matrix.chrome }}
|
||||
run: |
|
||||
chrome --version
|
||||
{ echo CHROME_BIN="$(which chrome)"; echo CHROME_TEST=1; } | tee -a "$GITHUB_ENV"
|
||||
|
||||
- name: Install Firefox
|
||||
if: ${{ matrix.firefox }}
|
||||
uses: browser-actions/setup-firefox@latest
|
||||
with:
|
||||
firefox-version: ${{ matrix.firefox }}
|
||||
- name: Configure Karma with path to Firefox executable
|
||||
if: ${{ matrix.firefox }}
|
||||
run: |
|
||||
firefox --version
|
||||
{ echo FIREFOX_BIN="$(which firefox)"; echo FIREFOX_TEST=1; } | tee -a "$GITHUB_ENV"
|
||||
|
||||
- name: Node setup
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node_version || '22.x' }}
|
||||
cache: npm
|
||||
|
||||
- name: Install NPM dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Deps
|
||||
run: cat package-lock.json
|
||||
|
||||
- name: Run injection tests
|
||||
run: npm run test:inject -- --ci --json --outputFile=test-results-inject.json
|
||||
|
||||
- name: Run browser tests on Chromium MV2 build
|
||||
if: ${{ matrix.chrome }}
|
||||
uses: coactions/setup-xvfb@v1
|
||||
with:
|
||||
run: npm run test:chrome -- --json --outputFile=test-results-chrome.json
|
||||
|
||||
- name: Run browser tests on Chromium MV3 build
|
||||
if: ${{ matrix.chrome }}
|
||||
uses: coactions/setup-xvfb@v1
|
||||
with:
|
||||
run: npm run test:chrome-mv3 -- --json --outputFile=test-results-chrome-mv3.json
|
||||
|
||||
- name: Run browser tests on Firefox MV2 build
|
||||
if: ${{ matrix.firefox }}
|
||||
uses: coactions/setup-xvfb@v1
|
||||
with:
|
||||
run: npm run test:firefox -- --json --outputFile=test-results-firefox-mv2.json
|
||||
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-results-chrome-${{ matrix.chrome }}-firefox-${{ matrix.firefox }}-coverage-${{ matrix.coverage }}
|
||||
path: test-results-*
|
||||
retention-days: ${{ inputs.test_results_retention_days }}
|
||||
@@ -0,0 +1,57 @@
|
||||
name: Run code tests on Pull Request or Push
|
||||
|
||||
on:
|
||||
# Runs for pushes and pull requests,
|
||||
# but don't run these when only some config is changed.
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths-ignore:
|
||||
- 'src/config/*'
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
paths-ignore:
|
||||
- 'src/config/**'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
node_version:
|
||||
description: 'NodeJS version'
|
||||
required: true
|
||||
default: '22.x'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run tests
|
||||
timeout-minutes: 5
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Node setup
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node_version || '22.x' }}
|
||||
cache: npm
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Deps
|
||||
run: cat package-lock.json
|
||||
|
||||
- name: Lint code for code-style errors
|
||||
run: npm run lint
|
||||
|
||||
- name: Check for compatibility issues
|
||||
run: npm run lint:bundle
|
||||
|
||||
- name: Check NPM dependencies
|
||||
run: node tests/dependencies.js
|
||||
@@ -0,0 +1,53 @@
|
||||
name: Unit tests on Pull Request or Push
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
types:
|
||||
- opened
|
||||
- synchronize
|
||||
- reopened
|
||||
- ready_for_review
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
test_results_retention_days:
|
||||
description: 'Test results retention (in days)'
|
||||
required: true
|
||||
default: '7'
|
||||
node_version:
|
||||
description: 'NodeJS version'
|
||||
required: true
|
||||
default: '22.x'
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Run tests
|
||||
timeout-minutes: 2
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Node setup
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node_version || '22.x' }}
|
||||
cache: npm
|
||||
|
||||
- name: Install npm dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Run test against code
|
||||
run: npm run test:unit -- --json --outputFile=test-results-unit.json
|
||||
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-results-unit
|
||||
path: test-results-unit.json
|
||||
retention-days: ${{ inputs.test_results_retention_days }}
|
||||
Reference in New Issue
Block a user