pear-runtime-updater 3.0.4 → 3.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -85,7 +85,6 @@ module.exports = class PearRuntimeUpdater extends ReadyResource {
85
85
 
86
86
  async _update() {
87
87
  if (this.updating || !this.updates) return
88
- this.updating = true
89
88
 
90
89
  await this.drive.update()
91
90
 
@@ -110,7 +109,6 @@ module.exports = class PearRuntimeUpdater extends ReadyResource {
110
109
  }
111
110
 
112
111
  if (!remote || current.compare(remote) >= 0) {
113
- this.updating = false
114
112
  this.checkout = null
115
113
  await co.close()
116
114
  if (this.drive.core.length > length) this._updateBackground()
@@ -119,6 +117,7 @@ module.exports = class PearRuntimeUpdater extends ReadyResource {
119
117
 
120
118
  const local = new Localdrive(next)
121
119
 
120
+ this.updating = true
122
121
  this.emit('updating')
123
122
  const prefix = prefixFor(host, this.name)
124
123
  for await (const data of co.mirror(local, { prefix })) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pear-runtime-updater",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "description": "Listens for OTA Pear App updates",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Holepunch Inc",