Skip to content

Commit

Permalink
**Automated release 99**
Browse files Browse the repository at this point in the history
commit 543a7f0
Author: Emma <MarmadileManteater@proton.me>

🤦‍♀️ Keep the defaults the same for the PWA

commit e0e151d
Author: Emma <MarmadileManteater@proton.me>

Reset default `backendPreference` settings to the same as upstream

commit b4e95e2
Merge: bf29f7d e64ad26
Author: Emma <MarmadileManteater@proton.me>

Merge remote-tracking branch 'origin/development' into development

...

**Full Changelog**: 0.18.0.98...0.18.0.99
  • Loading branch information
MarmadileManteater committed Mar 9, 2023
2 parents 58532de + 543a7f0 commit 54a4035
Show file tree
Hide file tree
Showing 163 changed files with 14,749 additions and 12,786 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/autoLabelDuplicate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: Amwam/issue-comment-action@v1.3.1
- name: Check Comment Author
if: github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER'
uses: Amwam/issue-comment-action@v1.3.1
with:
keywords: '["duplicate of #", "duplicate of https://github.com/FreeTubeApp/FreeTube/issues/", "duplicate of https://github.com/FreeTubeApp/FreeTube/pulls/"]'
labels: '["U: duplicate"]'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/autoLabelIssue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- uses: Naturalclar/issue-action@v2.0.2
with:
body: "both"
title-or-body: "body"
parameters: >-
[
{
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/label-pr.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
name: "Pull Request Labeler"
on:
pull_request_target:
types: [opened, reopened]
types: [opened, reopened, ready_for_review]

jobs:
triage:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
steps:
- uses: actions/labeler@v4
with:
Expand Down
27 changes: 25 additions & 2 deletions .github/workflows/remove-outdated-labels.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Remove outdated labels
on:
# https://gh.neting.ccmunity/t/github-actions-are-severely-limited-on-prs/18179/15
pull_request_target:
types:
- closed
- converted_to_draft
- ready_for_review
jobs:
remove-merged-pr-labels:
name: Remove merged pull request labels
Expand All @@ -23,7 +24,7 @@ jobs:
remove-closed-pr-labels:
name: Remove closed pull request labels
if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged)
if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged) && (github.event.action != 'converted_to_draft') && (github.event.action != 'ready_for_review')
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.1.1
Expand All @@ -36,3 +37,25 @@ jobs:
PR: merge conflicts / rebase needed
PR/Issue: dependent
PR: stale
remove-draft-pr-labels:
name: Remove labels from draft pull requests
if: github.event_name == 'pull_request_target' && github.event.action == 'converted_to_draft'
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
PR: waiting for review
remove-ready-pr-labels:
name: Remove labels when draft pr is marked ready for review
if: github.event_name == 'pull_request_target' && github.event.action == 'ready_for_review'
runs-on: ubuntu-latest
steps:
- uses: mondeja/remove-labels-gh-action@v1.1.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
labels: |
PR: WIP
12 changes: 6 additions & 6 deletions .github/workflows/report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

# For bug reports
- name: New bug issue
uses: alex-page/github-project-automation-plus@v0.8.2
uses: alex-page/github-project-automation-plus@v0.8.3
if: contains(github.event.issue.labels.*.name, 'bug') && github.event.action == 'opened'
with:
project: Bug Reports
Expand All @@ -22,7 +22,7 @@ jobs:
action: update

- name: Bug issue closed
uses: alex-page/github-project-automation-plus@v0.8.2
uses: alex-page/github-project-automation-plus@v0.8.3
if: github.event.action == 'closed' || github.event.action == 'deleted'
with:
action: delete
Expand All @@ -31,7 +31,7 @@ jobs:
repo-token: ${{ secrets.PUSH_TOKEN }}

- name: Bug issue reopened
uses: alex-page/github-project-automation-plus@v0.8.2
uses: alex-page/github-project-automation-plus@v0.8.3
if: contains(github.event.issue.labels.*.name, 'bug') && github.event.action == 'reopened'
with:
project: Bug Reports
Expand All @@ -41,7 +41,7 @@ jobs:

# For feature requests
- name: New feature issue
uses: alex-page/github-project-automation-plus@v0.8.2
uses: alex-page/github-project-automation-plus@v0.8.3
if: contains(github.event.issue.labels.*.name, 'enhancement') && github.event.action == 'opened'
with:
project: Feature Requests
Expand All @@ -50,7 +50,7 @@ jobs:
action: update

- name: Feature request issue closed
uses: alex-page/github-project-automation-plus@v0.8.2
uses: alex-page/github-project-automation-plus@v0.8.3
if: github.event.action == 'closed' || github.event.action == 'deleted'
with:
action: delete
Expand All @@ -59,7 +59,7 @@ jobs:
repo-token: ${{ secrets.PUSH_TOKEN }}

- name: Feature request issue reopened
uses: alex-page/github-project-automation-plus@v0.8.2
uses: alex-page/github-project-automation-plus@v0.8.3
if: contains(github.event.issue.labels.*.name, 'enhancement') && github.event.action == 'reopened'
with:
project: Feature Requests
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,21 +79,21 @@ The first build with a green check mark is the latest build. You will need to ha
## How to build and test
### Commands for the Android APK
```bash
# 📦 Packs the project using `webpack.cordova.config.js`
yarn pack:cordova
# 🏗 Builds the debug APK and launches it on a connected device
yarn run:cordova
# 🚧 Builds the development APK
yarn build:cordova
# 🏦 Builds the release APK
yarn build:cordova --release
# 📦 Packs the project using `webpack.cordova.config.js`
yarn pack:cordova
# 🏗 Builds the debug APK and launches it on a connected device
yarn run:cordova
# 🚧 Builds the development APK
yarn build:cordova
# 🏦 Builds the release APK
yarn build:cordova --release
```
### Commands for the PWA (progressive web app)
```bash
# 🐛 Debugs the project using `webpack.web.config.js`
yarn dev:web
# 📦 Packs the project using `webpack.web.config.js`
yarn pack:web
# 🐛 Debugs the project using `webpack.web.config.js`
yarn dev:web
# 🎁 Packs the project using `webpack.web.config.js`
yarn pack:web
```
## Contributing

Expand Down
15 changes: 11 additions & 4 deletions _scripts/dev-runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,23 @@ const kill = require('tree-kill')
const path = require('path')
const { spawn } = require('child_process')

const mainConfig = require('./webpack.main.config')
const rendererConfig = require('./webpack.renderer.config')
const webConfig = require('./webpack.web.config')

let electronProcess = null
let manualRestart = null

const remoteDebugging = process.argv.indexOf('--remote-debug') !== -1
const web = process.argv.indexOf('--web') !== -1

let mainConfig
let rendererConfig
let webConfig

if (!web) {
mainConfig = require('./webpack.main.config')
rendererConfig = require('./webpack.renderer.config')
} else {
webConfig = require('./webpack.web.config')
}

if (remoteDebugging) {
// disable dvtools open in electron
process.env.RENDERER_REMOTE_DEBUGGING = true
Expand Down
15 changes: 7 additions & 8 deletions _scripts/webpack.cordova.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ const config = {
electron: '{}',
cordova: 'cordova',
'music-controls': 'MusicControls'
},
({ request }, callback) => {
if (request.startsWith('youtubei.js')) {
return callback(null, '{}')
}
callback()
}
],
module: {
Expand Down Expand Up @@ -130,11 +124,12 @@ const config = {
filename: 'index.html',
template: path.resolve(__dirname, '../src/index.ejs'),
nodeModules: false,
inject: false
}),
new VueLoaderPlugin(),
new MiniCssExtractPlugin({
filename: isDevMode ? '[name].css' : '[name].[contenthash].css',
chunkFilename: isDevMode ? '[id].css' : '[id].[contenthash].css',
filename: '[name].css',
chunkFilename: '[id].css',
})
],
resolve: {
Expand Down Expand Up @@ -180,6 +175,10 @@ config.plugins.push(
from: path.join(__dirname, '../static/pwabuilder-sw.js'),
to: path.join(__dirname, '../dist/cordova/www/pwabuilder-sw.js'),
},
{
from: path.join(__dirname, '../_icons/iconColor.ico'),
to: path.join(__dirname, '../dist/cordova/www/favicon.ico'),
},
{
from: path.join(__dirname, '../static'),
to: path.join(__dirname, '../dist/cordova/www/static'),
Expand Down
15 changes: 7 additions & 8 deletions _scripts/webpack.renderer.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,12 @@ const config = {
level: isDevMode ? 'info' : 'none'
},
output: {
publicPath: '',
libraryTarget: 'commonjs2',
path: path.join(__dirname, '../dist'),
filename: '[name].js',
},
externals: {
// ignore linkedom's unnecessary broken canvas import, as youtubei.js only uses linkedom to generate DASH manifests
canvas: '{}',
'cordova': 'browserify/lib/_empty.js',
cordova: 'browserify/lib/_empty.js',
'music-controls': 'browserify/lib/_empty.js'
},
module: {
Expand All @@ -49,6 +46,11 @@ const config = {
{
test: /\.vue$/,
loader: 'vue-loader',
options: {
compilerOptions: {
whitespace: 'condense',
}
}
},
{
test: /\.scss$/,
Expand Down Expand Up @@ -136,10 +138,7 @@ const config = {
alias: {
vue$: 'vue/dist/vue.common.js',

// defaults to the prebundled browser version which causes webpack to error with:
// "Critical dependency: require function is used in a way in which dependencies cannot be statically extracted"
// webpack likes to bundle the dependencies itself, could really have a better error message though
'youtubei.js$': 'youtubei.js/dist/browser.js',
'youtubei.js$': 'youtubei.js/web',
},
extensions: ['.js', '.vue']
},
Expand Down
51 changes: 22 additions & 29 deletions _scripts/webpack.web.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,15 @@ const config = {
web: path.join(__dirname, '../src/renderer/main.js'),
},
output: {
publicPath: '',
path: path.join(__dirname, '../dist/web'),
filename: '[name].js',
},
externals: [
{
externals: {
electron: '{}',
cordova: '{}',
'music-controls': '{}'
'music-controls': '{}',
'youtubei.js': '{}'
},
({ request }, callback) => {
if (request.startsWith('youtubei.js')) {
return callback(null, '{}')
}
callback()
}
],
module: {
rules: [
{
Expand All @@ -45,7 +37,12 @@ const config = {
},
{
test: /\.vue$/,
loader: 'vue-loader'
loader: 'vue-loader',
options: {
compilerOptions: {
whitespace: 'condense',
}
}
},
{
test: /\.scss$/,
Expand Down Expand Up @@ -173,26 +170,22 @@ config.plugins.push(
'process.env.GEOLOCATION_NAMES': JSON.stringify(fs.readdirSync(path.join(__dirname, '..', 'static', 'geolocations')))
}),
new CopyWebpackPlugin({
patterns: [
{
from: path.join(__dirname, '../static/pwabuilder-sw.js'),
to: path.join(__dirname, '../dist/web/pwabuilder-sw.js'),
},
{
// webmanifest expected to be in root
from: path.join(__dirname, '../static/manifest.webmanifest'),
to: path.join(__dirname, '../dist/web/manifest.webmanifest'),
},
{
from: path.join(__dirname, '../static'),
to: path.join(__dirname, '../dist/web/static'),
globOptions: {
dot: true,
ignore: ['**/.*', '**/locales/**', '**/pwabuilder-sw.js', '**/dashFiles/**', '**/storyboards/**'],
patterns: [
{
from: path.join(__dirname, '../static/pwabuilder-sw.js'),
to: path.join(__dirname, '../dist/web/pwabuilder-sw.js'),
},
{
from: path.join(__dirname, '../static'),
to: path.join(__dirname, '../dist/web/static'),
globOptions: {
dot: true,
ignore: ['**/.*', '**/locales/**', '**/pwabuilder-sw.js', '**/dashFiles/**', '**/storyboards/**'],
},
},
},
]
})
)


module.exports = config
Loading

0 comments on commit 54a4035

Please sign in to comment.