Repository: electron-userland/electron-builder
File: packages/app-builder-lib/src/targets/nsis/NsisTarget.ts (TypeScript)

Code before:
    this.packageHelper.refCount++

    this.options =
      targetName === "portable"
        ? Object.create(null)
        : {
            preCompressedFileExtensions: [".avi", ".mov", ".m4v", ".mp4", ".m4p", ".qt", ".mkv", ".webm", ".vmdk"],
            ...this.packager.config.nsis,
          }

    if (targetName !== "nsis") {
      Object.assign(this.options, (this.packager.config as any)[targetName === "nsis-web" ? "nsisWeb" : targetName])
    }

    const deps = packager.info.metadata.dependencies
    if (deps != null && deps["electron-squirrel-startup"] != null) {
      log.warn('"electron-squirrel-startup" dependency is not required for NSIS')
    }

    NsisTargetOptions.resolve(this.options)
  }

  protected buildUniversalInstaller() {
    const buildSeparateInstallers = this.options.buildUniversalInstaller === false
    return !buildSeparateInstallers
  }

  build(appOutDir: string, arch: Arch) {
    this.archs.set(arch, appOutDir)
    if (!this.buildUniversalInstaller()) {
      return this.buildInstaller(new Map<Arch, string>().set(arch, appOutDir))
    }
    return Promise.resolve()
  }

  get isBuildDifferentialAware(): boolean {
    return !this.isPortable && this.options.differentialPackage !== false
  }

  private getPreCompressedFileExtensions(): Array<string> | null {
    const result = this.isWebInstaller ? null : this.options.preCompressedFileExtensions
    return result == null ? null : asArray(result).map(it => (it.startsWith(".") ? it : `.${it}`))
  }

  /** @private */
  async buildAppPackage(appOutDir: string, arch: Arch): Promise<PackageFileInfo> {
    const options = this.options
    const packager = this.packager

    const isBuildDifferentialAware = this.isBuildDifferentialAware
    const format = !isBuildDifferentialAware && options.useZip ? "zip" : "7z"

Review comment (suggestion):
``` javascript
protected buildUniversalInstaller() {
    return this.options.buildUniversalInstaller 
 }
```

Code after:
    this.packageHelper.refCount++

    this.options =
      targetName === "portable"
        ? Object.create(null)
        : {
            preCompressedFileExtensions: [".avi", ".mov", ".m4v", ".mp4", ".m4p", ".qt", ".mkv", ".webm", ".vmdk"],
            ...this.packager.config.nsis,
          }

    if (targetName !== "nsis") {
      Object.assign(this.options, (this.packager.config as any)[targetName === "nsis-web" ? "nsisWeb" : targetName])
    }

    const deps = packager.info.metadata.dependencies
    if (deps != null && deps["electron-squirrel-startup"] != null) {
      log.warn('"electron-squirrel-startup" dependency is not required for NSIS')
    }

    NsisTargetOptions.resolve(this.options)
  }

  get shouldBuildUniversalInstaller() {
    const buildSeparateInstallers = this.options.buildUniversalInstaller === false
    return !buildSeparateInstallers
  }

  build(appOutDir: string, arch: Arch) {
    this.archs.set(arch, appOutDir)
    if (!this.shouldBuildUniversalInstaller) {
      return this.buildInstaller(new Map<Arch, string>().set(arch, appOutDir))
    }
    return Promise.resolve()
  }

  get isBuildDifferentialAware(): boolean {
    return !this.isPortable && this.options.differentialPackage !== false
  }

  private getPreCompressedFileExtensions(): Array<string> | null {
    const result = this.isWebInstaller ? null : this.options.preCompressedFileExtensions
    return result == null ? null : asArray(result).map(it => (it.startsWith(".") ? it : `.${it}`))
  }

  /** @private */
  async buildAppPackage(appOutDir: string, arch: Arch): Promise<PackageFileInfo> {
    const options = this.options
    const packager = this.packager

    const isBuildDifferentialAware = this.isBuildDifferentialAware
    const format = !isBuildDifferentialAware && options.useZip ? "zip" : "7z"