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

fix: fix #255

Merged
merged 4 commits into from
Aug 16, 2024
Merged

fix: fix #255

merged 4 commits into from
Aug 16, 2024

Conversation

ponderingdemocritus
Copy link
Contributor

@ponderingdemocritus ponderingdemocritus commented Aug 16, 2024

Summary by CodeRabbit

  • Chores

    • Updated the .gitignore file to include the pkg directory, enhancing repository cleanliness by ignoring build artifacts.
    • Improved the build output directory structure by updating paths in the build script to the new dist directory.
    • Standardized paths in the package.json file by removing leading ./ and simplifying the files array to include all files within the dist/pkg directory.
  • New Features

    • Enhanced signature handling in the publish method across various components by transitioning to a more flexible ArraySignatureType. This improvement simplifies the signature processing and may boost performance.

Copy link

coderabbitai bot commented Aug 16, 2024

Walkthrough

The recent updates to the packages/torii-wasm repository enhance project organization and cleanliness. The .gitignore file now excludes the pkg directory from version control, while updates to the build.sh script and package.json streamline output paths and package management. Additionally, changes in multiple setup.ts files refine signature handling, promoting improved efficiency. Overall, these modifications contribute to a more effective and tidy development environment.

Changes

File Change Summary
packages/torii-wasm/.gitignore Added pkg/ to ignore list to prevent tracking of build artifacts.
packages/torii-wasm/build.sh Updated output paths to dist/pkg/ for better organization; added cleanup for .gitignore files.
packages/torii-wasm/package.json Standardized paths by removing leading ./; updated files to include all dist/pkg/**/*.
examples/react/react-app/src/dojo/generated/setup.ts Changed publish method to use ArraySignatureType instead of WeierstrassSignatureType.
examples/react/react-phaser-example/src/dojo/generated/setup.ts Updated publish method to accept ArraySignatureType; modified imports accordingly.
examples/react/react-pwa-app/src/dojo/generated/setup.ts Altered publish to use ArraySignatureType, simplifying signature handling.
examples/react/react-threejs/src/dojo/generated/setup.ts Modified publish method to accept ArraySignatureType, improving clarity in handling signatures.
examples/vue/vue-app/src/dojo/generated/setup.ts Changed publish to accept ArraySignatureType, streamlining the method's implementation.

Poem

In the garden, changes sprout,
Less clutter now, without a doubt!
Paths are neat, like fields of green,
A tidy repo, bright and clean.
Hopping joyfully, I see,
This is how it’s meant to be! 🐰✨


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

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 af61abf and 24af632.

Files selected for processing (2)
  • packages/torii-wasm/.gitignore (1 hunks)
  • packages/torii-wasm/package.json (1 hunks)
Files skipped from review due to trivial changes (2)
  • packages/torii-wasm/.gitignore
  • packages/torii-wasm/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: 1

Outside diff range, codebase verification and nitpick comments (1)
packages/torii-wasm/build.sh (1)

11-11: Directory dist/pkg/web does not exist.

The specified output directory for the web build is missing. This could be due to an issue with the build script or the directory structure. Please verify that the build script correctly creates the necessary directories and that there are no errors in the build process.

Analysis chain

LGTM! Verify the directory structure.

The change to the output directory for the web build seems appropriate for organizing distribution files. Ensure that the dist/pkg/web path is correct and consistent with the project's directory structure.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of the new web build directory.

# Test: Check if the directory exists. Expect: Directory should exist.
if [ -d "dist/pkg/web" ]; then
  echo "Directory dist/pkg/web exists."
else
  echo "Directory dist/pkg/web does not exist."
fi

Length of output: 112

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 24af632 and 3f03062.

Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
Files selected for processing (2)
  • packages/torii-wasm/build.sh (1 hunks)
  • packages/torii-wasm/package.json (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • packages/torii-wasm/package.json
Additional comments not posted (1)
packages/torii-wasm/build.sh (1)

14-14: LGTM! Verify the directory structure.

The change to the output directory for the Node.js build is consistent with organizing distribution files. Ensure that the dist/pkg/node path is correct and consistent with the project's directory structure.

Comment on lines +16 to +18
# Find and delete .gitignore files in the specified directories
find ../dist/pkg/node -name ".gitignore" -type f -delete
find ../dist/pkg/web -name ".gitignore" -type f -delete
Copy link

Choose a reason for hiding this comment

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

LGTM! Consider combining the find commands for efficiency.

The removal of .gitignore files from distribution directories is appropriate. For efficiency, consider combining the find commands.

# Combine the find commands to delete .gitignore files in both directories
find ../dist/pkg/{node,web} -name ".gitignore" -type f -delete

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

Outside diff range, codebase verification and nitpick comments (2)
examples/react/react-pwa-app/src/dojo/generated/setup.ts (1)

13-18: Remove unused import WeierstrassSignatureType.

The WeierstrassSignatureType is imported but not used in the codebase. Consider removing it to clean up the imports.

  • examples/react/react-pwa-app/src/dojo/generated/setup.ts
  • examples/vue/vue-app/src/dojo/generated/setup.ts
  • examples/react/react-phaser-example/src/dojo/generated/setup.ts
  • examples/react/react-threejs/src/dojo/generated/setup.ts
  • examples/react/react-app/src/dojo/generated/setup.ts
Analysis chain

Verify the necessity of WeierstrassSignatureType.

The import of WeierstrassSignatureType remains, but it might no longer be needed if ArraySignatureType is used exclusively. Consider removing it if it's unused.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if `WeierstrassSignatureType` is used in the codebase.

# Test: Search for the usage of `WeierstrassSignatureType`. Expect: No occurrences.
rg --type typescript 'WeierstrassSignatureType'

Length of output: 82


Script:

#!/bin/bash
# Description: Check if `WeierstrassSignatureType` is used in the codebase.

# Test: Search for the usage of `WeierstrassSignatureType`. Expect: No occurrences.
rg --type ts 'WeierstrassSignatureType'

Length of output: 469

examples/react/react-threejs/src/dojo/generated/setup.ts (1)

Remove Unused Import WeierstrassSignatureType

The WeierstrassSignatureType is imported in several files but is not used anywhere in the codebase. Consider removing this unused import to clean up the code.

  • examples/react/react-threejs/src/dojo/generated/setup.ts
  • examples/react/react-phaser-example/src/dojo/generated/setup.ts
  • examples/react/react-pwa-app/src/dojo/generated/setup.ts
  • examples/react/react-app/src/dojo/generated/setup.ts
  • examples/vue/vue-app/src/dojo/generated/setup.ts
Analysis chain

Line range hint 15-20:
Verify the necessity of WeierstrassSignatureType.

The import of WeierstrassSignatureType remains, but it might no longer be needed if ArraySignatureType is used exclusively. Consider removing it if it's unused.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if `WeierstrassSignatureType` is used in the codebase.

# Test: Search for the usage of `WeierstrassSignatureType`. Expect: No occurrences.
rg --type typescript 'WeierstrassSignatureType'

Length of output: 82


Script:

#!/bin/bash
# Description: Check if `WeierstrassSignatureType` is used in the codebase.

# Test: Search for the usage of `WeierstrassSignatureType` across all files.
rg 'WeierstrassSignatureType'

Length of output: 459

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3f03062 and faae45d.

Files ignored due to path filters (1)
  • examples/vue/vue-app/dist/index.html is excluded by !**/dist/**
Files selected for processing (5)
  • examples/react/react-app/src/dojo/generated/setup.ts (2 hunks)
  • examples/react/react-phaser-example/src/dojo/generated/setup.ts (2 hunks)
  • examples/react/react-pwa-app/src/dojo/generated/setup.ts (2 hunks)
  • examples/react/react-threejs/src/dojo/generated/setup.ts (2 hunks)
  • examples/vue/vue-app/src/dojo/generated/setup.ts (2 hunks)
Additional comments not posted (8)
examples/react/react-phaser-example/src/dojo/generated/setup.ts (2)

56-57: LGTM!

The change to use ArraySignatureType in the publish method is a good improvement for handling signatures.


13-17: Verify the usage of ArraySignatureType.

Ensure that the new ArraySignatureType is compatible with other parts of the codebase where publish is used.

examples/vue/vue-app/src/dojo/generated/setup.ts (2)

58-59: LGTM!

The change to use ArraySignatureType in the publish method is a good improvement for handling signatures.


13-17: Verify the usage of ArraySignatureType.

Ensure that the new ArraySignatureType is compatible with other parts of the codebase where publish is used.

examples/react/react-app/src/dojo/generated/setup.ts (2)

69-70: LGTM!

The change to use ArraySignatureType in the publish method is a good improvement for handling signatures.


9-13: Verify the usage of ArraySignatureType.

Ensure that the new ArraySignatureType is compatible with other parts of the codebase where publish is used.

examples/react/react-pwa-app/src/dojo/generated/setup.ts (1)

83-84: LGTM! Verify compatibility with other components.

The change to ArraySignatureType simplifies signature handling. Ensure that this new type is compatible with other components interacting with publishMessage.

examples/react/react-threejs/src/dojo/generated/setup.ts (1)

85-86: LGTM! Verify compatibility with other components.

The change to ArraySignatureType simplifies signature handling. Ensure that this new type is compatible with other components interacting with publishMessage.

@ponderingdemocritus ponderingdemocritus merged commit 51513d6 into main Aug 16, 2024
4 checks passed
@ponderingdemocritus ponderingdemocritus deleted the wasm-build branch August 16, 2024 21:05
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