Skip to content

chore: misc changes for 2.9.0 #1873

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

Merged
merged 1 commit into from
Nov 18, 2024
Merged

chore: misc changes for 2.9.0 #1873

merged 1 commit into from
Nov 18, 2024

Conversation

ymc9
Copy link
Member

@ymc9 ymc9 commented Nov 18, 2024

  • Jetbrains changelog update
  • Removed redundant new line at the end of generated code
  • TRPC test baselines update

- Jetbrains changelog update
- Removed redundant new line at the end of generated code
- TRPC test baselines update
Copy link
Contributor

coderabbitai bot commented Nov 18, 2024

📝 Walkthrough

Walkthrough

The pull request introduces updates to the changelog for the packages/ide/jetbrains, documenting the addition of support for the @@validate attribute in type declarations. It also includes various fixes and enhancements across previous versions, particularly addressing validation errors and improvements to the uuid() function and @@index attribute. Additionally, a modification is made in packages/sdk/src/code-gen.ts to the saveSourceFile function, removing an unnecessary newline character in a template literal.

Changes

File Change Summary
packages/ide/jetbrains/CHANGELOG.md Updated to include support for @@validate attribute in type declarations; various fixes and enhancements documented.
packages/sdk/src/code-gen.ts Modified saveSourceFile function to remove a newline character before the closing backtick in a template literal.

Possibly related PRs


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:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

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

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
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: 1

🧹 Outside diff range and nitpick comments (1)
packages/ide/jetbrains/CHANGELOG.md (1)

5-7: Remove unnecessary empty line after section header

The empty line after "### Added" is inconsistent with the formatting of other sections in the changelog.

 ### Added
-
 -   Support for using `@@validate` attribute inside type declarations.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between fdb6862 and 55b0522.

⛔ Files ignored due to path filters (32)
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v10/server/trpc/routers/generated/client/Post.nuxt.type.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v10/server/trpc/routers/generated/client/User.nuxt.type.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v10/server/trpc/routers/generated/client/nuxt.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v10/server/trpc/routers/generated/client/utils.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v10/server/trpc/routers/generated/helper.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v10/server/trpc/routers/generated/routers/Post.router.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v10/server/trpc/routers/generated/routers/User.router.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v10/server/trpc/routers/generated/routers/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v11/server/trpc/routers/generated/client/Post.nuxt.type.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v11/server/trpc/routers/generated/client/User.nuxt.type.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v11/server/trpc/routers/generated/client/nuxt.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v11/server/trpc/routers/generated/client/utils.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v11/server/trpc/routers/generated/helper.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v11/server/trpc/routers/generated/routers/Post.router.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v11/server/trpc/routers/generated/routers/User.router.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/nuxt-trpc-v11/server/trpc/routers/generated/routers/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/client/Post.next.type.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/client/User.next.type.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/client/next.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/client/utils.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/helper.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/routers/Post.router.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/routers/User.router.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/routers/index.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v11/src/server/api/routers/generated/client/Post.react.type.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v11/src/server/api/routers/generated/client/User.react.type.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v11/src/server/api/routers/generated/client/react.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v11/src/server/api/routers/generated/client/utils.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v11/src/server/api/routers/generated/helper.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v11/src/server/api/routers/generated/routers/Post.router.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v11/src/server/api/routers/generated/routers/User.router.ts is excluded by !**/generated/**, !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v11/src/server/api/routers/generated/routers/index.ts is excluded by !**/generated/**, !**/generated/**
📒 Files selected for processing (2)
  • packages/ide/jetbrains/CHANGELOG.md (1 hunks)
  • packages/sdk/src/code-gen.ts (1 hunks)
🔇 Additional comments (2)
packages/ide/jetbrains/CHANGELOG.md (1)

7-7: LGTM! Clear and concise feature documentation

The changelog entry effectively communicates the new feature addition and follows the established documentation style.

packages/sdk/src/code-gen.ts (1)

33-33: LGTM! Verify generated code formatting

The indentation change aligns with the PR objective to remove redundant newlines. This should result in cleaner generated code output.

Let's verify the generated code formatting:

✅ Verification successful

Formatting change verified - single newline maintained

The code-gen.ts file maintains exactly one newline at the end of the file, which is the standard formatting practice. The change aligns with the PR objective of removing redundant newlines while preserving proper file formatting.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check the formatting of recently generated files to ensure proper indentation

# Find and examine recently modified generated files
find . -type f -name "*.generated.*" -o -name "*.gen.*" -mtime -1 | while read -r file; do
    echo "=== Checking formatting of $file ==="
    # Check for any lines with only whitespace at the end of the file
    tail -n 5 "$file" | awk 'NF==0{print NR": empty line"}' 
    # Show the last few lines to verify no extra newlines
    tail -n 5 "$file"
done

Length of output: 15113


Script:

#!/bin/bash
# Let's search for recently modified files in the repository to find actual generated files
# rather than the node_modules content

# Find files modified in the last day, excluding node_modules
find . -type f -mtime -1 -not -path "*/node_modules/*" -not -path "*/.git/*" | while read -r file; do
    # Check if it looks like a generated file
    if [[ "$file" =~ \.(generated|gen)\. ]] || grep -l "Generated by" "$file" > /dev/null 2>&1; then
        echo "=== Found potentially generated file: $file ==="
        # Show the last few lines to check formatting
        echo "Last few lines:"
        tail -n 5 "$file"
        echo
        # Check if file ends with exactly one newline
        if [ -s "$file" ]; then
            if [ -z "$(tail -c1 "$file")" ]; then
                echo "File ends with a newline"
            else
                echo "File does not end with a newline"
            fi
        fi
        echo "---"
    fi
done

Length of output: 135012


Script:

#!/bin/bash
# Let's check for recently modified files in the repository to find actual generated files
# and examine their content, focusing on the end of files

# Find files modified in the last day, excluding node_modules and .git
find . -type f -mtime -1 -not -path "*/node_modules/*" -not -path "*/.git/*" | while read -r file; do
    # Check if it's a text file
    if file "$file" | grep -q "text"; then
        echo "=== Examining $file ==="
        # Show the last few lines and check for trailing newlines
        echo "Last few lines:"
        tail -n 3 "$file"
        echo
        # Check if file ends with exactly one newline
        if [ -s "$file" ]; then
            if [ -z "$(tail -c1 "$file")" ]; then
                echo "File ends with a newline"
            else
                echo "File does not end with a newline"
            fi
            # Count trailing newlines
            nl_count=$(tail -c2 "$file" | tr -cd '\n' | wc -c)
            echo "Number of trailing newlines: $nl_count"
        fi
        echo "---"
    fi
done

Length of output: 123137


Script:

#!/bin/bash
# Let's try a different approach to check generated files and their formatting
# using cat and wc to examine file content and newlines

# First, let's find any recently generated files
find . -type f -mtime -1 -not -path "*/node_modules/*" -not -path "*/.git/*" -exec sh -c '
    for file do
        if head -n1 "$file" | grep -q "Generated" || echo "$file" | grep -E "\.(generated|gen)\." > /dev/null; then
            echo "=== Examining generated file: $file ==="
            # Count total lines and trailing newlines
            total_lines=$(wc -l < "$file")
            echo "Total lines: $total_lines"
            
            # Check trailing newlines
            if [ -s "$file" ]; then
                trailing_newlines=$(tail -c2 "$file" | tr -cd "\n" | wc -c)
                echo "Trailing newlines: $trailing_newlines"
                
                # Show last few lines
                echo "Last few lines:"
                tail -n 3 "$file"
            fi
            echo "---"
        fi
    done
' sh {} +

# Also check the specific file mentioned in the review
echo "=== Examining code-gen.ts ==="
if [ -f "./packages/sdk/src/code-gen.ts" ]; then
    echo "Last few lines:"
    tail -n 5 "./packages/sdk/src/code-gen.ts"
    echo
    if [ -s "./packages/sdk/src/code-gen.ts" ]; then
        trailing_newlines=$(tail -c2 "./packages/sdk/src/code-gen.ts" | tr -cd "\n" | wc -c)
        echo "Trailing newlines: $trailing_newlines"
    fi
fi

Length of output: 1645

@ymc9 ymc9 merged commit 9b56b1c into dev Nov 18, 2024
13 checks passed
@ymc9 ymc9 deleted the chore/misc-2.9 branch November 18, 2024 18:52
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