Skip to content

Commit 3ce7ee1

Browse files
authored
Make Angular manifest parsing more robust (#311)
* Parse out new lines for angular manifest parsing * bump version * lint * add todo
1 parent c02e7b3 commit 3ce7ee1

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@apphosting/adapter-angular/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@apphosting/adapter-angular",
3-
"version": "17.2.12",
3+
"version": "17.2.13",
44
"main": "dist/index.js",
55
"description": "Experimental addon to the Firebase CLI to add web framework support",
66
"repository": {

packages/@apphosting/adapter-angular/src/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ export function populateOutputBundleOptions(outputPaths: OutputPaths): OutputBun
108108

109109
export function parseOutputBundleOptions(buildOutput: string): OutputBundleOptions {
110110
const strippedManifest = extractManifestOutput(buildOutput);
111-
const parsedManifest = JSON.parse(strippedManifest) as string;
111+
// TODO: add functional tests that test this flow
112+
const parsedManifest = JSON.parse(strippedManifest.replace(/[\r\n]+/g, "")) as string;
112113
const manifest = buildManifestSchema.parse(parsedManifest);
113114
if (manifest["errors"].length > 0) {
114115
// errors when extracting manifest

0 commit comments

Comments
 (0)