<commit_before>const { dialog, Notification } = require('electron')
const { autoUpdater } = require('electron-updater')
const logger = require('electron-log')

autoUpdater.logger = logger
autoUpdater.logger.transports.file.level = 'info'

let updater
autoUpdater.autoDownload = false

let updating = false
let foundUpdates = false

autoUpdater.on('error', error => {
  dialog.showErrorBox(
    'Error: ',
    error == null ? 'unknown' : (error.stack || error).toString()
  )
})

autoUpdater.on('update-available', () => {
  foundUpdates = true
  if (updater == null) {
    const notification = new Notification({
      title: 'Found Updates!',
      body: 'Click here to update'
    })
    notification.addListener('click', () => {
      dialog
        .showMessageBox({
          type: 'info',
          title: 'Found Updates',
          message: 'Found updates, do you want update now?',
          buttons: ['Sure', 'No']
        })
        .then(({ response }) => {
          if (response === 0) {
            autoUpdater.downloadUpdate()
          }
        })
    })
    notification.show()
  } else {<commit_msg>Surpress updater error message<commit_after>const { dialog, Notification } = require('electron')
const { autoUpdater } = require('electron-updater')
const logger = require('electron-log')

autoUpdater.logger = logger
autoUpdater.logger.transports.file.level = 'info'

let updater
autoUpdater.autoDownload = false

let updating = false
let foundUpdates = false

autoUpdater.on('error', error => {
  console.info(error.stack || error)
})

autoUpdater.on('update-available', () => {
  foundUpdates = true
  if (updater == null) {
    const notification = new Notification({
      title: 'Found Updates!',
      body: 'Click here to update'
    })
    notification.addListener('click', () => {
      dialog
        .showMessageBox({
          type: 'info',
          title: 'Found Updates',
          message: 'Found updates, do you want update now?',
          buttons: ['Sure', 'No']
        })
        .then(({ response }) => {
          if (response === 0) {
            autoUpdater.downloadUpdate()
          }
        })
    })
    notification.show()
  } else {
{'fraction_non_alphanumeric': 0.14344637946837763, 'fraction_numerical': 0.0009165902841429881, 'mean_word_length': 2.6937394247038915, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2917513', 'n_tokens_mistral': 644, 'n_tokens_neox': 649, 'n_words': 154}