Skip to content

Standardize authoritative task graph for clean, lint, test, and format#2434

Open
rfontanarosa wants to merge 4 commits intomasterfrom
rfontanarosa/2341/code-health-replace-all-npm-scripts-with-nx-targets-1
Open

Standardize authoritative task graph for clean, lint, test, and format#2434
rfontanarosa wants to merge 4 commits intomasterfrom
rfontanarosa/2341/code-health-replace-all-npm-scripts-with-nx-targets-1

Conversation

@rfontanarosa
Copy link
Collaborator

towards #2341

@rfontanarosa rfontanarosa requested a review from gino-m February 18, 2026 12:12
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @rfontanarosa, 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!

This pull request aims to standardize the definition and execution of common development tasks—specifically 'clean', 'lint', 'test', and 'format'—by migrating them from traditional 'npm scripts' to Nx targets. This change centralizes task configurations within the Nx monorepo setup, improving consistency, cacheability, and overall task management across different projects like 'functions', 'lib', 'proto', and 'web'.

Highlights

  • Nx Target Migration: Migrated 'clean', 'lint', and 'test' scripts from 'npm scripts' to 'nx.targets' within individual 'package.json' files for 'functions', 'lib', 'proto', and 'web' projects.
  • Standardized Format Commands: Standardized 'format:check' commands in project-level 'package.json' files to use the '{projectRoot}' variable for consistent execution paths.
  • Centralized Nx Configuration: Introduced or updated 'clean', 'test', 'lint', and 'format:projects' targets in 'nx.json' to define their caching behavior and 'cwd' options, centralizing their configuration.
  • Root Task Refactoring: Refactored the root 'package.json' 'clean' command to use a streamlined output style and updated the 'format:projects' target to leverage 'nx:noop' with 'dependsOn' for improved Nx integration.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • functions/package.json
    • Moved 'clean', 'lint', and 'test' scripts into the 'nx.targets' section.
    • Updated the 'format:check' command to use '{projectRoot}'.
  • lib/package.json
    • Moved 'clean', 'lint', and 'test' scripts into the 'nx.targets' section.
    • Updated the 'format:check' command to use '{projectRoot}'.
  • nx.json
    • Added a 'clean' target with 'cache: false' and 'cwd: {projectRoot}'.
    • Updated 'test' and 'lint' targets to include 'cwd: {projectRoot}'.
    • Added a 'format:projects' target with 'cwd: {projectRoot}'.
  • package.json
    • Modified the root 'clean' target command to include '--output-style=stream-without-prefixes'.
    • Refactored the 'format:projects' target to use 'nx:noop' and depend on 'format:check' for all projects.
  • proto/package.json
    • Moved 'clean' and 'lint' scripts into the 'nx.targets' section.
  • web/package.json
    • Moved 'clean', 'lint', and 'test' scripts into the 'nx.targets' section.
    • Updated the 'format:check' command to use '{projectRoot}' and adjusted its file patterns.
Activity
  • No specific activity (comments, reviews, progress) was provided in the context for this pull request.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

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.

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.

Copy link
Contributor

@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

This pull request effectively standardizes the clean, lint, test, and format tasks across the monorepo by moving them into Nx targets. This is a great improvement for consistency and maintainability. I've found a couple of areas for improvement: a misconfigured target default in nx.json and a potentially incomplete file pattern in a format:check command. Please see the detailed comments.

@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.13%. Comparing base (1c0ebd3) to head (02286ff).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2434   +/-   ##
=======================================
  Coverage   59.13%   59.13%           
=======================================
  Files         111      111           
  Lines        2748     2748           
  Branches      408      408           
=======================================
  Hits         1625     1625           
  Misses       1065     1065           
  Partials       58       58           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rfontanarosa rfontanarosa self-assigned this Feb 18, 2026
Copy link
Collaborator

@gino-m gino-m left a comment

Choose a reason for hiding this comment

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

🆒 !

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.

3 participants