Skip to content

Conversation

@deflis
Copy link
Owner

@deflis deflis commented Dec 9, 2025

  • tsdown.config.tsを新規作成し、ターゲットをES2020に設定、出力形式をCJSとESMに設定。
  • responseGzipOrJson関数内でgzipSyncの戻り値をArrayBufferにキャスト。
  • unzippテスト内でgzipAsyncの戻り値をArrayBufferにキャスト。
  • package.jsonのエクスポート設定を更新し、typesとimportの拡張子を変更。
  • fetchサンプルを新規作成し、関連ファイルを追加。

- ターゲットをES2020に設定
- 出力形式をCJSとESMに設定
- クリーンビルドと型定義ファイルの生成を有効化
- エントリーポイントにsrc/index.tsとsrc/index.browser.tsを指定
- ソースマップの生成を有効化
- responseGzipOrJson関数内でgzipSyncの戻り値をArrayBufferにキャスト
- unzippテスト内でgzipAsyncの戻り値をArrayBufferにキャスト
- typesの拡張子を.d.tsから.d.mtsに変更
- importの拡張子を.jsから.mjsに変更
- browserエクスポートの設定を更新
- build:tscスクリプトの引数を修正
- README.md、brower.ts、index.ts、package.jsonを新規作成
- pnpm-lock.yamlにfetchの依存関係を追加
Copilot AI review requested due to automatic review settings December 9, 2025 20:55
Copy link
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

このPRは、ビルドツールをtsupからtsdownに移行し、それに伴う設定ファイルの更新、型キャストの追加、パッケージエクスポート設定の変更を行っています。また、fetchの使用例を示す新しいサンプルディレクトリが追加されています。

主な変更点:

  • ビルドツールtsupからtsdownへの移行と設定ファイルの更新
  • テストおよびモックコード内でのArrayBufferへの型キャスト追加
  • package.jsonのエクスポートパスを.d.tsから.d.mts.jsから.mjsに変更

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsdown.config.ts tsupからtsdownへのインポートパス変更
test/util/unzipp.test.ts gzipAsync/TextEncoderの戻り値をArrayBufferにキャスト
test/mock.ts gzipSyncの戻り値をArrayBufferにキャスト
package.json エクスポートパスの拡張子変更、依存関係の更新、tsdownへの移行
examples/fetch/* fetchサンプルコードの新規追加
pnpm-lock.yaml 依存関係の更新

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

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +14 to 17
"types": "./dist/index.d.mts",
"node": {
"import": "./dist/index.js",
"import": "./dist/index.mjs",
"require": "./dist/index.cjs"

Choose a reason for hiding this comment

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

P1 Badge Exports point to artifacts tsdown does not emit

In package.json the root export now targets ./dist/index.mjs and ./dist/index.d.mts (lines 14–17), but the build config in tsdown.config.ts still uses the default format: ["cjs", "esm"] with no out-extension override or NodeNext module settings, so tsdown will continue to emit index.js/index.cjs and .d.ts files. After running pnpm run build, the files referenced in exports will not exist, causing module resolution/type lookup errors for consumers importing narou.

Useful? React with 👍 / 👎.

@deflis deflis changed the title tsdownの設定追加と型キャストの修正 パッケージバージョンアップとtsdownの設定追加と型キャストの修正 Dec 9, 2025
@deflis deflis merged commit 8e6575a into master Dec 9, 2025
13 checks passed
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