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

fix(release): propagate release for dependent packages #22497

Closed

Conversation

brugi82
Copy link

@brugi82 brugi82 commented Mar 25, 2024

Propagate release for all dependant packages that need updating when projectRelationship is "independent" .

Current Behavior

Right now when monorepo has projectRelationship: "independent", nx release is tagging and releasing only projects with changes and not projects that depend on those. For example, lets say that we have 2 projects in our monorepo: is-even and is-odd (which depends on is-even). If we make changes to is-even, nx release will only tag and release that project and not is-odd too, even though it's package.json is updated to reflect the dependency on the latest version of is-even.
nx release config that we are using in the example:

  "release": {
    "version": {
      "conventionalCommits": true
    },
    "changelog": {
      "projectChangelogs": true
    },
    "projectsRelationship": "independent",
    "releaseTagPattern": "{projectName}-{version}"
  },

image
image

Expected Behavior

nx release will tag and release projects that depend on projects with changes too. In the example above, both packages will be released.

image image

Related Issue(s)

Fixes #22268

Propagate release for all dependant packages that need updating when projectRelationship is "independent" .
Fixes nrwl#22268
@brugi82 brugi82 requested a review from a team as a code owner March 25, 2024 15:53
@brugi82 brugi82 requested a review from Cammisuli March 25, 2024 15:53
Copy link

vercel bot commented Mar 25, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Updated (UTC)
nx-dev ⬜️ Ignored (Inspect) Visit Preview Mar 25, 2024 3:54pm

@JamesHenry
Copy link
Collaborator

Hi @brugi82, thanks a lot for this!

The PR that allows for this behaviour to be controlled is here: #21313

I'm afraid it didn't make it over the line at the time and needs to be rekindled.

I don't think we should merge this PR as is as some folks might prefer/be depending on the current behaviour for certain workflows.

While you wait for #21313 hopefully you can simply apply this change you made as a temporary patch via patch-package or pnpm

@JamesHenry JamesHenry requested review from JamesHenry and removed request for Cammisuli March 25, 2024 18:46
@brianespinosa
Copy link

brianespinosa commented Mar 26, 2024

While you wait for #21313 hopefully you can simply apply this change you made as a temporary patch via patch-package or pnpm

Hi @JamesHenry!

What is the related ticket and discussion for the above referenced PR #21313? I was hoping to read some discussion about why it didn't make it across the finish line at the time so I could add a vote for that feature to come in if it would help getting it re-prioritized.

This particular PR would resolve #22268 which has already garnered some interest from folks in the short time since it was created. This is actually critical functionality for NX users who are library authors who intend to publish libraries... so anything we can do to get some solution in, I am all for. I am even willing to put some resources from my org behind helping to get it in if it is a matter of bandwidth. Does the other draft PR need to get dusted off so it is ready to come in? Give us some direction here on where we should send resources.

@JamesHenry
Copy link
Collaborator

@brianespinosa Yes it is purely down to resource constraints, I am on vacation until April 15th and I can look at with fresh eyes then.

If you are feeling inspired and want to take the commits there and apply it to your fork and bring it up to date with the latest and add relevant e2e coverage and ensure any existing tests/quality checks pass then that for sure would be highly appreciated and we can work together to get it released.

@JamesHenry
Copy link
Collaborator

The PR is now ready for review here: #22836

Please take a look for a preview of how you will opt into the behaviorr and what changelogs will look like

I am closing this one to avoid confusion, many thanks again

@JamesHenry JamesHenry closed this Apr 16, 2024
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants