Skip to content

fix: keep value exports as values in types.d.mts - #826

Merged
danielroe merged 1 commit into
mainfrom
types-value-exports
Nov 13, 2026
Merged

danielroe merged 1 commit into
mainfrom
types-value-exports

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

this re-exports value exports, including default, as values, and keeps only type exports such as interfaces and type aliases as type.

@danielroe danielroe changed the title fix: keep value exports as values in types.d.mts fix: keep value exports as values in types.d.mts Nov 13, 2026
@pkg-pr-new

pkg-pr-new Bot commented Nov 13, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nuxt/module-builder/@nuxt/module-builder@826

commit: 599b65d

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Declaration generation now distinguishes type-only exports from value exports. It marks named re-exports as type-only only when their names are classified as type-only. New build tests cover function and constant exports in regular and isolated-declaration variants. They compare generated declarations and type-check a consumer that imports the values and ModuleOptions.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: Minimal · up to 599b6

Generated type declarations should now re-export values as values and mark only real types as type. No concrete merge-blocking risk was identified, and new build tests cover the changed behavior.

Pre-merge checks: Passed 4

Check name Status Explanation
Description check Passed The description states that value exports, including default, are re-exported as values, and that only type exports such as interfaces and type aliases are marked as type. This matches the changes in …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title names the primary change: value exports in types.d.mts are kept as values rather than marked as types. The raw summary confirms that writeTypes now applies the type modifier only to type-onl…
Full details: Description check

Explanation

The description states that value exports, including default, are re-exported as values, and that only type exports such as interfaces and type aliases are marked as type. This matches the changes in src/build/types.ts and the new test in test/build.spec.ts. The linked issue section is left as template placeholder text, but the description is related to the changeset.

Full details: Title check

Explanation

The title names the primary change: value exports in types.d.mts are kept as values rather than marked as types. The raw summary confirms that writeTypes now applies the type modifier only to type-only names, and the new test checks that function and constant re-exports are not marked as types. The title is concise, specific, and follows the conventional commit style. It does not mention the isolatedDeclarations test fixtures, which is acceptable because the title needs to cover only the main change.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fc4016e2-54b2-4ca7-8cd4-9ab60d947baa
Commits

Reviewing files that changed from the base of the PR and between 05863cb and 599b65d.

Files selected for processing: 2

  • src/build/types.ts
  • test/build.spec.ts

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.

@danielroe
danielroe added this pull request to the merge queue Nov 13, 2026
Merged via the queue into main with commit aa99919 Nov 13, 2026
26 checks passed
@danielroe
danielroe deleted the types-value-exports branch November 13, 2026 18:54
@github-actions github-actions Bot mentioned this pull request Nov 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant