electron / packager

Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI

Home Page:https://npm.im/@electron/packager

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API regression: default is not a function in 18.1.2

rotu opened this issue Β· comments

Preflight Checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project follows, as appropriate.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

Issue Details

  • Electron Packager Version:
    • 18.1.2
  • Electron Version:
    • N/A
  • Operating System:
    • Windows 11
  • Last Known Working Electron Packager version::
    • 18.1.1

Expected Behavior

I expect the code example to work for using the packager api:

https://electron.github.io/packager/main/functions/packager.html

const packager = require('@electron/packager')

async function bundleElectronApp(options) {
  const appPaths = await packager(options)
  console.log(`Electron app bundles created:\n${appPaths.join("\n")}`)
}

Actual Behavior

Trying to use the above code fails with TypeError: packager is not a function.

To Reproduce

In a deno cli, you can import both versions and clearly see the different module structure:

> (await import ("npm:@electron/packager@18.1.1"))
[Module: null prototype] { default: [AsyncFunction: packager] }
> (await import ("npm:@electron/packager@18.1.2"))
[Module: null prototype] {
  __esModule: true,
  allOfficialArchsForPlatformAndVersion: [Function: allOfficialArchsForPlatformAndVersion],
  default: {
    allOfficialArchsForPlatformAndVersion: [Getter],
    packager: [Getter],
    serialHooks: [Getter],
    default: [AsyncFunction: packager]
  },
  packager: [AsyncFunction: packager],
  serialHooks: [Function: serialHooks]
}

πŸ‘‹ Thanks for opening your first issue here! If you have a question about using Electron Packager, read the support docs. If you're reporting a 🐞 bug, please make sure you include steps to reproduce it. Development and issue triage is community-driven, so please be patient and we will get back to you as soon as we can.

To help make it easier for us to investigate your issue, please follow the contributing guidelines.

πŸŽ‰ This issue has been resolved in version 18.3.2 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€