Skip to content

Custom updater for bumpFiles/packageFiles not loaded when provided as JS-object #933

Open
@StefanHuettenmoserECMT

Description

@StefanHuettenmoserECMT

Describe the bug
The custom updater is empty when passing it as an JS-object (with readVersion/writeVersion functions). It works when adding it via filepath.

Current behavior
Current output is as bellow. Note the updater is empty. A tracker is supplied with filename (as string) and updater (as object with readVersion/writeVersion-methods).

Unable to obtain updater for: {"filename":".env","updater":{}}

  • Error: Unsupported file (.env) provided for bumping.
    Please specify the updater type or use a custom updater.
  • Skipping...

Expected behavior
Updater should be loaded and not be empty

Environment

  • standard-version version(s): master
  • Node/npm version: [e.g. Node 16/npm 8]
  • OS: [Windows 10]

Possible Solution
When checking if the updater is valid for the first time, the argument should be updater.updater (as in line 80)

Thank you very much for your dedication to this valuable project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions