`yarn publish [.tgz]` refuses to run without `--new-version` option
Do you want to request a feature or report a bug? Bug
What is the current behavior?
When running yarn publish on a pre-built tarball, yarn refuses to continue without the following error:
error Use the "--new-version [version]" flag to create a new version.
If the current behavior is a bug, please provide the steps to reproduce.
- create a project with a package.json
- build a valid tarball of the project
- run
yarn publish <location-of-tarball>
What is the expected behavior?
If the tarball provided is valid, it should already have a package.json inside it. In my case, I am pre-building and compressing before I publish, so the package.json is already set to the correct version. I would imagine that people build a tarball are not expecting the contents of that tarball to be modified during the publish stage, and I don't see a reason that the version must be bumped unless the tarball is being modified to reflect the new version. I do not think that it should be enforced that a version needs to be bumped in this case. It should only required bumping if the --new-version option is used.
Please mention your node.js, yarn and operating system version.
macOS 10.12.2, yarn 0.18.1, node 7.3.0
same here with a folder. yarn 0.18.1, 0.19, 0.19.1 osx 10.9.5 node 6.9.4
ok
You must respect http://semver.org/ for versioning. 0.1 won't work for example.
Related to #722 and #2445
Over a year later and this is still a problem. 😭
Over a year and six months later and this is still a problem. sob
#6399 should fix it