Skip to content

feat(dts)!: move temporary declarations to .rstack - #1895

Merged
Timeless0911 merged 1 commit into
mainfrom
david/feat-dts-temp-directory
Sep 3, 2026
Merged

Timeless0911 merged 1 commit into
mainfrom
david/feat-dts-temp-directory

Conversation

@Timeless0911

Copy link
Copy Markdown
Contributor

Summary

  • Move temporary declaration files generated during declaration bundling from .rslib/declarations to .rstack/declarations, while preserving existing .rstack hooks and cache data.
  • Document this breaking change and note that the old .rslib directory can be safely removed after upgrading.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI lite review requested due to automatic review settings September 3, 2026 06:35
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-03T06:38:02.694857Z 01316d7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There are a couple of concrete correctness/backwards-compatibility issues (ensuring .rstack/declarations/.gitignore creation and keeping .rslib ignored to prevent accidental commits) that should be addressed before merging.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR updates the declaration-bundling workflow to store temporary generated declaration files under .rstack/declarations (instead of .rslib/declarations), aligning with the .rstack directory while avoiding interference with other .rstack contents (hooks/cache), and documents the breaking change.

Changes:

  • Move temp declaration output directory from .rslib/declarations to .rstack/declarations across code, tests, and docs.
  • Add unit coverage to ensure .rstack/declarations cleanup doesn’t affect sibling .rstack contents.
  • Update .gitignore rules to ignore the new temp declaration directory.
File summaries
File Description
website/docs/zh/guide/upgrade/v0-to-v1.mdx Documents the breaking directory move for temporary declaration files (ZH).
website/docs/zh/config/lib/dts.mdx Updates .rslib/declarations references to .rstack/declarations (ZH).
website/docs/en/guide/upgrade/v0-to-v1.mdx Documents the breaking directory move for temporary declaration files (EN).
website/docs/en/config/lib/dts.mdx Updates .rslib/declarations references to .rstack/declarations (EN).
tests/scripts/shared.ts Updates test helper to create temp declaration files under .rstack/declarations.
tests/integration/dts/isolated/index.test.ts Updates expected stale temp declaration paths to .rstack/declarations.
tests/integration/dts/bundle/index.test.ts Renames cleanup test to reflect new temp declaration location/intent.
tests/integration/dts-tsgo/bundle/index.test.ts Renames cleanup test to reflect new temp declaration location/intent.
packages/plugin-dts/tests/utils.test.ts Adds coverage ensuring .rstack/declarations management doesn’t touch sibling .rstack dirs.
packages/plugin-dts/src/utils.ts Implements .rstack/declarations path and temp dir cleanup helpers.
packages/plugin-dts/src/index.ts Updates cleanup comment to match new behavior.
packages/plugin-dts/README.md Updates documentation to mention .rstack/declarations.
.gitignore Switches ignore rule to .rstack/declarations.
Review details
  • Files reviewed: 12/13 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread packages/plugin-dts/src/utils.ts
@Timeless0911
Timeless0911 merged commit c6ecf81 into main Sep 3, 2026
12 checks passed
@Timeless0911
Timeless0911 deleted the david/feat-dts-temp-directory branch September 3, 2026 06:39
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.

3 participants

Sponsor
SponsoredKunjungi sekarang
Promo