Skip to content

api-extractor replacement test - #10233

Draft
hsubox76 wants to merge 2 commits into
mainfrom
ch-api-extractor-upgrade
Draft

api-extractor replacement test#10233
hsubox76 wants to merge 2 commits into
mainfrom
ch-api-extractor-upgrade

Conversation

@hsubox76

Copy link
Copy Markdown
Contributor

No description provided.

@changeset-bot

changeset-bot Bot commented Jul 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8eab1fc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@wiz-9635d3485b

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities 2 High 1 Medium
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total 2 High 1 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try the Wiz Code extension for VS Code, JetBrains, or Visual Studio.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request migrates the project from a custom api-extractor-me package to the official @microsoft/api-extractor package, updating configuration files and build scripts for the messaging package accordingly. It also updates the documentation generator script to support copying multiple API JSON files. Feedback on these changes includes correcting an invalid and temporarily hardcoded package path in the docgen script, as well as renaming a loop variable to avoid shadowing the imported path module.

Comment thread scripts/docgen/docgen.ts
Comment on lines +220 to +221
// FIXME: hardcoding a single package while developing
await spawn('yarn', ['--cwd', 'firebase/messaging', 'api-report'], {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

The hardcoded path 'firebase/messaging' seems to be incorrect as the package is located in 'packages/messaging'. Additionally, hardcoding a single package breaks the documentation generation for all other packages. This temporary change should be reverted before merging.

      await spawn('yarn', ['api-report'], {

Comment thread scripts/docgen/docgen.ts
Comment on lines +278 to +281
for (const path of paths) {
const fileName = path.split('/').pop();
fs.copyFileSync(path, `${tmpDir}/${fileName}`);
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

The loop variable path shadows the imported path module (from import * as path from 'path'). Rename the variable to filePath or apiPath to avoid shadowing and potential confusion.

Suggested change
for (const path of paths) {
const fileName = path.split('/').pop();
fs.copyFileSync(path, `${tmpDir}/${fileName}`);
}
for (const apiPath of paths) {
const fileName = apiPath.split('/').pop();
fs.copyFileSync(apiPath, `${tmpDir}/${fileName}`);
}

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