Skip to content

Add config with git resolved package#57

Open
jacobbaungard wants to merge 1 commit into
hermetoproject:yarn/with-git-depsfrom
jacobbaungard:yarn/with-git-deps
Open

Add config with git resolved package#57
jacobbaungard wants to merge 1 commit into
hermetoproject:yarn/with-git-depsfrom
jacobbaungard:yarn/with-git-deps

Conversation

@jacobbaungard
Copy link
Copy Markdown

@jacobbaungard jacobbaungard commented Mar 13, 2026

In order to test new feature to resolve packages from git in permissive mode.

related: hermetoproject/hermeto#1405 / hermetoproject/hermeto#1295

In order to test new feature to resolve packages from git in permissive
mode.

Signed-off-by: Jacob Baungard Hansen <jacobbaungard@redhat.com>
@gemini-code-assist
Copy link
Copy Markdown

Summary of Changes

Hello, 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 introduces a new configuration designed to thoroughly test Yarnberry's package resolution features, particularly focusing on permissive mode for Git-resolved packages. It sets up a diverse set of dependencies using various resolution strategies, including direct Git URLs, local file paths, portals, workspaces, and custom patches. The changes also include a new application entry point and updated documentation to reflect the repository's role as a comprehensive integration test environment for Yarnberry workflows.

Highlights

  • Comprehensive Dependency Configuration: The package.json file has been extensively updated to demonstrate a wide array of Yarnberry's dependency resolution capabilities, including Git-resolved packages, file-based packages, portal packages, workspace packages, and custom patched packages.
  • New Application Entry Point: An app.ts file was introduced as the main application entry point, showcasing the practical usage and interaction of several of the newly configured dependencies.
  • Integration Test Setup: The README.md was completely rewritten to define the repository's new purpose as a Yarnberry regular workflow integration test, detailing supported protocols, pre/post install scripts, and various dependency types.
  • External Package Inclusion: Several external packages, including ansi-regex, once, and supports-hyperlinks, were added directly to the repository, complete with their respective license files, package manifests, and source code.
  • Custom Patching Demonstration: Dedicated patch files for fsevents and left-pad were added, illustrating how Yarnberry's patching mechanism can be used to modify existing dependencies.
  • Workspace Package Definition: Two new workspace packages, old-man-from-scene-24 and the-answer, were defined within the packages/ directory, further expanding the integration test coverage for monorepo setups.

🧠 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
  • README.md
    • Rewrote the entire content to describe the repository as a Yarnberry regular workflow integration test, detailing supported protocols, pre/post install scripts, and dependency types.
  • app.ts
    • Added a new TypeScript application file that imports and uses various dependencies, including yargs, date-in-spanish, old-man-from-scene-24, and holy-hand-grenade.
  • book-of-armaments/index.js
    • Added a new JavaScript module exporting a string, intended to be a dependency named holy-hand-grenade.
  • external-packages/ansi-regex/index.d.ts
    • Added TypeScript declaration file for the ansi-regex package.
  • external-packages/ansi-regex/index.js
    • Added the JavaScript implementation for the ansi-regex package.
  • external-packages/ansi-regex/license
    • Added the MIT license file for ansi-regex.
  • external-packages/ansi-regex/package.json
    • Added the package manifest for ansi-regex.
  • external-packages/once/LICENSE
    • Added the ISC license file for the once package.
  • external-packages/once/README.md
    • Added the README file for the once package.
  • external-packages/once/once.js
    • Added the JavaScript implementation for the once package.
  • external-packages/once/package.json
    • Added the package manifest for the once package.
  • external-packages/supports-hyperlinks/browser.js
    • Added a browser-specific JavaScript file for supports-hyperlinks.
  • external-packages/supports-hyperlinks/index.d.ts
    • Added TypeScript declaration file for supports-hyperlinks.
  • external-packages/supports-hyperlinks/index.js
    • Added the main JavaScript implementation for supports-hyperlinks.
  • external-packages/supports-hyperlinks/license
    • Added the MIT license file for supports-hyperlinks.
  • external-packages/supports-hyperlinks/package.json
    • Added the package manifest for supports-hyperlinks.
  • external-packages/supports-hyperlinks/readme.md
    • Added the README file for supports-hyperlinks.
  • my-patches/fsevents.patch
    • Added a patch file to modify fsevents.js, changing events to constants.
  • my-patches/left-pad-2.patch
    • Added a patch file to modify left-pad's index.d.ts, effectively removing its content.
  • my-patches/left-pad.patch
    • Added a patch file to modify left-pad's index.js, replacing its implementation with a comment.
  • package.json
    • Updated the project manifest to include numerous dependencies resolved via various methods (Git, file, portal, workspace, patch, npm alias) and defined workspaces.
  • packages/old-man-from-scene-24/README.md
    • Added a README file for the old-man-from-scene-24 workspace package.
  • packages/old-man-from-scene-24/index.js
    • Added the JavaScript implementation for the old-man-from-scene-24 workspace package.
  • packages/old-man-from-scene-24/package.json
    • Added the package manifest for the old-man-from-scene-24 workspace package.
  • packages/the-answer/README.md
    • Added a README file for the the-answer workspace package.
  • packages/the-answer/index.js
    • Added the JavaScript implementation for the the-answer workspace package.
  • packages/the-answer/package.json
    • Added the package manifest for the the-answer workspace package.
  • tsconfig.json
    • Added a new TypeScript configuration file for the project.
  • yarn.lock
    • Added a new Yarn lock file, reflecting all new and updated dependencies and their resolutions.
Activity
  • No specific activity (comments, reviews, or progress updates) has been recorded for this pull request yet.
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
Copy Markdown

@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 a new integration test case for Yarnberry, including a complex package.json with various dependency types to test package resolution. The changes include a new README.md for the test case, a sample TypeScript application, and several local and external packages for dependencies. My review focuses on improving documentation clarity, TypeScript code style, and pointing out a potential issue with a large setTimeout value. Overall, the PR effectively sets up a comprehensive test scenario.

Comment thread README.md
Comment on lines +11 to +12
- [ ] ~~Git~~
- [ ] ~~GitHub~~
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The PR's title and description state that this change is for testing git-resolved packages, but this checklist indicates that Git and GitHub protocols are not being tested. This is confusing. Since package.json includes dependencies from git repositories via HTTPS, I suggest updating this to reflect that.

Suggested change
- [ ] ~~Git~~
- [ ] ~~GitHub~~
- [x] Git
- [x] GitHub

Comment thread app.ts
Comment on lines +1 to +5
const yargs = require('yargs/yargs')
const { hideBin } = require('yargs/helpers')
const { format } = require('date-in-spanish') // fecha.format
const { answerMeTheseQuestionsThree } = require('old-man-from-scene-24')
const holyHandGrenade = require('holy-hand-grenade')
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

While using require works here, it's more idiomatic in TypeScript to use ES6-style import statements. This improves readability and allows for better static analysis and type checking, especially since tsconfig.json has esModuleInterop enabled.

Suggested change
const yargs = require('yargs/yargs')
const { hideBin } = require('yargs/helpers')
const { format } = require('date-in-spanish') // fecha.format
const { answerMeTheseQuestionsThree } = require('old-man-from-scene-24')
const holyHandGrenade = require('holy-hand-grenade')
import yargs from 'yargs/yargs';
import { hideBin } from 'yargs/helpers';
import { format } from 'date-in-spanish';
import { answerMeTheseQuestionsThree } from 'old-man-from-scene-24';
import holyHandGrenade from 'holy-hand-grenade';

Comment on lines +1 to +2
let sevenPointFiveMillionYears = 7_500_000 * 31_557_600 * 1000
setTimeout(() => { console.log('42') }, sevenPointFiveMillionYears);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The calculated value for sevenPointFiveMillionYears is extremely large and exceeds the maximum value that can be used for a setTimeout delay (which is a 32-bit signed integer, 2,147,483,647 ms, or about 24.8 days). In Node.js and browsers, providing a value larger than this will cause the timeout to execute on the next tick (almost immediately). If this is intended as a joke, it's fine, but I wanted to point out this behavior in case it was unintentional.

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