release-it / bumper

Version read/write plugin for release-it

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

npm ERR! Version not changed

Araxeus opened this issue · comments

image

related issue: release-it/release-it#977

My config: (This works if @release-it/bumper isn't here)

  "release-it": {
    "npm": {
      "publish": false
    },
    "plugins": {
      "@release-it/bumper": {
        "out": [
          "package.json",
          "unpacked/manifest.json"
        ]
      }
    },
    "hooks": {
      "before:init": [
        "npm run check",
        "npm run build"
      ],
      "after:release": "echo Successfully released ${name} v${version} to ${repo.repository}."
    },
    "git": {
      "requireBranch": "main",
      "changelog": "npx auto-changelog --stdout --commit-limit false -u --template https://raw.githubusercontent.com/release-it/release-it/master/templates/changelog-compact.hbs"
    },
    "github": {
      "release": true,
      "draft": true,
      "web": true
    },
  },

The log: 2023-01-21T17_48_36_344Z-debug-0.log

Please see the linked issue in the release-it repo. Does that help?

It does help, thank you.

but I still think this either a bug or need some documentation

I've encountered this error yesterday and spent and hour reading logs to figure out the problem.

So this should either be fixed, or add a notice to the user if this specific scenario occurs

(The plugin could for example compare the path of the provided files against the npm package.json path)

Yes, added a note to the docs. I do wonder why you would want to handle package.json with the bumper plugin when that's already working fine with release-it itself?

Yes, added a note to the docs. I do wonder why you would want to handle package.json with the bumper plugin when that's already working fine with release-it itself?

Well obviously now that I know...

I didn't know that package.json would be version bumped even if npm publish = false

Furthermore, since the role of this plugin is choosing json files to bump, I didn't think that including the json file that i want to bump will make it stop working

Once again I don't think it should crash without explanation.. shouldn't be that hard to handle this case (but your added note on readme might be enough)

Sorry if I wasn't friendly, just genuinely interested. Totally acknowledge that both documentation and error handling could be improved.