Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Added default value for `emulators.dataconnect.dataDir` to `init dataconnect`.
- Fixed an issue where `firebase` would error out instead of displaying help text.
9 changes: 4 additions & 5 deletions src/bin/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

// Check for older versions of Node no longer supported by the CLI.
import * as semver from "semver";
const pkg = require("../../package.json");

Check warning on line 5 in src/bin/firebase.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value

Check warning on line 5 in src/bin/firebase.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Require statement not part of import statement
const nodeVersion = process.version;
if (!semver.satisfies(nodeVersion, pkg.engines.node)) {

Check warning on line 7 in src/bin/firebase.ts

View workflow job for this annotation

GitHub Actions / lint (20)

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

Check warning on line 7 in src/bin/firebase.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .engines on an `any` value
console.error(
`Firebase CLI v${pkg.version} is incompatible with Node.js ${nodeVersion} Please upgrade Node.js to version ${pkg.engines.node}`,

Check warning on line 9 in src/bin/firebase.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Invalid type "any" of template literal expression

Check warning on line 9 in src/bin/firebase.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .version on an `any` value

Check warning on line 9 in src/bin/firebase.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Invalid type "any" of template literal expression

Check warning on line 9 in src/bin/firebase.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe member access .engines on an `any` value
);
process.exit(1);
}
Expand All @@ -14,9 +14,9 @@
import * as updateNotifierPkg from "update-notifier-cjs";
import * as clc from "colorette";
import { markedTerminal } from "marked-terminal";
const updateNotifier = updateNotifierPkg({ pkg });

Check warning on line 17 in src/bin/firebase.ts

View workflow job for this annotation

GitHub Actions / lint (20)

Unsafe assignment of an `any` value
import { marked } from "marked";
marked.use(markedTerminal() as any);

Check warning on line 19 in src/bin/firebase.ts

View workflow job for this annotation

GitHub Actions / lint (20)

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

import { CommanderStatic } from "commander";
import { join } from "node:path";
Expand All @@ -33,7 +33,7 @@
import * as utils from "../utils";
import * as winston from "winston";

let args = process.argv.slice(2);
const args = process.argv.slice(2);
let cmd: CommanderStatic;

function findAvailableLogFile(): string {
Expand Down Expand Up @@ -161,11 +161,10 @@
});

if (!handlePreviewToggles(args)) {
cmd = client.cli.parse(process.argv);

// determine if there are any non-option arguments. if not, display help
args = args.filter((arg) => !arg.includes("-"));
// determine if there are any arguments. if not, display help
if (!args.length) {
client.cli.help();
} else {
cmd = client.cli.parse(process.argv);
}
}
Loading