@donotdev/auth 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@donotdev/auth",
3
- "version": "0.0.10",
3
+ "version": "0.0.11",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -42,14 +42,14 @@
42
42
  "type-check": "bunx tsc --noEmit"
43
43
  },
44
44
  "peerDependencies": {
45
- "@donotdev/components": "^0.0.19",
46
- "@donotdev/core": "^0.0.25",
47
- "@donotdev/firebase": "^0.0.12",
45
+ "@donotdev/components": "^0.0.21",
46
+ "@donotdev/core": "^0.0.27",
47
+ "@donotdev/firebase": "^0.0.14",
48
48
  "firebase": "^12.9.0",
49
+ "lucide-react": "*",
49
50
  "react": "^19.2.4",
50
51
  "react-dom": "^19.2.4",
51
- "react-hook-form": "*",
52
- "lucide-react": "*"
52
+ "react-hook-form": "*"
53
53
  },
54
54
  "publishConfig": {
55
55
  "registry": "https://registry.npmjs.org",
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=MultipleAuthProviders.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MultipleAuthProviders.test.d.ts","sourceRoot":"","sources":["../../../src/components/__tests__/MultipleAuthProviders.test.tsx"],"names":[],"mappings":""}
@@ -1 +0,0 @@
1
- import{jsx as s}from"react/jsx-runtime";import{describe as v,it as l,expect as a,vi as t,beforeEach as m}from"vitest";import{render as n,screen as i,fireEvent as u}from"@testing-library/react";import c from"../MultipleAuthProviders";const d=t.fn();t.mock("../../hooks/useAuth",()=>({useAuth:()=>({signInWithProvider:d})})),t.mock("@donotdev/components",()=>({Button:({children:e,onClick:o,...r})=>s("button",{onClick:o,...r,children:e}),Stack:({children:e,...o})=>s("div",{...o,children:e})})),v("MultipleAuthProviders",()=>{const e=["google","github"];m(()=>{t.clearAllMocks()}),l("renders all provided auth providers",()=>{n(s(c,{providers:e})),a(i.getByRole("button")).toBeDefined()}),l("calls signInWithProvider when provider button clicked",()=>{n(s(c,{providers:e}));const o=i.getAllByRole("button")[0];o&&(u.click(o),a(d).toHaveBeenCalled())}),l("calls onSuccess callback after successful auth",async()=>{const o=t.fn();d.mockResolvedValue({user:{id:"123"}}),n(s(c,{providers:e,onSuccess:o}));const r=i.getAllByRole("button")[0];r&&(u.click(r),await new Promise(h=>setTimeout(h,100)))}),l("shows labels when showLabels is true",()=>{n(s(c,{providers:e,showLabels:!0})),a(i.getAllByRole("button").length).toBeGreaterThan(0)})});