-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Projects without a package.json get excluded from "__default__" release group #23439
Comments
Hi @mpsanchis, we support zero config for JS packages with As you can see in the file, this default public projects codepath will only kick in if you skip specifying what projects you care about (as you have done here). You should only need the following to get exactly what you want for non-JS packages (and it is better to be more explicit about this anyway): "release": {
+ "projects": ["*"],
"projectsRelationship": "independent",
"version": {
"generator": "@mpsanchis/my-plugin:release-version"
}
}, Of course feel free to pass one or more alternative project matching patterns into there instead of Hope that helps! |
Out of interest, what non-JS ecosystem are you using Nx with? Is you work open source? I'm excited that you are implementing a custom generator for this, now that it is maturing, we will be extracting a good amount of our native generator into utilities that can be reused by community ones because a lot of the logic is agnostic to a particular ecosystem. Please feel free to open new issues if you run into problems |
Hi, I am also interested in this. In my case I would like to use nx release in a C++ lib monorepo. Do I need to create my onw generator? Cheers |
Hi @JamesHenry Unfortunately, the main repo I contribute to is not open source. I'd need to go through a lot of regulations to see what I could do about that 😞 . This polyglot use case is the reason why I have been so annoying with these issues (and now my first PR 🎉 ). After adding crystal, a next important simplification step is to get rid of If you guys have time, I'd be up for a videocall to discuss the aforementioned points. |
Since I'm here, @robsonos I can tell you already: the short answer is yes. Take a look at the conversation we had in #23389, and also at the source code of |
@mpsanchis Yes it would be useful to cover your polyglot repo in more detail please, do you use twitter/X? If so you could please DM me on there https://x.com/MrJamesHenry |
Hi @mpsanchis. Thanks for your reply. @jscutlery/semver would require me to have a |
Hi @robsonos |
Hi @JamesHenry |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Current Behavior
Defining
projectRelationship
asindependent
for all the projects, but not defining release groups:leads to a
__default__
releaseGroup that does not contain projects without apackage.json
. This releaseGroup is then passed tomy-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
andprojects
myrelease-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 mentionspackage.json
, which is JS/TS specific.GitHub Repo
No response
Steps to Reproduce
release
configuration at the root as mentioned in "current behavior"nx release version ...
and observe the projects that are filtered innx/src/command-line/release/config/config.ts
Nx Report
Failure Logs
No response
Package Manager Version
pnpm 8.10.0
Operating System
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
The text was updated successfully, but these errors were encountered: