Merge branch 'master' of github.com:th-ch/youtube-music into release-1-20
* 'master' of github.com:th-ch/youtube-music: fix security issues in deps commit assets/generated .gitattributes set `eol=lf` on **all** files remove `electron.remote` dependency
4
.gitattributes
vendored
@ -1,2 +1,2 @@
|
|||||||
* text=auto
|
* text=auto eol=lf
|
||||||
*.js text eol=lf
|
*.js text
|
||||||
|
|||||||
1
.gitignore
vendored
@ -1,6 +1,5 @@
|
|||||||
node_modules
|
node_modules
|
||||||
/dist
|
/dist
|
||||||
/assets/generated
|
|
||||||
electron-builder.yml
|
electron-builder.yml
|
||||||
.vscode/settings.json
|
.vscode/settings.json
|
||||||
.idea
|
.idea
|
||||||
|
|||||||
24
.yarn/patches/electron-is-dev-npm-2.0.0-9d41637d91.patch
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
diff --git a/index.js b/index.js
|
||||||
|
index c8f2fd4467c11b484fe654f7f250e2ba37e8100d..c9ae1ed3d3c7683b14dfe0eee801f5a07585d2aa 100644
|
||||||
|
--- a/index.js
|
||||||
|
+++ b/index.js
|
||||||
|
@@ -5,7 +5,16 @@ if (typeof electron === 'string') {
|
||||||
|
throw new TypeError('Not running in an Electron environment!');
|
||||||
|
}
|
||||||
|
|
||||||
|
-const isEnvSet = 'ELECTRON_IS_DEV' in process.env;
|
||||||
|
-const getFromEnv = Number.parseInt(process.env.ELECTRON_IS_DEV, 10) === 1;
|
||||||
|
+const isDev = () => {
|
||||||
|
+ if ('ELECTRON_IS_DEV' in process.env) {
|
||||||
|
+ return Number.parseInt(process.env.ELECTRON_IS_DEV, 10) === 1;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
-module.exports = isEnvSet ? getFromEnv : !electron.app.isPackaged;
|
||||||
|
+ if (process.type === 'browser') {
|
||||||
|
+ return !electron.app.isPackaged;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return 'npm_package_name' in process.env;
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+module.exports = isDev();
|
||||||
BIN
assets/generated/icons/mac/icon.icns
Normal file
BIN
assets/generated/icons/png/1024x1024.png
Normal file
|
After Width: | Height: | Size: 59 KiB |
BIN
assets/generated/icons/png/128x128.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
assets/generated/icons/png/16x16.png
Normal file
|
After Width: | Height: | Size: 600 B |
BIN
assets/generated/icons/png/24x24.png
Normal file
|
After Width: | Height: | Size: 931 B |
BIN
assets/generated/icons/png/256x256.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
assets/generated/icons/png/32x32.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
assets/generated/icons/png/48x48.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
assets/generated/icons/png/512x512.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
BIN
assets/generated/icons/png/64x64.png
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
assets/generated/icons/win/icon.ico
Normal file
|
After Width: | Height: | Size: 353 KiB |
@ -83,9 +83,8 @@
|
|||||||
"test:debug": "DEBUG=pw:browser* playwright test",
|
"test:debug": "DEBUG=pw:browser* playwright test",
|
||||||
"start": "electron .",
|
"start": "electron .",
|
||||||
"start:debug": "ELECTRON_ENABLE_LOGGING=1 electron .",
|
"start:debug": "ELECTRON_ENABLE_LOGGING=1 electron .",
|
||||||
"icon": "del-cli assets/generated && electron-icon-builder --input=assets/youtube-music.png --output=assets/generated",
|
|
||||||
"generate:package": "node utils/generate-package-json.js",
|
"generate:package": "node utils/generate-package-json.js",
|
||||||
"postinstall": "yarn run icon && yarn run plugins",
|
"postinstall": "yarn run plugins",
|
||||||
"clean": "del-cli dist",
|
"clean": "del-cli dist",
|
||||||
"build": "yarn run clean && electron-builder --win --mac --linux -p never",
|
"build": "yarn run clean && electron-builder --win --mac --linux -p never",
|
||||||
"build:linux": "yarn run clean && electron-builder --linux -p never",
|
"build:linux": "yarn run clean && electron-builder --linux -p never",
|
||||||
@ -137,6 +136,11 @@
|
|||||||
"youtubei.js": "^4.3.0",
|
"youtubei.js": "^4.3.0",
|
||||||
"ytpl": "^2.3.0"
|
"ytpl": "^2.3.0"
|
||||||
},
|
},
|
||||||
|
"resolutions": {
|
||||||
|
"xml2js": "^0.5.0",
|
||||||
|
"@electron/universal": "^1.3.4",
|
||||||
|
"electron-is-dev": "patch:electron-is-dev@npm%3A2.0.0#./.yarn/patches/electron-is-dev-npm-2.0.0-9d41637d91.patch"
|
||||||
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@playwright/test": "^1.29.2",
|
"@playwright/test": "^1.29.2",
|
||||||
"auto-changelog": "^2.4.0",
|
"auto-changelog": "^2.4.0",
|
||||||
@ -144,7 +148,6 @@
|
|||||||
"electron": "^22.3.6",
|
"electron": "^22.3.6",
|
||||||
"electron-builder": "^23.6.0",
|
"electron-builder": "^23.6.0",
|
||||||
"electron-devtools-installer": "^3.2.0",
|
"electron-devtools-installer": "^3.2.0",
|
||||||
"electron-icon-builder": "^2.0.1",
|
|
||||||
"node-gyp": "^9.3.1",
|
"node-gyp": "^9.3.1",
|
||||||
"playwright": "^1.29.2",
|
"playwright": "^1.29.2",
|
||||||
"xo": "^0.53.1"
|
"xo": "^0.53.1"
|
||||||
|
|||||||