Skip to content

fix(release): remove unnecessary number from release return type#34481

Merged
llwt merged 3 commits intomasterfrom
fix/release-return-type
Feb 17, 2026
Merged

fix(release): remove unnecessary number from release return type#34481
llwt merged 3 commits intomasterfrom
fix/release-return-type

Conversation

@llwt
Copy link
Copy Markdown
Member

@llwt llwt commented Feb 17, 2026

Current Behavior

The release function returned by createAPI has a return type of Promise<NxReleaseVersionResult | number>. The | number union member is inaccurate since the function always returns NxReleaseVersionResult, which can mislead consumers of the programmatic API.

Expected Behavior

The return type is narrowed to Promise<NxReleaseVersionResult>, accurately reflecting what the function actually returns and giving API consumers correct type information.

The release function always returns NxReleaseVersionResult, so the
union with number in the return type was inaccurate and could mislead
consumers of the API.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@llwt llwt requested review from a team and Coly010 as code owners February 17, 2026 12:10
@llwt llwt requested a review from FrozenPandaz February 17, 2026 12:10
@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 17, 2026

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit 78c84c4
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/6994808ee277f4000846c014
😎 Deploy Preview https://deploy-preview-34481--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link
Copy Markdown

netlify Bot commented Feb 17, 2026

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 78c84c4
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6994808ddd8c760008adec40
😎 Deploy Preview https://deploy-preview-34481--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Feb 17, 2026

View your CI Pipeline Execution ↗ for commit 78c84c4

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 12m 40s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 4m 7s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 8s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-17 15:09:42 UTC

@llwt llwt enabled auto-merge (squash) February 17, 2026 12:12
@llwt llwt disabled auto-merge February 17, 2026 12:14
@llwt llwt enabled auto-merge (squash) February 17, 2026 12:16
@llwt llwt disabled auto-merge February 17, 2026 12:17
@llwt llwt enabled auto-merge (squash) February 17, 2026 12:17
@llwt llwt merged commit 0c14bcb into master Feb 17, 2026
23 checks passed
@llwt llwt deleted the fix/release-return-type branch February 17, 2026 15:10
FrozenPandaz pushed a commit that referenced this pull request Feb 20, 2026
)

## Current Behavior

The `release` function returned by `createAPI` has a return type of
`Promise<NxReleaseVersionResult | number>`. The `| number` union member
is inaccurate since the function always returns
`NxReleaseVersionResult`, which can mislead consumers of the
programmatic API.

## Expected Behavior

The return type is narrowed to `Promise<NxReleaseVersionResult>`,
accurately reflecting what the function actually returns and giving API
consumers correct type information.

Co-authored-by: Andreas Hörnicke <andreas.hoernicke@contentful.com>
(cherry picked from commit 0c14bcb)
@github-actions
Copy link
Copy Markdown
Contributor

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Feb 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants