Open JonShort opened 1 year ago
Currently if this tool is run within repositories using npm workspaces, it can cause dependencies to be upgraded incorrectly.
Project with one workspace (named package-1)
package-1
Run with -l (latest) flag
-l
Workspace dependency remains outdated
⚠️ :bug: abbrev is now installed at root
abbrev
This could be a good first step just to avoid the bug before adding full support
Since npm provides the "Depended by" field, we can probably filter workspace deps out within the existing filter section
Workspace deps can be installed with npm i dependency@version -w workspace-name
npm i dependency@version -w workspace-name
This means that we could check if any workspace deps exist, and run multiple installs, e.g.
This adds a fair amount of complexity, but isn't impossible
Currently if this tool is run within repositories using npm workspaces, it can cause dependencies to be upgraded incorrectly.
Example
Project with one workspace (named
package-1
)Run with
-l
(latest) flagWorkspace dependency remains outdated
⚠️ :bug:
abbrev
is now installed at rootOptions
Option 1 - Ignore workspaces
This could be a good first step just to avoid the bug before adding full support
Since npm provides the "Depended by" field, we can probably filter workspace deps out within the existing filter section
Option 2 - Add workspace support
Workspace deps can be installed with
npm i dependency@version -w workspace-name
This means that we could check if any workspace deps exist, and run multiple installs, e.g.
This adds a fair amount of complexity, but isn't impossible