nrwl/nx

Projects without a package.json get excluded from "__default__" release group

mpsanchis opened this issue · 0 comments

Current Behavior

Defining projectRelationship as independent for all the projects, but not defining release groups:

  "release": {
    "projectsRelationship": "independent",
    "version": {
      "generator": "@mpsanchis/my-plugin:release-version"
    }
  },

leads to a __default__ releaseGroup that does not contain projects without a package.json. This releaseGroup is then passed to my-plugin that doesn't see some projects.

Expected Behavior

Core Nx release functionalities should be language-agnostic. I understand that you added JS-specific information in @nx/js:release-version, but as discussed in #23389 I should at least be able to implement my own language-agnostic version calculator.

I expect that the releaseGroup and projects my release-version generator receives did not go through a whole lot of logic. This line in particular is very harmful, since it goes against Nx's philosophy. The core NX cli mentions package.json, which is JS/TS specific.

GitHub Repo

No response

Steps to Reproduce

  1. Create a small nx repo
  2. Add a release configuration at the root as mentioned in "current behavior"
  3. Add a project that is not Javascript
  4. Run nx release version ... and observe the projects that are filtered in nx/src/command-line/release/config/config.ts

Nx Report

Node   : 18.18.2
OS     : darwin-arm64
pnpm   : 8.10.0

nx                 : 18.3.3
@nx/js             : 18.3.3
@nx/jest           : 18.3.3
@nx/linter         : 18.3.3
@nx/eslint         : 18.3.3
@nx/workspace      : 18.3.3
@nx/devkit         : 18.3.3
@nx/eslint-plugin  : 18.3.3
@nx/playwright     : 18.3.3
@nx/plugin         : 18.3.3
@nx/react          : 18.3.3
@nrwl/tao          : 18.3.3
@nx/vite           : 18.3.3
@nx/web            : 18.3.3
typescript         : 5.4.2
---------------------------------------
Registered Plugins:
@jnxplus/nx-maven
...
---------------------------------------
Community plugins:
@jnxplus/nx-maven      : 0.42.1
@monodon/rust          : 1.4.0
@ngx/deploy-npm        : 7.1.0
@nx-go/nx-go           : 3.0.0
@nx-tools/nx-container : 5.2.0
---------------------------------------
Local workspace plugins:
         ...

Failure Logs

No response

Package Manager Version

pnpm 8.10.0

Operating System

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

Additional Information

🙏 please consider non-js projects when implementing core Nx functionalities. I am very happy with Nx overall, but sometimes I bump into these issues and they make it difficult to expand my monorepos