[api-extractor] Allow configuration of external packages
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- typescript
- 領域
- tooling
調査の方向性
Start with the external-module detection logic in apps/api-extractor/src/analyzer/ExportAnalyzer.ts, especially the linked lines, and trace how the existing option for additionally included packages is configured. Review the API Extractor configuration path before deciding how string or regex matching should be represented. Done means imports matching the configured external packages remain external instead of being crawled and bundled.
索引モデルが issue の本文から書いたものです。
説明
Summary
I am having a monorepo setup where some files are included via code sharing (using typescript path mappings).
In such a setup API extractor detects the imported files from the other projects as internal and tries to crawl and bundle them into the final types and API.
But according to my build setup the imported files will be external references in the final output.
To mitigate this problem I want to tell API extractor somehow that these imports are external modules.
Details
- API extractor detects the external modules here: https://github.com/microsoft/rushstack/blob/f1bdeddfc0abcc987fdfe0b4d1e82f1ea2b4f65f/apps/api-extractor/src/analyzer/ExportAnalyzer.ts#L264-L313
- There is already an option to additionally include packages
- There is no option to force an import to be an external module.
Bundlers like Rollup/Rolldown have dedicated options like: https://rollupjs.org/configuration-options/#external to control the externals. I think a similar string+regex option could solve this.
Standard questions
Please answer these questions to help us investigate your issue more quickly:
| Question | Answer |
|---|---|
@microsoft/api-extractor version? |
7.53.1 |
| Operating system? | Wom |
| API Extractor scenario? | rollups (.d.ts) --> |
| Would you consider contributing a PR? | Yes |
| TypeScript compiler version? | 5.9.3 |
Node.js version (node -v)? |
v24.11.0 |
- 主要言語
- TypeScript
- スター
- 6.5k
- フォーク
- 708
- 平均マージ
- 4日 13時間
- マージ済み PR(30日)
- 62
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/rushstack のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
microsoft/rushstack の issue をすべて見る
似ている issue
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
motiondivision/motion#3849 ·
-
Add: S Play Event HD オープンcheck:passed streams:add
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
i-am-bee/beeai-framework#1697 · リアクション 1 件 ·
-
Support bun dedupe オープンenhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
antfu/node-modules-inspector#214 ·