Skip to content

Conversation

@davidecavaliere
Copy link

Use workspaces settings in package

With this change we can leverage npm's workspaces settings which will
allow to achieve the following:

1 - running npm install from the root of the project will install all
dependencies for all packages in any folder that is listed in the "packages" array.

2 - all dependencies with be placed in the main node_modules folder
unless we need to keep some dependencies separated. For which case we
can leverage the "nohoist" option.

With this change we can leverage npm's workspaces settings which will
allow to achieve the following:

1 - running `npm install` from the root of the project will install all
  dependencies for all packages in any folder that is listed in the
  "packages" array.
2 - all dependencies with be placed in the main `node_modules` folder
unless we need to keep some dependencies separated. For which case we
can leverage the  "nohoist" option.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds npm workspaces configuration to the root package.json, enabling centralized dependency management across multiple packages within the monorepo. With this change, running npm install from the project root will automatically install dependencies for all workspace packages and place them in a shared node_modules folder.

Key Changes

  • Adds workspaces configuration with glob patterns to identify package locations
  • Configures paths for api utilities, plugins, UI tests, and bin utilities as workspace packages

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

package.json Outdated
Comment on lines 9 to 10
"ui-test/*",
"bin/**/*"
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

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

The workspace pattern "bin/**/*" is overly broad and will cause issues. The bin directory does not contain any package.json files in its subdirectories. This pattern will not match any valid npm packages and should be removed from the workspaces configuration. If packages are added to bin in the future, this pattern can be reconsidered, but currently it serves no purpose and may cause confusion.

Suggested change
"ui-test/*",
"bin/**/*"
"ui-test/*"

Copilot uses AI. Check for mistakes.
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.

2 participants