Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API regression: default is not a function in 18.1.2 #1700

Closed
3 tasks done
rotu opened this issue Apr 1, 2024 · 2 comments · Fixed by #1702
Closed
3 tasks done

API regression: default is not a function in 18.1.2 #1700

rotu opened this issue Apr 1, 2024 · 2 comments · Fixed by #1702

Comments

@rotu
Copy link

rotu commented Apr 1, 2024

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]
}
@rotu rotu added the bug 🐛 label Apr 1, 2024
Copy link

welcome bot commented Apr 1, 2024

👋 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.

Copy link

🎉 This issue has been resolved in version 18.3.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant