Skip to content

Original package.json file structure is not respected #132

@helltraitor

Description

@helltraitor

Environment

Not involved

Reproduction

Steps to reproduce

  1. Add new line at the end of the package.json
  2. Run changelogen --release command

Expected

Changes in the version line only

Actual

Last line removed

Describe the bug

changelogen uses external tool pkg-types, that does nothing special, just 1 line to be honest. And that leads to undesired behavior when the last line removes

Additional context

I've just noticed that changelogen uses pkg-types which ignores the use case when eol-last preferred. You maybe already noticed that changelogen "removes" last line in package.json because relies on external util, which doesn't care about user preferences

I think that this is an important issue, since it's requires for end user to change eslint rules.

Possible solution: wait for implementation of unjs/changelogen#130 which will allow to release without version changing and hence must not override package.json file

Desired solution: change version inplace instead of overriding whole file

Logs

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions