qwikifiers / qwik-ui

Qwik's Headless and styled component library
https://qwikui.com
MIT License
636 stars 144 forks source link

refactor(auto-api.ts): chatgpt o1 cleanup #985

Closed maiieul closed 1 month ago

maiieul commented 1 month ago

What is it?

Why is it needed?

•   Variable Renaming: Changed variable names like lol to capture and hacky to exportedApi for better readability.
•   Regex Enhancements: Updated regex patterns to be platform-independent by matching both / and \ using [\\/].
•   Edge Case Handling: Added checks to prevent accessing undefined variables when arrays may be empty.
•   Error Logging: Included error logging in the catch block of writeToDocs to output any errors during file writing.
•   Path Handling: Used path.resolve to handle file paths in a platform-independent way.
•   Comment Trimming: Trimmed comments to remove unnecessary whitespace.

Checklist:

changeset-bot[bot] commented 1 month ago

⚠️ No Changeset found

Latest commit: 691a11b92e4d7de22f09e2c39ec75827c201b6a5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

pkg-pr-new[bot] commented 1 month ago

Open in Stackblitz

pnpm add https://pkg.pr.new/qwikifiers/qwik-ui@985
pnpm add https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/styled@985
pnpm add https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/headless@985
pnpm add https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/utils@985

commit: 691a11b

maiieul commented 1 month ago

Took your comments into account. Thanks for the review 🙇‍♂️ . I think the regex is good for windows. But if it's problematic feel free to re-change in another PR :)