Skip to content
Open
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
8 changes: 4 additions & 4 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.18.3
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
registry-url: https://npm.pkg.github.com/
node-version: 14.18.3
node-version: 20
cache: 'npm'
- name: Installing dependencies
run: npm install
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.18.3
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
registry-url: https://npm.pkg.github.com/
node-version: 14.18.3
node-version: 20
cache: 'npm'
- name: Intstalling dependencies
run: npm install
Expand All @@ -23,12 +23,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.18.3
uses: actions/setup-node@v2
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
registry-url: https://npm.pkg.github.com/
node-version: 14.18.3
node-version: 20
cache: 'npm'
- name: Installing dependencies
run: npm install
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Use Node.js 14.18.3
uses: actions/setup-node@v1
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 14.18.3
node-version: 20
- name: Auth github
run: |
git config user.email "ci@evite.com"
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Changelog

## 0.4.0

### Breaking Changes

- **Firebase v12 modular API migration**: Replaced all `firebase/compat/*` imports with modular equivalents from `firebase/app`, `firebase/database`, and `firebase/auth`
- `signOut` is now an instance method instead of a static method (requires an `Auth` instance)
- `peerDependencies.firebase` updated from `^9.8.3` to `^12.0.0`

### Fixed

- `collectionObserver`: `limitToFirst` constraint now correctly references `props.limitToFirst` instead of an undefined local variable

### Changed

- TypeScript compilation target updated from ES2015 to ES2020
- CI workflows updated to Node.js 20 and actions v4
- Removed `firebase-init.ts` compat singleton wrapper
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"firebase": "^5.3.0",
"firebase": "^12.0.0",
"react": "^16.4.1",
"react-dom": "^16.4.1",
"react-scripts": "1.1.4",
Expand Down
19 changes: 0 additions & 19 deletions dist/build/types/database.d.ts

This file was deleted.

7 changes: 0 additions & 7 deletions dist/build/types/firebase-init.d.ts

This file was deleted.

5 changes: 0 additions & 5 deletions dist/build/types/index.d.ts

This file was deleted.

4 changes: 2 additions & 2 deletions dist/build/types/collection.d.ts → dist/collection.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { RTDatabase } from './database';
declare type Args = {
type Args = {
database?: RTDatabase;
path?: string;
orderByKey?: boolean;
Expand All @@ -9,7 +9,7 @@ declare type Args = {
limitToLast?: number;
limitToFirst?: number;
};
declare type PropTypes = Args;
type PropTypes = Args;
/**
* This function/decorator creates a HOC that wraps the given
* component and listens to collection events.
Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions dist/database.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import type { FirebaseOptions } from 'firebase/app';
import { Database } from 'firebase/database';
import { Auth } from 'firebase/auth';
import type { Persistence, UserCredential } from 'firebase/auth';
import { Document } from './document';
type Args = FirebaseOptions & {
persistence?: Persistence;
};
export declare class RTDatabase {
TIMESTAMP: object;
fdb: Database;
auth: Auth;
authPersistence: Persistence;
constructor({ persistence, ...config }: Args);
get: (path: string) => Document;
signInWithCustomToken: (token: string) => Promise<UserCredential>;
goOffline: () => void;
goOnline: () => void;
signOut: () => Promise<void>;
}
export {};
10 changes: 4 additions & 6 deletions dist/build/types/document.d.ts → dist/document.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
import firebase from 'firebase/compat/app';
import type { DatabaseReference, DataSnapshot, OnDisconnect, Unsubscribe } from 'firebase/database';
import { RTDatabase } from './database';
declare type DatabaseReference = firebase.database.Reference;
declare type DataSnapshot = firebase.database.DataSnapshot;
export declare class Document {
_ref: DatabaseReference;
_valuePromise: Promise<any>;
_resolveValues: (value?: unknown) => void;
_rejectValues: (error: unknown) => void;
_listeners: Set<any>;
_value: any;
_unsubscribe: Unsubscribe;
constructor(reference: RTDatabase | DatabaseReference, path?: string);
_onValueHandler: (response: DataSnapshot) => void;
_onErrorHandler: (error: unknown) => void;
_onErrorHandler: (error: Error) => void;
get key(): string | null;
get value(): any;
get path(): string;
Expand Down Expand Up @@ -46,7 +45,6 @@ export declare class Document {
* @returns Promise
*/
remove: () => Promise<void>;
onDisconnect: () => firebase.database.OnDisconnect;
onDisconnect: () => OnDisconnect;
close: () => void;
}
export {};
2 changes: 1 addition & 1 deletion dist/firebase-react-store.cjs.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/firebase-react-store.cjs.js.map

Large diffs are not rendered by default.

Loading