Skip to content

Conversation

@jpoehnelt
Copy link
Owner

@jpoehnelt jpoehnelt commented Mar 28, 2025

  • chore: skip pnpm files with prettier
  • build: install clasp at workspace

Summary by CodeRabbit

  • New Features

    • Introduced a new command to integrate Google Apps Script project management, providing enhanced scripting workflow support.
  • Chores

    • Improved code checking to gracefully handle cases when no matching files are found, ensuring a smoother development experience.
    • Updated formatting rules to exclude pnpm-related files, streamlining the formatting process.
    • Updated dependency management strategy to allow for more flexible version resolution across several packages.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Mar 28, 2025

Deploying apps-script with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2def81a
Status: ✅  Deploy successful!
Preview URL: https://0058379d.apps-script.pages.dev
Branch Preview URL: https://build-clasp.apps-script.pages.dev

View logs

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Hello @jpoehnelt, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request focuses on improving the build process and linting configurations. It skips pnpm files during the prettier formatting step, installs clasp as a workspace dependency, and adds a flag to the biome check command to ignore errors on unmatched files. The changes aim to streamline the development workflow and ensure consistent code formatting and linting.

Highlights

  • Linting: The pull request updates the linting configuration to skip pnpm files during prettier formatting and adds the --no-errors-on-unmatched flag to the biome check command.
  • Dependencies: The pull request installs @google/clasp as a workspace dependency and adds a corresponding script to the package.json file.
  • Formatting: The pull request modifies the .prettierignore file to exclude pnpm-related files from prettier formatting.

Changelog

  • .lintstagedrc.commit.js
    • Added the --no-errors-on-unmatched flag to the biome check command to prevent errors when files don't match the specified patterns (lines 3-4).
  • .prettierignore
    • Added **/pnpm-* to the ignore list to prevent prettier from formatting pnpm-related files (line 5).
  • package.json
    • Added @google/clasp as a dev dependency (line 24).
    • Added a clasp script that executes the @google/clasp command (line 19).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


Trivia time!

What does the acronym 'CLI' stand for in the context of software development tools like clasp?

Click here for the answer
'CLI' stands for Command Line Interface.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 28, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This pull request updates configuration files and package settings. The .lintstagedrc.commit.js file now uses an additional flag (--no-errors-on-unmatched) for the biome check command. The .prettierignore file is expanded to ignore pnpm-* files. Additionally, new npm scripts and development dependencies have been added, including a shift to a catalog-based approach for managing @google/clasp, typescript, and other related packages.

Changes

File(s) Change Summary
.lintstagedrc.commit.js Updated the biome check command for JS/TS/JSON files by adding the --no-errors-on-unmatched flag to better handle unmatched files.
.prettierignore Added the **/pnpm-* pattern to ignore files and directories related to pnpm.
package.json, packages/mjml-apps-script/package.json, projects/apps-script-agent/package.json, projects/apps-script-ai-testing/package.json, projects/using-mjml/package.json, projects/vector-embeddings/package.json Updated dependency versions for @google/clasp, @types/google-apps-script, and esbuild to "catalog:", indicating a shift to catalog-based dependency management. New script "clasp": "@google/clasp" added in package.json.

Possibly related PRs

  • build: add husky #4: The changes in the main PR, specifically the update to the "prepare" script in package.json, are directly related to the addition of the "husky" script in the retrieved PR, indicating a connection in how Git hooks are managed.
  • build: catalog, checks, and global clasp #6: The changes in the main PR and the retrieved PR are related as both modify the package.json file to include the @google/clasp dependency, although the main PR specifies it as a script while the retrieved PR adds it as a devDependency.
  • feat: vector embedding demo #2: The changes in the main PR, specifically the updates to the package.json file regarding the @google/clasp dependency, are related to the modifications in the retrieved PR, which also involve changes to the @google/clasp dependency version specification. Both PRs reflect a shift towards a catalog-based approach for dependency management.

Poem

Hopping through the lines of code so neat,
I add a flag to keep errors discreet.
Ignoring pnpm trails in my gentle stride,
With clasp commands, I relish the ride.
A bunny's joy in each merge I meet,
Leaping through commits with a rhythmic beat!


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8ec2ced and 2def81a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (7)
  • package.json (2 hunks)
  • packages/mjml-apps-script/package.json (1 hunks)
  • pnpm-workspace.yaml (1 hunks)
  • projects/apps-script-agent/package.json (1 hunks)
  • projects/apps-script-ai-testing/package.json (2 hunks)
  • projects/using-mjml/package.json (1 hunks)
  • projects/vector-embeddings/package.json (1 hunks)

🪧 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request introduces changes to improve the development workflow by skipping pnpm files with prettier and installing clasp at the workspace. The changes are well-structured and address the intended goals.

Summary of Findings

  • Biome check flag: The addition of --no-errors-on-unmatched to the biome check command is a good practice to avoid errors when files don't match the specified patterns.
  • Prettier ignore: Adding **/pnpm-* to the .prettierignore file prevents formatting of pnpm specific files, which is a good practice.
  • Clasp installation: Installing clasp as a dev dependency and adding it as a script in package.json allows for easy execution of clasp commands.

Merge Readiness

The pull request is ready to be merged. The changes are well-structured and address the intended goals. I am unable to directly approve the pull request, and recommend that others review and approve this code before merging.

@jpoehnelt jpoehnelt changed the title build/clasp chore: install clasp at workspace Mar 28, 2025
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

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 56f3b8f and 8ec2ced.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • .lintstagedrc.commit.js (1 hunks)
  • .prettierignore (1 hunks)
  • package.json (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Cloudflare Pages
🔇 Additional comments (3)
.prettierignore (1)

5-5: LGTM! Appropriate exclusion for pnpm files.

This addition correctly implements the PR objective to skip pnpm-related files from Prettier formatting. These files are generated by pnpm and don't need formatting, so excluding them is a good practice.

package.json (1)

18-19: LGTM! Script for clasp access.

Adding this script entry allows running pnpm clasp to directly access the clasp CLI tool, which aligns with the PR objective to install clasp in the workspace.

.lintstagedrc.commit.js (1)

3-5: LGTM! Improved error handling for biome.

Adding the --no-errors-on-unmatched flag prevents Biome from raising errors when patterns don't match any files, which enhances the developer experience during commits by avoiding false positives.

@jpoehnelt jpoehnelt changed the title chore: install clasp at workspace build: catalog, checks, and global clasp Mar 28, 2025
@jpoehnelt jpoehnelt merged commit 20ef5ba into main Mar 28, 2025
4 of 5 checks passed
@jpoehnelt jpoehnelt deleted the build/clasp branch March 28, 2025 17:58
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.

2 participants