GithubHelp home page GithubHelp logo

Comments (4)

JamesHenry avatar JamesHenry commented on June 28, 2024

Please provide your release config and the commands you are running

from nx.

rcolwell-cb avatar rcolwell-cb commented on June 28, 2024

{
"defaultBase": "migrate-from-lerna",
"release": {
"version": {
"generatorOptions": {
"updateDependents": "auto"
},
"conventionalCommits": true
},
"projectsRelationship": "independent",
"projects": [
"packages//"
],
"releaseTagPattern": "{projectName}@{version}",
"changelog": {
"projectChangelogs": true
}
}
}

have a project where I've just been through (pnpm prefixed to all my nx commands) nx release --first-release, and nx release --dry-run attempts are all clean and ready to go. I don't like the fact my changelogs get restated git history where it already exists (options for how to deal with existing changelogs maybe a feature request?) - otherwise that's ignorable. Anyways, nx release command says nothing to do, so I commit this and this is all tagged correctly etc. I edit my button component library project, and I commit this one file. I attempt to nx release again with this new awesome updateDependents I found that's actually critical to us transitioning from lerna -> nx. In the chore(release) commit, I notice it has less changelog.md files than package.json. Of the updated packages that come from this button update, I'm seeing the dependencies updated in the package.json for some packages, but their versions are't bumped, no changelog update either, and however in other projects that are updated the version of the package is correctly bumped. Another way to summarize what I'm seeing is when I perform nx release it is correctly updating all the package.jsons dependency sections, but its not updating the version on all of them, only some of expected. Therefore existing behavior before this feature was added shouldn't be affected. This is a repo with ~40ish projects. The button project seems to get processed about half way through the big loop inside the release-version.ts package, and the projects that aren't bumped are all before button is processed. The projects that are correctly bumped are all after. This is because the projectToDependencyBumps which the updateDependents feature relies on isn't populated until the original project that you updated gets processed. The fix to this might be to prioritize the originally updated package or some other mechanism - but I would also make your tests for this feature test against a bigger project graph. The graph is good in my project.

from nx.

rcolwell-cb avatar rcolwell-cb commented on June 28, 2024

When button gets processed, the "projectToDependencyBumps" gets filled with all the projects I expect to receive a version bump. However of course only the packages processed after button get updated/bumped and changelog correctly.

from nx.

rcolwell-cb avatar rcolwell-cb commented on June 28, 2024

because updateDependentProjectAndAddToVersionData is the function populating projectToDependencyBumps - the updated project(s) need to be processed first (and that too needs to ensure to update other projects already processed of course too...), or ensure that when projectToDependencyBumps is populated, projects are reprocessed. There needs to be some rearrangement of the logic of this release-version for this to work properly IMO.

from nx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.