Skip to content

[BUG]: VERSION placeholder is not replaced in bundled dist #764

@wxh06

Description

@wxh06

What happened?

We can clearly see that, in each version starting from 9.0.0-beta.1, the VERSION constant in dist-bundle/index.js has always been set to the placeholder value 0.0.0-development, which is supposed to be replaced by semantic-release-plugin-update-version-in-files with the actual version number.

As a result, the default User-Agent does not have the correct version number for octokit-request.js either.

> require("@octokit/request").request.endpoint.DEFAULTS;
{
  method: 'GET',
  baseUrl: 'https://api.github.com',
  headers: {
    accept: 'application/vnd.github.v3+json',
    'user-agent': 'octokit-request.js/0.0.0-development Node.js/20.19.2 (darwin; arm64)'
  },
  mediaType: { format: '' }
}

It was introduced in #678

Expected

var VERSION = "10.0.2";

Actual

var VERSION = "0.0.0-development";

Screenshot 2025-06-20 at 02.57.26

Versions

@octokit/request@>=9.0.0-beta.1

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugSomething isn't working as documentedreleased

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions