vim-denops / denops.vim

🐜 An ecosystem of Vim/Neovim which allows developers to write cross-platform plugins in Deno
https://vim-denops.github.io/denops-documentation/
MIT License
666 stars 33 forks source link

:tada: Denops v7 #344

Closed lambdalisue closed 1 month ago

lambdalisue commented 3 months ago

Ref

Summary by CodeRabbit

Summary by CodeRabbit

coderabbitai[bot] commented 3 months ago

Walkthrough

The recent updates to the Denops project enhance functionality and improve version compatibility. Key changes include new features for plugin management, error handling, and asynchronous operations. GitHub workflows have been refined, and documentation has been updated accordingly. These improvements aim to provide a robust development environment for Vim and Neovim plugins, ensuring better stability and an improved user experience.

Changes

Files/Directories Change Summary
.github/workflows/test.yml, .github/workflows/update.yml Updated workflow configurations, including job dependencies, version updates, and command adjustments.
README.md Updated version badges for Deno, Vim, and Neovim; removed Deno Land badge.
autoload/denops.vim Added denops#interrupt(...) function for managing asynchronous interruptions.
autoload/denops/_internal/job.vim, autoload/denops/_internal/plugin.vim Improved error handling and introduced new functions for plugin management.
denops/@denops-private/service.ts, denops/@denops-private/version.ts Updated Service class with lifecycle management and error handling; modified version imports.
tests/denops/testutil/... Added mock utilities and configurations for testing, improving the robustness of the test suite.
tests/denops/testutil/shared_server.ts, tests/denops/testutil/shared_server_test.ts Introduced functionality for managing a shared server in tests and associated test cases.
denops/@denops-private/service_test.ts Enhanced test suite for the Service class, improving coverage and error handling.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Plugin
    participant Denops
    participant Host

    User ->> Plugin: Load new plugin
    Plugin ->> Denops: Register plugin
    Denops ->> Host: Initialize plugin environment
    Host ->> Denops: Confirmation
    Denops ->> Plugin: Initialization complete

    User ->> Plugin: Execute command
    Plugin ->> Denops: Process command
    Denops ->> Host: Execute command
    Host -->> Denops: Return result
    Denops ->> Plugin: Provide result
    Plugin ->> User: Display result

    User ->> Plugin: Unload plugin
    Plugin ->> Denops: Unregister plugin
    Denops ->> Host: Cleanup plugin environment
    Host ->> Denops: Confirmation
    Denops ->> Plugin: Unload complete

Poem

Amidst the code, a change took place,
With vim and vigor, we embrace,
New versions rise, old bugs subside,
Denops now, a smoother ride.
Functions added, features grow,
Interruptions handled, let’s go!
Celebrate the update cheer,
A brighter path, now crystal clear.


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 your favorite social media?

Share - [X](https://twitter.com/intent/tweet?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A&url=https%3A//coderabbit.ai) - [Mastodon](https://mastodon.social/share?text=I%20just%20used%20%40coderabbitai%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20the%20proprietary%20code.%20Check%20it%20out%3A%20https%3A%2F%2Fcoderabbit.ai) - [Reddit](https://www.reddit.com/submit?title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&text=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code.%20Check%20it%20out%3A%20https%3A//coderabbit.ai) - [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fcoderabbit.ai&mini=true&title=Great%20tool%20for%20code%20review%20-%20CodeRabbit&summary=I%20just%20used%20CodeRabbit%20for%20my%20code%20review%2C%20and%20it%27s%20fantastic%21%20It%27s%20free%20for%20OSS%20and%20offers%20a%20free%20trial%20for%20proprietary%20code)
Tips ### Chat There are 3 ways to chat with [CodeRabbit](https://coderabbit.ai): - Review comments: Directly reply to a review comment made by CodeRabbit. Example: - `I pushed a fix in commit .` - `Generate unit testing code for this file.` - `Open a follow-up GitHub issue for this discussion.` - Files and specific lines of code (under the "Files changed" tab): Tag `@coderabbitai` in a new review comment at the desired location with your query. Examples: - `@coderabbitai generate unit testing code for this file.` - `@coderabbitai modularize this function.` - PR comments: Tag `@coderabbitai` in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples: - `@coderabbitai generate interesting stats about this repository and render them as a table.` - `@coderabbitai show all the console.log statements in this repository.` - `@coderabbitai read src/utils.ts and generate unit testing code.` - `@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.` - `@coderabbitai help me debug CodeRabbit configuration file.` Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. ### 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 an incremental review. This is useful when automatic reviews are disabled for the repository. - `@coderabbitai full review` to do a full review from scratch and review all the files again. - `@coderabbitai summary` to regenerate the summary of the PR. - `@coderabbitai resolve` resolve all the CodeRabbit review comments. - `@coderabbitai configuration` to show the current CodeRabbit configuration for the repository. - `@coderabbitai help` to get help. Additionally, you can add `@coderabbitai ignore` anywhere in the PR description to prevent this PR from being reviewed. ### CodeRabbit Configuration File (`.coderabbit.yaml`) - You can programmatically configure CodeRabbit by adding a `.coderabbit.yaml` file to the root of your repository. - Please see the [configuration documentation](https://docs.coderabbit.ai/guides/configure-coderabbit) for more information. - 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/schema.v2.json` ### Documentation and Community - Visit our [Documentation](https://coderabbit.ai/docs) for detailed information on how to use CodeRabbit. - Join our [Discord Community](https://discord.com/invite/GsXnASn26c) to get help, request features, and share feedback. - Follow us on [X/Twitter](https://twitter.com/coderabbitai) for updates and announcements.
codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 96.32768% with 26 lines in your changes missing coverage. Please review.

Project coverage is 95.44%. Comparing base (09e6495) to head (6eb990e).

Files Patch % Lines
tests/denops/testutil/host.ts 86.00% 7 Missing :warning:
tests/denops/testutil/with.ts 94.30% 7 Missing :warning:
tests/denops/testutil/shared_server.ts 94.04% 5 Missing :warning:
denops/@denops-private/worker.ts 93.87% 2 Missing and 1 partial :warning:
denops/@denops-private/cli.ts 96.15% 2 Missing :warning:
tests/denops/testutil/conf.ts 83.33% 0 Missing and 1 partial :warning:
tests/denops/testutil/wait.ts 97.91% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #344 +/- ## ========================================== + Coverage 90.20% 95.44% +5.23% ========================================== Files 9 23 +14 Lines 684 1361 +677 Branches 67 174 +107 ========================================== + Hits 617 1299 +682 + Misses 67 59 -8 - Partials 0 3 +3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

lambdalisue commented 2 months ago

https://github.com/denoland/deno/issues/23792 https://uki00a.github.io/deno-weekly/articles/2024/06/16.html#node-api

Node API is fixed so we can remove https://github.com/vim-denops/denops.vim/pull/344/commits/fc956a92d3c558dbf926d736133da013c9beec4e if we use Deno 1.44.2 or later

P.S.

I removed the workaround commit and rebased.

lambdalisue commented 1 month ago

https://github.com/denoland/deno/releases/tag/v1.45.0