Skip to content

Commit

Permalink
fix: update electron-store to fix bug with snap
Browse files Browse the repository at this point in the history
  • Loading branch information
sneljo1 committed Feb 19, 2020
1 parent c941264 commit e982b22
Show file tree
Hide file tree
Showing 7 changed files with 46 additions and 29 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ node_modules
test/unit/coverage/**
test/unit/*.js
test/e2e/*.js
*.d.ts
*.d.ts
*.yaml
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

snapcraft.yaml
4 changes: 2 additions & 2 deletions internals/deploy/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ BASEDIR=$(dirname $0)
echo "Version: $PACKAGE_VERSION"

cd $BASEDIR/auryo-snap
ls ../../build/snap/
ls ../../snap/
git checkout . -f
cp -R ../../build/snap/* ./snap
cp -R ../../snap/* ./snap
sed -i'' -e "s/{VERSION}/$PACKAGE_VERSION/g" ./snap/snapcraft.yaml
echo $current_date_time > triggered_build_at
git add -A
Expand Down
11 changes: 4 additions & 7 deletions internals/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ parts:
# Correct path to icon.
# Clear the execstack - https://forum.snapcraft.io/t/snap-and-executable-stacks/1812
prepare: |
sed -i 's|Icon=auryo|Icon=/usr/share/icons/hicolor/256x256/apps/auryo\.png|' usr/share/applications/auryo.desktop
execstack --clear-execstack opt/Auryo/auryo
sed -i 's|Icon=auryo|Icon=/usr/share/icons/hicolor/256x256/apps/auryo\.png|' usr/share/applications/auryo.desktop
execstack --clear-execstack opt/Auryo/auryo
build-packages:
- execstack
stage-packages:
Expand All @@ -34,7 +34,7 @@ parts:

apps:
auryo:
command: bin/desktop-launch $SNAP/opt/Auryo/auryo
command: bin/desktop-launch $SNAP/opt/Auryo/auryo --no-sandbox
environment:
TMPDIR: $XDG_RUNTIME_DIR
plugs:
Expand All @@ -52,7 +52,4 @@ apps:
slots:
auryo-player-mpris:
interface: mpris
name: auryo_player
auryo-mpris:
interface: mpris
name: auryo
name: auryo_player
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"repository": "Superjo149/auryo",
"homepage": "http://auryo.com",
"productName": "Auryo",
"version": "2.5.0",
"version": "2.5.1",
"author": {
"name": "Jonas Snellinckx",
"email": "jonas.snellinckx@gmail.com"
Expand Down Expand Up @@ -226,7 +226,7 @@
"electron-dl": "^1.14.0",
"electron-is": "^3.0.0",
"electron-localshortcut": "^3.1.0",
"electron-store": "^4.0.0",
"electron-store": "^5.1.0",
"electron-updater": "^4.2.0",
"electron-window-state": "^5.0.3",
"history": "^4.10.1",
Expand Down
8 changes: 5 additions & 3 deletions src/main/settings.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { ConfigState } from '@common/store/config';
// import { ConfigState } from '@common/store/config';
import Store from 'electron-store';
import { MockSettings } from './mockSettings';

export const settings: Store<ConfigState> = !process.env.TOKEN
export const settings: any = !process.env.TOKEN
? new Store({ name: 'auryo-settings' })
: (new MockSettings() as any);
: // TODO fix Conf types
// https://github.com/sindresorhus/conf/issues/86
(new MockSettings() as any);
43 changes: 29 additions & 14 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4485,17 +4485,20 @@ concurrently@^4.0.1:
tree-kill "^1.2.1"
yargs "^12.0.5"

conf@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/conf/-/conf-5.0.0.tgz#6530308a36041bf010ab96b05a0f4aff5101c65d"
integrity sha512-lRNyt+iRD4plYaOSVTxu1zPWpaH0EOxgFIR1l3mpC/DGZ7XzhoGFMKmbl54LAgXcSu6knqWgOwdINkqm58N85A==
conf@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/conf/-/conf-6.2.0.tgz#274d37a0a2e50757ffb89336e954d08718eb359a"
integrity sha512-fvl40R6YemHrFsNiyP7TD0tzOe3pQD2dfT2s20WvCaq57A1oV+RImbhn2Y4sQGDz1lB0wNSb7dPcPIvQB69YNA==
dependencies:
ajv "^6.10.0"
ajv "^6.10.2"
debounce-fn "^3.0.1"
dot-prop "^5.0.0"
env-paths "^2.2.0"
json-schema-typed "^7.0.0"
json-schema-typed "^7.0.1"
make-dir "^3.0.0"
onetime "^5.1.0"
pkg-up "^3.0.1"
semver "^6.2.0"
write-file-atomic "^3.0.0"

config-chain@^1.1.11:
Expand Down Expand Up @@ -5154,6 +5157,13 @@ dbus-next@^0.5.1:
optionalDependencies:
abstract-socket "^2.0.0"

debounce-fn@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/debounce-fn/-/debounce-fn-3.0.1.tgz#034afe8b904d985d1ec1aa589cd15f388741d680"
integrity sha512-aBoJh5AhpqlRoHZjHmOzZlRx+wz2xVwGL9rjs+Kj0EWUrL4/h4K7OD176thl2Tdoqui/AaA4xhHrNArGLAaI3Q==
dependencies:
mimic-fn "^2.1.0"

debug@2.6.9, debug@^2.1.3, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.8, debug@^2.6.9:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
Expand Down Expand Up @@ -5926,13 +5936,13 @@ electron-publish@22.3.3:
lazy-val "^1.0.4"
mime "^2.4.4"

electron-store@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/electron-store/-/electron-store-4.0.0.tgz#5f0835663bb774d5eecb5b283b390f9910ec4cfc"
integrity sha512-qgkDetwB9bz+ZA7mNCQGm6zLJOMT4yBkTZ7f16M9iS0GcI/bOeOeFkLkIaJddTtPca7MOiaUM1imMjFqUfQgSA==
electron-store@^5.1.0:
version "5.1.0"
resolved "https://registry.yarnpkg.com/electron-store/-/electron-store-5.1.0.tgz#0b3cb66b15d0002678fc5c13e8b0c38a8678d670"
integrity sha512-uhAF/4+zDb+y0hWqlBirEPEAR4ciCZDp4fRWGFNV62bG+ArdQPpXk7jS0MEVj3CfcG5V7hx7Dpq5oD+1j6GD8Q==
dependencies:
conf "^5.0.0"
type-fest "^0.5.2"
conf "^6.2.0"
type-fest "^0.7.1"

electron-to-chromium@^1.3.349:
version "1.3.354"
Expand Down Expand Up @@ -9840,7 +9850,7 @@ json-schema-traverse@^0.4.1:
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==

json-schema-typed@^7.0.0:
json-schema-typed@^7.0.1:
version "7.0.3"
resolved "https://registry.yarnpkg.com/json-schema-typed/-/json-schema-typed-7.0.3.tgz#23ff481b8b4eebcd2ca123b4fa0409e66469a2d9"
integrity sha512-7DE8mpG+/fVw+dTpjbxnx47TaMnDfOI1jwft9g1VybltZCduyRQPJPvc+zzKY9WPHxhPWczyFuYa6I8Mw4iU5A==
Expand Down Expand Up @@ -15748,11 +15758,16 @@ type-detect@4.0.8, type-detect@^4.0.0, type-detect@^4.0.5:
resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c"
integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==

type-fest@^0.5.1, type-fest@^0.5.2:
type-fest@^0.5.1:
version "0.5.2"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.5.2.tgz#d6ef42a0356c6cd45f49485c3b6281fc148e48a2"
integrity sha512-DWkS49EQKVX//Tbupb9TFa19c7+MK1XmzkrZUR8TAktmE/DizXoaoJV6TZ/tSIPXipqNiRI6CyAe7x69Jb6RSw==

type-fest@^0.7.1:
version "0.7.1"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.7.1.tgz#8dda65feaf03ed78f0a3f9678f1869147f7c5c48"
integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==

type-fest@^0.8.0, type-fest@^0.8.1:
version "0.8.1"
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d"
Expand Down

0 comments on commit e982b22

Please sign in to comment.