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

New releases of cz-conventional-changelog since 3.0.1 do not take effect #113

Open
djcsdy opened this issue Feb 25, 2020 · 1 comment
Open

Comments

@djcsdy
Copy link

djcsdy commented Feb 25, 2020

At present, all releases of cz-conventional-changelog since 3.0.1 are useless since they behave exactly as if 3.0.1 was installed.

The reason for this is the circular dependency between cz-conventional-changelog and commitizen. Since there is a circular dependency, one of the projects must always depend on an older version of the other. commitizen depends on cz-conventional-changelog =3.0.1 (no version range), so the modules get installed like this:

node_modules
    commitizen (v4.0.3)
        node_modules
            cz-conventional-changelog (v3.0.1)
    cz-conventional-changelog (v3.1.0)

When the user runs git-cz, commitizen resolves cz-conventional-changelog from its own node_modules, and thus always gets v3.0.1, no matter what version the user's package depends on.

The most annoying consequence of this problem for me personally is that even though my projects depend on cz-conventional-changelog v3.1.0 I am still seeing "improvement" in the list of change types, even though that type was removed some time ago.

This circular dependency will also likely cause you endless churn from Greenkeeper as Greenkeeper alternately updates commitizen and cz-conventional-changelog to update to the latest version of the other project, which will trigger a release, which will trigger Greenkeeper to update the other project, and so on, endlessly. Likely the only reason this has not happened already is that the build is failing for commitizen/cz-cli#657.

Some ideas for fixing this:

  • Remove the dependency on commitizen from cz-conventional-changelog. Perhaps commitizen could instead pass an instance of configLoader to plugins. I don't think it is a good idea for plugins to have to depend on commitizen for this.
  • Change the dependency on cz-conventional-changelog from commitizen to a ^ range dependency (although this will probably not fix the potential for Greenkeeper churn).
  • Remove the dependency on cz-conventional-changelog from commitizen - is this really required?
@djcsdy
Copy link
Author

djcsdy commented Feb 25, 2020

Turns out I am getting this problem because in my package.json I specified:

    "config": {
        "commitizen": {
            "path": "cz-conventional-changelog"
        }
    }

as opposed to the recommended relative path:

    "config": {
        "commitizen": {
            "path": "./node_modules/cz-conventional-changelog"
        }
    }

I still think much of what is discussed above is a real problem, so I will leave this issue open, but feel free to close it if you disagree. It's not great that depending on any one version of cz-conventional-changelog results in two different versions being installed.

djcsdy added a commit to softwareventures/maintain-project that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/maintain-project that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/semantic-release-s3-upload that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/webpack-config that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/renovate-config that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/promise-ponyfill that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/i32 that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/time that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/dictionary that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/fetch-ponyfill-preconfigured that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/u32 that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/duration that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/yarn-recursive that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/table that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/dictionary-types that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/decimal that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/tsconfig that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/semver-rust that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/tslint-rules that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/chain that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/revolut-feed that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/array that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/ordered that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/streams that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/csv that referenced this issue Feb 25, 2020
djcsdy added a commit to softwareventures/sh that referenced this issue Feb 25, 2020
djcsdy added a commit to dcgw/you-are-now-in-space that referenced this issue Feb 26, 2020
djcsdy added a commit to dcgw/super-metronome-hero that referenced this issue Feb 26, 2020
djcsdy added a commit to dcgw/bunny-patrol that referenced this issue Feb 26, 2020
djcsdy added a commit to softwareventures/toggl-client that referenced this issue Mar 2, 2020
djcsdy added a commit to softwareventures/tsconfig that referenced this issue Sep 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant