Skip to content

Commit

Permalink
feat: New major version - v4.0.0 (#574)
Browse files Browse the repository at this point in the history
During the work on the new extension version, several major changes have been made. Here are the most important ones:

- Migrated to MV3 (manifest version 3)
- Replaced Vue.js with React
- Substituted Webpack with Vite
- Enhanced JavaScript protection
- Appears to have fixed the CloudFlare infinite loop issue
- The popup window now allows the selection of OS and browser, with an option to sync the OS with the host OS (new option)
- Domain **wildcard** rules are no longer available
- The latest browser versions for generation are now updated automatically
- The extension now collects statistics using the Google Analytics events system (reporting errors and the total amount of browsers run with the extension)
- Various other changes and improvements

Note: This release may have some bugs, so if this is critical for you, please wait a few weeks
  • Loading branch information
tarampampam authored May 13, 2024
1 parent 6809bf2 commit a3f9fb6
Show file tree
Hide file tree
Showing 351 changed files with 21,986 additions and 13,009 deletions.
29 changes: 0 additions & 29 deletions .codecov.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/main/schemas/devContainer.base.schema.json",
"name": "RUA dev-container",
"image": "node:21-bookworm",
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/sshd:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"streetsidesoftware.code-spell-checker"
]
}
},
"postCreateCommand": "npm install"
}
4 changes: 4 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ indent_style = space
indent_size = 2
trim_trailing_whitespace = true

[{*.yml,*.yaml}]
ij_any_spaces_within_braces = false
ij_any_spaces_within_brackets = false

[Makefile]
indent_style = tab
7 changes: 1 addition & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
# @link <https://help.github.com/en/articles/about-code-owners>
# docs: https://help.github.com/en/articles/about-code-owners

* @tarampampam
/public/_locales/zh_CN/ @yfdyh000
/public/_locales/pt_BR/ @inkhorn-ptbr
/public/_locales/de/ @Xenorio
/public/_locales/fr/ @maxgfr
/public/_locales/id/ @tustoz
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Docs: <https://git.io/JR5E4>
# yaml-language-server: $schema=https://json.schemastore.org/github-issue-forms.json
# docs: https://git.io/JR5E4

name: 🐞 Bug report
description: File a bug/issue
Expand Down Expand Up @@ -47,10 +48,9 @@ body:
id: version
attributes:
label: Extension version
placeholder: 3.x.x
placeholder: 4.x.x

- type: textarea
attributes:
label: Anything else?
description: Links? References? Anything that will give us more context about the issue you are encountering!
placeholder: You can attach images or log files by clicking this area to highlight it and then dragging files in
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Docs: <https://git.io/JP3tm>
# yaml-language-server: $schema=https://json.schemastore.org/github-issue-config.json
# docs: https://git.io/JP3tm

blank_issues_enabled: false

Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Docs: <https://git.io/JR5E4>
# yaml-language-server: $schema=https://json.schemastore.org/github-issue-forms.json
# docs: https://git.io/JR5E4

name: 💡 Feature request
description: Suggest an idea for this browser extension
Expand Down
11 changes: 5 additions & 6 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Docs: <https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/customizing-dependency-updates>
# yaml-language-server: $schema=https://json.schemastore.org/dependabot-2.0.json
# docs: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/customizing-dependency-updates

version: 2

Expand All @@ -7,14 +8,12 @@ updates:
directory: /
open-pull-requests-limit: 15
groups:
production: {dependency-type: production, update-types: [minor, patch]}
development: {dependency-type: development, update-types: [minor, patch]}
npm-production: {dependency-type: production, update-types: [minor, patch]}
npm-development: {dependency-type: development, update-types: [minor, patch]}
schedule: {interval: monthly}
assignees: [tarampampam]

- package-ecosystem: github-actions
directory: /
groups:
any: {patterns: ['*']}
github-actions: {patterns: ['*']}
schedule: {interval: monthly}
assignees: [tarampampam]
7 changes: 0 additions & 7 deletions .github/renovate.json

This file was deleted.

12 changes: 7 additions & 5 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: dependabot
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: 🤖 Dependabot

on:
pull_request: {}
Expand All @@ -9,17 +12,16 @@ permissions:

jobs:
dependabot: # https://tinyurl.com/e69djmen
name: Enable auto-merge for Dependabot PRs
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- uses: dependabot/fetch-metadata@v1
- uses: dependabot/fetch-metadata@v2
id: metadata
with: {github-token: "${{ secrets.GITHUB_TOKEN }}"}

- name: Enable auto-merge for Dependabot PRs
if: ${{ contains(fromJSON('["version-update:semver-minor", "version-update:semver-patch"]'), steps.metadata.outputs.update-type) }}
- if: ${{ contains(fromJSON('["version-update:semver-minor", "version-update:semver-patch"]'), steps.metadata.outputs.update-type) }}
run: gh pr merge --auto --merge "$PR_URL"
continue-on-error: true
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/deploy-website-cf-challenge-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: 🚀 Deploy the CF challenge test website

on:
workflow_dispatch: {}
push:
branches: [rewrite] #[master, main] # TODO: change this
tags-ignore: ['**']
paths: [website/cf-challenge-test/**, .github/workflows/deploy-website-cf-challenge-test.yml]

concurrency:
group: ${{ github.ref }}-cf-challenge-test-website
cancel-in-progress: true

jobs:
publish:
name: Publish the site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: cloudflare/wrangler-action@v3
env:
PROJECT_NAME: random-user-agent-cf-challenge-test
DIST_DIR: ./website/cf-challenge-test
CF_BRANCH_NAME: main # to deploy as "Production" environment on Cloudflare Pages
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_DEPLOY_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command:
pages deploy ${{ env.DIST_DIR }}
--project-name=${{ env.PROJECT_NAME }}
--branch ${{ env.CF_BRANCH_NAME }}
--commit-dirty=true
36 changes: 36 additions & 0 deletions .github/workflows/deploy-website-index.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: 🚀 Deploy the website index

on:
workflow_dispatch: {}
push:
branches: [rewrite] #[master, main] # TODO: change this
tags-ignore: ['**']
paths: [website/index/**, .github/workflows/deploy-website-index.yml]

concurrency:
group: ${{ github.ref }}-website-index
cancel-in-progress: true

jobs:
publish:
name: Publish the site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: cloudflare/wrangler-action@v3
env:
PROJECT_NAME: random-user-agent-index
DIST_DIR: ./website/index
CF_BRANCH_NAME: main # to deploy as "Production" environment on Cloudflare Pages
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_DEPLOY_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command:
pages deploy ${{ env.DIST_DIR }}
--project-name=${{ env.PROJECT_NAME }}
--branch ${{ env.CF_BRANCH_NAME }}
--commit-dirty=true
36 changes: 36 additions & 0 deletions .github/workflows/deploy-website-sandbox.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: 🚀 Deploy the sandbox website

on:
workflow_dispatch: {}
push:
branches: [rewrite] #[master, main] # TODO: change this
tags-ignore: ['**']
paths: [website/sandbox/**, .github/workflows/deploy-website-sandbox.yml]

concurrency:
group: ${{ github.ref }}-sandbox-website
cancel-in-progress: true

jobs:
publish:
name: Publish the site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: cloudflare/wrangler-action@v3
env:
PROJECT_NAME: random-user-agent-ua-test-sandbox
DIST_DIR: ./website/sandbox
CF_BRANCH_NAME: main # to deploy as "Production" environment on Cloudflare Pages
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_DEPLOY_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command:
pages deploy ${{ env.DIST_DIR }}
--project-name=${{ env.PROJECT_NAME }}
--branch ${{ env.CF_BRANCH_NAME }}
--commit-dirty=true
42 changes: 18 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: release
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions

name: 🚀 Release

on:
release: # Docs: <https://help.github.com/en/articles/events-that-trigger-workflows#release-event-release>
Expand All @@ -10,31 +13,22 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: gacts/github-slug@v1
id: slug

- uses: actions/setup-node@v4
with: {node-version: '20'}

- uses: actions/cache@v4
id: yarn-cache
- {uses: gacts/github-slug@v1, id: slug}
- {uses: gacts/setup-node-with-cache@v1, with: {node-version: 21}}
- run: npm install
- run: >
npm version --no-git-tag-version
"${{ steps.slug.outputs.version-major }}.${{ steps.slug.outputs.version-minor }}.${{ steps.slug.outputs.version-patch }}"
- run: npm run build
- uses: svenstaro/upload-release-action@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-

- if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile --no-progress --non-interactive

- name: Set the extension version
run: yarn version --no-git-tag-version --no-commit-hooks --new-version "${{ steps.slug.outputs.version-semantic }}"

- run: yarn build

repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./dist/chrome.zip
asset_name: random-user-agent-chrome.zip
tag: ${{ github.ref }}
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist.zip
asset_name: random-user-agent.zip
file: ./dist/firefox.zip
asset_name: random-user-agent-firefox.zip
tag: ${{ github.ref }}
Loading

0 comments on commit a3f9fb6

Please sign in to comment.