Skip to content

Patch 1#189

Merged
Dargon789 merged 241 commits into
mainfrom
patch-1
Mar 14, 2026
Merged

Patch 1#189
Dargon789 merged 241 commits into
mainfrom
patch-1

Conversation

@Dargon789

Copy link
Copy Markdown
Owner

No description provided.

nzhl and others added 30 commits November 18, 2022 01:11
Because GitHub actions approval button is missing
This reverts commit f5f2ca2.
we can revert the yarn changes and do it in a different PR
Also, fish bit was the only one that didn't print a newline to
$CONF_FILE, now they're all the same.
Change $CONF_FILE append strings to check whether $INSTALL_DIR exists
before doing any setup. This way whenever a user syncs their shell
config across machines, the machines without fnm installed won't throw
errors.
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
Dargon789 and others added 19 commits March 2, 2026 05:28
* feat: support to install the latest version

* chore: test & fmt & clippy

* docs: update command docs

* docs: update command docs

* Create warm-rice-appear.md

* Update change set to be a minor release

As this is a new feature

* chore: update workflow to install pnpm

* Remove `feat:` from changeset

Because GitHub actions approval button is missing

* run pnpm like other tasks

* Revert "run pnpm like other tasks"

This reverts commit f5f2ca2.
we can revert the yarn changes and do it in a different PR

* revert the changes in .github/workflows

* feat: add remote version sorting and filtering

* use `UserVersion` for filtering

* add additional lts filter

* refactor: use `Vec::retain` instead of filtering and collecting

* fix docstring for sort option

* change docstring for filter argument

* refactor vec filtering

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>

* refactor to use `sort_by_key` and `reverse`

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>

* add latest flag

* make filter an option as well

* move sort into command as it is presentational

* fix getting latest version

* refactors

* update docs/commands.md

* sort upon installation

* fix clippy

* don't mention rust structs in the cli docs

* test more stuff in archiving

* fnm env --global: considering if this is a good idea

technically i think that i can just mutate the 'default' alias instead. because now that i think about it,
it makes 0 sense to set current to 'default' every time a new shell is opened. so current _is_ default.

* chore(deps): update rust crate embed-resource to v2.5.2

* fix(deps): update rust crate tar to v0.4.44

* fix(deps): update rust crate thiserror to v1.0.69

* chore(deps): update clap-rs

* chore(deps): update rust crate chrono to v0.4.44

* chore(deps): update all dev dependencies

---------

Co-authored-by: Fred <nzhlfred@gmail.com>
Co-authored-by: Gal Schlezinger <gal@spitfire.co.il>
Co-authored-by: Ryan Cao <70191398+ryanccn@users.noreply.github.com>
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…dates (#146)

Bumps the npm_and_yarn group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers) | `7.26.0` | `7.28.6` |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) | `1.1.11` | `1.1.12` |
| [js-yaml](https://github.com/nodeca/js-yaml) | `3.14.1` | `3.14.2` |
| [lodash](https://github.com/lodash/lodash) | `4.17.21` | `4.17.23` |
| [minimatch](https://github.com/isaacs/minimatch) | `3.1.2` | `3.1.5` |



Updates `@babel/helpers` from 7.26.0 to 7.28.6
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.28.6/packages/babel-helpers)

Updates `brace-expansion` from 1.1.11 to 1.1.12
- [Release notes](https://github.com/juliangruber/brace-expansion/releases)
- [Commits](juliangruber/brace-expansion@1.1.11...v1.1.12)

Updates `js-yaml` from 3.14.1 to 3.14.2
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](nodeca/js-yaml@3.14.1...3.14.2)

Updates `lodash` from 4.17.21 to 4.17.23
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

Updates `minimatch` from 3.1.2 to 3.1.5
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](isaacs/minimatch@v3.1.2...v3.1.5)

---
updated-dependencies:
- dependency-name: "@babel/helpers"
  dependency-version: 7.28.6
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: brace-expansion
  dependency-version: 1.1.12
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
  dependency-group: npm_and_yarn
- dependency-name: minimatch
  dependency-version: 3.1.5
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
Signed-off-by: Dargon789 <64915515+Dargon789@users.noreply.github.com>
@vercel

vercel Bot commented Mar 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fnm Ready Ready Preview, Comment Mar 14, 2026 3:48am

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @Dargon789, your pull request is larger than the review limit of 150000 diff characters

@snyk-io

snyk-io Bot commented Mar 14, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@Dargon789

Copy link
Copy Markdown
Owner Author

@Mergifyio update

@mergify

mergify Bot commented Mar 14, 2026

Copy link
Copy Markdown

update

☑️ Nothing to do, the required conditions are not met

Details
  • -conflict [📌 update requirement]
  • #commits-behind > 0 [📌 update requirement]
  • -closed [📌 update requirement]
  • queue-position = -1 [📌 update requirement]

@Dargon789 Dargon789 enabled auto-merge March 14, 2026 03:50
@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 powerful new hooks system for fnm, enabling extensive customization and automation of Node.js version management. Alongside this major feature, it includes a comprehensive refresh of Rust dependencies, significant improvements to the installation script, and the foundational setup for a new project website. The changes also reflect an update in project ownership and enhance the overall development infrastructure.

Highlights

  • New Hooks System: A new Git-style hooks system has been introduced, allowing users to execute custom scripts during pre-install, post-install, and install-failed events for Node.js versions. This enables greater automation and customization of the installation workflow.
  • Dependency Updates: Numerous Rust crate dependencies have been updated to their latest versions, improving stability, performance, and security across the project. Key updates include arbitrary, bzip2, chrono, clap family, duct, flate2, indoc, libc, lzma-rs, nu-ansi-term, os_pipe, ring, rustls, shared_child, syn, tar, thiserror, time, tokio, tracing family, and zip.
  • Installation Script Enhancements: The .ci/install.sh script has been significantly refactored for improved portability, robust temporary directory handling using mktempdir, and more reliable shell environment setup. It now includes better dependency checks and updated eval logic.
  • Project Website Integration: A new site/ directory has been added, setting up a Next.js-based project website. This includes new configuration files, layout components, and a CNAME entry, indicating a new online presence for the project.
  • Repository Ownership Update: The project's repository information has been updated in Cargo.toml and .changeset/config.json to reflect a change in ownership from Schniz to Dargon789.
  • CI Configuration Additions: New CircleCI workflow files have been added for various purposes, including foundry, hardhat, general ci, config, and orb examples, expanding the project's continuous integration capabilities.
  • Rust Toolchain and Node.js Version Updates: The Rust toolchain has been updated from 1.88 to 1.89, and the default Node.js version in .node-version has been updated from 20.14.0 to 20.20.0.
  • Improved Symlink Handling: A new two_phase_symlink function has been introduced in src/fs.rs and integrated into src/commands/env.rs and src/commands/use.rs for more robust and atomic symlink updates, preventing race conditions.
Changelog
  • .changeset/angry-moose-hug.md
    • Updated release-to-cargo.yml to set the base branch to 'master'.
  • .changeset/config.json
    • Changed the GitHub repository reference for changelog generation to Dargon789/fnm.
  • .changeset/fifty-emus-type.md
    • Added remote version sorting and filtering feature.
  • .changeset/funny-falcons-breathe.md
    • Updated release-to-cargo.yml config to base: master.
  • .changeset/lazy-snails-return.md
    • Corrected the Cargo release workflow configuration.
  • .changeset/moody-fans-shake.md
    • Updated non-major Rust dependencies.
  • .changeset/nine-roses-collect.md
    • Added a generic 'Main' changeset entry.
  • .changeset/nine-suits-enjoy.md
    • Added a generic changeset entry with a brief summary.
  • .changeset/olive-waves-punch.md
    • Added a generic 'Dargon789 patch 2' changeset entry.
  • .changeset/perfect-beds-notice.md
    • Updated Rust crate indoc to v2.0.7.
  • .changeset/silly-comics-jump.md
    • Added a generic 'Main' changeset entry.
  • .changeset/sixty-rice-do.md
    • Added a generic 'Patch 1' changeset entry.
  • .changeset/smart-avocados-try.md
    • Added a generic changeset entry for a bug fix or feature.
  • .changeset/smooth-lions-sneeze.md
    • Added a check for fnm installation before shell setup.
  • .changeset/tame-bobcats-mate.md
    • Added support to install the latest version.
  • .changeset/warm-rice-appear.md
    • Added support for fnm install --latest to install the latest Node.js version.
  • .changeset/weak-moose-love.md
    • Updated actions/setup-node action to v4.x.
  • .changeset/wet-donkeys-jump.md
    • Updated dev dependencies.
  • CHANGELOG.md
    • Added entries for version 1.39.0, including a minor change to add the use flag to the install command and patch changes for fnm default behavior and a Rust toolchain bump.
Ignored Files
  • Ignored by pattern: .github/workflows/** (8)
    • .github/workflows/debug.yml
    • .github/workflows/docker.yml
    • .github/workflows/google.yml
    • .github/workflows/label.yml
    • .github/workflows/npm.yml
    • .github/workflows/release-to-cargo.yml
    • .github/workflows/release.yml
    • .github/workflows/rust.yml
Activity
  • This pull request appears to be an initial submission or a significant batch of changes from the author, Dargon789, as indicated by the generic title "Patch 1" and empty description.
  • There are no visible comments or reviews on the 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.

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

Copy link
Copy Markdown

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 introduces a wide range of changes, including dependency updates, CI configuration changes, documentation improvements, and significant refactoring of the Rust source code. Key improvements include making the installation script more portable and robust, adding support for hooks, and refactoring the archive extraction and version parsing logic.

I've found a couple of issues: one is a bug in the ls-remote command logic, and the other is a redundancy in the new CircleCI configuration. My review includes suggestions to fix these. Overall, the changes are positive and improve the project's quality.

Comment thread src/commands/ls_remote.rs
Comment thread src/user_version.rs
Comment thread .circleci/ci.yml
@Dargon789 Dargon789 merged commit a848093 into main Mar 14, 2026
12 of 14 checks passed
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.

e2e Linux tests using static binary artifact fnm env --use-on-cd applying current directory version

7 participants