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

Publish to JSR #29

Merged
merged 3 commits into from
May 12, 2024
Merged

Publish to JSR #29

merged 3 commits into from
May 12, 2024

Conversation

lambdalisue
Copy link
Owner

@lambdalisue lambdalisue commented May 12, 2024

Summary by CodeRabbit

  • New Features

    • Added GitHub Actions workflows for Deno environment setup and publishing on tagged releases.
    • Introduced a new package dependency "@lambdalisue/workerio" for enhanced stream handling.
  • Documentation

    • Updated import paths in documentation to reflect new package sources and versions.
  • Refactor

    • Streamlined import statements across multiple test and benchmark files.
    • Removed deprecated benchmark sections and exports related to Reader/Writer APIs.
  • Bug Fixes

    • Corrected function calls in testing scripts to improve consistency and performance.

Copy link

codecov bot commented May 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.54%. Comparing base (8624663) to head (d6b0e61).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #29      +/-   ##
==========================================
- Coverage   82.05%   74.54%   -7.51%     
==========================================
  Files           6        4       -2     
  Lines         117       55      -62     
  Branches       14        5       -9     
==========================================
- Hits           96       41      -55     
+ Misses         21       14       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

coderabbitai bot commented May 12, 2024

Walkthrough

The updates primarily focus on streamlining the Deno environment setup and enhancing module imports for better maintainability. Changes include the introduction of new GitHub Actions workflows, adjustments in import paths from specific URLs to more generic or local ones, and the removal of deprecated or unused exports related to worker streams.

Changes

Files Summary of Changes
.github/workflows/... Introduced new workflows for Deno setup and publish actions.
README.md, mod.ts Updated import paths from specific URLs to generic handles; removed some exports.
deno.jsonc Added new package, updated publish settings, and modified import mappings.
*test.ts, *bench.ts Standardized import paths and removed some benchmarks and exports related to worker streams.

🐇✨
In the code's meadow, under the moon's glow,
Little changes hop, where the streams of data flow.
No more tangled paths, or outdated tools,
Just swift, sleek modules, playing by the rules.
Celebrate the craft, with a cheer, let's go! 🎉
🌟🐾


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
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • 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.

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 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.
  • Please see the configuration documentation 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 for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@lambdalisue lambdalisue merged commit 0c9f40a into main May 12, 2024
5 of 6 checks passed
@lambdalisue lambdalisue deleted the jsr branch May 12, 2024 15:37
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Out of diff range and nitpick comments (1)
README.md (1)

Line range hint 76-76: Consider changing "sent in this repository follow the license" to "sent to this repository follow the license".

- sent in this repository follow the license
+ sent to this repository follow the license
Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 8624663 and d6b0e61.
Files selected for processing (10)
  • .github/workflows/jsr.yml (1 hunks)
  • .github/workflows/test.yml (1 hunks)
  • README.md (3 hunks)
  • deno.jsonc (2 hunks)
  • mod.ts (3 hunks)
  • readable_stream_bench.ts (2 hunks)
  • readable_stream_test.ts (3 hunks)
  • test_bench.ts (2 hunks)
  • writable_stream_bench.ts (2 hunks)
  • writable_stream_test.ts (2 hunks)
Files skipped from review due to trivial changes (5)
  • .github/workflows/jsr.yml
  • mod.ts
  • readable_stream_bench.ts
  • test_bench.ts
  • writable_stream_bench.ts
Additional Context Used
LanguageTool (3)
README.md (3)

Near line 7: Unpaired symbol: ‘[’ seems to be missing
Context: ....io/gh/lambdalisue/deno-workerio) [Deno][deno] module to translate Worker's syst...


Near line 75: You might be missing the article “the” here.
Context: ...(e)); ``` ## License The code follows MIT license written in LICENSE...


Near line 76: The preposition “to” seems more likely in this position.
Context: ...ed to agree that any modifications sent in this repository follow the license.

Additional comments not posted (7)
writable_stream_test.ts (2)

1-1: Updated imports to generic paths align with project refactoring goals.


20-20: Ensure the concat function correctly handles the array of chunks.

deno.jsonc (1)

Line range hint 2-33: Updated project configuration enhances modularity and maintainability.

readable_stream_test.ts (2)

1-1: Updated imports to generic paths align with project refactoring goals.


18-18: Ensure the concat function correctly handles the array of chunks.

Verification successful

The extracted code snippets from both readable_stream_test.ts and writable_stream_test.ts show the usage of the concat function. In each instance, concat is called with a single argument chunks, which is an array. This array is populated in a loop where chunks (presumably of type Uint8Array) are pushed into it. After the loop, concat is used to combine these chunks into a single Uint8Array, which is then compared to an expected value using assertEquals.

This usage pattern indicates that the concat function is indeed designed to handle an array of chunks, specifically arrays of Uint8Array objects, and combines them into a single Uint8Array. The function is used correctly in the context of the tests provided in both files, as it successfully concatenates arrays of binary data chunks.

Given this analysis, the original review comment questioning the correct handling of the array of chunks by the concat function is addressed, and the function's usage is verified to be correct.

The `concat` function is used correctly in both `readable_stream_test.ts` and `writable_stream_test.ts` to handle arrays of `Uint8Array` chunks. The function effectively combines these chunks into a single `Uint8Array`, as demonstrated in the test assertions following each usage.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify the correct usage of `concat` function with array input.

# Test: Search for the function usage. Expect: Correct handling of array input.
rg --type typescript $'concat'

Length of output: 64



Script:

#!/bin/bash
# Description: Verify the correct usage of `concat` function with array input.

# Correcting the file type for TypeScript and searching for the usage of `concat`.
rg --type ts 'concat\(' --files-with-matches

Length of output: 94



Script:

#!/bin/bash
# Description: Extract and display the usage of `concat` function in identified files.

# Extracting lines of code around the usage of `concat` in the identified files.
rg --type ts 'concat\(' -C 3 --files writable_stream_test.ts readable_stream_test.ts

Length of output: 183



Script:

#!/bin/bash
# Description: Correctly extract and display the usage of `concat` function in identified files.

# Correcting the command to properly extract lines of code around the usage of `concat`.
rg --type ts 'concat\(' -C 3 writable_stream_test.ts readable_stream_test.ts

Length of output: 1214

.github/workflows/test.yml (1)

67-76: Added jsr-publish job to automate the publishing process.

README.md (1)

23-23: Updated import paths in examples align with project refactoring goals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant