Skip to content

feat: add JSON schema for .firebaserc - #11164

Open
richieforeman wants to merge 1 commit into
firebase:mainfrom
richieforeman:rf/firebaserc-schema
Open

richieforeman wants to merge 1 commit into
firebase:mainfrom
richieforeman:rf/firebaserc-schema

Conversation

@richieforeman

Copy link
Copy Markdown
Contributor

Description

Adds a JSON schema definition (schema/firebaserc.json) for the Firebase Runtime Configuration (.firebaserc) file. The schema covers projects, targets (hosting, storage, database, firestore), etags, and legacy dataconnectEmulatorConfig.

Scenarios Tested

  • Validated against existing .firebaserc files in the repository using Ajv.
  • Validated against full multi-target configuration example.
  • Checked Prettier code formatting.

### Description
Adds a JSON schema definition (`schema/firebaserc.json`) for the Firebase Runtime Configuration (`.firebaserc`) file. The schema covers `projects`, `targets` (hosting, storage, database, firestore), `etags`, and legacy `dataconnectEmulatorConfig`.

### Scenarios Tested
- Validated against existing `.firebaserc` files in the repository using Ajv.
- Validated against full multi-target configuration example.
- Checked Prettier code formatting.

### Sample Commands
npx prettier --check schema/firebaserc.json

@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 introduces a JSON schema for the Firebase Runtime Configuration file (.firebaserc) under schema/firebaserc.json. Feedback on the schema suggests setting "additionalProperties": true at the root level instead of false to prevent validation failures on .firebaserc files containing custom or arbitrary properties, which are preserved by the Firebase CLI.

Comment thread schema/firebaserc.json
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@ad7c1e3). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #11164   +/-   ##
=======================================
  Coverage        ?   60.88%           
=======================================
  Files           ?      651           
  Lines           ?    43805           
  Branches        ?     9011           
=======================================
  Hits            ?    26669           
  Misses          ?    14897           
  Partials        ?     2239           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

This branch has not been deployed

No deployments
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