wails icon indicating copy to clipboard operation
wails copied to clipboard

Cleanup JS api types

Open jpatters opened this issue 1 year ago • 6 comments

Description

The adds better type support for the js apis. It also makes the exports from the npm package more conventional. Previously usage looked like this:

import { Dialogs } from "@wailsapp/api";

Dialogs.Dialog.Info({Message: "hello world"});

usage now looks like this

import { Dialog } from "@wailsapp/api";

Dialog.Info({Message: "hello world"});

Because of the import change, I have marked this as a breaking change however, the documentation in the readme for the js package already described it as working this way even though it did not.

Type of change

Please delete options that are not relevant.

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration using wails doctor.

  • [ ] Windows
  • [x] macOS
  • [ ] Linux

Test Configuration

Please paste the output of wails doctor. If you are unable to run this command, please describe your environment in as much detail as possible.

Checklist:

  • [ ] I have updated website/src/pages/changelog.mdx with details of this PR
  • [x] My code follows the general coding style of this project
  • [x] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [x] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes

jpatters avatar Dec 14 '23 16:12 jpatters

Deploy request for dapper-pastelito-9b5e5b rejected.

Name Link
Latest commit df01313c1506343b4e1ecb6f2104a1f1283a03b8

netlify[bot] avatar Dec 14 '23 16:12 netlify[bot]

[!IMPORTANT]

Auto Review Skipped

Auto reviews are disabled on base/target branches other than the default branch. Please add the base/target branch pattern to the list of additional branches to be reviewed in the settings.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository.

To trigger a single review, invoke the @coderabbitai review command.

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on X ?


Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can reply to a review comment made by CodeRabbit.
  • You can tag CodeRabbit on specific lines of code or files in the PR by tagging @coderabbitai in a comment.
  • You can tag @coderabbitai in a PR comment and ask one-off questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

coderabbitai[bot] avatar Dec 14 '23 16:12 coderabbitai[bot]

Please could you update the changelog located at mkdocs-website/docs/changelog.md? The one in the PR is for v2, Thanks!

leaanthony avatar Dec 15 '23 09:12 leaanthony

Please could you update the changelog located at mkdocs-website/docs/changelog.md? The one in the PR is for v2, Thanks!

Ah. Good to know. Thanks.

jpatters avatar Dec 15 '23 12:12 jpatters

@jpatters - A lot has gone on since this PR was open. Let's discuss on discord 🙏

leaanthony avatar Jan 03 '24 08:01 leaanthony

@jpatters - A lot has gone on since this PR was open. Let's discuss on discord 🙏

Yeah, for sure

jpatters avatar Jan 05 '24 13:01 jpatters