Skip to content

Migrate documentation parsing to comment-parser #14369

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

Merged
merged 1 commit into from
Apr 5, 2025

Conversation

Rondleysg
Copy link
Contributor

Proposed changes

This pull request migrates dox to comment-parser. The current library for parsing JS comments is old and unmaintained. Additionally, a refactoring was made to support the new package along with some improvements.

What Changed:

  • Now displays @return in all docs that have the annotation and any new annotation that is added (e.g., api/browser/getWindowSize).
    Before
    image
    After
    image

  • Fixed incorrect display of some parameter types (e.g., in api/browser/getCookies, the type was displayed as param instead of remote.StorageCookieFilter; in api/browser/url, Record is now correctly shown as Record<string, string>).
    Before
    image
    After
    image

  • Ensured parameters display the 'optional' tag when they should (e.g., in api/browser/react$, the options.state parameter).

  • Fixed formatting of the 'Usage' section in cases where it was previously incorrect (e.g., in api/browser/saveScreenshot).
    Before
    image
    After
    image

  • With the new parser, new types are supported

Types of changes

  • Polish (an improvement for an existing feature)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update (improvements to the project's docs)
  • Specification changes (updates to WebDriver command specifications)
  • Internal updates (everything related to internal scripts, governance documentation and CI files)

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added the necessary documentation (if appropriate)
  • I have added proper type definitions for new commands (if appropriate)

Reviewers: @webdriverio/project-committers

Copy link

pkg-pr-new bot commented Apr 3, 2025

Open in StackBlitz

eslint-plugin-wdio

npm i https://pkg.pr.new/webdriverio/webdriverio/eslint-plugin-wdio@14369

@wdio/allure-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/allure-reporter@14369

@wdio/appium-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/appium-service@14369

@wdio/browser-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browser-runner@14369

@wdio/cli

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cli@14369

@wdio/browserstack-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/browserstack-service@14369

@wdio/concise-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/concise-reporter@14369

@wdio/config

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/config@14369

@wdio/cucumber-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/cucumber-framework@14369

@wdio/dot-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/dot-reporter@14369

@wdio/firefox-profile-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/firefox-profile-service@14369

@wdio/globals

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/globals@14369

@wdio/jasmine-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/jasmine-framework@14369

@wdio/json-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/json-reporter@14369

@wdio/junit-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/junit-reporter@14369

@wdio/lighthouse-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/lighthouse-service@14369

@wdio/local-runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/local-runner@14369

@wdio/logger

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/logger@14369

@wdio/mocha-framework

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/mocha-framework@14369

@wdio/protocols

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/protocols@14369

@wdio/repl

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/repl@14369

@wdio/reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/reporter@14369

@wdio/runner

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/runner@14369

@wdio/sauce-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sauce-service@14369

@wdio/shared-store-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/shared-store-service@14369

@wdio/smoke-test-cjs-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-cjs-service@14369

@wdio/smoke-test-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-reporter@14369

@wdio/smoke-test-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/smoke-test-service@14369

@wdio/spec-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/spec-reporter@14369

@wdio/static-server-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/static-server-service@14369

@wdio/sumologic-reporter

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/sumologic-reporter@14369

@wdio/testingbot-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/testingbot-service@14369

@wdio/types

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/types@14369

@wdio/utils

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/utils@14369

@wdio/webdriver-mock-service

npm i https://pkg.pr.new/webdriverio/webdriverio/@wdio/webdriver-mock-service@14369

webdriver

npm i https://pkg.pr.new/webdriverio/webdriverio/webdriver@14369

webdriverio

npm i https://pkg.pr.new/webdriverio/webdriverio@14369

commit: 98a35aa

Copy link
Member

@christian-bromann christian-bromann left a comment

Choose a reason for hiding this comment

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

Amazing 😍

@christian-bromann christian-bromann added the PR: Docs 📝 PRs that contain changes to the documentation label Apr 5, 2025
@christian-bromann christian-bromann merged commit 7c9dd9a into webdriverio:main Apr 5, 2025
43 checks passed
@wdio-bot
Copy link
Contributor

wdio-bot commented Apr 5, 2025

Hey Rondleysg 👋

Thank you for your contribution to WebdriverIO! Your pull request has been marked as an "Expensable" contribution.

We've sent you an email with further instructions on how to claim your expenses from our development fund.
Please make sure to check your spam folder as well. If you have any questions, feel free to reach out to us at expense@webdriver.io or in the contributing channel on Discord.

We are looking forward to more contributions from you in the future 🙌

Have a nice day,
The WebdriverIO Team 🤖

@Rondleysg
Copy link
Contributor Author

@christian-bromann
Yes, this is not correct, I will adjust it

The caution information was displayed this way before, but I will correct it to display only "caution", ok?

About the returns, it is because they do not have a description, I will add a description for them

@christian-bromann
Copy link
Member

The caution information was displayed this way before, but I will correct it to display only "caution", ok?

I was confused as why the caution banner only container true as content, this didn't seem right.

About the returns, it is because they do not have a description, I will add a description for them

We could also just don't show the Return section if there is no value.

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Expensable $100 💸 PR: Docs 📝 PRs that contain changes to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy