Skip to content

fix: 型定義ファイル内のパスエイリアスを相対パスに変換#78

Merged
KinjiKawaguchi merged 1 commit intomainfrom
fix/resolve-dts-path-aliases
Feb 1, 2026
Merged

fix: 型定義ファイル内のパスエイリアスを相対パスに変換#78
KinjiKawaguchi merged 1 commit intomainfrom
fix/resolve-dts-path-aliases

Conversation

@KinjiKawaguchi
Copy link
Copy Markdown
Member

Summary

  • tsupで生成される.d.tsファイル内の#domain等のsubpath importsがパッケージ利用者側で解決できない問題を修正
  • tsc-aliasを追加し、ビルド後にパスエイリアスを相対パスに変換するように変更
  • バージョンを2.1.2に更新

背景

パッケージ利用者がmoduleResolution: "bundler"などを設定しても、.d.tsファイル内の#domainなどのsubpath importsはTypeScriptで解決できず、型がanyになる問題があった。

Test plan

  • its-discordでリンクして型チェック・ビルドが通ることを確認済み

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 1, 2026 10:37
@KinjiKawaguchi KinjiKawaguchi changed the base branch from develop to main February 1, 2026 10:38
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the build pipeline so that .d.ts files no longer contain unresolved subpath imports like #domain, by post-processing the build output with tsc-alias, and bumps the package version accordingly.

Changes:

  • Bump package version from 2.1.1 to 2.1.2.
  • Update the build script to run tsup and then tsc-alias against dist using the existing tsconfig.json path aliases.
  • Add tsc-alias (and its dependency graph in package-lock.json) as a dev dependency and reformat the files field for consistency.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
package.json Bumps version, adds tsc-alias as a dev dependency, and updates the build script to rewrite path aliases in the emitted dist .d.ts files.
package-lock.json Regenerates the lockfile to reflect the new version and the added tsc-alias package and its transitive dependencies.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

tsupで生成される.d.tsファイル内の#domain等のsubpath importsが
パッケージ利用者側で解決できない問題を修正。

tsc-aliasを追加し、ビルド後にパスエイリアスを相対パスに変換するように変更。

バージョンを2.1.2に更新。

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@KinjiKawaguchi KinjiKawaguchi force-pushed the fix/resolve-dts-path-aliases branch from 70f27c6 to 5e8ad0b Compare February 1, 2026 10:39
@KinjiKawaguchi KinjiKawaguchi merged commit 117943e into main Feb 1, 2026
3 checks passed
@KinjiKawaguchi KinjiKawaguchi deleted the fix/resolve-dts-path-aliases branch February 1, 2026 10:40
KinjiKawaguchi added a commit that referenced this pull request Mar 23, 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.

2 participants