Skip to content

Commit f51e625

Browse files
committed
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
2 parents 4fe02ba + 040946c commit f51e625

File tree

16 files changed

+117
-1727
lines changed

16 files changed

+117
-1727
lines changed

β€Ž.gitattributesβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
* text=auto
2-
*.js text eol=lf
1+
* text=auto eol=lf
2+
*.js text

β€Ž.gitignoreβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
node_modules
22
/dist
3-
/assets/generated
43
electron-builder.yml
54
.vscode/settings.json
65
.idea
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
diff --git a/index.js b/index.js
2+
index c8f2fd4467c11b484fe654f7f250e2ba37e8100d..c9ae1ed3d3c7683b14dfe0eee801f5a07585d2aa 100644
3+
--- a/index.js
4+
+++ b/index.js
5+
@@ -5,7 +5,16 @@ if (typeof electron === 'string') {
6+
throw new TypeError('Not running in an Electron environment!');
7+
}
8+
9+
-const isEnvSet = 'ELECTRON_IS_DEV' in process.env;
10+
-const getFromEnv = Number.parseInt(process.env.ELECTRON_IS_DEV, 10) === 1;
11+
+const isDev = () => {
12+
+ if ('ELECTRON_IS_DEV' in process.env) {
13+
+ return Number.parseInt(process.env.ELECTRON_IS_DEV, 10) === 1;
14+
+ }
15+
16+
-module.exports = isEnvSet ? getFromEnv : !electron.app.isPackaged;
17+
+ if (process.type === 'browser') {
18+
+ return !electron.app.isPackaged;
19+
+ }
20+
+
21+
+ return 'npm_package_name' in process.env;
22+
+};
23+
+
24+
+module.exports = isDev();
146 KB
Binary file not shown.
58.6 KB
Loading
5.57 KB
Loading
600 Bytes
Loading
931 Bytes
Loading
11.8 KB
Loading
1.24 KB
Loading

0 commit comments

Comments
Β (0)