Skip to content

Commit

Permalink
feat: upgrade to Manifest V3 in Chrome
Browse files Browse the repository at this point in the history
BREAKING CHANGE: browser versions older than Chrome 123, Edge 123,
Firefox 115 and Opera 109 are no longer supported
  • Loading branch information
dessant committed May 31, 2024
1 parent 1e2e411 commit d5d2140
Show file tree
Hide file tree
Showing 43 changed files with 21,283 additions and 12,389 deletions.
8 changes: 0 additions & 8 deletions .babelrc

This file was deleted.

10 changes: 10 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[chrome]
Chrome >= 123
Edge >= 123
Opera >= 109

[edge]
Edge >= 123

[firefox]
Firefox >= 115
13 changes: 0 additions & 13 deletions .ci/Dockerfile

This file was deleted.

11 changes: 0 additions & 11 deletions .ci/build.sh

This file was deleted.

9 changes: 0 additions & 9 deletions .eslintrc.json

This file was deleted.

1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blank_issues_enabled: false
1 change: 1 addition & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This project does not accept pull requests. Please use issues to report bugs or suggest new features.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on: push

jobs:
build:
name: Build
runs-on: ubuntu-22.04
permissions:
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
persist-credentials: 'false'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Install dependencies
run: npm install --legacy-peer-deps
- name: Build artifacts
run: |
npm run build:prod:zip:chrome
npm run build:prod:zip:edge
npm run build:prod:zip:firefox
- name: Hash artifacts
run: sha256sum artifacts/*/*
if: startsWith(github.ref, 'refs/tags/v')
- name: Upload artifacts
uses: actions/upload-artifact@v4
if: startsWith(github.ref, 'refs/tags/v')
with:
name: artifacts
path: artifacts/
retention-days: 1
release:
name: Release on GitHub
runs-on: ubuntu-22.04
needs: [build]
if: startsWith(github.ref, 'refs/tags/v')
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: artifacts
path: artifacts/
- name: Hash artifacts
run: sha256sum artifacts/*/*
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
body: |
Download and install the extension from the [extension store](https://github.com/dessant/ping-blocker#readme) of your browser.
Learn more about this release from the [changelog](https://github.com/dessant/ping-blocker/blob/main/CHANGELOG.md#changelog).
files: artifacts/*/*
fail_on_unmatched_files: true
draft: true
5 changes: 1 addition & 4 deletions .github/workflows/label-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@ name: 'Label Actions'
on:
issues:
types: [labeled, unlabeled]
pull_request:
types: [labeled, unlabeled]

permissions:
contents: read
issues: write
pull-requests: write

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/label-actions@v2
- uses: dessant/label-actions@v4
17 changes: 17 additions & 0 deletions .github/workflows/lockdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'Repo Lockdown'

on:
pull_request_target:
types: opened

permissions:
pull-requests: write

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/repo-lockdown@v4
with:
pr-comment: 'This project does not accept pull requests. Please use issues to report bugs or suggest new features.'
process-only: 'prs'
22 changes: 13 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
.assets/
/.assets/
/app/
/artifacts/
/dist/

/report.json
/report.html

/web-ext-config.js

node_modules/
artifacts/
dist/
/npm-debug.log

web-ext-config.js
/.vscode

npm-debug.log
yarn-debug.log
yarn-error.log
.yarn-integrity
xcuserdata/

report.json
.DS_Store
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
12.13.1
20.14.0
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
package.json
.travis.yml
*.md
2 changes: 2 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
singleQuote: true
bracketSpacing: false
arrowParens: 'avoid'
trailingComma: 'none'
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<p align="center"><img width="128" height="128" src="https://i.imgur.com/XOvPosn.png"></p>
<p align="center"><img width="128" height="128" src="https://i.imgur.com/oZmAoWk.png"></p>
<h1 align="center">Ping Blocker</h1>

<p align="center">
Expand Down Expand Up @@ -42,12 +42,12 @@ with [Ping Spotter](https://armin.dev/apps/ping-spotter/).
## Screenshots

<p>
<img width="414" src="https://i.imgur.com/wusrp3m.png">
<img width="380" src="https://i.imgur.com/bBfWVnX.png">
</p>

## License

Copyright (c) 2019-2023 Armin Sebastian
Copyright (c) 2019-2024 Armin Sebastian

This software is released under the terms of the GNU General Public License v3.0.
See the [LICENSE](LICENSE) file for further information.
31 changes: 31 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
const path = require('node:path');

const corejsVersion = require(
path.join(path.dirname(require.resolve('core-js')), 'package.json')
).version;

module.exports = function (api) {
api.cache(true);

const presets = [
[
'@babel/env',
{
modules: false,
bugfixes: true,
useBuiltIns: 'usage',
corejs: {version: corejsVersion}
}
]
];

const plugins = [];

const ignore = [
new RegExp(`node_modules\\${path.sep}(?!(vueton|wesa)\\${path.sep}).*`)
];

const parserOpts = {plugins: ['importAttributes']};

return {presets, plugins, ignore, parserOpts};
};
Loading

0 comments on commit d5d2140

Please sign in to comment.