Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automation: main-next integrate #18765

Merged
merged 2 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion patches/@microsoft__api-extractor@7.38.3.patch
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,27 @@ index 3511bb2fd2269cce8c45197ef8dc61c28158f743..61101cea95d362b94be8b9e9ccc3e833
+ if (!collectorEntity || !collectorEntity.consumable) {
const entryPointFilename = path.basename(collector.workingPackage.entryPointSourceFile.fileName);
if (!alreadyWarnedEntities.has(referencedEntity)) {
alreadyWarnedEntities.add(referencedEntity);
alreadyWarnedEntities.add(referencedEntity);
diff --git a/lib/generators/DtsRollupGenerator.js b/lib/generators/DtsRollupGenerator.js
index 5a6490760417c2cbefc8ff277f9183a7c870e797..4b93942c049e1fe3940f9cc71c781c591d2bb97a 100644
--- a/lib/generators/DtsRollupGenerator.js
+++ b/lib/generators/DtsRollupGenerator.js
@@ -103,16 +103,9 @@ class DtsRollupGenerator {
// Emit the imports
for (const entity of collector.entities) {
if (entity.astEntity instanceof AstImport_1.AstImport) {
+ // BUG MITIGATION: don't trim imports based on their release tags
const astImport = entity.astEntity;
- // For example, if the imported API comes from an external package that supports AEDoc,
- // and it was marked as `@internal`, then don't emit it.
- const symbolMetadata = collector.tryFetchMetadataForAstEntity(astImport);
- const maxEffectiveReleaseTag = symbolMetadata
- ? symbolMetadata.maxEffectiveReleaseTag
- : api_extractor_model_1.ReleaseTag.None;
- if (this._shouldIncludeReleaseTag(maxEffectiveReleaseTag, dtsKind)) {
- DtsEmitHelpers_1.DtsEmitHelpers.emitImport(writer, entity, astImport);
- }
+ DtsEmitHelpers_1.DtsEmitHelpers.emitImport(writer, entity, astImport);
}
}
writer.ensureSkippedLine();
6 changes: 6 additions & 0 deletions patches/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,9 @@ Related github issue: https://github.com/microsoft/rushstack/issues/4430
It also adds the ability to specify `bundledPackages` using regular expressions, rather than exact-match package names.
The relevant changes can be found on this branch: https://github.com/Josmithr/rushstack/tree/regexp-bundledPackages
Related github issue: https://github.com/microsoft/rushstack/issues/4426

Finally, it mitigates an issue where imports (potentially from other packages) are trimmed from the generated type rollups based on the release tags associated with the imported items.
This issue has the potential to create invalid type rollups.
The mitigation is to simply not trim imports in the type rollups - introducing (potentially) unused type imports is benign and should have negligable impact on file sizes in most cases.
The relevant changes can be found on this branch: https://github.com/Josmithr/rushstack/tree/dont-trim-imports
Related github issue: https://github.com/microsoft/rushstack/issues/4425
Loading
Loading