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

feat(synapse-constants): adds preinstall step #3269

Merged
merged 3 commits into from
Oct 10, 2024

Conversation

abtestingalpha
Copy link
Collaborator

@abtestingalpha abtestingalpha commented Oct 10, 2024

Description
Adds preinstall step to avoid requiring local installation of @synapsecns/synapse-constants

Summary by CodeRabbit

  • Documentation

    • Updated the README.md for the Bridge project to enhance clarity on using Docusaurus for API documentation, including a new "Serve" section.
    • Revised the Explorer UI README.md to replace the Create React App section with a new "To get started" section.
  • Chores

    • Added a pre-install script in the Synapse Constants package to ensure the build process runs before installation.

6cd79f2: docs preview link
6cd79f2: explorer-ui preview link

Copy link
Contributor

coderabbitai bot commented Oct 10, 2024

Walkthrough

The pull request includes updates to documentation files and a package configuration file. The README.md in the docs/bridge directory has been enhanced with a new "Serve" section and improved code block formatting. The packages/explorer-ui/README.md file has replaced a section on Create React App with new instructions for starting the project. Additionally, the package.json for @synapsecns/synapse-constants now includes a "preinstall" script to check for the rollup command before installation.

Changes

File Path Change Summary
docs/bridge/README.md Added "Serve" section with yarn serve command; updated code block syntax for commands to bash.
packages/explorer-ui/README.md Removed Create React App usage section; added "To get started" section with yarn install and yarn dev. Reformatted TODO items.
packages/synapse-constants/package.json Added `"preinstall": "command -v rollup >/dev/null 2>&1 && rollup -c --buildConfigAsCjs

Possibly related PRs

  • doc release fix #2631: This PR includes a minor change to the docs/bridge/README.md file, which is directly related to the main PR's updates in the same file, specifically regarding command formatting.
  • Docs/lk exploration [SLT-170] #3141: This PR involves changes to documentation in the docs/bridge directory, which may relate to the overall documentation structure and clarity improvements seen in the main PR.
  • Docs/fix #3222: This PR modifies documentation in the docs/bridge directory, enhancing clarity about the Synapse CCTP Router, which aligns with the main PR's focus on improving documentation clarity.
  • Updates readme #3268: This PR updates the README.md for the synapse-constants package, which aligns with the main PR's focus on improving documentation clarity and structure.

Suggested labels

M-deps, size/xs

Suggested reviewers

  • trajan0x
  • bigboydiamonds
  • Defi-Moses

🐇 In the meadow, changes bloom bright,
Documentation shines, a guiding light.
With commands in bash, clear and neat,
New sections added, oh what a treat!
Build before install, a wise little plan,
Hopping forward, let's take a stand! 🌼


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between d89c524 and 77c2848.

📒 Files selected for processing (1)
  • packages/synapse-constants/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/synapse-constants/package.json

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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

cloudflare-workers-and-pages bot commented Oct 10, 2024

Deploying sanguine-fe with  Cloudflare Pages  Cloudflare Pages

Latest commit: 77c2848
Status: ✅  Deploy successful!
Preview URL: https://8833cc13.sanguine-fe.pages.dev
Branch Preview URL: https://synapse-constants-preinstall.sanguine-fe.pages.dev

View logs

Copy link
Contributor

@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 and nitpick comments (5)
packages/explorer-ui/README.md (2)

5-6: Approve formatting change and suggest TODO item revision.

The formatting change for the TODO items improves readability. However, the first TODO item "add readme describing explorer ui" seems redundant as this file is already a README for the Explorer UI.

Consider removing or updating the first TODO item to be more specific about what additional information is needed in the README.


8-18: Suggest adding information about the preinstall step.

The PR objectives mention adding a preinstall step for @synapsecns/synapse-constants, but this isn't reflected in the README. Consider adding a note about this preinstall step if it's relevant to developers working on the Explorer UI.

docs/bridge/README.md (2)

13-13: Great addition of syntax highlighting

The addition of bash syntax highlighting to the code blocks is an excellent improvement for readability.

Consider removing the dollar signs ($) before the commands as suggested by Markdownlint. This can improve copy-paste functionality for users. For example:

yarn

instead of:

$ yarn

Also applies to: 19-19, 27-27


32-39: Excellent addition of the "Serve" section

The new "Serve" section is a valuable addition to the documentation. It clearly explains the purpose of this step and provides the necessary command.

Consider the following minor improvements:

  1. Remove the dollar sign ($) before the command for consistency with the previous suggestion.
  2. Add a brief explanation of what the searchable index is used for, to provide more context to users.

Example:

### Serve

This step is needed to create a searchable index, which enables users to search through the documentation.

```bash
yarn serve

<details>
<summary>🧰 Tools</summary>

<details>
<summary>🪛 Markdownlint</summary><blockquote>

38-38: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

</blockquote></details>

</details>

</blockquote></details>
<details>
<summary>packages/synapse-constants/package.json (1)</summary><blockquote>

`30-30`: **Approve: Preinstall script addition improves package consistency**

The addition of the `"preinstall": "yarn build"` script is a good improvement. It ensures that the package is always built before installation, which aligns with the PR objective of eliminating the need for local installation of `@synapsecns/synapse-constants`.

This change will streamline the installation process for users and ensure consistency across different environments.


Consider adding a comment in the package.json to explain the purpose of the preinstall script, for example:

```diff
 "scripts": {
   ...
+  // Ensures the package is built before installation
   "preinstall": "yarn build",
   "prepublish": "yarn build",
   ...
 },

This will help other developers understand the reasoning behind this script in the future.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between 50c1b9a and d89c524.

📒 Files selected for processing (3)
  • docs/bridge/README.md (1 hunks)
  • packages/explorer-ui/README.md (1 hunks)
  • packages/synapse-constants/package.json (1 hunks)
🧰 Additional context used
🪛 Markdownlint
docs/bridge/README.md

14-14: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


20-20: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


28-28: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


38-38: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

🔇 Additional comments (4)
packages/explorer-ui/README.md (2)

8-18: Approve new "To get started" instructions.

The new instructions are clear, concise, and align with the project's use of yarn as the package manager. This simplification will help new contributors get started more easily.


8-18: Request clarification on project setup change.

The removal of Create React App instructions suggests a possible change in the project setup. Could you please clarify if there have been any significant changes to the project structure or build process that should be documented here?

docs/bridge/README.md (2)

8-8: LGTM: Improved readability

The addition of a blank line after the TODO comment enhances the document's readability by providing better visual separation.


Line range hint 1-39: Overall excellent improvements to the documentation

The changes made to this README file significantly enhance its clarity, structure, and completeness. The improved formatting, addition of syntax highlighting, and the new "Serve" section all contribute to making the documentation more user-friendly and informative.

These improvements align well with the PR objectives of enhancing the documentation. Great job on making the installation and usage process clearer for users of the Docusaurus-based website.

🧰 Tools
🪛 Markdownlint

14-14: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


20-20: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


28-28: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)


38-38: null
Dollar signs used before commands without showing output

(MD014, commands-show-output)

Copy link
Contributor

@trajan0x trajan0x left a comment

Choose a reason for hiding this comment

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

works on my machine

Copy link

codecov bot commented Oct 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 31.76937%. Comparing base (174911d) to head (77c2848).
Report is 1 commits behind head on master.

Additional details and impacted files
@@              Coverage Diff              @@
##              master       #3269   +/-   ##
=============================================
  Coverage   31.76937%   31.76937%           
=============================================
  Files            427         427           
  Lines          28496       28496           
  Branches          82          82           
=============================================
  Hits            9053        9053           
  Misses         18597       18597           
  Partials         846         846           
Flag Coverage Δ
packages 90.43902% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link

codecov bot commented Oct 10, 2024

Bundle Report

Changes will decrease total bundle size by 3.91MB (-10.97%) ⬇️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
sdk-router-@synapsecns/sdk-router-esm* 255.08kB 426 bytes (0.17%) ⬆️
sdk-router-@synapsecns/sdk-router-cjs* 117.47kB 234 bytes (0.2%) ⬆️
explorer-ui-server-cjs* 708.77kB 157.29kB (-18.16%) ⬇️
explorer-ui-client-array-push* 2.15MB 162.81kB (-7.04%) ⬇️
synapse-interface-client-array-push* 7.38MB 100.08kB (1.38%) ⬆️
synapse-interface-server-cjs* 1.65MB 150.91kB (10.1%) ⬆️
widget-cjs-esm* 271.27kB 2.03kB (-0.74%) ⬇️
docs-bridge-client-array-push 7.28MB 619.59kB (-7.84%) ⬇️
docs-bridge-server-cjs 11.31MB 3.57MB (-23.99%) ⬇️
synapse-constants-esm-cjs* 174.63kB 174.63kB (100%) ⬆️
synapse-constants-cjs-esm* 174.18kB 174.18kB (100%) ⬆️

ℹ️ *Bundle size includes cached data from a previous commit

@abtestingalpha abtestingalpha merged commit acd61de into master Oct 10, 2024
40 checks passed
@abtestingalpha abtestingalpha deleted the synapse-constants/preinstall branch October 10, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants