Skip to content

feat(react): support firebase v12 #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
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
10 changes: 10 additions & 0 deletions .changeset/old-shirts-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
"@dataconnect/default-connector": minor
"@tanstack-query-firebase/react": minor
---

Firebase v12.0.0 support whilst maintaining backward compatibility.

- Update peerDependencies to support Firebase v10.14.0+, v11.3.0+, and v12.0.0+
- Users can now use any supported Firebase version
- No breaking changes to existing functionality
20 changes: 10 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ jobs:
run: pnpm test:emulator

- name: Build packages
run: pnpm turbo build
run: pnpm turbo build --filter=@tanstack-query-firebase/react --filter=@tanstack-query-firebase/angular

- name: Verify build outputs
run: |
Expand All @@ -120,27 +120,27 @@ jobs:
fi
fi
done

if [ -n "$MISSING_BUILDS" ]; then
echo "❌ Build outputs missing for: $MISSING_BUILDS"
exit 1
fi

echo "✅ All build outputs verified"

- name: Validate changesets
run: |
set -e
CHANGESET_FILES=$(find .changeset -name "*.md" -type f ! -name "README.md" 2>/dev/null || true)

if [ -z "$CHANGESET_FILES" ]; then
echo "❌ No changesets found!"
echo ""
echo "Please create changesets locally with: pnpm changeset"
echo "Changesets should be created during development, not during release."
exit 1
fi

CHANGESET_COUNT=$(echo "$CHANGESET_FILES" | wc -l | tr -d ' ')
echo "✅ Found $CHANGESET_COUNT changeset(s):"
echo "$CHANGESET_FILES" | while read -r file; do
Expand Down Expand Up @@ -177,19 +177,19 @@ jobs:
# Configure git user for changeset version command
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"

# Save current HEAD reference before making changes
ORIGINAL_HEAD=$(git rev-parse HEAD)
# Create a temporary branch for dry run with unique name
FALLBACK_ID=${GITHUB_RUN_ID:-$RANDOM$RANDOM}
TEMP_BRANCH="dry-run-temp-$FALLBACK_ID"
git checkout -b "$TEMP_BRANCH"
pnpm changeset version

echo ""
echo "🔍 Changed files:"
git diff --name-status "$ORIGINAL_HEAD"

echo ""
echo "🔍 Package version changes:"
VERSION_CHANGES=$(git diff "$ORIGINAL_HEAD" -- '**/package.json' | grep -E "^[+-]\s*\"version\"" || true)
Expand All @@ -198,10 +198,10 @@ jobs:
else
echo "$VERSION_CHANGES"
fi

# Clean up
git checkout -
git branch -D "$TEMP_BRANCH"

echo ""
echo "✅ Dry run completed successfully"
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:

# Build packages before testing
- name: Build packages
run: pnpm turbo build
run: pnpm turbo build --filter=@tanstack-query-firebase/react --filter=@tanstack-query-firebase/angular

# Verify build outputs
- name: Verify build outputs
Expand All @@ -122,7 +122,7 @@ jobs:
fi
fi
done

if [ -n "$MISSING_BUILDS" ]; then
echo "❌ Build outputs not found for: $MISSING_BUILDS"
exit 1
Expand Down
2 changes: 1 addition & 1 deletion dataconnect-sdk/js/default-connector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@
"peerDependencies": {
"firebase": "^10.14.0 || ^11.3.0"
}
}
}
6 changes: 3 additions & 3 deletions examples/react-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
"lint": "next lint"
},
"dependencies": {
"@tanstack/react-query": "^5.55.4",
"@tanstack-query-firebase/react": "link:../../packages/react/dist",
"@dataconnect/default-connector": "link:../../dataconnect-sdk/js/default-connector",
"firebase": "^11.3.0",
"@tanstack-query-firebase/react": "link:../../packages/react/dist",
"@tanstack/react-query": "^5.55.4",
"firebase": "^12.0.0",
"next": "15.1.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
Expand Down
Loading
Loading