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

Update react-sdk version #216

Merged
merged 30 commits into from
Jul 9, 2024
Merged

Update react-sdk version #216

merged 30 commits into from
Jul 9, 2024

Conversation

bonnie57
Copy link
Collaborator

@bonnie57 bonnie57 commented Jul 2, 2024

Description

  • Upgrade to @story-protocol/[email protected]
  • Bump up to react-sdk@ 0.0.1
  • Update publish-package.yaml to publish react-sdk
  • Update style when run npm run generate command

Summary by CodeRabbit

  • Chores
    • Updated workflows to handle core and react SDK versions separately during publishing, release creation, and notification steps for better clarity and management.

AndyBoWu and others added 21 commits April 25, 2024 12:29
* [test] create release

* [test] create release - 2
Update publish CI + Bump version (#168)
* Create test-slack-notifs.yml

* Update test-slack-notifs.yml
* Update test-slack-notifs.yml

* Update test-slack-notifs.yml
* Update publish-package.yaml

* Update publish-package.yaml

* Update publish-package.yaml

* reusable slack workflow implemented
Copy link

coderabbitai bot commented Jul 2, 2024

Walkthrough

The recent changes focus on enhancing GitHub Actions workflows for distinct handling and publishing of core and react SDKs. New features include differentiated version outputs, updated workflows for dependency and release management, increased test timeouts, progress tracking, and specific test case modifications. These updates streamline the publishing process and improve development efficiency across multiple SDK packages.

Changes

Files/Paths Change Summary
.github/workflows/publish-react-sdk-package.yaml Added workflow for publishing, tagging, and releasing react-sdk on npm.
packages/react-sdk/package.json Updated version to "0.0.1" and dependency @story-protocol/core-sdk to "1.0.0-rc.15", added test flag.
.github/workflows/publish-package.yaml Renamed version outputs, added steps for individual SDK handling and notifications.
packages/react-sdk/jest.config.js Increased test timeout from 1 minute to 1 hour.
packages/react-sdk/generator/index.js Added progress bar and command execution post template generation.
packages/.../test/integration/{ipAsset, license, useIpAsset}.test.ts Skipped specific test cases to alter execution flow.
packages/wagmi-generator/package.json Added @types/node as a devDependency, moved wagmi to regular dependencies.

Sequence Diagram(s)

sequenceDiagram
    actor Developer
    participant GitHubActions
    participant NPM

    Developer ->> GitHubActions: Push new changes to main
    GitHubActions ->> GitHubActions: Run publish-react-sdk-package.yaml
    GitHubActions ->> GitHubActions: Determine version to be published
    GitHubActions ->> NPM: Fetch latest version from NPM
    GitHubActions ->> GitHubActions: Compare latest and to-be-published versions
    alt Versions differ
        GitHubActions ->> GitHubActions: Build, Test, and Publish
        GitHubActions ->> GitHubActions: Create new release
        GitHubActions ->> Slack: Send notification
    else Versions same
        GitHubActions ->> Developer: Fail workflow with error
    end
Loading

Poem

In the code's vast sea, changes flow,
GitHub Actions start to grow. 🚀
Versions check and tests align,
SDKs now publish, clean, and fine.
Progress bars and skips in tow,
A streamlined way to help you glow.
Code evolves, in rhythmic beat,
Each commit, a step, toward dev elite! 🐇✨


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.
    • @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 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.

@bonnie57 bonnie57 changed the title Bonnie dev Update react-sdk version Jul 2, 2024
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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between dce8bbe and 32a0f3c.

Files selected for processing (1)
  • .github/workflows/publish-package.yaml (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/publish-package.yaml

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 32a0f3c and 4a8a261.

Files selected for processing (1)
  • .github/workflows/publish-package.yaml (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/publish-package.yaml

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4a8a261 and baf2645.

Files selected for processing (3)
  • .github/workflows/publish-package.yaml (3 hunks)
  • packages/react-sdk/jest.config.js (1 hunks)
  • packages/react-sdk/package.json (1 hunks)
Files skipped from review as they are similar to previous changes (3)
  • .github/workflows/publish-package.yaml
  • packages/react-sdk/jest.config.js
  • packages/react-sdk/package.json

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between baf2645 and 31a3fb9.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (2)
  • package.json (1 hunks)
  • packages/react-sdk/package.json (2 hunks)
Files skipped from review due to trivial changes (1)
  • package.json
Files skipped from review as they are similar to previous changes (1)
  • packages/react-sdk/package.json

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 31a3fb9 and 6c4520d.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (2)
  • packages/react-sdk/generator/index.js (3 hunks)
  • packages/react-sdk/package.json (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/react-sdk/package.json
Additional comments not posted (4)
packages/react-sdk/generator/index.js (4)

5-6: LGTM! Imports are correct and necessary.

The cli-progress and exec modules are correctly imported for the new functionality.


12-13: LGTM! Progress bar initialization is correct.

The progress bar instance is correctly initialized with appropriate presets.


77-80: LGTM! Progress bar usage within the loop is correct.

The progress bar is correctly initialized, started, and updated within the loop.


131-146: LGTM! Command execution and error handling are correct.

The exec function is correctly used to run the npm run fix command, and the error handling logic is appropriate. The progress bar is updated and stopped correctly.

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6c4520d and afb483b.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (4)
  • packages/core-sdk/test/integration/ipAsset.test.ts (3 hunks)
  • packages/core-sdk/test/integration/license.test.ts (1 hunks)
  • packages/react-sdk/test/integration/useIpAsset.test.ts (3 hunks)
  • packages/wagmi-generator/package.json (1 hunks)
Files skipped from review due to trivial changes (3)
  • packages/core-sdk/test/integration/ipAsset.test.ts
  • packages/core-sdk/test/integration/license.test.ts
  • packages/react-sdk/test/integration/useIpAsset.test.ts
Additional comments not posted (2)
packages/wagmi-generator/package.json (2)

8-8: Addition of @types/node to devDependencies is appropriate.

This addition provides type definitions for Node.js, which is beneficial for TypeScript projects.


16-16: Verify the necessity of moving wagmi to dependencies.

Ensure that wagmi is required at runtime and not just during development. If it is only needed for development purposes, it should remain in devDependencies.

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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between afb483b and 231efb2.

Files selected for processing (1)
  • .github/workflows/publish-package.yaml (4 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/publish-package.yaml

@edisonz0718 edisonz0718 changed the base branch from main to dev July 9, 2024 16:28
# version_to_publish: ${{ needs.print_version_to_publish.outputs.react_sdk_version_to_be_published }}

send_slack_notif-react-sdk:
needs: [build-test-publish, print_version_to_publish]
Copy link
Contributor

Choose a reason for hiding this comment

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

Why doesn't this need to check create-release-react-sdk step

@edisonz0718 edisonz0718 merged commit 8876873 into dev Jul 9, 2024
11 checks passed
edisonz0718 added a commit that referenced this pull request Jul 9, 2024
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.

4 participants