Skip to content

fix(release): create-post.mjs rejects the tag argument and ignores it #299

Closed as not planned

Description

@HerambInamke

Which area is affected?

Build tooling (scripts, plugins)

Bug description

.github/workflows/create-blog-post.yml runs:

node scripts/release/create-post.mjs "$TAG" --author="$AUTHOR"

but scripts/release/create-post.mjs calls parseArgs without allowPositionals, so Node throws ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL before doing anything.

Two related problems in the same flow:

  • The tag is never read; the script always documents releases/latest, so dispatching the workflow for any other tag would write the wrong post.
  • scripts/release/template.md.hbs writes category: release, while every existing post uses Release. The blog filter compares categories case-sensitively (layouts/Blog/index.jsx), so a generated post would add a separate "release" chip.

The only run of the blog-post job since #213 (run 32890041573, 2026-08-25) failed earlier, on the import path that #264 fixed, so this hasn't shown up in CI yet.

Proposed fix: allowPositionals: true, use positionals[0] with releases/latest as the fallback, and category: Release in the template.

Steps to reproduce

  1. npm ci
  2. node scripts/release/create-post.mjs v5.109.0 --author=test
  3. TypeError [ERR_PARSE_ARGS_UNEXPECTED_POSITIONAL]: Unexpected argument 'v5.109.0'. This command does not take positional arguments

Expected behavior

A post for the given tag (v5.109.0) with category: Release.

Environment

Node.js 24.22.1, Windows 11 (the error comes from util.parseArgs and doesn't depend on the OS)

Have you used AI?

Yes

An AI assistant helped me trace the problem and draft this issue. I reproduced the error and checked the details myself.

cc @avivkeller @bjohansebas

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions