Skip to content

fix: types フィールドの拡張子を .d.ts へ修正する (0.3.1)#17

Merged
april418 merged 1 commit into
masterfrom
fix/types-field-dts-extension
Jun 8, 2026
Merged

fix: types フィールドの拡張子を .d.ts へ修正する (0.3.1)#17
april418 merged 1 commit into
masterfrom
fix/types-field-dts-extension

Conversation

@april418

@april418 april418 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

概要

package.jsontypes フィールドが存在しない拡張子 ./cjs/index.d.js.d.js)を指していた typo を、実在する ./cjs/index.d.ts に修正する。0.3.1 として publish する。

影響

types が解決できないため、bare import の型が any にフォールバックしていた。

// 影響あり(bare import)— im-cmp/src/lib/Storage.ts で使用
import { Cookie } from '@intimatemerger-internal/im-core';

// 影響なし(subpath import)— 各自の .d.ts を直接解決
import { XHR } from '@intimatemerger-internal/im-core/esm/XHR';

vitest / esbuild ビルドは型チェックしないため実行時の不具合は無く、潜在的な型欠落バグだった。

修正内容

  • types: ./cjs/index.d.js./cjs/index.d.ts
  • version: 0.3.0 → 0.3.1

検証

  • pnpm build ✅(cjs/index.d.ts 生成・Cookie/XHR/LocalStorage/SessionStorage/sendBeacon を export)
  • pnpm lint ✅ / pnpm test 51 passed ✅
  • typescjs/index.d.ts の実在を確認 ✅

マージ後

master マージで CI が 0.3.1 を ArtifactRegistry へ publish する。bare import を使う im-cmp は 0.3.1 へ更新すると型が正しく付く(任意・別 PR)。subpath import のみの consumer は更新不要。

🤖 Generated with Claude Code

types が存在しない ./cjs/index.d.js (.d.js 拡張子) を指していたため、
bare import (例: import { Cookie } from '@intimatemerger-internal/im-core')
の型解決が効かず any にフォールバックしていた。実在する
./cjs/index.d.ts を指すよう修正し、version を 0.3.1 へ上げる。
subpath import (例: .../im-core/esm/XHR) は各自の .d.ts を直接解決する
ため本 typo の影響は受けない。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@april418 april418 merged commit 64abcd2 into master Jun 8, 2026
2 checks passed
@april418 april418 deleted the fix/types-field-dts-extension branch June 8, 2026 13:14
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