Skip to content

Fix Angular#10532

Draft
falahat wants to merge 11 commits into
mainfrom
fix_angular
Draft

Fix Angular#10532
falahat wants to merge 11 commits into
mainfrom
fix_angular

Conversation

@falahat
Copy link
Copy Markdown
Contributor

@falahat falahat commented May 19, 2026

Description

The local builds code was hard-expecting this field to exist. However, that's only the case for nextjs apps (and only standalone ones). This PR makes the code gracefully handle missing values for this.

Scenarios Tested

Successfully deployed an angular app

Copy link
Copy Markdown
Contributor

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

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 updates the local build process to support frameworks like Angular that do not provide an outputFiles block in their bundle.yaml. It modifies the parsing logic to default to an empty array instead of throwing an error and updates the deployment preparation to handle cases with zero output files. The review identified a type safety issue regarding the use of 'any' in the test suite and highlighted a regression where multiple output files are now silently ignored instead of triggering an error.

Comment thread src/apphosting/localbuilds.spec.ts Outdated
it("returns empty outputFiles and succeeds if bundle.yaml has no outputFiles block (e.g., Angular)", async () => {
const rfs = fsExtra.readFileSync as sinon.SinonStub;
rfs.restore(); // Restore and stub specifically for this test case
sinon.stub(fsExtra, "readFileSync").callsFake((pathStr: any) => {
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

Avoid using any as an escape hatch, as per the repository style guide. Since the stubbed function is only expected to handle string paths in this test context, you should use a more specific type like string.

Suggested change
sinon.stub(fsExtra, "readFileSync").callsFake((pathStr: any) => {
sinon.stub(fsExtra, "readFileSync").callsFake((pathStr: string) => {
References
  1. Never use any or unknown as an escape hatch. Define proper interfaces/types or use type guards. (link)

Comment thread src/deploy/apphosting/prepare.ts Outdated
@wiz-9635d3485b
Copy link
Copy Markdown

wiz-9635d3485b Bot commented May 20, 2026

Wiz Scan Summary

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

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

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.

3 participants