microsoft/rushstack

[api-extractor] Support wildcard patterns in `bundledPackages`

Closed this issue · 4 comments

Currently, the bundledPackages feature in the api-extractor config only supports an explicit list of complete package names to be bundled when generating roll-ups. It would be convenient if users could specify wildcard patterns of some kind for these.

Consider the scenario of a mono-repo with a series of packages all scoped under a common namespace @foo.
Rather than having to specify

"bundledPackages": ["@foo/a", "@foo/b", ... "@foo/z"],

it would be convenient to instead specify something like a glob pattern

"bundledPackages": ["@foo/*"],

or a RegExp

"bundledPackages": ["@foo/.*"],

Standard questions

Please answer these questions to help us investigate your issue more quickly:

Question Answer
@microsoft/api-extractor version? 7.38.3
Operating system? Linux
API Extractor scenario? rollups (.d.ts)
Would you consider contributing a PR? No
TypeScript compiler version? 5.1.6
Node.js version (node -v)? 18.17.1

I've created a draft PR for a potential RegExp-based solution to this: #4434

I like the idea of using globs instead of regexps

I like the idea of using globs instead of regexps

I have updated #4434 to use glob patterns.

Finished via #4434