Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: changelog
  • Loading branch information
emwp committed Oct 8, 2024
commit b998de954262c2ba780114d593c0580544e4bfca
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Added App Hosting as an option for firebase init. (#7803)
- Parsing pubspec.yaml to detect dependencies that might require the --no-tree-shake-icons flag in order to build. (#7724)
9 changes: 2 additions & 7 deletions src/frameworks/flutter/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { sync as spawnSync } from "cross-spawn";
import { copy, pathExists } from "fs-extra";
import { copy } from "fs-extra";
import { join } from "path";
import * as yaml from "yaml";
import { readFile } from "fs/promises";

import { BuildResult, Discovery, FrameworkType, SupportLevel } from "../interfaces";
import { FirebaseError } from "../../error";
Expand All @@ -13,22 +11,19 @@
export const type = FrameworkType.Framework;
export const support = SupportLevel.Experimental;

export async function discover(dir: string): Promise<Discovery | undefined> {

Check warning on line 14 in src/frameworks/flutter/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing JSDoc comment
if (!(await pathExists(join(dir, "pubspec.yaml")))) return;
if (!(await pathExists(join(dir, "web")))) return;
const pubSpecBuffer = await readFile(join(dir, "pubspec.yaml"));
const pubSpec = yaml.parse(pubSpecBuffer.toString());
const pubSpec = await getPubSpec(dir);
const usingFlutter = pubSpec.dependencies?.flutter;

Check warning on line 16 in src/frameworks/flutter/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value

Check warning on line 16 in src/frameworks/flutter/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .flutter on an `any` value
if (!usingFlutter) return;
return { mayWantBackend: false };
}

export function init(setup: any, config: any) {

Check warning on line 21 in src/frameworks/flutter/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing return type on function

Check warning on line 21 in src/frameworks/flutter/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Missing JSDoc comment

Check warning on line 21 in src/frameworks/flutter/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type

Check warning on line 21 in src/frameworks/flutter/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unexpected any. Specify a different type
assertFlutterCliExists();
// Convert the projectId into a valid pubspec name https://dart.dev/tools/pub/pubspec#name
// the projectId should be safe, save hyphens which we turn into underscores here
// if it's a reserved word just give it a fallback name
const projectName = DART_RESERVED_WORDS.includes(setup.projectId)

Check warning on line 26 in src/frameworks/flutter/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value

Check warning on line 26 in src/frameworks/flutter/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe argument of type `any` assigned to a parameter of type `string`

Check warning on line 26 in src/frameworks/flutter/index.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .projectId on an `any` value
? FALLBACK_PROJECT_NAME
: setup.projectId.replaceAll("-", "_");
const result = spawnSync(
Expand Down
Loading