Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add installCommand option #131

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

shanedaugherty
Copy link

@shanedaugherty shanedaugherty commented Jun 18, 2024

Adds the ability for users to customize the install command

@shanedaugherty
Copy link
Author

Addresses issue: #130

@@ -20,8 +23,7 @@ export async function migrate(keepMigrationsFile: boolean): Promise<void> {
}
}
)
// sometimes migrations change packages without installing them, so naivly install dependencies here again
await exec('npm install --package-lock-only')
await exec(inputs.installCommand)
Copy link
Author

@shanedaugherty shanedaugherty Jun 18, 2024

Choose a reason for hiding this comment

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

We could consider adding a second input to allow customization of this install command too, since it's currently different. However, it might be sufficient to use the default installCommand again. With the latest versions of Yarn, caching is highly efficient, making subsequent installs very fast when there are minimal changes. Still, this approach might be slower for some dependency management tools.

Copy link
Owner

Choose a reason for hiding this comment

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

hi thanks for the PR! I think its quite heavy to have a one-for-all install command. Sometimes we need npm ci sometimes we need the --package-lock-only flag. What do you think about the following: name the input something like installStrategy which can be "yarn" | "npm" and for now you just check if it is npm, than you can use the existing command, if it is yarn, you can just use yarn, or something specific yarn offers. What do you think?

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.

None yet

2 participants