Allow configuring npmClient on a project level

オープン
#5,113 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
45/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript
領域
cli

調査の方向性

まず、グローバル設定とプロジェクトレベルの ionic.config.json に対する既存の ionic config set の処理を追跡し、次に ionic build がパッケージマネージャーを選択する方法を確認します。プロジェクト設定とグローバル設定の間で望ましい優先順位を確認し、ビルドがプロジェクト設定を使用して、誤った lockfile を作成しないことを検証します。

索引モデルが issue の本文から書いたものです。

説明

triage

Currently, the npmClient ionic uses can only be set globally, using e.g.:

ionic config set -g npmClient pnpm

In my opinion, it should be possible to override this on a project level, e.g.:

ionic config set npmClient pnpm

This commands "succeeds" and updates the ionic.config.json, but ionic doesn't check that file for this parameter (a bit confusing).

The use cases:

  • We have some older projects that use npm, and newer once use pnpm. It has happened multiple times that I run ionic build when i just switched project and forgot to switch package manager. This then creates a pnpm-lock file in an npm project. And regularly breaks my dependencies and requires deleting node-modules and reinstalling. This wastes time.
  • We have pipelines that build iOS projects on local MacMini's. However, if the global ionic package manager changes, and a pipeline doesn't have the setting to change it back, the build breaks. It's not always obvious that the issue is caused by a switch in package manager.

This was previously suggested in https://github.com/ionic-team/ionic-cli/issues/4570, but was not implemented because the lack of use cases.

主要言語
TypeScript
スター
2k
フォーク
681
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/ionic-cli のほかの issue

ionic-team/ionic-cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。