standard-version icon indicating copy to clipboard operation
standard-version copied to clipboard

Substitutions not reading from package.json

Open markusfalk opened this issue 4 years ago • 3 comments

Describe the bug

Documentation says values for the different substitutions are coming from package.json.

{{owner}} --> Default: Extracted from normalized package.json repository.url field. {{host}} --> Default: Normalized host found in package.json

I have set all values I want to use but none of them land in the changelog.

Current behavior

package.json

... 
"host": "http://mygithost.url",
"repository": {
  "owner": "Markus",
  "url": "http://some.url"
}
...

.versionrc

{
  "commitUrlFormat": "{{host}}/{{owner}}/commit/{{hash}}"
}

CHANGELOG.md

...
### Features

* add new stuff ([abc123](///commit/abc123456))
...

Expected behavior

I thought this would read values from package.json and add them to the changelog like so:

### Features

* add new stuff ([abc123](http://mygithost.url/markus/commit/abc123456))

Environment

  • standard-version version(s): ^9.0.0
  • Node/npm version: Node 14.9.0/6.14.8
  • OS: macOS 10.15.7

Additional context

This is a new local git repository that has no remote so far. Not sure if values are generated from that even though docs say from package.json

Thank you 🤓

markusfalk avatar Nov 23 '20 14:11 markusfalk

This is happening for me too. Same set-up.

zlite183 avatar Dec 21 '20 05:12 zlite183

+1

hxhieu avatar Jul 19 '21 03:07 hxhieu

+1

dsegoviat avatar Mar 07 '22 11:03 dsegoviat