Skip to content

Conversation

@amondnet
Copy link
Contributor

Summary

Add missing 'utils' directory to package.json exports to make utility functions available to consuming applications.

Changes

  • Added utils to the exports array in packages/layer/package.json

Test plan

  • Verify that utility functions can be imported from @pleaseai/docs/utils in consuming applications
  • Ensure the documentation site builds without errors
  • Check that no existing exports were affected

Add missing 'utils' directory to package.json exports to make utility functions available to consuming applications.
@gemini-code-assist
Copy link

Summary of Changes

Hello @amondnet, 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 addresses a configuration oversight by explicitly adding the utils directory to the exports field within the package.json of the @pleaseai/docs layer. This change ensures that utility functions housed in this directory are properly exposed and importable by other applications that consume this package, thereby enhancing modularity and reusability.

Highlights

  • Exporting utils directory: The utils directory from the @pleaseai/docs layer is now explicitly exported in package.json to make its utility functions accessible to consuming applications.
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.

@amondnet amondnet self-assigned this Dec 22, 2025
@amondnet amondnet merged commit b696032 into main Dec 22, 2025
1 check was pending
@amondnet amondnet deleted the fix/utils-directory-export branch December 22, 2025 04:15
@sonarqubecloud
Copy link

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

This pull request adds the utils directory to the files array in package.json, intending to make utility functions available to consuming applications. While the change correctly includes the directory in the published package for Nuxt's auto-import feature, the utility files themselves (git.ts, meta.ts) use Node.js-specific APIs. Because they are not marked as server-only, they would be auto-imported on the client as well, leading to runtime errors. My review provides a high-severity comment recommending a fix for this issue.

"nuxt.schema.ts",
"server"
"server",
"utils"

Choose a reason for hiding this comment

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

high

By adding the utils directory, you are enabling Nuxt's auto-import feature for the utilities within. However, the files utils/git.ts and utils/meta.ts use Node.js-specific APIs (like process and child_process) that are not available in the browser.

When Nuxt auto-imports utilities, they are available on both client and server unless specified otherwise. This will cause runtime errors if these functions are ever used in client-side code.

To prevent this, you should rename the files to mark them as server-only, following Nuxt's convention:

  • utils/git.tsutils/git.server.ts
  • utils/meta.tsutils/meta.server.ts

This ensures they are only auto-imported and available in a server context.

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