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

Nx release fails to detect changes if the workspace directory is not the monorepo root directory #27995

Closed
1 of 4 tasks
hkfb opened this issue Sep 19, 2024 · 0 comments · Fixed by #28650
Closed
1 of 4 tasks

Comments

@hkfb
Copy link

hkfb commented Sep 19, 2024

Current Behavior

Given a monorepo with a set of packages, each with its own project.json file.

The nx.json file resides in a repo subdirectory called typescript, along with package.json

The path to each package is typescript/packages/<project_name>

nx.json is set up to use Conventional commits and independent packages:

    "release": {
        "version": { "conventionalCommits": true },
        "projectsRelationship": "independent"
    }

I have created a commit that changes some file belonging to a package, with a "fix:" prefix in the commit header.

When I run npx nx release version --dry-run it fails to detect any changes, ie. 🚫 No changes were detected using git history and the conventional commits standard.

Expected Behavior

I expect NX release to be able to detect changes if the NX workspace directory is not the root directory of the monorepo

GitHub Repo

https://github.com/hkfb/webviz-subsurface-components/tree/nx_release

Steps to Reproduce

  1. Clone the repo and check out the nx_release tag
  2. In the typescript directory run npx nx release version --dry-run -p subsurface-viewer

Nx Report

Node   : 20.10.0
OS     : linux-x64
npm    : 8.19.4

nx             : 19.2.3
@nx/js         : 19.2.3
@nx/jest       : 19.2.3
@nx/workspace  : 19.2.3
@nx/devkit     : 19.2.3
@nrwl/tao      : 19.2.3
typescript     : 5.4.3
---------------------------------------
Community plugins:
@theunderscorer/nx-semantic-release : 2.11.0

Failure Logs

No response

Package Manager Version

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment