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: auto-detect package manager in create fuels #3503

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Dhaiwat10
Copy link
Member

@Dhaiwat10 Dhaiwat10 commented Dec 26, 2024

Release notes

In this release, we:

  • Added auto-detection for the user's package manger of choice for create fuels

Summary

create fuels now auto-detects the user's package manger. eg. bun create fuels will now use bun to install dependencies.

Breaking Changes

These package manager flags have been removed since they are not needed anymore:

--bun, --pnpm, --npm

Before

bun create fuels --bun
pnpm create fuels --pnpm

After

bun create fuels
pnpm create fuels

Checklist

  • All changes are covered by tests (or not applicable)
  • All changes are documented (or not applicable)
  • I reviewed the entire PR myself (preferably, on GH UI)
  • I described all Breaking Changes (or there's none)

Copy link

vercel bot commented Dec 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fuels-template ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 26, 2024 3:29am
ts-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 26, 2024 3:29am
ts-docs-api ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 26, 2024 3:29am

Copy link
Contributor

github-actions bot commented Dec 26, 2024

This PR is published in NPM with version 0.0.0-pr-3503-20241226031927

Copy link

codspeed-hq bot commented Dec 26, 2024

CodSpeed Performance Report

Merging #3503 will degrade performances by 23.41%

Comparing dp/create-fuels-pkg-manager (2c5fcb6) with master (41c72fb)

Summary

❌ 1 regressions
✅ 17 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark master dp/create-fuels-pkg-manager Change
should successfully perform a batch transfer (x20 times) 60.1 ms 78.5 ms -23.41%

Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
76.32%(-0.01%) 69.86%(+0.02%) 74.19%(-0.01%) 76.33%(-0.01%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/create-fuels/src/lib/getPackageManager.ts 100%
(+0%)
85.71%
(+5.71%)
100%
(+0%)
100%
(+0%)

@Dhaiwat10 Dhaiwat10 enabled auto-merge (squash) December 26, 2024 12:48
let packageManager: PackageManager | undefined = cliChosenPackageManagerSelected[0];
if (cliChosenPackageManagerSelected.length > 1) {
warn('More than one package manager was selected.');
if (userAgent.startsWith('pnpm')) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit, please store package manager strings as constants

}

Copy link
Contributor

Choose a reason for hiding this comment

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

console.warn here if the package users package manager is not supported and we default to npm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Issue is a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-detect package manager in create fuels
2 participants