Skip to content

Conversation

@janbiasi
Copy link
Contributor

@janbiasi janbiasi commented Feb 16, 2025

Description

Currently, the detectProjects utility always uses the workspaceRoot from the @nx/devkit package. This pull request adds support for setting a custom cwd, defaulting to the current implementation.

Motivation and Context

This change is needed for the upgrade of the official commitlint-lerna-scopes package (see issue for full context) as it's still using the deprecated @lerna/project module. Commitlint heavily relies on being able to provide the working directory from internal commands to the effective project directory execution path.

How Has This Been Tested?

This change will not affect any current implementations.
I wasn't able to locate existing tests for the utility itself.
I'd be happy about receiving advice from the maintainers regarding tests.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (change that has absolutely no effect on users)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@nx-cloud
Copy link

nx-cloud bot commented Feb 19, 2025

View your CI Pipeline Execution ↗ for commit 80cf9b0.

Command Status Duration Result
nx run-many --t e2e --parallel=1 ✅ Succeeded 11m 15s View ↗
nx run-many -t test --parallel=3 --ci --maxWork... ✅ Succeeded 21s View ↗
nx run integration:integration --ci --maxWorkers=2 ✅ Succeeded 16s View ↗
nx run-many -t lint --parallel=3 ✅ Succeeded 16s View ↗
nx run-many -t build --parallel=3 ✅ Succeeded 13s View ↗
nx run-many -t build ✅ Succeeded 5s View ↗
nx-cloud record -- npx nx format:check ✅ Succeeded 3s View ↗
nx run-many -t test --parallel=3 --ci --maxWork... ✅ Succeeded 35s View ↗

☁️ Nx Cloud last updated this comment at 2025-02-19 13:59:58 UTC

Copy link
Member

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

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

Thanks @janbiasi!

@JamesHenry JamesHenry merged commit 08d1d0d into lerna:main Feb 19, 2025
13 checks passed
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