Skip to content

feat(kit): replace @angular/fire with vanilla firebase/auth - #11

Merged
rdlabo merged 5 commits into
mainfrom
feat/kit-firebase-vanilla
Jul 13, 2026
Merged

feat(kit): replace @angular/fire with vanilla firebase/auth#11
rdlabo merged 5 commits into
mainfrom
feat/kit-firebase-vanilla

Conversation

@rdlabo

@rdlabo rdlabo commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • @angular/fire はメンテ終了 & Angular アップグレードのブロッカーのため、kit の auth-firebase を vanilla firebase/auth に移行
  • 既存の KIT_FIREBASE_AUTH seam を活かし provider ローカルの内部変更で完結(consumer 側アプリのソースは無変更)
    • provideKitFirebase: firebase/app + firebase/auth を直接初期化(getApps() ガード)し KIT_FIREBASE_AUTHuseValue でバインド。シグネチャ・戻り値型は不変
    • auth ops(kit-firebase-auth.ts / kit-social.ts)の import を @angular/fire/authfirebase/auth
    • provideKitFirebaseAnalytics: firebase/analytics
  • firebaseoptional peerDependency>=11 <13)に。provider・ops・KIT_FIREBASE_AUTH がアプリの単一 firebase コピーを共有し dual-SDK silent no-op を回避
  • @angular/fire 依存と ng-package.jsonallowedNonPeerDependencies を削除
  • Angular 21 のままリリース(peer は ^21.0.0 維持)。kit version 0.0.220.0.23

参考: markgoho/doula-cooperative#89

Test plan

  • npm run lint(All files pass)
  • npm test(206 passed / auth・social spec 含む)
  • npx ng build kit(auth-firebase / social エントリ含めビルド成功、dist に firebase peer 反映)
  • リリース後、各 fleet app で firebase 直接依存整備 + kit bump + 実機の sign-in/out/token 動作確認

Note

  • Angular 22 アップグレードは本 PR と分離(別途 stash 済み)。本 PR は Angular 21 ラインでの firebase 移行のみ
  • ベースに未 push の kit コミット3件(live-update readiness / released / toast anchor、kit 0.0.21 → 0.0.22)を含む。firebase 移行+Angular21 peer 是正が最上位2コミット

rdlabo and others added 4 commits July 9, 2026 11:14
Skip slot="top" tab bars when auto-selecting positionAnchor so desktop layouts like airlec no longer pull toasts to the header.

Co-authored-by: Cursor <cursoragent@cursor.com>
@angular/fire is unmaintained and blocks the Angular upgrade path. Since the
auth-firebase entry point was already designed around the KIT_FIREBASE_AUTH seam,
swap the SDK provider-locally: initialize firebase/app + firebase/auth directly
in provideKitFirebase (getApps guard + useValue bind), and import all auth ops
from firebase/auth instead of @angular/fire/auth. Consumers are unchanged.

Declare firebase as an optional peerDependency so the app's single firebase copy
is shared by the provider, ops, and KIT_FIREBASE_AUTH (avoids the dual-SDK
silent no-op). Drop the @angular/fire dependency and the ng-package
allowedNonPeerDependencies entry.

Co-authored-by: Cursor <cursoragent@cursor.com>
@netlify

netlify Bot commented Jul 13, 2026

Copy link
Copy Markdown

Deploy Preview for rdlabo-ionic-angular-library ready!

Name Link
🔨 Latest commit 598f4f3
🔍 Latest deploy log https://app.netlify.com/projects/rdlabo-ionic-angular-library/deploys/6a54e1c8f814ef000886f75e
😎 Deploy Preview https://deploy-preview-11--rdlabo-ionic-angular-library.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@devin-ai-integration devin-ai-integration 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.

Devin Review found 1 potential issue.

View 2 additional findings in Devin Review.

Open in Devin Review

Comment thread projects/kit/package.json Outdated
Comment on lines +5 to +8
"@angular/common": "^22.0.0",
"@angular/core": "^22.0.0",
"@angular/forms": "^22.0.0",
"@angular/router": "^22.0.0",

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.

🔴 公開パッケージのAngular最低バージョンが存在しないバージョンに引き上げられ、全利用者のインストールが失敗する

公開パッケージのAngularピア依存関係が ^22.0.0 に引き上げられている(projects/kit/package.json:5-8)が、リポジトリ自体と全利用プロジェクトはAngular 21を使用しているため、全利用者で npm install 時にピア依存関係エラーが発生する。
Impact: パッケージを更新した全てのアプリでインストールが失敗し、ビルドできなくなる。

ルートpackage.jsonとの不整合の詳細

ルート package.json:35-42 では全Angular依存関係が ^21.0.0 で宣言されている。AGENTS.mdに記載された全利用プロジェクト(winecode, receptray, tipsys, foodlabel, odss-mobile)もAngular 21を使用している。^22.0.0 はAngular 22以上を要求するが、現時点でAngular 22はリリースされていない。以前のバージョン(^21.0.0)が正しい値。

Suggested change
"@angular/common": "^22.0.0",
"@angular/core": "^22.0.0",
"@angular/forms": "^22.0.0",
"@angular/router": "^22.0.0",
"@angular/common": "^21.0.0",
"@angular/core": "^21.0.0",
"@angular/forms": "^21.0.0",
"@angular/router": "^21.0.0",
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

…elease

The Angular 22 peer bump (^21 -> ^22) and version 0.0.24 leaked in from the
shelved Angular 22 WIP. Ship the firebase migration on the Angular 21 line:
peers back to ^21.0.0, version 0.0.22 -> 0.0.23.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rdlabo
rdlabo merged commit 24e508a into main Jul 13, 2026
10 checks passed
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.

1 participant