Add --skip-install option to fedify init#776
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds a ChangesSkip-Install Flag Feature
Sequence DiagramsequenceDiagram
participant CLI
participant runInit
participant handleHydRun
participant Installer
participant noticeSkippedInstall
CLI->>runInit: parse options (skipInstall, dryRun, packageManager)
runInit->>handleHydRun: start hydration (passes InitCommandData)
alt skipInstall is false
handleHydRun->>Installer: installDependencies({ packageManager })
else skipInstall is true
handleHydRun->>noticeSkippedInstall: noticeSkippedInstall({ packageManager })
end
runInit->>CLI: exit
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@CHANGES.md`:
- Around line 270-274: The CHANGES.md entry for the `--skip-install` option to
`fedify init` currently only includes the issue link `[[`#720`]]`; update this
changelog line to also include the PR number (e.g. `[[PR#<number>]]`) and the
author attribution (your name) in the same format used elsewhere in CHANGES.md
so it reads: description, then issue link, PR link, and author name; edit the
existing `--skip-install` entry text to append the PR reference and author
attribution to match the repository’s changelog convention.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 73163226-a947-4e5d-ae20-f63ef9e6f85e
📒 Files selected for processing (11)
CHANGES.mddocs/cli.mdpackages/init/src/action/configs.test.tspackages/init/src/action/mod.tspackages/init/src/action/notice.tspackages/init/src/action/patch.test.tspackages/init/src/action/utils.tspackages/init/src/command.tspackages/init/src/package.test.tspackages/init/src/skip-install.test.tspackages/init/src/webframeworks.test.ts
There was a problem hiding this comment.
Code Review
This pull request introduces a --skip-install option to the fedify init command, allowing users to skip the automatic dependency installation step. This is useful for CI environments, monorepos, or manual inspection. The changes include updates to the CLI documentation, the addition of the flag in the command configuration, logic to conditionally skip installation in the initialization pipeline, and a new notice to inform users how to install dependencies manually. Feedback suggests reordering the final notices so that the instruction to install dependencies appears before the instructions on how to run the project, ensuring a more logical flow for the user.
| tap(noticeHowToRun), | ||
| tap(unless(isDry, when(isSkipInstall, noticeSkippedInstall))), |
There was a problem hiding this comment.
The notice about skipped dependency installation should ideally appear before the "how to run" instructions. This provides a better user experience by informing the user that they need to perform an installation step before they attempt to run the project using the commands shown in the next step.
| tap(noticeHowToRun), | |
| tap(unless(isDry, when(isSkipInstall, noticeSkippedInstall))), | |
| tap(unless(isDry, when(isSkipInstall, noticeSkippedInstall))), | |
| tap(noticeHowToRun), |
|
cc @2chanhaeng |
|
Hi there! Thank you so much for your interest in contributing to our package. When initializing an app with the |
Closes #720.
fedify initalways ran the package manager's install command afterscaffolding, with no way to skip it. This is disruptive in CI
pipelines that install from a fixed lockfile in a separate step, in
monorepo workspaces that install from the root, and when developers
want to inspect the generated files before installing.
Adds
--skip-installto theinitOptionsschema and threads anisSkipInstallpredicate through the action pipeline soinstallDependenciesis bypassed when the flag is set. When the runis not in dry-run mode,
noticeSkippedInstallprints the exact installcommand for the selected package manager.
Verification
mise run checkmise run test