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

Support apple silicon #323

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saifahn
Copy link

@saifahn saifahn commented Aug 11, 2022

Overview

This builds on the changes from #322.

The mac64 edgedriver works on apple silicon, so it should also be supported.

got v12: https://github.com/sindresorhus/got/releases/tag/v12.0.0
introduced some breaking changes, including the package becoming
pure ESM.

For compatibility, the package has been rolled back to v11.
The mac64 edgedriver works on apple silicon, so it should also be
supported.
if (platform === 'darwin') {
if (arch === 'x64') return OS.MAC64;
if (arch === 'arm64') return OS.MAC_ARM64;
return OS.UNSUPPORTED;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unsupported is added as a catch-all. To be honest, it should be added as the final return, but I'm intending on adding Linux support as well.

Comment on lines +11 to +12
const platform = process.platform;
const arch = process.arch;
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The string type was removed so that TypeScript can infer the more accurate and narrow type from process

@saifahn saifahn mentioned this pull request Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant