Skip to content

Commit

Permalink
Merge pull request #1389 from hovancik/up/deps
Browse files Browse the repository at this point in the history
Update dependencies
  • Loading branch information
hovancik authored Nov 7, 2023
2 parents 3c85cfc + 492953b commit bce954a
Show file tree
Hide file tree
Showing 14 changed files with 110 additions and 91 deletions.
3 changes: 0 additions & 3 deletions app/break.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ const Utils = remote.require('./utils/utils')
const HtmlTranslate = require('./utils/htmlTranslate')
const Store = require('electron-store')
const settings = new Store()
const log = require('electron-log')
const path = require('path')
log.transports.file.resolvePath = () => path.join(remote.app.getPath('userData'), 'logs/main.log')

window.onload = (event) => {
ipcRenderer.send('send-break-data')
Expand Down
2 changes: 1 addition & 1 deletion app/breaksPlanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const EventEmitter = require('events')
const NaturalBreaksManager = require('./utils/naturalBreaksManager')
const DndManager = require('./utils/dndManager')
const AppExclusionsManager = require('./utils/appExclusionsManager')
const log = require('electron-log')
const log = require('electron-log/main')

class BreaksPlanner extends EventEmitter {
constructor (settings) {
Expand Down
3 changes: 2 additions & 1 deletion app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const {
const path = require('path')
const i18next = require('i18next')
const Backend = require('i18next-fs-backend')
const log = require('electron-log')
const log = require('electron-log/main')
const Store = require('electron-store')

process.on('uncaughtException', (err, _) => {
Expand Down Expand Up @@ -61,6 +61,7 @@ let currentTrayMenuTemplate = null
let trayUpdateIntervalObj = null

require('@electron/remote/main').initialize()
log.initialize({ preload: true })

app.setAppUserModelId('net.hovancik.stretchly')

Expand Down
3 changes: 0 additions & 3 deletions app/microbreak.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ const Utils = remote.require('./utils/utils')
const HtmlTranslate = require('./utils/htmlTranslate')
const Store = require('electron-store')
const settings = new Store()
const log = require('electron-log')
const path = require('path')
log.transports.file.resolvePath = () => path.join(remote.app.getPath('userData'), 'logs/main.log')

window.onload = (e) => {
ipcRenderer.send('send-microbreak-data')
Expand Down
28 changes: 16 additions & 12 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
"dependencies": {
"@electron/remote": "^2.0.12",
"dbus-final": "github:Jelmerro/dbus-final",
"electron-log": "^4.4.8",
"electron-log": "^5.0.0",
"electron-store": "^8.1.0",
"humanize-duration": "^3.30.0",
"i18next": "^23.5.1",
"i18next": "^23.6.0",
"i18next-fs-backend": "^2.2.0",
"luxon": "^3.4.3",
"macos-notification-state": "^3.0.0",
"meeussunmoon": "^3.0.3",
"ps-list": "7.2.0",
"rtl-detect": "^1.0.4",
"rtl-detect": "^1.1.2",
"semver": "^7.5.4",
"windows-focus-assist": "^1.3.0",
"windows-quiet-hours": "^2.0.0"
Expand Down
11 changes: 4 additions & 7 deletions app/process.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,10 @@ const VersionChecker = require('./utils/versionChecker')
const i18next = remote.require('i18next')
const semver = require('semver')
const { shouldShowNotificationTitle } = require('./utils/utils')
const log = require('electron-log')
const path = require('path')
log.transports.file.resolvePath = () => path.join(remote.app.getPath('userData'), 'logs/main.log')

window.onload = (e) => {
ipcRenderer.on('playSound', (event, file, volume) => {
log.info(`Stretchly: playing audio/${file}.wav (volume: ${volume})`)
__electronLog.info(`Stretchly: playing audio/${file}.wav (volume: ${volume})`)
const audio = new Audio(`audio/${file}.wav`)
audio.volume = volume
audio.play()
Expand All @@ -25,7 +22,7 @@ window.onload = (e) => {
.then(version => {
if (version) {
const cleanVersion = semver.clean(version)
log.info(`Stretchly: checking for new version (local: ${oldVersion}, remote: ${cleanVersion})`)
__electronLog.info(`Stretchly: checking for new version (local: ${oldVersion}, remote: ${cleanVersion})`)
if (semver.valid(cleanVersion) && semver.gt(cleanVersion, oldVersion)) {
remote.getGlobal('shared').isNewVersion = true
ipcRenderer.send('update-tray')
Expand All @@ -34,10 +31,10 @@ window.onload = (e) => {
}
}
} else {
log.info('Stretchly: could not check for new version')
__electronLog.info('Stretchly: could not check for new version')
}
})
.catch(exception => log.error(exception))
.catch(exception => __electronLog.error(exception))
}
})

Expand Down
2 changes: 1 addition & 1 deletion app/utils/appExclusionsManager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const EventEmitter = require('events')
const log = require('electron-log')
const log = require('electron-log/main')
const psList = require('ps-list')

class AppExclusionsManager extends EventEmitter {
Expand Down
2 changes: 1 addition & 1 deletion app/utils/commands.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const { UntilMorning } = require('./untilMorning')
const log = require('electron-log')
const log = require('electron-log/main')

const allOptions = {
title: {
Expand Down
2 changes: 1 addition & 1 deletion app/utils/dndManager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const EventEmitter = require('events')
const log = require('electron-log')
const log = require('electron-log/main')

class DndManager extends EventEmitter {
constructor (settings) {
Expand Down
2 changes: 1 addition & 1 deletion app/utils/naturalBreaksManager.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const EventEmitter = require('events')
const log = require('electron-log')
const log = require('electron-log/main')

class NaturalBreaksManager extends EventEmitter {
constructor (settings) {
Expand Down
2 changes: 1 addition & 1 deletion app/utils/untilMorning.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const { DateTime } = require('luxon')
const MeeusSunMoon = require('meeussunmoon')
const log = require('electron-log')
const log = require('electron-log/main')

class UntilMorning {
constructor (settings) {
Expand Down
Loading

0 comments on commit bce954a

Please sign in to comment.