-
Notifications
You must be signed in to change notification settings - Fork 58
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
Migrate from CommonJS to ESM and add Windows 11 support #214
base: main
Are you sure you want to change the base?
Conversation
Made a few changes here to remove the type: module and switch to using .mjs files for those files that use ESM |
This is fantastic work, thank you for contributing!
|
I'm not sure why the rest of the checks are failing, I might have missed some changes one of the CI pipelines, will follow up shortly. Would it be cheeky to add myself to the contributors in the Readme @tabrindle 😉 |
|
For compatibility, on my cursory testing, with a couple of tweaks that I'll push later, the dist package will run on Node 10.13 and above (the first 10.,x LTS build), though it doesn't currently run in 8.x. I can do some digging for 8.x support though I'm not so confident on that one |
…ebpack config to support cli
Otherwise I think this is as much as is going to fit into this PR. Anything else you want me to address? |
@tabrindle Just checking if you've had a chance to look at this |
can confirm hey it's nice to see it's been working on. npx create-react-app --info
|
There are some need of Powershell commands to replace ides.js:49: browser.js:159: There are |
Thanks for the feedback @erickriva. I've made the changes as you suggested, but I've opted for ProductVersion, since FileVersion seems to include a version number of the build tooling which isn't relevant. It's interesting that the IE binary is still present in Win 11 despite being unable to open it. For the execution policy, cycling through execution policy modes, I can't find a combination where Yarn will run but the command won't, so no concerns there. Also bumped the version number by a major version |
What's the status of this PR? |
🦤 |
Apologies in advance for the long PR, hoping to trigger some discussion here so it's relevant to include the whole thing. I can break this down into smaller subsequent PRs if this change is desired.
To preface, this work came out of investigation of #213, and the fact that os-name (https://github.com/sindresorhus/os-name) has migrated to an ESM package. In order to maintain this dependency, and import the latest version which removes the dependency on wmic (which is removed in latest versions of Windows 10 and 11), that required that envinfo also switch to ESM. This should close #209 and #213
envinfo on Windows 11 build 22509 today:
envinfo on Windows 11 build 22509 after this PR:
What this PR does:
What this PR does not do:
wmic
references in the codebase, in browser.js:159 and ides.js:49. These don't break envinfo at the moment so I've left them for followup. EDIT: Fixed