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

refactor: convert to ESM + update all dependencies #277

Merged
merged 4 commits into from
Sep 25, 2024
Merged

Conversation

MarshallOfSound
Copy link
Member

BREAKING CHANGE: We now require node 20 or higher

Should wait for electron/docs-parser#120

@MarshallOfSound MarshallOfSound marked this pull request as ready for review September 23, 2024 17:58
@MarshallOfSound MarshallOfSound requested review from a team as code owners September 23, 2024 17:58
const apiPath = './vendor/electron/docs/api.json'

const definitionLines = generateDefinitions({ electronApi: require(apiPath) })
const definitionLines = generateDefinitions({ electronApi: loadJSON(apiPath) })
Copy link
Member

Choose a reason for hiding this comment

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

Is the loadJSON function just a placeholder? Should we made this code copy/pasteable?

Copy link
Member Author

Choose a reason for hiding this comment

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

The impl of loadJSON would be as much code as the rest of this doc, so, left as exercise to the reader

Copy link
Member

@dsanders11 dsanders11 left a comment

Choose a reason for hiding this comment

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

My two cents, if we're going to change test frameworks I have a preference for vitest over jest. It's faster, works better with ESM, and requires less boilerplate to work with modern codebases (e.g., you need @types/jest, ts-jest, cross-env, --experimental-vm-modules, etc while vitest Just Works). Alternatively node:test could handle the testing needs here, I haven't checked.

@MarshallOfSound
Copy link
Member Author

@dsanders11 This is just aligning the test framework with docs-parser (jest across the board). My preference with test frameworks is to wait for node:test to be ready for consumption. Right now it's not, snapshot testing is behind a flag and only on for node 22. Once that makes it's way down the release chain it might actually be usable.

@MarshallOfSound MarshallOfSound merged commit 576cb5e into main Sep 25, 2024
3 checks passed
@MarshallOfSound MarshallOfSound deleted the esm branch September 25, 2024 00:07
Copy link

🎉 This PR is included in version 9.0.0 🎉

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants