Repository: electron-userland/electron-builder
File: packages/electron-updater/src/AppUpdater.ts (TypeScript)

Code before:

  /**
   * *NSIS only* Disable differential downloads and always perform full download of installer.
   *
   * @default false
   */
  disableDifferentialDownload = false

  /**
   * Allows developer to force the updater to work in "dev" mode, looking for "dev-app-update.yml" instead of "app-update.yml"
   * Dev: `path.join(this.app.getAppPath(), "dev-app-update.yml")`
   * Prod: `path.join(process.resourcesPath!, "app-update.yml")`
   *
   * @default false
   */
  forceDevUpdateConfig = false

  /**
   * The base URL of the old block map file.
   * @default null
   */
  private _oldBlockMapFileBaseUrl: string | null = null

  /**
   * The current application version.
   */
  readonly currentVersion: SemVer

  private _channel: string | null = null

  protected downloadedUpdateHelper: DownloadedUpdateHelper | null = null

  /**
   * Get the update channel. Doesn't return `channel` from the update configuration, only if was previously set.
   */
  get channel(): string | null {
    return this._channel
  }

  get oldBlockMapFileBaseUrl(): string | null {
    return this._oldBlockMapFileBaseUrl
  }

  set oldBlockMapFileBaseUrl(value: string | null) {
    this._oldBlockMapFileBaseUrl = value
  }

  /**
   * Set the update channel. Overrides `channel` in the update configuration.
   *
   * `allowDowngrade` will be automatically set to `true`. If this behavior is not suitable for you, simple set `allowDowngrade` explicitly after.

Review comment (suggestion):
Can you add to the docs what `default: null` actually signifies? (for those end-user/devs not familiar with differential downloading or blockmaps)

- What happens when it's null, what does it mean
- What happens when it's set 

Code after:

  /**
   * *NSIS only* Disable differential downloads and always perform full download of installer.
   *
   * @default false
   */
  disableDifferentialDownload = false

  /**
   * Allows developer to force the updater to work in "dev" mode, looking for "dev-app-update.yml" instead of "app-update.yml"
   * Dev: `path.join(this.app.getAppPath(), "dev-app-update.yml")`
   * Prod: `path.join(process.resourcesPath!, "app-update.yml")`
   *
   * @default false
   */
  forceDevUpdateConfig = false

  /**
   * The base URL of the old block map file.
   *
   * When null, the updater will use the base URL of the update file to download the update.
   * When set, the updater will use this string as the base URL of the old block map file.
   * Some servers like github cannot download the old block map file from latest release,
   * so you need to compute the old block map file base URL manually.
   *
   * @default null
   */
  public previousBlockmapBaseUrlOverride: string | null = null

  /**
   * The current application version.
   */
  readonly currentVersion: SemVer

  private _channel: string | null = null

  protected downloadedUpdateHelper: DownloadedUpdateHelper | null = null

  /**
   * Get the update channel. Doesn't return `channel` from the update configuration, only if was previously set.
   */
  get channel(): string | null {
    return this._channel
  }

  /**
   * Set the update channel. Overrides `channel` in the update configuration.
   *
   * `allowDowngrade` will be automatically set to `true`. If this behavior is not suitable for you, simple set `allowDowngrade` explicitly after.
   */
  set channel(value: string | null) {